/* =====================================================================
   CDL Calabria Centrale — stile del sito
   Colori dei report Excel (navy 1F3864, EBT 2F5597, 1,20% C65911) su una grafica pulita:
   fondo chiaro, schede bianche arrotondate, caratteri grandi, movimenti morbidi.
   ===================================================================== */
:root {
  --bg: #F5F5F7; --card: #FFFFFF; --ink: #1D1D1F; --muted: #6E6E73; --line: #E5E5EA; --line-2: #D2D2D7;
  --navy: #1F3864; --navy-2: #2C4F8C; --navy-scuro: #0E1B36;
  --ebt: #2F5597; --u120: #C65911; --ebt-testo: #1F4E79; --u120-testo: #C55A11;
  --ebt-fondo: #E3EEFA; --u120-fondo: #FCE9DC; --pagato: #E8F4E2;
  --np-fondo: #FBE3E5; --np-testo: #9C0006;
  --verde: #E2EFDA; --giallo: #FFF4C2; --rosso: #F8D7DA;
  --raggio: 18px; --raggio-s: 12px;
  --ombra: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(16,24,40,.06);
  --ombra-forte: 0 12px 40px rgba(16,24,40,.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-titoli: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
       -webkit-font-smoothing: antialiased; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1480px; margin: 0 auto; padding: 28px 28px 64px; animation: entra .45s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- barra in alto (vetro) */
.barra { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.78);
         backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
         border-bottom: 1px solid rgba(0,0,0,.07); }
.barra-dentro { max-width: 1480px; margin: 0 auto; padding: 8px 28px; display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo-slot { flex: 0 0 auto; height: 46px; display: flex; align-items: center; }
.logo-slot img { max-height: 46px; max-width: 150px; display: block; }
.logo-segnaposto { display: flex; align-items: center; justify-content: center; text-align: center; height: 44px; padding: 0 12px;
                   border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff;
                   font-size: 10.5px; font-weight: 600; line-height: 1.15; letter-spacing: .2px; }
.marchio { display: flex; flex-direction: column; line-height: 1.1; margin-right: 6px; }
.marchio b { font-family: var(--font-titoli); font-size: 15px; color: var(--navy); letter-spacing: -.2px; }
.marchio span { font-size: 11px; color: var(--muted); }
.menu { flex: 1; display: flex; gap: 2px; justify-content: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { color: var(--ink); padding: 7px 13px; border-radius: 980px; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s; }
.menu a:hover { background: rgba(31,56,100,.07); text-decoration: none; }
.menu a.attivo { background: var(--navy); color: #fff; }
.utente-box { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff;
          display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.avatar { position: relative; flex: 0 0 auto; }
.avatar.con-foto { width: 40px; height: 40px; background: linear-gradient(160deg, #E3EBF7, #C9D8EF); overflow: visible; }
.avatar.con-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 50%; }
.avatar .online, .ritratto .online { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
                                     background: #34C759; box-shadow: 0 0 0 2px #fff; }
.benvenuto-chi { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.ritratto { position: relative; flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%;
            background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.35), rgba(255,255,255,.08) 70%);
            box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.ritratto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 50%; }
.ritratto .online { width: 16px; height: 16px; right: 4px; bottom: 4px; box-shadow: 0 0 0 3px var(--navy); }
.utente-box .chi { display: flex; flex-direction: column; line-height: 1.1; font-size: 12px; margin-right: 4px; }
.utente-box .chi small { color: var(--muted); }
.utente-box a, .utente-box .link { font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer; font-family: inherit; padding: 4px 6px; }
.utente-box a:hover, .utente-box .link:hover { color: var(--navy); text-decoration: none; }
.spazio { flex: 1; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- titoli delle pagine */
.fascia-titolo { margin: 4px 0 22px; }
.fascia-titolo h1 { margin: 0; font-family: var(--font-titoli); font-size: 34px; font-weight: 700; letter-spacing: -.6px; color: var(--ink); }
.fascia-titolo .sotto { font-size: 14.5px; color: var(--muted); margin-top: 4px; max-width: 1000px; }
h2.sezione { font-family: var(--font-titoli); color: var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.3px; margin: 34px 0 12px; }
.nota { font-size: 12.5px; color: var(--muted); }
.avviso { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--raggio-s); background: #fff; box-shadow: var(--ombra);
          border-left: 4px solid var(--navy); animation: entra .3s ease both; }
.avviso.errore { border-color: var(--np-testo); background: var(--np-fondo); color: var(--np-testo); }
.avviso.ok { border-color: #34A853; }

/* ---------------------------------------------------------------- tasti */
.tasto { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; border: 0;
         border-radius: 980px; padding: 9px 18px; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
         font-family: inherit; text-align: center; transition: transform .15s, background .2s, box-shadow .2s; }
.tasto:hover { background: var(--navy-2); text-decoration: none; box-shadow: 0 6px 16px rgba(31,56,100,.25); transform: translateY(-1px); }
.tasto:active { transform: translateY(0) scale(.98); }
.tasto.piccolo { padding: 6px 14px; font-size: 13px; }
.tasto.chiaro { background: rgba(31,56,100,.08); color: var(--navy); }
.tasto.chiaro:hover { background: rgba(31,56,100,.14); box-shadow: none; }
.tasto.spento { background: #ECECF0; color: #A1A1A6; cursor: default; box-shadow: none; transform: none; }
.tasto.spento.vietato { cursor: not-allowed; }
.tasto.rosso { background: var(--np-testo); }
.tasto[disabled] { opacity: .45; cursor: default; transform: none; box-shadow: none; }

/* ---------------------------------------------------------------- login */
.login-pagina { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-lato { position: relative; overflow: hidden; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
              background: radial-gradient(1200px 600px at 20% 10%, #33589B 0%, var(--navy) 45%, var(--navy-scuro) 100%); }
.login-lato h1 { font-family: var(--font-titoli); font-size: 46px; line-height: 1.05; letter-spacing: -1px; margin: 0 0 12px; }
.login-lato p { font-size: 17px; color: rgba(255,255,255,.75); max-width: 460px; margin: 0; }
.login-loghi { display: flex; gap: 18px; }
.login-loghi .moneta-statica { width: 150px; height: 130px; border-radius: 24px; background: #fff; display: flex; align-items: center; justify-content: center;
                               box-shadow: 0 18px 40px rgba(0,0,0,.25); padding: 12px; }
.login-loghi img { max-width: 100%; max-height: 100%; }
.login-loghi .logo-segnaposto { width: 96px; height: 96px; border-radius: 24px; font-size: 12px; background: rgba(255,255,255,.12); }
.login-lato .bolla { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.login-modulo { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.riquadro-login { width: 100%; max-width: 400px; background: var(--card); border-radius: 22px; box-shadow: var(--ombra-forte); padding: 36px 34px; }
.riquadro-login h1 { font-family: var(--font-titoli); color: var(--ink); margin: 0 0 6px; font-size: 28px; letter-spacing: -.4px; }
.riquadro-login .sotto { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.riquadro-login label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.riquadro-login input, .modulo > label input:not([type=checkbox]), .modulo select, .criteri select, .campo-cerca, .periodo select, .tab-cerca {
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; transition: border-color .2s, box-shadow .2s; outline: none; }
.riquadro-login input { display: block; width: 100%; margin-top: 5px; }
.riquadro-login input:focus, .modulo input:focus, .modulo select:focus, .criteri select:focus, .campo-cerca:focus, .periodo select:focus, .tab-cerca:focus {
  border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(44,79,140,.14); }
.riquadro-login .tasto { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
main .riquadro-login { margin: 30px auto; }

/* ---------------------------------------------------------------- pannello */
.benvenuto { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: 22px; margin-bottom: 22px; }
.benvenuto-testo { background: radial-gradient(900px 400px at 0% 0%, #34599C 0%, var(--navy) 55%, var(--navy-scuro) 100%); color: #fff;
                   border-radius: 24px; padding: 34px 36px; box-shadow: var(--ombra); position: relative; overflow: hidden; min-height: 250px;
                   display: flex; flex-direction: column; justify-content: center; }
.benvenuto-testo h1 { font-family: var(--font-titoli); font-size: 40px; letter-spacing: -1px; margin: 0; line-height: 1.05; }
.benvenuto-testo .data { font-size: 15px; color: rgba(255,255,255,.7); margin-top: 8px; }
.benvenuto-testo .fonte { font-size: 12.5px; color: rgba(255,255,255,.6); }
.benvenuto-testo::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
                          background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.carosello { position: relative; border-radius: 24px; overflow: hidden; background: #0E1B36; box-shadow: var(--ombra); min-height: 250px; }
.carosello .foto { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: 0; transform: scale(1.06);
                   transition: opacity 1.4s ease, transform 7s ease-out; }
.carosello .foto.visibile { opacity: 1; transform: scale(1); }
.carosello .didascalia { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; color: #fff;
                         background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.carosello .didascalia b { display: block; font-size: 17px; }
.carosello .didascalia span { font-size: 13px; color: rgba(255,255,255,.8); }
.carosello .punti { position: absolute; right: 16px; bottom: 18px; display: flex; gap: 6px; }
.carosello .punti i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); transition: background .3s, width .3s; }
.carosello .punti i.on { background: #fff; width: 18px; border-radius: 4px; }
.carosello.vuoto { display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(255,255,255,.7); padding: 24px; font-size: 13.5px;
                   background: linear-gradient(135deg, #24365E, #0E1B36); }

.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi-box { background: var(--card); border-radius: var(--raggio); padding: 18px 20px; box-shadow: var(--ombra); position: relative; overflow: hidden;
           transition: transform .2s, box-shadow .2s; }
.kpi-box:hover { transform: translateY(-2px); box-shadow: var(--ombra-forte); }
.kpi-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy); }
.kpi-box.ebt::before { background: var(--ebt); }
.kpi-box.u120::before { background: var(--u120); }
.kpi-val { font-family: var(--font-titoli); font-size: 30px; font-weight: 700; letter-spacing: -.8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-box.ebt .kpi-val { color: var(--ebt-testo); }
.kpi-box.u120 .kpi-val { color: var(--u120-testo); }
.kpi-et { font-size: 13px; color: var(--muted); margin-top: 2px; }

.gruppi { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 22px; }
/* ogni gruppo ha il suo tono: --tono (testo e punto), --tenue (fondo del tasto), --tenue-2 (fondo al passaggio del mouse) */
.gruppo { --tono: #1F3864; --tenue: #E4ECF8; --tenue-2: #D2DFF2;
          background: linear-gradient(180deg, color-mix(in srgb, var(--tenue) 45%, #fff) 0, #fff 120px);
          border-radius: 22px; box-shadow: var(--ombra); padding: 8px 8px 10px; transition: box-shadow .25s;
          border-top: 3px solid var(--tenue-2); }
.gruppo.tono-0 { --tono: #1F3864; --tenue: #E3EBF7; --tenue-2: #CFDCF0; }   /* consulenti del lavoro: navy */
.gruppo.tono-1 { --tono: #1D5E73; --tenue: #DFF0F3; --tenue-2: #C8E4EA; }   /* aziende: petrolio */
.gruppo.tono-2 { --tono: #3A4A8C; --tenue: #E5E8F7; --tenue-2: #D2D7F0; }   /* pagamenti: indaco */
.gruppo.tono-3 { --tono: #285E8E; --tenue: #E1EEF9; --tenue-2: #CBE0F3; }   /* report: azzurro */
.gruppo.tono-4 { --tono: #57468A; --tenue: #ECE7F7; --tenue-2: #DDD4F0; }   /* report Katia: lavanda */
.gruppo.tono-5 { --tono: #44546A; --tenue: #E8ECF1; --tenue-2: #D7DEE7; }   /* strumenti: ardesia */
.gruppo.tono-6 { --tono: #2E6A50; --tenue: #E2F2E8; --tenue-2: #CBE7D6; }   /* fatturazione: salvia */
.gruppo.tono-7 { --tono: #7A5A2C; --tenue: #F6EEDF; --tenue-2: #EDDFC4; }   /* consulenti e gettito: sabbia */
.gruppo.tono-8 { --tono: #6E4065; --tenue: #F4E7F0; --tenue-2: #EAD3E3; }   /* analisi dati: malva */
.gruppo.tono-9 { --tono: #14284B; --tenue: #E4E8F1; --tenue-2: #C9D1E3; }   /* amministratore: blu notte */
.gruppo:hover { box-shadow: var(--ombra-forte); }
.gruppo h2 { margin: 0; padding: 14px 14px 10px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; color: var(--tono); text-transform: uppercase;
             display: flex; align-items: center; gap: 8px; }
.gruppo h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tono); }
.gruppo.mio { box-shadow: 0 0 0 2px var(--tono), var(--ombra); }
.gruppo.non-abilitato { border-top-color: #E5E5EA; background: #fff; }
.gruppo.non-abilitato h2 { color: #A1A1A6; }
.gruppo.non-abilitato h2::before { background: #C7C7CC; }
.etichetta-mio { margin-left: auto; background: var(--tenue); color: var(--tono); font-size: 10.5px; padding: 3px 9px; border-radius: 980px;
                 letter-spacing: .3px; text-transform: none; font-weight: 600; }
.gruppo.non-abilitato .etichetta-mio { background: #F2F2F5; color: #8E8E93; }
.tasto-riga { display: flex; gap: 16px; align-items: center; padding: 7px 10px; border-radius: 16px; transition: background .2s; }
.tasto-riga:hover { background: color-mix(in srgb, var(--tenue) 40%, transparent); }
/* tasti del Pannello: tutti della stessa misura, titolo sopra e (dettaglio) sotto */
.tasto.grande { flex: 0 0 236px; height: 58px; padding: 0 16px; border-radius: 16px; flex-direction: column; gap: 1px;
                background: var(--tenue); color: var(--tono); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tono) 10%, transparent); }
.tasto.grande .t1 { font-size: 14.5px; font-weight: 650; letter-spacing: -.1px; line-height: 1.15; }
.tasto.grande .t2 { font-size: 11.5px; font-weight: 500; opacity: .72; line-height: 1.1; }
.tasto.grande:hover { background: var(--tono); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--tono) 30%, transparent); }
.tasto.grande.spento { background: #F2F2F5; color: #AEAEB2; box-shadow: none; }
.tasto.grande.spento:hover { background: #F2F2F5; color: #AEAEB2; }
.tasto-descr { font-size: 13px; color: var(--muted); line-height: 1.4; }
.fase { display: inline-block; font-size: 10.5px; color: #8E8E93; background: #F2F2F5; border-radius: 980px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }

/* ---------------------------------------------------------------- schede */
.periodo { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; background: var(--card); padding: 12px 16px;
           border-radius: var(--raggio); box-shadow: var(--ombra); font-size: 14px; font-weight: 600; color: var(--ink); }
.periodo label { display: flex; align-items: center; gap: 8px; }
.periodo select { padding: 6px 10px; font-weight: 500; }
.periodo .scelta-cons { min-width: 300px; }
.periodo .nota { font-weight: 400; }
.dati-due { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 10px 22px; }
.coppia { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.dati-due > div > .coppia:last-child { border-bottom: 0; }
.coppia .et { flex: 0 0 220px; font-size: 12.5px; color: var(--muted); }
.coppia .val { flex: 1; white-space: pre-wrap; font-size: 14.5px; }
.coppia.largo { background: var(--card); border-radius: var(--raggio-s); box-shadow: var(--ombra); padding: 12px 22px; margin-top: 10px; border: 0; }
.val.doppio { display: flex; gap: 8px; }
.val.doppio span { flex: 1; font-weight: 600; padding: 2px 10px; border-radius: 8px; }
.riquadri { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.riq { background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 18px; text-align: center; }
.riq-val { font-family: var(--font-titoli); font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.riq-et { font-size: 12.5px; color: var(--muted); }
.riepilogo-import { background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 18px 20px; font-family: "Cascadia Mono", Consolas, monospace;
                    font-size: 12.5px; white-space: pre-wrap; line-height: 1.6; }

.conv-verde { background: var(--verde); }
.conv-giallo { background: var(--giallo); }
.conv-rosso { background: var(--rosso); }
.conv-arancione { background: #FBD9BF; }
.esito-ok { color: #2E7D32; }
.esito-ko { color: var(--np-testo); font-weight: 600; }
.esito-att { color: #8A6100; }

/* ---------------------------------------------------------------- tabelle */
.tab-contenitore { background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 14px; }
.tab-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.tab-cerca { width: 340px; max-width: 100%; padding-left: 36px;
             background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236E6E73' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 12px center; }
.tab-conta { font-size: 13px; color: var(--muted); }
.tab-scroll { overflow: auto; max-height: calc(100vh - 250px); border-radius: var(--raggio-s); border: 1px solid var(--line); }
table.tab { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13.5px; }
table.tab th { position: sticky; top: 0; z-index: 2; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; text-align: left;
               padding: 10px 8px 10px 12px; vertical-align: middle; white-space: nowrap; letter-spacing: .1px; }
table.tab th.num { text-align: right; }
table.tab th.int-ebt { background: var(--ebt); }
table.tab th.int-u120 { background: var(--u120); }
table.tab th.filtrato { box-shadow: inset 0 -3px 0 #FFC000; }
table.tab th .th-et { cursor: pointer; }
table.tab th.ord-su .th-et::after { content: " ▲"; font-size: 9px; }
table.tab th.ord-giu .th-et::after { content: " ▼"; font-size: 9px; }
.th-filtro { margin-left: 6px; background: rgba(255,255,255,.16); border: 0; color: #fff; font-size: 10px; line-height: 1; padding: 3px 5px; cursor: pointer; border-radius: 5px; transition: background .2s; }
.th-filtro:hover { background: rgba(255,255,255,.32); }
table.tab td { border-bottom: 1px solid var(--line); padding: 7px 12px; white-space: nowrap; }
table.tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tab td.c { text-align: center; }
table.tab td.largo { white-space: normal; min-width: 360px; max-width: 720px; }
table.tab tr.cliccabile { cursor: pointer; }
table.tab tbody tr { transition: background .12s; }
table.tab tbody tr:hover td { background-color: #F2F5FB; }
table.tab tr.r-ebt td { color: var(--ebt-testo); }
table.tab tr.r-u120 td { color: var(--u120-testo); }
table.tab td.pagato { background: var(--pagato); }
table.tab td.pag-ebt { background: var(--ebt-fondo); color: var(--ebt-testo); }
table.tab td.pag-u120 { background: var(--u120-fondo); color: var(--u120-testo); }
table.tab td.np { background: var(--np-fondo) !important; color: var(--np-testo) !important; text-align: center; font-weight: 600; }
table.tab tfoot td { position: sticky; bottom: 0; background: #EEF2F8; color: var(--navy); font-weight: 700; border-top: 2px solid var(--navy); padding: 9px 12px; }
table.tab.semplice { width: 100%; background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); overflow: hidden; }
table.tab.semplice th { position: static; }
table.riepilogo { width: auto; }
.badge { display: inline-block; min-width: 52px; padding: 2px 8px; border-radius: 980px; color: #fff; font-weight: 700; font-size: 11.5px; text-align: center; letter-spacing: .2px; }
.badge.ebt { background: var(--ebt); }
.badge.u120 { background: var(--u120); }
.tab-altre { margin-top: 10px; }

.filtro-pop { position: absolute; z-index: 60; width: 300px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px);
              border-radius: 14px; box-shadow: var(--ombra-forte); border: 1px solid var(--line); padding: 10px; font-size: 13.5px; animation: entra .15s ease both; }
.fp-ord { display: flex; flex-direction: column; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.fp-ord button { background: none; border: 0; text-align: left; padding: 6px 8px; cursor: pointer; font-family: inherit; font-size: 13.5px; color: var(--navy); border-radius: 8px; }
.fp-ord button:hover { background: #F2F5FB; }
.fp-cerca { width: 100%; padding: 7px 10px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: 9px; font-family: inherit; outline: none; }
.fp-tutti { display: block; font-weight: 600; padding: 3px 2px; }
.fp-lista { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 6px; margin: 6px 0 10px; }
.fp-lista label { display: block; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-n { color: var(--muted); font-size: 11px; }
.fp-bottoni { display: flex; gap: 8px; justify-content: flex-end; }

/* classi di riga e di cella dei report */
table.tab tr.conv-verde td { background: var(--verde); }
table.tab tr.conv-giallo td { background: var(--giallo); }
table.tab tr.conv-rosso td { background: var(--rosso); }
table.tab tr.liv-1 td, table.tab td.liv-1 { background: #FFF4C2; }
table.tab tr.liv-2 td, table.tab td.liv-2 { background: #FBD9BF; }
table.tab tr.liv-3 td, table.tab td.liv-3 { background: #F8D7DA; }
table.tab tr.tot td { font-weight: 700; background: #EEF2F8; color: var(--navy) !important; }
table.tab td.liv-critica { background: #FFCDD2; color: #C62828 !important; font-weight: 700; }
table.tab td.liv-allerta { background: #FFE0B2; color: #C85A00 !important; font-weight: 700; }
table.tab td.liv-attenzione { background: #FFF9C4; color: #826E00 !important; }
table.tab td.testo-arancio { color: #E67800 !important; }
table.tab tr.senza-recapiti td { background: #FCE4CC; }
table.tab tr.testo-rosso-riga td { color: #C00000 !important; }
table.tab tr.riga-ini td { background: #F3F6FA; color: var(--muted) !important; font-style: italic; }
table.tab tr.riga-fatt td { background: #FFF4E5; font-style: italic; }
table.tab tr.riga-anno td { background: var(--navy); color: #fff !important; font-weight: 700; }
table.tab tr.riga-totanno td { background: #E8EEF7; color: var(--navy) !important; font-weight: 700; }
table.tab td.att-tutte { background: #C6E0B4; }
table.tab td.att-parte { background: #E2EFDA; }
table.tab tr.conv-arancione td { background: #FBD9BF; }
table.tab tr.soft td, table.tab td.soft { background: #F3F6FA; }
table.tab td.testo-rosso { color: #C00000 !important; font-weight: 600; }
table.tab td.testo-verde { color: #2E7D32 !important; }
table.tab td.testo-grigio { color: var(--muted) !important; }
table.tab td.grassetto { font-weight: 700; }
table.tab td.conv-verde { background: var(--verde); }
table.tab td.conv-giallo { background: var(--giallo); }
table.tab td.conv-rosso { background: var(--rosso); }

/* grafici */
.grafico { position: relative; background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 16px 18px 8px; margin-bottom: 18px; }
.grafico-titolo { font-weight: 650; color: var(--ink); font-size: 15px; }
.grafico-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; }
.grafico-legenda i, .grafico-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.grafico-tip { display: none; position: absolute; pointer-events: none; background: rgba(29,29,31,.92); color: #fff; font-size: 12.5px;
               padding: 8px 10px; border-radius: 10px; line-height: 1.5; z-index: 5; min-width: 160px; }

/* pagina di un report */
.report-fogli { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.report-fogli button { border: 0; background: rgba(31,56,100,.08); color: var(--navy); border-radius: 980px; padding: 8px 16px;
                       font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; }
.report-fogli button.on { background: var(--navy); color: #fff; }
.report-foglio { display: none; }
.report-foglio.on { display: block; animation: entra .3s ease both; }
.report-fascia { background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 16px 22px; margin: 0 0 16px;
                 font-family: var(--font-titoli); font-size: 19px; font-weight: 650; color: var(--navy); letter-spacing: -.2px; border-left: 5px solid var(--navy); }
.report-blocco { margin-bottom: 18px; }

/* ---------------------------------------------------------------- moduli */
.criteri { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; background: var(--card); padding: 18px 20px;
           border-radius: var(--raggio); box-shadow: var(--ombra); margin-bottom: 20px; }
.criteri label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); gap: 5px; font-weight: 500; }
.criteri-fondo { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding-top: 4px; }
.conteggio { font-family: var(--font-titoli); font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
.modulo { max-width: 680px; margin-bottom: 20px; background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 22px 24px; }
.modulo > label, .modulo fieldset { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.modulo > label input:not([type=checkbox]), .modulo select { display: block; width: 100%; margin-top: 5px; }
.campo-password { position: relative; display: block; }
.campo-password input { padding-right: 96px; }
.mostra-pw { position: absolute; right: 6px; bottom: 5px; border: 0; border-radius: 980px; padding: 5px 12px; cursor: pointer;
             background: rgba(31,56,100,.08); color: var(--navy); font: 600 12px var(--font); }
.mostra-pw:hover { background: rgba(31,56,100,.16); }
.modulo fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.modulo legend { color: var(--navy); font-weight: 700; padding: 0 6px; }
label.spunta { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 3px 0; font-size: 14px; font-weight: 400; }
input[type=checkbox] { accent-color: var(--navy); width: 16px; height: 16px; }
.bottoni { display: flex; gap: 10px; }

/* ---------------------------------------------------------------- schede di modifica */
.fascia-modo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--navy), var(--navy-2));
               color: #fff; border-radius: var(--raggio); padding: 16px 22px; margin-bottom: 20px; box-shadow: var(--ombra); }
.fascia-modo.nuovo { background: linear-gradient(135deg, #2E7D32, #43A047); }
.fascia-modo span { font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 980px; }
.fascia-modo b { font-family: var(--font-titoli); font-size: 22px; letter-spacing: -.3px; flex: 1; }
.fascia-modo a { color: rgba(255,255,255,.85); font-size: 13.5px; }
.scheda-sezione { background: var(--card); border-radius: var(--raggio); box-shadow: var(--ombra); padding: 16px 22px 18px; margin-bottom: 16px; }
.scheda-sezione h2 { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--navy); }
.campi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 18px; }
.campi label, .fonte-modifica label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.campi label.largo, .fonte-modifica label { grid-column: 1 / -1; }
.campi input, .campi select, .campi textarea, .fonte-modifica input {
  font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
.campi textarea { resize: vertical; }
.campi input:focus, .campi select:focus, .campi textarea:focus, .fonte-modifica input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(44,79,140,.14); }
.fonte-modifica { border: 2px dashed rgba(31,56,100,.25); box-shadow: none; background: #FAFBFD; }
label.spunta.avviso { margin: 0 0 14px; }
.barra-salva { position: sticky; bottom: 14px; z-index: 30; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
               background: rgba(255,255,255,.86); backdrop-filter: blur(16px); border-radius: 980px; padding: 10px 12px 10px 20px;
               box-shadow: var(--ombra-forte); margin-top: 10px; }
.barra-salva .nota { margin-right: auto; }

/* ---------------------------------------------------------------- apertura: loghi in 3D */
.intro { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
         background: radial-gradient(1000px 700px at 50% 35%, #34599C 0%, var(--navy) 45%, #070F22 100%); color: #fff;
         transition: opacity .7s ease, visibility .7s; perspective: 1100px; }
.intro.via { opacity: 0; visibility: hidden; }
.intro-loghi { display: flex; gap: 64px; transform-style: preserve-3d; }
.moneta { width: 170px; height: 170px; border-radius: 40px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 22px;
          box-shadow: 0 30px 60px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.6); transform-style: preserve-3d; will-change: transform; }
.moneta img { max-width: 100%; max-height: 100%; backface-visibility: visible; }
.moneta .logo-segnaposto { width: 100%; height: 100%; border-radius: 28px; font-size: 15px; }
.intro-loghi .moneta:nth-child(1) { animation: gira 1.8s cubic-bezier(.2,.7,.2,1) both; }
.intro-loghi .moneta:nth-child(2) { animation: gira 1.8s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes gira {
  0%   { transform: translateZ(-500px) rotateY(-540deg) rotateX(18deg); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateZ(0) rotateY(0) rotateX(0); opacity: 1; }
}
.intro-titolo { text-align: center; animation: entra .8s .6s ease both; }
.intro-titolo b { display: block; font-family: var(--font-titoli); font-size: 38px; letter-spacing: -1px; }
.intro-titolo span { color: rgba(255,255,255,.7); font-size: 15px; }
.intro-salta { position: absolute; right: 26px; bottom: 24px; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 980px;
               padding: 8px 16px; font-family: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(10px); }
.intro-salta:hover { background: rgba(255,255,255,.24); }
.in-volo { position: fixed !important; z-index: 1001; margin: 0 !important; animation: none !important; }
body.con-intro .logo-slot { opacity: 0; }
body.con-intro .logo-slot.arrivato { opacity: 1; transition: opacity .3s; }

/* ---------------------------------------------------------------- filigrane ai lati */
.filigrana { position: fixed; top: 64px; bottom: 0; z-index: 0; pointer-events: none; display: none;
             width: max(220px, calc((100vw - 1480px) / 2 + 60px));
             background-repeat: no-repeat; background-size: 86% auto; opacity: .09; filter: saturate(.7); }
.filigrana.sx { left: 0; background-position: 40% 48%; }
.filigrana.dx { right: 0; background-position: 60% 48%; }
main { position: relative; z-index: 1; }
@media (min-width: 1500px) { .filigrana { display: block; } }
@media print { .filigrana { display: none !important; } }

/* ---------------------------------------------------------------- telefono e stampa */
@media (max-width: 1100px) {
  .benvenuto { grid-template-columns: 1fr; }
  .marchio { display: none; }
}
@media (max-width: 820px) {
  main { padding: 18px 16px 48px; }
  .barra-dentro { flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
  .menu { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .utente-box .chi { display: none; }
  .logo-slot { height: 36px; }
  .logo-slot img { max-height: 36px; max-width: 110px; }
  .fascia-titolo h1 { font-size: 27px; }
  .benvenuto-testo h1 { font-size: 30px; }
  .carosello.vuoto { min-height: 110px; }
  .dati-due { grid-template-columns: 1fr; }
  .gruppi { grid-template-columns: 1fr; }
  .tasto-riga { flex-direction: column; align-items: stretch; }
  .tasto-riga .tasto, .tasto.grande { flex-basis: auto; width: 100%; }
  .coppia .et { flex-basis: 130px; }
  .login-pagina { grid-template-columns: 1fr; }
  .login-lato { padding: 32px 24px; min-height: 260px; }
  .login-lato h1 { font-size: 32px; }
  .moneta { width: 110px; height: 110px; border-radius: 28px; padding: 14px; }
  .intro-loghi { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .barra, .periodo, .tab-barra, .tab-altre, .th-filtro, .intro { display: none !important; }
  body { background: #fff; font-size: 11px; }
  .tab-scroll { max-height: none; overflow: visible; border: 0; }
  .tab-contenitore, .dati-due, .riq, .kpi-box, .gruppo { box-shadow: none; }
}

/* ---------------------------------------------------------------- scheda consulente: hanno smesso di versare */
.smesso-sintesi { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 14px; }
.smesso-sintesi .et { font-size: 12px; color: var(--muted); margin-right: 8px; }
.chip { display: inline-block; background: var(--card); box-shadow: var(--ombra); border-radius: 980px; padding: 4px 12px; margin: 2px 4px 2px 0;
        font-size: 13px; color: var(--ink); }
.chip b { color: var(--navy); }
table.tab tr.riga-anno td { background: #EEF3FA; color: var(--navy); font-weight: 700; font-size: 12px; letter-spacing: .3px; padding-top: 8px; padding-bottom: 8px; }
table.tab tbody tr.riga-anno:hover td { background: #EEF3FA; }
h3.sotto-sezione { font-size: 15px; color: var(--ink); margin: 22px 0 8px; }
.chip.chip-rif { background: var(--navy); color: #fff; }
.chip.chip-rif b { color: #fff; }

/* ---------------------------------------------------------------- mailing list */
.gruppi-mail { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 8px; }
textarea.elenco-mail { width: 100%; font: 12.5px/1.5 ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--ink); resize: vertical; }

/* ---------------------------------------------------------------- cose da sistemare */
.filtro-lista { display: flex; gap: 8px; margin: 0 0 18px; }
.lista-sezione { background: var(--card); border-radius: 22px; box-shadow: var(--ombra); padding: 18px 22px 10px; margin-bottom: 18px; }
.lista-sezione h2 { margin: 0 0 8px; font-size: 16px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.lista-sezione h2 .conta { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.barra-avanzamento { height: 5px; background: #EEF1F6; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.barra-avanzamento i { display: block; height: 100%; background: #34A853; border-radius: 4px; transition: width .4s; }
form.voce { display: flex; gap: 12px; align-items: flex-start; padding: 9px 4px; border-top: 1px solid var(--line); }
form.voce:first-of-type { border-top: 0; }
.casella { flex: 0 0 22px; height: 22px; border-radius: 7px; border: 2px solid #C7CCD6; background: #fff; cursor: pointer; color: #fff;
           font-weight: 800; font-size: 13px; line-height: 1; margin-top: 1px; transition: background .2s, border-color .2s; }
.casella:hover { border-color: var(--navy); }
form.voce.fatta .casella { background: #34A853; border-color: #34A853; }
form.voce.fatta .voce-testo { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
form.voce.urgente { background: linear-gradient(90deg, #FFF7E0, transparent 60%); border-radius: 10px; }
.voce-testo { font-size: 14px; line-height: 1.45; color: var(--ink); }
.voce-testo ul { margin: 4px 0 0 18px; padding: 0; color: var(--muted); font-size: 13px; }
.voce-testo code { font-size: 12px; background: #F2F4F8; padding: 1px 5px; border-radius: 5px; }
.stella { color: #D99A00; }
