/* ── Casa Tasselli · pelle "vetro" ─────────────────────────────────────
   Si carica dopo style.css e ne cambia solo l'aspetto: superfici traslucide con sfocatura, bordi sottili con riflesso interno,
   raggi ampi, barra laterale a icone, titoli grandi e leggeri, controlli a pillola. I colori restano quelli della palette di casa. */
:root {
  --radius: 26px; --radius-s: 16px;
  --glass: rgba(255, 253, 249, .58); --glass-2: rgba(255, 253, 249, .38); --glass-strong: rgba(255, 253, 249, .82);
  --glass-line: rgba(255, 255, 255, .75); --glass-edge: rgba(31, 38, 51, .07); --hi: inset 0 1px 0 rgba(255, 255, 255, .7);
  --blur: saturate(140%) blur(22px);
  --shadow: 0 1px 1px rgba(31, 38, 51, .04), 0 18px 40px -18px rgba(31, 38, 51, .22);
  --glow-1: rgba(224, 138, 93, .30); --glow-2: rgba(232, 178, 107, .28); --glow-3: rgba(47, 127, 143, .16);
  --on-accent: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --glass: rgba(255,255,255,.055); --glass-2: rgba(255,255,255,.035); --glass-strong: rgba(30,37,52,.86); --glass-line: rgba(255,255,255,.10);
    --glass-edge: rgba(0,0,0,.35); --hi: inset 0 1px 0 rgba(255,255,255,.08); --shadow: 0 1px 1px rgba(0,0,0,.3), 0 24px 50px -20px rgba(0,0,0,.65);
    --glow-1: rgba(224,138,93,.22); --glow-2: rgba(232,178,107,.12); --glow-3: rgba(47,127,143,.18); --bg: #10141d; }
}
:root[data-theme=dark] { --glass: rgba(255,255,255,.055); --glass-2: rgba(255,255,255,.035); --glass-strong: rgba(30,37,52,.86); --glass-line: rgba(255,255,255,.10);
    --glass-edge: rgba(0,0,0,.35); --hi: inset 0 1px 0 rgba(255,255,255,.08); --shadow: 0 1px 1px rgba(0,0,0,.3), 0 24px 50px -20px rgba(0,0,0,.65);
    --glow-1: rgba(224,138,93,.22); --glow-2: rgba(232,178,107,.12); --glow-3: rgba(47,127,143,.18); --bg: #10141d; }

html, body { background: var(--bg); }
body { background:
    radial-gradient(900px 620px at 8% -8%, var(--glow-1), transparent 62%),
    radial-gradient(760px 560px at 102% 12%, var(--glow-2), transparent 60%),
    radial-gradient(900px 700px at 60% 118%, var(--glow-3), transparent 60%),
    var(--bg); background-attachment: fixed; min-height: 100vh; }

/* superfici di vetro */
.card, .tile, .climate, .strip .chip, .search, .login-form, .msg.bot, .ekpi .tile {
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow), var(--hi);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.card, .tile, .climate { border-radius: var(--radius); padding: 22px 24px; }
.card { margin: 16px 0; } .grid, .tiles, .ekpi { gap: 16px; margin: 16px 0; }
.strip { gap: 12px; } .strip .chip { border-radius: 22px; padding: 14px 16px; }
.card-h { margin-bottom: 14px; } .card-h h3 { font-size: 13px; letter-spacing: .1em; font-weight: 700; }
.card-h > .ic { width: 20px; height: 20px; opacity: .8; }

/* barra laterale: binario di icone */
.shell { grid-template-columns: 92px minmax(0, 1fr); }
.side { background: transparent; border-right: 0; padding: 22px 0; align-items: center; gap: 18px; width: 92px; }
.brand { padding: 0; flex-direction: column; } .brand > div { display: none; }
.brand-img { width: 52px; height: 52px; border-radius: 18px; border: 1px solid var(--glass-line); }
.nav { gap: 8px; align-items: center; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 28px; padding: 10px 8px; box-shadow: var(--shadow), var(--hi);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.nav button, .side-logout { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 18px; position: relative; color: var(--muted); }
.nav button span, .side-logout span { position: absolute; left: 64px; top: 50%; transform: translateY(-50%) translateX(-4px); background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-line);
  padding: 6px 12px; border-radius: 12px; font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .15s; box-shadow: var(--shadow); z-index: 30; }
.nav button:hover span, .nav button:focus-visible span, .side-logout:hover span { opacity: 1; transform: translateY(-50%); }
.nav button:hover, .side-logout:hover { background: var(--glass-2); color: var(--text); }
.nav button.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 22px -8px var(--accent); }
.side-logout { margin-top: auto; }

/* intestazione: titolo grande e leggero */
.main { max-width: 1280px; padding: 26px 34px 48px 8px; }
.top { align-items: center; margin-bottom: 18px; }
.top h1 { font-size: 46px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.clock { font-weight: 300; font-size: 30px; letter-spacing: -.01em; }
.h2 { font-weight: 700; letter-spacing: .12em; font-size: 12px; margin: 26px 0 12px; }

/* numeri grandi più leggeri */
.climate .t { font-size: 64px; font-weight: 300; letter-spacing: -.03em; } .climate .u { font-weight: 400; }
.tile-v, .ekpi .tile-v { font-weight: 300; letter-spacing: -.02em; } .ekpi .tile-v { font-size: 40px; }
.kidstats b { font-weight: 400; font-size: 28px; letter-spacing: -.01em; } .wx .t { font-weight: 300; font-size: 48px; }
.tile-l, .climate .name { font-weight: 700; font-size: 12px; letter-spacing: .1em; }

/* tessere in evidenza: piene, come le schede colorate di un cruscotto */
.climate:nth-child(1) { background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000 0%) 120%); border-color: transparent; color: #fff; }
.climate:nth-child(2) { background: linear-gradient(150deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 82%, var(--accent)) 120%); border-color: transparent; color: #2a1d10; }
.climate:nth-child(-n+2) .name, .climate:nth-child(-n+2) .u, .climate:nth-child(-n+2) .ctl .sp { color: inherit; opacity: .78; }
.climate:nth-child(-n+2) .pill { background: rgba(255,255,255,.22); color: inherit; }
.climate:nth-child(-n+2) .ctl button { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.3); color: inherit; }

/* controlli a pillola */
.seg { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; padding: 5px; box-shadow: var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.seg button { border-radius: 999px; font-weight: 700; padding: 9px 18px; } .seg.small button { padding: 6px 13px; }
.seg button.on { background: var(--glass-strong); box-shadow: 0 6px 16px -8px rgba(31,38,51,.35); }
.iconbtn { border-radius: 16px; background: var(--glass); border-color: var(--glass-line); box-shadow: var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.iconbtn:hover { background: var(--glass-strong); }
.chips button, .btn { background: var(--glass); border-color: var(--glass-line); box-shadow: var(--hi); } .btn.ghost { border-radius: 999px; }
input, select, textarea { background: var(--glass); border-color: var(--glass-line); border-radius: 16px; }
.search { border-radius: 999px; padding: 4px 18px; }
.form-row button, .chatbar button, .login-form button { border-radius: 16px; box-shadow: 0 10px 22px -10px var(--accent); }
.pill { background: var(--glass-2); border: 1px solid var(--glass-line); font-weight: 700; }
.pill.ok, .pill.warn, .pill.acc { border-color: transparent; }

/* riempimenti interni: vetro più tenue al posto del grigio pieno */
.room, .kidstats div, .week .day, .wx-days div, .task, .grade, .orario .od, .ekpi.small .tile, .eng .ex { background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: 18px; }
.ekpi.small .tile { box-shadow: none; } .bar { background: var(--glass-edge); }
.list .row { border-bottom-color: var(--glass-edge); padding: 14px 0; }
.msg { border-radius: 22px; } .msg.user { box-shadow: 0 12px 24px -12px var(--accent); }
.viztip { background: var(--glass-strong); border-color: var(--glass-line); border-radius: 16px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.notice { border-radius: 18px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); } .main { padding: 16px 16px 104px; }
  .top h1 { font-size: 34px; } .clock { font-size: 22px; }
  .card, .tile, .climate { padding: 18px; border-radius: 22px; } .climate .t { font-size: 54px; }
  .tabbar { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 26px; border: 1px solid var(--glass-line); background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); padding: 4px 4px; overflow-x: auto; }
  .tabbar button { border-radius: 20px; padding: 9px 2px 7px; min-width: 56px; } .tabbar button.on { background: var(--accent); color: var(--on-accent); }
}
@media (prefers-reduced-transparency: reduce) { .card, .tile, .climate, .nav, .seg, .iconbtn { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); } }

/* ── bacheca compiti (Casa) ───────────────────────────────────────── */
.board { display: grid; grid-template-columns: 132px repeat(var(--cols, 7), minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.bd-h { padding: 4px 8px 8px; display: flex; flex-direction: column; line-height: 1.15; } .bd-h b { font-weight: 700; font-size: 14px; } .bd-h small { color: var(--muted); font-size: 12px; }
.bd-h.today b { color: var(--accent); }
.bd-kid { display: flex; align-items: center; gap: 10px; padding: 10px 8px; cursor: pointer; border-radius: 18px; } .bd-kid:hover { background: var(--glass-2); }
.bd-kid b { display: block; font-weight: 700; } .bd-kid small { color: var(--muted); font-size: 12px; }
.bd-c { background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 64px; min-width: 0; }
.bd-c.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } .bd-c .none { color: var(--muted); opacity: .45; text-align: center; margin: auto; font-style: normal; }
.hw { border-radius: 12px; padding: 7px 9px; background: var(--glass-strong); border-left: 3px solid var(--accent-2); font-size: 12.5px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.hw b { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 800; } .hw.verifica { border-left-color: var(--bad); } .hw.promemoria { border-left-color: var(--ok); }
.boardlist { display: none; } .bl-day + .bl-day { margin-top: 14px; } .bl-h { font-weight: 700; font-size: 17px; margin-bottom: 6px; } .bl-h small { color: var(--muted); font-weight: 600; } .bl-h.today { color: var(--accent); }
.bl-kid { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; } .bl-kid .grow { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
@media (max-width: 1000px) { .board { display: none; } .boardlist { display: block; } }

/* ── bambini: un colore per figlio, compiti al centro ─────────────── */
#sec-bambini { --kid: var(--penny); } #sec-bambini[data-kid=morgana] { --kid: var(--morgana); } #sec-bambini[data-kid=draco] { --kid: var(--draco); }
.kidpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kidpick button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); font: inherit; font-weight: 700; font-size: 18px;
  cursor: pointer; box-shadow: var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); opacity: .7; }
.kidpick button .avatar { width: 40px; height: 40px; font-size: 16px; } .kidpick button.on { opacity: 1; background: var(--kid); color: #fff; border-color: transparent; box-shadow: 0 14px 28px -12px var(--kid); }
.kidpick button.on .avatar { background: rgba(255,255,255,.25); }
.kidhero { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--radius); margin-bottom: 16px; color: #fff;
  background: linear-gradient(140deg, var(--kid), color-mix(in srgb, var(--kid) 72%, #1f2633)); box-shadow: 0 22px 44px -22px var(--kid); }
.kidhero .avatar { width: 58px; height: 58px; font-size: 22px; background: rgba(255,255,255,.22); } .kidhero h2 { font-size: 34px; font-weight: 300; letter-spacing: -.02em; } .kidhero small { opacity: .8; }
.kidhero .grow { flex: 1; min-width: 0; } .kh-n { text-align: center; padding: 0 12px; } .kh-n b { display: block; font-size: 34px; font-weight: 300; line-height: 1; } .kh-n small { font-size: 12px; }
.kid-primary { border-color: color-mix(in srgb, var(--kid) 45%, transparent); }
.hwdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hwday { background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.hwday.today { border-color: var(--kid); box-shadow: inset 0 0 0 1px var(--kid); }
.hwday-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } .hwday-h b { font-size: 20px; font-weight: 600; } .hwday.today .hwday-h b { color: var(--kid); } .hwday-h small { color: var(--muted); }
.hwitem { display: flex; gap: 10px; align-items: center; background: var(--glass-strong); border-radius: 16px; padding: 10px 12px; border-left: 4px solid var(--kid); }
.hwitem.verifica { border-left-color: var(--bad); } .hwitem .grow { flex: 1; min-width: 0; } .hwitem .t { font-weight: 800; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; } .hwitem .t small { text-transform: none; color: var(--muted); font-weight: 600; }
.hwitem .s { font-size: 15px; overflow-wrap: anywhere; } .hwitem .iconbtn { width: 38px; height: 38px; }
@media (max-width: 860px) { .kidhero { padding: 16px; gap: 12px; } .kidhero h2 { font-size: 26px; } .kh-n b { font-size: 26px; } .kh-n { padding: 0 6px; } .kidpick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kidpick button { flex-direction: column; gap: 6px; padding: 10px 6px; font-size: 14px; } }

/* ── diario personale ─────────────────────────────────────────────── */
.hweeks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; } .hweek { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .hweek small { width: 120px; color: var(--muted); }
.hdots { display: flex; gap: 6px; } .hd { width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.hd.free { background: var(--ok); color: #fff; border-color: transparent; } .hd.drank { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .hd.future { opacity: .3; cursor: default; }

/* ── il cervello di Casa ──────────────────────────────────────────── */
.brainbox { position: relative; height: clamp(260px, 44vh, 420px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--glass-line); flex: none;
  background: radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--glass);
  box-shadow: var(--shadow), var(--hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: height .5s cubic-bezier(.2,.8,.2,1); margin-bottom: 10px; }
.brainbox.compact { height: clamp(150px, 22vh, 210px); }
.brainbox canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.brain-cap { position: absolute; left: 20px; top: 16px; display: flex; flex-direction: column; pointer-events: none; } .brain-cap b { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brain-cap small { color: var(--muted); font-size: 12px; opacity: .8; }
.chat-wrap { height: calc(100vh - 130px); }

.bd-c.free { min-height: 40px; padding: 4px; } .bd-kid.free { padding: 4px 8px; }
.week .lesson { font-size: 13px; display: flex; gap: 8px; line-height: 1.3; } .week .lesson span { color: var(--muted); width: 14px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.week .day { gap: 5px; padding: 12px; } .week .it { background: var(--glass-strong); border-radius: 10px; padding: 6px 8px; border-left-width: 3px; }

.list .row.link { cursor: pointer; border-radius: 14px; } .list .row.link:hover { background: var(--glass-2); }
#bankTxFilter { cursor: pointer; }

/* la barra laterale sta sopra il contenuto: le etichette al passaggio non devono finire dietro le card di vetro */
.side { position: sticky; z-index: 40; } .main { position: relative; z-index: 1; }
.nav button:focus:not(:focus-visible) span { opacity: 0; }
.mort { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ── simulatore del mutuo ─────────────────────────────────────────── */
.simform { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 14px; }
.simform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.simform label input { width: 170px; font-size: 18px; font-weight: 600; } .simform label small { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* pianta del rumore: la stanza sotto il cursore si stacca appena dal resto */
.nroom rect, .nroom polygon { transition: opacity .12s ease; }
.nroom:hover rect, .nroom:hover polygon { opacity: .82; }
.nroom text { fill: var(--text); pointer-events: none; }

/* valore di una carta: campo stretto, allineato a destra come una cifra */
.cardv { width: 110px; text-align: right; border: 1px solid var(--line); background: var(--card); color: var(--text);
         font: inherit; font-weight: 700; padding: 6px 8px; border-radius: 10px; }

/* chip delle aree nella simulazione: il totale sta sotto al nome, più piccolo */
#planScope { flex-wrap: wrap; }
#planScope button small { display: block; font-weight: 400; opacity: .7; font-size: 11px; }

/* schede interne di Soldi e Progetti: una riga sola, scorrevole su telefono invece di andare a capo */
.seg.tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; margin: 0 0 14px; scrollbar-width: none; }
.seg.tabs::-webkit-scrollbar { display: none; }
.seg.tabs button { flex: 0 0 auto; white-space: nowrap; }

/* da guardare: la prima cosa della Casa, e l'unica con un bordo colorato */
.card.attn { border-left: 3px solid var(--warn, #c98a2b); }
.card.attn .row.link { cursor: pointer; }
.card.attn .row.link:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pill.bad { background: color-mix(in srgb, #c0392b 16%, var(--card)); color: #a8322a; }
:root:not([data-theme=light]) .pill.bad { color: #f08a7e; }

.kidstats.tight b { font-size: 19px; white-space: nowrap; } .kidstats.tight div { padding: 10px 6px; }
.tbl.scen td:first-child { white-space: normal; min-width: 8.5em; }
.row.focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; transition: outline-color .6s; }
.row select.mini { font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); max-width: 150px; }
.draft { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.draft textarea { font: inherit; padding: 10px 12px; color: var(--text); }
.replybox:empty { display: none; } .replybox { margin-top: 8px; }
/* le due banche: blu Fineco, verde ChiantiBanca */
:root { --bank-fineco: #2a64c4; --bank-chianti: #2e8a57; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bank-fineco: #6f9ef0; --bank-chianti: #5cc68b; } }
:root[data-theme=dark] { --bank-fineco: #6f9ef0; --bank-chianti: #5cc68b; }
.bank-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.bank-tag.fineco { color: var(--bank-fineco); background: color-mix(in srgb, var(--bank-fineco) 14%, transparent); }
.bank-tag.chianti { color: var(--bank-chianti); background: color-mix(in srgb, var(--bank-chianti) 14%, transparent); }
.kidstats div.bank-fineco { box-shadow: inset 0 3px 0 var(--bank-fineco); } .kidstats div.bank-chianti { box-shadow: inset 0 3px 0 var(--bank-chianti); }
/* progetti: una griglia di caselle, si apre quella che serve */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ptile { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg-2); cursor: pointer; min-width: 0; }
.ptile:hover { border-color: var(--accent); } .ptile.open { grid-column: 1 / -1; cursor: default; background: var(--card); border-color: var(--accent); }
.ptile.urgent { box-shadow: inset 3px 0 0 var(--bad); } .ptile.closed { opacity: .55; } .ptile.loose { border-style: dashed; }
.ptile .ph { display: flex; align-items: center; gap: 6px; } .ptile .ph b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptile .pline { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .pdet { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.pmail { padding: 6px 0; border-bottom: 1px dashed var(--line); } .threadbox:empty { display: none; } .threadbox { margin: 6px 0 0 10px; }
/* da guardare: un riquadro piccolo, una riga per voce */
.card.attn.mini { padding-top: 10px; padding-bottom: 10px; } .card.attn.mini .card-h { margin-bottom: 4px; }
.attn-i { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; min-width: 0; }
.attn-i .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .attn-i:hover .t { text-decoration: underline; }
.attn-i .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.attn-i.lv1 .dot { background: var(--bad); } .attn-i.lv2 .dot { background: var(--warn); }
.attn-more { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; }

/* GMH: mesi del reparto, prodotti + ticket impilati, tacca per l'anno prima */
.gmh-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 140px; margin: 8px 0; }
.gmh-bars > div { position: relative; display: flex; flex-direction: column; justify-content: end; align-items: center; height: 100%; }
.gmh-bars .stack { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 28px; height: calc(100% - 18px); }
.gmh-bars .stack i { display: block; width: 100%; }
.gmh-bars .stack i.web { background: var(--accent); border-radius: 0; }
.gmh-bars .stack i.tk { background: var(--accent-2); }
.gmh-bars .stack i:first-child { border-radius: 4px 4px 0 0; }
.gmh-bars .stack i + i { margin-top: 2px; }
.gmh-bars .stack i[style*="height:0%"] { display: none; }
.gmh-bars .prev { position: absolute; left: 50%; transform: translateX(-50%); width: 34px; max-width: 100%; border-top: 2px dashed var(--muted); }
.gmh-bars small { height: 18px; line-height: 18px; font-size: 11px; color: var(--muted); }
.gmh-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.gmh-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.gmh-legend i.web { background: var(--accent); } .gmh-legend i.tk { background: var(--accent-2); }
.gmh-legend i.prev { background: none; border-top: 2px dashed var(--muted); border-radius: 0; height: 0; width: 14px; vertical-align: 3px; }

/* previsione COAN: ordini aperti con i comandi a destra */
.fc-order { align-items: center; flex-wrap: wrap; gap: 8px; }
.fc-order.off { opacity: .5; }
.fc-order.off .t { text-decoration: line-through; }
.fc-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tbl tr.on td { background: var(--glass-2); }
.fc-group { margin: 12px 0 2px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.fc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.fc-months > div { background: var(--glass-2); border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; }
.fc-months > div.est { opacity: .7; border: 1px dashed var(--glass-line); }
.fc-months small { color: var(--muted); font-size: 11px; } .fc-months b { font-size: 13px; }
.tbl tr.muted td { color: var(--muted); }
/* obiettivo casa nuova */
.goal-svg { width: 100%; height: auto; display: block; margin: 8px 0 2px; }
.goal-svg .axis { stroke: var(--glass-line); }
.goal-svg path { fill: none; stroke-width: 2; }
.goal-svg .avail { stroke: var(--accent); } .goal-svg .need { stroke: var(--muted); stroke-dasharray: 5 4; }
.goal-svg .avail-dot { fill: var(--accent); } .goal-svg .hit { fill: var(--ok, #3f8f5f); stroke: var(--bg, #fff); stroke-width: 2; }
.goal-svg text { font-size: 11px; fill: var(--muted); }
.goal-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; align-items: end; }
.goal-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.goal-form label small { color: var(--muted); font-size: 11px; }
.ks-bars { height: 150px; }
.card-h .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.tbl td.sim-sug { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* link leggibili anche nel tema scuro (prima restavano col blu del browser) */
a { color: var(--accent); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
#stSites .t a { color: var(--text); text-decoration: none; font-weight: 800; }
#stSites .t a:hover { color: var(--accent); }

/* collaboratori: una riga aperta alla volta, con il bordo che dice qual è */
.tm-row { border-radius: 14px; padding: 10px 12px; margin: 0 -12px; cursor: pointer; }
.tm-row:hover { background: var(--bg-2, rgba(127,127,127,.06)); }
.tm-row.open { cursor: default; background: var(--bg-2, rgba(127,127,127,.06)); box-shadow: inset 3px 0 0 var(--accent); }
.tm-row .tm-body { margin-top: 10px; display: grid; gap: 10px; }
.tm-row textarea, .tm-row input[type=text] { width: 100%; }
.tm-hist { border-left: 2px solid var(--line); padding-left: 10px; display: grid; gap: 6px; }
.tm-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill.q { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--accent); }

/* laboratorio quantistico */
.ql-list { margin: 6px 0 4px; padding-left: 18px; display: grid; gap: 6px; }
.ql-list li { line-height: 1.45; }
.ql-tbl td, .ql-tbl th { white-space: nowrap; }
.ql-tbl tr.ql-first td { border-top: 1px solid var(--line); }
.ql-plan { white-space: normal !important; text-align: left !important; min-width: 260px; }
.ql-bar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 3px; background: var(--bg-2, rgba(127,127,127,.15)); margin-left: 6px; overflow: hidden; }
.ql-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* paghette: le etichette per figlio entrano nella griglia del modulo */
.contents { display: contents; }
.tbl td.neg { color: var(--bad, #b4443a); }
/* pro e contro della casa */
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 8px; }
.procon h4 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.procon ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; }
@media (max-width: 700px) { .procon { grid-template-columns: 1fr; } }

/* lavagna Q4 */
.q4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } @media (max-width: 760px) { .q4 { grid-template-columns: 1fr; } }
.q4-h { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; } .q4-h small { color: var(--muted); }
.q4-item { padding: 10px 12px; border: 1px solid var(--glass-line); border-radius: 14px; margin-bottom: 8px; cursor: pointer; background: var(--glass); }
.q4-item.done { opacity: .55; } .q4-item.late { border-color: var(--bad, #b4443a); } .q4-item.wait { border-style: dashed; } .q4-item.on { box-shadow: 0 0 0 2px var(--accent); }
.q4-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q4-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; } .q4-bar { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 6px; font-size: 12px; } .q4-bar .bar { margin: 0; } .q4-bar .q { color: var(--muted); }
.q4-edit { margin-top: 10px; cursor: default; }
.q4-subj { width: 100%; margin-bottom: 6px; } #q4Body { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card); color: var(--text); }
/* da guardare: la spunta */
.attn-ok { margin-left: auto; flex: none; border: 1px solid var(--glass-line); background: transparent; color: var(--muted); border-radius: 999px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; line-height: 1; }
.attn-ok:hover { color: var(--ok, #3f8f5f); border-color: currentColor; }
/* domani (bambini) */
.tmw-alerts { display: grid; gap: 6px; margin-bottom: 10px; } .tmw-alert { padding: 8px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 15px; } .tmw-alert.verifica, .tmw-alert.ritardo { border-color: var(--warn); }
.tmw-subj { margin: 6px 0 10px; font-size: 15px; } .tmw-subj .chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); margin: 2px 4px 2px 0; }
.tmw-hw { margin-bottom: 10px; font-size: 15px; }
.tmw-list .task.big { font-size: 17px; padding: 12px 10px; } .tmw-list .task.big .box { width: 28px; height: 28px; }
.tmw-ok { font-size: 20px; text-align: center; margin: 10px 0 0; }
/* coding senza computer (bambini) */
.cod-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, calc(50% - 4px)), 1fr)); gap: 8px; margin-top: 8px; }
.cod-tile { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cod-tile b { display: block; font-size: 15px; } .cod-tile small { display: block; color: var(--muted); font-size: 13px; }
.cod-tile.next { border-color: var(--accent); } .cod-tile.next small { color: var(--accent); font-weight: 700; }
.cod-tile.done { background: var(--ok-soft); border-color: var(--ok); } .cod-tile.done small { color: var(--ok); font-weight: 700; }
.cod-tile.on { box-shadow: 0 0 0 2px var(--accent); }
.cod-e { font-size: 26px; line-height: 1; flex: none; }
.cod-x { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--glass-line); display: grid; gap: 12px; }
.cod-xh { display: flex; align-items: center; gap: 12px; } .cod-xh .grow, .cod-tile .grow { flex: 1; min-width: 0; } .cod-xh h4 { margin: 0; font-size: 20px; } .cod-xh small { color: var(--muted); } .cod-xh .cod-e { font-size: 36px; }
.cod-idea { margin: 0; font-size: 17px; font-weight: 600; }
.cod-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px; width: min(100%, 260px); }
.cod-grid span { aspect-ratio: 1; border-radius: 5px; background: var(--glass); border: 1px solid var(--glass-line); display: grid; place-items: center; font-size: 18px; }
.cod-grid .on { background: var(--accent); border-color: var(--accent); }
.cod-grid .start { background: var(--accent-soft); } .cod-grid .goal { background: var(--ok-soft); } .cod-grid .wall { background: var(--warn-soft); }
.cod-mat { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cod-mat b { margin-right: 4px; }
.cod-mat .chip { padding: 4px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 14px; }
.cod-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 16px; }
.cod-var { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .cod-var div { padding: 10px 12px; border-radius: 14px; background: var(--ok-soft); font-size: 15px; } .cod-var .hard { background: var(--accent-soft); } .cod-var b { display: block; }
.cod-q { margin: 0; }
.cod-diploma { display: flex; gap: 12px; align-items: center; font-size: 34px; padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); border: 1px solid var(--ok); }
.cod-diploma b { display: block; font-size: 18px; } .cod-diploma small { display: block; font-size: 14px; color: var(--text); }
@media (max-width: 560px) { .cod-var { grid-template-columns: 1fr; } }
/* le parole di oggi in home */
.eng-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.eng-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); cursor: pointer; } .eng-mini .w { font-size: 22px; font-weight: 700; } .eng-mini .tr { color: var(--muted); }

/* caselle di spunta: normali, non grandi come un campo (prendevano l'altezza minima di 44 px degli input) */
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; min-width: 0; padding: 0; margin: 0; flex: none; border-radius: 6px; accent-color: var(--accent); vertical-align: middle; }
.goal-form label:has(> input[type=checkbox]), label.chk, .simform label:has(> input[type=checkbox]) { flex-direction: row; align-items: center; gap: 8px; align-self: center; }
/* moduli: i campi allineati anche quando una sola etichetta ha la riga piccola sotto */
.simform label:not(:has(small))::after, .goal-form label:not(:has(small)):not(:has(> input[type=checkbox]))::after { content: ""; display: block; min-height: 15px; }
/* chiudere le card aperte */
.xclose { flex: none; width: 30px; height: 30px; min-height: 0; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; padding: 0; margin-left: 6px; }
.xclose:hover { color: var(--text); border-color: currentColor; } .xclose .ic { width: 16px; height: 16px; }
.q4-top .xclose { order: 9; margin-left: auto; }
/* emergenze */
.emg-contents { margin-top: 6px; } .emg-contents ul { margin: 4px 0; padding-left: 18px; font-size: 13px; } .emg-contents li { margin: 3px 0; }
.emg-ta { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px; background: var(--glass); color: var(--text); margin: 6px 0; }
.emg-num { font-size: 19px; font-weight: 800; color: var(--bad, #b4443a); white-space: nowrap; flex: none; text-decoration: none; }
.emg-ph { font-weight: 700; margin: 10px 0 2px; color: var(--accent); } .emg-dont li { color: var(--bad, #b4443a); } .emg-uses { margin-top: 8px; line-height: 2; }

.emg-num.small { font-size: 15px; margin-right: 6px; } .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .02em; }
[data-copy] { cursor: copy; } [data-copy].copied { color: var(--ok, #3f8f5f); }

.neg, b.neg, td.neg b { color: var(--bad, #b4443a); } .tbl tr.muted td { color: var(--muted); }

/* da dove arrivano i clienti */
.org { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; } @media (max-width: 620px) { .org { grid-template-columns: 1fr; } }
.org-col { padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); border-top: 4px solid var(--org-c); }
.org-col.mio { --org-c: var(--accent); } .org-col.stiip { --org-c: var(--ok, #3f8f5f); }
.org-h { font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; } .org-h small { color: var(--muted); font-weight: 500; }
.org-big { font-size: 26px; font-weight: 800; margin: 4px 0; } .org-big small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.org-bar { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; margin: 4px 0; } .org-bar small { color: var(--muted); }
.org-bar > div { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--glass-edge); gap: 2px; }
.org-bar i { display: block; height: 100%; } .org-bar i.mio, .gmh-legend i.org-mio { background: var(--accent); } .org-bar i.stiip, .gmh-legend i.org-stiip { background: var(--ok, #3f8f5f); }
.org-bar i.nn, .gmh-legend i.org-nn { background: var(--muted); opacity: .5; }
.org-btns { display: inline-flex; gap: 4px; flex: none; } .org-btns .pill { cursor: pointer; }

/* sport */
.spo-ico { font-size: 22px; line-height: 1; margin-right: 6px; }
.spo-today ol { font-size: 15px; } .spo-done { margin-top: 8px; }
.spo-week { display: grid; gap: 8px; }
.spo-day { border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass); padding: 0 12px; }
.spo-day summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; } .spo-day summary::-webkit-details-marker { display: none; }
.spo-day.today { box-shadow: 0 0 0 2px var(--accent); } .spo-day.done { opacity: .85; } .spo-day.riposo { opacity: .6; }
.spo-day ul { margin: 0 0 10px; }

.spo-bars { position: relative; display: grid; grid-template-columns: repeat(var(--n, 30), 1fr); gap: 3px; height: 150px; align-items: end; margin: 10px 0 6px; }
.spo-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.spo-bar i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.spo-bar.ok i { background: var(--ok, #3f8f5f); } .spo-bar small { font-size: 9px; color: var(--muted); margin-top: 3px; height: 14px; white-space: nowrap; }
.spo-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); opacity: .6; } .spo-target span { position: absolute; right: 0; top: -16px; font-size: 10px; color: var(--muted); }

.spo-steps li.spo-ex { margin-left: 14px; list-style: none; } .spo-today select.mini { margin-left: 8px; }
.spo-timer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); }
.spo-timer.on { box-shadow: 0 0 0 2px var(--accent); }
.spo-clock { flex: 1 1 auto; font-family: var(--font-display); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.spo-tbtns { display: flex; gap: 8px; } .spo-tbtns .btn { min-height: 48px; min-width: 108px; font-size: 16px; justify-content: center; text-align: center; }
@media (max-width: 560px) { .spo-clock { flex-basis: 100%; text-align: center; font-size: 56px; } .spo-tbtns { flex-basis: 100%; } .spo-tbtns .btn { flex: 1; } }
