:root {
  /* Identita' "Crema salone": carta, terracotta, titoli in grazie.
     Tutto passa da qui: per cambiare vestito si riscrive questo blocco. */
  --bg: #f4efe7;
  --panel: #fffdfa;
  --panel-2: #efe7db;
  --border: #e2d7c6;
  --text: #332c25;
  --ink-strong: #241d17;        /* titoli e testo sopra i fondini di marchio */
  --muted: #8b7b68;
  --brand: #b06541;             /* terracotta */
  --brand-2: #d09a6a;
  --brand-ink: #8a4a2b;         /* marchio come COLORE DI TESTO su fondo chiaro */
  --on-brand: #fffaf5;          /* testo sopra il marchio pieno */
  --accent: #6b7a55;            /* verde oliva: costo/min, accenti secondari */
  --good: #4f7a3f;
  --warn: #a06b12;
  --bad: #b0342a;
  /* Le componenti servono ai fondini trasparenti: rgba(var(--brand-rgb), .12).
     Senza queste, ogni tinta andrebbe riscritta a mano a ogni cambio di tema. */
  --brand-rgb: 176,101,65;
  --brand-2-rgb: 208,154,106;
  --good-rgb: 79,122,63;
  --warn-rgb: 160,107,18;
  --bad-rgb: 176,52,42;
  --font: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-titoli: Baskerville, Georgia, "Times New Roman", serif;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(120,90,60,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--text); font-size: 14px;
}
#app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-size: 20px;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: none;
  background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer;
  font-size: 14px; text-align: left; width: 100%; transition: .15s;
}
.nav-item span { font-size: 16px; width: 20px; text-align: center; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(var(--brand-rgb),.22), rgba(var(--brand-2-rgb),.18)); color: var(--ink-strong); }
.nav-sep { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin: 12px 0 4px 12px; }
.nav-sep:first-child { margin-top: 0; }
nav { overflow-y: auto; }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 12px; }
.cpm-badge {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel-2); border-radius: 10px; padding: 9px 12px; font-size: 12px;
}
.cpm-badge span { color: var(--muted); }
.cpm-badge strong { color: var(--accent); font-size: 15px; }
.ai-status { margin-top: 8px; font-size: 11px; color: var(--muted); text-align: center; }

/* Main */
.main { flex: 1; padding: 26px 30px; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 25px; margin: 0; font-family: var(--font-titoli); font-weight: 400;
  letter-spacing: -.2px; color: var(--ink-strong); }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Cards / grid */
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.kpi .value { font-size: 28px; font-weight: 400; font-family: var(--font-titoli);
  letter-spacing: -.3px; color: var(--ink-strong); }
.kpi .delta { font-size: 12px; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.card h3 { margin: 0 0 14px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* Bars */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-row .name { width: 130px; font-size: 13px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; background: var(--panel-2); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; }
.bar-row .val { width: 72px; text-align: right; font-size: 12px; color: var(--muted); }

/* Trend */
.trend { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend .tbar { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); border-radius: 6px 6px 0 0; min-height: 4px; }
.trend .tlabel { font-size: 10px; color: var(--muted); }
.trend .tval { font-size: 10px; color: var(--muted); }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
.clickable { cursor: pointer; }

/* Buttons */
.btn {
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  padding: 9px 15px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; transition: .15s;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: none; color: var(--on-brand); }
.btn.primary:hover { opacity: .92; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(var(--bad-rgb),.4); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn[disabled]:hover { border-color: var(--border); }
.icon-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

/* Forms */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-size: 13px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
/* Le spunte le colora il sistema operativo, di blu: senza questa riga sono
   l'unica cosa fuori tema in tutta l'app. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* Badges / chips */
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--panel-2); color: var(--muted); }
.chip.good { background: rgba(var(--good-rgb),.15); color: var(--good); }
.chip.warn { background: rgba(var(--warn-rgb),.15); color: var(--warn); }
.chip.bad { background: rgba(var(--bad-rgb),.15); color: var(--bad); }
.chip.brand { background: rgba(var(--brand-rgb),.18); color: var(--brand-ink); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: rgba(var(--brand-rgb),.15); color: var(--brand-ink); margin-right: 4px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal.hidden { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-card.wide { max-width: 820px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.modal-head h3 { margin: 0; font-size: 17px; }
#modalBody { padding: 22px; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--border); padding: 12px 20px; border-radius: 10px; box-shadow: var(--shadow); z-index: 200; font-size: 13px; }
.toast.hidden { display: none; }
.toast.ok { border-color: var(--good); }
.toast.err { border-color: var(--bad); }

/* Misc */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search { flex: 1; min-width: 180px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.section-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 22px 0 12px; }
.pill-goals { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.goal-pill { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.goal-pill.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: none; color: var(--on-brand); }

/* Package cards */
.pkg { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--panel-2); position: relative; }
.pkg .pkg-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pkg .pkg-price { font-size: 24px; font-weight: 800; color: var(--ink-strong); }
.pkg .pkg-listino { text-decoration: line-through; color: var(--muted); font-size: 13px; margin-left: 8px; }
.pkg ul { margin: 12px 0; padding-left: 18px; }
.pkg li { margin-bottom: 4px; font-size: 13px; }
.pkg .rationale { background: rgba(var(--brand-rgb),.1); border-left: 3px solid var(--brand); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 12px 0; color: var(--text); }
.pkg .metrics { display: flex; gap: 16px; margin: 10px 0; }
.pkg .metric { font-size: 12px; }
.pkg .metric b { display: block; font-size: 15px; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================== Tabs / alert / barre */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 600; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink-strong); border-bottom-color: var(--brand); }
.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }
.alert.bad { background: rgba(var(--bad-rgb),.12); border: 1px solid rgba(var(--bad-rgb),.35); color: var(--bad); }
.alert.warn { background: rgba(var(--warn-rgb),.12); border: 1px solid rgba(var(--warn-rgb),.35); color: var(--warn); }
.alert.good { background: rgba(var(--good-rgb),.12); border: 1px solid rgba(var(--good-rgb),.35); color: var(--good); }
.alert.brand { background: rgba(var(--brand-rgb),.12); border: 1px solid rgba(var(--brand-rgb),.35); color: var(--brand-ink); }
.alert.accent { background: rgba(var(--good-rgb),.10); border: 1px solid rgba(var(--good-rgb),.30); color: var(--accent); }
.mini-bar { width: 74px; height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-bar > div { height: 100%; border-radius: 4px; }
.mini-btn { background: var(--panel); border: 1px solid var(--border); border-radius: 7px; padding: 2px 7px;
  cursor: pointer; font-size: 12px; color: var(--text); text-decoration: none; display: inline-block; }
.mini-btn:hover { border-color: var(--brand); }

/* ====================================================== Prenotazioni online */
.link-box { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.link-box input { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: "SF Mono", Menlo, monospace; }
.link-box .btn { text-decoration: none; white-space: nowrap; }
.qr-wrap { display: flex; gap: 14px; align-items: center; background: var(--panel-2); border-radius: 12px; padding: 12px; }
.qr-wrap #pr_qr { flex: 0 0 130px; background: #fff; border-radius: 10px; padding: 6px; display: grid; place-items: center; }
.qr-wrap #pr_qr svg { width: 118px; height: 118px; display: block; }
.giorni-chiusi { display: flex; flex-wrap: wrap; gap: 5px; }
.gc { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px; font-size: 11.5px; cursor: pointer; color: var(--muted); }
.gc input { width: 12px; height: 12px; }
.gc.on { border-color: var(--brand); color: var(--text); }
.srv-online { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.so { display: flex; align-items: center; gap: 9px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; cursor: pointer; opacity: .55; }
.so.on { opacity: 1; border-color: rgba(var(--brand-rgb),.4); }
.so i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.pub-scelte { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pub-scelta { display: flex; align-items: flex-start; gap: 8px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; }
.pub-scelta.on { border-color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.pub-scelta input { margin-top: 2px; flex: 0 0 auto; }
.pub-scelta b { display: block; font-size: 12.5px; }
.pub-scelta i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .pub-scelte { grid-template-columns: 1fr; } }

/* ====================================================== Primo avvio */
.setup { max-width: 860px; margin: 0 auto; }
.setup-head { text-align: center; margin: 10px 0 26px; }
.setup-head h1 { font-size: 30px; margin: 0 0 6px; }
.setup-step { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.setup-n { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-weight: 800; }
.setup-step h3 { margin-top: 0; }

/* ====================================================== Social AI */
.topic-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.topic { background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); border-radius: 999px;
  padding: 6px 11px; font-size: 11.5px; cursor: pointer; text-align: left; }
.topic:hover { color: var(--text); border-color: var(--brand); }
.topic.on { background: rgba(var(--brand-rgb),.2); color: var(--brand-ink); border-color: var(--brand); }
.style-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.style-card { background: transparent; border: 2px solid var(--border); border-radius: 12px; padding: 5px 5px 3px;
  cursor: pointer; color: var(--muted); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.style-card:hover { border-color: var(--brand); color: var(--text); }
.style-card.on { border-color: var(--brand); background: rgba(var(--brand-rgb),.12); color: var(--ink-strong); }
.style-card span { font-size: 10.5px; }
.style-canvas { width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--panel-2); display: block; }
.mat-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.mat-list { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 200px; }
.mat-cell { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); }
.mat-cell img { width: 100%; height: 100%; object-fit: cover; }
.mat-cell .media-x { width: 20px; height: 20px; font-size: 10px; top: 3px; right: 3px; }
.stock-keys .field label a,
.field label a { color: var(--brand); text-decoration: none; font-size: 11px; margin-left: 4px; }
.stock-keys .field label a:hover, .field label a:hover { text-decoration: underline; }
/* scelta della qualita' dell'immagine creata dall'AI: il prezzo si vede prima di premere */
.ai-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ai-model { text-align: left; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 11px; padding: 10px 12px; cursor: pointer; line-height: 1.35; display: block; }
.ai-model:hover { border-color: var(--brand); color: var(--text); }
.ai-model.on { background: rgba(var(--brand-rgb),.16); border-color: var(--brand); color: var(--ink-strong); }
.ai-model b { display: block; font-size: 13px; }
.ai-model i { font-style: normal; display: block; font-size: 10.5px; opacity: .75; margin-top: 3px; }
.ai-prezzo { font-size: 11.5px; color: var(--brand-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.ai-rif { aspect-ratio: 1; }
.ai-rif.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(var(--brand-rgb),.35) inset; }
.rif-none { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 11px;
  color: var(--muted); }
.fmt-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fmt { background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); border-radius: 10px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; line-height: 1.25; }
.fmt i { font-style: normal; font-size: 10px; opacity: .7; }
.fmt:hover { color: var(--text); border-color: var(--brand); }
.fmt.on { background: rgba(var(--brand-rgb),.16); border-color: var(--brand); color: var(--ink-strong); }
.kit-now { display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin-top: 12px; flex-wrap: wrap; }
.kit-cols { display: flex; gap: 6px; }
.kit-col { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); display: block; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.kit-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.kit-canvas { width: 100%; aspect-ratio: 1; border-radius: 10px; display: block; background: var(--panel-2); }
.start-photo { display: flex; gap: 12px; align-items: flex-start; }
.photo-read { background: rgba(var(--brand-rgb),.1); border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 13px; }
.photo-read-t { font-weight: 700; margin-bottom: 5px; }
.photo-read ul { margin: 7px 0 0; padding-left: 17px; color: var(--muted); }
.photo-read li { margin-bottom: 3px; }
.photo-row { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.photo-prev { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 10px; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--border); display: grid; place-items: center; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-grid.big { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.media-cell { position: relative; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; cursor: pointer; padding: 0; display: block; }
.media-cell.static { cursor: default; }
.media-cell:hover { border-color: var(--brand); }
.media-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.media-cell span { display: block; font-size: 10px; color: var(--muted); padding: 5px 7px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-x { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.6); border: none; color: var(--on-brand);
  border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; }
.slide-stage { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 16px 0 12px; }
.slide-canvas { width: 100%; max-width: 460px; aspect-ratio: 1; border-radius: 14px; box-shadow: var(--shadow); background: var(--panel-2); }
.icon-btn.big { font-size: 30px; padding: 4px 10px; }
.slide-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.thumb { flex: 0 0 auto; max-width: 170px; text-align: left; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 9px; padding: 7px 10px; font-size: 11px; cursor: pointer; line-height: 1.35; }
.thumb.on { border-color: var(--brand); color: var(--text); background: rgba(var(--brand-rgb),.14); }
.thumb-n { display: block; font-weight: 800; color: var(--brand-2); font-size: 10px; }
.slide-edit { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.style-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
.style-dot.on { border-color: var(--brand); transform: scale(1.12); }
.hash-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tips { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text); }
.hook { background: rgba(var(--warn-rgb),.12); border: 1px solid rgba(var(--warn-rgb),.3); border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; }
.script { display: flex; flex-direction: column; gap: 10px; }
.beat { display: flex; gap: 14px; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; }
.beat-t { flex: 0 0 68px; font-weight: 800; color: var(--brand-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.beat-main { flex: 1; font-size: 13.5px; }
.beat-voce { line-height: 1.55; }
.beat-screen, .beat-shot { color: var(--muted); font-size: 12px; margin-top: 5px; }
.logo-box { min-height: 110px; display: grid; place-items: center; background: var(--panel-2);
  border: 1px dashed var(--border); border-radius: 12px; padding: 14px; }
.logo-box img { max-width: 240px; max-height: 110px; }
.lib { display: flex; flex-direction: column; }

/* ====================================================== CRM pipeline */
.pipe { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pipe-col { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-height: 220px; }
.pipe-col.over { border-color: var(--brand); background: rgba(var(--brand-rgb),.07); }
.pipe-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; }
.pipe-head b { margin-left: auto; background: var(--panel-2); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.pipe-tot { font-size: 11px; color: var(--muted); margin: 2px 0 10px 17px; }
.pipe-empty { text-align: center; color: #3f4757; padding: 14px; }
.lead { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  margin-bottom: 8px; cursor: grab; }
.lead:hover { border-color: var(--brand); }
.lead-name { font-weight: 600; font-size: 13px; }
.lead-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lead-next { font-size: 11px; color: var(--warn); margin-top: 5px; }
.lead-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ====================================================== Messaggi WhatsApp */
.msg-list { display: grid; gap: 10px; margin-bottom: 8px; }
.msg { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; transition: .3s; }
.msg.done { opacity: 0; transform: translateX(30px); }
.msg-h { display: flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 8px; }
.msg-text { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.msg-text:focus { outline: none; border-color: var(--brand); }
.msg-actions { display: flex; gap: 8px; margin-top: 9px; }
.msg-actions .btn { text-decoration: none; }
.wa-state { display: flex; align-items: center; gap: 12px; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.wa-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 4px rgba(var(--bad-rgb),.15); }
.wa-state.on .wa-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(var(--good-rgb),.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(var(--good-rgb),0); } }
.wa-checks > div { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.wa-steps { padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text); }
.qr-box { background: #fff; border-radius: 14px; min-height: 240px; display: grid; place-items: center;
  padding: 14px; }
.qr-box.on svg { width: 100%; max-width: 260px; height: auto; display: block; }
.qr-box .muted { color: #6b7280; font-size: 12.5px; text-align: center; }
.qr-ok { color: #15803d; font-size: 34px; text-align: center; line-height: 1.2; }
.qr-ok div { color: #14532d; font-size: 14px; margin-top: 8px; }
.wa-log { background: #05070a; border: 1px solid var(--border); border-radius: 12px; padding: 14px; height: 300px;
  overflow: auto; font-family: "SF Mono", Menlo, monospace; font-size: 11px; line-height: 1.35; white-space: pre; color: #cbd5e1; }

/* ====================================================== AGENDA (Google style) */
body.wide .main { max-width: 100%; padding: 18px 22px; }
.cal-root { display: flex; flex-direction: column; height: calc(100vh - 46px); }
.cal-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; }
.cal-nav .icon-btn { font-size: 22px; line-height: 1; padding: 2px 10px; }
.cal-title { font-size: 20px; margin: 0; font-weight: 600; flex: 1; }
.cal-modes { display: flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cal-mode { background: transparent; border: none; color: var(--muted); padding: 8px 14px; cursor: pointer; font-size: 13px; }
.cal-mode:hover { color: var(--text); }
.cal-mode.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.cal-filter { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.cal-body { display: flex; gap: 16px; flex: 1; min-height: 0; }
.cal-side { width: 208px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.cal-main { flex: 1; min-width: 0; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); position: relative; }

/* mini calendario */
.mini-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mini-dow { font-size: 10px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.mini-d { position: relative; background: transparent; border: none; color: var(--text); font-size: 11px; padding: 5px 0; border-radius: 50%; cursor: pointer; aspect-ratio: 1; }
.mini-d:hover { background: var(--panel-2); }
.mini-d.out { color: var(--muted); opacity: .55; }
/* --brand-2 e' chiaro: sopra il fondino del giorno scelto sparirebbe */
.mini-d.today { color: var(--brand-ink); font-weight: 800; }
.mini-d.sel { background: rgba(var(--brand-rgb),.28); }
.mini-dot { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.cal-legend { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.cal-legend-t { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.cal-leg-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cal-check { font-size: 12px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.cal-stats { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.cal-stat { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; color: var(--muted); }
.cal-stat b { color: var(--text); font-size: 14px; }

/* griglia oraria */
.cal-grid { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); position: relative; user-select: none; }
.cal-corner, .cal-head { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--border); }
.cal-head { padding: 10px 4px; text-align: center; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; align-items: center; }
.cal-dow { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.cal-num { font-size: 19px; font-weight: 600; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; }
.cal-num.today { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.cal-op { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 6px 0; }
.cal-gutter { position: relative; }
.cal-hour { position: relative; border-bottom: 1px solid transparent; }
.cal-hour span { position: absolute; top: -7px; right: 8px; font-size: 11px; color: var(--muted); }
.cal-hour:first-child span { top: 1px; }
.cal-col { position: relative; border-left: 1px solid var(--border); }
.cal-col.hot { background: rgba(var(--brand-rgb),.06); }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.cal-line.half { border-top-style: dotted; opacity: .45; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 4; }
.cal-now i { position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.cal-ev {
  position: absolute; border-radius: 7px; padding: 3px 7px; overflow: hidden; cursor: grab;
  /* il fondo e' il colore scelto dall'operatore, sempre pieno: qui il testo resta chiaro */
  color: var(--on-brand); font-size: 12px; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.22); user-select: none;
}
.cal-ev:hover { filter: brightness(1.12); z-index: 5; }
.cal-ev.dragging { opacity: .82; cursor: grabbing; z-index: 8; box-shadow: var(--shadow); }
.cal-ev.cancel { opacity: .45; text-decoration: line-through; }
.cal-ev.done { filter: saturate(.5); }
.cal-ev-t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-s { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.cal-ev.short { padding: 1px 6px; line-height: 1.15; }
.cal-ev.short .cal-ev-s { display: none; }
.cal-ev-rz { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cal-ghost { position: absolute; left: 2px; right: 2px; background: rgba(var(--brand-rgb),.35); border: 1px dashed var(--brand); border-radius: 7px; z-index: 1; }

/* vista mese */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mh { position: sticky; top: 0; background: var(--panel); text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; padding: 9px 0; border-bottom: 1px solid var(--border); z-index: 2; }
.cal-cell { min-height: 118px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5px; cursor: pointer; }
.cal-cell.out { background: var(--panel-2); }
.cal-cell.today .cal-cell-h span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); border-radius: 50%; width: 23px; height: 23px; display: inline-grid; place-items: center; }
.cal-cell-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 4px; }
.cal-cell-h b { font-size: 10px; color: var(--accent); }
.cal-mev { background: var(--panel-2); border-radius: 5px; padding: 2px 6px; font-size: 11px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mev:hover { background: var(--border); }
.cal-more { font-size: 10px; color: var(--muted); padding-left: 4px; }

/* vista elenco */
.cal-list { padding: 6px 14px 20px; }
.cal-list-day { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 16px 0 8px; }
.cal-list-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.cal-list-row:hover { background: var(--panel-2); }
.cal-list-time { width: 52px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-list-bar { width: 4px; height: 34px; border-radius: 3px; }
.cal-list-main { flex: 1; font-size: 13px; }
.cal-list-main .muted { font-size: 12px; }
.cal-list-price { width: 80px; text-align: right; font-weight: 600; }

/* scheda appuntamento */
.appt-when { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.appt-when b { font-size: 16px; }
.appt-when span { color: var(--muted); font-size: 13px; }
.appt-rows > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.appt-rows span { color: var(--muted); }
.appt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.appt-actions .btn { text-decoration: none; }

@media (max-width: 980px) {
  .cal-side { display: none; }
}
@media (max-width: 780px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; }
  .main { padding: 18px; }
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* Abbonamento: la fascia sta sopra tutto, ma non copre il gestionale —
   da bloccato il salone deve poter consultare ed esportare i suoi dati. */
.lic-barra {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; padding: 11px 20px; font-size: 13px; border-bottom: 1px solid var(--border);
}
.lic-barra.avviso { background: rgba(var(--warn-rgb), .14); color: var(--warn); }
.lic-barra.bloccato { background: rgba(var(--bad-rgb), .12); color: var(--bad); }
.lic-testo { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 260px; }
.lic-testo b { font-size: 13.5px; }
.lic-testo span { color: var(--text); font-size: 12.5px; }
.lic-contatto { font-weight: 600; }
.lic-azioni { display: flex; gap: 8px; flex-wrap: wrap; }
body.con-barra #app { min-height: calc(100vh - 44px); }
.lic-stato { display: flex; flex-direction: column; gap: 8px; background: var(--panel-2);
  border-radius: 10px; padding: 12px 14px; }
.lic-stato > div { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.lic-stato span { color: var(--muted); }
.lic-stato.bloccato b { color: var(--bad); }

/* Chi è collegato, in fondo alla barra laterale */
.utente-box { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px; }
.utente-chi { flex: 1; min-width: 0; line-height: 1.25; }
.utente-chi b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utente-chi span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

/* Collegamento a Meta: una procedura numerata, non un muro di campi.
   Il passaggio difficile (prendere il codice) va spiegato, non liquidato. */
.passi { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.passo { display: flex; gap: 13px; padding: 14px 0; border-top: 1px solid var(--border); }
.passo.spento { opacity: .5; }
.passo-n { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 12.5px; }
.passo-c { flex: 1; min-width: 0; font-size: 13px; }
.passo-c > b { display: block; margin-bottom: 3px; font-size: 13.5px; }
.passo-c .muted { font-size: 12.5px; line-height: 1.55; }
.passo-c a { color: var(--brand-ink); font-weight: 600; }
.pagine-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pagina-scelta { text-align: left; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font: inherit; color: var(--text); }
.pagina-scelta:hover { border-color: var(--brand); }
.pagina-scelta b { display: block; font-size: 13px; }
.pagina-scelta span { font-size: 11px; color: var(--muted); }
.pagina-scelta.dubbia { border-style: dashed; }
.webhook-url { display: flex; align-items: center; gap: 8px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; margin-top: 8px;
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; word-break: break-all; }

/* ---------------------------------------------------------------- strategie */
/* Un piano alla volta aperto: chi legge deve avere una cosa da fare davanti,
   non otto. L'urgenza e' un colore, non un numero: si capisce senza spiegazioni. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi-v { font-size: 24px; color: var(--ink-strong); line-height: 1.15; }
.kpi-l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.kpi-n { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.sez { font-family: var(--font-titoli); font-size: 17px; color: var(--ink-strong); margin: 22px 0 10px; }
.piano { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.piano.aperto { border-color: rgba(var(--brand-rgb), .45); box-shadow: var(--shadow); }
.piano-cap { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.piano-tit { flex: 1; font-weight: 600; color: var(--ink-strong); }
.piano-freccia { color: var(--muted); }
.piano-perche { font-size: 13px; color: var(--text); margin-top: 6px; }
.urg { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.urg-alta { background: rgba(var(--bad-rgb), .14); color: var(--bad); }
.urg-media { background: rgba(var(--warn-rgb), .16); color: var(--warn); }
.urg-bassa { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
.urg-zero { background: rgba(var(--good-rgb), .14); color: var(--good); }
.piano-corpo { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.piano-tit-min { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 0 6px; }
.passi { margin: 0; padding-left: 20px; }
.passi li { margin-bottom: 7px; line-height: 1.5; }
.testo-pronto { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.testo-cap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; font-size: 12.5px; }
.testo-corpo { font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.piano-fondo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; font-size: 12.5px; }
.riga-ok { padding: 5px 0; font-size: 13px; }
.avviso-chiave {
  margin-top: 8px; padding: 9px 11px; border-radius: 12px;
  background: rgba(var(--warn-rgb), .12); color: var(--warn);
  font-size: 12.5px; line-height: 1.5;
}

/* -------------------------------------------------------------------- chiavi */
.chiave { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.chiave-ko { border-color: rgba(var(--bad-rgb), .45); background: rgba(var(--bad-rgb), .05); }
.chiave-cap { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.chiave-serve { font-size: 13px; margin-top: 5px; line-height: 1.5; }
.chiave-righe { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 8px 16px; margin-top: 10px; font-size: 12.5px; line-height: 1.45; }
.ch-eti { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ch-nota { grid-column: 1 / -1; }
.ch-pill { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; }
.ch-ok { background: rgba(var(--good-rgb), .16); color: var(--good); }
.ch-no { background: var(--panel-2); color: var(--muted); }
.ch-ko { background: rgba(var(--bad-rgb), .16); color: var(--bad); }
.ch-prev { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.ch-avviso { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(var(--bad-rgb), .10); color: var(--bad); font-size: 12.5px; line-height: 1.45; }
.chiave-int { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.chiave-int:last-child { border-bottom: 0; }
.chiave-azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chiave-azioni .btn { text-decoration: none; }

/* --------------------------------------------------- Analisi avanzata (kpi.js)
   Niente colori scritti qui: tinte e fondini vengono dalle variabili del :root,
   cosi' un cambio di identita' raggiunge anche questa schermata. */
.kp-titolo { margin: 22px 0 2px; font-size: 15px; }
.kp-sotto { font-size: 12px; margin-bottom: 10px; max-width: 70ch; }

.kp-avviso { display: flex; gap: 9px; align-items: flex-start;
  padding: 7px 0; font-size: 13px; line-height: 1.45; }
.kp-avviso + .kp-avviso { border-top: 1px solid rgba(var(--brand-rgb), .10); }
.kp-pallino { width: 8px; height: 8px; border-radius: 50%;
  margin-top: 6px; flex: 0 0 8px; }

.kp-griglia { width: 100%; border-collapse: separate; border-spacing: 3px; }
.kp-griglia th { text-align: center; padding-bottom: 2px; }
.kp-cella { text-align: center; border-radius: 7px; padding: 9px 4px;
  font-size: 12px; font-variant-numeric: tabular-nums; }

.kp-op { width: 100%; }
.kp-op th { font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap; }
.kp-op td { vertical-align: top; }
.kp-op tbody tr + tr { border-top: 1px solid rgba(var(--brand-rgb), .10); }

/* ------------------------------------- Assistente al telefono: cosa dice
   Nessun colore scritto qui: tutto dalle variabili del :root. */
.vc-blocco { padding: 12px 0; }
.vc-blocco + .vc-blocco { border-top: 1px solid rgba(var(--brand-rgb), .12); }
.vc-eti { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 7px; }
.vc-frase { font-size: 15px; line-height: 1.5; color: var(--ink-strong);
  background: rgba(var(--brand-rgb), .07); border-radius: 12px; padding: 12px 14px; }
.vc-sa { width: 100%; }
.vc-sa td { padding: 5px 0; vertical-align: top; font-size: 13px; }
.vc-sa td:first-child { width: 130px; }
.vc-dettagli { margin-top: 14px; }
.vc-dettagli summary { cursor: pointer; font-size: 13px; color: var(--brand-ink); }
.vc-prompt { white-space: pre-wrap; font-size: 12px; line-height: 1.5;
  max-height: 420px; overflow: auto; padding: 14px;
  background: rgba(var(--brand-rgb), .06); border-radius: 12px;
  color: var(--ink-strong); }

/* Assistente: la scelta del tono */
.vc-tono { display: block; cursor: pointer; padding: 11px 13px; border-radius: 12px;
  border: 1px solid rgba(var(--brand-rgb), .22); }
.vc-tono.scelto { border-color: var(--brand);
  background: rgba(var(--brand-rgb), .09); }
.vc-tono input { position: absolute; opacity: 0; pointer-events: none; }
.vc-tono b { display: block; font-size: 13px; margin-bottom: 3px; }
.vc-tono span { font-size: 11.5px; line-height: 1.45; display: block; }

/* Assistente: i passaggi del numero di telefono */
.vc-passi { margin: 0; padding-left: 20px; }
.vc-passi li { font-size: 12.5px; line-height: 1.6; color: var(--muted);
  padding: 5px 0; }
.vc-passi li b { color: var(--ink-strong); }
.vc-passi li::marker { color: var(--brand); font-weight: 700; }
.vc-passi a { color: var(--brand-ink); }

/* --------------------------------------------------------------- Preventivi */
/* Le due colonne del confronto in Analisi avanzata: a sinistra i soldi veri,
   a destra quelli che sarebbero entrati. Il fondino li tiene distinti a colpo
   d'occhio, perche' e' l'unica cosa che non si deve mai confondere. */
.pv-confronto { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pv-lato { border-radius: 14px; padding: 16px 18px; border: 1px solid var(--border); }
.pv-lato.vero { background: rgba(var(--good-rgb), .08); border-color: rgba(var(--good-rgb), .3); }
.pv-lato.mancato { background: rgba(var(--bad-rgb), .07); border-color: rgba(var(--bad-rgb), .28); }
.pv-lato .pv-et { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.pv-lato .pv-cifra { font-family: var(--font-titoli); font-size: 27px; color: var(--ink-strong); margin: 4px 0 2px; }
.pv-lato .pv-sotto { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Il foglio del preventivo: nascosto a schermo, e' tutto quello che si vede
   sulla carta. I colori qui sono neri su bianco e non variabili del tema
   apposta: la carta e' bianca comunque, e un fondino terracotta stampato
   consuma inchiostro senza aggiungere niente. */
#stampaBox { display: none; }
@media print {
  #app, #modal, #toast { display: none !important; }
  #stampaBox { display: block; }
  body { background: #fff; color: #000; }
  @page { margin: 18mm; }
}
.pv-foglio { font-family: var(--font); color: #000; max-width: 170mm; }
.pv-testa { display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 18px; }
.pv-salone { font-family: var(--font-titoli); font-size: 20px; }
.pv-piccolo { font-size: 12px; color: #444; }
.pv-per { font-size: 13px; margin-bottom: 18px; line-height: 1.6; }
.pv-tab { width: 100%; border-collapse: collapse; }
.pv-tab th, .pv-tab td { border-bottom: 1px solid #ccc; padding: 8px 6px; font-size: 13px; color: #000; }
.pv-tab th { border-bottom: 1px solid #000; font-size: 11px; text-transform: uppercase; color: #000; }
.pv-riga { display: flex; justify-content: space-between; padding: 6px 6px; font-size: 13px; }
.pv-totale { border-top: 2px solid #000; margin-top: 6px; padding-top: 10px;
  font-size: 17px; font-weight: 700; }
.pv-note { margin-top: 22px; padding-top: 10px; border-top: 1px solid #ccc;
  font-size: 11px; color: #444; line-height: 1.5; }
