/* V12 · Viste di controllo (ex UI V11) con i componenti e i token della V10. Solo aggiunte a sr-interface-v10.css. */

/* Menu unico: nessuna etichetta di gruppo sopra le voci (la V10 mostrava “OPERATIVITÀ”). */
.sidebar nav::before { content: none; }
.side-doc { display: block; margin: auto 0 14px; padding: 0 12px; color: #3f5870; font-size: 13px; font-weight: 600; text-decoration: none; }
.side-doc:hover { color: var(--bene-blue-dark); text-decoration: underline; }
.side-doc + .side-note { margin-top: 0; }
main:focus { outline: none; }

/* Indicatori cliccabili: stessa tipografia degli importi della testata pratica */
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.metric { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 15px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric > span, .metric dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric strong, .metric dd { margin: 0; color: var(--ink); font-family: var(--font-numbers); font-variant-numeric: tabular-nums lining-nums; font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.metric small { color: var(--muted); font-size: 11px; }
a.metric:hover { background: #fbfdfe; }
a.metric:hover small { color: var(--bene-blue-dark); }
.metric[aria-current="true"]::before { position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--bene-magenta); content: ""; }
.metric[aria-current="true"]:first-child::before { border-top-left-radius: 9px; }
.metric[aria-current="true"]:last-child::before { border-top-right-radius: 9px; }
.metric.danger strong { color: var(--red); }
.metric-strip.static { margin-bottom: 24px; }

/* Filtri dentro la sezione elenco, sotto l'intestazione */
.filter-bar { padding: 16px 22px 14px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.filter-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter-row .field { flex: 1 1 150px; min-width: 140px; }
.filter-row .filter-search { flex: 2 1 260px; }
.filter-bar input:not([type="hidden"]), .filter-bar select { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 400; }
.filter-bar .button { min-height: 40px; }
.filter-reset { padding: 10px 2px; font-size: 13px; font-weight: 650; text-decoration: none; }
.filter-more { margin-top: 10px; font-size: 12px; }
.filter-more summary { width: max-content; color: #41586c; font-weight: 600; cursor: pointer; }
.filter-more .filter-row { padding-top: 12px; }
.list-subnav { padding: 16px 22px 0; border-bottom: 1px solid var(--line); }
.list-subnav .list-tabs { flex-wrap: wrap; row-gap: 10px; }
.list-tabs a { padding: 0 0 10px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.list-tabs a:hover { color: var(--ink); }
.list-tabs a[aria-current="page"] { border-color: var(--bene-blue); color: var(--bene-blue-dark); }
.list-heading .explanation { align-self: center; }

/* Tabelle */
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.num { font-family: var(--font-numbers); font-size: 13px; white-space: nowrap; }
.data-table td.wrap { min-width: 190px; max-width: 320px; white-space: normal; }
.data-table td .cell-detail { max-width: 420px; white-space: normal; line-height: 1.45; }
.data-table tr.focus-row td { background: var(--bene-blue-pale); }
.data-table tr.focus-row td:first-child { box-shadow: inset 3px 0 var(--bene-magenta); }
.status-tag.warning { border-color: #ead7ae; background: #fff8ec; color: #805418; }
.status-tag.info { border-color: #c9e1f1; background: var(--bene-blue-pale); color: var(--bene-blue-dark); }

/* Scadenzario: attività e rate */
.view-tabs { display: flex; gap: 30px; margin: -6px 0 22px; border-bottom: 1px solid var(--line-strong); }
.view-tabs a { padding: 0 0 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.view-tabs a[aria-current="page"] { border-color: var(--bene-blue); color: var(--ink); }

/* Fascicolo */
.registry-badge { color: var(--muted); font-size: 12px; font-weight: 600; }
.case-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.case-block { margin-bottom: 30px; }
.case-block:last-child { margin-bottom: 0; }
.case-columns + .case-columns, .case-columns + .case-block, .case-block + .case-block { padding-top: 26px; border-top: 1px solid var(--line); }
.case-block .section-heading { margin-bottom: 14px; }
.case-block .section-heading h2 { font-size: 16px; }
.case-block .table-wrap { margin: 0 -2px; border: 1px solid var(--line); border-radius: 7px; }
.facts, .amount-lines { margin: 0; }
.facts > div, .amount-lines > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.facts > div:last-child, .amount-lines > div:last-child { border-bottom: 0; }
.facts dt, .amount-lines dt { color: var(--muted); }
.facts dd, .amount-lines dd { margin: 0; font-weight: 600; text-align: right; }
.facts dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.amount-lines dd { font-family: var(--font-numbers); font-weight: 500; }
.amount-lines dd .text-button { padding: 0; font-family: var(--font-numbers); font-size: 13px; color: var(--bene-blue-dark); }
.amount-lines .total { padding-top: 14px; border-top: 2px solid var(--line-strong); font-size: 15px; }
.amount-lines .total dt { color: var(--ink); font-weight: 650; }
.fine-print { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.case-notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid #cb9643; background: #fff8ec; font-size: 13px; }
.case-notice p { margin: 0; }
.case-notice a { font-weight: 650; text-decoration: none; white-space: nowrap; }
.event-label { font-size: 14px; }
.document-list .document-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.document-list .document-row:last-child { border-bottom: 0; }
.document-list .document-row strong, .document-list .document-row span { display: block; font-size: 13px; }
.document-list .document-row span { margin-top: 2px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-columns { grid-template-columns: 1fr; gap: 0; }
  .case-columns > .case-block + .case-block { padding-top: 26px; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .metric strong, .metric dd { font-size: 19px; }
  .filter-bar, .list-subnav { padding-inline: 16px; }
  .case-notice { flex-direction: column; align-items: flex-start; }
}
.case-columns > .case-block + .case-block { padding-top: 0; border-top: 0; }
@media (max-width: 1100px) { .case-columns > .case-block + .case-block { padding-top: 26px; border-top: 1px solid var(--line); } }

/* Esito dell'ultima telefonata nel riquadro Attività corrente */
.last-call { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 16px 0 0; padding: 10px 14px; border-left: 3px solid var(--bene-blue); background: #f3f8fb; font-size: 13px; }
.last-call span { color: var(--muted); }
.last-call a { margin-left: auto; font-weight: 650; text-decoration: none; }
.action-row .button + .button, .action-row .button + a { margin-left: 10px; }

/* Segnali da verificare nella scheda Attività (stile del contatto del debitore) */
.signal-strip { margin-top: 12px; padding-left: 16px; }
.signal-strip p span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.signal-strip.overdue { border-left: 3px solid var(--red); }
.signal-strip.warning { border-left: 3px solid #cb9643; }

/* Accordo e rate con il linguaggio della scheda Attività: pannello principale + piano + dettagli apribili */
.practice-panel#rate { padding: 0; background: transparent; border: 0; }
.tab-stack { display: grid; gap: 16px; }
.tab-stack .list-section { margin: 0; }
.plan-progress { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.plan-bar { position: relative; flex: 0 0 220px; height: 6px; border-radius: 3px; background: #e6edf2; overflow: hidden; }
.plan-bar > span { position: absolute; inset: 0 auto 0 0; background: var(--bene-blue); border-radius: 3px; }
.tab-stack .disclosure { margin-top: 0; background: var(--surface); }
.tab-stack .disclosure-body .facts { margin-top: 14px; }
.tab-stack .disclosure-body .document-list { margin-top: 14px; }

/* Incassi e spese, Contatti e soggetti: stesso linguaggio della scheda Attività */
.practice-panel#incassi { padding: 0; background: transparent; border: 0; }
.case-subpanel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.practice-panel > .case-subpanel:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.case-subpanel h3 { margin: 8px 0 0; font-size: 17px; font-weight: 600; }
.case-subpanel .event-attachments { margin-top: 12px; }
.activity-data.ref-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; margin-top: 14px; padding-top: 0; border-top: 0; }
.activity-data.ref-grid dd { font-size: 13px; }
span.attachment-link { cursor: default; }
@media (max-width: 820px) { .activity-data.ref-grid { grid-template-columns: 1fr 1fr; } }
/* Logo senza sottotitolo: il blocco ha l'altezza della barra in alto, così le due linee sono allineate */
.sidebar .brand { box-sizing: border-box; height: 58px; min-height: 58px; padding: 0 6px; display: flex; align-items: center; }
.sidebar .brand img { width: 92px; margin: 0; }
/* Filtro per gestione nella riga di riepilogo di Attività: selettore a segmenti */
.queue-summary .scope-links { display: inline-flex; margin-left: auto; padding: 3px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.scope-links a { padding: 6px 14px; border-radius: 5px; color: #41586c; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.scope-links a + a { margin-left: 2px; }
.scope-links a:hover { background: #f4f8fb; color: var(--ink); }
.scope-links a[aria-current="page"] { background: var(--bene-blue-pale); color: var(--bene-blue-dark); box-shadow: inset 0 0 0 1px #c9e1f1; }

/* Pratiche con le due gestioni come sotto-voci, come i due fogli del registro */
.nav-parent { display: block; margin: 10px 0 2px; padding: 11px 12px 6px 15px; color: #3f5870; font-weight: 600; }
.sidebar nav a.nav-sub { margin-left: 14px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; }

/* Filtri su una riga: ricerca + menu compatti, stessa altezza e stesso bordo; applicazione immediata */
.filter-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.filter-toolbar .filter-search { flex: 1 1 300px; min-width: 220px; }
.filter-toolbar input[type="search"] { box-sizing: border-box; width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23576b80' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 13px center; }
.filter-toolbar input[type="search"]:focus, .filter-toolbar select:focus, .filter-toolbar input[type="date"]:focus { outline: 2px solid var(--bene-blue); outline-offset: 1px; border-color: var(--bene-blue); }
.filter-select select { box-sizing: border-box; height: 40px; max-width: 240px; padding: 0 34px 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: #41586c; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23576b80' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; }
.filter-select.is-set select, .filter-date.is-set input { border-color: #9cc8e4; background-color: var(--bene-blue-pale); color: var(--bene-blue-dark); }
.filter-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.filter-date input { box-sizing: border-box; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-size: 13px; color: var(--ink); background: #fff; }
.filter-toolbar .filter-reset { margin-left: 4px; padding: 0 4px; font-size: 13px; font-weight: 650; text-decoration: none; }
@media (max-width: 820px) { .filter-toolbar { padding: 12px 16px; } .filter-select select { max-width: none; } .filter-select { flex: 1 1 45%; } .filter-select select { width: 100%; } }

/* Barra laterale con icone a tratto (18 px); le sotto-voci di Pratiche allineate sotto il testo, con un puntino */
.sidebar nav a, .sidebar .nav-parent { display: flex; align-items: center; gap: 11px; }
.nav-icon { flex: 0 0 18px; color: #6b7f92; }
.sidebar nav a:hover .nav-icon { color: var(--ink); }
.sidebar nav a.active .nav-icon { color: var(--bene-blue); }
.sidebar .nav-parent { margin: 8px 0 0; padding: 11px 12px 5px 15px; color: #3f5870; font-weight: 600; }
.sidebar nav a.nav-sub { margin-left: 0; padding: 8px 12px 8px 29px; gap: 10px; font-size: 13px; }
.nav-dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: #bdcbd6; }
.sidebar nav a.nav-sub.active .nav-dot { background: var(--bene-blue); }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 10px; background: #eef2f5; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.nav-count:empty { display: none; }
.sidebar nav a.active .nav-count { background: #fff; color: var(--bene-blue-dark); }
.page-title .as-of { white-space: nowrap; }

/* Selettore a segmenti riusabile (stesso stile del filtro per gestione dello Scadenziario) */
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.segmented a { padding: 6px 14px; border-radius: 5px; color: #41586c; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.segmented a + a { margin-left: 2px; }
.segmented a:hover { background: #f4f8fb; color: var(--ink); }
.segmented a[aria-current="page"] { background: var(--bene-blue-pale); color: var(--bene-blue-dark); box-shadow: inset 0 0 0 1px #c9e1f1; }
.view-switch { margin: -6px 0 22px; }

/* Scadenziario: selettore della gestione nell'intestazione dell'elenco */
.list-heading-tools { display: flex; align-items: center; gap: 14px; }

/* Date del periodo sulla stessa riga dei filtri, compatte */
.filter-toolbar .filter-date input { width: 150px; }
.filter-toolbar .filter-search { flex: 1 1 240px; }
.list-heading-tools .segmented a { padding: 6px 12px; }

/* Filtri di Incassi su una riga anche con il periodo */
.filter-toolbar .filter-select select { max-width: 190px; }
.filter-toolbar .filter-date input { width: 138px; padding: 0 8px; }
.filter-toolbar .filter-search { flex: 1 1 200px; min-width: 180px; }

/* Indicatori · bozza B scelta da Andrea: barra di colore a sinistra, titolo colorato con icona, numero con unità, nomi sotto */
.metric-strip { border-radius: 10px; overflow: hidden; }
.metric { padding: 18px 20px 16px 22px; gap: 0; }
.metric::after { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--tone); }
.metric[aria-current="true"]::before { content: none; }
.metric[aria-current="true"] { background: var(--tone-bg); }
a.metric:hover { background: var(--tone-bg); }
.metric .metric-label { display: flex; align-items: center; gap: 8px; color: var(--tone-text); font-size: 13px; font-weight: 650; }
.metric strong, .metric.danger strong { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 8px; color: var(--ink); font-size: 30px; line-height: 1; }
.metric .metric-unit { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.metric small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
a.metric:hover small { color: var(--muted); }
.tone-red { --tone: #ae2b34; --tone-bg: #fff0f1; --tone-text: #ae2b34; }
.tone-amber { --tone: #946119; --tone-bg: #fff8ec; --tone-text: #946119; }
.tone-blue { --tone: #0f7ec1; --tone-bg: #eef7fc; --tone-text: #075b91; }
.tone-grey { --tone: #8798a8; --tone-bg: #f4f7f9; --tone-text: #3f5870; }
.metric .metric-value { display: inline; white-space: nowrap; }

/* Icone Docato3 nelle schede del fascicolo */
.case-tabs button { gap: 7px; }
.case-tabs .tab-icon { flex: 0 0 15px; color: #8798a8; }
.case-tabs button[aria-selected="true"] .tab-icon { color: var(--bene-blue); }
.list-heading-tools .view-switch { margin: 0; }

/* ======================================================================
   Scala tipografica V12 (30/09/2026)
   7 gradini: 11 etichette · 12 note · 13 tabelle e dati · 14 testo · 16 titoli di sezione
   · 22 titolo del riquadro principale · 28 titolo di pagina e nome del debitore.
   Pesi: 400 testo, 600 enfasi, 700 solo titoli di pagina. Gli importi in IBM Plex Mono
   usano 500 (unico peso caricato oltre al 400). Interlinea: 1,5 testo, 1,25 titoli, 1,1 numeri grandi.
   ====================================================================== */
.workspace h1, .workspace .page-title h1, .workspace .case-header h1 { font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.workspace h2, .workspace .list-heading h2, .workspace .section-heading h2, .workspace .case-block .section-heading h2, .workspace .postal-status h2 { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.workspace .work-panel h2 { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.workspace h3, .workspace h4, .workspace .case-subpanel h3 { font-size: 16px; font-weight: 600; line-height: 1.25; }
.workspace .page-title p, .workspace .work-panel > p, .workspace p { line-height: 1.5; }

/* Etichette maiuscole: sezioni, intestazioni di tabella */
.workspace .section-label, .workspace .data-table th, .sidebar .nav-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.workspace .status-tag, .workspace .data-table td .status-tag { font-size: 11px; font-weight: 600; }

/* Tabelle */
.workspace .data-table td, .workspace .data-table td strong, .workspace .debtor-link, .workspace .row-link { font-size: 13px; }
.workspace .data-table td strong, .workspace .debtor-link, .workspace .row-link, .workspace .back-link { font-weight: 600; }
.workspace .data-table td span, .workspace .data-table td small { font-size: 12px; font-weight: 400; }

/* Note, date secondarie, sottotesti */
.workspace small, .workspace .dataset-note, .workspace time, .workspace .fine-print, .workspace .timeline-date span, .workspace .case-amounts dt, .workspace .case-amounts dt small, .workspace .activity-data dt, .workspace .metric small, .workspace .disclosure > summary small { font-size: 12px; font-weight: 400; }
.workspace .facts dt, .workspace .amount-lines dt { font-size: 13px; font-weight: 400; }

/* Valori */
.workspace .activity-data dd, .workspace .facts dd, .workspace .amount-lines dd { font-size: 13px; font-weight: 600; }
.workspace .activity-data .activity-due dd { font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.workspace .timeline-content p, .workspace .contact-strip p, .workspace .data-table td { font-weight: 400; }
.workspace .event-label, .workspace .event-title, .workspace .timeline-content strong { font-size: 14px; font-weight: 600; }

/* Controlli */
.workspace .button, .workspace .text-button, .workspace .filter-reset, .workspace .segmented a, .workspace .list-tabs a, .workspace .list-tabs button { font-size: 13px; font-weight: 600; }
.workspace .case-tabs button { font-size: 13px; font-weight: 400; }
.workspace .case-tabs button[aria-selected="true"] { font-weight: 600; }
.workspace .metric .metric-label { font-size: 13px; font-weight: 600; }
.workspace .metric .metric-unit { font-size: 13px; font-weight: 400; }
.workspace .filter-select select, .workspace .filter-date { font-size: 13px; font-weight: 600; }

/* Importi (IBM Plex Mono) */
.workspace .metric strong, .workspace .metric.danger strong { font-size: 28px; font-weight: 500; line-height: 1.1; }
.workspace .case-amounts dd { font-size: 20px; font-weight: 500; line-height: 1.1; }
.workspace .case-amounts .residual dd { font-size: 28px; font-weight: 500; }

/* Testata e barra laterale */
.topbar #breadcrumb { font-size: 12px; }
.topbar .identity strong { font-size: 13px; font-weight: 600; }
.topbar .identity span:not(.avatar) { font-size: 12px; }
.topbar .avatar, .workspace .rail-marker { font-size: 11px !important; font-weight: 700; }
.sidebar nav a, .sidebar .nav-parent { font-size: 14px; font-weight: 600; }
.sidebar nav a.nav-sub { font-size: 13px; font-weight: 600; }
.sidebar .nav-count { font-size: 11px; font-weight: 600; }
.sidebar .side-doc { font-size: 13px; font-weight: 600; }
.sidebar .side-note strong { font-size: 12px; font-weight: 600; }
.sidebar .side-note span, .sidebar .version { font-size: 12px; font-weight: 400; }
.workspace .explanation summary { font-weight: 600; }

/* Scala tipografica · casi residui individuati dalla misura in Chrome */
.workspace .process-rail li strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
.workspace .process-rail li.current strong { font-weight: 600; }
.workspace .explanation-bubble strong { font-size: 12px; font-weight: 600; }
.workspace .case-identifiers { font-size: 12px; }
.workspace .case-identifiers strong { font-size: 12px; font-weight: 600; }
.workspace .disclosure > summary span, .workspace .disclosure > summary { font-size: 14px; font-weight: 600; }
.workspace .document-row strong { font-size: 13px; font-weight: 600; }
.workspace .field { font-size: 12px; font-weight: 600; }
.workspace .negotiation-heading h2 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.workspace .negotiation-panel h3 { font-size: 16px; font-weight: 600; }
.workspace .negotiation-panel header small, .workspace .policy-reference span, .workspace .policy-reference small { font-size: 12px; }
.workspace .offer-types span { font-size: 13px; font-weight: 600; }
.workspace .policy-limits dt { font-size: 12px; }
.workspace .policy-limits dd { font-size: 13px; font-weight: 600; }
.workspace #conversation-script h4 { font-size: 13px; font-weight: 600; }
.workspace .case-header h1 { font-size: 28px; }
.workspace .offer-amount strong { font-size: 28px; }

/* Righe degli elenchi cliccabili per intero */
.workspace .data-table tbody tr:has(a.debtor-link), .workspace .data-table tbody tr:has(a.row-link) { cursor: pointer; }
.workspace .data-table tbody tr:has(a.debtor-link):hover td, .workspace .data-table tbody tr:has(a.row-link):hover td { background: #f4f9fd; }
.workspace .data-table tbody tr:has(a.debtor-link):hover .debtor-link { text-decoration: underline; text-underline-offset: 3px; }

/* Monitoraggio automatico del piano: sotto il riquadro dell'attività, stesso linguaggio del percorso */
.automation-panel { margin-top: 16px; padding: 20px 25px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.automation-steps { list-style: none; margin: 14px 0 6px; padding: 0; }
.automation-steps li { display: grid; grid-template-columns: 22px 92px 1fr; gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.automation-steps li:last-child { border-bottom: 0; }
.automation-steps .rail-marker { width: 20px; height: 20px; font-size: 11px; }
.automation-steps li.done .rail-marker { border-color: #a7c9b8; background: var(--green-pale); color: var(--green); }
.automation-steps li.current .rail-marker { border: 2px solid var(--bene-blue); color: var(--bene-blue); }
.automation-steps li.future .rail-marker { border: 1px solid var(--line-strong); background: #fff; }
.automation-steps li.warning .rail-marker { border-color: #ead7ae; background: #fff8ec; color: #805418; }
.automation-steps time { padding-top: 1px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.automation-steps strong { display: block; font-size: 13px; font-weight: 600; }
.automation-steps li.current strong { color: var(--bene-blue-dark); }
.automation-steps li.future strong { color: #41586c; font-weight: 400; }
.automation-steps div span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.automation-steps .rail-marker { position: relative; display: grid; place-items: center; box-sizing: border-box; border-radius: 50%; }

/* ======================================================================
   Percorso della pratica orizzontale e compatto, dentro la scheda Attività sopra l'attività corrente
   (variante C scelta da Andrea dopo la valutazione di tre giudici; resa compatta per non spingere le azioni sotto la piega)
   ====================================================================== */
.workspace .case-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 0; }
.workspace .process-rail { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: start; gap: 20px; padding: 16px 22px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.workspace .rail-heading { padding: 2px 0 0; border-bottom: 0; }
.workspace .rail-heading h2 { margin: 4px 0 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.workspace .process-rail ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0; }
.workspace .process-rail li { display: block; min-height: 0; padding: 30px 12px 0 0; }
.workspace .process-rail li:not(:last-child)::before { top: 10px; bottom: auto; left: 24px; right: 0; width: auto; height: 2px; }
.workspace .process-rail .rail-marker { position: absolute; top: 0; left: 0; }
.workspace .process-rail li > div:not(.explanation-bubble), .workspace .process-rail .rail-link { padding: 0; }
.workspace .process-rail li strong { font-size: 13px; line-height: 1.3; }
.workspace .process-rail li time { margin-top: 2px; font-size: 12px; }
.workspace .process-rail li > .explanation { position: absolute; top: 0; left: 30px; }
@media (max-width: 1100px) {
  .workspace .process-rail { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 820px) {
  .workspace .process-rail ol { grid-auto-flow: row; grid-auto-columns: auto; }
  .workspace .process-rail li { padding: 0 0 14px 34px; }
  .workspace .process-rail li:not(:last-child)::before { top: 24px; bottom: 0; left: 10px; right: auto; width: 2px; height: auto; }
}

/* Variante A (scelta da Andrea): percorso sotto la testata e sopra le schede, visibile in tutte le schede */
.workspace .case-header + .process-rail { margin: 12px 0 4px; }
.workspace .process-rail + .case-tabs { margin-top: 12px; }
.workspace .practice-panel#activity .case-layout { margin-top: 0; }

/* Scheda Valutazione AI */
.practice-panel#ai { padding: 0; background: transparent; border: 0; }
.ai-label { display: inline-flex; align-items: center; gap: 8px; }
.ai-label svg { color: #6b4fd8; }
.ai-panel { border-left: 3px solid #6b4fd8; }
.ai-score { margin-left: 6px; color: #5a3fc4; font-family: var(--font-numbers); font-weight: 500; }
.ai-bar > span { background: #6b4fd8 !important; }
.ai-factors { display: grid; gap: 0; padding: 4px 22px 10px; }
.ai-factor { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #edf1f4; font-size: 13px; }
.ai-factor:last-child { border-bottom: 0; }
.ai-factor strong { font-family: var(--font-numbers); font-weight: 500; text-align: right; color: var(--muted); }
.ai-factor.up strong { color: var(--green); } .ai-factor.down strong { color: var(--red); }
.panel-pad { padding: 8px 22px 16px; }

/* Passi del monitoraggio automatico cliccabili, stessa griglia di prima */
.automation-steps .automation-link { display: grid; grid-template-columns: 22px 92px 1fr; gap: 12px; align-items: start; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.automation-steps li { display: block; }
.automation-steps .automation-link:hover strong { color: var(--bene-blue-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Coordinate bancarie nella messa in mora */
.bank-box { display: grid; gap: 2px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--bene-blue); border-radius: 6px; background: #f8fbfd; font-size: 13px; }
.bank-box strong { margin-bottom: 4px; }
.bank-box span { font-family: var(--font-numbers); font-size: 13px; }
.bank-box small { margin-top: 4px; color: var(--muted); font-size: 12px; }
/* Box AI nella trattativa diretta */
.ai-compact { display: grid; grid-template-columns: 40px minmax(0, 1fr) 200px auto; align-items: center; gap: 16px; margin: 12px 0 0; padding: 14px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid #6b4fd8; border-radius: 9px; }
.ai-compact .ai-robot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #f1edfd; color: #6b4fd8; }
.ai-compact strong { display: flex; align-items: center; gap: 10px; margin: 3px 0 2px; font-family: var(--font-numbers); font-size: 22px; font-weight: 500; color: #5a3fc4; }
.ai-compact strong .status-tag { font-family: "Inter", sans-serif; }
.ai-compact small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 820px) { .ai-compact { grid-template-columns: 40px 1fr; } }

/* Percorso a fasi: solo nome e stato, nessuna scritta sotto; fasi saltate in grigio chiaro */
.workspace .phase-rail { grid-template-columns: 170px minmax(0, 1fr); padding: 14px 22px; }
.workspace .phase-rail .rail-heading { padding-top: 12px; }
.workspace .phase-rail li { padding-top: 30px; }
.workspace .phase-rail li.skipped strong { color: #9aa9b6; font-weight: 400; }
.workspace .phase-rail li.future strong { font-weight: 400; }
/* Cronologia filtrata per fase */
.phase-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 16px; padding: 10px 14px; border-left: 3px solid var(--bene-blue); background: var(--bene-blue-pale); font-size: 13px; font-weight: 600; color: var(--bene-blue-dark); }
.timeline-event.phase-dim { opacity: .28; }
/* Nessun punto interrogativo */
.workspace .explanation { display: none !important; }

/* Deleghe autorizzative della trattativa diretta: verde entro la delega operatore, ambra oltre. */
.authority-line, .offer-authority.within, .offer-authority.over { display: flex; flex-direction: column; gap: 2px; margin: 16px 0 0; padding: 10px 14px; border-left: 3px solid #2f8a57; background: #eef7f1; font-size: 13px; line-height: 1.45; color: var(--ink, #1d2939); }
.authority-line.over, .offer-authority.over { border-left-color: #c77b12; background: #fff5e8; }
.authority-line strong, .offer-authority strong { font-weight: 650; }
.authority-line span, .offer-authority span { color: var(--muted); }
.offer-authority.within, .offer-authority.over { margin: 13px 0; }
.document-note { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* =====================================================================
   Cruscotto (Controlli) · 01/10/2026
   Stessa grammatica delle altre viste: schede bianche, bordo #d7e1e8, raggio 10,
   etichette 11 maiuscole, importi IBM Plex Mono 500. Colori con un solo significato:
   blu = incassato/diretta · azzurro = atteso o coperto da accordo · magenta = residuo senza accordo
   rosso = scaduto · grigio tratteggiato = stralcio · viola = stima AI · ardesia = indiretta.
   ===================================================================== */
.dashboard { --dash-blue: #0f7ec1; --dash-sky: #9fd0ef; --dash-sky-pale: #e3f1fa; --dash-magenta: #df1682; --dash-red: #c0323c; --dash-slate: #5f7891; --dash-grey: #c3cfd9; --dash-ai: #6b4fd8; --dash-green: #19744f; --dash-amber: #946119; }
.dashboard .page-title { margin-bottom: 16px; }
.dash-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.dash-toolbar-note { color: var(--muted); font-size: 12px; }
.dash-card { min-width: 0; padding: 22px 24px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dash-card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.dash-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dash-more { display: inline-flex; align-items: center; gap: 2px; flex: none; color: var(--bene-blue-dark); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dash-more:hover { text-decoration: underline; }
.dash-chevron { flex: none; color: #6b7f92; }
.dash-icon { flex: none; }
.dash-grid-2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; margin-top: 18px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.dashboard a:focus-visible, .dash-ai:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: 2px; }

/* Indicatori principali */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dash-kpi { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px 22px 18px 24px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); transition: background-color .15s; }
.dash-kpi:first-child { border-left: 0; }
.dash-kpi::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--tone); }
.dash-kpi:hover { background: var(--tone-bg); }
.dash-kpi.tone-ai { --tone: var(--dash-ai, #6b4fd8); --tone-bg: #f6f3fe; --tone-text: #5a3fc4; }
.dash-kpi-label { display: flex; align-items: center; gap: 8px; color: var(--tone-text); font-size: 13px; font-weight: 650; }
.dash-kpi-label svg { flex: none; }
.workspace .dash-kpi-value { margin: 12px 0 10px; font-family: var(--font-numbers); font-size: 28px; font-weight: 500; line-height: 1.05; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.dash-kpi-body { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dash-kpi-body strong { color: var(--ink); font-weight: 600; }
.dash-kpi-body .dash-red { color: var(--dash-red, #c0323c); }
.dash-split { color: #5f7891; }
.dash-meter { position: relative; display: block; height: 6px; border-radius: 3px; background: #e7eef3; overflow: hidden; }
.dash-meter i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--dash-blue, #0f7ec1); }
.dash-kpi .dash-meter { margin: 2px 0 3px; }

/* Composizione del liquidato */
.dash-bar { display: flex; gap: 3px; height: 30px; margin: 4px 0 18px; }
.dash-seg { display: block; min-width: 6px; flex-basis: 0; border-radius: 4px; transition: filter .15s, transform .15s; }
.dash-seg:hover { filter: brightness(.92); transform: scaleY(1.08); }
.seg-recovered { background: var(--dash-blue); }
.seg-discount { background: repeating-linear-gradient(135deg, #d5dee6 0 5px, #c3cfd9 5px 10px); }
.seg-plan { background: var(--dash-sky); }
.seg-open { background: var(--dash-magenta); }
.dash-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.dash-legend a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-areas: "dot label pct" ". value value" ". note note"; column-gap: 9px; row-gap: 3px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.dash-legend a:hover { background: #f4f8fb; }
.dash-legend i { grid-area: dot; width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; }
.dash-legend-label { grid-area: label; font-size: 13px; font-weight: 600; }
.dash-legend-pct { grid-area: pct; color: var(--muted); font-family: var(--font-numbers); font-size: 13px; }
.workspace .dash-legend strong { font-family: var(--font-numbers); font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.dash-legend small { grid-area: note; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dash-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid #e8eef2; color: var(--muted); font-size: 13px; }
.dash-foot a { color: var(--muted); text-decoration: none; }
.dash-foot a:hover { color: var(--bene-blue-dark); }
.dash-foot strong { margin-left: 4px; color: var(--ink); font-family: var(--font-numbers); font-weight: 500; }

/* Incassi mese per mese */
.dash-chart { display: block; width: 100%; height: auto; overflow: visible; }
.dash-chart text { font-family: "Inter", sans-serif; font-size: 11px; fill: #5f7891; }
.dash-grid line { stroke: #e7eef3; stroke-width: 1; }
.dash-grid:first-child line { stroke: #c9d6df; }
.dash-today line { stroke: #41586c; stroke-width: 1.2; stroke-dasharray: 3 3; }
.dash-today text { fill: #41586c; font-weight: 600; }
.dash-chart .bar-cash { fill: var(--dash-blue); }
.dash-chart .bar-late { fill: var(--dash-red); }
.dash-chart .bar-due { fill: var(--dash-sky-pale); stroke: var(--dash-sky); stroke-width: 1.2; stroke-dasharray: 4 2; }
.dash-chart a rect { transition: opacity .15s; }
.dash-chart a:hover rect { opacity: .78; }
.dash-chart .dash-col-value { fill: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; }
.dash-chart .dash-col-month { fill: #41586c; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.dash-chart .future .dash-col-month { fill: #5f7891; font-weight: 400; }
.dash-keys { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.dash-keys li, .dash-keys span { display: inline-flex; align-items: center; gap: 7px; }
.dash-keys strong { color: var(--ink); font-family: var(--font-numbers); font-weight: 500; }
.dash-keys i { width: 10px; height: 10px; border-radius: 3px; }
.dash-keys i.bar-cash { background: var(--dash-blue); }
.dash-keys i.bar-late { background: var(--dash-red); }
.dash-keys i.bar-due { background: var(--dash-sky-pale); box-shadow: inset 0 0 0 1.2px var(--dash-sky); }
.dash-keys.compact { margin-top: 14px; }

/* Pratiche per fase */
.dash-phase-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.dash-phase-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name count" "amount amount"; align-items: baseline; column-gap: 10px; }
.dash-phase-name { grid-area: name; font-size: 13px; font-weight: 600; }
.dash-phase-count { grid-area: count; font-family: var(--font-numbers); font-size: 18px; font-weight: 500; line-height: 1; }
.dash-phase-amount { grid-area: amount; color: var(--muted); font-size: 12px; }
.dash-phase.empty .dash-phase-name, .dash-phase.empty .dash-phase-count { color: #6b7f92; }
.dash-phase-bar { display: flex; gap: 2px; height: 6px; margin: 7px 0 0; border-radius: 3px; background: #eef3f6; overflow: hidden; }
.dash-phase-bar i { display: block; height: 100%; }
.dash-phase-bar i:first-child { border-radius: 3px 0 0 3px; }
.dash-phase-bar .m-direct { background: var(--dash-blue); }
.dash-phase-bar .m-indirect { background: var(--dash-slate); }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dash-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcfd; color: #2b4258; font-size: 12px; font-weight: 500; line-height: 1.5; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-chip:hover { border-color: #9fc9e6; background: var(--bene-blue-pale); color: var(--bene-blue-dark); }
.dash-chip.m-direct::before, .dash-chip.m-indirect::before, .dash-keys .m-direct, .dash-keys .m-indirect { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; }
.dash-chip.m-direct::before, .dash-keys .m-direct { background: var(--dash-blue); }
.dash-chip.m-indirect::before, .dash-keys .m-indirect { background: var(--dash-slate); }
.dash-chip b { color: var(--muted); font-family: var(--font-numbers); font-size: 11px; font-weight: 500; }

/* Da presidiare */
.dash-sub { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #41586c; font-size: 11px !important; font-weight: 600 !important; letter-spacing: .06em; text-transform: uppercase; }
.dash-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff3e3; color: #8a5a12; font-size: 11px; letter-spacing: 0; }
.dash-auths, .dash-alerts, .dash-provider-list, .dash-bands { margin: 0; padding: 0; list-style: none; }
.dash-auths { margin-bottom: 16px; border: 1px solid #f1dcbc; border-radius: 8px; background: #fffaf2; }
.dash-auths li + li { border-top: 1px solid #f3e4cc; }
.dash-auths a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 16px; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.dash-auths a:hover { background: #fff3e3; }
.dash-auth-name, .dash-auth-what { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.4; }
.dash-auth-name strong { font-weight: 600; }
.dash-auth-name small, .dash-auth-what small { color: var(--muted); font-size: 12px; }
.dash-alerts li + li { border-top: 1px solid #edf2f5; }
.dash-alerts a { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 10px 4px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.dash-alerts a:hover { background: #f6f9fb; }
.dash-alert-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--tone-bg, #f1f5f8); color: var(--tone-text, #6b7f92); }
.dash-alerts .is-zero { --tone-bg: #f1f5f8; --tone-text: #6b7f92; }
.dash-alert-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.4; }
.dash-alert-text strong { font-weight: 600; }
.dash-alert-text small { color: var(--muted); font-size: 12px; }
.dash-alert-n { font-family: var(--font-numbers); font-size: 16px; font-weight: 500; color: var(--tone-text, var(--ink)); }
.dash-alerts .is-zero .dash-alert-n, .dash-alerts .is-zero strong { color: #6b7f92; }
.dash-empty { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

/* Stima AI */
.dash-ai .ai-label svg { color: var(--dash-ai); }
.dash-ai-total { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 18px; padding: 14px 16px; border-radius: 8px; background: #f6f3fe; }
.workspace .dash-ai-total strong { color: #3e2a99; font-family: var(--font-numbers); font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.dash-ai-total span { color: #5d5683; font-size: 12px; }
.dash-bands { display: flex; flex-direction: column; gap: 14px; }
.dash-band-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 12px; font-size: 13px; }
.dash-band-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.dash-band-name small { color: var(--muted); font-size: 12px; font-weight: 400; }
.dash-band-name i { width: 8px; height: 8px; border-radius: 50%; background: var(--band); }
.dash-band-n { color: var(--muted); font-size: 12px; }
.dash-band-amount { min-width: 70px; font-family: var(--font-numbers); font-weight: 500; text-align: right; }
.dash-band-bar { height: 6px; margin-top: 7px; border-radius: 3px; background: #eef3f6; overflow: hidden; }
.dash-band-bar i { display: block; height: 100%; border-radius: 3px; background: var(--band); }
.band-high { --band: var(--dash-green); }
.band-mid { --band: var(--dash-amber); }
.band-low { --band: var(--dash-red); }
.dash-note { margin: 16px 0 0; color: #5f7891; font-size: 12px; line-height: 1.45; }

/* Società di recupero / accordi */
.dash-provider-list li + li { border-top: 1px solid #edf2f5; }
.dash-provider-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; grid-template-areas: "name pct chev" "bar bar bar"; align-items: center; column-gap: 12px; row-gap: 8px; padding: 12px 4px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.dash-provider-list a:hover { background: #f6f9fb; }
.dash-provider-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.4; }
.dash-provider-name strong { font-weight: 600; }
.dash-provider-name small, .dash-provider-progress small { color: var(--muted); font-size: 12px; }
.dash-provider-progress { grid-area: bar; display: flex; flex-direction: column; gap: 6px; }
.dash-provider-pct, .dash-provider-amount { grid-area: pct; font-family: var(--font-numbers); font-size: 16px; text-align: right; font-weight: 500; }
.dash-provider-list .dash-chevron { grid-area: chev; }

@media (max-width: 1180px) {
  .dash-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-3 > :last-child { grid-column: 1 / -1; }
  .dash-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi:nth-child(3) { border-left: 0; }
  .dash-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .dash-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .dash-toolbar { flex-direction: column; align-items: flex-start; }
  .dash-toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .dash-kpis, .dash-grid-3, .dash-legend { grid-template-columns: minmax(0, 1fr); }
  .dash-kpi { border-left: 0; }
  .dash-kpi:nth-child(n+2) { border-top: 1px solid var(--line); }
  .dash-grid-3 > :last-child { grid-column: auto; }
  .dash-card { padding: 18px 16px; }
  .workspace .dash-kpi-value { font-size: 22px; }
}

/* Cruscotto · disposizione: fasi in fascia orizzontale, poi due coppie di schede */
.dash-phases { margin-top: 18px; }
.dash-phases .dash-card-head .dash-keys { margin: 4px 0 0; }
.dash-phase-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.dash-phase { min-width: 0; padding: 2px 18px 4px; border-left: 1px solid #e8eef2; }
.dash-phase:first-child { padding-left: 0; border-left: 0; }
.dash-phase:last-child { padding-right: 0; }
.dash-phase-name { display: block; color: #41586c; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-phase-row { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.workspace .dash-phase-count { font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.dash-phase-amount { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dash-phase-bar { margin-top: 10px; }
.dash-grid-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; }
.dash-grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.dash-auths a { grid-template-columns: minmax(0, 1fr) 16px; }
.dash-auth-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.4; }
.dash-auth-name { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
.dash-auth-name small { font-family: var(--font-numbers); font-size: 11px; }
.dash-auth-what { color: var(--ink); }
.dash-auth-who { color: #8a5a12; font-size: 12px; font-weight: 500; }
@media (max-width: 1180px) {
  .dash-phase-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .dash-phase:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 980px) {
  .dash-grid-2, .dash-grid-2.even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .dash-phase-list { grid-template-columns: minmax(0, 1fr); }
  .dash-phase { padding: 0 0 14px; border-left: 0; border-bottom: 1px solid #e8eef2; }
  .dash-phase:last-child { border-bottom: 0; padding-bottom: 0; }
}
.dash-providers { display: flex; flex-direction: column; }
.dash-provider-total { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid #e8eef2; }
.dash-provider-total div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dash-provider-total dt { color: var(--muted); font-size: 12px; }
.workspace .dash-provider-total dd { margin: 0; font-family: var(--font-numbers); font-size: 14px; font-weight: 500; white-space: nowrap; }
.dash-provider-list { margin-bottom: 16px; }
.dash-legend-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-areas: "dot label pct" ". value value" ". note note"; column-gap: 9px; row-gap: 3px; padding: 10px 12px; }
.dash-chart .dash-col-value.expected { fill: #4f7fa3; }
.dash-chart-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.dash-chart-note a { color: var(--bene-blue-dark); font-weight: 600; text-decoration: none; }
.dash-chart-note a:hover { text-decoration: underline; }
.dash-phases:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: 2px; }

/* Cruscotto · correzioni dopo la revisione (01/10/2026) */
.tone-slate { --tone: #41586c; --tone-bg: #f4f7f9; --tone-text: #2f4a62; }
.dash-legend-value { grid-area: value; display: flex; align-items: baseline; gap: 8px; }
.dash-legend-value .dash-legend-pct::before { content: "· "; }
.dash-legend a, .dash-legend-item { grid-template-areas: "dot label label" ". value value" ". note note"; }
.dash-phase-list { grid-template-columns: repeat(var(--phases, 5), minmax(0, 1fr)); }
.dash-band-amount small, .dash-provider-pct small { display: block; color: var(--muted); font-family: "Inter", sans-serif; font-size: 11px; font-weight: 400; text-align: right; }
.dash-band-row { align-items: center; }
.dash-chart-wrap { overflow-x: auto; }
.dash-grid-2 { align-items: start; }
.dash-grid-2.even { align-items: stretch; }
@media (max-width: 1240px) {
  .dash-grid-2, .dash-grid-2.even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi:nth-child(3) { border-left: 0; }
  .dash-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .dash-phase-list { grid-template-columns: repeat(min(var(--phases, 5), 3), minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .dash-kpis { grid-template-columns: minmax(0, 1fr); }
  .dash-kpi:nth-child(n+2) { border-top: 1px solid var(--line); border-left: 0; }
  .dash-chart { min-width: 520px; }
  .dash-foot > span { display: none; }
  .dash-phase-list { grid-template-columns: minmax(0, 1fr); }
  .dash-provider-total { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* Barra di navigazione su telefono: scorre al suo interno, la pagina non scorre in orizzontale */
@media (max-width: 820px) {
  .sidebar { box-sizing: border-box; max-width: 100vw; }
  .sidebar nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .sidebar nav a, .sidebar nav .nav-parent { flex: none; white-space: nowrap; }
}
.dash-chart .dash-col-value { fill: var(--bene-blue-dark); }
.dash-chart .dash-col-value.expected { fill: #4f7fa3; }
/* Invii e ricevute: elenco per canale. Il canale è un'etichetta piccola, gli invii stanno sotto, rientrati; niente fasce. */
.postal-status.sends-panel { margin-top: 16px; padding: 20px 25px 18px; }
.sends-panel > header { margin: 0 0 6px; }
.sends-panel .auto-legend { display: flex; align-items: center; gap: 6px; width: 100%; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.sends-panel .auto-legend svg { width: 14px; height: 14px; flex: none; color: #6b4fd8; }
.send-group { padding: 14px 0 4px; }
.send-group + .send-group { border-top: 1px solid var(--line); }
.workspace .sends-panel .send-group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: 11px; font-weight: 650; line-height: 1.4; letter-spacing: .075em; text-transform: uppercase; color: var(--muted); }
.workspace .sends-panel .send-group-head small { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.send-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 110px minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 20px; align-items: start; padding: 9px 0 9px 14px; font-size: 13px; }
.send-row + .send-row { border-top: 1px dashed var(--line); }
.send-row strong { font-weight: 600; }
.send-row > div > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.send-row .send-when { font-family: var(--font-numbers); font-variant-numeric: tabular-nums; }
.send-row .proofs .text-button { display: inline-block; padding: 0 10px 0 0; }
.send-row .proofs span span, .send-row .proofs > span > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.send-row .auto-send { display: inline-flex; vertical-align: middle; margin: 0 0 0 6px; color: #6b4fd8; font-size: 0; }
.send-row .auto-send svg { width: 14px; height: 14px; }
.sends-panel > footer { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.postal-status.sends-panel [data-postal] { display: block; padding: 0; border: 0; font-size: inherit; }
@media (max-width: 820px) { .send-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-left: 0; } }
/* Riga STATO sotto il percorso: etichetta a destra nella colonna del titolo, frase allineata con i passi. */
.workspace .process-rail .rail-activity { grid-column: 1 / -1; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 20px; align-items: baseline; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: #415367; }
.rail-activity .section-label { margin: 0; justify-self: end; text-align: right; }
.rail-activity .rail-sentence strong { color: var(--ink); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Importi in testata: liquidato e recupero della stessa misura del residuo; il residuo si distingue per peso e colore. */
.workspace .case-amounts dd { font-size: 28px; }
.workspace .case-amounts .residual dd { font-size: 28px; font-weight: 600; }
/* Pulsanti che sono link: stessa resa dei pulsanti, mai sottolineati. */
a.button { display: inline-flex; align-items: center; text-decoration: none; }
.button span[aria-hidden] { margin-left: 8px; }
/* Prossima azione consigliata: blocco proprio sotto l'Attività corrente, un solo pulsante in evidenza. */
.next-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; margin-top: 0; padding: 20px 25px; border: 1px solid #d9d2f5; border-left: 3px solid #6b4fd8; border-radius: 9px; background: #faf9ff; }
.next-action .section-label { display: inline-flex; align-items: center; gap: 10px; color: #6b4fd8; }
.next-action .section-label svg { width: 16px; height: 16px; flex: none; }
.next-action .section-label .status-tag { font-size: 10px; letter-spacing: 0; text-transform: none; }
.next-action h2 { margin: 8px 0 4px; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.next-action p { margin: 0; color: #415367; font-size: 13px; line-height: 1.5; }
.next-action .action-row { margin: 0; gap: 10px; justify-content: flex-end; }
.next-action .action-row .button + .button, .next-action .action-row .button + a { margin-left: 0; }
.next-action.no-action { grid-template-columns: minmax(0, 1fr); padding: 14px 25px; border-color: var(--line); border-left-color: var(--line-strong); background: #fbfcfd; }
.next-action.no-action .section-label { color: var(--muted); }
.next-action.no-action .section-label svg { color: #6b4fd8; }
.next-action.no-action h2 { margin: 5px 0 2px; font-size: 16px; color: #41586c; }
.next-action.no-action .inline-actions .button { margin-left: 6px; padding: 3px 10px; font-size: 12px; vertical-align: middle; }
/* Barra delle decisioni: fascia bianca fissa in alto. Le tre azioni formano UN elemento: gruppo segmentato a celle uguali
   (come le opzioni del piano), icona + etichetta, nessun colore d'allarme: richiama l'occhio senza distrarre. */
.case-toolbar { position: sticky; top: -1px; z-index: 6; margin: 0 0 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(23, 50, 75, .08); }
.case-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; overflow: hidden; }
.decision-tile { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 6px 18px; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .12s; }
.decision-tile:first-child { border-left: 0; }
.decision-tile:hover { background: #f4f8fa; }
.decision-tile:focus-visible { outline: 2px solid var(--bene-blue); outline-offset: -2px; }
.decision-tile .tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; background: var(--bene-blue-pale); color: var(--bene-blue-dark); flex: none; }
.decision-tile strong { font-size: 13px; font-weight: 600; line-height: 1.2; }
.decision-tile.danger .tile-icon { background: var(--red-pale); color: var(--red); }
.decision-tile.danger:hover { background: #fff7f8; }
.decision-tile[disabled] { color: var(--muted); cursor: not-allowed; }
.decision-tile[disabled]:hover { background: #fff; }
.decision-tile[disabled] .tile-icon { background: #f1f5f8; color: #8798a8; }
@media (max-width: 980px) { .case-toolbar { flex-wrap: wrap; } .case-actions { width: 100%; } }
@media (max-width: 820px) { .case-toolbar { position: static; } .rail-activity .rail-contact { margin-left: 0; width: 100%; } .next-action { grid-template-columns: minmax(0, 1fr); } .next-action .action-row { justify-content: flex-start; } .case-toolbar { flex-wrap: wrap; } .case-actions { grid-auto-flow: row; grid-auto-columns: auto; width: 100%; } .decision-tile { justify-content: flex-start; border-left: 0; border-top: 1px solid var(--line); } .decision-tile:first-child { border-top: 0; } }
/* Numero di sinistro in testata: senape, così non è tutto pallido. */
.workspace .case-header .case-identifiers strong[data-claim-number], .case-identifiers [data-claim-number] { color: #9a6a0c; font-weight: 700; }
.workspace .case-header .case-identifiers { margin-bottom: 4px; }
/* Scheda del soggetto: anagrafica in evidenza, indirizzo e recapiti, mappa del rischio 1–10. */
.subject-card { margin-bottom: 26px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.subject-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.workspace .subject-head h2 { margin: 6px 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.subject-roles { display: flex; gap: 6px; }
.role-chip { display: inline-block; padding: 3px 9px; border: 1px solid #c9e1f1; border-radius: 999px; background: var(--bene-blue-pale); color: var(--bene-blue-dark); font-size: 11px; font-weight: 600; }
.risk-map { min-width: 230px; max-width: 300px; }
.risk-score { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 6px; }
.risk-score strong { font-family: var(--font-numbers); font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.risk-score span { color: var(--muted); font-size: 13px; }
.risk-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.risk-scale i { display: block; height: 8px; border-radius: 2px; background: #e6ebf0; }
.risk-scale i.on.low { background: #3f9a6a; } .risk-scale i.on.mid { background: #d9a21b; } .risk-scale i.on.high { background: #e2731c; } .risk-scale i.on.severe { background: var(--red); } .risk-scale i.on.max { background: #8a1020; }
.risk-map small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 28px; padding-top: 18px; }
.subject-block { margin: 0; }
.subject-block .block-title { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .075em; text-transform: uppercase; }
.subject-block > div { padding: 6px 0; }
.subject-block dt { color: var(--muted); font-size: 11px; }
.subject-block dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.subject-block dd code { font-family: var(--font-numbers); font-size: 13px; font-weight: 500; }
.subject-block .muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.risk-factors { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.risk-factors summary { cursor: pointer; }
.risk-factors ul { margin: 8px 0 0; padding: 0; list-style: none; }
.risk-factors li { display: flex; gap: 10px; padding: 3px 0; color: #415367; }
.risk-factors li span { min-width: 26px; font-family: var(--font-numbers); font-weight: 500; }
.risk-factors li .up { color: var(--red); } .risk-factors li .down { color: #3f9a6a; }
.risk-factors li.base { color: var(--muted); }
@media (max-width: 1100px) { .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .subject-grid { grid-template-columns: minmax(0, 1fr); } .subject-card { padding: 18px; } }
.subject-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.subject-foot .muted { color: var(--muted); }
.agreement-letter h3 { margin: 0 0 12px; font-size: 16px; }
.agreement-letter p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.agreement-letter p.gap { height: 6px; margin: 0; }
/* Richiesta di autorizzazione: importo in evidenza e sintesi del sinistro prima dell'e-mail. */
.auth-request .auth-amount { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid #ead7ae; border-left: 3px solid #d9a21b; border-radius: 8px; background: #fff8ec; }
.auth-request .auth-amount strong { font-family: var(--font-numbers); font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.auth-request .auth-amount small { color: #805418; font-size: 12px; }
.auth-request .auth-claim { margin-bottom: 14px; }
.offer-authority [data-request-authorization] { display: inline-flex; margin-top: 10px; }
.field.static { display: flex; flex-direction: column; gap: 4px; }
.field.static span { font-size: 12px; color: var(--muted); }
.field.static strong { font-size: 14px; font-weight: 600; padding: 9px 0; }
/* Telefonate della trattativa. */
.calls-panel .call-list { margin: 0 0 12px; padding: 0; list-style: none; }
.calls-panel .call-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.calls-panel .call-list strong { display: block; font-weight: 600; }
.calls-panel .call-list span { color: #415367; }
.calls-panel .call-add { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.calls-panel .call-save-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.calls-panel #log-call-error { color: var(--red); font-size: 12px; }
/* Dettatura vocale nei campi di resoconto. */
.field .field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field .dictate { display: inline-flex; align-items: center; gap: 5px; width: auto; margin: 0; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: #41586c; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; vertical-align: middle; }
.field .dictate:hover { border-color: var(--ink); }
.field .dictate.listening { border-color: var(--red); color: var(--red); background: var(--red-pale); animation: dictate-pulse 1.2s ease-in-out infinite; }
@keyframes dictate-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 40, 60, .25); } 50% { box-shadow: 0 0 0 5px rgba(200, 40, 60, 0); } }
.calls-panel .next-call { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--bene-blue); background: var(--bene-blue-pale); font-size: 13px; }
.calls-panel .next-call span { color: #415367; }
.calls-panel .calls-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.calls-panel .calls-actions .button { justify-content: center; text-align: center; white-space: nowrap; }
.calls-panel .calls-actions .button + .button { margin-left: 0; }
/* Esito della trattativa: tre tasti, stessa grafica delle opzioni del piano. */
.outcome-field > span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.outcome-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.outcome-options label { position: relative; cursor: pointer; display: flex; }
.outcome-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.outcome-options label > span { display: block; flex: 1; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
/* roll-over: il tasto si alza leggermente, si capisce che è schiacciabile */
.outcome-options label:hover > span { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(7, 44, 104, .12); border-color: #9fb3c4; }
.outcome-options label:active > span { transform: translateY(0); box-shadow: none; }
.outcome-options strong { display: block; font-size: 13px; font-weight: 600; }
.outcome-options small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.outcome-options input:checked + span { border-color: #607b8f; box-shadow: inset 0 0 0 1px #607b8f; background: #f4f8fa; }
.outcome-options input:focus-visible + span { outline: 2px solid var(--bene-blue); outline-offset: 2px; }
@media (max-width: 900px) { .outcome-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .outcome-options { grid-template-columns: minmax(0, 1fr); } }
.call-save-buttons { display: flex; gap: 10px; }
/* Anteprima dei documenti su carta intestata (Poppins di bene.it). */
@font-face { font-family: Poppins; font-weight: 400; src: url(assets/fonts/bene/Poppins-Regular.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; src: url(assets/fonts/bene/Poppins-Medium.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; src: url(assets/fonts/bene/Poppins-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; src: url(assets/fonts/bene/Poppins-Bold.woff2) format("woff2"); }
.doc-preview { max-height: 520px; overflow: auto; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 6px; background: #e9eef3; padding: 10px; }
.doc-preview .page { background: #fff; box-shadow: 0 1px 4px rgba(7, 44, 104, .12); }
/* Filtro per fase in Cronologia: gli eventi delle altre fasi si nascondono. */
.timeline-event.phase-dim { display: none; }

/* Da richiamare: riquadro Pianifica chiamata dentro il resoconto */
.schedule-box { margin: 4px 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--bene-blue, #066aac); border-radius: 6px; background: #f8fafc; }
.schedule-box .section-label { display: block; margin-bottom: 6px; }
.schedule-box > small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
/* Accordo raggiunto: le condizioni scelte vanno nell'accordo */
.agreement-recap { margin: 8px 0 0; padding: 10px 12px; border-radius: 6px; background: #f4f8fa; font-size: 13px; }
.agreement-recap:empty { display: none; }
/* Chiudi la trattativa: motivi su tre colonne, blocco e-mail */
.reason-options { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
.reason-options label > span { min-height: 44px; display: flex; align-items: center; }
.reason-options strong { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.close-negotiation > .field { margin-top: 12px; }
.close-negotiation .closure-report { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.close-negotiation .closure-report .section-label { display: block; margin-bottom: 8px; }
.close-negotiation .confirm-box { margin-top: 12px; }
@media (max-width: 700px) { .reason-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tessere delle rate: «al mese» attaccato alla cifra; roll-over come i tasti esito */
.plan-option strong { margin: 3px 0 0; line-height: 1.05; }
.plan-option small { margin-top: 3px; font-size: 11px; line-height: 1.1; }
.plan-option { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.plan-option:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(7, 44, 104, .12); border-color: #9fb3c4; }
.plan-option:active { transform: translateY(0); box-shadow: none; }

/* Campi dei moduli: input, data e tendina alla stessa altezza e con lo stesso raggio (in Safari la tendina nativa ignorava padding e altezza) */
.field input:not([type="checkbox"]):not([type="radio"]), .field select { box-sizing: border-box; height: 42px; min-height: 42px; padding: 0 11px; border-radius: 5px; line-height: 40px; align-self: end; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23455a6a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center; }
.field textarea { border-radius: 5px; }

/* Gestione indiretta: caricamento del foglio delle variazioni di stato */
.page-title .page-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: 16px; }
.page-title .page-actions small { color: var(--muted); font-size: 12px; }
.import-box .import-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.import-box input[type="file"] { padding: 8px; border: 1px dashed var(--line-strong); border-radius: 5px; background: #fff; height: auto; line-height: normal; }
.import-results { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.import-results li { display: block; padding: 8px 10px; border-left: 3px solid #35c190; border-radius: 4px; background: #f4faf7; font-size: 13px; }
.import-results li.skipped { border-left-color: #d9a21b; background: #fbf7ee; }
.import-results li.warn { border-left-color: #066aac; background: #f2f7fb; }
.import-results li span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* Fase attuale esplicita e storia distinta dalle scadenze operative. */
.workspace .phase-rail .phase-caption{display:block;font-size:11px;line-height:1.35;color:#65798e;margin-top:5px;font-weight:400}
.workspace .phase-rail .current .phase-caption{color:#096cae;font-weight:600}
.workspace .phase-rail .rail-heading{padding-top:0}
.workspace .phase-rail .rail-heading h2{font-size:14px;line-height:1.4;color:#096cae}
