/* =====================================================================
   ENOVA CTE — stessa famiglia visiva di ENOVA FISCALE / APT / LEGALE
   (variabili, filigrana, barra alta, menu a pillole, schede, KPI, finestre, istruzioni)
   ===================================================================== */
:root {
  --blu: #0b2e9e; --blu-scuro: #071c63; --blu-chiaro: #1547d6; --acqua: #0fc0aa; --ciano: #14bee0;
  --verde: #1a7f37; --verde-bg: #e4f5e9; --rosso: #c0392b; --rosso-bg: #fdecea;
  --giallo: #a8760a; --giallo-bg: #fdf4de; --arancio: #c2670f; --arancio-bg: #fdeede;
  --viola: #6d28d9; --viola-bg: #efe7fb;
  --sfondo: #edf2fb; --superficie: #ffffff; --superficie-2: #f7f9fc;
  --linea: #e3e9f4; --linea-2: #c1cad6; --testo: #1b2530; --testo-2: #5f6f80; --blu-bg: #e6ecfa;
  --ombra: 0 6px 18px rgba(11,46,158,.10), 0 1px 3px rgba(11,46,158,.06);
  --ombra-alta: 0 16px 36px rgba(11,46,158,.18);
  --raggio: 14px; --bordo-attivo: #c9d6f7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blu: #7d9bff; --blu-scuro: #a9bcff; --blu-chiaro: #6f8fff; --acqua: #2fd6c1; --ciano: #38cdea;
    --verde: #5fcf82; --verde-bg: #14301d; --rosso: #f0857a; --rosso-bg: #3a1d1a;
    --giallo: #e2b24a; --giallo-bg: #33290f; --arancio: #f0a05a; --arancio-bg: #33220f;
    --viola: #b995f5; --viola-bg: #2a1c44;
    --sfondo: #0f141b; --superficie: #171e27; --superficie-2: #1d2530; --linea: #2a3441; --linea-2: #3b4757;
    --testo: #e6ebf2; --testo-2: #98a6b6; --blu-bg: #1c2742; --bordo-attivo: #34497f;
    --ombra: 0 6px 18px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.3); --ombra-alta: 0 16px 36px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blu: #7d9bff; --blu-scuro: #a9bcff; --blu-chiaro: #6f8fff; --acqua: #2fd6c1; --ciano: #38cdea;
  --verde: #5fcf82; --verde-bg: #14301d; --rosso: #f0857a; --rosso-bg: #3a1d1a;
  --giallo: #e2b24a; --giallo-bg: #33290f; --arancio: #f0a05a; --arancio-bg: #33220f;
  --viola: #b995f5; --viola-bg: #2a1c44;
  --sfondo: #0f141b; --superficie: #171e27; --superficie-2: #1d2530; --linea: #2a3441; --linea-2: #3b4757;
  --testo: #e6ebf2; --testo-2: #98a6b6; --blu-bg: #1c2742; --bordo-attivo: #34497f;
  --ombra: 0 6px 18px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.3); --ombra-alta: 0 16px 36px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #eef3fc; color: var(--testo); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 640px at 102% -8%, rgba(21,71,214,.42), rgba(20,190,224,.22) 40%, transparent 66%),
    radial-gradient(1000px 620px at -8% 106%, rgba(11,46,158,.46), rgba(21,71,214,.18) 45%, transparent 66%),
    radial-gradient(700px 420px at 55% 50%, rgba(15,192,170,.06), transparent 65%),
    linear-gradient(180deg, #e9effb 0%, #f0f4fd 55%, #ecf2fc 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: #0d1420; } :root:not([data-theme="light"]) body::before { background: radial-gradient(1100px 640px at 102% -8%, rgba(21,71,214,.30), rgba(20,190,224,.10) 40%, transparent 66%), radial-gradient(1000px 620px at -8% 106%, rgba(11,46,158,.42), rgba(21,71,214,.14) 45%, transparent 66%), linear-gradient(180deg, #0c1220, #0f1523); } }
:root[data-theme="dark"] body { background: #0d1420; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--blu-chiaro); }
:focus-visible { outline: 2px solid var(--acqua); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- LOGIN */
.logo-login { text-align: center; margin-bottom: 8px; }
.logo-login img { width: 280px; max-width: 86%; height: auto; display: inline-block; }
#schermata-login, #schermata-password { min-height: 100vh; display: none; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 0;
  background: radial-gradient(1000px 520px at 82% 6%, rgba(20,190,224,.35), transparent 62%), radial-gradient(760px 460px at 8% 96%, rgba(15,192,170,.30), transparent 60%), linear-gradient(146deg, #071c63 0%, #0a2a92 52%, #1547d6 100%); }
#schermata-login.attiva, #schermata-password.attiva { display: flex; }
.box-login { background: #ffffff; color: #1b2530; width: 100%; max-width: 420px; border-radius: 16px; padding: 34px 32px 30px; box-shadow: 0 20px 50px rgba(4,16,60,.34); }
.box-login .sottotitolo { text-align: center; font-size: 13px; color: #5f6f80; margin-bottom: 26px; }
.box-login .campo input { background: #fff; color: #1b2530; border-color: #c1cad6; }
.box-login .campo label { color: #5f6f80; }
.box-login .piede { margin-top: 18px; font-size: 12.5px; color: #5f6f80; text-align: center; }
.box-login .piede b { color: #0b2e9e; }
.box-login .avviso { margin-top: 12px; margin-bottom: 0; }
.campo-occhio { position: relative; }
.campo-occhio input { padding-right: 44px; width: 100%; }
.campo-occhio .occhio { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 17px; padding: 4px 6px; border-radius: 6px; opacity: .55; }
.btn-job { margin-top: 10px; background: #fff; color: #0b2e9e; border: 1.5px solid #0b2e9e; }

/* ------------------------------------------------------------- FORM */
.campo { margin-bottom: 14px; min-width: 0; }
.campo label { display: block; font-size: 12px; font-weight: 700; color: var(--testo-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px; background: var(--sfondo); color: var(--testo); transition: border-color .15s, box-shadow .15s; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; background: var(--superficie); border-color: var(--acqua); box-shadow: 0 0 0 3px rgba(15,192,170,.18); }
.campo textarea { min-height: 78px; resize: vertical; }
.campo .aiuto { font-size: 12px; color: var(--testo-2); margin-top: 4px; }
.griglia { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.griglia-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.griglia-3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 1fr; }
.griglia > *, .griglia-2 > *, .griglia-3 > * { min-width: 0; }
.interruttore { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--testo); cursor: pointer; }
.interruttore input { accent-color: var(--blu); width: 16px; height: 16px; }
.segmenti { display: inline-flex; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; background: var(--superficie); }
.segmenti button { background: var(--superficie); border: none; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--testo-2); cursor: pointer; }
.segmenti button + button { border-left: 1px solid var(--linea); }
.segmenti button.attivo { background: var(--blu); color: #fff; }

/* ---------------------------------------------------------- PULSANTI */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .06s, box-shadow .15s; background: none; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primario { background: linear-gradient(135deg, #0b2e9e, #1547d6); color: #fff; box-shadow: 0 4px 12px rgba(11,46,158,.22); border: none; }
.btn-primario:hover { box-shadow: 0 6px 16px rgba(11,46,158,.3); transform: translateY(-1px); }
.btn-acqua { background: linear-gradient(135deg, #0fc0aa, #14bee0); color: #052b26; border: none; }
.btn-chiaro { background: var(--superficie); color: var(--testo); border-color: var(--linea); box-shadow: var(--ombra); }
.btn-chiaro:hover { background: var(--superficie-2); }
.btn-rosso { background: var(--rosso-bg); color: var(--rosso); }
.btn-piccolo { padding: 6px 11px; font-size: 13px; }
.btn-largo { width: 100%; }
.btn-icona { background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 7px; cursor: pointer; color: var(--testo-2); font-size: 14px; }
.btn-icona:hover { background: var(--superficie-2); color: var(--testo); border-color: var(--linea); }

/* ------------------------------------------------------- STRUTTURA */
#schermata-app { display: none; min-height: 100vh; }
#schermata-app.attiva { display: block; }
.barra-alta { background: var(--superficie); padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--linea), 0 4px 16px rgba(11,46,158,.06); }
.barra-alta::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, #0b2e9e, #0fc0aa 60%, #14bee0); pointer-events: none; }
.barra-alta .marchio img { height: 42px; width: auto; display: block; }
.barra-alta .spazio { flex: 1; }
.barra-alta .esci { background: var(--superficie-2); color: var(--blu); border: 1px solid var(--linea); padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.utente-info { font-size: 13px; text-align: right; line-height: 1.3; }
.utente-info b { display: block; color: var(--blu); }
.utente-info small { color: var(--testo-2); }
.chip-indici { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-indici span { font-size: 12px; font-weight: 700; background: var(--sfondo); border-radius: 999px; padding: 5px 11px; color: var(--testo-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-indici span b { color: var(--blu); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .barra-alta .marchio { background: #fff; padding: 4px 8px; border-radius: 8px; } }

.menu { display: flex; gap: 8px; padding: 10px 14px; position: sticky; top: 64px; z-index: 40; overflow: visible; background: transparent; }
.menu button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 7px 4px; font-size: 12.5px; font-weight: 600; line-height: 1.15; text-align: center; background: var(--superficie); border: 1px solid var(--linea); border-radius: 12px; min-height: 60px; color: var(--testo-2); box-shadow: var(--ombra); cursor: pointer; transition: box-shadow .15s, transform .06s, border-color .15s; position: relative; }
.menu button .mi { width: 30px; height: 30px; border-radius: 9px; background: var(--sfondo); display: grid; place-items: center; font-size: 16px; line-height: 1; }
.menu button:hover { color: var(--blu); border-color: var(--bordo-attivo); }
.menu button.attivo { color: var(--blu); border-color: var(--bordo-attivo); box-shadow: inset 0 -3px 0 var(--acqua), var(--ombra); }
.menu button.attivo .mi { background: var(--blu-bg); }

.contenuto { padding: 14px 20px 90px; max-width: 1500px; margin: 0 auto; }
.pagina { display: none; }
.pagina.attiva { display: block; animation: entra .18s ease; }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.titolo-pagina { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.titolo-pagina h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.titolo-pagina .sub { font-size: 13.5px; color: var(--testo-2); }
.titolo-pagina .azioni { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------- CARD */
.card { background: var(--superficie); border-radius: 16px; box-shadow: var(--ombra); margin-bottom: 18px; min-width: 0; }
.card-testa { padding: 14px 18px 14px 32px; position: relative; border-bottom: 1px solid var(--linea); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-testa::before { content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--acqua); }
.card-testa .link { font-size: 13px; font-weight: 600; color: var(--blu-chiaro); cursor: pointer; }
.card-corpo { padding: 16px 18px; }
.card-corpo.stretto { padding: 0; }

.kpi-griglia { display: grid; gap: 14px; margin-bottom: 18px; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.kpi { background: var(--superficie); border-radius: 16px; padding: 14px 16px; box-shadow: var(--ombra); position: relative; overflow: hidden; min-width: 0; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blu-chiaro); }
.kpi.rosso::before { background: var(--rosso); } .kpi.giallo::before { background: var(--giallo); } .kpi.viola::before { background: var(--viola); } .kpi.verde::before { background: var(--verde); } .kpi.acqua::before { background: var(--acqua); }
.kpi .etichetta { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--testo-2); font-weight: 700; margin-bottom: 4px; }
.kpi .valore { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .valore small { font-size: 14px; font-weight: 700; color: var(--testo-2); letter-spacing: 0; }
.kpi .nota { font-size: 12px; color: var(--testo-2); margin-top: 3px; }
.kpi.rosso .valore { color: var(--rosso); } .kpi.verde .valore { color: var(--verde); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; line-height: 1.4; }
.badge.grigio { background: var(--linea); color: var(--testo-2); } .badge.blu { background: var(--blu-bg); color: var(--blu); }
.badge.verde { background: var(--verde-bg); color: var(--verde); } .badge.rosso { background: var(--rosso-bg); color: var(--rosso); }
.badge.giallo { background: var(--giallo-bg); color: var(--giallo); } .badge.arancio { background: var(--arancio-bg); color: var(--arancio); }
.badge.viola { background: var(--viola-bg); color: var(--viola); } .badge.acqua { background: color-mix(in srgb, var(--acqua) 18%, var(--superficie)); color: var(--verde); }

.tabella-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tab th { text-align: left; padding: 10px 12px; background: var(--superficie-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--testo-2); font-weight: 700; border-bottom: 1px solid var(--linea); white-space: nowrap; }
table.tab td { padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
table.tab tr:last-child td { border-bottom: none; }
table.tab tbody tr:hover { background: var(--superficie-2); }
table.tab .num, table.tab th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tab .t-tit { font-weight: 700; }
table.tab .t-sub { font-size: 12.5px; color: var(--testo-2); }

/* ------------------------------------------------------------ MODALE */
.sfondo-modale { position: fixed; inset: 0; background: rgba(16,32,52,.55); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 24px 16px; overflow-y: auto; backdrop-filter: blur(2px); }
.sfondo-modale.aperto { display: flex; }
.modale { background: var(--superficie); border-radius: 20px; width: 100%; max-width: 820px; box-shadow: var(--ombra-alta); animation: sali .2s ease; margin: auto 0; }
.modale.largo { max-width: 1100px; }
@keyframes sali { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modale-testa { padding: 16px 22px; border-bottom: 1px solid var(--linea); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modale-testa h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.modale-testa .chiudi { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--testo-2); }
.modale-corpo { padding: 20px 22px; }
.modale-piede { padding: 14px 22px; border-top: 1px solid var(--linea); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sezione-form { margin-bottom: 20px; }
.sezione-form > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--blu); font-weight: 800; margin-bottom: 12px; padding-bottom: 7px; border-bottom: 2px solid var(--linea); }

.avviso { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.avviso.info { background: var(--blu-bg); color: var(--blu); }
.avviso.attenzione { background: var(--giallo-bg); color: var(--giallo); }
.avviso.errore { background: var(--rosso-bg); color: var(--rosso); }
.avviso.ok { background: var(--verde-bg); color: var(--verde); }
.vuoto { text-align: center; padding: 28px 16px; color: var(--testo-2); font-size: 14px; }
.vuoto::before { content: "◌"; display: block; font-size: 28px; color: var(--acqua); margin-bottom: 6px; }
.piccolo { font-size: 12.5px; color: var(--testo-2); }
.link-blu { color: var(--blu-chiaro); cursor: pointer; font-weight: 600; text-decoration: none; }
.link-blu:hover { text-decoration: underline; }

.box-ai { border: 1.5px solid var(--acqua); border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; background: color-mix(in srgb, var(--acqua) 7%, var(--superficie)); }
.box-ai-testa { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; font-weight: 700; }
@keyframes ai-lamp { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.ai-lampeggia { animation: ai-lamp 1.2s ease-in-out infinite; color: var(--verde); font-weight: 600; }

#brindisi { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1b2530; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 500; max-width: min(720px, calc(100vw - 32px)); text-align: center; }
#brindisi.mostra { opacity: 1; transform: translate(-50%, 0); }
#brindisi.errore { background: #c0392b; }

/* ===== ISTRUZIONI PER L'USO (📖) ===== */
#btn-istruzioni { white-space: nowrap; }
.istr { font-size: 14.5px; line-height: 1.55; }
.istr-testa { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; position: sticky; top: -20px; z-index: 3; background: var(--superficie); padding: 8px 0 10px; border-bottom: 1px solid var(--linea); }
.istr-cerca-box { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.istr-cerca-et { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--blu); }
.istr-cerca-riga input { width: 100%; padding: 11px 14px; border: 2px solid var(--blu); border-radius: 999px; font-size: 15px; background: var(--superficie); box-shadow: 0 2px 8px rgba(11,46,158,.10); }
.istr-cerca-riga input:focus { outline: none; box-shadow: 0 0 0 3px var(--blu-bg); }
mark.istr-hit { background: #ffe86b; color: #1b2530; border-radius: 3px; padding: 0 2px; }
.istr-indice { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.istr-chip { border: 1px solid var(--linea); background: var(--superficie-2); color: var(--blu); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.istr-chip:hover { background: var(--blu-bg); }
.istr-sez { border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 8px; background: var(--superficie); overflow: hidden; }
.istr-sez summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 800; font-size: 15.5px; color: var(--blu); display: flex; align-items: center; gap: 10px; }
.istr-sez summary::-webkit-details-marker { display: none; }
.istr-sez summary::after { content: "▾"; margin-left: auto; color: var(--testo-2); transition: transform .15s; }
.istr-sez[open] summary::after { transform: rotate(180deg); }
.istr-sez[open] summary { border-bottom: 1px solid var(--linea); background: var(--superficie-2); }
.istr-html { padding: 6px 16px 14px; }
.istr-html h4 { margin: 14px 0 4px; font-size: 14px; color: var(--testo); text-transform: uppercase; letter-spacing: .3px; }
.istr-html p { margin: 6px 0; }
.istr-html ul, .istr-html ol { margin: 6px 0 6px 20px; padding: 0; }
.istr-html li { margin: 4px 0; }
.istr-html code { background: var(--superficie-2); border: 1px solid var(--linea); border-radius: 4px; padding: 0 5px; font-size: .92em; }
.istr-html .tasto { display: inline-block; border: 1px solid var(--linea-2); border-radius: 6px; padding: 0 7px; font-size: .9em; font-weight: 600; background: var(--superficie-2); white-space: nowrap; color: var(--blu); }
.istr-html .nota { background: var(--blu-bg); border-left: 4px solid var(--blu); padding: 8px 12px; margin: 10px 0; border-radius: 0 8px 8px 0; }
.tab-istr { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13.5px; }
.tab-istr th, .tab-istr td { border: 1px solid var(--linea); padding: 6px 8px; text-align: left; vertical-align: top; }
.tab-istr th { background: var(--superficie-2); }

/* ------------------------------------------------------------ MOBILE */
@media (max-width: 900px) { .griglia-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  html, body { overflow-x: clip; }
  body { font-size: 14.5px; }
  .contenuto { padding: 10px 12px 90px; }
  .barra-alta { padding: 0 10px; gap: 6px; height: 56px; }
  .barra-alta .marchio { flex: 1 1 auto; min-width: 0; max-width: 44%; }
  .barra-alta .marchio img { height: auto; max-height: 32px; max-width: 100%; }
  .utente-info, .chip-indici { display: none; }
  #btn-istruzioni { font-size: 0; padding: 7px 9px; }
  #btn-istruzioni::before { content: "📖"; font-size: 15px; }
  .menu { top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 6px 8px; }
  .menu button { min-height: 46px; padding: 4px 2px 5px; gap: 2px; font-size: 10px; border-radius: 10px; }
  .menu button .mi { width: 24px; height: 24px; font-size: 14px; border-radius: 7px; }
  .titolo-pagina h1 { font-size: 20px; }
  .griglia, .griglia-2, .griglia-3 { grid-template-columns: 1fr; }
  .kpi-griglia { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .valore { font-size: 22px; }
  .sfondo-modale { padding: 6px; }
  .modale-corpo { padding: 14px 12px; }
  input, select, textarea { font-size: 16px !important; }
}
