/* 08/11 IL TEMA SCURO DELLE VESTI DENSE (fattura, erp, Controller e ogni verticale con body.sf). Fondatore: «il tasto Chiaro/Scuro
   è uno standard di piattaforma, come il multilingua». Si applica SOLO con html[data-theme="dark"] (scelta col tasto _sf_tema.html,
   chiave localStorage «sonia_theme»); senza scelta la veste resta chiara come sempre. Token scuri qui; l'accento del verticale
   in scuro lo scrive _veste_verticale.html. Copre i colori scritti a mano in sf_denso.css e i bianchi scritti nelle righe. */
:root[data-theme="dark"]{
  --bg:#121317; --surface:#1B1C21; --card:#1B1C21; --line:rgba(255,255,255,.11); --ink:#E9E8EC; --smoke:#A7A4AD; --mute:#7E7A84;
  --cipria-soft:rgba(212,165,160,.13); --sf-zebra:rgba(255,255,255,.025); --sf-head:#23242A; --sf-sel:rgba(212,165,160,.12);
  --sf-campo:#15161A; --sf-bordo:rgba(255,255,255,.13); --sf-rialzo:#23242A;
  --azione:#4FB0BA; --azione-hover:#6BC1CA; --azione-tenue:rgba(79,176,186,.16); --azione-bordo:rgba(79,176,186,.45);
  --paper:#121317; --light:#23242A; --surface-2:#23242A;
  color-scheme:dark;
}
html[data-theme="dark"] body.sf{background:var(--bg)!important;color:var(--ink)}
html[data-theme="dark"] body.sf .kinp,html[data-theme="dark"] body.sf input:not([type=checkbox]):not([type=radio]):not([type=file]),
html[data-theme="dark"] body.sf select,html[data-theme="dark"] body.sf textarea{background:var(--sf-campo)!important;color:var(--ink)!important;border-color:var(--sf-bordo)!important}
html[data-theme="dark"] body.sf ::placeholder{color:var(--mute)}
html[data-theme="dark"] body.sf .sf-home,html[data-theme="dark"] body.sf .topnav-link.tools-btn,html[data-theme="dark"] body.sf .sf-esci-top{background:transparent!important}
html[data-theme="dark"] body.sf .toolrail{background:var(--surface)!important;border-right-color:var(--line)!important}
html[data-theme="dark"] body.sf .card,html[data-theme="dark"] body.sf .ent-card,html[data-theme="dark"] body.sf .sa-card,html[data-theme="dark"] body.sf .stz-card,
html[data-theme="dark"] body.sf .asd-card,html[data-theme="dark"] body.sf .bk-card,html[data-theme="dark"] body.sf .cr-sez,html[data-theme="dark"] body.sf .ent-kpi,
html[data-theme="dark"] body.sf .ha,html[data-theme="dark"] body.sf .ent-toolbar,html[data-theme="dark"] body.sf .kpi-dd,html[data-theme="dark"] body.sf .lnd-card,
html[data-theme="dark"] body.sf .kb-col,html[data-theme="dark"] body.sf .pipe-col{background:var(--surface)!important;border-color:var(--line)!important;box-shadow:0 1px 2px rgba(0,0,0,.35)!important}
html[data-theme="dark"] body.sf .card,html[data-theme="dark"] body.sf .ent-card,html[data-theme="dark"] body.sf .cr-sez{border-top-color:var(--line)!important}
html[data-theme="dark"] body.sf .cr-sez>h2{background:var(--surface);border-bottom-color:var(--line)}
html[data-theme="dark"] body.sf .cr-kpi a{border-color:var(--line)}
html[data-theme="dark"] body.sf th,html[data-theme="dark"] body.sf .ent-table th{background:var(--sf-head)!important;color:var(--smoke)!important;border-color:var(--line)!important}
html[data-theme="dark"] body.sf td,html[data-theme="dark"] body.sf .ent-table td{border-color:var(--line)!important}
html[data-theme="dark"] body.sf tbody tr:nth-child(even) td{background:var(--sf-zebra)}
html[data-theme="dark"] body.sf tbody tr:hover td{background:var(--sf-sel)}
html[data-theme="dark"] body.sf .ent-table-wrap{border-color:var(--line)}
html[data-theme="dark"] body.sf .btn,html[data-theme="dark"] body.sf button.btn,html[data-theme="dark"] body.sf .asd-btn,html[data-theme="dark"] body.sf .bk-btn{background:var(--sf-rialzo)!important;border-color:var(--sf-bordo)!important;color:var(--ink)!important}
html[data-theme="dark"] body.sf details[open]>.sfc-v{background:var(--sf-rialzo)}
html[data-theme="dark"] body.sf .erp-area,html[data-theme="dark"] body.sf .ent-toolbar select.t-filter{background:var(--sf-rialzo)}
html[data-theme="dark"] body.sf.app tbody tr{background:var(--surface)}
/* i bianchi e i neri scritti nelle righe dei template (style="background:#fff" …): superficie e inchiostro del tema */
html[data-theme="dark"] body.sf [style*="background:#fff"],html[data-theme="dark"] body.sf [style*="background: #fff"],
html[data-theme="dark"] body.sf [style*="background:#FFF"],html[data-theme="dark"] body.sf [style*="background:white"],
html[data-theme="dark"] body.sf [style*="background-color:#fff"],html[data-theme="dark"] body.sf [style*="background:#fafafa"],
html[data-theme="dark"] body.sf [style*="background:#f7f7f7"],html[data-theme="dark"] body.sf [style*="background:#f5f5f5"],
html[data-theme="dark"] body.sf [style*="background:#FAF8F7"],html[data-theme="dark"] body.sf [style*="background:#faf8f6"],
html[data-theme="dark"] body.sf [style*="background:#f6f4f1"],html[data-theme="dark"] body.sf [style*="background:#f8f7f5"]{background:var(--surface)!important}
html[data-theme="dark"] body.sf [style*="color:#000"],html[data-theme="dark"] body.sf [style*="color:#111"],html[data-theme="dark"] body.sf [style*="color:#1d1c1a"],
html[data-theme="dark"] body.sf [style*="color:#1e1e22"],html[data-theme="dark"] body.sf [style*="color:#222"],html[data-theme="dark"] body.sf [style*="color:#333"],
html[data-theme="dark"] body.sf [style*="color:#17202e"],html[data-theme="dark"] body.sf [style*="color:#26201F"]{color:var(--ink)!important}
html[data-theme="dark"] body.sf [style*="color:#555"],html[data-theme="dark"] body.sf [style*="color:#666"],html[data-theme="dark"] body.sf [style*="color:#5a5660"],
html[data-theme="dark"] body.sf [style*="color:#6b7280"]{color:var(--smoke)!important}
html[data-theme="dark"] body.sf [style*="border:1px solid #"],html[data-theme="dark"] body.sf [style*="border-bottom:1px solid #"],html[data-theme="dark"] body.sf [style*="border-top:1px solid #"]{border-color:var(--line)!important}
html[data-theme="dark"] body.sf img[src$=".svg"][alt*="logo" i]{filter:none}
html[data-theme="dark"] body.sf .lsel .lsel-m{background:var(--sf-rialzo);border-color:var(--line)}
html[data-theme="dark"] body.sf .lsel .lsel-m a{color:var(--ink)}html[data-theme="dark"] body.sf .lsel .lsel-m a:hover{background:var(--surface)}
/* i tasti pieni prendono il colore scuro del verticale (_veste_verticale.html): in scuro il loro testo resta bianco */
html[data-theme="dark"] body.sf .btn-primary,html[data-theme="dark"] body.sf .ask-cta,html[data-theme="dark"] body.sf .ask-cta span,
html[data-theme="dark"] body.sf .ent-btn.primary,html[data-theme="dark"] body.sf .sfa-btn{color:#fff!important}
