/* KRELIA V2 — identità ufficiale: verde-nero, sabbia, menta (logo KRE / L'IA). */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0b0e0d;
  --side: #0e1311;
  --panel: #141a18;
  --panel-2: #1d2622;
  --panel-3: #242f2a;
  --line: #303c35;
  --line-soft: #222c27;
  --text: #f3f4ee;
  --text-2: #d3dad5;
  --muted: #a6b2aa;
  --mint: #b6dfd4;
  --mint-deep: #8fc9b9;
  --mint-wash: rgba(182, 223, 212, .1);
  --sand: #aea483;
  --sand-wash: rgba(174, 164, 131, .14);
  --hot: #ff6d79;
  --hot-wash: rgba(255, 109, 121, .13);
  --warm: #d9c38a;
  --warm-wash: rgba(217, 195, 138, .13);
  --cold: #7f958c;
  --cold-wash: rgba(127, 149, 140, .14);
  --ok: #8fd6b3;
  --ok-wash: rgba(143, 214, 179, .12);
  --bad: #ff8f99;
  --on-mint: #0b0e0d;
  --radius: 16px;
  --radius-sm: 11px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
.kpi b, .heat-score, .table td, .evidence .pts, .camp .facts strong, .count, .heat-legend b { font-variant-numeric: tabular-nums; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 750; letter-spacing: -0.025em; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 15.5px; font-weight: 650; }
p { margin: 0 0 .6em; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
::selection { background: rgba(182, 223, 212, .3); }

/* ---------- Struttura ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 240px, transparent 240px); }
.side { background: var(--side); border-right: 1px solid var(--line-soft); padding: 24px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: flex-end; gap: 8px; padding: 0 10px; text-decoration: none; }
.brand img { display: block; height: 46px; width: auto; }
.brand small { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--sand); padding-bottom: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a[aria-current="page"] { background: var(--panel-2); color: var(--mint); }
.nav .count { font-size: 12px; font-weight: 700; background: var(--hot); color: #1a0b0d; border-radius: 999px; padding: 0 7px; min-width: 22px; text-align: center; }
.nav-group { font-size: 12px; color: #6f7c75; padding: 14px 12px 4px; }
.side-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.side-foot strong { display: block; color: var(--text); font-weight: 600; }
.side-foot form { margin-top: 8px; }
.side-foot button { background: none; border: 0; color: var(--sand); padding: 0; cursor: pointer; font: inherit; }
.main { min-width: 0; padding: 28px 34px 64px; }
.top { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head a { font-size: 14px; color: var(--sand); text-decoration: none; font-weight: 600; }
.panel.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* ---------- Pulsanti e moduli ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--panel-3); background: var(--panel-3); color: var(--text); border-radius: var(--radius-sm); padding: 9px 15px; font: 600 14px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #2d3a34; border-color: #2d3a34; }
.btn.gold, .btn.primary { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }
.btn.gold:hover, .btn.primary:hover { background: var(--mint-deep); border-color: var(--mint-deep); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 109, 121, .35); }
.btn.sand { background: var(--sand); border-color: var(--sand); color: var(--on-mint); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--sand); font: 600 14px var(--font); cursor: pointer; text-decoration: none; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=datetime-local], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #0f1412; border-radius: var(--radius-sm); padding: 10px 12px; font: 400 15px/1.35 var(--font); color: var(--text);
}
input::placeholder, textarea::placeholder { color: #6f7c75; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(182, 223, 212, .55); outline-offset: 0; border-color: var(--mint); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--mint); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { margin: 0; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--text-2); }
.chips input:checked + span { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.chips input:focus-visible + span { outline: 2px solid var(--mint); }
.chips input:disabled + span { opacity: .45; cursor: not-allowed; }
.errors { color: var(--bad); font-size: 13px; margin-top: 4px; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Messaggi ---------- */
.flash { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash.ok { background: var(--ok-wash); border-color: rgba(143, 214, 179, .35); color: var(--ok); }
.flash.err { background: var(--hot-wash); border-color: rgba(255, 109, 121, .35); color: var(--bad); }
.notice { background: var(--sand-wash); border: 1px solid rgba(174, 164, 131, .35); color: #ddd4b6; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- Temperatura e barra di calore ---------- */
.temp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; }
.temp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.temp.hot { color: var(--hot); background: var(--hot-wash); }
.temp.hot::before { box-shadow: 0 0 0 3px rgba(255, 109, 121, .22); }
.temp.warm { color: var(--warm); background: var(--warm-wash); }
.temp.cold { color: var(--cold); background: var(--cold-wash); }

.heat { display: flex; align-items: center; gap: 12px; min-width: 0; }
.heat-score { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; min-width: 2ch; text-align: right; }
.heat-score.hot { color: var(--hot); }
.heat-score.warm { color: var(--warm); }
.heat-score.cold { color: var(--cold); }
.heat-bar { display: flex; gap: 3px; flex: 1; min-width: 120px; height: 10px; }
.heat-seg { position: relative; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.heat-seg i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.heat-seg.fit { flex: 40; } .heat-seg.problem { flex: 30; } .heat-seg.timing { flex: 15; } .heat-seg.interest { flex: 15; }
.heat.hot .heat-seg i { background: var(--hot); }
.heat.warm .heat-seg i { background: var(--warm); }
.heat.cold .heat-seg i { background: var(--cold); }
.heat-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.heat-legend b { color: var(--text); font-weight: 650; }
.heat.lg .heat-score { font-size: 54px; }
.heat.lg .heat-bar { height: 16px; }

/* ---------- Tabelle ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table a.title { font-weight: 650; text-decoration: none; }
.table a.title:hover { color: var(--mint); }
.scroll { overflow-x: auto; }

/* ---------- Coda "da chiamare" ---------- */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.queue li:first-child { border-top: 0; padding-top: 2px; }
.queue .who { font-weight: 700; font-size: 16px; text-decoration: none; }
.queue .who:hover { color: var(--mint); }
.queue .why { color: var(--text-2); font-size: 14px; }
.queue .meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.queue .side-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.overdue { color: var(--bad); font-weight: 600; }

/* ---------- Statistiche ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 16px; }
.kpi { padding: 15px 18px; border-left: 1px solid var(--line-soft); }
.kpi:first-child { border-left: 0; }
.kpi b { display: block; font-size: 25px; font-weight: 750; letter-spacing: -.02em; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi.alert b { color: var(--hot); }

/* ---------- Campagne ---------- */
.camp { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.camp:first-child { border-top: 0; }
.camp h3 a { text-decoration: none; }
.camp h3 a:hover { color: var(--mint); }
.camp .facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.camp .facts strong { color: var(--text); font-weight: 700; }
.status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.status.active { border-color: rgba(143, 214, 179, .35); color: var(--ok); background: var(--ok-wash); }
.status.paused, .status.archived { color: var(--muted); }
.status.queued, .status.running { border-color: rgba(174, 164, 131, .4); color: var(--sand); background: var(--sand-wash); }
.status.failed { border-color: rgba(255, 109, 121, .4); color: var(--bad); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; overflow-x: auto; padding: 0 8px; }
.tabs a { padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--mint); border-color: var(--mint); }
.tabs a .n { color: var(--muted); font-weight: 500; margin-left: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); font-size: 14px; }
.filters a { text-decoration: none; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; color: var(--text-2); }
.filters a[aria-current="true"] { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }

/* Card prospect nella campagna */
.pros { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) minmax(230px, .9fr); gap: 18px; padding: 18px 20px; border-top: 1px solid var(--line-soft); }
.pros:first-child { border-top: 0; }
.pros h3 a { text-decoration: none; }
.pros h3 a:hover { color: var(--mint); }
.pros .loc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pros .head { font-weight: 600; margin-top: 10px; }
.pros ul.sig { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.pros ul.sig li { padding-left: 14px; position: relative; margin-bottom: 2px; }
.pros ul.sig li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--sand); }
.pros .decide form + form { margin-top: 8px; }
.pros .decide select { font-size: 14px; padding: 7px 9px; }
.pros .decide .inline { display: flex; gap: 6px; }
.pros.analyzing { opacity: .6; }
.pros a.ext, .facts a.ext { color: var(--sand); }

/* ---------- Dossier prospect / scheda vendita ---------- */
.dossier-head { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: end; margin-bottom: 20px; }
.dossier-head .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.dossier-head .facts a { color: var(--sand); text-decoration: none; font-weight: 600; }

.brief { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.brief h2 { color: var(--text); font-size: 22px; }
.brief .why { color: var(--sand); font-size: 15px; margin-top: 6px; }
.brief .open-line { margin: 18px 0; padding: 16px 18px; background: var(--bg); border-left: 3px solid var(--mint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.brief dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.brief dt { color: var(--muted); }
.brief dd { margin: 0; color: var(--text-2); }
.brief .offer-price { color: var(--mint); font-weight: 700; }

.evidence { list-style: none; margin: 0; padding: 0; }
.evidence li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.evidence li:first-child { border-top: 0; }
.evidence .pts { font-weight: 750; font-size: 15px; text-align: right; color: var(--mint); }
.evidence .lbl { font-weight: 650; }
.evidence .src { font-size: 12px; color: var(--muted); }
.axis-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 2px; }
.axis-head:first-child { margin-top: 0; }
.axis-head span { font-size: 13px; color: var(--muted); }

.objections details { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.objections details:first-child { border-top: 0; }
.objections summary { cursor: pointer; font-weight: 600; }
.objections p { margin: 8px 0 0; color: var(--text-2); }
.audit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-size: 14px; margin: 0; }
.audit dt { color: var(--muted); }
.audit dd { margin: 0; font-weight: 600; }
.yes { color: var(--ok); } .no { color: var(--bad); }

/* ---------- Demo / anteprima ---------- */
.demo-box { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; }
.demo-box .url { display: flex; gap: 6px; margin-top: 8px; }
.demo-box .url input { font-size: 13px; }
.demo-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.demo-stats b { color: var(--text); }

/* ---------- Lead ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col h3 { font-size: 14px; display: flex; justify-content: space-between; padding: 4px 4px 10px; }
.col h3 span { color: var(--muted); font-weight: 500; }
.card { display: block; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 11px 12px; text-decoration: none; margin-bottom: 8px; }
.card:hover { border-color: var(--mint); }
.card b { display: block; font-size: 14px; }
.card .why { font-size: 12px; color: var(--text-2); margin: 4px 0 8px; }
.card .meta { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 9px 0 9px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.timeline li.act::before { background: var(--mint); }
.timeline .when { font-size: 12px; color: var(--muted); }
.stage-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.stage-form .field { margin: 0; flex: 1; min-width: 160px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; }
.pagination .current { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.pagination .disabled { color: #6f7c75; }

/* ---------- Accesso (come la V1) ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(54, 92, 78, .45), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 340px; background: rgba(20, 26, 24, .92); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.auth-logo { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.auth-logo img { height: 84px; width: auto; }
.auth-logo small { font-size: 10px; font-weight: 700; letter-spacing: .2em; color: var(--sand); padding-bottom: 4px; }
.auth-card p.lead { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.auth-card .btn { width: 100%; padding: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .dossier-head { grid-template-columns: 1fr; }
  .pros { grid-template-columns: 1fr 1fr; }
  .pros .decide { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; inset: 0 25% 0 0; z-index: 30; transform: translateX(-102%); transition: transform .2s ease; height: auto; }
  .nav-open .side { transform: none; }
  .top { display: flex; justify-content: space-between; align-items: center; background: var(--side); border-bottom: 1px solid var(--line-soft); padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
  .top .brand img { height: 34px !important; }
  .top button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-sm); padding: 6px 12px; font: 600 14px var(--font); }
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 25px; }
  .pros, .grid-even { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-left: 0; border-top: 1px solid var(--line-soft); }
  .queue li { grid-template-columns: 1fr; }
  .queue .side-actions { flex-direction: row; align-items: center; }
  .brief dl { grid-template-columns: 1fr; gap: 2px; }
  .brief dd { margin-bottom: 8px; }
  .audit { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Foto per l'anteprima */
.photos-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.photos-box h3 { margin: 0 0 4px; font-size: 15px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin: 12px 0; }
.thumbs figure { margin: 0; display: grid; gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs .btn { width: 100%; justify-content: center; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload label.btn { cursor: pointer; }
.upload input[type=file]:focus-visible + .picked { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Icone del menu, come nella V1 */
.nav .ico { display: inline-block; width: 20px; margin-right: 6px; text-align: center; color: var(--sand); font-size: 13px; opacity: .9; }
.nav a[aria-current="page"] .ico { color: var(--mint); }
.nav a { justify-content: flex-start; }
.nav a .count { margin-left: auto; }
.nav .ico { margin-right: 0; }
.grid > .panel + .panel { margin-top: 0; }

/* Selezione multipla */
.bulkbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.bulkbar select { width: auto; min-width: 180px; max-width: 320px; }
.pros .pick { float: left; margin: 2px 10px 0 0; }
.pros .pick input, .table input[data-pick] { width: 18px; height: 18px; accent-color: var(--mint); cursor: pointer; }

/* Registrazione chiamate */
.tabs.mini { display: flex; gap: 6px; flex-wrap: wrap; border: 0; padding: 0; margin: 4px 0 0; }
.tabs.mini button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.tabs.mini button[aria-selected="true"] { background: var(--mint); color: #0b0e0d; border-color: var(--mint); font-weight: 600; }
.rec-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--hot); font-size: 18px; }
.rec-time::before { content: "● "; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.consent { font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* Moduli aggiuntivi dei servizi */
fieldset.addons{border:1px solid var(--line-soft);border-radius:10px;padding:10px 12px;margin:0 0 12px}
fieldset.addons legend{font-weight:650;font-size:13px;padding:0 6px}
.addon-row{display:grid;grid-template-columns:minmax(0,2fr) 90px minmax(0,2fr) auto;gap:6px;align-items:center;margin-bottom:6px}
@media (max-width:720px){.addon-row{grid-template-columns:1fr 90px}}
ul.addon-list{list-style:none;margin:0;padding:0}
ul.addon-list li{display:flex;justify-content:space-between;gap:10px;padding:3px 0}
ul.addon-list .offer-price{white-space:nowrap}
details.regen>summary{list-style:none;display:inline-flex}
details.regen>summary::-webkit-details-marker{display:none}
details.regen[open]{flex-basis:100%}

/* Vendita conclusa e progetti */
.btn.sale{background:#1f9d55;border-color:#1f9d55;color:#fff}
.btn.sale:hover{background:#178246}
.sale-total{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:12px 14px;border:1px solid var(--line-soft);border-radius:10px}
.sale-total b{font-size:22px}
ol.steps{list-style:none;margin:0;padding:0;counter-reset:s}
ol.steps li{counter-increment:s;position:relative;padding:8px 0 8px 40px;border-top:1px solid var(--line-soft);display:flex;flex-direction:column;gap:2px}
ol.steps li:first-child{border-top:0}
ol.steps li::before{content:counter(s);position:absolute;left:0;top:8px;width:26px;height:26px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;font-size:13px;font-weight:650;color:var(--muted)}
ol.steps li.done::before{content:"✓";background:#1f9d55;border-color:#1f9d55;color:#fff}
@media print{.side,.topbar,.no-print,.flash{display:none!important}body{background:#fff!important;color:#000!important}.doc-sheet .panel{border:1px solid #ccc;background:#fff;color:#000;break-inside:avoid}.main,main{margin:0!important;padding:0!important}}
.bar{height:8px;border-radius:999px;background:var(--line-soft);overflow:hidden}
.bar span{display:block;height:100%;background:var(--mint);border-radius:999px;transition:width .4s}
.col h3{padding-bottom:2px}
.col-hint{margin:0 4px 10px;font-size:12px;color:var(--muted)}
.col-perso{opacity:.85}
.board{grid-auto-columns:minmax(190px,1fr)}
