/* ============================================================
   LOGPLUS — sistema di stile di App Presenze (spec redesign §4)
   Unico punto di verità per colori, caratteri e componenti.
   I componenti citano i colori per RUOLO, mai per nome.
   I contrasti delle coppie usate sono misurati da `npm test`
   (scripts/contrasto.js + test/contrasto.test.js): cambiare un
   valore qui senza far passare il test non è ammesso.
   REGOLA: --accent è decorativo (2.39:1 su bianco): mai testo su
   chiaro, mai indicatore unico su chiaro. Su fasce navy va bene.
   ============================================================ */

/* ---------- Caratteri (OFL, ospitati dall'app, solo latin) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(../fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- Token: chiaro (default) ---------- */
/* @token-chiaro */
:root {
  --surface: #FFFFFF;
  --surface-alt: #F5F9FC;
  --invert: #163D5A;
  --invert-deep: #001D3F;
  --body: #0A1622;
  --muted: #5B6B7B;
  --brand: #0A5385;
  --accent: #E7953F;
  --accent-text: #A65700;
  --hair: #D9E4EE;
  --hair-strong: #5B6B7B;
  --on-brand: #FFFFFF;
  --on-invert: #F5F9FC;
  --on-invert-muted: #B8CBDB;
  --stato-presente: #1D6B36;
  --stato-presente-bg: #E5F3EA;
  --stato-ritardo: #8A4B00;
  --stato-ritardo-bg: #FCEFD9;
  --stato-assente: #B3261E;
  --stato-assente-bg: #FCE9E7;
  --stato-ferie: #0B5C8C;
  --stato-ferie-bg: #E3F1FA;
  --stato-uscito: #4A5866;
  --stato-uscito-bg: #EDF1F5;
}
/* @fine-token-chiaro */

/* ---------- Token: scuro (segue il telefono) ---------- */
@media (prefers-color-scheme: dark) {
  /* @token-scuro */
  :root {
    --surface: #0B1622;
    --surface-alt: #061018;
    --invert: #0E2D45;
    --invert-deep: #001D3F;
    --body: #F5F9FC;
    --muted: #B8CBDB;
    --brand: #8FD2F7;
    --accent: #E7953F;
    --accent-text: #FFAB2E;
    --hair: #1C3348;
    --hair-strong: #8FA3B5;
    --on-brand: #001D3F;
    --on-invert: #F5F9FC;
    --on-invert-muted: #B8CBDB;
    --stato-presente: #72D196;
    --stato-presente-bg: #0F2C1C;
    --stato-ritardo: #F5B955;
    --stato-ritardo-bg: #33250B;
    --stato-assente: #FF9A8F;
    --stato-assente-bg: #3B1614;
    --stato-ferie: #86CDF2;
    --stato-ferie-bg: #0C2A3F;
    --stato-uscito: #B5C2CE;
    --stato-uscito-bg: #1B2733;
  }
  /* @fine-token-scuro */
}

/* ---------- Token non di colore ---------- */
:root {
  color-scheme: light dark;
  --font-display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Hanken Grotesk Variable', 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --raggio: 14px;
  --raggio-piccolo: 10px;
  --ombra: 0 1px 2px rgba(0, 29, 63, .06), 0 4px 16px rgba(0, 29, 63, .06);
  --durata: 180ms;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --altezza-nav: 64px;
  --larghezza-app: 560px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100dvh;
  background: var(--surface-alt);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; font-weight: 700; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.lp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Focus da tastiera: accent-text su chiaro (≥3:1), accent pieno sulle fasce navy. */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.lp-su-invert :focus-visible { outline-color: var(--accent); }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Guscio dell'app ---------- */
.lp-app { max-width: var(--larghezza-app); margin: 0 auto; min-height: 100dvh; background: var(--surface-alt); position: relative; }
.lp-vista { display: none; padding-bottom: calc(var(--altezza-nav) + var(--safe-bottom) + 24px); }
.lp-vista.attiva { display: block; }
.lp-vista--senza-nav { padding-bottom: 24px; }
.lp-corpo { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.lp-testata {
  background: var(--invert-deep); color: var(--on-invert);
  padding: calc(20px + var(--safe-top)) 16px 24px;
}
.lp-testata h1 { font-size: 24px; color: var(--on-invert); }
.lp-testata__sopra { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-testata__data { color: var(--on-invert-muted); font-size: 14px; }
.lp-testata__stato { margin-top: 12px; font-size: 18px; font-weight: 600; }
.lp-testata__dettaglio { color: var(--on-invert-muted); font-size: 15px; margin-top: 2px; }
.lp-marchio::after { content: '+'; color: var(--accent); font-weight: 800; margin-left: 2px; }

.lp-barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-top)) 8px 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--hair);
}
.lp-barra h1 { font-size: 20px; flex: 1; color: var(--body); }

/* ---------- Tipografia di sezione ---------- */
.lp-sezione { display: flex; flex-direction: column; gap: 8px; }
.lp-sezione__titolo { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--body); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lp-testo-secondario { color: var(--muted); font-size: 15px; }
.lp-piccolo { font-size: 14px; color: var(--muted); }

/* ---------- Card ---------- */
.lp-card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--raggio); padding: 16px; box-shadow: var(--ombra); display: flex; flex-direction: column; gap: 8px; }
.lp-card--evidenza { border-color: var(--brand); }
.lp-griglia-cruscotto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lp-cruscotto { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--raggio); padding: 12px; display: flex; flex-direction: column; gap: 4px; min-height: 88px; }
.lp-cruscotto__numero { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 600; color: var(--brand); line-height: 1.1; }
.lp-cruscotto__etichetta { font-size: 13px; color: var(--muted); line-height: 1.3; }
.lp-cruscotto__numero.negativo { color: var(--stato-assente); }

/* ---------- Righe di elenco ---------- */
.lp-elenco { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--raggio); overflow: hidden; }
.lp-riga { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 56px; border-bottom: 1px solid var(--hair); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.lp-riga:last-child { border-bottom: 0; }
button.lp-riga { cursor: pointer; }
button.lp-riga:hover { background: var(--surface-alt); }
.lp-riga__testo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-riga__titolo { font-weight: 600; }
.lp-riga__sotto { font-size: 14px; color: var(--muted); }
.lp-riga__valore { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---------- Pulsanti ---------- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--raggio-piccolo);
  border: 1px solid var(--hair-strong); background: var(--surface); color: var(--body);
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform var(--durata) ease, background var(--durata) ease;
}
.lp-btn:active { transform: scale(.98); }
.lp-btn:disabled { opacity: .55; cursor: not-allowed; }
.lp-btn--primario { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lp-btn--pericolo { background: var(--stato-assente-bg); border-color: var(--stato-assente); color: var(--stato-assente); }
.lp-btn--testo { border-color: transparent; background: none; color: var(--brand); padding-inline: 8px; }
.lp-btn--pieno { width: 100%; }
.lp-btn--icona { width: 44px; padding: 0; border-color: transparent; background: none; color: inherit; }
.lp-btn--timbra {
  width: 100%; min-height: 72px; font-size: 20px; font-family: var(--font-display);
  background: var(--brand); border-color: var(--brand); color: var(--on-brand); border-radius: var(--raggio);
}
.lp-azioni { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Campi ---------- */
.lp-campo { display: flex; flex-direction: column; gap: 6px; }
.lp-campo label, .lp-etichetta { font-size: 14px; font-weight: 600; color: var(--muted); }
.lp-input {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px;
  background: var(--surface); color: var(--body);
  border: 1px solid var(--hair-strong); border-radius: var(--raggio-piccolo);
}
textarea.lp-input { resize: vertical; min-height: 88px; }
.lp-input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.lp-due-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-contatore { font-size: 13px; color: var(--muted); text-align: right; }

/* Segmenti (es. Magic link / PIN) */
.lp-segmenti { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-alt); border: 1px solid var(--hair); border-radius: var(--raggio-piccolo); }
.lp-segmenti button { min-height: 44px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: var(--muted); cursor: pointer; }
.lp-segmenti button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--ombra); }

/* ---------- Stati (sempre icona + parola, mai solo colore) ---------- */
.lp-stato { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.lp-stato svg { width: 16px; height: 16px; }
.lp-stato--presente { color: var(--stato-presente); background: var(--stato-presente-bg); }
.lp-stato--ritardo { color: var(--stato-ritardo); background: var(--stato-ritardo-bg); }
.lp-stato--assente { color: var(--stato-assente); background: var(--stato-assente-bg); }
.lp-stato--ferie { color: var(--stato-ferie); background: var(--stato-ferie-bg); }
.lp-stato--uscito { color: var(--stato-uscito); background: var(--stato-uscito-bg); }

/* ---------- Esiti in pagina ---------- */
.lp-esito { font-size: 15px; min-height: 1.5em; }
.lp-esito--ok { color: var(--stato-presente); }
.lp-esito--errore { color: var(--stato-assente); }
.lp-avviso { border-radius: var(--raggio-piccolo); padding: 12px; font-size: 15px; }
.lp-avviso--errore { background: var(--stato-assente-bg); color: var(--stato-assente); }
.lp-avviso--ok { background: var(--stato-presente-bg); color: var(--stato-presente); }
.lp-avviso--info { background: var(--stato-ferie-bg); color: var(--stato-ferie); }
.lp-vuoto { text-align: center; color: var(--muted); padding: 24px 16px; font-size: 15px; }

/* ---------- Barra in basso ---------- */
.lp-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--larghezza-app); z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--hair);
  padding-bottom: var(--safe-bottom);
}
.lp-nav__voce {
  position: relative; min-height: var(--altezza-nav);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.lp-nav__voce svg { width: 24px; height: 24px; }
.lp-nav__voce[aria-current="page"] { color: var(--brand); }
.lp-nav__voce[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.lp-nav__badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--stato-assente); color: var(--surface);
  font-size: 12px; font-family: var(--font-mono); line-height: 20px; text-align: center;
}

/* ---------- Pannello dal basso (sheet) ---------- */
.lp-velo { position: fixed; inset: 0; z-index: 90; background: rgba(0, 16, 32, .55); opacity: 0; transition: opacity var(--durata) ease; }
.lp-velo.aperto { opacity: 1; }
.lp-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 91;
  width: 100%; max-width: var(--larghezza-app); max-height: 88dvh; overflow-y: auto;
  transform: translate(-50%, 100%); transition: transform var(--durata) ease;
  background: var(--surface); color: var(--body);
  border-radius: 20px 20px 0 0; padding: 8px 16px calc(24px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.lp-sheet.aperto { transform: translate(-50%, 0); }
.lp-sheet__maniglia { width: 40px; height: 4px; border-radius: 2px; background: var(--hair); margin: 4px auto 4px; }
.lp-sheet__testa { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-sheet__testa h2 { font-size: 20px; }

/* ---------- Avvisi brevi (toast) ---------- */
.lp-toast-area { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--altezza-nav) + var(--safe-bottom) + 12px); z-index: 95; width: calc(100% - 32px); max-width: calc(var(--larghezza-app) - 32px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.lp-toast { pointer-events: auto; background: var(--invert-deep); color: var(--on-invert); border-radius: var(--raggio-piccolo); padding: 12px 16px; font-size: 15px; display: flex; gap: 8px; align-items: center; box-shadow: var(--ombra); animation: lp-entra var(--durata) ease; }
.lp-toast svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
@keyframes lp-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Scheletri di caricamento ---------- */
.lp-skel { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--hair) 0%, var(--surface-alt) 50%, var(--hair) 100%); background-size: 200% 100%; animation: lp-luccica 1.2s linear infinite; }
.lp-skel--riga { height: 56px; }
.lp-skel--card { height: 88px; }
.lp-skel--testo { height: 16px; width: 60%; }
@keyframes lp-luccica { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Tabella compatta (resoconto) ---------- */
.lp-tabella { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--raggio); overflow: hidden; font-size: 15px; }
.lp-tabella th, .lp-tabella td { padding: 10px 8px; border-bottom: 1px solid var(--hair); text-align: right; }
.lp-tabella th:first-child, .lp-tabella td:first-child { text-align: left; }
.lp-tabella th { font-size: 13px; color: var(--muted); font-weight: 600; }
.lp-tabella td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.lp-tabella td:first-child { font-family: var(--font-sans); }
.lp-tabella tfoot td { font-weight: 600; border-bottom: 0; }

/* ---------- Squadra: card toccabili, filtri, persone (Fase B) ---------- */
/* Solo coppie di colore già misurate: stato su surface, stato su stato-bg, on-brand su brand. */
.lp-griglia-cruscotto--quattro { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .lp-griglia-cruscotto--quattro { grid-template-columns: repeat(4, 1fr); } }
button.lp-cruscotto { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color var(--durata) ease, transform var(--durata) ease; }
button.lp-cruscotto:hover { border-color: var(--brand); }
button.lp-cruscotto:active { transform: scale(.98); }
.lp-cruscotto__testa { display: flex; align-items: center; gap: 6px; }
.lp-cruscotto__testa svg { width: 20px; height: 20px; flex-shrink: 0; }
.lp-cruscotto__totale { font-size: 16px; color: var(--muted); }
.lp-cruscotto__dettaglio { font-size: 13px; color: var(--muted); }
.lp-colore--presente { color: var(--stato-presente); }
.lp-colore--ritardo { color: var(--stato-ritardo); }
.lp-colore--assente { color: var(--stato-assente); }
.lp-colore--ferie { color: var(--stato-ferie); }
.lp-colore--uscito { color: var(--stato-uscito); }
.lp-avatar {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--stato-ferie-bg); color: var(--stato-ferie); font-weight: 700; font-size: 15px;
}
.lp-avatar--grande { width: 56px; height: 56px; font-size: 20px; }
a.lp-riga { color: inherit; text-decoration: none; }
.lp-persona { justify-content: flex-start; }
.lp-persona .lp-riga__testo { flex: 1; }
.lp-filtri { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-filtro {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hair-strong); background: var(--surface); color: var(--body); font-weight: 600; font-size: 15px;
}
.lp-filtro[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lp-filtro__numero { font-family: var(--font-mono); font-variant-numeric: tabular-nums; margin-left: 6px; }
.lp-cella-piccola { display: block; font-family: var(--font-sans); font-size: 13px; color: var(--muted); }
.lp-sheet .lp-sezione__titolo { font-size: 17px; margin-top: 4px; }

/* ---------- Messaggi (Fase C) ---------- */
.lp-msg { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.lp-msg__testa { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lp-msg__testo { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp-msg__intero { white-space: pre-wrap; word-break: break-word; font-size: 16px; }
.lp-spunta { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; font-size: 16px; cursor: pointer; }
.lp-spunta input { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); flex-shrink: 0; }

/* ---------- Scanner QR ---------- */
.lp-scanner { position: fixed; inset: 0; z-index: 100; background: #000; display: none; }
.lp-scanner.attivo { display: block; }
.lp-scanner video { width: 100%; height: 100%; object-fit: cover; }
.lp-scanner__cornice { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; pointer-events: none; }
.lp-scanner__quadro { width: min(70vw, 70vh, 280px); aspect-ratio: 1; border: 3px solid var(--on-invert); border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
.lp-scanner__suggerimento { color: var(--on-invert); font-size: 16px; }
.lp-scanner__chiudi { position: absolute; top: calc(16px + var(--safe-top)); right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--on-invert-muted); background: rgba(0, 0, 0, .6); color: var(--on-invert); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lp-scanner__esito { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; background: var(--invert-deep); color: var(--on-invert); }
.lp-scanner__esito.visibile { display: flex; }
.lp-scanner__esito svg { width: 64px; height: 64px; color: var(--accent); }
.lp-scanner__esito h2 { font-size: 24px; color: var(--on-invert); }
.lp-scanner__esito p { color: var(--on-invert-muted); }

/* ---------- Login ---------- */
.lp-login.attiva { min-height: 100dvh; display: flex; flex-direction: column; }
.lp-login .lp-testata { padding-top: calc(48px + var(--safe-top)); padding-bottom: 40px; }
.lp-login__corpo { padding: 16px; margin-top: -24px; }

/* ---------- Computer: l'app resta una colonna centrata ---------- */
@media (min-width: 900px) {
  body { background: var(--surface-alt); }
  .lp-app { border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .lp-skel { animation: none; }
}
