
/* ============================================================================
   QUADRA · PREMIUM — strato di rifinitura visiva (15 ottobre 2026)
   Si carica DOPO ext.css, in un <style id="premium-css"> separato, e cambia solo l'aspetto:
   nessuna funzione, nessun testo, nessun dato. Per tornare a prima basta togliere questo file
   (src/premium.css) e rilanciare  python3 src/build.py.

   Principi: calma, materiali veri (vetro, ombre a strati, filetti sottili), una sola tinta,
   numeri grandi e leggibili, movimento morbido, contrasto da norma (AA).
   Le regole per il computer stanno tutte dentro @media (min-width:560px): lo script di
   pacchetto le sposta da solo a 560 px dove serve.
   ========================================================================== */

/* ---------- 1. Fondamenta: colore, ombre, curve ---------- */
:root{
  color-scheme:light;
  --bg:#F6F4EF;--surface:#FFFFFF;--surface-2:#EDEAE3;
  --line:rgba(20,32,29,.09);--line-strong:rgba(20,32,29,.16);
  --text:#14201D;--text-2:#435450;--text-3:#5E6D68;
  --accent:#0E7C86;--accent-ink:#FFFFFF;--accent-soft:rgba(14,124,134,.10);
  --ok:#2E7D32;--ok-soft:rgba(46,125,50,.11);
  --warn:#8F5A00;--warn-soft:rgba(242,170,40,.18);
  --bad:#C0392B;--bad-soft:rgba(192,57,43,.09);
  --glass:rgba(255,255,255,.72);
  --glass-edge:rgba(255,255,255,.65);
  --hero:radial-gradient(120% 95% at 100% -10%,rgba(95,225,200,.50) 0%,rgba(95,225,200,0) 58%),
         radial-gradient(90% 80% at -10% 110%,rgba(2,26,24,.9) 0%,rgba(2,26,24,0) 62%),
         linear-gradient(158deg,#06302F 0%,#0A5C57 48%,#12A394 100%);
  --shadow:0 0 0 .5px rgba(20,32,29,.05),0 1px 2px rgba(20,32,29,.04),0 8px 24px rgba(20,32,29,.055);
  --shadow-lg:0 0 0 .5px rgba(20,32,29,.07),0 2px 6px rgba(20,32,29,.06),0 28px 64px rgba(20,32,29,.18);
  --r:18px;--r-lg:26px;
  --ease:cubic-bezier(.22,1,.36,1);--ease-out:cubic-bezier(.22,1,.36,1);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",Inter,"Segoe UI",system-ui,sans-serif;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --bg:#0A1412;--surface:#101E1B;--surface-2:#172A26;
  --line:rgba(255,255,255,.085);--line-strong:rgba(255,255,255,.16);
  --text:#F2F7F5;--text-2:#B7C6C1;--text-3:#86978F;
  --accent:#4FD1C5;--accent-ink:#04201D;--accent-soft:rgba(79,209,197,.17);
  --ok:#5BD08A;--ok-soft:rgba(91,208,138,.14);
  --warn:#F2B84B;--warn-soft:rgba(242,184,75,.15);
  --bad:#FF7A6B;--bad-soft:rgba(255,122,107,.15);
  --glass:rgba(16,30,27,.72);
  --glass-edge:rgba(255,255,255,.10);
  --hero:radial-gradient(120% 95% at 100% -10%,rgba(79,209,197,.34) 0%,rgba(79,209,197,0) 58%),
         radial-gradient(90% 80% at -10% 110%,rgba(2,26,24,.95) 0%,rgba(2,26,24,0) 62%),
         linear-gradient(158deg,#061F1E 0%,#0A5C57 52%,#1FA394 100%);
  --shadow:0 0 0 .5px rgba(255,255,255,.075),0 1px 2px rgba(0,0,0,.4),0 10px 30px rgba(0,0,0,.45);
  --shadow-lg:0 0 0 .5px rgba(255,255,255,.10),0 2px 8px rgba(0,0,0,.5),0 32px 72px rgba(0,0,0,.7);
}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:var(--font);letter-spacing:-.011em;text-rendering:optimizeLegibility;font-optical-sizing:auto;-moz-osx-font-smoothing:grayscale}
::selection{background:var(--accent-soft);color:var(--text)}
.num,.metric,.kv,.big,.cols b,.dtable td,.pill,.badge{font-variant-numeric:tabular-nums lining-nums}

/* ---------- 2. Tipografia ---------- */
.h1{font-size:34px;font-weight:700;letter-spacing:-.034em;line-height:1.07}
.h2{font-size:22px;font-weight:700;letter-spacing:-.026em;line-height:1.15}
.h3{font-size:17px;font-weight:600;letter-spacing:-.018em}
.body{font-size:16px;line-height:1.5;letter-spacing:-.012em}
.small{font-size:13px;line-height:1.4}
.eyebrow{font-size:11.5px;font-weight:600;letter-spacing:.09em}
.metric{font-size:36px;font-weight:700;letter-spacing:-.04em}
label.f{font-size:12.5px;font-weight:600;letter-spacing:0}

/* ---------- 3. Superfici ---------- */
.card,.list,.plan,.dcard,.kpi,.dnav,.dhead{box-shadow:var(--shadow)}
.card{border-radius:var(--r-lg)}
.list{border-radius:var(--r-lg)}
.pad{padding:20px}

/* hero: profondità vera, grana sottile, filo di luce in alto */
.hero,.kpi.hero,.plan.hi{
  background:var(--hero);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),inset 0 0 0 .5px rgba(255,255,255,.08),
             0 2px 6px rgba(2,26,24,.20),0 26px 56px rgba(8,80,84,.28);
}
.hero{border-radius:28px;padding:24px}
.hero::after{right:-70px;top:-90px;width:260px;height:260px;background:radial-gradient(circle,rgba(255,255,255,.16),transparent 66%)}
.hero::before{content:"";position:absolute;inset:0;opacity:.07;mix-blend-mode:overlay;pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}
.hero .lbl{font-size:13px;font-weight:600;letter-spacing:0;color:rgba(255,255,255,.68)}
.hero .big{font-size:46px;font-weight:700;letter-spacing:-.045em;line-height:1.05;margin-top:6px}
.hero .cols{margin-top:22px;padding-top:18px;border-top:.5px solid rgba(255,255,255,.2)}
.hero .cols b{font-size:18px;font-weight:650}
.hero .cols span{font-size:11.5px;font-weight:550;letter-spacing:.01em;color:rgba(255,255,255,.64)}

/* ---------- 4. Barra delle schede: vetro ---------- */
.tabbar{
  left:16px;right:16px;bottom:calc(14px + env(safe-area-inset-bottom));height:70px;border-radius:35px;
  background:var(--glass);
  -webkit-backdrop-filter:saturate(200%) blur(34px);backdrop-filter:saturate(200%) blur(34px);
  border:0;
  box-shadow:inset 0 1px 0 var(--glass-edge),inset 0 0 0 .5px var(--line),0 2px 8px rgba(0,0,0,.06),0 18px 44px rgba(0,0,0,.14);
  transition:transform .45s var(--ease)}
:root[data-theme=dark] .tabbar{box-shadow:inset 0 1px 0 var(--glass-edge),inset 0 0 0 .5px rgba(255,255,255,.08),0 18px 44px rgba(0,0,0,.6)}
.tabbar .t{font-size:10.5px;font-weight:600;letter-spacing:0;color:var(--text-3);isolation:isolate;transition:color .2s}
.tabbar .t::before{content:"";position:absolute;inset:7px 3px;border-radius:26px;background:var(--accent-soft);z-index:-1;
  opacity:0;transform:scale(.88);transition:opacity .25s var(--ease),transform .35s var(--ease)}
.tabbar .t.on{color:var(--accent)}
.tabbar .t.on::before{opacity:1;transform:none}
.tabbar .t.on svg{stroke-width:2;color:var(--accent)}
.badge{top:6px;right:calc(50% - 20px);background:var(--bad);color:#fff;font-weight:700;box-shadow:0 0 0 2px var(--surface)}
.fab{width:58px;height:58px;
  background:radial-gradient(120% 120% at 30% 0%,#5FE1C8 0%,rgba(95,225,200,0) 55%),linear-gradient(160deg,#14909A 0%,#0E7C86 55%,#0A5C57 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 5px rgba(2,40,38,.28),0 2px 6px rgba(6,70,74,.35),0 12px 26px rgba(14,124,134,.42)}
.fab svg.i{width:25px;height:25px;stroke-width:1.9}
.minihead{font-weight:650;font-size:16px;letter-spacing:-.015em;border-bottom:.5px solid var(--line)}

/* ---------- 5. Pulsanti ---------- */
.btn{min-height:54px;border-radius:16px;font-weight:600;font-size:16.5px;letter-spacing:-.016em}
.btn.pri{background:var(--text);color:var(--bg);box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 1px 2px rgba(0,0,0,.18),0 8px 20px rgba(0,0,0,.14)}
.btn.acc{background:linear-gradient(180deg,#0F808A 0%,#0E7C86 100%);color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 1px 2px rgba(6,70,74,.3),0 10px 24px rgba(14,124,134,.30)}
:root[data-theme=dark] .btn.acc{background:linear-gradient(180deg,#6FE0D5 0%,#4FD1C5 100%);color:#04201D}
.btn.sec{background:var(--surface-2);color:var(--text)}
.btn.bad{background:var(--bad-soft);color:var(--bad)}
.btn.sm{min-height:48px;font-size:15px;border-radius:14px}
.btn:disabled,.btn[disabled]{opacity:.5;box-shadow:none}
.press{transition:transform .35s var(--ease),opacity .2s,background-color .2s}
.press:active{transform:scale(.975);opacity:.92;transition-duration:.08s}
@media (hover:hover){.btn:not(:disabled):hover{filter:brightness(1.06)}.item:hover{background:var(--surface-2)}}

/* ---------- 6. Liste: filetti inset come su iOS ---------- */
.item{position:relative;padding:12px 16px;min-height:62px;transition:background-color .15s}
.item+.item,.mv+.mv{border-top:0}
.item+.item::before,.mv+.mv::before{content:"";position:absolute;left:16px;right:0;top:0;height:.5px;background:var(--line-strong);opacity:.75}
.item:has(>.ico)+.item::before,.mv:has(>.ico)+.mv::before{left:72px}
.mv{position:relative}
.ico{width:40px;height:40px;border-radius:12px;box-shadow:inset 0 0 0 .5px var(--line)}
.ico.acc,.ico.ok,.ico.warn,.ico.bad{box-shadow:none}
/* frecce delle liste: più leggere, come su iOS */
.item>svg.i:has(>use[href="#i-next"]),.mv>svg.i:has(>use[href="#i-next"]),.dn-i>svg.i:has(>use[href="#i-next"]){width:17px;height:17px;stroke-width:2.3;color:var(--text-3);opacity:.55}
.pill{padding:5px 11px;font-size:12.5px;font-weight:600;letter-spacing:-.005em}
.chip{font-weight:550;min-height:42px;transition:background-color .2s,color .2s,transform .3s var(--ease)}
.chip.on{background:var(--text);color:var(--bg)}
.seg{background:var(--surface-2);padding:3px;border-radius:13px}
.seg button{border-radius:10px;font-weight:600;min-height:40px;transition:background-color .25s var(--ease),box-shadow .25s var(--ease),color .2s}
.seg button.on{background:var(--surface);box-shadow:0 0 0 .5px var(--line),0 1px 3px rgba(0,0,0,.10)}
:root[data-theme=dark] .seg button.on{background:#2A2E3A}
.bar{height:6px;border-radius:3px}
.bar>i{border-radius:3px}
.tile{border-radius:22px;background:var(--surface);box-shadow:var(--shadow)}
.tile .ico{background:var(--surface-2)}
.tile.wide{background:var(--text);color:var(--bg);box-shadow:var(--shadow)}
.qa .c{width:58px;height:58px;box-shadow:var(--shadow);border:0;transition:transform .35s var(--ease)}
.qa button:active .c{transform:scale(.94)}
.photo{border-radius:14px}
.empty .ico{border-radius:20px}

/* ---------- 7. Campi ---------- */
.in{min-height:50px;border-radius:14px;border:1px solid transparent;background:var(--surface-2);transition:border-color .2s,box-shadow .25s var(--ease),background-color .2s}
.in:focus{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 4px var(--accent-soft)}
.in::placeholder{color:var(--text-3);opacity:.8}
:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px}
.in:focus-visible,.ag-input textarea:focus-visible{outline:0}

/* ---------- 8. Finestre e avvisi ---------- */
.sheet-bg{background:rgba(8,10,20,.34);-webkit-backdrop-filter:blur(10px) saturate(120%);backdrop-filter:blur(10px) saturate(120%);transition:opacity .35s var(--ease)}
.sheet{border-radius:34px;box-shadow:var(--shadow-lg),inset 0 1px 0 var(--glass-edge)}
.grab{width:36px;height:5px;background:rgba(128,128,140,.42)}
.toast{background:rgba(20,32,29,.88);color:#F5F5F7;-webkit-backdrop-filter:saturate(180%) blur(24px);backdrop-filter:saturate(180%) blur(24px);
  border-radius:22px;font-weight:600;box-shadow:0 0 0 .5px rgba(255,255,255,.08),0 16px 40px rgba(0,0,0,.28)}
:root[data-theme=dark] .toast{background:rgba(52,54,64,.88)}
/* i tempi delle schermate (.34 s) e dei fogli (.38 s) restano quelli originali: il codice li aspetta */
.back{font-weight:500;letter-spacing:-.015em}

/* ---------- 9. Chat con l'agente ---------- */
.bub{border-radius:21px;font-size:16px;line-height:1.42;padding:11px 15px;letter-spacing:-.012em}
.bub.me{background:linear-gradient(180deg,#0F808A,#0E7C86);color:#fff;border-bottom-right-radius:7px;box-shadow:0 1px 2px rgba(6,70,74,.25)}
:root[data-theme=dark] .bub.me{background:linear-gradient(180deg,#6FE0D5,#4FD1C5);color:#04201D}
.bub.bot{background:var(--surface);border-bottom-left-radius:7px;box-shadow:var(--shadow)}
.acard{border-radius:18px;background:var(--surface-2)}
.ag-input{-webkit-backdrop-filter:saturate(200%) blur(30px);backdrop-filter:saturate(200%) blur(30px);border-top:.5px solid var(--line)}
.ag-input textarea{border-radius:24px;border:1px solid transparent}
.ag-input textarea:focus{box-shadow:0 0 0 4px var(--accent-soft)}

/* ---------- 10. Cantieri, pianta, cartelle ---------- */
.cover::after{background:linear-gradient(180deg,rgba(0,0,0,0) 15%,rgba(0,0,0,.62))}
.ftile,.fthumb{border-radius:22px}
.fthumb{box-shadow:var(--shadow)}
.planview,.mapbox,.gantt-scroll{border-radius:24px}

/* ---------- 11. Scorrimento sottile dove c'è il mouse ---------- */
@media (hover:hover) and (pointer:fine){
  *{scrollbar-width:thin;scrollbar-color:rgba(128,128,140,.38) transparent}
  *::-webkit-scrollbar{width:10px;height:10px}
  *::-webkit-scrollbar-thumb{background:rgba(128,128,140,.36);border-radius:6px;border:3px solid transparent;background-clip:content-box}
  *::-webkit-scrollbar-thumb:hover{background:rgba(128,128,140,.6);background-clip:content-box;border:3px solid transparent}
  .screen,.ag-msgs,.seg,.chipscroll,.ag-sugg{scrollbar-width:none}
  .screen::-webkit-scrollbar,.ag-msgs::-webkit-scrollbar,.seg::-webkit-scrollbar,.chipscroll::-webkit-scrollbar,.ag-sugg::-webkit-scrollbar{display:none}
}

/* ---------- 12. Computer (da 1024 px; il pacchetto lo porta a 560 px dove serve) ---------- */
@media (min-width:560px){
  #sidebar{
    background:var(--surface);
    background:color-mix(in srgb,var(--surface) 74%,transparent);
    -webkit-backdrop-filter:saturate(180%) blur(30px);backdrop-filter:saturate(180%) blur(30px);
    border-right:.5px solid var(--line-strong);padding:20px 12px}
  #topbar{height:60px;border-bottom:.5px solid var(--line-strong);-webkit-backdrop-filter:saturate(200%) blur(30px);backdrop-filter:saturate(200%) blur(30px)}
  .sb-logo{width:34px;height:34px;border-radius:10px;
    background:radial-gradient(120% 120% at 30% 0%,#5FE1C8 0%,rgba(95,225,200,0) 55%),linear-gradient(160deg,#14909A,#0A5C57);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 4px 12px rgba(14,124,134,.35)}
  .sb-search{border-radius:10px;min-height:38px;font-weight:500;background:var(--surface-2);box-shadow:inset 0 0 0 .5px var(--line)}
  .sb-i{border-radius:10px;min-height:38px;font-weight:550;font-size:14.5px;transition:background-color .15s,color .15s}
  .sb-i:hover{background:var(--surface-2)}
  .sb-i.on{background:var(--accent-soft);color:var(--accent);font-weight:650}
  .sb-h{font-size:11px;font-weight:650;letter-spacing:.09em}
  .tb-btn{border-radius:10px;font-weight:600;min-height:38px;box-shadow:inset 0 0 0 .5px var(--line);transition:background-color .15s,transform .3s var(--ease)}
  .tb-btn:active{transform:scale(.97)}
  .tb-btn.acc{box-shadow:0 1px 2px rgba(0,0,0,.2)}
  .kpi{border-radius:26px;padding:24px 26px}
  .kv{font-size:clamp(26px,2.5vw,36px);font-weight:700;letter-spacing:-.045em;white-space:nowrap}
  .kpi{min-width:0}
  .kl{font-size:13px;font-weight:600}
  .dcard{border-radius:24px}
  .dtable th{font-weight:650;font-size:11px;letter-spacing:.08em;background:transparent}
  .dtable td{border-top:.5px solid var(--line-strong)}
  .dtable tbody tr{transition:background-color .15s}
  .dh-cover{min-height:164px}
  .dn-i{border-radius:10px;font-weight:550}
  .dn-i.on{font-weight:650}
  .pal-box{border-radius:26px;box-shadow:var(--shadow-lg);-webkit-backdrop-filter:blur(30px);backdrop-filter:blur(30px)}
  .sheet{border-radius:30px}
}
@media (min-width:1280px){
  .kpis{grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(0,1fr))}
}

/* ---------- 13. Rispetto per chi preferisce meno movimento / più contrasto ---------- */
@media (prefers-reduced-transparency:reduce){
  .tabbar,.minihead,.ag-input,#topbar,#sidebar,.toast{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--surface)}
}
@media (prefers-contrast:more){
  :root{--line:rgba(20,32,29,.28);--text-3:#55555A}
  :root[data-theme=dark]{--line:rgba(255,255,255,.28);--text-3:#B0B1BA}
}
@media (prefers-reduced-motion:reduce){
  .tabbar .t::before,.screen,.sheet,.press{transition-duration:.01ms!important}
}
@media print{.hero::before{display:none}}

/* ============================================================================
   16.5 · ASPETTO: Apple minimale + numeri forti (15 ottobre 2026)
   Più aria, schede bianche con filetti sottili, numeri grandi, azioni rotonde piene.
   Il font non cambia. Per tornare a prima basta togliere questo blocco e rilanciare build.py.
   ========================================================================== */
:root{--bg:#FBFBF9;--surface:#FFFFFF;--surface-2:#F2F2EE;--line:rgba(16,27,25,.07);--line-strong:rgba(16,27,25,.12);
 --text:#101B19;--text-2:#46544F;--text-3:#5B6A65;--accent:#0B6E6A;--ok:#25692A;--ok-soft:rgba(37,105,42,.11);--accent-soft:#E6F2F0;
 --shadow:0 0 0 .5px rgba(16,27,25,.06),0 1px 2px rgba(16,27,25,.03),0 10px 30px rgba(16,27,25,.05);
 --shadow-lg:0 0 0 .5px rgba(16,27,25,.07),0 2px 4px rgba(16,27,25,.04),0 30px 70px rgba(16,27,25,.10)}
:root[data-theme=dark]{--bg:#0A1412;--surface:#101E1B;--surface-2:#172A26;--line:rgba(255,255,255,.085);--line-strong:rgba(255,255,255,.16);
 --text:#F2F7F5;--text-2:#B7C6C1;--text-3:#86978F;--accent:#4FD1C5;--accent-soft:rgba(79,209,197,.17);
 --shadow:0 0 0 .5px rgba(255,255,255,.06),0 10px 30px rgba(0,0,0,.35);--shadow-lg:0 0 0 .5px rgba(255,255,255,.08),0 30px 70px rgba(0,0,0,.5)}
.h1{font-size:38px;letter-spacing:-.055em;font-weight:800}
.eyebrow{letter-spacing:.14em}
/* numeri forti in una scheda chiara e ariosa */
.hero,.kpi.hero{background:var(--surface);color:var(--text);border:.5px solid var(--line-strong);box-shadow:var(--shadow-lg);padding:26px 24px 22px}
.hero::after{display:none}
.hero .lbl,.kpi.hero .kl,.kpi.hero .ks{color:var(--text-3);font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.hero .big{font-size:84px;font-weight:800;letter-spacing:-.07em;line-height:1;color:var(--text);margin-top:8px;font-variant-numeric:tabular-nums}
.hero .cols{border-top:1px solid var(--line);margin-top:22px;padding-top:18px}
.hero .cols b{font-size:30px;letter-spacing:-.05em;font-weight:800;color:var(--accent)}
.hero .cols span{color:var(--text-3);font-size:12px}
.kpi.hero .kv,.kpi.hero .num{color:var(--text)}
/* azioni rotonde piene */
.qa{margin:24px 0 8px}
.qa .c{width:64px;height:64px;background:var(--accent);color:var(--accent-ink,#fff);border:0;box-shadow:0 10px 24px rgba(11,110,106,.28)}
:root[data-theme=dark] .qa .c{box-shadow:0 10px 24px rgba(79,209,197,.18)}
.qa button{font-size:13px;color:var(--text)}
.card,.item.card{border-radius:24px;box-shadow:var(--shadow)}
.cover{height:92px}
.btn.acc,.btn.pri{background:var(--accent);color:var(--accent-ink,#fff);box-shadow:0 10px 24px rgba(11,110,106,.26)}
:root[data-theme=dark] .btn.acc,:root[data-theme=dark] .btn.pri{box-shadow:none}
.fab{background:linear-gradient(160deg,#128A84,#0B6E6A);box-shadow:0 14px 34px rgba(11,110,106,.34)}
:root[data-theme=dark] .fab{background:linear-gradient(160deg,#5FE0D5,#2FB3A8);box-shadow:0 14px 34px rgba(79,209,197,.25)}
.t.on{color:var(--accent)}
.ico{background:var(--accent-soft);color:var(--accent)}
.ico.bad{background:var(--bad-soft);color:var(--bad)}
.ico.warn{background:var(--warn-soft);color:var(--warn)}

/* ============================================================================
   18.0 · ACCESSIBILITÀ (WCAG 2.1 AA): contrasti, bersagli da 44 px, focus visibile
   ========================================================================== */
.chip,.seg button{min-height:44px}
.ico{min-width:44px;min-height:44px}
button.ico,a.ico{width:44px;height:44px}
.badge{min-width:20px;height:20px;font-size:11.5px}
:root[data-theme=dark] .badge{color:#2A0A06}
.paper .rp-foot{color:#5B6A65}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:10px}
.screen:focus,.sheet:focus{outline:none}
[data-act]:not(button):not(a):not(input):not(select):not(textarea){cursor:pointer}


/* computer in finestre strette: barra laterale a sole icone */
@media (min-width:560px) and (max-width:899px){
  #sidebar{width:68px;padding:14px 8px}
  .sb-i span,.sb-h,.sb-brand .grow,.sb-search span,.sb-search kbd,.sb-b,.sb-foot,.sb-i em{display:none}
  .sb-i,.sb-search{justify-content:center;padding:0}
  .sb-brand{justify-content:center;padding:4px 0 14px}
  .screens{left:68px}#topbar{left:68px;padding:0 16px}
  .dsite{grid-template-columns:1fr}.dnav{position:static;display:flex;flex-wrap:wrap;gap:4px}
  .dnav .eyebrow{display:none}.dn-i{width:auto}
  .kpis{grid-template-columns:1fr 1fr}
  #dock{width:min(420px,100%)}body.dock-on .screens{right:0}body.dock-on #topbar{right:0}
  .screen{padding-left:20px;padding-right:20px}
  .tb-btn span{display:none}
  .dh{flex-wrap:wrap;align-items:flex-start}
}

/* Quadra v2: branded account-first entry, official provider artwork. */
body.auth-entry #sidebar,body.auth-entry #topbar,body.auth-entry #dock,body.auth-entry #pal,body.auth-entry #dropzone{display:none!important}body.auth-entry .screens{inset:0!important}body[data-auth-locked="true"] #sheet,body[data-auth-locked="true"] #sheetBg,body[data-auth-locked="true"] #rec,body[data-auth-locked="true"] #tabbar{display:none!important}
.screen[data-name="auth"]{padding:0!important;background:var(--bg)}
.auth-layout{min-height:100%;padding:40px 24px calc(32px + env(safe-area-inset-bottom));display:grid;place-items:center;box-sizing:border-box}
.auth-panel{width:100%;max-width:420px;margin:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.auth-panel button,.auth-panel input{font-family:inherit}
.auth-brand{display:flex;flex-direction:column;align-items:center;gap:12px;margin:0 0 28px}.auth-brand img{width:64px;height:64px;border-radius:16px}.auth-brand span{font-size:28px;font-weight:750;letter-spacing:-1px;line-height:1.2}
.auth-panel h1{font-size:28px;line-height:1.2;letter-spacing:-1px;text-align:center;margin:0 0 12px;font-weight:700;color:var(--text)}
.auth-intro{text-align:center;color:var(--text-2);font-size:16px;line-height:1.5;margin:0 0 28px}
.auth-providers{display:grid;gap:12px}.auth-social{width:100%;height:48px;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:14px;font-weight:600;letter-spacing:.25px;cursor:pointer}.auth-google{border:1px solid #747775;background:#fff;color:#1f1f1}.auth-google img{width:20px;height:20px;object-fit:contain}.auth-apple{background:#000;border:1px solid #000;overflow:hidden}.auth-apple img{width:320px;max-width:100%;height:48px;object-fit:contain}.auth-social:disabled{cursor:not-allowed}.auth-social:disabled span{color:#5f6368}
.auth-provider-note{font-size:14px;line-height:1.5;text-align:center;color:var(--text-3);margin:12px 0 0}.auth-provider-note:empty{display:none}
.auth-divider{display:flex;gap:16px;align-items:center;margin:24px 0;color:var(--text-3);font-size:14px}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:var(--line);flex:1}
.auth-form{display:grid;gap:10px}.auth-form>label{font-size:14px;font-weight:600;line-height:1.5}.auth-form .in{width:100%;box-sizing:border-box;min-height:50px;padding:12px 14px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:16px}.auth-form .in::placeholder{color:var(--text-3)}.auth-form>.btn{font-family:inherit;margin-top:4px;min-height:50px;border-radius:8px;font-size:16px;font-weight:650;box-shadow:none}.auth-code{margin-top:24px}
.auth-consent{display:flex;align-items:flex-start;gap:10px;line-height:1.5;font-weight:400!important;padding:4px 0}.auth-consent input{min-width:20px;height:20px;margin:2px 0}.auth-consent a,.auth-legal a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.auth-switch{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;font-size:14px;color:var(--text-2);margin:12px 0 0}.auth-switch button{min-height:44px;padding:8px;font-weight:700;color:var(--accent);font-size:14px;text-decoration:underline;text-underline-offset:3px}
.auth-footnote,.auth-legal{font-size:14px;line-height:1.5;color:var(--text-3);text-align:center;margin:10px 0 0}.auth-legal{margin-top:20px}.auth-message{font-size:14px;line-height:1.5;border-radius:8px;padding:12px 16px;margin-bottom:20px;background:var(--surface-2);color:var(--text)}.auth-message.error{background:#fce9e7;color:#8c2b23}
.auth-panel button:focus-visible,.auth-panel input:focus-visible,.auth-panel a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.auth-onboard-account{font-size:14px;overflow-wrap:anywhere;line-height:1.5}.auth-onboard-account .btn{display:block;margin-top:12px;width:100%}
@media(min-width:800px){.auth-layout{padding:48px 24px;background:radial-gradient(ellipse at 0 0,var(--accent-soft),transparent 58%)}.auth-panel{max-width:464px;background:var(--surface);padding:40px;border:1px solid var(--line);border-radius:16px}.auth-brand{margin-bottom:28px}}
@media(max-width:480px){.auth-layout{padding:24px 24px calc(24px + env(safe-area-inset-bottom))}.auth-brand{gap:10px;margin-bottom:24px}.auth-brand img{width:60px;height:60px}.auth-brand span{font-size:26px}.auth-panel h1{font-size:26px}.auth-intro{margin-bottom:24px}}

#clerk-auth{min-height:80px}.auth-panel .btn{width:100%;margin-top:12px}.auth-message{overflow-wrap:anywhere}