/* Contravox — interfaccia */
:root {
  --ink: #0e1726;
  --ink-2: #3b4658;
  --muted: #6b7587;
  --line: #e4e8ef;
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #2547d0;
  --accent-2: #1b37a8;
  --accent-soft: #eaefff;
  --ok: #0f8a5f;
  --ok-soft: #e3f6ee;
  --warn: #b26a00;
  --warn-soft: #fff3df;
  --bad: #c2373a;
  --bad-soft: #fdeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(14, 23, 38, .05), 0 6px 22px rgba(14, 23, 38, .06);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.01em; }

/* --- layout --- */
.cv-app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.cv-side { background: var(--ink); color: #c9d2e3; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.cv-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.02em; padding: 0 8px 22px; }
.cv-brand svg { flex: none; }
.cv-brand .vox { font-style: normal; color: #8fa4ff; }
.cv-brand small { display: block; font-weight: 500; font-size: 11px; color: #8e9ab0; letter-spacing: 0; }
.cv-nav a { display: flex; align-items: center; gap: 10px; color: #c9d2e3; padding: 9px 10px; border-radius: 8px; margin-bottom: 2px; font-weight: 500; }
.cv-nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.cv-nav a.attivo { background: rgba(255,255,255,.1); color: #fff; }
.cv-nav svg { width: 18px; height: 18px; opacity: .85; }
.cv-nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 12px 6px; }
.cv-side-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12.5px; color: #8e9ab0; border-top: 1px solid rgba(255,255,255,.08); }
.cv-side-foot b { color: #fff; display: block; font-weight: 600; }
.cv-main { min-width: 0; }
.cv-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 34px 0; flex-wrap: wrap; }
.cv-top h1 { margin: 0; font-size: 24px; }
.cv-top .sub { color: var(--muted); margin-top: 4px; }
.cv-content { padding: 22px 34px 48px; }
.cv-mobilebar { display: none; }

/* --- componenti --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 15.5px; }
.card-b { padding: 18px 20px; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; padding: 9px 15px; border-radius: 9px; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: #f3f5f9; text-decoration: none; }
.btn-p { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-p:hover { background: var(--accent-2); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #0b7350; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-bad { color: var(--bad); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 16px; height: 16px; }

.stat { padding: 18px 20px; }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 500; }
a.stat.cliccabile:hover { border-color: var(--accent); }
.stat.stat-on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,71,208,.15); }
.stat .d { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-bozza { background: #eef0f4; color: #4a5568; }
.s-da_firmare { background: var(--warn-soft); color: var(--warn); }
.s-firmato { background: var(--ok-soft); color: var(--ok); }
.s-annullato { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }

table.lista { width: 100%; border-collapse: collapse; }
table.lista th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
table.lista td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.lista tr:last-child td { border-bottom: 0; }
table.lista tr.cliccabile { cursor: pointer; }
table.lista tr.cliccabile:hover td { background: #f8f9fc; }
.t-main { font-weight: 600; }
.t-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.vuoto { padding: 40px 20px; text-align: center; color: var(--muted); }

.filtri { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.chip:hover { text-decoration: none; background: #f3f5f9; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cerca { margin-left: auto; display: flex; gap: 6px; }
.cerca input { min-width: 240px; }

/* --- form --- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--ink-2); }
.cv-input { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #d5dbe5; border-radius: 9px; background: #fff; color: var(--ink); }
.cv-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.cv-input { resize: vertical; }
.cv-code { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; line-height: 1.5; }
.campo { margin-bottom: 14px; }
.campo .err { color: var(--bad); font-size: 12.5px; margin-top: 4px; }
.campo .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.riga { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.passi { display: flex; gap: 0; margin-bottom: 18px; counter-reset: passo; }
.passi span { flex: 1; padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid var(--line); }
.passi span::before { counter-increment: passo; content: counter(passo); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e8ebf1; margin-right: 8px; font-size: 11.5px; }
.sezione-form { margin-bottom: 18px; }
.sezione-form > .card-h .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; margin-right: 8px; }

/* interruttori documenti */
.doc-toggle { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.doc-toggle:hover { border-color: #c7cfdc; }
.doc-toggle.on { border-color: var(--accent); background: #f7f9ff; }
.doc-toggle.fisso { cursor: default; background: #fafbfd; }
.doc-toggle .t { font-weight: 600; }
.doc-toggle .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.switch { position: relative; flex: none; width: 40px; height: 23px; margin-top: 1px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #cfd5e0; border-radius: 99px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(17px); }
.istituto-box { margin: -4px 0 12px 54px; display: none; }
.istituto-box.vis { display: block; }

.riepilogo { position: sticky; top: 18px; }
.riepilogo dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.riepilogo dt { color: var(--muted); font-size: 13px; }
.riepilogo dd { margin: 0; text-align: right; font-weight: 600; }
.riepilogo .tot { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.lista-doc { list-style: none; padding: 0; margin: 0; }
.lista-doc li { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.lista-doc li:last-child { border-bottom: 0; }
.lista-doc .ico { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.lista-doc li.nuovo .ico { background: var(--ok-soft); color: var(--ok); }

/* --- dettaglio --- */
.anteprima { width: 100%; height: calc(100vh - 170px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #eef1f5; }
.azioni { display: grid; gap: 8px; }
.linkbox { display: flex; gap: 6px; margin-top: 10px; }
.linkbox input { font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .a { font-weight: 600; font-size: 13.5px; }
.timeline .m { color: var(--muted); font-size: 12px; }
.timeline .x { font-size: 12.5px; color: var(--ink-2); word-break: break-word; }
.hash { font-family: Consolas, monospace; font-size: 11.5px; word-break: break-all; color: var(--ink-2); background: #f5f7fa; padding: 8px; border-radius: 8px; }

.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.msg.success { background: var(--ok-soft); color: #0a6a49; border-color: #bfe8d6; }
.msg.error { background: var(--bad-soft); color: #9d2b2e; border-color: #f4c7c8; }
.msg.warning { background: var(--warn-soft); color: #8a5300; border-color: #f6dcae; }
.msg.info { background: var(--accent-soft); color: var(--accent-2); border-color: #cdd8ff; }

/* --- firma --- */
.firma-page { background: var(--bg); min-height: 100vh; }
.firma-top { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 5; }
.firma-top img { height: 38px; }
.firma-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding: 20px 24px; max-width: 1400px; margin: 0 auto; }
.firma-doc { width: 100%; height: calc(100vh - 120px); border: 1px solid var(--line); border-radius: var(--radius); background: #eef1f5; }
.pad-box { border: 1.5px dashed #b8c2d3; border-radius: 10px; background: #fff; position: relative; touch-action: none; }
.pad-box canvas { display: block; width: 100%; height: 170px; border-radius: 10px; cursor: crosshair; }
.pad-box .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #a8b1c2; pointer-events: none; font-size: 13px; }
.pad-box.firmato .ph { display: none; }
.pad-box .riga-firma { position: absolute; left: 22px; right: 22px; bottom: 38px; border-bottom: 1px solid #d5dbe5; pointer-events: none; }
.pad-tools { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 14px; font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 13.5px; color: var(--ink); margin-bottom: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.ok-hero { max-width: 560px; margin: 60px auto; text-align: center; padding: 34px 28px; }
.ok-hero .cerchio { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }

/* --- login --- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-l { background: var(--ink); color: #dfe5f1; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-l h2 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 440px; margin: 0 0 14px; }
.login-l p { max-width: 420px; color: #aab5ca; line-height: 1.55; }
.login-l .tratto { position: absolute; right: -40px; bottom: 60px; opacity: .14; }
.login-r { display: grid; place-items: center; padding: 30px; }
.login-box { width: 100%; max-width: 360px; }
.demo-box { margin-top: 26px; padding: 16px 18px; border: 1px dashed #b9c4f5; border-radius: 12px; background: #f5f7ff; }
.demo-box .demo-t { font-weight: 700; font-size: 15.5px; }
.demo-box p { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 6px 0 12px; }
.demo-box .btn { border-color: var(--accent); color: var(--accent); }
.demo-barra { background: #fff7d6; color: #6b4e00; border-bottom: 1px solid #f1df9a; padding: 9px 34px; font-size: 13.5px; font-weight: 600; }
@media (max-width: 900px) { .demo-barra { padding: 9px 16px; } }

/* --- modelli --- */
.sez-lista .sez { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.sez-lista .sez.doc { background: #f7f9fc; font-weight: 700; }
.sez-lista .sez .o { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sez-lista .sez:last-child { border-bottom: 0; }
.var-lista code { display: inline-block; background: #f1f3f8; padding: 2px 6px; border-radius: 5px; margin: 2px 2px; font-size: 12px; }

.guida h2 { font-size: 17px; margin: 26px 0 8px; }
.guida p, .guida li { line-height: 1.6; color: var(--ink-2); }

@media (max-width: 1100px) {
  .g-main, .firma-wrap { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .riepilogo { position: static; }
  .firma-doc { height: 60vh; }
}
@media (max-width: 780px) {
  .cv-app { grid-template-columns: 1fr; }
  .cv-side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .cv-side.aperto { transform: none; }
  .cv-mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ink); color: #fff; font-weight: 700; }
  .cv-mobilebar button { background: none; border: 0; color: #fff; font-size: 22px; }
  .cv-mobilebrand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
  .cv-mobilebrand:hover { text-decoration: none; }
  .cv-mobilebrand .vox { font-style: normal; color: #8fa4ff; }
  .cv-top, .cv-content { padding-left: 16px; padding-right: 16px; }
  .g-4, .g-2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-l { display: none; }
  .cerca { margin-left: 0; width: 100%; }
  .cerca input { min-width: 0; flex: 1; }
  table.lista .nasc-m { display: none; }
  .firma-wrap { padding: 12px; }
}

/* tabella righe nel modulo */
.righe-tab td { padding: 6px 6px; }
.righe-tab th { padding: 8px 6px; }
.righe-tab .cv-input { padding: 7px 8px; }
.righe { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }

/* schede, card modelli, chip condizioni */
.schede { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.schede a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.schede a:hover { text-decoration: none; color: var(--ink); }
.schede a.on { color: var(--accent); border-bottom-color: var(--accent); }
.schede a span { font-size: 11.5px; background: #eef0f4; color: var(--ink-2); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.g-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.modello-card { padding: 20px; display: flex; flex-direction: column; color: inherit; transition: border-color .15s, transform .15s; }
a.modello-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.modello-card .tag { align-self: flex-start; }
.modello-card h3 { margin: 10px 0 6px; font-size: 16.5px; }
.modello-card p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.5; font-size: 13.5px; }
.chips-cond { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; }
.chips-cond .chip { cursor: pointer; font-size: 12px; padding: 4px 10px; }
code.var, code.ins { display: inline-block; background: #f1f3f8; padding: 2px 7px; border-radius: 5px; margin: 2px 2px; font-size: 12px; color: var(--ink-2); font-family: Consolas, Menlo, monospace; }
code.ins { cursor: pointer; border: 1px solid transparent; }
code.ins:hover { border-color: var(--accent); color: var(--accent); }

/* firma remota */
.otp-box { border: 1px solid var(--line); background: #f8faff; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.traccia { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.traccia div { background: #f7f8fb; border-radius: 9px; padding: 9px 11px; }
.traccia b { display: block; font-size: 15px; }
.traccia span { color: var(--muted); font-size: 12px; }
.barra { height: 6px; background: #e8ebf1; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.barra i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
details.invio > summary { list-style: none; cursor: pointer; }
details.invio > summary::-webkit-details-marker { display: none; }
.sez-titolo { font-size: 15px; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .firma-top { padding: 10px 14px; }
  .firma-top img { height: 28px; }
  .firma-top b { font-size: 14px; display: block; line-height: 1.25; }
  .firma-top > span.t-sub { display: none; }
}
/* benvenuto */
.settori { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.settore { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 11px; cursor: pointer; font-weight: 400; background: #fff; transition: border-color .15s, background .15s; }
.settore input { display: none; }
.settore b { font-size: 14.5px; color: var(--ink); }
.settore span { color: var(--ink-2); font-size: 12.5px; line-height: 1.4; }
.settore small { color: var(--accent); font-weight: 600; font-size: 11.5px; margin-top: 4px; }
.settore:hover { border-color: #c7cfdc; }
.settore.on { border-color: var(--accent); background: #f7f9ff; box-shadow: 0 0 0 3px var(--accent-soft); }
.scelta-contratti { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 12px; }
/* importazione e AI */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed #c3ccda; border-radius: 12px; text-align: center; cursor: pointer; color: var(--muted); font-weight: 400; margin-bottom: 14px; background: #fafbfd; transition: border-color .15s, background .15s; }
.drop input { display: none; }
.drop b { color: var(--ink); }
.drop.sopra, .drop.on { border-color: var(--accent); background: #f5f8ff; color: var(--accent); }
.elenco-check { list-style: none; padding: 0; margin: 0 0 14px; }
.elenco-check li { position: relative; padding: 4px 0 4px 24px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.elenco-check li::before { content: "✓"; position: absolute; left: 4px; top: 4px; color: var(--ok); font-weight: 700; }
.esempi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.esempi .chip { cursor: pointer; font-size: 12px; }
.attesa { display: flex; gap: 16px; align-items: center; padding: 10px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: gira .9s linear infinite; flex: none; }
@keyframes gira { to { transform: rotate(360deg); } }
.box-ai { background: linear-gradient(180deg, #f7f9ff, #fff); }
.anteprima-firma { display: flex; gap: 10px; align-items: flex-end; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; border-bottom: 2px solid #222; }
.registro { background: #0e1726; color: #d6deeb; border-radius: 9px; padding: 12px; font-size: 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.novita { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.novita:last-child { border-bottom: 0; }
.novita ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.box-paga { border: 1px solid var(--line); background: #f8faff; border-radius: 12px; padding: 16px; margin: 0 0 18px; }

/* archivio, scadenze, contabilità */
dl.dati { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
dl.dati dt { color: var(--muted); }
dl.dati dd { margin: 0; font-weight: 500; }
.r-da_fatturare { background: var(--warn-soft); color: var(--warn); }
.r-fatturata { background: var(--accent-soft); color: var(--accent); }
.r-pagata { background: var(--ok-soft); color: var(--ok); }
.r-non_dovuta { background: #eef0f4; color: #6b7587; }
.tab-scroll { overflow-x: auto; }
table.griglia { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.griglia th, table.griglia td { padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.griglia th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; background: #fafbfd; position: sticky; top: 0; }
table.griglia td.cli { position: sticky; left: 0; background: #fff; min-width: 210px; max-width: 280px; white-space: normal; z-index: 1; }
table.griglia th.cli { left: 0; z-index: 2; text-align: left; }
.cella { display: block; width: 100%; min-width: 58px; border: 0; border-radius: 6px; padding: 6px 4px; font-size: 11.5px; font-weight: 600; cursor: pointer; text-align: center; font-family: inherit; }
.cella.c-da_fatturare { background: var(--warn-soft); color: var(--warn); }
.cella.c-fatturata { background: var(--accent-soft); color: var(--accent); }
.cella.c-pagata { background: var(--ok-soft); color: var(--ok); }
.cella.c-non_dovuta { background: #eef0f4; color: #8a93a3; }
.cella.c-futuro { background: #f7f8fa; color: #b3bac6; cursor: default; }
.cella:hover:not(.c-futuro) { filter: brightness(.95); }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.stato-sel { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; font-weight: 600; }
.stato-sel.c-da_fatturare { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.stato-sel.c-fatturata { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stato-sel.c-pagata { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.stato-sel.c-non_dovuta { background: #eef0f4; color: #6b7587; border-color: transparent; }
.mese-nav { display: flex; align-items: center; gap: 8px; }
.mese-nav b { min-width: 150px; text-align: center; font-size: 16px; }
.giorni { font-weight: 700; }
.giorni.rosso { color: var(--bad); } .giorni.giallo { color: var(--warn); } .giorni.verde { color: var(--ok); }
.tag-ins { background: #f3e8ff; color: #7c3aed; font-size: 11.5px; padding: 2px 8px; }
.tag-ins::before { display: none; }
.g-dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .g-dash { grid-template-columns: 1fr; } }
.grafico { display: flex; align-items: flex-end; gap: 6px; height: 190px; }
.grafico .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.grafico .barre { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.grafico .barre span { width: 30%; max-width: 12px; border-radius: 3px 3px 0 0; min-height: 2px; }
.grafico .b-dov { background: #dfe5f5; } .grafico .b-fat { background: var(--accent); } .grafico .b-inc { background: var(--ok); }
.grafico .lab { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.barra-o { margin-bottom: 11px; }
.barra-o .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.barra-o .top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-o .top span { color: var(--muted); white-space: nowrap; }
.barra-o .pista { height: 7px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.barra-o .pista span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
dl.kpi dd { text-align: right; font-weight: 600; }
.wa-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fafbfd; }
ol.fasi-inst { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; }
ol.fasi-inst li { flex: 1; border-top: 3px solid var(--line); padding-top: 6px; font-size: 12.5px; color: var(--muted); }
ol.fasi-inst li b { display: block; color: var(--ink-2); font-size: 13px; }
ol.fasi-inst li span { display: block; }
ol.fasi-inst li.fatto { border-color: var(--ok); } ol.fasi-inst li.fatto b { color: var(--ok); }
ol.fasi-inst li.ora { border-color: var(--warn); } ol.fasi-inst li.ora b { color: var(--warn); }
.giorno-h { font-weight: 700; font-size: 13px; padding: 10px 16px 4px; color: var(--ink-2); }
.giorno-h.passato { color: var(--bad); } .giorno-h.oggi { color: var(--accent); }
ol.fasi-inst li::before, ol.fasi-inst li::marker { content: none !important; display: none !important; }
.schede-cat { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.schede-cat a { padding: 9px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.schede-cat a:hover { text-decoration: none; color: var(--ink); }
.schede-cat a.on { color: var(--ink); border-color: var(--accent); }
.schede-cat a span { background: #eef0f4; border-radius: 99px; padding: 1px 7px; font-size: 12px; margin-left: 4px; }
.cv-nav .sez { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #8e9ab3; padding: 14px 10px 6px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.titolo-menu{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;user-select:none;border-radius:8px}
.titolo-menu:hover{background:rgba(255,255,255,.08)}
.titolo-menu::after{content:"▾";font-size:12px;margin-left:8px;transition:transform .15s}
.titolo-menu.chiusa::after{transform:rotate(-90deg)}
.gruppo-menu[hidden]{display:none !important}
