/* ============================================================
   Fenice · stellare.css
   Il guscio e i componenti della demo «Una giornata in Stellari» (demo/sito/stile.css),
   portati nel Fenice di produzione. Si carica PER ULTIMO (dopo interfaccia.css).
   - Guscio: barra laterale, barra in alto di vetro, tab bar e pillole su telefono,
     menu del profilo, Cerca ⌘K, toast, modali, accesso. Disegnato da shell() e renderLogin() in app.js.
   - Componenti condivisi con prefisso st- (elenco ed esempi in STELLARE.md).
   Colori: solo token --fe-* (tokens.css) più i pochi --st-* qui sotto che nei token non ci sono.
   Chiaro e scuro con [data-theme] su <html> (lo mette sempre index.html).
   Testi italiani, mai la lineetta lunga.
   ============================================================ */

/* ===== 1. Token del guscio (quelli che i --fe-* non hanno) ===== */
:root, [data-theme="light"] {
  --st-alto: 52px; --st-lato: 248px; --st-tab: 64px; --st-fam: 0px;
  --st-safe-b: env(safe-area-inset-bottom, 0px); --st-sx: env(safe-area-inset-left, 0px); --st-dx: env(safe-area-inset-right, 0px);
  --st-btn-bg: #D9361A; --st-btn-text: #FFFFFF;
  --st-ai: #7A5CE6;
  --st-glass-border: rgba(22,17,15,.08);
  --st-sh-flat: 0 1px 2px rgba(17,18,20,.06);
  --st-sh-card: 0 1px 2px rgba(17,18,20,.05), 0 8px 24px -8px rgba(17,18,20,.14);
  --st-sh-pop: 0 2px 6px rgba(17,18,20,.08), 0 30px 60px -20px rgba(17,18,20,.28);
  --st-vetro-forte: color-mix(in srgb, var(--fe-surface) 90%, transparent);
  --st-seg-cursore: var(--fe-surface);
  --st-toast-azione: #FF8C70;
  --st-oro-text: #9A6400; --st-oro-soft: #FFF6E3;
  --st-fam-grad: linear-gradient(90deg, #2EE59D 0%, #3366FF 50%, #FF4D2E 100%);
  --st-fam-grad-d: linear-gradient(135deg, #2EE59D 0%, #3366FF 52%, #FF4D2E 100%);
  --st-molla: cubic-bezier(.2,.9,.25,1.12); --st-uscita: cubic-bezier(.22,1,.36,1);
  --st-t-breve: 200ms; --st-t-medio: 360ms; --st-t-lungo: 520ms; --st-t-grafico: 600ms; --st-sfalsa: 40ms;
  --st-linea: .5px;
}
[data-theme="dark"] {
  --st-btn-bg: #FF6A4A; --st-btn-text: #1A0A06;
  --st-glass-border: rgba(255,236,228,.08);
  --st-sh-flat: 0 0 0 .5px rgba(255,255,255,.08);
  --st-sh-card: 0 0 0 .5px rgba(255,255,255,.08), 0 8px 24px -8px rgba(0,0,0,.6);
  --st-sh-pop: 0 0 0 .5px rgba(255,255,255,.10), 0 30px 60px -20px rgba(0,0,0,.8);
  --st-seg-cursore: #3A3B40;
  --st-toast-azione: #C2331A;
  --st-oro-text: #FFC24A; --st-oro-soft: rgba(242,165,22,.16);
}
@media (max-resolution: 1.49dppx) { :root { --st-linea: 1px; } }
@media (prefers-reduced-motion: reduce) {
  :root { --st-t-breve: 1ms; --st-t-medio: 1ms; --st-t-lungo: 1ms; --st-t-grafico: 1ms; --st-sfalsa: 0ms; }
}
html, body { background: var(--fe-paper); }
body { font: 400 15px/1.5 var(--fe-font); font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: color-mix(in srgb, var(--fe-primary) 24%, transparent); }
.st-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== 2. Guscio ===== */
/* .shell resta come gancio per applicaVista() (scheda intera); il disegno è tutto di .st-guscio */
.shell.st-guscio { display: block; min-height: 100vh; min-height: 100dvh; padding-left: calc(var(--st-fam) + var(--st-lato) + var(--st-sx)); transition: none; }
/* azzeramento dei pulsanti del guscio (solo i suoi: i pulsanti delle pagine restano come sono) */
:where(.st-voce, .st-profilo, .st-strumento, .st-famiglia__avatar, .st-campo-cerca, .st-alto__avatar, .st-tema button, .st-pillola, .st-tab__voce, .st-come__torna) {
  font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; text-decoration: none; }
.st-alto__app { color: inherit; text-decoration: none; }
.st-vetro { background: var(--fe-glass-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.st-guscio :focus-visible, .st-menu :focus-visible { outline: 2px solid var(--fe-primary-text); outline-offset: 2px; border-radius: 6px; }

/* Barra laterale */
.st-lato {
  position: fixed; z-index: 21; left: calc(var(--st-fam) + var(--st-sx)); top: 0; bottom: 0; width: var(--st-lato);
  display: flex; flex-direction: column; padding: 20px 12px 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  border-right: .5px solid var(--st-glass-border); color: var(--fe-ink);
  transition: background-color var(--st-t-medio) var(--st-uscita), border-color var(--st-t-medio) var(--st-uscita);
}
.st-lato::-webkit-scrollbar { display: none; }
.st-lato__testa { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.st-lato__icona { flex: none; display: block; width: 44px; height: 44px; border-radius: 22.37%; box-shadow: 0 6px 16px -8px rgba(0,0,0,.45); }
.st-lato__nomi { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-lato__riga { display: flex; align-items: center; gap: 8px; }
.st-lato__nome { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.st-lato__firma { font-size: 13px; color: var(--fe-secondary); line-height: 1.2; white-space: nowrap; }
/* pillola accanto al nome, come «INTEL» di Falcon ma nel rosso di Fenice */
.st-pillola-mono { font: 500 10.5px/1 var(--fe-mono); letter-spacing: .12em; padding: 5px 7px 4px; border-radius: 7px; background: var(--fe-primary-soft); color: var(--fe-primary-text); }
.st-lato__voci { display: flex; flex-direction: column; gap: 2px; }
.st-lato__gruppo { display: flex; flex-direction: column; gap: 2px; }
.st-lato__gruppo + .st-lato__gruppo { margin-top: 6px; }
.st-lato__titolo { margin: 0; padding: 4px 10px 2px; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--fe-tertiary); letter-spacing: .01em; }
.st-voce { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 7px 10px; border-radius: 12px; text-align: left;
  color: var(--fe-ink); transition: background-color var(--st-t-breve) var(--st-uscita); }
.st-voce:hover { background: var(--fe-hover); }
.st-voce:active { background: var(--fe-sel); }
.st-voce.is-attiva { background: color-mix(in srgb, var(--fe-primary) 11%, transparent); }
.st-voce__testi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.st-voce__titolo { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.st-voce.is-attiva .st-voce__titolo { font-weight: 600; }
.st-voce__sotto { font-size: 12.5px; color: var(--fe-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.st-voce__badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  font: 600 12px/1 var(--fe-font); color: #fff; background: var(--fe-error); }
.st-voce__esterno { flex: none; width: 14px; height: 14px; color: var(--fe-tertiary); }
.st-lato__piede { margin-top: auto; padding: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.st-profilo { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 8px; border-radius: 12px; text-align: left;
  transition: background-color var(--st-t-breve) var(--st-uscita); }
.st-profilo:hover { background: var(--fe-hover); }
.st-profilo[aria-expanded="true"] { background: var(--fe-sel); }
.st-profilo__testi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.st-profilo__nome { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-profilo__ruolo { font-size: 12.5px; color: var(--fe-secondary); }
.st-profilo__chev { flex: none; width: 16px; height: 16px; color: var(--fe-tertiary); }
.st-lato__marchio { margin: 0; padding: 2px 10px 0; display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.35; color: var(--fe-secondary); }
.st-marchio { --s: 12px; flex: none; display: block; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), rgba(255,255,255,0) 46%), var(--st-fam-grad-d);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.25); }

/* Barra di famiglia (demo: .oi-famiglia): 64 px di vetro a sinistra della barra dell'app.
   La disegna stFamiglia() in app.js, solo con FAMIGLIA=true; sotto i 760 px non c'è. */
.st-guscio.ha-famiglia { --st-fam: 64px; }
.st-famiglia {
  position: fixed; z-index: 22; left: 0; top: 0; bottom: 0; width: calc(var(--st-fam) + var(--st-sx));
  display: flex; flex-direction: column; align-items: center; padding: 16px 0 14px var(--st-sx);
  border-right: .5px solid var(--st-glass-border); color: var(--fe-ink);
  transition: background-color var(--st-t-medio) var(--st-uscita), border-color var(--st-t-medio) var(--st-uscita);
}
.st-famiglia a { color: inherit; text-decoration: none; }
.st-famiglia__marchio { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 14px; }
.st-famiglia__marchio .st-marchio { --s: 28px; box-shadow: 0 4px 14px -4px rgba(51,102,255,.55), inset 0 0 0 .5px rgba(255,255,255,.25);
  transition: transform var(--st-t-medio) var(--st-molla); }
.st-famiglia__marchio:hover .st-marchio { transform: scale(1.06) rotate(-8deg); }
.st-famiglia__app-lista { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.st-famiglia__app { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; }
.st-famiglia__icona { display: block; width: 40px; height: 40px; border-radius: 22.37%; }
.st-famiglia__app .st-famiglia__icona, .st-famiglia__app .st-icona-oggi { transition: transform var(--st-t-medio) var(--st-molla), filter var(--st-t-medio); }
.st-famiglia__app:hover .st-famiglia__icona, .st-famiglia__app:hover .st-icona-oggi { transform: scale(1.07); }
.st-famiglia__app:active .st-famiglia__icona, .st-famiglia__app:active .st-icona-oggi { transform: scale(.94); }
.st-famiglia__ind { position: absolute; left: 0; top: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--fe-ink);
  transform: translateY(var(--y, 0)); opacity: 0; transition: transform var(--st-t-lungo) var(--st-molla), opacity var(--st-t-breve) var(--st-uscita); }
.st-famiglia__ind.is-visibile { opacity: 1; }
.st-badge-app { position: absolute; top: -1px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font: 600 11px/18px var(--fe-font); text-align: center; color: #fff; background: #E5202A;
  box-shadow: 0 0 0 2px var(--fe-paper); letter-spacing: 0; pointer-events: none; }
.st-badge-app:empty { display: none; }
.st-famiglia__strumenti { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.st-famiglia__avatar { margin-top: 8px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.st-famiglia__avatar .st-avatar { transition: transform var(--st-t-medio) var(--st-molla), box-shadow var(--st-t-medio); }
.st-famiglia__avatar:hover .st-avatar { transform: scale(1.06); }
.st-guscio.is-come .st-famiglia__avatar .st-avatar { box-shadow: 0 0 0 2px var(--fe-paper), 0 0 0 4px var(--fe-info); }
/* Suggerimenti al passaggio (come la demo) */
@media (hover: hover) {
  .st-famiglia [data-sugg]::after {
    content: attr(data-sugg); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 5;
    transform: translate(-4px,-50%); opacity: 0; pointer-events: none; white-space: nowrap;
    font: 500 12.5px/1 var(--fe-font); color: var(--fe-paper); background: var(--fe-ink); padding: 7px 10px; border-radius: 8px;
    box-shadow: var(--st-sh-pop); transition: opacity var(--st-t-breve) var(--st-uscita), transform var(--st-t-breve) var(--st-uscita);
  }
  .st-famiglia [data-sugg]:hover::after { opacity: 1; transform: translate(0,-50%); transition-delay: 280ms; }
}
.st-famiglia [aria-expanded="true"]::after { display: none; }
.st-famiglia [data-sugg]:focus-visible::after {
  content: attr(data-sugg); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; z-index: 5;
  font: 500 12.5px/1 var(--fe-font); color: var(--fe-paper); background: var(--fe-ink); padding: 7px 10px; border-radius: 8px; }
/* Altezza bassa: la barra di famiglia scorre invece di tagliare gli strumenti */
@media (max-height: 600px) {
  .st-famiglia { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
  .st-famiglia::-webkit-scrollbar { display: none; }
  .st-famiglia__marchio { margin-bottom: 8px; }
  .st-famiglia__app { width: 44px; height: 44px; }
  .st-famiglia__app-lista { gap: 4px; }
  .st-famiglia__strumenti { padding-top: 10px; }
}
@media (pointer: coarse) { .st-famiglia .st-strumento { width: 44px; height: 44px; } }

/* Tema chiaro / scuro: segmenti come quelli della demo */
.st-tema { position: relative; display: flex; height: 32px; padding: 2px; border-radius: 9px; background: var(--fe-group); }
.st-tema button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--fe-graphite);
  transition: color var(--st-t-breve), background-color var(--st-t-breve); }
.st-tema button svg { width: 14px; height: 14px; }
.st-tema button:hover { color: var(--fe-ink); }
.st-tema button.on { background: var(--st-seg-cursore); color: var(--fe-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(17,18,20,.1), 0 0 0 .5px rgba(17,18,20,.04); }

/* Barra laterale stretta: menu compresso a mano, oppure tablet stretto (761-899 px) */
.st-guscio.is-stretta { --st-lato: 72px; }
.st-guscio.is-stretta .st-lato { padding: 16px 0; align-items: center; }
.st-guscio.is-stretta .st-lato__testa { padding: 0 0 16px; }
.st-guscio.is-stretta .st-lato__icona { width: 40px; height: 40px; }
.st-guscio.is-stretta .st-lato__nomi, .st-guscio.is-stretta .st-voce__testi, .st-guscio.is-stretta .st-voce__esterno,
.st-guscio.is-stretta .st-lato__titolo, .st-guscio.is-stretta .st-profilo__testi, .st-guscio.is-stretta .st-profilo__chev,
.st-guscio.is-stretta .st-tema, .st-guscio.is-stretta .st-lato__marchio span:last-child { display: none; }
.st-guscio.is-stretta .st-lato__voci { align-items: center; }
.st-guscio.is-stretta .st-lato__gruppo { align-items: center; }
.st-guscio.is-stretta .st-lato__gruppo + .st-lato__gruppo { margin-top: 0; padding-top: 8px; position: relative; }
.st-guscio.is-stretta .st-lato__gruppo + .st-lato__gruppo::before { content: ""; position: absolute; top: 3px; left: 14px; right: 14px; height: var(--st-linea); background: var(--fe-separator); }
.st-guscio.is-stretta .st-voce { width: 48px; min-height: 48px; padding: 0; justify-content: center; }
.st-guscio.is-stretta .st-voce__badge { position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; font-size: 10.5px; padding: 0 4px; box-shadow: 0 0 0 2px var(--fe-paper); }
.st-guscio.is-stretta .st-lato__piede { align-items: center; }
.st-guscio.is-stretta .st-profilo { width: 48px; padding: 0; justify-content: center; }
.st-guscio.is-stretta .st-lato__marchio { padding: 6px 0 0; justify-content: center; }

/* Oggi con la barra di famiglia: niente barra dell'app, e nella barra in alto solo «Oggi» */
.st-guscio.is-senza-lato { --st-lato: 0px; }
.st-guscio.is-senza-lato .st-lato, .st-guscio.is-senza-lato .st-alto__app, .st-guscio.is-senza-lato .st-alto__sep { display: none; }

/* Suggerimenti al passaggio nella barra stretta */
@media (hover: hover) {
  .st-guscio.is-stretta [data-sugg]::after {
    content: attr(data-sugg); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 5;
    transform: translate(-4px,-50%); opacity: 0; pointer-events: none; white-space: nowrap;
    font: 500 12.5px/1 var(--fe-font); color: var(--fe-paper); background: var(--fe-ink); padding: 7px 10px; border-radius: 8px;
    box-shadow: var(--st-sh-pop); transition: opacity var(--st-t-breve) var(--st-uscita), transform var(--st-t-breve) var(--st-uscita);
  }
  .st-guscio.is-stretta [data-sugg]:hover::after { opacity: 1; transform: translate(0,-50%); transition-delay: 280ms; }
  .st-guscio.is-stretta .st-lato { overflow: visible; }
}

/* Barra in alto, di vetro */
.st-corpo { min-width: 0; }
.st-testata { position: sticky; top: 0; z-index: 20; border-bottom: .5px solid var(--st-glass-border); color: var(--fe-ink);
  transition: background-color var(--st-t-medio) var(--st-uscita), border-color var(--st-t-medio) var(--st-uscita); }
.st-alto { height: var(--st-alto); display: flex; align-items: center; gap: 14px; padding: 0 max(18px, var(--st-dx)) 0 28px; }
.st-alto__titolo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 15px; white-space: nowrap; }
.st-alto__app { color: var(--fe-secondary); font-weight: 500; border-radius: 6px; transition: color var(--st-t-breve); }
.st-alto__app:hover { color: var(--fe-ink); }
.st-alto__sep { color: var(--fe-tertiary); font-weight: 400; }
.st-alto__pag { font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.st-alto__icona { display: none; }
.st-orologio { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1 var(--fe-mono); color: var(--fe-secondary); letter-spacing: .02em; padding: 0 4px; }
.st-orologio i { width: 6px; height: 6px; border-radius: 50%; background: var(--fe-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fe-success) 22%, transparent); }
.st-campo-cerca { width: 268px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 11px; border-radius: 10px;
  background: color-mix(in srgb, var(--fe-ink) 4.5%, transparent); color: var(--fe-secondary); font-size: 14px; text-align: left;
  box-shadow: inset 0 0 0 .5px var(--st-glass-border); transition: background-color var(--st-t-breve), box-shadow var(--st-t-breve); }
.st-campo-cerca:hover { background: color-mix(in srgb, var(--fe-ink) 7%, transparent); }
.st-campo-cerca svg { width: 16px; height: 16px; flex: none; }
.st-campo-cerca span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tasto { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; font: 500 11px/1 var(--fe-mono); color: var(--fe-secondary);
  background: var(--fe-surface); box-shadow: 0 0 0 .5px var(--fe-separator), var(--st-sh-flat); }
.st-alto__bottoni { display: none; align-items: center; gap: 2px; }
.st-strumento { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--fe-secondary);
  transition: background-color var(--st-t-breve), color var(--st-t-breve), transform var(--st-t-breve) var(--st-molla); }
.st-strumento svg { width: 20px; height: 20px; }
.st-strumento:hover { background: var(--fe-hover); color: var(--fe-ink); }
.st-strumento:active { transform: scale(.94); }
.st-strumento.is-attivo { background: var(--fe-sel); color: var(--fe-ink); }
.st-alto__avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.st-pillole { display: none; }

/* Avatar (iniziali) */
.st-avatar { --s: 28px; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--c, #6E7076); color: #fff; font-weight: 600; font-size: calc(var(--s) * .4); letter-spacing: -.01em; line-height: 1; user-select: none;
  background-image: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0)); }
.st-avatar--tenue { background: color-mix(in srgb, var(--c) 16%, var(--fe-surface)); color: color-mix(in srgb, var(--c) 78%, var(--fe-ink)); background-image: none; }
.st-guscio.is-come .st-profilo .st-avatar, .st-guscio.is-come .st-alto__avatar .st-avatar { box-shadow: 0 0 0 2px var(--fe-paper), 0 0 0 4px var(--fe-info); }

/* Pillola blu «Vedi come chi non è admin» */
.st-come { position: fixed; z-index: 20; top: calc(var(--st-alto) + 10px); left: calc(var(--st-fam) + var(--st-lato) + var(--st-sx)); right: var(--st-dx);
  display: flex; justify-content: center; pointer-events: none; }
.st-come__pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  min-height: 36px; padding: 4px 5px 4px 14px; border-radius: 999px; background: #3366FF; color: #fff; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 24px -8px rgba(51,102,255,.6); animation: st-scende var(--st-t-lungo) var(--st-molla) both; }
.st-come__pill svg { width: 16px; height: 16px; opacity: .9; flex: none; }
.st-come__breve { display: none; }
.st-guscio .st-come__torna { flex: none; height: 28px; padding: 0 12px; border-radius: 999px; background: #fff; color: #1D4ED8; font-size: 13px; font-weight: 600;
  transition: transform var(--st-t-breve) var(--st-molla); }
.st-guscio .st-come__torna:hover { transform: scale(1.04); }

/* Contenuto: come .oi-vista--pagina della demo (1240 px al centro, 36/40 px di margine). Un solo margine, quello del main:
   le pagine st-pagina dentro il main non ne aggiungono un altro (tengono solo il loro margine in basso).
   Con la pillola di «Vedi come» lo spazio in più è solo quello della pillola (10 px + 36 px). */
.st-guscio { --st-pag-su: 36px; --st-pag-lato: 40px; --st-come-h: 46px; }
.st-guscio .main { animation: none; max-width: 1240px; margin: 0 auto; padding: var(--st-pag-su) var(--st-pag-lato) 48px; }
.st-guscio .main > .st-pagina { max-width: none; margin: 0; padding-top: 0; padding-left: 0; padding-right: 0; }
.st-guscio .main:has(.pl-pagina), .st-guscio .main:has(.pipe-pagina) { max-width: 1240px; } /* anche la Pipeline, come la demo */
.st-guscio .main.main--split { max-width: none; padding: 0; height: calc(100vh - var(--st-alto)); height: calc(100dvh - var(--st-alto)); }
.st-guscio.is-come .main { padding-top: calc(var(--st-come-h) + var(--st-pag-su)); }
.st-guscio.is-come .main.main--split { padding-top: var(--st-come-h); }

/* Scheda intera: via la barra laterale (Esc per uscire) */
@media (min-width: 761px) {
  .shell.st-guscio.intera { padding-left: var(--st-sx); }
  .shell.st-guscio.intera .st-lato, .shell.st-guscio.intera .st-famiglia { display: none; }
  .st-guscio.intera .st-come { left: var(--st-sx); }
}

/* Tab bar (telefono) */
.st-tab { display: none; }

/* ===== 3. Menu a comparsa (profilo) ===== */
.st-menu { position: fixed; z-index: 45; min-width: 248px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 6px; border-radius: 16px; color: var(--fe-ink);
  background: var(--st-vetro-forte); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--st-sh-pop), inset 0 0 0 .5px var(--st-glass-border); animation: st-pop-in var(--st-t-breve) var(--st-molla) both; transform-origin: var(--o, left bottom); }
.st-menu[hidden] { display: none; }
.st-menu::-webkit-scrollbar { display: none; }
.st-menu button { font: inherit; color: inherit; background: none; border: 0; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.st-menu__titolo { padding: 8px 10px 6px; font: 500 10.5px/1 var(--fe-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--fe-secondary); }
.st-menu__chi { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.st-menu__chi b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.st-menu__chi small { display: block; font-size: 12.5px; color: var(--fe-secondary); }
.st-menu__voce { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border-radius: 10px; text-align: left; font-size: 14.5px;
  transition: background-color var(--st-t-breve); }
.st-menu__voce:hover, .st-menu__voce:focus-visible { background: var(--fe-hover); outline: none; }
.st-menu__voce svg { width: 18px; height: 18px; flex: none; color: var(--fe-secondary); }
.st-menu__testi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.st-menu__testi small { font-size: 12.5px; color: var(--fe-secondary); }
.st-menu__voce--esci { color: var(--fe-error-text); }
.st-menu__voce--esci svg { color: var(--fe-error-text); }
.st-menu__sep { height: var(--st-linea); background: var(--fe-separator); margin: 5px 8px; }
.st-menu .st-tema { margin: 4px 6px 6px; display: none; }

/* ===== 4. Cerca ⌘K (apriCerca: .cerca-velo / .cerca-box), come «Chiedi» della demo ===== */
.cerca-velo { position: fixed; inset: 0; z-index: 60; display: block; padding: 0; background: var(--fe-scrim);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: st-sfoca var(--st-t-breve) var(--st-uscita) both; }
.cerca-box { position: absolute; left: 50%; top: max(56px, 11vh); width: min(680px, calc(100% - 32px)); transform: translateX(-50%);
  display: flex; flex-direction: column; max-height: min(76vh, 720px); border-radius: 22px; color: var(--fe-ink); overflow: visible;
  border: 0; background: color-mix(in srgb, var(--fe-surface) 84%, transparent); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--st-sh-pop); animation: st-chiedi-in var(--st-t-breve) var(--st-uscita) both; }
.cerca-box::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--st-fam-grad); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .9; }
.cerca-campo { flex: none; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 16px 0 20px; border-bottom: .5px solid var(--fe-separator); }
.cerca-campo > svg { width: 22px; height: 22px; color: var(--fe-secondary); flex: none; }
.cerca-campo input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 19px/1.3 var(--fe-font); letter-spacing: -.012em; color: var(--fe-ink); }
.cerca-campo input::placeholder { color: var(--fe-tertiary); }
.cerca-campo .st-tasto { flex: none; }
.cerca-annulla { display: none; flex: none; min-height: 44px; padding: 0 4px 0 10px; margin-right: -4px; border: 0; background: none; font: 500 16px/1 var(--fe-font); color: var(--fe-info-text); cursor: pointer; }
.cerca-ris { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 14px; }
.cerca-voce { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t tipo" "s tipo"; align-items: center; column-gap: 12px;
  width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.cerca-voce.on, .cerca-voce:hover { background: var(--fe-sel); color: var(--fe-ink); }
.cerca-voce.on .cerca-tipo, .cerca-voce.on .cerca-s, .cerca-voce:hover .cerca-tipo, .cerca-voce:hover .cerca-s { color: var(--fe-secondary); }
.cerca-tipo { grid-area: tipo; align-self: center; font: 500 10px/1 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fe-secondary); }
.cerca-t { grid-area: t; font-size: 15px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cerca-s { grid-area: s; font-size: 12.5px; line-height: 1.3; color: var(--fe-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cerca-s:empty { display: none; }
.cerca-vuoto { padding: 22px 12px 6px; text-align: left; font-size: 13px; color: var(--fe-secondary); }
.cerca-piede { flex: none; display: flex; align-items: center; gap: 14px; padding: 9px 18px; border-top: .5px solid var(--fe-separator); font-size: 12px; color: var(--fe-secondary); }
.cerca-piede span { display: inline-flex; align-items: center; gap: 5px; }
.cerca-piede .st-tasto { height: 18px; padding: 0 5px; font-size: 10.5px; }
.cerca-piede b { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.cerca-piede .st-marchio { --s: 10px; }
@media (hover: none) {
  .cerca-campo .st-tasto, .cerca-piede { display: none; }
  .cerca-annulla { display: inline-flex; align-items: center; }
}

/* ===== 5. Toast (toast() in app.js): pillola scura in basso ===== */
#toast-root { position: fixed; z-index: 80; left: 0; right: 0; bottom: 28px; transform: none; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
#toast-root .toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(560px, 100%);
  min-height: 46px; padding: 8px 18px; border-radius: 23px; background: var(--fe-ink); color: var(--fe-paper); font-size: 15px; font-weight: 500; line-height: 1.3;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.45); animation: st-toast-in var(--st-t-medio) var(--st-molla) both; }
#toast-root .toast.err { background: var(--fe-ink); color: var(--fe-paper); padding-left: 14px; }
#toast-root .toast.err::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #FF3B5C; color: #fff; font: 700 12px/1 var(--fe-font); }
[data-theme="dark"] #toast-root .toast { background: var(--fe-ink); color: var(--fe-paper); }

/* ===== 6. Modali (openModal) e fogli: vetro ===== */
.modal-overlay { z-index: 50; padding: 16px; background: var(--fe-scrim); -webkit-backdrop-filter: none; backdrop-filter: none; animation: st-appare var(--st-t-breve) var(--st-uscita) both; }
[data-theme="dark"] .modal-overlay { background: var(--fe-scrim); }
.modal-overlay .modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px 26px 22px; border: 0; border-radius: var(--fe-r-panel); color: var(--fe-ink);
  background: var(--st-vetro-forte); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--st-sh-pop), inset 0 0 0 .5px var(--st-glass-border); animation: st-modale-in var(--st-t-breve) var(--st-uscita) both; }
.modal-overlay .modal-title { font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 14px; }
.modal-overlay .modal-actions { gap: 8px; flex-wrap: wrap; }

/* Per gli altri: strato, velo, modale e foglio della demo (vedi STELLARE.md) */
.st-strato { position: fixed; inset: 0; z-index: 40; }
.st-strato--modale { z-index: 50; display: grid; place-items: center; padding: 16px; }
.st-velo { position: absolute; inset: 0; background: var(--fe-scrim); animation: st-appare var(--st-t-breve) var(--st-uscita) both; }
.st-velo--sfoca { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.st-modale { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px 26px 22px; border-radius: var(--fe-r-panel); color: var(--fe-ink);
  background: var(--st-vetro-forte); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--st-sh-pop), inset 0 0 0 .5px var(--st-glass-border); animation: st-modale-in var(--st-t-breve) var(--st-uscita) both; }
.st-modale__titolo { margin: 0 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.st-modale__corpo { font-size: 15px; color: var(--fe-graphite); line-height: 1.5; }
.st-modale__azioni { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.st-foglio { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(420px, calc(100% - 20px)); display: flex; flex-direction: column; border-radius: var(--fe-r-panel);
  background: var(--st-vetro-forte); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--st-sh-pop), inset 0 0 0 .5px var(--st-glass-border); animation: st-foglio-in var(--st-t-lungo) var(--st-molla) both; overflow: hidden; color: var(--fe-ink); }
.st-foglio--largo { width: min(560px, calc(100% - 20px)); }
.st-foglio__maniglia { display: none; }
.st-foglio__testa { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 14px 12px 22px; }
.st-foglio__titolo { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.st-foglio__corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 24px; }
.st-chiudi { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fe-hover); color: var(--fe-secondary); cursor: pointer;
  transition: background-color var(--st-t-breve), color var(--st-t-breve), transform var(--st-t-breve) var(--st-molla); }
.st-chiudi:hover { background: var(--fe-sel); color: var(--fe-ink); }
.st-chiudi:active { transform: scale(.92); }
.st-chiudi svg { width: 15px; height: 15px; stroke-width: 2.4; }

/* ===== 7. Componenti condivisi (st-*) ===== */
/* Tipografia */
.st-display { font-size: clamp(48px, 8vw, 96px); font-weight: 600; letter-spacing: -.05em; line-height: 1.02; }
.st-large { font-size: clamp(34px, 5vw, 56px); font-weight: 600; letter-spacing: -.045em; line-height: 1.04; text-wrap: balance; }
.st-t1 { font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; text-wrap: balance; margin: 0; }
.st-t2 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; margin: 0; }
.st-t3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
.st-frase { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.42; letter-spacing: -.012em; text-wrap: pretty; margin: 0; }
.st-nota { font-size: 13px; line-height: 1.4; color: var(--fe-secondary); margin: 0; }
.st-didascalia { font: 500 11px/1.3 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fe-secondary); }
.st-kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1.3 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fe-secondary); }
.st-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--k, var(--fe-primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k, var(--fe-primary)) 20%, transparent); }
.st-kicker--accento { color: var(--fe-primary-text); }
.st-numero { font-size: clamp(32px, 4vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.st-eroe { font-size: clamp(40px, 6vw, 60px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.st-secondario { color: var(--fe-secondary); }
.st-mono-testo { font-family: var(--fe-mono); }
.st-separa { height: var(--st-linea); background: var(--fe-separator); border: 0; margin: 20px 0; }

/* Pagina */
.st-pagina { max-width: 1240px; margin: 0 auto; padding: 36px 40px 8px; }
.st-testa-pagina { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.st-testa-pagina__titoli { flex: 1; min-width: 0; }
.st-testa-pagina .st-nota { margin-top: 4px; font-size: 15px; }

/* Tile e icone */
.st-tile { --s: 28px; --tile: #6E7076; position: relative; flex: none; width: var(--s); height: var(--s); display: inline-grid; place-items: center;
  border-radius: 22.37%; color: #fff;
  background: linear-gradient(180deg, var(--fe-tile-sheen), rgba(255,255,255,0) 55%), var(--tile);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--tile) 75%, transparent); }
.st-tile svg { width: 58%; height: 58%; display: block; }
img.st-tile { background: none; object-fit: cover; box-shadow: 0 4px 12px -4px rgba(0,0,0,.4); }
.st-icona-oggi { --s: 28px; flex: none; position: relative; width: var(--s); height: var(--s); border-radius: 22.37%;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--fe-surface); box-shadow: inset 0 0 0 .5px var(--fe-separator), 0 4px 12px -6px rgba(17,18,20,.35); color: var(--fe-ink); }
.st-icona-oggi small { font: 600 calc(var(--s) * .2)/1 var(--fe-font); letter-spacing: .04em; text-transform: uppercase;
  background: var(--st-fam-grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: calc(var(--s) * .02); }
.st-icona-oggi b { font-weight: 600; font-size: calc(var(--s) * .46); line-height: .95; letter-spacing: -.04em; }

/* Card */
.st-card { position: relative; display: block; background: var(--fe-surface); border-radius: var(--fe-r-card); box-shadow: var(--st-sh-card); padding: 20px; color: var(--fe-ink); }
.st-card--vetro { background: var(--fe-glass-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--st-sh-card), inset 0 0 0 .5px var(--st-glass-border); }
.st-card--piatta { box-shadow: 0 0 0 .5px var(--fe-separator); }
a.st-card, button.st-card, .st-card--tocco { width: 100%; text-align: left; border: 0; font: inherit; cursor: pointer; text-decoration: none;
  transition: transform var(--st-t-medio) var(--st-molla), box-shadow var(--st-t-medio) var(--st-uscita); }
a.st-card:hover, button.st-card:hover, .st-card--tocco:hover { transform: translateY(-2px); box-shadow: var(--st-sh-card), 0 18px 40px -22px rgba(17,18,20,.3); }
a.st-card:active, button.st-card:active, .st-card--tocco:active { transform: scale(.985); }
.st-griglia { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 220px)), 1fr)); }

/* Tessera (numero grande con testa e sotto) */
.st-tessera { position: relative; display: flex; flex-direction: column; min-height: 132px; padding: 18px 20px; background: var(--fe-surface);
  border: 0; border-radius: var(--fe-r-card); box-shadow: var(--st-sh-card); text-align: left; width: 100%; color: var(--fe-ink); font: inherit; text-decoration: none; }
.st-tessera__testa { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--fe-secondary); line-height: 1.25; }
.st-tessera__testa .st-tile { --s: 24px; }
.st-tessera__valore { margin-top: 22px; font-size: clamp(32px, 4vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.st-tessera__sotto { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--fe-secondary); }
.st-tessera__sotto.is-urg { color: var(--fe-error-text); } .st-tessera__sotto.is-att { color: var(--fe-warning-text); }
.st-tessera__sotto.is-ok { color: var(--fe-success-text); } .st-tessera__sotto.is-info { color: var(--fe-info-text); } .st-tessera__sotto.is-accento { color: var(--fe-primary-text); }
a.st-tessera, button.st-tessera { cursor: pointer; transition: transform var(--st-t-medio) var(--st-molla), box-shadow var(--st-t-medio) var(--st-uscita); }
a.st-tessera:hover, button.st-tessera:hover { transform: translateY(-2px); box-shadow: var(--st-sh-card), 0 18px 40px -22px rgba(17,18,20,.3); }
a.st-tessera:active, button.st-tessera:active { transform: scale(.98); }
.st-tessera.is-attiva { box-shadow: var(--st-sh-card), inset 0 0 0 2px var(--fe-primary); }
.st-tessera__chev { position: absolute; top: 16px; right: 16px; color: var(--fe-tertiary); }
.st-tessera__chev svg { width: 16px; height: 16px; }

/* Segmenti */
.st-segmenti { position: relative; display: inline-flex; align-items: stretch; height: 32px; padding: 2px; border-radius: 9px; background: var(--fe-group); max-width: 100%;
  overflow-x: auto; scrollbar-width: none; }
.st-segmenti::-webkit-scrollbar { display: none; }
.st-segmenti button { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; border: 0; border-radius: 7px; background: none;
  font: 500 13.5px/1 var(--fe-font); color: var(--fe-graphite); white-space: nowrap; cursor: pointer; transition: color var(--st-t-breve), background-color var(--st-t-breve); }
.st-segmenti button:hover { color: var(--fe-ink); }
.st-segmenti button.is-attivo { color: var(--fe-ink); font-weight: 600; background: var(--st-seg-cursore); box-shadow: 0 1px 3px rgba(17,18,20,.1), 0 0 0 .5px rgba(17,18,20,.04); }
.st-segmenti__n { font-weight: 500; color: var(--fe-secondary); font-size: 12.5px; }
.st-segmenti--pieno { display: flex; } .st-segmenti--pieno button { flex: 1; justify-content: center; }

/* Chip */
.st-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--fe-separator);
  background: var(--fe-surface); font: 500 13.5px/1 var(--fe-font); color: var(--fe-graphite); white-space: nowrap; cursor: pointer;
  transition: background-color var(--st-t-breve), border-color var(--st-t-breve), color var(--st-t-breve), transform var(--st-t-breve) var(--st-molla); }
.st-chip:hover { border-color: color-mix(in srgb, var(--fe-ink) 22%, transparent); color: var(--fe-ink); }
.st-chip:active { transform: scale(.96); }
.st-chip svg { width: 15px; height: 15px; }
.st-chip.is-attivo { background: var(--fe-primary-soft); border-color: transparent; color: var(--fe-primary-text); }
.st-chip__n { font-weight: 500; color: var(--fe-secondary); font-size: 12.5px; }
.st-chip.is-attivo .st-chip__n { color: inherit; opacity: .8; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Badge (etichetta mono) e pill */
.st-badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--fe-r-tag);
  font: 500 10.5px/1 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; vertical-align: middle;
  background: var(--fe-group); color: var(--fe-secondary); }
.st-badge--accento { background: var(--fe-primary-soft); color: var(--fe-primary-text); }
.st-badge--ok { background: var(--fe-success-soft); color: var(--fe-success-text); }
.st-badge--att { background: var(--fe-warning-soft); color: var(--fe-warning-text); }
.st-badge--urg { background: var(--fe-error-soft); color: var(--fe-error-text); }
.st-badge--info { background: var(--fe-info-soft); color: var(--fe-info-text); }
.st-badge--oro { background: var(--st-oro-soft); color: var(--st-oro-text); }
.st-badge--ai { background: color-mix(in srgb, var(--st-ai) 14%, transparent); color: color-mix(in srgb, var(--st-ai) 70%, var(--fe-ink)); }
.st-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--fe-group);
  font-size: 13px; font-weight: 500; color: var(--fe-graphite); white-space: nowrap; }
.st-pill svg { width: 15px; height: 15px; }
.st-pill--ok { background: var(--fe-success-soft); color: var(--fe-success-text); } .st-pill--att { background: var(--fe-warning-soft); color: var(--fe-warning-text); }
.st-pill--urg { background: var(--fe-error-soft); color: var(--fe-error-text); } .st-pill--info { background: var(--fe-info-soft); color: var(--fe-info-text); }
.st-pill--accento { background: var(--fe-primary-soft); color: var(--fe-primary-text); } .st-pill--oro { background: var(--st-oro-soft); color: var(--st-oro-text); }
.st-pill--live { font: 500 11px/1 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fe-secondary); }
.st-pill--live i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--fe-success); }
.st-pill--live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--fe-success); animation: st-pulsa-punto 2s var(--st-uscita) infinite; }
.st-punto { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--fe-tertiary)); flex: none; vertical-align: middle; }

/* Pulsanti */
.st-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font: 600 15px/1 var(--fe-font); letter-spacing: -.01em; white-space: nowrap; background: var(--fe-group); color: var(--fe-ink); cursor: pointer; text-decoration: none;
  transition: transform var(--st-t-breve) var(--st-molla), background-color var(--st-t-breve), box-shadow var(--st-t-breve), opacity var(--st-t-breve); }
.st-btn svg { width: 18px; height: 18px; margin-left: -3px; }
.st-btn:hover { transform: scale(1.03); }
.st-btn:active { transform: scale(.97); }
.st-btn:disabled, .st-btn.is-spento { opacity: .45; transform: none; pointer-events: none; }
.st-btn--primario { background: var(--st-btn-bg); color: var(--st-btn-text); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--st-btn-bg) 80%, transparent); }
.st-btn--secondario { background: var(--fe-group); color: var(--fe-ink); box-shadow: inset 0 0 0 .5px var(--fe-separator); }
.st-btn--secondario:hover { background: color-mix(in srgb, var(--fe-ink) 7%, var(--fe-group)); }
.st-btn--piano { background: transparent; color: var(--fe-primary-text); padding: 0 12px; }
.st-btn--piano:hover { background: var(--fe-hover); transform: none; }
.st-btn--pericolo { background: var(--fe-error-soft); color: var(--fe-error-text); }
.st-btn--compatto { height: 36px; padding: 0 15px; font-size: 14px; }
.st-btn--compatto.st-btn--piano { padding: 0 10px; }
.st-btn--tondo { width: 44px; padding: 0; }
.st-btn--compatto.st-btn--tondo { width: 36px; }
.st-btn--tondo svg { margin: 0; }
.st-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Sezione */
.st-sezione { margin-top: 44px; }
.st-sezione:first-child { margin-top: 0; }
.st-sezione__testa { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.st-sezione__titoli { flex: 1; min-width: 0; }
.st-sezione__titolo { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.st-sezione__num { font: 500 11px/1 var(--fe-mono); color: var(--fe-secondary); letter-spacing: .04em; }
.st-sezione__sotto { margin: 3px 0 0; font-size: 13px; color: var(--fe-secondary); line-height: 1.4; }
.st-sezione__azioni { flex: none; display: flex; gap: 8px; align-items: center; }
details.st-sezione > summary { list-style: none; cursor: pointer; }
details.st-sezione > summary::-webkit-details-marker { display: none; }
details.st-sezione > summary .st-sezione__testa { margin-bottom: 0; padding: 4px 0; }
details.st-sezione[open] > summary .st-sezione__testa { margin-bottom: 14px; }
.st-sezione__chev { color: var(--fe-tertiary); transition: transform var(--st-t-medio) var(--st-molla); }
.st-sezione__chev svg { width: 18px; height: 18px; display: block; }
details.st-sezione[open] > summary .st-sezione__chev { transform: rotate(90deg); }
details.st-sezione > summary:hover .st-sezione__chev { color: var(--fe-ink); }
details.st-sezione[open] > .st-sezione__corpo { animation: st-sale-6 var(--st-t-medio) var(--st-uscita) both; }

/* Gruppo e righe (iOS): il separatore parte dove comincia il testo */
.st-gruppo { background: var(--fe-surface); border-radius: var(--fe-r-group); box-shadow: 0 0 0 .5px var(--fe-separator), var(--st-sh-flat); overflow: hidden; }
.st-gruppo__titolo { margin: 0 0 8px 16px; font-size: 13px; font-weight: 500; color: var(--fe-secondary); }
.st-gruppo__nota { margin: 8px 16px 0; font-size: 12.5px; color: var(--fe-secondary); line-height: 1.4; }
.st-riga { position: relative; display: flex; align-items: center; min-height: 48px; overflow: hidden; }
.st-riga__testi::before { content: ""; position: absolute; left: auto; right: auto; bottom: 0; width: 4000px; height: var(--st-linea); background: var(--fe-separator); pointer-events: none; }
.st-gruppo > .st-riga:last-child .st-riga__testi::before, .st-righe > .st-riga:last-child .st-riga__testi::before, .st-riga--senza-linea .st-riga__testi::before { display: none; }
.st-riga > .st-spunta { margin-left: 16px; }
.st-riga__corpo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px 10px 16px; text-align: left; width: 100%; color: inherit;
  border: 0; background: none; font: inherit; text-decoration: none; transition: background-color var(--st-t-breve); }
.st-riga > .st-spunta + .st-riga__corpo { padding-left: 12px; }
a.st-riga__corpo, button.st-riga__corpo { cursor: pointer; }
a.st-riga__corpo:hover, button.st-riga__corpo:hover { background: var(--fe-hover); }
a.st-riga__corpo:active, button.st-riga__corpo:active { background: var(--fe-sel); }
.st-riga__corpo:focus-visible { outline-offset: -2px; border-radius: inherit; }
.st-riga__icona { flex: none; display: flex; }
.st-riga__testi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-riga__titolo { font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; }
.st-riga__sotto { font-size: 13px; color: var(--fe-secondary); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.st-riga__coda { flex: none; font-size: 13px; color: var(--fe-secondary); text-align: right; white-space: nowrap; }
.st-riga__chev { flex: none; color: var(--fe-tertiary); margin-right: -4px; }
.st-riga__chev svg { width: 16px; height: 16px; display: block; }
.st-riga--urg .st-riga__coda { color: var(--fe-error-text); } .st-riga--att .st-riga__coda { color: var(--fe-warning-text); }
.st-riga--ok .st-riga__coda { color: var(--fe-success-text); } .st-riga--info .st-riga__coda { color: var(--fe-info-text); }
.st-riga--accento .st-riga__coda { color: var(--fe-primary-text); }
.st-riga.is-attiva .st-riga__corpo { background: color-mix(in srgb, var(--fe-primary) 10%, transparent); }
.st-riga.is-fatta .st-riga__testi { opacity: .55; }
.st-riga.is-fatta .st-riga__titolo { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--fe-tertiary); }
.st-righe { display: flex; flex-direction: column; }

/* Riga dei fatti */
.st-fatti { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: .5px solid var(--fe-separator); border-bottom: .5px solid var(--fe-separator); }
.st-fatti__cella { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; min-width: 0; text-align: left; color: inherit; border: 0; background: none; font: inherit; text-decoration: none; }
.st-fatti__cella + .st-fatti__cella::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: var(--st-linea); background: var(--fe-separator); }
.st-fatti__etichetta { font-size: 12.5px; color: var(--fe-secondary); line-height: 1.3; }
.st-fatti__valore { font-size: 18px; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fatti__valore.is-urg { color: var(--fe-error-text); } .st-fatti__valore.is-att { color: var(--fe-warning-text); } .st-fatti__valore.is-ok { color: var(--fe-success-text); }
.st-fatti__valore.is-info { color: var(--fe-info-text); } .st-fatti__valore.is-accento { color: var(--fe-primary-text); } .st-fatti__valore.is-tenue { color: var(--fe-secondary); }
button.st-fatti__cella, a.st-fatti__cella { cursor: pointer; border-radius: 12px; transition: background-color var(--st-t-breve); }
button.st-fatti__cella:hover, a.st-fatti__cella:hover { background: var(--fe-hover); }
button.st-fatti__cella .st-fatti__valore::after, a.st-fatti__cella .st-fatti__valore::after { content: " ›"; color: var(--fe-tertiary); font-weight: 400; }

/* Spunta (cerchio di «fatto») */
.st-spunta { flex: none; position: relative; width: 22px; height: 22px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--fe-tertiary); background: none; color: transparent; cursor: pointer;
  transition: background-color var(--st-t-breve), border-color var(--st-t-breve), transform var(--st-t-breve) var(--st-molla); }
.st-spunta svg { width: 13px; height: 13px; stroke-width: 3; }
.st-spunta:hover { border-color: var(--fe-success); }
.st-spunta:active { transform: scale(.88); }
.st-spunta.is-fatta { background: var(--fe-success); border-color: var(--fe-success); color: #fff; }
.st-spunta::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; }

/* Anello (punteggio, percentuale) */
.st-anello { --s: 38px; --p: 0; --c: var(--fe-primary); position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fe-group) 0); }
.st-anello::before { content: ""; position: absolute; inset: calc(var(--s) * .1); border-radius: 50%; background: var(--fe-surface); }
.st-anello__n { position: relative; font-size: calc(var(--s) * .36); font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--fe-ink); }
.st-anello--xl { --s: 76px; }
.st-anello--xl::before { inset: 7px; }
.st-anello--su-carta::before { background: var(--fe-paper); }
.st-anello--su-gruppo::before { background: var(--fe-group); }

/* Monogramma (squircle con l'iniziale) e pila di avatar */
.st-mono { --s: 36px; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 22.37%;
  color: #fff; font-weight: 600; font-size: calc(var(--s) * .44); letter-spacing: -.02em; line-height: 1; user-select: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--c, #5B5E66);
  box-shadow: 0 4px 12px -5px color-mix(in srgb, var(--c, #5B5E66) 70%, transparent); }
.st-mono--noi { box-shadow: 0 0 0 2px var(--fe-surface), 0 0 0 3.5px var(--fe-error); }
.st-pila { display: inline-flex; }
.st-pila > * + * { margin-left: calc(var(--s, 28px) * -.16); }
.st-pila > * { box-shadow: 0 0 0 2px var(--fe-surface); }

/* Fonte (da dove viene un dato) */
.st-fonte { display: inline-flex; align-items: center; gap: 6px; height: 22px; max-width: 100%; padding: 0 9px 0 8px; border-radius: 999px; vertical-align: middle;
  font: 500 10.5px/1 var(--fe-mono); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; color: var(--fe-secondary);
  background: var(--fe-surface); box-shadow: inset 0 0 0 .5px var(--fe-separator); }
.st-fonte > span { overflow: hidden; text-overflow: ellipsis; }
.st-fonte i { width: 6px; height: 6px; border-radius: 50%; background: var(--f, #A1A3A9); flex: none; }
.st-fonte--fenice { --f: var(--fe-primary); } .st-fonte--falcon { --f: #3366FF; } .st-fonte--colibri { --f: #1FCB8B; }
.st-fonte--email { --f: #FF8A1F; } .st-fonte--sito { --f: #14B8C8; } .st-fonte--ai { --f: var(--st-ai); } .st-fonte--telefono { --f: #1FB57A; }
.st-fonte--registro { --f: #5B5E66; } .st-fonte--foglio { --f: #0E9F8F; } .st-fonte--odg { --f: #7A5CE6; }
.st-fonti { display: flex; flex-wrap: wrap; gap: 6px; }

/* Testo dell'AI e mossa */
.st-ai { position: relative; padding: 2px 0 2px 16px; }
.st-ai::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--st-ai); }
.st-ai__tag { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 500 10.5px/1.3 var(--fe-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--st-ai); }
.st-ai__tag svg { width: 13px; height: 13px; }
.st-ai__testo { line-height: 1.55; }
.st-mossa { font-weight: 600; line-height: 1.4; }
.st-mossa::before { content: "→ "; color: var(--fe-primary-text); }

/* Riquadro «nascosto» (al posto degli importi per chi non è admin) */
.st-nascosto { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--fe-group); color: var(--fe-secondary); font-size: 13.5px; line-height: 1.4; }
.st-nascosto svg { width: 18px; height: 18px; flex: none; }

/* Data a blocco */
.st-data { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 48px; border-radius: 12px;
  background: var(--fe-surface); box-shadow: inset 0 0 0 .5px var(--fe-separator), var(--st-sh-flat); line-height: 1; }
.st-data b { font-size: 19px; font-weight: 600; letter-spacing: -.03em; }
.st-data small { margin-top: 3px; font: 500 9.5px/1 var(--fe-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fe-primary-text); }

/* Vuoto e scheletro */
.st-vuoto { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 56px 24px; max-width: 420px; margin: 0 auto; }
.st-vuoto__glifo { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--fe-group); color: var(--fe-secondary); margin-bottom: 10px;
  animation: st-respira 3.2s var(--st-uscita) 1; }
.st-vuoto__glifo svg { width: 30px; height: 30px; }
.st-vuoto__icona { width: 72px; height: 72px; border-radius: 22.37%; margin-bottom: 10px; box-shadow: 0 10px 24px -10px rgba(17,18,20,.45); animation: st-respira 3.2s var(--st-uscita) 1; }
.st-vuoto__titolo { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.st-vuoto__testo { margin: 0; font-size: 13px; color: var(--fe-secondary); line-height: 1.45; text-wrap: pretty; }
.st-vuoto .st-btn { margin-top: 12px; }
.st-scheletro { display: flex; flex-direction: column; gap: 10px; }
.st-scheletro span { display: block; height: 12px; border-radius: 6px; background: var(--fe-group);
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, color-mix(in srgb, var(--fe-surface) 70%, transparent) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%; background-repeat: no-repeat; animation: st-luccica 1.4s linear infinite; }
.st-scheletro span:nth-child(3n) { width: 72%; } .st-scheletro span:nth-child(3n+2) { width: 88%; }

/* Barra della scheda (in cima al dettaglio di lista + dettaglio) */
.st-barra-scheda { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px;
  background: color-mix(in srgb, var(--fe-paper) 90%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--st-glass-border); }
.st-barra-scheda__indietro { display: none; align-items: center; gap: 2px; height: 36px; padding: 0 8px 0 2px; margin-left: -6px; border: 0; border-radius: 10px; background: none;
  color: var(--fe-primary-text); font: 500 15px/1 var(--fe-font); cursor: pointer; }
.st-barra-scheda__indietro svg { width: 22px; height: 22px; }
.st-barra-scheda__indietro.is-sempre { display: inline-flex; }
.st-barra-scheda__titolo { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-barra-scheda__azioni { display: flex; align-items: center; gap: 6px; }

/* Lista + dettaglio della demo (per pagine nuove; le viste attuali usano .split / .lista / .det) */
.st-ld { display: grid; grid-template-columns: 372px minmax(0, 1fr); min-height: calc(100dvh - var(--st-alto)); }
.st-ld__lista { position: sticky; top: var(--st-alto); height: calc(100dvh - var(--st-alto)); overflow-y: auto; overscroll-behavior: contain;
  border-right: .5px solid var(--fe-separator); padding: 22px 12px 28px; scrollbar-width: thin; scrollbar-color: var(--fe-separator) transparent; }
.st-ld__testa { padding: 0 8px 14px; }
.st-ld__testa .st-t1 { font-size: 30px; letter-spacing: -.045em; }
.st-ld__dettaglio { min-width: 0; position: relative; }
.st-ld__corpo { max-width: 940px; margin: 0 auto; padding: 28px 40px 12px; }

/* Filo (avanzamento a nodi) */
.st-filo { position: relative; display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; }
.st-filo::before { content: ""; position: absolute; left: 6px; right: 6px; top: 11px; height: 2px; border-radius: 2px; background: var(--fe-separator); }
.st-filo::after { content: ""; position: absolute; left: 6px; top: 11px; height: 2px; border-radius: 2px; width: calc((100% - 12px) * var(--avanza, 0)); background: var(--fe-primary);
  transition: width var(--st-t-grafico) var(--st-molla); }
.st-filo__nodo { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; color: inherit; font-size: 12.5px; }
.st-filo__nodo i { width: 12px; height: 12px; border-radius: 50%; background: var(--fe-surface); box-shadow: inset 0 0 0 2px var(--fe-tertiary); }
.st-filo__nodo.is-fatto i { background: var(--n, var(--fe-primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--n, var(--fe-primary)) 22%, transparent); }

/* Entrata sfalsata: style="--i:3" sui figli */
.st-entra { animation: st-sale var(--st-t-lungo) var(--st-molla) both; animation-delay: calc(min(var(--i, 0), 12) * var(--st-sfalsa)); }

/* ===== 8. Accesso (renderLogin), come demo/accesso ===== */
.st-accesso { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--fe-paper); color: var(--fe-ink); overflow-x: hidden; --st-aurora: .2; }
[data-theme="dark"] .st-accesso { --st-aurora: .34; }
.st-accesso__aurora { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.st-accesso__aurora i { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; filter: blur(90px); opacity: 0; animation: st-luce 1600ms var(--st-uscita) forwards; }
.st-accesso__aurora i:nth-child(1) { background: #FF8A1F; left: -26vmax; top: -30vmax; }
.st-accesso__aurora i:nth-child(2) { background: #FF4D2E; left: 22vw; top: -38vmax; animation-delay: 120ms; }
.st-accesso__aurora i:nth-child(3) { background: #E5202A; right: -30vmax; bottom: -34vmax; animation-delay: 240ms; }
.st-accesso__pagina { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.st-accesso__scheda { width: 100%; max-width: 400px; margin: 0; padding: 36px 32px 26px; text-align: center;
  background: color-mix(in srgb, var(--fe-surface) 66%, transparent); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border: .5px solid var(--st-glass-border); border-radius: 28px; box-shadow: 0 2px 6px rgba(17,18,20,.06), 0 40px 80px -30px rgba(17,18,20,.30);
  animation: st-ac-sale 640ms var(--st-molla) both; }
[data-theme="dark"] .st-accesso__scheda { background: color-mix(in srgb, var(--fe-surface) 62%, transparent); box-shadow: 0 0 0 .5px rgba(255,255,255,.08), 0 40px 80px -30px rgba(0,0,0,.85); }
.st-accesso__icona { display: block; width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 22.37%; box-shadow: 0 10px 24px -10px rgba(17,18,20,.45);
  animation: st-ac-icona 700ms var(--st-molla) 120ms both; }
[data-theme="dark"] .st-accesso__icona { box-shadow: 0 10px 24px -10px rgba(0,0,0,.9); }
.st-accesso__titolo { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.035em; }
.st-accesso__sotto { margin: 8px auto 26px; max-width: 30ch; font-size: 15px; line-height: 1.45; color: var(--fe-secondary); text-wrap: balance; }
.st-accesso__gruppo { text-align: left; background: var(--fe-surface); border: .5px solid var(--fe-separator); border-radius: 16px; overflow: hidden;
  transition: box-shadow 200ms var(--st-uscita), border-color 200ms var(--st-uscita); }
.st-accesso__gruppo:focus-within { border-color: transparent; box-shadow: 0 0 0 2px var(--fe-primary); }
.st-accesso__campo { position: relative; display: block; padding: 10px 16px 9px; cursor: text; }
.st-accesso__campo + .st-accesso__campo { border-top: .5px solid var(--fe-separator); }
.st-accesso__etichetta { display: block; font-size: 12px; line-height: 1.3; font-weight: 500; color: var(--fe-secondary); }
.st-accesso__campo input { display: block; width: 100%; margin: 2px 0 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
  font: 400 17px/1.4 var(--fe-font); color: var(--fe-ink); letter-spacing: -.01em; }
.st-accesso__campo input[type="password"] { letter-spacing: .08em; }
.st-accesso__campo:has(.st-accesso__occhio) input { padding-right: 40px; }
.st-accesso__occhio { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--fe-tertiary); cursor: pointer; }
.st-accesso__occhio:hover { color: var(--fe-ink); background: var(--fe-hover); }
.st-accesso__occhio[aria-pressed="true"] { color: var(--fe-primary-text); }
.st-accesso__occhio:focus-visible { outline: 2px solid var(--fe-primary); outline-offset: -4px; }
.st-accesso__errore { min-height: 20px; margin: 10px 0 8px; font-size: 13px; line-height: 1.5; color: var(--fe-error-text); }
.st-accesso__entra { position: relative; width: 100%; height: 50px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--st-btn-bg); color: var(--st-btn-text); font: 600 17px/1 var(--fe-font); letter-spacing: -.01em;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--st-btn-bg) 80%, transparent);
  transition: transform 200ms var(--st-molla), opacity 200ms var(--st-uscita), box-shadow 200ms var(--st-uscita); }
.st-accesso__entra:hover { transform: scale(1.012); }
.st-accesso__entra:active { transform: scale(.98); }
.st-accesso__entra:focus-visible { outline: 2px solid var(--fe-primary); outline-offset: 3px; }
.st-accesso__giro { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; opacity: 0; animation: st-gira 700ms linear infinite paused; }
.st-accesso__scheda.is-attesa .st-accesso__entra { cursor: progress; }
.st-accesso__scheda.is-attesa .st-accesso__testo { opacity: 0; }
.st-accesso__scheda.is-attesa .st-accesso__giro { opacity: 1; animation-play-state: running; }
.st-accesso__famiglia { margin: 20px 0 0; font: 500 11px/1.4 var(--fe-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fe-tertiary); }
.st-accesso__piede { margin: 22px 0 0; text-align: center; font-size: 12px; line-height: 1.6; color: var(--fe-secondary); }
.st-accesso__piede b { font-weight: 600; color: var(--fe-ink); }
.st-accesso__scheda.is-no { animation: st-trema 460ms cubic-bezier(.36,.07,.19,.97) both; }
.st-accesso__scheda.is-dentro { transition: transform 420ms var(--st-uscita), opacity 420ms var(--st-uscita); transform: scale(.96); opacity: 0; }
@media (max-width: 480px) {
  .st-accesso__pagina { justify-content: flex-start; padding-top: max(56px, env(safe-area-inset-top, 0px) + 32px); }
  .st-accesso__scheda { padding: 30px 20px 22px; border-radius: 24px; }
  .st-accesso__titolo { font-size: 26px; }
}

/* ===== 9. Movimento ===== */
@keyframes st-sale { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes st-sale-6 { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes st-scende { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes st-appare { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-sfoca { from { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } to { opacity: 1; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); } }
@keyframes st-pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes st-respira { 0% { transform: scale(.92); opacity: .6; } 45% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes st-luccica { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes st-pulsa-punto { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes st-toast-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes st-modale-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes st-chiedi-in { from { opacity: 0; transform: translateX(-50%) scale(.98); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes st-chiedi-in-tel { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes st-foglio-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes st-foglio-su { from { transform: translateY(100%); } to { transform: none; } }
@keyframes st-luce { to { opacity: var(--st-aurora); } }
@keyframes st-ac-sale { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes st-ac-icona { from { opacity: 0; transform: translateY(10px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes st-gira { to { transform: rotate(360deg); } }
@keyframes st-trema {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-10px); } 40%, 60% { transform: translateX(10px); }
}

/* ===== 10. Tablet (761-1099 px): margini più stretti. La barra laterale resta aperta (si chiude dal menu del profilo);
   solo sotto i 900 px diventa stretta da sola, altrimenti non resta spazio per le pagine ===== */
@media (max-width: 1099px) and (min-width: 761px) {
  .st-guscio { --st-pag-su: 30px; --st-pag-lato: 28px; }
  .st-campo-cerca { width: 216px; }
}
@media (max-width: 899px) and (min-width: 761px) {
  .st-guscio { --st-lato: 72px; }
  .st-guscio.is-senza-lato { --st-lato: 0px; }
  .st-guscio .st-lato { padding: 16px 0; align-items: center; }
  .st-guscio .st-lato__testa { padding: 0 0 16px; }
  .st-guscio .st-lato__icona { width: 40px; height: 40px; }
  .st-guscio .st-lato__nomi, .st-guscio .st-voce__testi, .st-guscio .st-voce__esterno, .st-guscio .st-lato__titolo,
  .st-guscio .st-profilo__testi, .st-guscio .st-profilo__chev, .st-guscio .st-lato__piede .st-tema, .st-guscio .st-lato__marchio span:last-child { display: none; }
  .st-guscio .st-lato__voci, .st-guscio .st-lato__gruppo, .st-guscio .st-lato__piede { align-items: center; }
  .st-guscio .st-lato__gruppo + .st-lato__gruppo { margin-top: 0; padding-top: 8px; position: relative; }
  .st-guscio .st-lato__gruppo + .st-lato__gruppo::before { content: ""; position: absolute; top: 3px; left: 14px; right: 14px; height: var(--st-linea); background: var(--fe-separator); }
  .st-guscio .st-voce { width: 48px; min-height: 48px; padding: 0; justify-content: center; }
  .st-guscio .st-voce__badge { position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; font-size: 10.5px; padding: 0 4px; box-shadow: 0 0 0 2px var(--fe-paper); }
  .st-guscio .st-profilo { width: 48px; padding: 0; justify-content: center; }
  .st-guscio .st-lato__marchio { padding: 6px 0 0; justify-content: center; }
  .st-menu__voce--lato { display: none; }
  .st-menu .st-tema { display: flex; }
}
.st-guscio.is-stretta ~ .st-menu .st-tema { display: flex; }

/* ===== 11. Telefono (fino a 760 px) ===== */
@media (max-width: 760px) {
  .st-guscio { --st-alto: 52px; }
  .st-guscio.ha-pillole { --st-alto: 98px; }
  .shell.st-guscio { padding-left: 0; padding-bottom: calc(var(--st-tab) + var(--st-safe-b)); }
  .st-lato, .st-famiglia { display: none !important; }
  .st-guscio.ha-famiglia { --st-fam: 0px; }
  .st-guscio.is-senza-lato .st-alto__app, .st-guscio.is-senza-lato .st-alto__sep { display: none; }
  .st-alto { height: 52px; gap: 6px; padding: 0 max(6px, var(--st-dx)) 0 max(16px, var(--st-sx)); }
  .st-menu__voce--lato { display: none; }
  .st-alto__icona { display: inline-flex; margin-right: 4px; width: 28px; height: 28px; border-radius: 22.37%; flex: none; }
  .st-alto__app, .st-alto__sep { display: none; }
  .st-alto__pag { font-size: 17px; }
  .st-orologio, .st-campo-cerca { display: none; }
  .st-alto__bottoni { display: flex; }
  .st-alto__bottoni .st-strumento { width: 44px; height: 44px; color: var(--fe-ink); }
  .st-alto__bottoni .st-strumento svg { width: 21px; height: 21px; }
  .st-alto__avatar { width: 44px; height: 44px; }
  .st-pillole { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 2px max(16px, var(--st-dx)) 10px max(16px, var(--st-sx)); scrollbar-width: none; }
  .st-pillole::-webkit-scrollbar { display: none; }
  .st-pillola { position: relative; flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px;
    background: var(--fe-group); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color var(--st-t-breve), color var(--st-t-breve); }
  .st-pillola .st-tile, .st-pillola .st-icona-oggi { --s: 22px; box-shadow: none; }
  .st-pillola img.st-tile { width: 22px; height: 22px; }
  .st-pillola.is-attiva { background: var(--st-btn-bg); color: var(--st-btn-text); }
  .st-pillola.is-attiva .st-tile, .st-pillola.is-attiva .st-icona-oggi { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--st-btn-text) 60%, transparent); }
  .st-pillola__badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fe-error); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
  .st-pillola.is-attiva .st-pillola__badge { background: #fff; color: var(--fe-error); }
  .st-come { position: relative; z-index: 1; top: auto; left: auto; right: auto; padding: 10px max(16px, var(--st-sx)) 0; }
  .st-come__pill { padding-left: 12px; min-height: 40px; }
  .st-come__testo { display: none; }
  .st-come__breve { display: inline; white-space: nowrap; }
  .st-guscio { --st-pag-su: 22px; --st-pag-lato: 16px; }
  .st-guscio .main { padding-bottom: 32px; }
  .st-guscio.is-come .main, .st-guscio.is-come .main.main--split { padding-top: 0; }
  .st-guscio.is-come .main:not(.main--split) { padding-top: var(--st-pag-su); }
  .st-guscio .main.main--split { height: auto; }
  .st-guscio .det__bar { top: var(--st-alto); }
  .st-tab { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; height: calc(var(--st-tab) + var(--st-safe-b));
    padding: 0 max(4px, var(--st-dx)) var(--st-safe-b) max(4px, var(--st-sx)); border-top: .5px solid var(--st-glass-border); }
  .st-tab__voce { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: 10.5px; font-weight: 500; color: var(--fe-secondary); letter-spacing: .005em; }
  .st-tab__voce .st-tile, .st-tab__voce .st-icona-oggi { --s: 28px; transition: transform var(--st-t-medio) var(--st-molla); }
  .st-tab__voce img.st-tile { width: 28px; height: 28px; }
  .st-tab__voce:active .st-tile, .st-tab__voce:active .st-icona-oggi { transform: scale(.9); }
  .st-tab__voce.is-attiva { color: var(--fe-ink); font-weight: 600; }
  .st-tab__voce.is-attiva::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--fe-ink);
    animation: st-appare var(--st-t-breve) var(--st-uscita) both; }
  .st-tab__badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    font: 600 11px/18px var(--fe-font); text-align: center; color: #fff; background: var(--fe-error); box-shadow: 0 0 0 2px var(--fe-paper); }
  #toast-root { bottom: calc(var(--st-tab) + var(--st-safe-b) + 12px); padding: 0 8px; }
  #toast-root .toast { font-size: 14.5px; }
  .st-menu { min-width: 0; width: min(320px, calc(100vw - 16px)); }
  .st-menu .st-tema { display: flex; }
  .st-menu__voce { min-height: 48px; }
  .cerca-velo { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .cerca-box { top: 0; left: 0; transform: none; width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px);
    background: var(--fe-surface); animation-name: st-chiedi-in-tel; }
  .cerca-box::before { display: none; }
  .cerca-campo { height: 56px; padding: 0 12px 0 16px; }
  .cerca-campo input { font-size: 17px; }
  .cerca-piede { display: none; }
  .cerca-annulla { display: inline-flex; align-items: center; }
  .cerca-campo .st-tasto { display: none; }
  .cerca-ris { padding-bottom: calc(14px + var(--st-safe-b)); }
  .modal-overlay .modal, .st-modale { padding: 22px 20px 18px; }
  .st-strato--foglio { display: flex; align-items: flex-end; }
  .st-foglio, .st-foglio--largo { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: 100%; max-height: 88dvh;
    border-radius: var(--fe-r-panel) var(--fe-r-panel) 0 0; animation: st-foglio-su var(--st-t-lungo) var(--st-molla) both; padding-bottom: var(--st-safe-b); }
  .st-foglio__maniglia { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fe-tertiary); opacity: .5; margin: 8px auto 0; flex: none; }
  .st-foglio__testa { padding: 10px 12px 10px 18px; }
  .st-foglio__corpo { padding: 2px 18px 22px; }
  .st-pagina { padding: 22px 16px 8px; }
  .st-card { padding: 16px; }
  .st-t1 { font-size: 28px; }
  .st-sezione { margin-top: 36px; }
  .st-sezione__testa { flex-wrap: wrap; align-items: center; }
  .st-sezione__titoli { flex: 1 1 200px; }
  .st-fatti { grid-template-columns: 1fr 1fr; }
  .st-fatti__cella { padding: 12px 14px; }
  .st-fatti__cella + .st-fatti__cella::before { display: none; }
  .st-fatti__cella:nth-child(n+3) { border-top: .5px solid var(--fe-separator); }
  .st-fatti__cella:nth-child(even)::before { content: ""; display: block; position: absolute; left: 0; top: 12px; bottom: 12px; width: var(--st-linea); background: var(--fe-separator); }
  .st-ld { display: block; min-height: 0; }
  .st-ld__lista { position: static; height: auto; overflow: visible; border-right: 0; padding: 18px 6px 8px; }
  .st-ld__corpo { padding: 18px 16px 8px; }
  .st-barra-scheda { top: var(--st-alto); padding: 0 12px 0 10px; }
  .st-barra-scheda__indietro { display: inline-flex; }
}
/* Bersagli al tocco di almeno 44 px */
@media (max-width: 760px), (pointer: coarse) {
  .st-segmenti { height: 44px; padding: 0 2px; border-radius: 12px; }
  .st-segmenti button { border-radius: 10px; margin: 4px 0; }
  .st-chip { position: relative; min-height: 40px; }
  .st-btn--compatto { min-height: 44px; }
  .st-btn--compatto.st-btn--tondo { width: 44px; }
  .st-chiudi { position: relative; }
  .st-chiudi::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .st-accesso__scheda, .st-accesso__icona, .st-accesso__aurora i { animation: none; }
  .st-accesso__aurora i { opacity: var(--st-aurora); }
  .st-accesso__scheda.is-no { animation: none; }
}

/* «Nascondi l'elenco» (⌘\) vale per TUTTE le liste + dettaglio (Lead, Progetti, Clienti):
   le larghezze delle singole sezioni (es. .split.pj3) non devono vincere sull'elenco nascosto. */
@media (min-width: 761px) {
  .split.senza-lista, .split.pj3.senza-lista, .split.cl3.senza-lista { grid-template-columns: 0 minmax(0, 1fr); }
  .split.senza-lista > .lista { visibility: hidden; overflow: hidden; border-right: 0; padding-left: 0; padding-right: 0; min-width: 0; }
}
