﻿/* Tema scuro: parti fatte a mano (il resto è generato in tema-scuro.css da tools/genera-tema-scuro.py) */

/* pulsante del tema (nel chiaro e nello scuro) */
.tema-bottone{display:inline-flex;align-items:center;gap:6px;min-height:40px;margin:0;padding:6px 12px;border-radius:999px;font-size:13px;font-weight:600;white-space:nowrap}
.tema-icona::before{content:"◐";font-size:16px;line-height:1}
html[data-tema-pref="chiaro"] .tema-icona::before{content:"☀"}
html[data-tema-pref="scuro"] .tema-icona::before{content:"☾"}
.tema-testo::before{content:"Auto"}
html[data-tema-pref="chiaro"] .tema-testo::before{content:"Chiaro"}
html[data-tema-pref="scuro"] .tema-testo::before{content:"Scuro"}
@media(max-width:760px){.tema-testo{display:none}.tema-bottone{padding:6px 10px}}

/* base dello scuro */
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body{background:#12181d;color:#d3dde6}
html[data-theme="dark"] ::placeholder{color:#8196a6;opacity:1}
html[data-theme="dark"] ::selection{background:#2f5f80;color:#fff}
html[data-theme="dark"] *{scrollbar-color:#3a4a56 #161d22}
/* loghi: nel tema scuro si usa la versione senza sfondo con le scritte chiare */
.logo-scuro{display:none}
html[data-theme="dark"] .logo-chiaro{display:none}
html[data-theme="dark"] .logo-scuro{display:inline}
html[data-theme="dark"] img.disegno,html[data-theme="dark"] .anteprima img{background:#fff}

/* contatori e pallini rossi: restano rossi pieni con il testo bianco */
html[data-theme="dark"] .pallino-notifica,html[data-theme="dark"] .tessera-badge,html[data-theme="dark"] .chip-badge{background:#c4202f;color:#fff}

/* numeri nei riquadri colorati della home e icone delle notifiche */
html[data-theme="dark"] .passo-conta.avviso b,html[data-theme="dark"] .oggi-voce.avviso .valore{color:#ffe08a}
html[data-theme="dark"] .passo-conta.critico b,html[data-theme="dark"] .oggi-voce.critico .valore{color:#ffc2cb}
html[data-theme="dark"] .ntf-icona{color:#10161b}
html[data-theme="dark"] .logo-accesso.logo-scuro{display:block}
/* v192: il tasto del tema è solo l'icona (◐ automatico, ☀ chiaro, ☾ scuro); il nome si vede passandoci sopra */
.tema-testo{display:none}
.tema-bottone{width:38px;min-width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
.tema-bottone .tema-icona::before{font-size:18px}
html[data-theme="dark"] .tabella-scroll::after{background:#2a3138;color:#c9d6df;border-top-color:#3a444c}
html[data-theme="dark"] orologio-home.orologio,html[data-theme="dark"] .meteo-temp{color:#e3edf4}
html[data-theme="dark"] meteo-home.meteo,html[data-theme="dark"] .oggi-dettagli>summary{color:#aeb9c2}html[data-theme="dark"] .meteo-ico{color:#5bb4e5}html[data-theme="dark"] .meteo-testo small{color:#98a8b5}
html[data-theme="dark"] a.grafico{background:#21272c;color:#c9d6df;box-shadow:0 1px 2px rgba(0,0,0,.31),0 6px 18px rgba(0,0,0,.31)}
html[data-theme="dark"] .grafico-testa small,html[data-theme="dark"] .gb-et{color:#98a8b5;fill:#98a8b5}html[data-theme="dark"] .grafico-legenda{color:#aeb9c2}
html[data-theme="dark"] .gb-base{stroke:#3a444c}html[data-theme="dark"] .gb-val{fill:#c9d6df}html[data-theme="dark"] .gb-s0{fill:#4cb0e6;background:#4cb0e6}html[data-theme="dark"] .gb-s1{fill:#f0b24a;background:#f0b24a}html[data-theme="dark"] .gb-scaduto{fill:#e5677a}
html[data-theme="dark"] .meteo-scelta{background:#21272c;color:#c9d6df;box-shadow:0 10px 28px rgba(0,0,0,.45)}html[data-theme="dark"] .meteo-risultati button,html[data-theme="dark"] .meteo-azioni button{background:#2a3138;color:#c9d6df}html[data-theme="dark"] .meteo-cambia{color:#98a8b5}html[data-theme="dark"] .meteo-cambia:hover{background:#2a3138}

html[data-theme="dark"] .elenco-scelta button{background:#2a3138;color:#c9d6df}html[data-theme="dark"] .residuo-saldato{color:#98a8b5}
html[data-theme="dark"] .presenza-home .ph-testo small{color:#aeb9c2}
html[data-theme="dark"] .barra-pagina #btn-aggiorna{background:#21272c;border-color:#354856;color:#76cbf9}
html[data-theme="dark"] .barra-pagina #btn-aggiorna:hover{background:#233e4e}

/* Correzioni del tema scuro scritte a mano nel file generato (ritrovate dopo una rigenerazione): qui non si perdono più quando si esegue tools/genera-tema-scuro.py */
html[data-theme="dark"] tr.rata-attesa td{background:#3a2610;}
html[data-theme="dark"] tr.rata-attesa td:first-child{box-shadow:inset 4px 0 0 #e8892b;}
html[data-theme="dark"] tr.rata-attesa:hover td{background:#523417;}
html[data-theme="dark"] .visore3d-misure{background:rgba(33,39,44,0.94);border:1px solid #33414b;color:#d6e0e6;}
html[data-theme="dark"] .vm-riga span,html[data-theme="dark"] .vm-aiuto{color:#aabac5;}
html[data-theme="dark"] .chat-suggerimenti{background:#1d252b;border-color:#3a4650;color:#e6edf1}
html[data-theme="dark"] .barra-pagina,html[data-theme="dark"] #barra-pagina{background:transparent !important;border:0 !important;box-shadow:none !important;}
html[data-theme="dark"] .com-riga,html[data-theme="dark"] .com-trovati{background:#1d252b;border-color:#3a4650;color:#e6edf1}
html[data-theme="dark"] .com-riga.com-urgente{background:#3a1d1d;border-color:#d4605a;box-shadow:0 0 0 1px #d4605a inset;color:#f6dedc}
html[data-theme="dark"] .com-azione,html[data-theme="dark"] .com-per{border-color:#3a4650}
html[data-theme="dark"] .chip.pericolo{background:#d4605a;color:#1a0d0d;border-color:#d4605a}
html[data-theme="dark"] .recap-settimana{background:#1d252b;border-color:#3a4650;color:#e6edf1}
html[data-theme="dark"] .recap-settimana h2 small,html[data-theme="dark"] .recap-festa,html[data-theme="dark"] .recap-assenza{color:#9fb1bd}
html[data-theme="dark"] .recap-ora{color:#6cc0ec}
html[data-theme="dark"] .recap-scaduto strong{color:#ff8a84}
html[data-theme="dark"] .mag-totali{background:#1f2a34;color:#aeb9c2;}
html[data-theme="dark"] .mag-totali strong{color:#e6edf2;}

/* galleria disegni: il foglio dei disegni resta bianco anche nel tema scuro */
html[data-theme="dark"] .gal-riquadro{background:#fff !important;border-color:#3d4f5a}
html[data-theme="dark"] .gal-vuoto,html[data-theme="dark"] .gal-riquadro:has(canvas[data-stato="errore"])::after{color:#44515c}
