/* ============================================================
   Modo claro (blanco). El oscuro (negro) es el de app.css.
   Se activa con <html data-theme="light">; lo pone el botón de
   tema (adm.tema en localStorage) o, la primera vez, el sistema.
   Va después de app.css y adm.css.
   ============================================================ */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f5f8;
    --bg-2: #eeeef3;
    --sf: #ffffff;
    --sf-2: #f3f3f7;
    --sf-3: #e9e9f0;
    --bd: #e1e1e9;
    --bd-2: #cfcfdb;
    --tx: #17171c;
    --tx-2: #4a4a57;
    --mt: #6e6e7d;
    --grad-soft: linear-gradient(100deg, rgba(66,117,230,.10), rgba(126,87,194,.09) 40%, rgba(204,26,123,.09) 75%, rgba(226,4,98,.09));
    --shadow: 0 12px 32px rgba(20,20,40,.14);
}
:root[data-theme="dark"] { color-scheme: dark; }

[data-theme="light"] body {
    background-image:
        radial-gradient(60rem 30rem at 100% -10%, rgba(126,87,194,.07), transparent 60%),
        radial-gradient(50rem 30rem at -10% 110%, rgba(66,117,230,.05), transparent 60%);
}
[data-theme="light"] a:not(.btn):not(.sb-item):not(.bn-item):not(.chip) { color: #2f5fd0; }
[data-theme="light"] a:not(.btn):not(.sb-item):not(.bn-item):not(.chip):hover { color: #1d47ad; }
[data-theme="light"] .sb-brand, [data-theme="light"] a.mov, [data-theme="light"] a.persona { color: var(--tx) !important; }
[data-theme="light"] ::selection { background: rgba(204,26,123,.22); color: var(--tx); }
[data-theme="light"] :focus-visible { outline-color: #7e57c2; }
[data-theme="light"] input, [data-theme="light"] textarea { caret-color: #cc1a7b; }

/* Logo con letras blancas: en claro se invierte (blanco→negro) y se conserva el color */
[data-theme="light"] .sb-logo, [data-theme="light"] .tb-logo,
[data-theme="light"] .lg-logo-big, [data-theme="light"] .lg-brand img { filter: invert(1) hue-rotate(180deg); }

/* Menú, barra superior y barra inferior */
[data-theme="light"] .tb { background: rgba(255,255,255,.85); }
[data-theme="light"] .sb { background: rgba(255,255,255,.97); }
[data-theme="light"] .bn { background: rgba(255,255,255,.95); }
[data-theme="light"] .sb-item.is-on { color: var(--tx); }
[data-theme="light"] .sb-item.is-on .material-symbols-outlined,
[data-theme="light"] .bn-item.is-on .material-symbols-outlined { color: #cc1a7b; }
[data-theme="light"] .bn-item.is-on { color: var(--tx); }
[data-theme="light"] .seg input:checked + label { color: var(--tx); }
[data-theme="light"] .empty .material-symbols-outlined { color: #7e57c2; }
[data-theme="light"] .modal { background: rgba(20,20,35,.35); }
[data-theme="light"] .sb-scrim { background: rgba(20,20,35,.35) !important; }

/* Botones y avisos: texto oscuro sobre fondo claro */
[data-theme="light"] .btn-danger { color: #c8173f; }
[data-theme="light"] .btn-ok { color: #13834a; }
[data-theme="light"] .alert-err  { color: #9e1636; }
[data-theme="light"] .alert-ok   { color: #11663b; }
[data-theme="light"] .alert-warn { color: #8a5a00; }
[data-theme="light"] .alert-info { color: #23479d; }
[data-theme="light"] .tb-env { color: #9a6400; }

/* Badges de ADMINISTRACION */
[data-theme="light"] .b-azul { color: #2550b8; }
[data-theme="light"] .b-ok   { color: #13834a; }
[data-theme="light"] .b-vio  { color: #5b3a9e; }
[data-theme="light"] .b-mag  { color: #a8125f; }
[data-theme="light"] .b-amb  { color: #8a5a00; }
[data-theme="light"] .b-err  { color: #c8173f; }
[data-theme="light"] .mini.is-main { border-color: rgba(204,26,123,.25); }

/* Login */
[data-theme="light"] .lg-card { background: #fff; box-shadow: 0 30px 80px rgba(20,20,40,.16); }
[data-theme="light"] .lg-feats li > .material-symbols-outlined { color: #cc1a7b; }
[data-theme="light"] .orb { opacity: .14 !important; }

/* Botón de tema */
.tema-btn .ico-sol { display: none; }
[data-theme="dark"] .tema-btn .ico-sol { display: inline; }
[data-theme="dark"] .tema-btn .ico-luna { display: none; }
.tema-flot { position: fixed; top: 14px; right: 14px; z-index: 50; }
