/* ============================================================================
   blocchi-viste.css — le viste di CronoService nello stile a blocchi (09/11/2026)
   Anno, Mese, Statistiche, il dettaglio del sito e la finestrella della cella. Il guscio, i token e le
   primitive sono in blocchi.css; qui solo quello che è delle viste. Regole delle pagine approvate del
   Planning (docs/blocchi-gusti.md): tre gradini neutri (tela grigia, blocco bianco, riga), il colore solo
   dove dice qualcosa (i quattro passi, verde = fatto, pesca = in ritardo, rosso tenue = contratto da
   rinnovare), niente bordi, ombre ferme, sfumature, maiuscoletto spaziato o monospazio.
   ========================================================================== */

@media screen {

/* ============================== VISTA ANNO ================================ */
/* Tutta la griglia è un blocco bianco sulla tela; la testata dei mesi resta ferma in cima mentre si scorre.
   I clienti sono separati dall'aria, non da carte con bordo; un sito o un cliente a posto prende il verde
   tenue «fatto» (via la barretta verde a sinistra, l'alone e la pillola «a posto»: lo dicevano tre volte). */
:root {
  --rientro: 0.5rem;
  --passo-mese: 46px;
  --h-riga: 34px;
  --col-tot: 74px;
}
:root .crono {
  padding: 0 var(--rientro) 0.6rem; border-radius: var(--bl-r-tessera); background: var(--surface);
}
:root .crono > .vuoto { padding: 3rem 1rem; }

/* la testata: ferma in cima, bianca come il blocco; i mesi in chiaro, sotto ognuno «chiuse/in scadenza» */
:root .crono-testa {
  top: 0; height: 3.4rem; margin: 0 calc(-1 * var(--rientro)); padding: 0 var(--rientro);
  background: var(--surface); border-radius: var(--bl-r-tessera) var(--bl-r-tessera) 0 0;
}
:root .crono-testa .col-nome {
  left: 0; padding-left: 0.4rem; background: var(--surface); text-transform: none; letter-spacing: 0;
  font-size: var(--t-mini); color: var(--muted);
}
/* «Cliente · sito» e «chiuse / in scadenza» si capiscono da soli (sono nella guida, «Come si legge») */
:root .crono-testa .col-nome > span, :root .crono-testa .col-nome > i { display: none; }
:root .crono-testa .m {
  gap: 3px; font: 700 var(--t-mini)/1 var(--font); letter-spacing: 0; text-transform: none; color: var(--text-2);
}
:root .crono-testa .m::first-letter { text-transform: uppercase; }
/* il mese di adesso: il nome nel colore dell'app; la colonna prosegue appena tinta (`.mese-oggi`) */
:root .crono-testa .m.oggi { color: var(--accent); font-weight: 800; }
:root .crono-testa .col-tot { font-size: var(--t-mini); letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 700; }
:root .tm { font: 600 var(--t-micro)/1 var(--font); color: var(--muted); }
:root .tm::after { content: none; }
:root .tm.pieno { color: var(--completa-testo); }

/* «Chiudi tutti / Apri tutti»: una pillola grigia piccola */
:root .piega-tutti {
  min-height: 2rem; padding: 0 0.75rem 0 0.55rem; gap: 0.35rem; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: var(--t-mini); font-weight: 700;
}
:root .piega-tutti:hover { background: var(--surface-3); color: var(--text); border: 0; }

/* il cliente: niente carta, niente ombra; l'aria lo separa dal cliente prima */
:root .blocco, :root .blocco:first-of-type {
  margin-top: 0.55rem; border-radius: 16px; background: transparent; box-shadow: none;
}
:root .blocco.completo { box-shadow: none; }
:root .blocco.festa { animation: none; }
:root .blocco.festa.completo .riga-cli { background-image: none; animation: bl-festa 1.2s var(--ease) both; }
@keyframes bl-festa { 30% { background-color: color-mix(in srgb, var(--completa) 26%, var(--surface)); } }

:root .riga-cli, :root .riga-cli[aria-expanded="false"] {
  height: 2.6rem; border-radius: 14px; background: transparent; border-bottom: 0;
}
:root .riga-cli[aria-expanded="true"] { border-bottom: 0; border-radius: 14px 14px 0 0; }
:root .riga-cli:hover { background: var(--surface-2); }
:root .riga-cli .col-nome { left: 0; background: var(--surface); border-radius: 14px; gap: 0.55rem; padding-left: 0.4rem; }
:root .riga-cli:hover .col-nome { background: var(--surface-2); }
:root .blocco.completo .riga-cli, :root .blocco.completo .riga-cli .col-nome { background: var(--bl-tono-fatto); }
:root .blocco.completo .riga-cli:hover, :root .blocco.completo .riga-cli:hover .col-nome { background: color-mix(in srgb, var(--bl-tono-fatto) 80%, var(--completa)); }
:root .blocco.completo .riga-cli .col-nome::before, :root .riga-srv.a-posto .col-nome::before { content: none; }
:root .cli-nome { font-family: var(--font); font-size: var(--t-base); font-weight: 800; letter-spacing: -0.015em; }
:root .cli-id { font-family: var(--font); font-size: var(--t-micro); font-weight: 600; color: var(--muted); }
:root .tag { font: 600 var(--t-micro)/1 var(--font); color: var(--muted); padding: 0; background: none; }
:root .tag.completo, :root .blocco.completo .tag.completo, :root .riga-srv.a-posto .tag.completo { display: none; }

/* il sito: una riga senza fondo; a posto = il verde tenue «fatto»; chiuso = scritta tenue (niente righe oblique) */
:root .riga-srv { background: transparent; border-radius: 12px; }
:root .riga-srv:first-of-type, :root .riga-srv:last-child { padding: 0; border-radius: 12px; }
:root .riga-srv:hover { background: var(--surface-2); }
:root .riga-srv .col-nome { left: 0; background: var(--surface); border-radius: 12px; padding-left: 1.85rem; gap: 0.55rem; }
:root .riga-srv:hover .col-nome { background: var(--surface-2); }
:root .riga-srv.a-posto, :root .riga-srv.a-posto .col-nome { background: var(--bl-tono-fatto); }
:root .riga-srv.a-posto:hover, :root .riga-srv.a-posto:hover .col-nome { background: color-mix(in srgb, var(--bl-tono-fatto) 80%, var(--completa)); }
:root .riga-srv.chiuso, :root .riga-srv.chiuso .col-nome { background: var(--surface); }
:root .riga-srv.chiuso .srv-dest, :root .riga-srv.chiuso .srv-id { color: var(--muted); }
:root .riga-srv .col-nome:hover .srv-dest { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
/* righe tenui fra un cliente e l'altro e fra un sito e l'altro, come nelle carte di Persone e uffici del Pannello
   Admin (11/11/2026, Biagio: «in CronoService magari delle righe leggere come in Admin»): un filo del colore del testo
   al 9%, sopra la riga, che passa anche sotto il nome fermo a sinistra. Sul telefono i siti sono già pastiglie. */
@media (min-width: 761px) {
  :root .blocco, :root .riga-srv { position: relative; }
  :root .riga-srv::before, :root .blocco + .blocco::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 3; pointer-events: none;
    background: color-mix(in srgb, var(--text) 9%, transparent);
  }
  /* fra un cliente e l'altro il filo sta a metà dello spazio che li separa */
  :root .blocco + .blocco::before { top: -0.3rem; }
}
:root .srv-id { font-family: var(--font); font-size: var(--t-micro); font-weight: 600; color: var(--muted); width: 2.6rem; }
:root .srv-dest { font-size: var(--t-mini); font-weight: 600; color: var(--text); }
:root .srv-loc { font-size: var(--t-micro); font-weight: 600; color: var(--muted); }
:root .col-tot { font-family: var(--font); font-size: var(--t-mini); font-weight: 600; color: var(--muted); }
:root .col-tot b { font-weight: 800; }
:root .riga-cli .col-tot { font-size: var(--t-base); }

/* il pallino dello stato del sito (forma per stato, A11Y-17): senza aloni */
:root .punto-stato.ritardo, :root .punto-stato.completa { box-shadow: none; }
:root .punto-stato.corso { background: transparent; box-shadow: inset 3.5px 0 0 var(--accent), inset 0 0 0 1.5px var(--accent); }

/* il mese di adesso: una striscia appena più scura che attraversa la griglia (niente filo) */
:root .mese-oggi { box-shadow: none; background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }

/* LA CELLA: la capsula dei quattro passi. I quattro colori restano (sono i dati, validati per i daltonici);
   intorno niente aloni né ombre. Vuota = grigio pieno; il verde pieno = mappatura chiusa; lo stato del mese
   è il fondo della capsula: pesca = in ritardo, celeste = stima, rosso tenue = contratto da rinnovare; la
   visita (non è la mappatura dell'anno) resta il solo contorno, il mese prima del tracciamento quasi niente. */
:root .cella {
  width: calc(var(--passo-mese) - 12px); height: 22px; padding: 2.5px; gap: 2px; border-radius: 8px;
  background: var(--st-vuoto); box-shadow: none;
}
:root .cella::before { content: none; }
:root .cella .seg { border-radius: 3px; }
:root .cella:hover { transform: scale(1.12); box-shadow: none; }
:root .cella.completa, :root .cella.completa:hover { background: var(--completa); box-shadow: none; }
:root .cella.ritardo:not(.completa) { background: color-mix(in srgb, var(--allerta) 26%, var(--surface)); box-shadow: none; }
:root .cella.stima:not(.completa) { background: color-mix(in srgb, var(--laguna) 20%, var(--surface)); box-shadow: none; }
:root .cella.darinnovare:not(.completa) { background: color-mix(in srgb, var(--scadenza) 22%, var(--surface)); box-shadow: none; }
:root .cella.visita:not(.completa) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
:root .cella.nontracciato:not(.completa) { background: transparent; box-shadow: inset 0 0 0 1px var(--border); opacity: 1; }
:root .cella.orfana { box-shadow: inset 0 0 0 1.5px var(--orfana); }
:root .cella.con-nota::after { background: var(--text-2); }
:root .non-previsto::before { width: 4px; height: 4px; background: var(--border-strong); opacity: 0.7; }
:root .fuori-contratto::before { width: 4px; height: 4px; background: var(--border); }
:root .fuoco-nome { font-family: var(--font); border: 0; box-shadow: 0 0 0 2px var(--surface); }
:root .eco-nome { font-family: var(--font); }

/* ---- il telefono: un elenco per sito, i soli mesi di manutenzione in pastiglie grigie ---- */
@media (max-width: 760px) {
  :root .crono { padding: 0 0.4rem 0.5rem; }
  :root .crono-testa { height: 3.2rem; }
  :root .riga-srv + .riga-srv { border-top: 0; }
  :root .riga-srv .col-nome { padding: 0.55rem 0.5rem 0.2rem 0.6rem; background: transparent; }
  :root .riga-srv, :root .riga-srv .col-nome { border-radius: 14px; }
  :root .riga-srv { margin-top: 0.25rem; background: var(--surface-2); }
  :root .riga-srv:hover .col-nome { background: transparent; }
  :root .riga-srv .mesi > .q { border-radius: 12px; background: var(--surface); box-shadow: none; }
  :root .riga-srv .q-mese { font: 700 var(--t-mini)/1 var(--font); letter-spacing: 0; text-transform: none; color: var(--text-2); }
  :root .riga-srv .q-mese::first-letter { text-transform: uppercase; }
  :root .riga-srv .mese-oggi { background: var(--accent-soft); box-shadow: none; }
  :root .riga-srv .mese-oggi .q-mese { color: var(--accent); }
  :root .riga-srv .srv-dest { font-size: var(--t-base); }
  :root .riga-srv.a-posto .mesi > .q { background: color-mix(in srgb, var(--surface) 70%, var(--bl-tono-fatto)); }
  :root .riga-cli .col-nome { background: transparent; }
}

/* ============================== VISTA MESE ================================ */
/* In cima il nome del mese (l'anno è già nel titolo della pagina), i dodici mesi come selettori e a destra i
   due numeri del mese; sotto il foglio di lavoro in un blocco bianco: i clienti come titoletti, i siti come
   righe grigie con i quattro passi a destra. Fatto = il verde tenue, in ritardo = la pesca. */
:root .mese-testa { padding: 0 0 0.85rem; gap: 0.6rem 1.1rem; }
:root .mese-titolo {
  min-width: 0; font-family: var(--font); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.035em; color: var(--text);
}
:root .mese-titolo span { display: none; }
:root .mese-nav { gap: 0.25rem; padding: 0; background: transparent; border-radius: 0; flex-wrap: wrap; }
:root .mese-nav::before { content: none; }
:root .mese-nav button {
  width: auto; min-width: 2.75rem; height: 2.3rem; padding: 0 0.6rem; border-radius: 999px;
  background: var(--surface); color: var(--text-2); font: 700 var(--t-mini)/1 var(--font); letter-spacing: 0; text-transform: none;
}
:root .mese-nav button:hover { background: color-mix(in srgb, var(--text) 7%, var(--surface)); color: var(--text); }
:root .mese-nav button[aria-pressed="true"], :root .mese-nav button[aria-pressed="true"]:hover { background: var(--bl-scelta); color: var(--bl-scelta-testo); }
/* i numeri del mese: grandi a destra, la parola sotto in chiaro */
:root .riepilogo { gap: 1.4rem; }
:root .riepilogo .voce { align-items: flex-end; }
:root .riepilogo .n { font-family: var(--font); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
:root .riepilogo .et { font-size: var(--t-mini); font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); }
:root .riepilogo .voce.scelta { padding: 0.2rem 0.5rem; margin: -0.2rem -0.5rem; border-radius: 14px; }
:root .riepilogo .voce.scelta .et { border-bottom: 0; }
:root .riepilogo .voce.scelta:hover { background: var(--surface); }
:root .riepilogo .voce.attiva { background: var(--bl-scelta); }
:root .riepilogo .voce.attiva :is(.n, .et) { color: var(--bl-scelta-testo); border: 0; }

/* il foglio: un blocco bianco */
:root .lavoro { padding: 0.35rem 0.75rem 0.75rem; border-radius: var(--bl-r-tessera); background: var(--surface); }
:root .lavoro > .vuoto { padding: 3rem 1rem; }
:root .lavoro .cli-sep {
  padding: 0.85rem 0.35rem 0.4rem; background: var(--surface); gap: 0.5rem;
  font-size: var(--t-base); font-weight: 800; letter-spacing: -0.015em; color: var(--text);
}
:root .lavoro .cli-sep::after { content: none; }
:root .lavoro .cli-sep .dato { font-size: var(--t-micro); font-weight: 600; }
:root .scheda {
  gap: 0.8rem; padding: 0.55rem 0.6rem 0.55rem 0.8rem; margin-bottom: 0.3rem;
  border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: none;
}
:root .scheda:hover { background: var(--surface-3); box-shadow: none; border: 0; }
:root .scheda.finita, :root .scheda.finita:hover { background: var(--bl-tono-fatto); box-shadow: none; }
:root .scheda.ritardo:not(.finita) { background: var(--bl-tono-ritardo); box-shadow: none; }
:root .scheda.previsione { border: 0; }
:root .scheda.altrui { box-shadow: inset 0 0 0 2px var(--tinta, var(--accent)); }
:root .scheda.altrui::after { font-family: var(--font); border: 0; box-shadow: 0 0 0 2px var(--surface); }
:root .scheda:focus, :root .scheda:focus-within {
  outline: 2px solid var(--accent); outline-offset: 1px; border: 0; box-shadow: none;
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-2));
}
:root .scheda .info b { font-size: var(--t-base); font-weight: 800; }
:root .scheda .info b:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
:root .scheda .info .meta { font-size: var(--t-micro); font-weight: 600; color: var(--muted); gap: 0.15rem 0.65rem; }
:root .scheda .meta .dato { font-family: var(--font); }
:root .scheda.finita .tag.completo { display: none; }
:root .bollo { padding: 0; border: 0; background: none !important; font: 800 var(--t-micro)/1 var(--font); letter-spacing: 0; }
:root .bollo.stima { color: var(--accent); }
:root .bollo.darinnovare { color: var(--scadenza); }
:root .bollo.nontracciato { color: var(--muted); }

/* i quattro passi: pastiglie bianche col tondo; fatto = il tondo pieno del colore del passo */
:root .passi-riga { gap: 0.3rem; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
:root .scheda.finita .passi-riga { background: transparent; box-shadow: none; }
:root .passi-riga .passo {
  min-height: 2.25rem; padding: 0 0.85rem 0 0.45rem; gap: 0.45rem; border-radius: 999px;
  background: var(--surface); color: var(--text-2); box-shadow: none;
}
:root .passi-riga .passo:hover { background: color-mix(in srgb, var(--text) 6%, var(--surface)); color: var(--text); }
:root .passi-riga .passo[aria-checked="true"], :root .passi-riga .passo[aria-checked="mixed"] {
  background: var(--surface); color: var(--text); box-shadow: none;
}
:root .passi-riga .passo .box { width: 1.25rem; height: 1.25rem; border-width: 1.5px; border-color: var(--border-strong); }
:root .passi-riga .passo .et { font-size: var(--t-mini); font-weight: 700; }
:root .selez { width: 1.4rem; height: 1.4rem; }
:root .selez.scelto { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }

/* la barra delle azioni su più schede: una pillola scura sopra l'isola */
:root .barra-massa {
  bottom: var(--isola-sotto); padding: 0.4rem 0.45rem 0.4rem 1.1rem; gap: 0.6rem; border-radius: 22px;
  background: var(--text); color: var(--surface); box-shadow: var(--bl-ombra-galleggia); font-size: var(--t-base); font-weight: 700;
}
:root .barra-massa b { font-family: var(--font); }
:root .barra-massa button { min-height: 2.2rem; padding: 0 0.9rem; border-radius: 999px; font-weight: 800; }
:root body:has(> .barra-massa) .avvisi { bottom: calc(var(--isola-sotto) + 3.6rem); }
/* col dito: 44 px (griglia.css lo chiedeva già, le misure qui sopra lo coprivano) */
@media (pointer: coarse) { :root .barra-massa button { min-height: 44px; } }

@media (max-width: 900px) {
  :root .mese-nav button[aria-pressed="true"] { background: var(--bl-scelta); }
}
@media (max-width: 760px) {
  :root .mese-testa { padding: 0 0 0.6rem; }
  :root .mese-titolo { font-size: 1.6rem; }
  /* i dodici mesi in una fila che scorre di lato (in due righe da sei mangiavano mezzo schermo); i due numeri
     accanto al nome del mese */
  :root .mese-titolo { flex: 1 1 auto; }
  :root .mese-testa .riepilogo { display: flex; margin-left: auto; gap: 1rem; }
  :root .riepilogo .n { font-size: 1.5rem; }
  :root .mese-nav { order: 5; flex: 1 1 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0.25rem; }
  :root .mese-nav::-webkit-scrollbar { display: none; }
  :root .mese-nav button { flex: none; min-width: 3rem; height: 2.6rem; }
  :root .lavoro { padding: 0.25rem 0.5rem 0.5rem; }
  :root .scheda { padding: 0.65rem 0.65rem 0.7rem; }
  :root .passi-riga { border-radius: 0; gap: 0.3rem; }
  :root .passi-riga .passo { min-height: 2.75rem; border-radius: 14px; }
}

/* ===================== LA FINESTRELLA DELLA CELLA (.pop) ===================== */
/* Galleggia (ha l'ombra), tonda, senza bordo; i quattro passi una voce per riga col tondo del colore del passo;
   via i numeri davanti (i tasti 1-4 valgono lo stesso) e la linea sopra il piede; «Completa i passi mancanti»
   è l'unica cosa piena. */
:root .pop {
  width: 20rem; padding: 1rem; border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--bl-ombra-galleggia);
}
:root .pop h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
:root .pop .pop-sotto { margin: 0.15rem 0 0.7rem; font-family: var(--font); font-size: var(--t-mini); font-weight: 600; color: var(--muted); }
:root .passi { gap: 0.15rem; }
:root .passo { min-height: 2.6rem; padding: 0 0.6rem; gap: 0.7rem; border-radius: 14px; }
:root .passo:hover { background: var(--surface-2); }
:root .passo .n-passo { display: none; }
:root .passo .box { width: 1.35rem; height: 1.35rem; border-radius: 999px; border: 1.5px solid var(--border-strong); }
:root .passo .et { font-size: var(--t-base); font-weight: 700; }
:root .passo .chi { font-family: var(--font); font-size: var(--t-micro); font-weight: 600; color: var(--muted); }
:root .pop-nota { margin-top: 0.6rem; }
:root .pop-nota textarea {
  min-height: 3rem; padding: 0.6rem 0.8rem; border: 0; border-radius: 14px; background: var(--bl-campo);
  font-size: var(--t-mini); resize: none; field-sizing: content;
}
:root .pop-nota textarea:focus { outline: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); }
:root .pop-piede { margin-top: 0.7rem; padding-top: 0; border-top: 0; gap: 0.5rem; }
:root .pop-piede button { min-height: 2.4rem; padding: 0 0.9rem; border-radius: 999px; font-size: var(--t-mini); font-weight: 700; color: var(--text-2); }
:root .pop-piede button:hover { background: var(--surface-2); color: var(--text); }
:root .pop-piede .js-tutte, :root .pop-piede .js-tutte:hover { background: var(--accent); color: var(--on-accent); font-weight: 800; }
:root .pop-piede .js-tutte:hover { background: var(--accent-hover); }
:root .pop-piede .primario { color: var(--text-2); font-weight: 700; }
:root .pop-piede button { white-space: nowrap; }
@media (pointer: coarse) { :root .pop .passo, :root .pop-piede button { min-height: 44px; } }
:root .pop > :last-child:not(.pop-piede):not(.passi):not(.pop-nota) { font-family: var(--font); color: var(--muted); }

/* ======================= IL DETTAGLIO DEL SITO (.cassetto) ======================= */
/* Una scheda che galleggia a destra, come la scheda dell'attività del Planning: il nome grande, sotto il sito,
   i dati in gruppi (Il sito, Manutenzione, Contratto affiancati in colonne alte uguali, sotto le Note: il titolo
   piccolo, un blocco grigio, una riga per dato), le sezioni con titoli in chiaro, i mesi come le righe del foglio
   del Mese. «Chiudi la mappatura» è l'unica cosa piena. */
/* il pannello prende il fuoco quando si apre (per la tastiera): niente contorno intorno a tutto il pannello */
:root .cassetto:focus, :root .cassetto:focus-visible { outline: 0; }
:root .cassetto {
  top: 0.75rem; right: 0.75rem; bottom: 0.75rem; width: min(34rem, calc(100% - 1.5rem));
  border: 0; border-radius: 26px; background: var(--surface); box-shadow: var(--bl-ombra-galleggia); overflow: hidden;
}
:root .cassetto header { padding: 1.3rem 1.4rem 0.6rem; border-bottom: 0; background: var(--surface); }
:root .cassetto header h2 { margin: 0 6.5rem 0.15rem 0; font-family: var(--font); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
:root .cassetto .cass-sotto { margin: 0; font-size: var(--t-base); font-weight: 600; color: var(--text-2); }
:root .cassetto header .chiudi {
  top: 1.05rem; right: 1.05rem; width: 2.4rem; height: 2.4rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2);
}
:root .cassetto header .chiudi:hover { background: var(--surface-3); color: var(--text); }
/* «Condividi…» (telefono) è più largo di «Copia link»: il nome del cliente non gli va sotto, va a capo */
:root .cassetto header:has(.cass-condividi.nativo) h2 { margin-right: 9.4rem; }
:root .cassetto .cass-condividi { position: absolute; top: 1.05rem; right: 3.85rem; min-height: 2.4rem; background: var(--surface-2); }
:root .cassetto .cass-condividi:hover { background: var(--surface-3); }
:root .cassetto .corpo { padding: 0.6rem 1.4rem 1.6rem; }

/* i dati: gruppi (revisione del 09/11: prima un muro di gettoni uno dopo l'altro). Sul telefono un gruppo sotto
   l'altro con l'etichetta a sinistra e il valore a destra; al computer le colonne, qui sotto. */
:root .cassetto .cass-gruppi { margin-top: 0.4rem; }
:root .cassetto .cass-gruppo { margin: 0.8rem 0 0; }
:root .cassetto .cass-gruppi > .cass-gruppo:first-child { margin-top: 0; }
:root .cassetto .cass-gruppo h4 {
  margin: 0 0 0.3rem 0.9rem; font-family: var(--font); font-size: var(--t-mini); font-weight: 700; letter-spacing: 0;
  text-transform: none; color: var(--muted);
}
:root .cassetto .cass-gruppo-vuoto {
  margin: 0; padding: 0.85rem 0.9rem; border-radius: 18px; background: var(--surface-2);
  font-size: var(--t-mini); font-weight: 600; color: var(--muted);
}
:root .cassetto dl.dettaglio {
  display: block; margin: 0; padding: 0.2rem 0.9rem; border-radius: 18px; background: var(--surface-2);
}
:root .cassetto dl.dettaglio .riga {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.45rem 0;
}
:root .cassetto dl.dettaglio dt {
  flex: none; margin: 0; font-family: var(--font); font-size: var(--t-mini); font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--text-2);
}
:root .cassetto dl.dettaglio dd {
  min-width: 0; margin: 0; font-size: var(--t-mini); font-weight: 700; color: var(--text); text-align: right; overflow-wrap: anywhere;
}
/* la data scritta in Access quando il rinnovo automatico l'ha superata: sotto, in piccolo */
:root .cassetto dl.dettaglio .dd-nota { display: block; font-size: var(--t-micro); font-weight: 600; color: var(--muted); }
:root .cassetto dl.dettaglio select.pill { min-height: 1.8rem; padding: 0 1.6rem 0 0.6rem; background-color: var(--surface); }
/* al computer i tre gruppi affiancati, alti uguali, l'etichetta piccola sopra il valore (scelta di Biagio, 09/11) */
@media (min-width: 761px) {
  :root .cassetto .cass-gruppi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  :root .cassetto .cass-gruppi > .cass-gruppo { display: flex; flex-direction: column; margin-top: 0; }
  :root .cassetto .cass-gruppi dl.dettaglio { flex: 1; padding: 0.35rem 0.85rem; }
  :root .cassetto .cass-gruppi .cass-gruppo-vuoto { flex: 1; }
  :root .cassetto .cass-gruppi dl.dettaglio .riga { display: block; padding: 0.4rem 0; }
  :root .cassetto .cass-gruppi dl.dettaglio dt { font-size: var(--t-micro); color: var(--muted); }
  :root .cassetto .cass-gruppi dl.dettaglio dd { margin-top: 0.1rem; text-align: left; }
}
/* le note di Access: il loro testo com'è, a capo compresi, nel colore del testo */
:root .cassetto .cass-nota {
  margin: 0; padding: 0.7rem 0.9rem; border-radius: 18px; background: var(--surface-2);
  font-size: var(--t-mini); font-weight: 600; color: var(--text); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}

/* le sezioni: il titolo in chiaro, il comando a destra */
:root .cassetto .corpo h3 {
  margin: 0; font-family: var(--font); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; text-transform: none; color: var(--text);
}
:root .cassetto .cass-sez { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 1.5rem 0 0.6rem; }
:root .cassetto .sez-doc-testa { margin: 1.5rem 0 0.6rem; }
:root .cassetto .sez-doc-genera .pill { background: var(--surface-2); }
:root .cassetto .sez-doc-genera .pill:hover { background: var(--surface-3); }
:root .cassetto .sez-doc-genera .pill svg { color: var(--text-2); }
:root .cassetto .cass-vuoto, :root .cassetto .sez-documenti > p { color: var(--muted); font-size: var(--t-mini); font-weight: 600; }
:root .cassetto .js-chiudi-mappatura { background: var(--accent); color: var(--on-accent); font-weight: 800; }
:root .cassetto .js-chiudi-mappatura:hover { background: var(--accent-hover); color: var(--on-accent); }

/* i mesi: come le righe del foglio del Mese */
:root .cassetto .scheda { margin-bottom: 0.35rem; }
:root .cassetto .scheda .info b { cursor: var(--vrs-cursore-freccia, default); }
:root .cassetto .scheda .info b:hover { text-decoration: none; }

/* i documenti: carte grigie, l'etichetta del tipo in parole normali */
:root .doc-tipo { font-family: var(--font); font-size: var(--t-micro); font-weight: 800; letter-spacing: 0; text-transform: none; }
:root .doc-tipo-testa .conta { font-family: var(--font); letter-spacing: 0; }
:root .doc-lista li { border: 0 !important; border-radius: 16px; background: var(--surface-2); box-shadow: none !important; }
:root .doc-chip { border: 0; font-family: var(--font); border-radius: 999px; }
:root .doc-chip:hover, :root .doc-chip:focus-visible { box-shadow: none; border: 0; }
:root .doc-anteprima { border: 0; border-radius: 18px; box-shadow: var(--bl-ombra-galleggia); }
:root .doc-anteprima span { font-family: var(--font); }

/* le ultime modifiche: righe semplici, l'ora in grigio */
:root .cassetto .storia { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
:root .cassetto .storia li {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 0.75rem; border: 0; border-radius: 14px; background: var(--surface-2);
  font-size: var(--t-mini);
}
:root .cassetto .storia time { flex: none; font-family: var(--font); font-weight: 700; color: var(--muted); }

@media (max-width: 760px) {
  :root .cassetto { top: auto; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; max-height: calc(100dvh - 1rem); }
  :root .cassetto .corpo { padding-inline: 1rem; }
  :root .cassetto header { padding: 1.1rem 1rem 0.5rem; }
  /* sul telefono il nome intero sotto «Condividi…» e la ×: una parola lunga (METALLMANUFAKTUR) non ci stava accanto */
  :root .cassetto header h2, :root .cassetto header:has(.cass-condividi.nativo) h2 { margin: 2.9rem 0 0.15rem; overflow-wrap: anywhere; }
}

/* ========================== STATISTICHE: sei blocchi ========================== */
/* Come il Riepilogo del Planning: una griglia di blocchi alti uguali fino all'isola, ognuno col titolo a sinistra e
   il suo numero grande a destra, nel tono che dice la stessa cosa della home (pesca = in ritardo, bianco col numero
   ciano = da fare, verde = fatto); dentro scorrono le righe, bianche sui blocchi colorati, grigie sui bianchi. */
:root .stat.stat-blocchi {
  max-width: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1rem;
}
:root .stat.stat-blocchi::before { content: none; }
:root .stat.stat-blocchi > .vuoto { grid-column: 1 / -1; grid-row: 1 / -1; align-self: start; border-radius: var(--bl-r-tessera); background: var(--surface); padding: 3rem 1rem; }
:root .sb-blocco {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  border-radius: var(--bl-r-tessera); background: var(--surface);
  animation: sb-entra 300ms var(--ease) backwards;
}
:root .sb-blocco:nth-child(2) { animation-delay: 40ms; } :root .sb-blocco:nth-child(3) { animation-delay: 80ms; }
:root .sb-blocco:nth-child(4) { animation-delay: 120ms; } :root .sb-blocco:nth-child(5) { animation-delay: 160ms; }
:root .sb-blocco:nth-child(6) { animation-delay: 200ms; }
@keyframes sb-entra { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { :root .sb-blocco { animation: none; } }
:root .sb-tardi { background: var(--bl-tono-ritardo); }
:root .sb-chiuse { background: var(--bl-tono-fatto); }
:root .sb-testa { flex: none; display: flex; align-items: baseline; gap: 0.75rem; padding: 1rem 1.25rem 0.6rem; }
:root .sb-titolo { margin: 0; flex: 1; min-width: 0; font: 800 var(--t-grande)/1.2 var(--font); letter-spacing: -0.025em; color: var(--text); }
:root .sb-numero { flex: none; font: 800 2.1rem/1 var(--font); letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
:root .sb-dafare .sb-numero { color: var(--accent); }
:root .sb-corpo {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 3px; padding: 0 0.6rem 0.7rem;
}
:root .sb-corpo::-webkit-scrollbar { display: none; }
:root .sb-corpo[data-altro] { mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent); } /* taste-skill-ignore: la sfumatura che dice «c'è altro», come nei blocchi della home */
:root .sb-niente { margin: 0; padding: 0.2rem 0.65rem; font-size: var(--t-base); color: var(--text-2); }

/* la riga di un sito: il cliente e sotto il sito, a destra i quattro passi e il mese; apre il sito */
:root .sb-riga {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 2.4rem; align-items: center; gap: 0.75rem;
  min-height: 3rem; padding: 0.4rem 0.65rem; border-radius: var(--bl-r-riga); background: var(--surface-2);
  cursor: var(--vrs-cursore-mano, pointer); transition: background-color var(--t-fast) var(--ease);
}
:root :is(.sb-tardi, .sb-chiuse) .sb-riga { background: var(--surface); }
:root .sb-riga:hover { background: var(--surface-3); }
:root :is(.sb-tardi, .sb-chiuse) .sb-riga:hover { background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
:root .sb-riga:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
:root .sb-nome { display: grid; min-width: 0; line-height: 1.3; }
:root .sb-nome b { font-size: var(--t-mini); font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
:root .sb-nome span { font-size: var(--t-micro); font-weight: 600; color: var(--text-2); overflow-wrap: anywhere; }
:root .sb-passi { display: flex; gap: 3px; }
:root .sb-passi i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--surface-3); }
:root :is(.sb-tardi, .sb-chiuse) .sb-passi i { background: var(--bl-campo); }
:root .sb-passi i.fatto { background: var(--completa); }
:root .sb-mese { justify-self: end; font: 700 var(--t-micro)/1 var(--font); color: var(--text-2); }

/* le barre (province, chi spunta) e i quattro passi: l'etichetta e il valore sopra, la barra sotto */
:root .sb-barre, :root .sb-righe-passi { display: grid; gap: 3px; }
:root .sb-barra, :root .sb-passo {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.35rem 0.75rem;
  padding: 0.5rem 0.65rem; border-radius: var(--bl-r-riga);
}
:root .sb-barra:hover { background: var(--surface-2); }
:root .sb-passo { background: var(--surface); }
:root :is(.sb-barra-et, .sb-passo-et) { min-width: 0; font-size: var(--t-mini); font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
:root :is(.sb-barra-val, .sb-passo-val) { font: 800 var(--t-mini)/1 var(--font); color: var(--text); }
:root .sb-pista { grid-column: 1 / -1; position: relative; height: 0.4rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
:root .sb-chiuse .sb-pista { background: var(--bl-campo); }
:root .sb-pista > i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--t, var(--text-2)); }
:root .sb-pista > i > b { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--completa); }
:root .sb-barre .sb-pista > i { background: var(--border-strong); }
:root .sb-dato-riga {
  display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.35rem; padding: 0.6rem 0.65rem;
  border-radius: var(--bl-r-riga); background: var(--surface); font-size: var(--t-mini); font-weight: 700; color: var(--text);
}
:root .sb-dato-riga b { font-weight: 800; }
:root .sb-frase { margin: 0.5rem 0.65rem 0; font-size: var(--t-mini); font-weight: 600; line-height: 1.45; color: var(--text); }

/* mese per mese: dodici colonne alte quanto le mappature che scadono, il verde = le chiuse */
:root .sb-mesi-blocco { grid-column: span 1; }
:root .sb-mesi { flex: 1 1 auto; min-height: 9rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.3rem; padding: 0.4rem 0.4rem 0; }
:root .sb-mese-col { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 0.3rem; min-width: 0; }
:root .sb-mese-n { font: 700 0.6875rem/1 var(--font); color: var(--text-2); white-space: nowrap; }
:root .sb-mese-pista {
  align-self: end; position: relative; width: 100%; max-width: 1.6rem; height: var(--h); min-height: 0;
  border-radius: 8px; background: var(--surface-3); overflow: hidden;
}
:root .sb-mese-pista > i { position: absolute; inset: auto 0 0 0; height: var(--h); background: var(--completa); }
:root .sb-mese-col.arretrato .sb-mese-pista { background: var(--bl-tono-ritardo); }
:root .sb-mese-et { font: 700 var(--t-micro)/1 var(--font); color: var(--text-2); }
:root .sb-mese-col.oggi .sb-mese-et { color: var(--accent); font-weight: 800; }

/* il suggerimento (uno per tutta la vista): una pillola scura che galleggia */
:root .stat-tip { border-radius: 10px; padding: 0.45rem 0.65rem; font-family: var(--font); font-weight: 600; box-shadow: var(--bl-ombra-galleggia); } /* taste-skill-ignore: il suggerimento galleggia */

@media (min-width: 1024px) {
  :root .area:has(> .stat-blocchi) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--isola-sotto); }
  :root .area > .stat-blocchi { flex: 1 1 auto; min-height: 0; }
}
/* tablet: due colonne, scorre la pagina; telefono: i blocchi uno alla volta, da sfogliare di lato, alti fino alla barra */
@media (max-width: 1023px) {
  :root .stat.stat-blocchi { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 26rem; }
}
@media (max-width: 760px) {
  :root .area:has(> .stat-blocchi) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--isola-sotto); }
  :root .stat.stat-blocchi {
    flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: none; grid-template-rows: minmax(0, 1fr);
    grid-auto-flow: column; grid-auto-columns: 88%; grid-auto-rows: auto; gap: 0.6rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  :root .stat.stat-blocchi::-webkit-scrollbar { display: none; }
  :root .sb-blocco { scroll-snap-align: start; }
}

/* ============== Anno e Mese: il blocco alto fino all'isola, che scorre dentro ============== */
/* Come le pagine del Planning: al computer la pagina non scorre e non ha la barra; scorre il blocco bianco
   sotto il mouse (la testata dei mesi e il nome del cliente restano fermi in cima a lui) e, quando sotto c'è
   altro, il suo fondo sfuma (`data-altro`, lo mette app.ts). Sul telefono scorre la pagina come prima. */
@media (min-width: 1024px) {
  :root .area:has(> .crono, > .lavoro) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--isola-sotto); }
  :root .area > :is(.crono, .lavoro) {
    flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  :root .area > :is(.crono, .lavoro)::-webkit-scrollbar { display: none; }
  :root .area > :is(.mese-testa, .stampa-testa) { flex: none; }
  :root .area > :is(.crono, .lavoro)[data-altro] {
    mask-image: linear-gradient(to bottom, #000 calc(100% - 3.5rem), transparent); /* taste-skill-ignore: la sfumatura che dice «c'è altro», come nei blocchi della home */
  }
}

} /* fine @media screen */
