/* ============================================================
   DiTurno — accesso.css
   Pagine senza guscio: registrazione, conferma email, primo
   accesso del titolare (benvenuto), invito del dipendente.
   Stesso sistema di app.css (DESIGN.md): notte #090e1a, vetro,
   accento verde, Plus Jakarta Sans, icone Lucide.
   ============================================================ */

/* Fase 4 (S13, T9): carattere ospitato sul sito */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonti/plus-jakarta-sans-var-latin.woff2?v=20261030f4') format('woff2');
}

:root {
    --font:    'Plus Jakarta Sans', system-ui, sans-serif;
    --bg:      #090e1a;
    --glass:   rgba(255,255,255,.04);
    --glass2:  rgba(255,255,255,.07);
    --glass3:  rgba(255,255,255,.11);
    --gb:      rgba(255,255,255,.09);
    --gb2:     rgba(255,255,255,.15);

    --teal:    #1D9E75;
    --teal-dk: #0d7a5a;
    --teal-g:  rgba(29,158,117,.35);
    --teal-d:  rgba(29,158,117,.12);
    --teal-tx: #3cc496;              /* verde per testo piccolo su vetro: contrasto 7:1 */
    --blue:    #378ADD;
    --blue-d:  rgba(55,138,221,.12);
    --amber:   #F5A623;
    --amber-d: rgba(245,166,35,.12);
    --red:     #EF4444;
    --red-d:   rgba(239,68,68,.12);
    --red-tx:  #F87171;              /* rosso per testo d'errore su vetro: contrasto 6:1 */
    --green:   #22C55E;
    --green-d: rgba(34,197,94,.12);

    --tx:      #f0f4ff;
    --tx2:     rgba(240,244,255,.68);  /* etichette e aiuti: restano sopra 4,5:1 sul vetro */
    --tx3:     rgba(240,244,255,.5);   /* solo icone e segni, mai testo piccolo */
    --ph:      rgba(240,244,255,.55);  /* segnaposto dei campi */

    --r:       20px;
    --rs:      10px;
    --rx:      8px;
    --ease:    .18s cubic-bezier(.4,0,.2,1);
    --ease-out:.4s cubic-bezier(.16,1,.3,1);
    color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body.acc {
    font-family: var(--font); font-size: 14px; line-height: 1.5;
    background: var(--bg); color: var(--tx);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.acc::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(29,158,117,.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(55,138,221,.14) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(124,58,237,.07) 0%, transparent 60%);
}
body.acc::after {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
    background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 32px 32px;
}
::selection { background: rgba(29,158,117,.45); color: #fff; }
a { color: var(--teal-tx); text-underline-offset: 3px; }
a:hover { color: #6fdcb5; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { caret-color: var(--teal-tx); }
img, svg { display: block; max-width: 100%; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Link per saltare al contenuto: compare solo da tastiera */
.salta-link {
    position: absolute; left: 16px; top: -60px; z-index: 50;
    padding: 12px 16px; min-height: 44px; border-radius: var(--rs);
    background: #13805f; color: #fff; font-weight: 700; text-decoration: none;
}
.salta-link:focus { top: 12px; }

/* Focus da tastiera: anello verde staccato di 2px (i campi hanno bordo + alone) */
:where(a, button, summary, [tabindex], .acc-btn):focus-visible {
    outline: 2px solid var(--teal); outline-offset: 2px;
}

/* ── Impaginazione ────────────────────────────────────── */
.acc-pagina {
    position: relative; z-index: 1;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 20px 24px; gap: 22px;
}
.acc-testa {
    width: 100%; max-width: 440px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.acc-testa--larga { max-width: 680px; }
.acc-marchio {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--tx); text-decoration: none; font-weight: 800; font-size: 15px; letter-spacing: -.2px;
    min-height: 44px;
}
.acc-marchio:hover { color: var(--tx); }
/* Marchio DiTurno (DECISIONI D12): icona «D con le lancette» + scritta,
   «Di» verde e «Turno» bianco ghiaccio, Plus Jakarta Sans 800, -0,035 em */
.acc-logo {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: block;
    box-shadow: 0 0 20px var(--teal-g);
}
.marchio-nome { font-size: 17px; font-weight: 800; letter-spacing: -.035em; color: var(--tx); }
.marchio-di { color: var(--teal); }
.acc-testa-link {
    font-size: 13px; font-weight: 600; color: var(--tx2); text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
}
.acc-testa-link:hover { color: var(--tx); }
.acc-testa-link svg { width: 15px; height: 15px; }

.acc-scheda {
    width: 100%; max-width: 440px;
    background: rgba(255,255,255,.05);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border: 1px solid var(--gb); border-radius: var(--r);
    animation: acc-entra var(--ease-out) both;
}
.acc-scheda--larga { max-width: 680px; }
@keyframes acc-entra { from { opacity: .001; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.acc-scheda-testa { padding: 32px 36px 0; }
.acc-scheda-corpo { padding: 24px 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.acc-scheda-piede {
    padding: 16px 36px 20px; border-top: 1px solid var(--gb);
    text-align: center; font-size: 13px; color: var(--tx2);
}
.acc-scheda-piede a { font-weight: 700; }

.acc-titolo { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; text-wrap: balance; }
.acc-sotto  { font-size: 14px; color: var(--tx2); margin-top: 8px; max-width: 60ch; text-wrap: pretty; }
.acc-sotto strong { color: var(--tx); font-weight: 700; }

/* Riga «gratis fino a 50 dipendenti» */
.acc-gratis {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 16px;
    padding: 11px 14px; border-radius: var(--rs);
    background: var(--teal-d); border: 1px solid rgba(29,158,117,.28);
    font-size: 13px; color: var(--tx);
}
.acc-gratis svg { width: 16px; height: 16px; color: var(--teal-tx); flex-shrink: 0; margin-top: 2px; }
.acc-gratis strong { font-weight: 700; }

.acc-piede {
    width: 100%; max-width: 680px; margin-top: auto;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
    font-size: 12.5px; color: var(--tx2); text-align: center;
}
.acc-piede a { color: var(--tx2); display: inline-flex; align-items: center; min-height: 44px; }
.acc-piede a:hover { color: var(--tx); }

/* ── Campi ────────────────────────────────────────────── */
.campo { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.campo-etichetta {
    font-size: 12px; font-weight: 700; color: var(--tx2);
    text-transform: uppercase; letter-spacing: .05em;
}
.campo-etichetta .facoltativo { text-transform: none; letter-spacing: 0; font-weight: 500; }
.campo-cornice { position: relative; }
.campo-icona {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--tx3); pointer-events: none; display: flex;
}
.campo-icona svg { width: 16px; height: 16px; }
.campo-input, .campo-select {
    width: 100%; min-height: 48px;
    padding: 12px 14px; border-radius: var(--rs);
    border: 1px solid var(--gb); background: var(--glass);
    color: var(--tx); font-size: 16px; line-height: 1.4;
    outline: none; appearance: none; -webkit-appearance: none;
    transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}
.campo-cornice .campo-input { padding-left: 42px; }
.campo-cornice--occhio .campo-input { padding-right: 52px; }
.campo-input::placeholder { color: var(--ph); }
.campo-input:hover, .campo-select:hover { border-color: var(--gb2); }
.campo-input:focus, .campo-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-d); }
.campo-input[readonly] { background: transparent; border-style: dashed; color: var(--tx2); }
.campo-input[aria-invalid="true"], .campo-select[aria-invalid="true"] {
    border-color: rgba(248,113,113,.7); background: rgba(239,68,68,.06);
}
.campo-input[aria-invalid="true"]:focus, .campo-select[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}
.campo-input[type="time"] { padding-right: 10px; font-variant-numeric: tabular-nums; }
.campo-input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.85); opacity: .7; cursor: pointer; }

.campo-select {
    padding-right: 42px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f0f4ff' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.campo-select option { background: #1a2236; color: var(--tx); }

.campo-occhio {
    position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: var(--rx);
    border: none; background: transparent; color: var(--tx2); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--ease), background-color var(--ease);
}
.campo-occhio:hover { color: var(--tx); background: var(--glass2); }
.campo-occhio svg { width: 17px; height: 17px; }

.campo-aiuto { font-size: 13px; color: var(--tx2); line-height: 1.45; }
.campo-errore {
    display: flex; align-items: flex-start; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--red-tx); line-height: 1.4;
}
.campo-errore:empty { display: none; }
.campo-errore svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* Regole della password, spuntate mentre si scrive */
.regole { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--tx2); }
.regole li { display: inline-flex; align-items: center; gap: 6px; transition: color var(--ease); }
.regole li svg { width: 15px; height: 15px; color: var(--tx3); transition: color var(--ease); }
.regole li.ok { color: var(--tx); }
.regole li.ok svg { color: var(--teal-tx); }
.regole li .si { display: none; }
.regole li.ok .si { display: block; }
.regole li.ok .no { display: none; }

/* Consenso */
.consenso {
    display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
    font-size: 13.5px; color: var(--tx2); line-height: 1.5;
}
.consenso input {
    width: 22px; height: 22px; flex-shrink: 0; margin-top: 0; cursor: pointer;
    accent-color: var(--teal);
}
.consenso-cornice { padding: 10px 0; }
.consenso a { font-weight: 700; }

/* Campo trappola per i robot: fuori dallo schermo, fuori dalla tastiera e dai lettori */
.campo-trappola {
    position: absolute !important; left: -10000px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}

/* ── Messaggi ─────────────────────────────────────────── */
.avviso {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: var(--rs);
    font-size: 13.5px; line-height: 1.5;
}
.avviso > svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.avviso strong { font-weight: 700; }
.avviso ul { margin: 6px 0 0 18px; }
.avviso li + li { margin-top: 2px; }
.avviso a { color: inherit; font-weight: 700; text-decoration: underline; }
.avviso:focus { outline: none; }
.avviso:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.avviso-errore:focus-visible { outline-color: var(--red-tx); }
.avviso-errore  { background: var(--red-d);   border: 1px solid rgba(239,68,68,.3);  color: var(--red-tx); }
.avviso-errore strong, .avviso-errore a { color: #fecaca; }
.avviso-info    { background: var(--blue-d);  border: 1px solid rgba(55,138,221,.3); color: #9cc7f2; }
.avviso-ok      { background: var(--green-d); border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.avviso-attesa  { background: var(--amber-d); border: 1px solid rgba(245,166,35,.3); color: #fcd38d; }

/* ── Pulsanti ─────────────────────────────────────────── */
.acc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 20px; border-radius: var(--rs);
    font-size: 15px; font-weight: 700; letter-spacing: .1px; text-decoration: none;
    border: 1px solid transparent; cursor: pointer; text-align: center;
    transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease),
                background-color var(--ease), border-color var(--ease), color var(--ease);
}
.acc-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.acc-btn--pieno {
    /* fase 3: verde più scuro sotto il testo bianco, contrasto 4,9:1 (AA) */
    background: linear-gradient(135deg, #13805f, var(--teal-dk));
    color: #fff; box-shadow: 0 0 24px var(--teal-g);
}
.acc-btn--pieno:hover { color: #fff; opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 32px var(--teal-g); }
.acc-btn--pieno:active { transform: none; }
.acc-btn--vetro {
    background: var(--glass); border-color: var(--gb); color: var(--tx);
}
.acc-btn--vetro:hover { background: var(--glass2); border-color: var(--gb2); color: var(--tx); }
.acc-btn--testo {
    background: transparent; color: var(--tx2); font-weight: 600; padding-left: 12px; padding-right: 12px;
}
.acc-btn--testo:hover { color: var(--tx); background: var(--glass); }
.acc-btn--largo { width: 100%; }
.acc-btn:disabled, .acc-btn[aria-disabled="true"] {
    opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}
.acc-btn .gira { animation: acc-gira 1s linear infinite; }
@keyframes acc-gira { to { transform: rotate(360deg); } }

.azioni { display: flex; flex-direction: column; gap: 10px; }

/* ── Stati (email inviata, conferma, invito) ─────────── */
.stato { text-align: center; display: flex; flex-direction: column; align-items: center; }
.stato-icona {
    width: 64px; height: 64px; border-radius: 18px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
}
.stato-icona svg { width: 28px; height: 28px; }
.stato-icona--ok     { background: var(--teal-d);  color: var(--teal-tx); box-shadow: 0 0 32px rgba(29,158,117,.25); }
.stato-icona--attesa { background: var(--amber-d); color: var(--amber); }
.stato-icona--errore { background: var(--red-d);   color: var(--red-tx); }
.stato-icona--info   { background: var(--blue-d);  color: #7fb5ea; }
.stato .acc-sotto { margin-left: auto; margin-right: auto; }
.indirizzo {
    display: inline-block; max-width: 100%; margin-top: 4px;
    font-weight: 700; color: var(--tx); overflow-wrap: anywhere;
}

/* Passi numerati dentro un riquadro (cosa fare adesso) */
.istruzioni {
    list-style: none; counter-reset: istr; text-align: left; width: 100%;
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 18px; border-radius: 16px; background: var(--glass); border: 1px solid var(--gb);
}
.istruzioni li { counter-increment: istr; display: flex; gap: 12px; font-size: 14px; color: var(--tx2); }
.istruzioni li::before {
    content: counter(istr); flex-shrink: 0;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--teal-d); color: var(--teal-tx);
    font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.istruzioni strong { color: var(--tx); }

.separatore { height: 1px; background: var(--gb); width: 100%; }
.nota { font-size: 13px; color: var(--tx2); text-align: center; text-wrap: pretty; }

/* ── Primo accesso: indicatore dei passi ─────────────── */
.passi { padding: 24px 36px 0; }
.passi-testo {
    font-size: 13px; font-weight: 700; color: var(--teal-tx);
    display: flex; align-items: center; gap: 6px;
}
.passi-testo span { color: var(--tx2); font-weight: 600; }
.passi-barra {
    list-style: none; margin-top: 12px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.passi-barra li { min-width: 0; }
.passi-barra a, .passi-barra span.passo {
    display: flex; flex-direction: column; gap: 8px; min-height: 44px; padding-top: 0;
    font-size: 12px; font-weight: 600; color: var(--tx2); text-decoration: none;
}
.passi-barra a::before, .passi-barra span.passo::before {
    content: ''; display: block; height: 5px; border-radius: 99px; background: var(--glass3);
    transition: background-color var(--ease), box-shadow var(--ease);
}
.passi-barra .fatto a::before    { background: var(--teal); }
.passi-barra .fatto a:hover       { color: var(--tx); }
.passi-barra .attuale span.passo  { color: var(--tx); font-weight: 700; }
.passi-barra .attuale span.passo::before { background: var(--teal); box-shadow: 0 0 10px var(--teal-g); }
.passi-barra .etichetta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Barra in fondo al passo: Indietro · Salta · Salva e continua */
.passo-azioni {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 18px 36px 24px; border-top: 1px solid var(--gb);
}
.passo-azioni .spinta { flex: 1; }

/* ── Primo accesso: righe che si aggiungono e si tolgono ─ */
.righe { display: flex; flex-direction: column; gap: 10px; }
.riga { display: flex; align-items: flex-start; gap: 8px; }
.riga .campo { flex: 1; }
.btn-togli {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--rs);
    border: 1px solid var(--gb); background: var(--glass); color: var(--tx2); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.btn-togli:hover { background: var(--red-d); border-color: rgba(239,68,68,.3); color: var(--red-tx); }
.btn-togli svg { width: 17px; height: 17px; }

.btn-aggiungi {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    min-height: 48px; padding: 10px 16px; border-radius: var(--rs);
    border: 1.5px dashed rgba(255,255,255,.16); background: transparent;
    color: var(--tx2); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: border-color var(--ease), color var(--ease), background-color var(--ease);
}
.btn-aggiungi:hover { border-color: var(--teal); color: var(--teal-tx); background: var(--teal-d); }
.btn-aggiungi svg { width: 16px; height: 16px; }
.btn-aggiungi[hidden] { display: none; }

.righe-vuote {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--rs); background: var(--glass); border: 1px solid var(--gb);
    font-size: 13.5px; color: var(--tx2);
}
.righe-vuote svg { width: 18px; height: 18px; color: var(--tx3); flex-shrink: 0; }
.righe-vuote[hidden] { display: none; }

.contatore { font-size: 13px; color: var(--tx2); }

/* Suggerimenti di reparto in base al settore */
.suggerimenti { display: flex; flex-wrap: wrap; gap: 8px; }
.suggerimenti[hidden] { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 8px 14px; border-radius: 99px;
    border: 1px solid var(--gb); background: var(--glass); color: var(--tx);
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: background-color var(--ease), border-color var(--ease);
}
.chip:hover { background: var(--teal-d); border-color: rgba(29,158,117,.35); }
.chip svg { width: 14px; height: 14px; color: var(--teal-tx); }
.chip[hidden] { display: none; }

/* Tipo di turno: riquadro con anteprima del blocco del calendario */
.turno {
    --c: var(--teal);
    border: 1px solid var(--gb); border-radius: 16px; background: var(--glass);
    padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.turno-testa { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.turno-griglia {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px;
}
.anteprima-turno {
    display: inline-flex; flex-direction: column; min-width: 0; max-width: 100%;
    padding: 5px 10px 5px 9px; border-radius: 5px;
    background: color-mix(in srgb, var(--c) 12%, transparent);
    border-left: 2.5px solid var(--c); color: var(--c);
}
.anteprima-turno b { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anteprima-turno small { font-size: 11.5px; opacity: .85; font-variant-numeric: tabular-nums; }

.colori { border: none; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.colori legend { padding: 0; margin-bottom: 7px; }
.colori-scelta { display: flex; flex-wrap: wrap; gap: 4px; }
.colore { position: relative; display: block; }
.colore input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.colore span {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    border: 1px solid transparent;
    transition: border-color var(--ease), background-color var(--ease);
}
.colore span::before {
    content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.colore:hover span { background: var(--glass2); }
.colore input:checked + span { border-color: var(--sw); background: var(--glass2); }
.colore input:checked + span::before { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--sw); width: 20px; height: 20px; }
.colore input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Inviti già mandati */
.lista-semplice { list-style: none; display: flex; flex-direction: column; border: 1px solid var(--gb); border-radius: 16px; overflow: hidden; }
.lista-semplice li {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0;
    border-bottom: 1px solid var(--gb); font-size: 13.5px;
}
.lista-semplice li:last-child { border-bottom: none; }
.lista-semplice .chi { flex: 1; min-width: 0; }
.lista-semplice .chi b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-semplice .chi small { display: block; color: var(--tx2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iniziali {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--teal), var(--teal-dk));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
}
.etichetta-stato {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.etichetta-stato svg { width: 12px; height: 12px; }
.etichetta-stato--attesa { background: var(--amber-d); color: #fcd38d; }
.etichetta-stato--ok     { background: var(--teal-d);  color: var(--teal-tx); }

/* Riga invito: nome + email */
.invito-riga { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 48px; gap: 8px; align-items: start; }
.invito-riga .btn-togli { margin-top: 26px; }

/* Riepilogo finale */
.riepilogo { list-style: none; display: flex; flex-direction: column; border: 1px solid var(--gb); border-radius: 16px; overflow: hidden; }
.riepilogo > li { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--gb); min-width: 0; }
.riepilogo > li:last-child { border-bottom: none; }
.riepilogo-icona {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--teal-d); color: var(--teal-tx);
}
.riepilogo-icona svg { width: 17px; height: 17px; }
.riepilogo-icona--vuota { background: var(--glass2); color: var(--tx3); }
.riepilogo-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.riepilogo-testo h2 { font-size: 12px; font-weight: 700; color: var(--tx2); text-transform: uppercase; letter-spacing: .05em; }
.riepilogo-testo p { font-size: 14px; color: var(--tx); overflow-wrap: anywhere; }
.riepilogo-testo p.vuoto { color: var(--tx2); }
.riepilogo-modifica {
    align-self: center; flex-shrink: 0; font-size: 13px; font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
}
.pillole { display: flex; flex-wrap: wrap; gap: 6px; }
.pillola {
    display: inline-flex; align-items: center; max-width: 100%;
    padding: 3px 10px; border-radius: 99px; background: var(--glass2);
    font-size: 12.5px; font-weight: 600; color: var(--tx);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.prossimo {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(29,158,117,.16), rgba(55,138,221,.06));
    border: 1px solid rgba(29,158,117,.28);
}
.prossimo > svg { width: 20px; height: 20px; color: var(--teal-tx); flex-shrink: 0; margin-top: 2px; }
.prossimo p { font-size: 14px; color: var(--tx2); }
.prossimo strong { color: var(--tx); }
.segno-piu {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: -3px;
    width: 20px; height: 18px; margin: 0 3px; border-radius: 5px; border: 1.5px dashed rgba(29,158,117,.6); color: var(--teal-tx);
}
.segno-piu svg { width: 11px; height: 11px; }

/* ── Telefono ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .acc-pagina { padding: 12px 16px 20px; gap: 14px; }
    .acc-scheda-testa { padding: 24px 20px 0; }
    .acc-scheda-corpo { padding: 20px 20px 24px; }
    .acc-scheda-piede { padding: 14px 20px 18px; }
    .passi { padding: 20px 20px 0; }
    .passo-azioni { padding: 16px 20px 20px; }
    .acc-titolo { font-size: 22px; }
    .passi-barra .etichetta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .passi-barra a, .passi-barra span.passo { min-height: 44px; padding-top: 12px; gap: 0; }
    .passi { padding-bottom: 0; }
    .passi-barra { margin-top: 0; }
    .turno { padding: 12px; }
    .colori-scelta { gap: 2px; }
    .turno-griglia { grid-template-columns: 1fr 1fr; }
    .turno-griglia .campo--nome { grid-column: 1 / -1; }
    .invito-riga {
        grid-template-columns: minmax(0, 1fr) 48px; row-gap: 12px;
        padding: 12px; border: 1px solid var(--gb); border-radius: 16px; background: var(--glass);
    }
    .invito-riga .campo--email { grid-column: 1 / -1; }
    .invito-riga .btn-togli { grid-column: 2; grid-row: 1; }
    /* Barra dei passi: azione principale per prima e larga, sotto le altre */
    .passo-azioni { flex-direction: column-reverse; align-items: stretch; }
    .passo-azioni .spinta { display: none; }
    .passo-azioni .acc-btn { width: 100%; }
}

/* ── Meno movimento ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important; animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
    .acc-btn--pieno:hover { transform: none; }
}

/* ── Fase 2, giro 2 (30/10/2026): accesso, recupero, consensi, app ─ */

/* Etichetta con un link sulla stessa riga (es. «Password dimenticata?») */
.campo-testa { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.campo-testa a {
    font-size: 13px; font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; padding: 0 2px;
}
.campo-testa a:hover { text-decoration: underline; }

/* Consensi della registrazione: casella, aiuto ed errore allineati al testo */
.consenso input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.consenso input[aria-invalid="true"] { outline: 2px solid var(--red-tx); outline-offset: 2px; }
.consenso strong { color: var(--tx); font-weight: 700; }
.consenso-aiuto {
    padding-left: 34px; margin-top: 6px;
    font-size: 13px; color: var(--tx2); line-height: 1.5; text-wrap: pretty;
}
.consenso-cornice .campo-errore { padding-left: 34px; margin-top: 6px; }
.consensi { display: flex; flex-direction: column; border-top: 1px solid var(--gb); padding-top: 6px; }

/* Link che si apre in una nuova scheda: piccola freccia dopo il testo */
.link-fuori { white-space: nowrap; }
.link-fuori svg { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-left: 3px; }

/* Email da confermare (login): avviso e pulsante «Rimanda l'email» insieme */
.da-confermare { display: flex; flex-direction: column; gap: 12px; }
.da-confermare .avviso span { display: block; margin-top: 2px; }

/* «Installa l'app» sotto la scheda delle pagine d'accesso (pwa.js lo mostra solo se si può) */
.acc-installa { width: 100%; max-width: 440px; }
.acc-installa .pwa-installa { min-height: 48px; font-size: 14px; border-radius: var(--rs); }
.stato .pwa-installa { width: 100%; min-height: 48px; font-size: 14px; border-radius: var(--rs); }

/* Informazione breve in fondo a un modulo (es. altri dispositivi da riaprire) */
.nota-sinistra { font-size: 13px; color: var(--tx2); display: flex; gap: 8px; align-items: flex-start; }
.nota-sinistra svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--tx3); }

/* ── Attività in eliminazione (pages/eliminazione.php) ─ */
.grazia {
    width: 100%; margin-top: 20px; text-align: left;
    padding: 14px 16px 16px; border-radius: 16px;
    background: var(--amber-d); border: 1px solid rgba(245,166,35,.3);
}
.grazia-riga { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.grazia-giorni { font-size: 15px; color: #fcd38d; }
.grazia-giorni strong { font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: #fde3b4; font-variant-numeric: tabular-nums; }
.grazia-data { font-size: 13px; color: var(--tx2); }
.grazia-barra { margin-top: 10px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.grazia-barra span { display: block; height: 100%; border-radius: inherit; background: var(--amber); }
.conseguenze { list-style: none; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.conseguenze li { display: flex; gap: 10px; font-size: 14px; color: var(--tx2); line-height: 1.5; }
.conseguenze li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }
.conseguenze li strong { color: var(--tx); }
.conseguenze .stop svg { color: var(--red-tx); }
.conseguenze .ok svg   { color: var(--teal-tx); }
.azioni--larghe { width: 100%; margin-top: 22px; }
.azioni--larghe form { width: 100%; }

/* ── Testi legali (legale/*.php, fase 5) ──────────────── */
.legale-testa { padding-bottom: 4px; }
.legale-occhiello {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
    font-size: 12.5px; font-weight: 700; color: var(--teal-tx);
}
.legale-occhiello svg { width: 16px; height: 16px; }
.legale-versione {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
    padding: 6px 12px; border-radius: 99px; background: var(--glass2); border: 1px solid var(--gb);
    font-size: 12.5px; font-weight: 600; color: var(--tx2);
}
.legale-versione svg { width: 14px; height: 14px; color: var(--tx3); }
.legale-versione time { color: var(--tx); font-variant-numeric: tabular-nums; }
.legale-corpo { gap: 22px; }

.legale-indice {
    padding: 16px 18px; border-radius: var(--rs);
    background: var(--glass); border: 1px solid var(--gb);
}
.legale-indice-titolo { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--tx); margin-bottom: 6px; }
.legale-indice ol { list-style: none; counter-reset: voce; display: flex; flex-direction: column; }
.legale-indice > ol > li { counter-increment: voce; }
.legale-indice a {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0;
    color: var(--tx2); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.35;
}
.legale-indice > ol > li > a::before {
    content: counter(voce); flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--teal-d); color: var(--teal-tx); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.legale-indice ol ol { padding-left: 34px; }
.legale-indice ol ol a { font-weight: 500; font-size: 13.5px; min-height: 40px; }
.legale-indice a:hover { color: var(--tx); }
.legale-indice a:hover::before { background: var(--teal); color: #fff; }

.legale-testo { font-size: 15px; line-height: 1.7; color: rgba(240,244,255,.86); max-width: 68ch; overflow-wrap: anywhere; }
.legale-testo > * + * { margin-top: 14px; }
.legale-testo h2 {
    font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.3; color: var(--tx);
    margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--gb); scroll-margin-top: 16px; text-wrap: balance;
}
.legale-testo > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legale-testo h3 { font-size: 16px; font-weight: 700; color: var(--tx); margin-top: 24px; scroll-margin-top: 16px; }
.legale-testo h4 { font-size: 15px; font-weight: 700; color: var(--tx); margin-top: 18px; }
.legale-testo strong { color: var(--tx); font-weight: 700; }
.legale-testo a { color: var(--teal-tx); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legale-testo a:hover { color: #6fe0b8; }
.legale-testo ul, .legale-testo ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legale-testo ul { list-style: disc; }
.legale-testo ol { list-style: decimal; }
.legale-testo li::marker { color: var(--teal-tx); }
.legale-testo li > ul, .legale-testo li > ol { margin-top: 6px; }
.legale-testo blockquote {
    padding: 12px 16px; border-left: 3px solid var(--teal); border-radius: 0 var(--rs) var(--rs) 0;
    background: var(--teal-d); color: var(--tx);
}
.legale-testo hr { border: 0; border-top: 1px solid var(--gb); margin: 26px 0; }
.legale-testo code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--glass2); }
.legale-tabella { overflow-x: auto; border: 1px solid var(--gb); border-radius: var(--rs); }
.legale-tabella table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.5; }
.legale-tabella th { text-align: left; font-weight: 700; color: var(--tx); background: var(--glass2); }
.legale-tabella th, .legale-tabella td { padding: 10px 12px; border-bottom: 1px solid var(--gb); vertical-align: top; }
.legale-tabella tr:last-child td { border-bottom: 0; }
/* Parole intere nelle celle (niente «trattamen-to»): si va a capo solo fra le parole */
.legale-tabella th, .legale-tabella td { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
.legale-tabella th:first-child, .legale-tabella td:first-child { min-width: 9.5em; }
.legale-su { margin-top: 4px; }
.legale-su a {
    display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
    font-size: 13px; font-weight: 600; color: var(--tx2); text-decoration: none;
}
.legale-su a:hover { color: var(--tx); }
.legale-su svg { width: 15px; height: 15px; }
.legale-firma { display: inline-flex; align-items: center; min-height: 44px; }
.acc-legale .acc-scheda:focus { outline: none; }
.acc-legale .avviso strong { display: block; }

@media (max-width: 640px) {
    .legale-testo { font-size: 15px; }
    .legale-testo h2 { font-size: 18px; margin-top: 28px; }
    .legale-indice { padding: 12px 14px; }
    /* Tabelle: al telefono ogni riga diventa una scheda leggibile */
    .legale-tabella { border: 0; overflow: visible; }
    .legale-tabella thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .legale-tabella table, .legale-tabella tbody, .legale-tabella tr, .legale-tabella td { display: block; width: 100%; }
    .legale-tabella tr { border: 1px solid var(--gb); border-radius: var(--rs); padding: 8px 12px; background: var(--glass); }
    .legale-tabella tr + tr { margin-top: 10px; }
    .legale-tabella td { border: 0; padding: 4px 0; }
    .legale-tabella td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--tx2); }
}

@media print {
    body.acc-legale { background: #fff; color: #111; }
    .acc-legale .acc-pagina { padding: 0; }
    .acc-legale .acc-testa, .acc-legale .legale-altri, .acc-legale .legale-su, .acc-legale .acc-installa, .acc-legale .salta-link { display: none; }
    .acc-legale .acc-scheda { border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; }
    .acc-legale .acc-titolo, .acc-legale .legale-testo, .acc-legale .legale-testo h2, .acc-legale .legale-testo h3, .acc-legale .legale-testo strong { color: #111; }
    .acc-legale .acc-sotto, .acc-legale .legale-versione, .acc-legale .legale-indice a { color: #333; }
    .acc-legale .legale-testo a { color: #0d5c44; }
}

/* ============================================================
   Fase 5 (S13) — classi al posto degli style="" in linea
   La CSP stretta non accetta attributi style nelle pagine: ogni
   dichiarazione che stava in linea è diventata una classe u-*
   (nome = sigla della proprietà + valore). Hanno !important come
   aveva la priorità dello stile in linea; display no, così
   l'attributo hidden e .hide-sm continuano a nascondere.
   Per le pagine nuove meglio una classe con un nome vero.
   ============================================================ */

/* ── Utilità u-* ── */
.u-d-flex { display: flex; }
.u-d-inline { display: inline; }
.u-d-inline-flex { display: inline-flex; }
.u-dir-column { flex-direction: column !important; }
.u-ai-center { align-items: center !important; }
.u-gap-8 { gap: 8px !important; }
.u-c-tx { color: var(--tx) !important; }
.u-m-0 { margin: 0 !important; }
.u-m-18-0-0 { margin: 18px 0 0 !important; }
.u-m-22-0-18 { margin: 22px 0 18px !important; }
.u-minh-44 { min-height: 44px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mt-16 { margin-top: 16px !important; }
.u-mt-18 { margin-top: 18px !important; }
.u-mt-20 { margin-top: 20px !important; }
.u-mt-6 { margin-top: 6px !important; }
.u-ow-anywhere { overflow-wrap: anywhere !important; }
.u-pb-0 { padding-bottom: 0 !important; }
.u-pt-22 { padding-top: 22px !important; }
.u-ta-left { text-align: left !important; }
.u-w-100pct { width: 100% !important; }

/* ── Fase 5: larghezze delle barre (lw-0 ... lw-100 = 0% ... 100%) ── */
.lw-0 { width: 0% !important; }
.lw-1 { width: 1% !important; }
.lw-2 { width: 2% !important; }
.lw-3 { width: 3% !important; }
.lw-4 { width: 4% !important; }
.lw-5 { width: 5% !important; }
.lw-6 { width: 6% !important; }
.lw-7 { width: 7% !important; }
.lw-8 { width: 8% !important; }
.lw-9 { width: 9% !important; }
.lw-10 { width: 10% !important; }
.lw-11 { width: 11% !important; }
.lw-12 { width: 12% !important; }
.lw-13 { width: 13% !important; }
.lw-14 { width: 14% !important; }
.lw-15 { width: 15% !important; }
.lw-16 { width: 16% !important; }
.lw-17 { width: 17% !important; }
.lw-18 { width: 18% !important; }
.lw-19 { width: 19% !important; }
.lw-20 { width: 20% !important; }
.lw-21 { width: 21% !important; }
.lw-22 { width: 22% !important; }
.lw-23 { width: 23% !important; }
.lw-24 { width: 24% !important; }
.lw-25 { width: 25% !important; }
.lw-26 { width: 26% !important; }
.lw-27 { width: 27% !important; }
.lw-28 { width: 28% !important; }
.lw-29 { width: 29% !important; }
.lw-30 { width: 30% !important; }
.lw-31 { width: 31% !important; }
.lw-32 { width: 32% !important; }
.lw-33 { width: 33% !important; }
.lw-34 { width: 34% !important; }
.lw-35 { width: 35% !important; }
.lw-36 { width: 36% !important; }
.lw-37 { width: 37% !important; }
.lw-38 { width: 38% !important; }
.lw-39 { width: 39% !important; }
.lw-40 { width: 40% !important; }
.lw-41 { width: 41% !important; }
.lw-42 { width: 42% !important; }
.lw-43 { width: 43% !important; }
.lw-44 { width: 44% !important; }
.lw-45 { width: 45% !important; }
.lw-46 { width: 46% !important; }
.lw-47 { width: 47% !important; }
.lw-48 { width: 48% !important; }
.lw-49 { width: 49% !important; }
.lw-50 { width: 50% !important; }
.lw-51 { width: 51% !important; }
.lw-52 { width: 52% !important; }
.lw-53 { width: 53% !important; }
.lw-54 { width: 54% !important; }
.lw-55 { width: 55% !important; }
.lw-56 { width: 56% !important; }
.lw-57 { width: 57% !important; }
.lw-58 { width: 58% !important; }
.lw-59 { width: 59% !important; }
.lw-60 { width: 60% !important; }
.lw-61 { width: 61% !important; }
.lw-62 { width: 62% !important; }
.lw-63 { width: 63% !important; }
.lw-64 { width: 64% !important; }
.lw-65 { width: 65% !important; }
.lw-66 { width: 66% !important; }
.lw-67 { width: 67% !important; }
.lw-68 { width: 68% !important; }
.lw-69 { width: 69% !important; }
.lw-70 { width: 70% !important; }
.lw-71 { width: 71% !important; }
.lw-72 { width: 72% !important; }
.lw-73 { width: 73% !important; }
.lw-74 { width: 74% !important; }
.lw-75 { width: 75% !important; }
.lw-76 { width: 76% !important; }
.lw-77 { width: 77% !important; }
.lw-78 { width: 78% !important; }
.lw-79 { width: 79% !important; }
.lw-80 { width: 80% !important; }
.lw-81 { width: 81% !important; }
.lw-82 { width: 82% !important; }
.lw-83 { width: 83% !important; }
.lw-84 { width: 84% !important; }
.lw-85 { width: 85% !important; }
.lw-86 { width: 86% !important; }
.lw-87 { width: 87% !important; }
.lw-88 { width: 88% !important; }
.lw-89 { width: 89% !important; }
.lw-90 { width: 90% !important; }
.lw-91 { width: 91% !important; }
.lw-92 { width: 92% !important; }
.lw-93 { width: 93% !important; }
.lw-94 { width: 94% !important; }
.lw-95 { width: 95% !important; }
.lw-96 { width: 96% !important; }
.lw-97 { width: 97% !important; }
.lw-98 { width: 98% !important; }
.lw-99 { width: 99% !important; }
.lw-100 { width: 100% !important; }
