/* =====================================================================
   Tema 2026: restyle grafico del pannello.
   Caricato DOPO main.css: sovrascrive solo l'aspetto, non tocca HTML né logica.
   Per tornare alla grafica originale basta togliere il <link> da index.html.
   ===================================================================== */

:root {
  --c-bg: #f4f5fa;
  --c-surface: #ffffff;
  --c-border: #e6e8f0;
  --c-text: #1d2433;
  --c-muted: #6b7385;
  --c-primary: #5b4cf0;
  --c-primary-2: #8b5cf6;
  --c-primary-soft: #efedff;
  --c-side: #12142b;
  --c-side-2: #1b1e3d;
  --c-side-text: #a9aecb;
  --c-success: #12b886;
  --c-warning: #f59f00;
  --c-danger: #e5484d;
  --c-info: #1c9bef;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .10);
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Base ---------- */
html, body, .app, button, input, select, textarea, .btn, .form-control,
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, p, span, a, li, td, th, label {
  font-family: var(--font);
}
body, body.app { background: var(--c-bg); color: var(--c-text); -webkit-font-smoothing: antialiased; }
.app > .main-container:before { background-color: var(--c-bg); }
a { color: var(--c-primary); }
a:hover, a:focus { color: var(--c-primary-2); }
.text-muted { color: var(--c-muted) !important; }

/* ---------- Header ---------- */
.app > .header-container,
.app > .header-container .top-header,
.header-container.bg-dark, .top-header.bg-dark {
  background: var(--c-surface) !important;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
}
.top-header .logo {
  background: var(--c-side) !important;
  height: 60px; line-height: 60px;
}
.top-header .logo a, .top-header .logo .logo-text { color: #fff !important; font-weight: 700; letter-spacing: -.01em; }
.top-header .logo .logo-icon {
  color: #fff; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  border-radius: 8px; padding: 6px; font-size: 13px; margin-right: 6px; vertical-align: 1px;
}
.top-header .top-nav { height: 60px; }
.top-header .top-nav > ul > li > a,
.top-header .top-nav a { color: var(--c-text) !important; font-weight: 500; font-size: 13px; }
.top-header .top-nav > ul > li > a:hover { background: var(--c-primary-soft) !important; color: var(--c-primary) !important; border-radius: var(--radius-sm); }
.top-header .top-nav .toggle-min i { color: var(--c-muted); }
/* le icone PNG dell'header sono bianche: le scuriamo per lo sfondo chiaro */
.top-header img.img30_30 { filter: invert(23%) sepia(10%) saturate(800%) hue-rotate(195deg) brightness(.9); width: 22px !important; height: 22px !important; opacity: .85; }
.top-header .nav-profile img.img-circle { filter: none; }
.top-header .dropdown-menu, .top-header .dropdown-menu.bg-dark {
  background: var(--c-surface) !important; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover); padding: 6px;
}
.top-header .dropdown-menu > li > a { color: var(--c-text) !important; border-radius: 8px; padding: 8px 12px; }
.top-header .dropdown-menu > li > a:hover { background: var(--c-primary-soft) !important; color: var(--c-primary) !important; }
.dropdown-menu.with-arrow:before, .dropdown-menu.with-arrow:after { display: none; }
@media (min-width: 768px) {
  .app > .header-container.header-fixed + .main-container { padding-top: 60px; }
}

/* ---------- Sidebar ---------- */
.app > .main-container > .nav-container,
.nav-container.bg-dark, #nav-container {
  background: linear-gradient(180deg, var(--c-side) 0%, var(--c-side-2) 100%) !important;
  border: 0;
}
#nav { padding: 10px 10px 30px; }
#nav > li > a {
  color: var(--c-side-text) !important; border-radius: var(--radius-sm);
  margin: 2px 0; padding: 11px 14px; font-weight: 500; font-size: 13.5px;
  border: 0 !important; transition: background .15s, color .15s;
}
#nav > li > a > i { color: #7d83a8; transition: color .15s; }
#nav > li > a:hover, #nav > li.open > a {
  background: rgba(255, 255, 255, .06) !important; color: #fff !important;
}
#nav > li > a:hover > i, #nav > li.open > a > i { color: #fff; }
/* il menu originale marca "active" tutte le voci con sottomenu: evidenziamo solo le voci finali */
#nav > li.active:not(:has(> ul)) > a {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)) !important;
  color: #fff !important; box-shadow: 0 6px 16px rgba(91, 76, 240, .35);
}
#nav > li.active:not(:has(> ul)) > a > i { color: #fff; }
#nav li { border: 0 !important; }
#nav ul { background: transparent !important; padding: 2px 0 6px 12px; }
#nav ul li > a { color: var(--c-side-text) !important; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
#nav ul li > a:hover, #nav ul li.active > a { color: #fff !important; background: rgba(255, 255, 255, .05) !important; }
#nav ul li > a > i { color: #5c6187; }
#nav .nav-title {
  color: #5c6187 !important; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 18px 14px 6px;
}
#nav .nav-divider, #nav .divider { display: none; }
#nav .icon-has-ul { color: #5c6187; }

/* ---------- Contenuto ---------- */
.content-container .page { padding: 28px 32px; }
.page .intro h2, .page > h2, .page-title {
  font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--c-text); margin: 0 0 20px;
}
.page .intro h2 strong { font-weight: 700; }

/* Card e pannelli */
.panel {
  background: var(--c-surface); border: 1px solid var(--c-border) !important; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.panel > .panel-heading, .panel-default > .panel-heading {
  background: var(--c-surface) !important; color: var(--c-text) !important; border-bottom: 1px solid var(--c-border);
  font-weight: 600; font-size: 13px; letter-spacing: .02em; padding: 14px 18px;
  border-top-left-radius: var(--radius); border-top-right-radius: var(--radius);
}
.panel > .panel-heading strong { font-weight: 600; }
.panel-body { padding: 18px; }
.panel-footer { background: #fafbfe; border-top: 1px solid var(--c-border); }

/* Box statistiche della dashboard */
.panel-box.info-box { display: flex; align-items: center; padding: 18px; min-height: 108px; }
.panel-box.info-box:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.panel-box.info-box > .panel-item { display: block; height: auto; padding: 0; background: transparent !important; }
.panel-box.info-box .panel-left {
  flex: 0 0 52px; width: 52px; height: 52px !important; border-radius: 14px; display: flex !important;
  align-items: center; justify-content: center; margin-right: 16px;
}
.panel-box.info-box .panel-left .stat-icon { font-size: 24px !important; line-height: 1; color: inherit; }
.panel-box.info-box .panel-left.bg-orange { background: #fff2e5 !important; color: #f76707; }
.panel-box.info-box .panel-left.bg-warning { background: #fff8db !important; color: #e8a300; }
.panel-box.info-box .panel-left.bg-success { background: #e6fcf5 !important; color: var(--c-success); }
.panel-box.info-box .panel-left.bg-info, .panel-box.info-box .panel-left.bg-primary { background: var(--c-primary-soft) !important; color: var(--c-primary); }
.panel-box.info-box .panel-right { flex: 1; text-align: left; }
.panel-box.info-box .size-h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--c-text); line-height: 1.1; }
.panel-box.info-box .text-muted { font-size: 12.5px; font-weight: 500; }
.paddinggdpr { background: linear-gradient(135deg, #1f3c88, #2b59c3) !important; border-radius: var(--radius); }

/* Colori di sfondo del tema vecchio, più morbidi */
.bg-primary { background-color: var(--c-primary) !important; }
.bg-success { background-color: var(--c-success) !important; }
.bg-warning { background-color: var(--c-warning) !important; }
.bg-danger { background-color: var(--c-danger) !important; }
.bg-info { background-color: var(--c-info) !important; }

/* ---------- Bottoni ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; padding: 9px 16px; transition: all .15s; box-shadow: none; text-transform: none; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm, .btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)); border: 0; color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: linear-gradient(135deg, #4c3de0, #7c4dee); color: #fff; box-shadow: 0 6px 16px rgba(91, 76, 240, .3); }
.btn-default { background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text); }
.btn-default:hover { background: #f7f8fc; border-color: #d5d9e6; }
.btn-success { background: var(--c-success); border-color: var(--c-success); }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); }
.btn-warning { background: var(--c-warning); border-color: var(--c-warning); }
.btn-info { background: var(--c-info); border-color: var(--c-info); }

/* ---------- Form ---------- */
.form-control {
  border-radius: var(--radius-sm); border: 1px solid var(--c-border); box-shadow: none;
  height: 40px; padding: 8px 12px; color: var(--c-text); background: #fff;
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(91, 76, 240, .15); }
.input-group-addon { background: #f7f8fc; border-color: var(--c-border); color: var(--c-muted); }
label, .control-label { font-weight: 600; font-size: 13px; color: var(--c-text); }

/* ---------- Tabelle ---------- */
.table { color: var(--c-text); }
.table > thead > tr > th {
  background: #f8f9fc; color: var(--c-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--c-border) !important; padding: 12px 14px;
}
.table > tbody > tr > td { border-top: 1px solid #eff1f6 !important; padding: 12px 14px; vertical-align: middle; }
.table-hover > tbody > tr:hover, .table-striped > tbody > tr:nth-of-type(odd):hover { background: #f8f7ff; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fbfbfd; }

/* ---------- Varie ---------- */
.label, .badge { border-radius: 999px; font-weight: 600; padding: 4px 9px; }
.alert { border-radius: var(--radius-sm); border: 0; }
.modal-content { border-radius: var(--radius); border: 0; box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
.modal-header { border-bottom: 1px solid var(--c-border); padding: 18px 22px; }
.modal-footer { border-top: 1px solid var(--c-border); }
.nav-tabs { border-bottom: 1px solid var(--c-border); }
.nav-tabs > li > a { border-radius: 8px 8px 0 0; color: var(--c-muted); font-weight: 500; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover { color: var(--c-primary); border-color: var(--c-border) var(--c-border) #fff; }
.pagination > li > a, .pagination > li > span { border-color: var(--c-border); color: var(--c-text); }
.pagination > .active > a, .pagination > .active > span { background: var(--c-primary); border-color: var(--c-primary); }
.app-footer { background: transparent !important; color: var(--c-muted); border-top: 1px solid var(--c-border); font-size: 12px; }
#loading-bar .bar { background: var(--c-primary); }

/* ---------- Login ---------- */
body.bodylogin {
  background: radial-gradient(1200px 600px at 10% -10%, #3b2fd0 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 110%, #8b5cf6 0%, transparent 55%),
              var(--c-side) !important;
}
.page-signin .box-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.page-signin .logincard {
  background: #fff; border-radius: 20px !important; border-top: 0 !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  width: 100%; max-width: 420px; height: auto !important; padding: 40px 36px 28px; position: static; transform: none;
}
.page-signin .divlogo { height: auto; margin-bottom: 24px; }
.page-signin .divlogo img { max-height: 64px; max-width: 220px; }
.page-signin .inputlogin {
  width: 100%; height: 46px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0 14px;
  font-size: 14px; background: #f9fafc; transition: all .15s;
}
.page-signin .inputlogin:focus { outline: 0; border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 3px rgba(91, 76, 240, .15); }
.page-signin .divloginfield { margin-bottom: 12px; }
.page-signin .loginbutton {
  width: 100%; height: 46px; border-radius: var(--radius-sm); border: 0; color: #fff; font-weight: 600; font-size: 15px;
  background-image: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)); margin-top: 8px;
}
.page-signin .loginforgotspacer a { font-size: 13px; font-weight: 500; }
.page-signin .copyright { color: var(--c-muted); font-size: 12px; margin-top: 18px; position: static; }

/* ---------- Correzioni dashboard ---------- */
.page .intro h2, .page .intro h2 strong { text-transform: none; }
.page .intro h2 strong::first-letter { text-transform: uppercase; }
.page .alert, .page uib-alert .alert, .page [uib-alert] {
  background: #fff8e6; color: #8a5a00; border: 1px solid #ffe3a3; padding: 12px 16px; font-size: 13.5px;
}
.page .row > .col-md-10.size-h4 { width: 100%; margin-left: 0; font-size: 14px; }
.page .row > .col-md-1:empty { display: none; }
/* loghi della vecchia gestione: nascosti, il logo vero arriva dal profilo white-label */
.logoaz, .logosmartsidebar { display: none !important; }
.app-footer .copyrig { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--c-muted); }
/* avatar utente nell'header */
.top-header .nav-profile img.img-circle {
  filter: none; opacity: 1; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  padding: 3px; width: 28px !important; height: 28px !important;
}
/* intestazioni pannelli: icona in tinta */
.panel > .panel-heading .fa, .panel > .panel-heading .glyphicon { color: var(--c-primary); margin-right: 4px; }
/* login: niente logo della vecchia gestione, solo il titolo */
.page-signin .divlogo .wrapper { display: none !important; }
/* il vecchio tema metteva il logo in un cerchio sopra la card: lo riportiamo dentro, come semplice titolo */
.page-signin .divlogo {
  position: static !important; transform: none !important; width: auto !important; height: auto !important;
  border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible !important;
  margin: 0 0 24px !important; padding: 0 !important; top: auto !important; left: auto !important;
}
.page-signin .spacer, .page-signin .spacer > .divloginfield:first-child { margin-top: 0 !important; }
/* login: titolo al posto del logo */
.page-signin .divlogo::after {
  content: "Accedi al tuo account"; display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  color: var(--c-text); text-align: center; margin-top: 8px;
}

/* avvisi uib-alert (il template originale non genera il box) */
uib-alert {
  display: block; background: #fff8e6; color: #8a5a00; border: 1px solid #ffe3a3; border-radius: var(--radius-sm);
  padding: 12px 16px 12px 40px; margin-bottom: 18px; font-size: 13.5px; position: relative;
}
uib-alert::before { content: "\f071"; font-family: FontAwesome; position: absolute; left: 15px; top: 12px; color: #f59f00; }
uib-alert[type="success"] { background: #e6fcf5; color: #0b7a5a; border-color: #b2f2dd; }
uib-alert[type="success"]::before { content: "\f00c"; color: var(--c-success); }

/* card Rubrica: da blocco blu a card con banda in gradiente */
.panel-box .panel-top.bg-info { background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)) !important; padding-top: 22px; }
.panel-box .panel-top a { color: #fff !important; font-weight: 600; }
.panel-box .panel-icon.bg-info { background: #fff !important; color: var(--c-primary) !important; box-shadow: 0 8px 22px rgba(91, 76, 240, .25); border: 0; }
.panel-box .panel-icon a, .panel-box .panel-icon i { color: var(--c-primary) !important; }
.panel-box .panel-bottom .size-h2 { font-weight: 700; color: var(--c-text); }

/* liste del profilo e dei gruppi */
.list-info li { border-color: #eff1f6 !important; }
.list-info .icon { color: var(--c-primary) !important; }
.list-group-item { border-color: #eff1f6; }
.badge-info, .badge { background: var(--c-primary-soft); color: var(--c-primary); }
#nav > li > a > span { text-transform: none; }

/* menu a tendina dell'header: testo scuro (il tema originale lo forza bianco) */
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a,
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a span,
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a i { color: var(--c-text) !important; }
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a:hover,
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a:hover span,
#header .top-header .top-nav .dropdown-menu.bg-dark > li > a:hover i { color: var(--c-primary) !important; }

/* =====================================================================
   Kit del brand e "Crea con AI"
   ===================================================================== */
.nav-badge-new {
  margin-left: 8px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)); color: #fff; vertical-align: 1px;
}
.bk-sub { color: var(--c-muted); max-width: 720px; margin: -10px 0 22px; font-size: 14px; }
.bk-loading { color: var(--c-muted); padding: 40px; text-align: center; }
.bk-import { background: linear-gradient(135deg, #f3f1ff, #fbf8ff) !important; border-color: #e3defe !important; }
.bk-import-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; color: var(--c-text); }
.bk-import-title .fa { color: var(--c-primary); margin-right: 6px; }
.bk-import-row { display: flex; gap: 10px; }
.bk-import-row .form-control { flex: 1; }
.bk-warn { margin: 10px 0 0; font-size: 12.5px; color: #8a5a00; }
.bk-candidates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; clear: both; width: 100%; margin: 0 0 16px; font-size: 12.5px; }
.bk-candidates > .text-muted { flex-basis: 100%; }
.bk-logo-choice { border: 1px solid var(--c-border); background: #fff; border-radius: 8px; padding: 4px; height: 44px; }
.bk-logo-choice img { max-height: 34px; max-width: 90px; }
.bk-logo-choice.active { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(91, 76, 240, .15); }
.bk-swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .1); cursor: pointer; }
.bk-color { display: flex; gap: 6px; align-items: center; }
.bk-color input[type=color] { width: 40px; height: 40px; border: 1px solid var(--c-border); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
.bk-seg { display: inline-flex; flex-wrap: wrap; background: #f1f2f7; border-radius: 10px; padding: 3px; gap: 2px; }
.bk-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--c-muted); }
.bk-seg button.active { background: #fff; color: var(--c-primary); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.bk-examples { list-style: none; padding: 0; margin: 10px 0 0; }
.bk-examples li { background: #f8f9fc; border: 1px solid var(--c-border); border-radius: 10px; padding: 8px 32px 8px 12px; margin-bottom: 6px; position: relative; font-size: 13px; }
.bk-examples li a { position: absolute; right: 10px; top: 8px; color: var(--c-muted); }
.bk-sticky { position: sticky; top: 80px; }
.bk-phone { border-radius: 22px; border: 8px solid #12142b; padding: 20px 18px; text-align: center; min-height: 420px; box-shadow: var(--shadow-hover); }
.bk-phone-logo { min-height: 48px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.bk-phone-logo img { max-height: 48px; max-width: 160px; }
.bk-phone h3 { font-weight: 700; font-size: 22px; margin: 6px 0 8px; }
.bk-phone p { font-size: 13.5px; line-height: 1.5; opacity: .9; }
.bk-phone-box { color: #fff; border-radius: 12px; padding: 14px; font-weight: 700; margin: 12px 0; }
.bk-phone-input { border: 1px solid #e3e5ec; background: #fff; color: #9aa0b0; border-radius: 10px; padding: 9px 12px; text-align: left; font-size: 13px; margin-bottom: 8px; }
.bk-phone-btn { color: #fff; border-radius: 10px; padding: 11px; font-weight: 700; margin-top: 4px; }
.bk-phone-foot { display: block; margin-top: 14px; opacity: .7; }
.bk-tone { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bk-chip { background: var(--c-primary-soft); color: var(--c-primary); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.bk-saved, .bk-unsaved { margin-top: 10px; font-size: 12.5px; }
.bk-unsaved { color: #b26a00; font-weight: 600; }

.ai-panel { border: 1px solid #e3defe !important; background: linear-gradient(135deg, #f6f4ff, #fff) !important; }
.ai-panel-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.ai-panel-head strong { display: block; font-size: 15px; color: var(--c-text); }
.ai-panel-head small { color: var(--c-muted); font-size: 12.5px; }
.ai-panel-head > div { flex: 1; }
.ai-spark { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2)); box-shadow: 0 6px 16px rgba(91, 76, 240, .3); font-size: 17px; flex: 0 0 40px; }
.ai-caret { color: var(--c-muted); }
.ai-panel-body { padding: 0 18px 18px; }
.ai-link { margin-left: 12px; font-size: 13px; font-weight: 500; }
.ai-error { margin-top: 12px; }
.ai-result { margin-top: 16px; display: grid; gap: 12px; }
.ai-sms { background: #fff; border: 1px solid var(--c-border); border-radius: 12px; padding: 14px; }
.ai-sms-head { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.ai-sms-head .fa { color: var(--c-primary); margin-right: 4px; }
.ai-sms-bubble { background: #e9e9eb; border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px; max-width: 92%; white-space: pre-wrap; }
.ai-check { background: #fff8e6; border: 1px solid #ffe3a3; border-radius: 12px; padding: 12px 14px; color: #8a5a00; font-size: 13px; }
.ai-check ul { margin: 6px 0 0; padding-left: 18px; }
.ai-hint { display: block; margin-top: 6px; }

/* ---------- Post social ---------- */
.sp-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sp-sim { background: #fff8e6; border: 1px solid #ffe3a3; color: #8a5a00; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; margin-top: 10px; }
.sp-cal { max-height: 620px; overflow-y: auto; }
.sp-day + .sp-day { margin-top: 14px; }
.sp-day-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin-bottom: 6px; }
.sp-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--c-border); border-radius: 12px; padding: 8px; margin-bottom: 6px; transition: border-color .15s, box-shadow .15s; }
.sp-item:hover { border-color: #cfd3e3; }
.sp-item.active { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(91, 76, 240, .12); }
.sp-thumb { flex: 0 0 44px; height: 55px; border-radius: 8px; background: #eef0f6 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #b3b8c9; }
.sp-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-item-title { font-weight: 600; font-size: 13.5px; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-item-meta { font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sp-bozza { background: #eef0f6; color: #5b6275; }
.sp-approvato { background: #e7f8f1; color: #0d8a64; }
.sp-programmato { background: var(--c-primary-soft); color: var(--c-primary); }
.sp-pubblicato { background: #e8f3fe; color: #1170c0; }
.sp-tabs { margin-bottom: 12px; }
.sp-tabs .fa { margin-right: 4px; }
.sp-mock { background: #fff; border: 1px solid var(--c-border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-hover); max-width: 420px; }
.sp-mock-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.sp-mock-head > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.sp-mock-head strong { font-size: 13.5px; }
.sp-mock-head small { color: var(--c-muted); font-size: 11.5px; }
.sp-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--c-border); background: #f1f2f7 center/contain no-repeat; }
.sp-mock-img { position: relative; background: #f1f2f7; aspect-ratio: 4 / 5; }
.sp-mock-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sp-uploading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.6); font-size: 28px; color: var(--c-primary); }
.sp-mock-actions { display: flex; gap: 16px; padding: 10px 14px 4px; font-size: 22px; color: var(--c-text); }
.sp-mock-actions .sp-right { margin-left: auto; }
.sp-mock-actions.sp-fb { justify-content: space-around; font-size: 13.5px; font-weight: 600; color: var(--c-muted); border-top: 1px solid var(--c-border); padding: 10px 6px; }
.sp-ig-text, .sp-fb-text { white-space: pre-line; font-size: 13.5px; line-height: 1.45; padding: 4px 14px 14px; margin: 0; max-height: 260px; overflow-y: auto; }
.sp-fb-text { padding-top: 0; }
.sp-hint { margin-top: 12px; font-size: 12.5px; max-width: 420px; }
.sp-upload { cursor: pointer; margin: 0; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-actions .sp-del { margin-left: auto; color: var(--c-danger); }
.sp-published { color: #1170c0; font-weight: 600; }
.sp-published em { font-weight: 400; color: var(--c-muted); }

/* ---------- WhatsApp ---------- */
.wa-page { --wa-green: #25d366; --wa-dark: #075e54; --wa-out: #d9fdd3; --wa-bg: #efeae2; --wa-blue: #53bdeb; }
.wa-tabs { margin: 0 0 18px; display: inline-flex; }
.wa-tabs button { position: relative; }
.wa-unread { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa-green);
  color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; margin-left: 6px; }
.wa-on { font-size: 10px; text-transform: uppercase; font-weight: 700; color: #0b7a5a; background: #e6fcf5; border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.wa-cat { font-size: 11px; font-weight: 600; color: var(--c-muted); }
.wa-note { font-size: 12px; margin-top: 8px; }
.wa-active { color: #0b7a5a; font-weight: 600; margin: 4px 0 10px; }

/* telefono / chat */
.wa-phone, .wa-chat { background: var(--wa-bg); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(16, 24, 40, .12); }
.wa-phone { max-width: 380px; margin: 0 auto 20px; }
.wa-phone-head { display: flex; align-items: center; gap: 10px; background: var(--wa-dark); color: #fff; padding: 12px 14px; }
.wa-phone-head strong { display: block; font-size: 14px; }
.wa-phone-head small { display: block; font-size: 11px; opacity: .8; }
.wa-avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff center/70% no-repeat; flex: none; }
.wa-phone-body, .wa-chat-body { padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 6px; }
.wa-chat-body { height: 440px; overflow-y: auto; }
.wa-msg { max-width: 82%; padding: 7px 9px 5px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; color: #111b21;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08); word-wrap: break-word; }
.wa-in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 2px; }
.wa-template { max-width: 300px; }
.wa-img { display: block; width: 100%; border-radius: 7px; margin-bottom: 6px; }
.wa-foot { font-size: 11.5px; color: #667781; margin-top: 4px; }
.wa-time { text-align: right; font-size: 10.5px; color: #667781; margin-top: 2px; }
.wa-time .fa-check { font-size: 10px; margin-left: 2px; }
.wa-time .wa-double::after { content: "\f00c"; margin-left: -6px; }
.wa-time .wa-read { color: var(--wa-blue); }
.wa-ai { color: var(--c-primary); margin-right: 3px; }
.wa-btn { border-top: 1px solid #e9edef; margin: 6px -9px -5px; padding: 8px; text-align: center; color: #027eb5; font-weight: 500; font-size: 13.5px; }
.wa-sim-link { margin-left: auto; color: #fff; opacity: .75; font-size: 12px; text-decoration: underline; }
.wa-sim-link:hover { color: #fff; opacity: 1; }

/* elenco conversazioni */
.wa-list { background: #fff; border: 1px solid var(--c-border); border-radius: 14px; overflow-y: auto; max-height: 610px; }
.wa-empty { padding: 18px; }
.wa-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid #f0f2f5;
  background: #fff; text-align: left; }
.wa-item:hover { background: #f5f6f6; }
.wa-item.active { background: #f0f2f5; }
.wa-item-avatar { width: 38px; height: 38px; border-radius: 50%; background: #dfe5e7; color: #54656f; font-weight: 700; flex: none;
  display: inline-flex; align-items: center; justify-content: center; }
.wa-item-body { flex: 1; min-width: 0; display: block; }
.wa-item-top { display: flex; justify-content: space-between; gap: 6px; }
.wa-item-top small { color: #667781; font-size: 11px; }
.wa-item-last { display: block; color: #667781; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item-tag { display: inline-block; font-size: 10px; color: var(--c-primary); background: rgba(91, 76, 240, .08); border-radius: 6px; padding: 0 6px; margin-top: 3px; }

/* scrittura risposta */
.wa-compose { background: #f0f2f5; padding: 10px 12px 12px; }
.wa-compose textarea { border-radius: 10px; resize: vertical; }
.wa-compose-actions { display: flex; justify-content: space-between; margin-top: 8px; }
.wa-window { font-size: 12.5px; color: #8a5a00; background: #fff8e6; border-radius: 8px; padding: 8px 10px; }
.wa-note-ai { font-size: 12.5px; color: #8a5a00; background: #fff8e6; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }

/* report campagne */
.wa-camp { padding: 10px 0 14px; border-bottom: 1px solid #f0f2f5; }
.wa-camp:last-child { border-bottom: 0; }
.wa-camp-head small { display: block; }
.wa-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 8px; text-align: center; }
.wa-stats b { display: block; font-size: 18px; color: var(--c-text); }
.wa-stats span { font-size: 11px; color: var(--c-muted); }
.wa-bar { height: 6px; background: #eef0f3; border-radius: 3px; overflow: hidden; }
.wa-bar i { display: block; height: 100%; background: var(--wa-green); transition: width .6s; }
@media (max-width: 600px) { .wa-stats { grid-template-columns: repeat(3, 1fr); } }
