/* Tema: generado a partir de las reglas de modo oscuro de prototipo.css y erp.css.
   Sin elegir nada sigue a Windows; con el botón 🌓 se fuerza :root[data-theme="dark"] o ="light". */
:root[data-theme="dark"]{color-scheme:dark}
:root[data-theme="light"]{color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark}
:root:not([data-theme="light"]) .ctrl-tabla tbody tr:nth-child(even) td:not(.cel){background:#1f2a3d}
:root:not([data-theme="light"]) .ctrl-tabla tbody tr:hover td:not(.cel){background:#33405a}
:root:not([data-theme="light"]) .ctrl-tabla tbody tr.hecho td:not(.cel){background:#1d3324}
:root:not([data-theme="light"]) .ctrl-tabla td{border-bottom-color:#3d4f6e}
:root:not([data-theme="light"]) .ctrl-tabla td.cel.si{background:#1e4227;color:#cfe9d3}
:root:not([data-theme="light"]) .ctrl-tabla td.cel.no{background:#3a2226;color:#9c7b7b}
:root:not([data-theme="light"]) .ctrl-tabla tr:hover td.cel.si{background:#285a33}
:root:not([data-theme="light"]) .ctrl-tabla td.cel .nt{color:inherit}
:root:not([data-theme="light"]) .ctrl-pop{background:var(--surface);border-color:var(--line);color:var(--ink)}
:root:not([data-theme="light"]) .nota-ed{color:var(--ink-2)}
:root:not([data-theme="light"]) :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th):not(.pill):not(.btn):not(input):not(select){color:#14213d}
:root:not([data-theme="light"]) :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) :is(.mini,.sub,.fpv,span:not(.pill)){color:#4a5875}
:root:not([data-theme="light"]) :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) a:not(.btn){color:#0b3d91}
:root:not([data-theme="light"]) :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) b{color:inherit}
}
:root[data-theme="dark"]{
  --bg:#0e1522; --surface:#152033; --surface-2:#1a273d; --line:#26354f;
  --ink:#e8eef8; --ink-2:#b3c0d6; --muted:#7f8ea8;
  --brand:#7fb0ff; --brand-2:#9cc2ff; --brand-soft:#1c2c48;
  --paid:#5b9bff; --pend:#46587a; --late:#ff6b6b; --late-soft:#3a1f25;
  --ok:#6fcf7a; --ok-soft:#1d3324; --warn:#f5b651; --warn-soft:#3a2d17;
  --shadow:none;
}
:root[data-theme="dark"] .btn.on{background:#1c2c48;color:#9cc2ff}
:root[data-theme="dark"] .subnav-mod a.on{background:#1c2c48;color:#9cc2ff}
:root[data-theme="dark"] .subnav-mod a{background:var(--surface);color:#b3c0d6;border-color:#26354f}
  :root[data-theme="dark"] .subnav-mod a:hover{background:#1c2c48;color:#9cc2ff}
  :root[data-theme="dark"] .subnav-mod a.on{background:#3b82f6;color:#fff;border-color:#3b82f6}
:root[data-theme="dark"] .card.lista-gris{background:#1b2536}
  :root[data-theme="dark"] .card.lista-gris table.fit tbody tr{background:#1f2a3d}
  :root[data-theme="dark"] .card.lista-gris table.fit tbody tr:nth-child(even){background:#243149}
  :root[data-theme="dark"] .card.lista-gris th{background:#26354f}
:root[data-theme="dark"] .ctrl-tabla tbody tr:nth-child(even) td:not(.cel){background:#1f2a3d}
:root[data-theme="dark"] .ctrl-tabla tbody tr:hover td:not(.cel){background:#33405a}
:root[data-theme="dark"] .ctrl-tabla tbody tr.hecho td:not(.cel){background:#1d3324}
:root[data-theme="dark"] .ctrl-tabla td{border-bottom-color:#3d4f6e}
:root[data-theme="dark"] .ctrl-tabla td.cel.si{background:#1e4227;color:#cfe9d3}
:root[data-theme="dark"] .ctrl-tabla td.cel.no{background:#3a2226;color:#9c7b7b}
:root[data-theme="dark"] .ctrl-tabla tr:hover td.cel.si{background:#285a33}
:root[data-theme="dark"] .ctrl-tabla td.cel .nt{color:inherit}
:root[data-theme="dark"] .ctrl-pop{background:var(--surface);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] .nota-ed{color:var(--ink-2)}
:root[data-theme="dark"] :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th):not(.pill):not(.btn):not(input):not(select){color:#14213d}
:root[data-theme="dark"] :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) :is(.mini,.sub,.fpv,span:not(.pill)){color:#4a5875}
:root[data-theme="dark"] :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) a:not(.btn){color:#0b3d91}
:root[data-theme="dark"] :is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]):not(th) b{color:inherit}

/* Textos con color oscuro fijo (sin fondo claro detrás): en modo oscuro, su versión clara */
@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]) :is([style*="color:#1e3a8a"],[style*="color:#0d47a1"],[style*="color:#1565c0"],[style*="color:#1c2333"],[style*="color:#33415c"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#9cc2ff!important}
:root:not([data-theme="light"]) :is([style*="color:#5b6780"],[style*="color:#4a5875"],[style*="color:#8a94a8"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:var(--ink-2)!important}
:root:not([data-theme="light"]) :is([style*="color:#7a5200"],[style*="color:#8a5a00"],[style*="color:#b45309"],[style*="color:#b7791f"],[style*="color:#3a3000"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#f5b651!important}
:root:not([data-theme="light"]) :is([style*="color:#1e6b3f"],[style*="color:#1b5e20"],[style*="color:#2e7d32"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#6fcf7a!important}
:root:not([data-theme="light"]) :is([style*="color:#4a148c"],[style*="color:#3b0a57"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#d7b3f0!important}
:root:not([data-theme="light"]) :is([style*="color:#7f1d1d"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#ff8a80!important}
}
:root[data-theme="dark"] :is([style*="color:#1e3a8a"],[style*="color:#0d47a1"],[style*="color:#1565c0"],[style*="color:#1c2333"],[style*="color:#33415c"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#9cc2ff!important}
:root[data-theme="dark"] :is([style*="color:#5b6780"],[style*="color:#4a5875"],[style*="color:#8a94a8"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:var(--ink-2)!important}
:root[data-theme="dark"] :is([style*="color:#7a5200"],[style*="color:#8a5a00"],[style*="color:#b45309"],[style*="color:#b7791f"],[style*="color:#3a3000"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#f5b651!important}
:root[data-theme="dark"] :is([style*="color:#1e6b3f"],[style*="color:#1b5e20"],[style*="color:#2e7d32"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#6fcf7a!important}
:root[data-theme="dark"] :is([style*="color:#4a148c"],[style*="color:#3b0a57"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#d7b3f0!important}
:root[data-theme="dark"] :is([style*="color:#7f1d1d"]):not([style*="background"]):not(:is([style*="background:#f"],[style*="background:#e"],[style*="background:#d"],[style*="background: #f"],[style*="background:#c8"],[style*="background:#9"]) *){color:#ff8a80!important}

/* Clases de erp.css con fondo claro fijo */
@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]) .firma-movil{background:#16263c;border-color:#3d6f99}
:root:not([data-theme="light"]) .firma-movil .qr svg{background:#fff}
:root:not([data-theme="light"]) .aviso-mes{background:#13304a;border-color:#3d6f99;color:#cfe6ff}
:root:not([data-theme="light"]) .copiar{background:#1c2c48;color:#9cc2ff}
:root:not([data-theme="light"]) .kpi-e{background:var(--surface);border-color:var(--line)}
:root:not([data-theme="light"]) .kpi-e span,.kpi-e i{color:var(--ink-2)}
:root:not([data-theme="light"]) table.est tr.tot td{background:#1f2a3d;border-top-color:#3d4f6e}
:root:not([data-theme="light"]) .col-escr{background:var(--surface);border-color:var(--line)}
:root:not([data-theme="light"]) .stepper .st{background:#1f2a3d;color:#9aa8c2}
:root:not([data-theme="light"]) .stepper .st.hecho{background:#1d3324;color:#8fdba0}
:root:not([data-theme="light"]) .stepper .st.actual{background:#3a2d17;color:#f5c26b}
:root:not([data-theme="light"]) .suplidos{background:#3a2d17;border-color:#6b5426;color:var(--ink)}
:root:not([data-theme="light"]) .pill.dev{background:#2e2350;color:#c9b6f5}
:root:not([data-theme="light"]) .barra{background:#26354f}
}
:root[data-theme="dark"] .firma-movil{background:#16263c;border-color:#3d6f99}
:root[data-theme="dark"] .firma-movil .qr svg{background:#fff}
:root[data-theme="dark"] .aviso-mes{background:#13304a;border-color:#3d6f99;color:#cfe6ff}
:root[data-theme="dark"] .copiar{background:#1c2c48;color:#9cc2ff}
:root[data-theme="dark"] .kpi-e{background:var(--surface);border-color:var(--line)}
:root[data-theme="dark"] .kpi-e span,.kpi-e i{color:var(--ink-2)}
:root[data-theme="dark"] table.est tr.tot td{background:#1f2a3d;border-top-color:#3d4f6e}
:root[data-theme="dark"] .col-escr{background:var(--surface);border-color:var(--line)}
:root[data-theme="dark"] .stepper .st{background:#1f2a3d;color:#9aa8c2}
:root[data-theme="dark"] .stepper .st.hecho{background:#1d3324;color:#8fdba0}
:root[data-theme="dark"] .stepper .st.actual{background:#3a2d17;color:#f5c26b}
:root[data-theme="dark"] .suplidos{background:#3a2d17;border-color:#6b5426;color:var(--ink)}
:root[data-theme="dark"] .pill.dev{background:#2e2350;color:#c9b6f5}
:root[data-theme="dark"] .barra{background:#26354f}
