/* Cargar después de styles.css y fichas-legibles.css. Fotos y logos originales. */
:root[data-theme="oscuro"]{
  color-scheme:dark;
  --bg:#10151e; --panel:#1b2431; --border:#3b485d; --border-soft:#303d50;
  --text:#edf2fa; --text-dim:#bcc8da; --text-faint:#a4b3c8;
  --blue:#2a5fdb; --blue-dark:#a5c4ff; --blue-bg:#203657;
  --green:#82dfad; --green-bg:#183e30;
  --amber:#f5c274; --amber-bg:#49351c;
  --red:#ffa3a3; --red-bg:#4b262e;
  --slate:#c3cede; --slate-bg:#2a3547;
  --shadow:0 1px 3px #0005; --shadow-lg:0 12px 32px #0007;
}
.theme-preference{border-top:1px solid var(--border-soft);padding-top:16px;margin-top:18px;}
html[data-theme="oscuro"] :is(input,select,textarea){background:var(--bg);color:var(--text);border-color:var(--border);}
html[data-theme="oscuro"] :is(input,textarea)::placeholder{color:var(--text-faint);opacity:1;}
html[data-theme="oscuro"] :is(input,select,textarea):disabled{background:var(--slate-bg);color:var(--text-dim);opacity:1;}
html[data-theme="oscuro"] :is(thead th,.filebtn){background:var(--slate-bg);}
html[data-theme="oscuro"] :is(tbody tr,.accordion-header):hover{background:var(--slate-bg);}
html[data-theme="oscuro"] .btn:hover{background:var(--slate-bg);border-color:var(--text-faint);}
html[data-theme="oscuro"] .btn-primary:hover{background:#2457bc;border-color:#2457bc;}
html[data-theme="oscuro"] .btn-danger{background:#a52f3c;border-color:#a52f3c;color:#fff;}
html[data-theme="oscuro"] .btn-danger:hover{background:#842633;}
html[data-theme="oscuro"] .chip button{background:var(--border);color:var(--text);}
html[data-theme="oscuro"] .severity-opt.sel-moderado.selected{background:var(--amber-bg);}
html[data-theme="oscuro"] .ci{background:var(--panel)!important;}
html[data-theme="oscuro"] .vc-stage{background:radial-gradient(ellipse at center,var(--slate-bg),var(--bg));}
html[data-theme="oscuro"] :is(.vc-card,.vc-arrow){background:var(--panel);color:var(--text);}
html[data-theme="oscuro"] [style*="background:#fff1e6"]{background:var(--amber-bg)!important;}
html[data-theme="oscuro"] ::selection{background:#355c98;color:#fff;}
/* Aviso de conductor temporal: compatible con las fichas ya instaladas. */
@media screen{
  html[data-theme="oscuro"] .card-pad[style*="background:#fff7ed"],
  html[data-theme="oscuro"] .card-pad[style*="background: #fff7ed"]{
    background:var(--amber-bg)!important;
    border-color:var(--amber)!important;
    color:var(--text);
  }
  html[data-theme="oscuro"] .card-pad[style*="background:#fff7ed"] .hint-text,
  html[data-theme="oscuro"] .card-pad[style*="background: #fff7ed"] .hint-text{
    color:var(--text-dim);
  }
}
@media print{
  :root[data-theme="oscuro"]{
    color-scheme:light;
    --bg:#fff; --panel:#fff; --border:#ccc; --border-soft:#ddd;
    --text:#111; --text-dim:#333; --text-faint:#555;
    --blue:#2a5fdb; --blue-dark:#1e4cb8; --blue-bg:#eaf0fe;
    --green:#187a4d; --green-bg:#e4f5ec; --amber:#9b5909; --amber-bg:#fcf0dd;
    --red:#a82323; --red-bg:#fbe7e7; --slate:#444; --slate-bg:#eee;
    --shadow:none; --shadow-lg:none;
  }
  html[data-theme="oscuro"] .modal{box-shadow:none;}
}
