/* SIGATI 5.3.1 · Modo oscuro de alto confort y contraste
   Objetivo: lectura prolongada, jerarquía visual clara y cobertura de todos los componentes SIGATI. */

:root {
    --sigati-dark-bg: #080d17;
    --sigati-dark-bg-soft: #0c1320;
    --sigati-dark-surface: #101826;
    --sigati-dark-surface-2: #162235;
    --sigati-dark-surface-3: #1c2a3e;
    --sigati-dark-border: #33445c;
    --sigati-dark-border-soft: #27374d;
    --sigati-dark-text: #f1f5f9;
    --sigati-dark-text-soft: #d8e2ee;
    --sigati-dark-muted: #b5c3d4;
    --sigati-dark-faint: #91a4ba;
    --sigati-dark-heading: #ffffff;
    --sigati-dark-blue: #8cc8ff;
    --sigati-dark-cyan: #67e8e8;
    --sigati-dark-focus: #22d3ee;
    --sigati-dark-green: #86efac;
    --sigati-dark-amber: #fde68a;
    --sigati-dark-orange: #fdba74;
    --sigati-dark-red: #fca5a5;
    --sigati-dark-rose: #fda4af;
}

.sigati-theme-toggle {
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid #dbe4ee;
    border-radius: .8rem;
    background: #fff;
    color: #12335c;
    box-shadow: 0 2px 8px rgb(15 23 42 / 7%);
}
.sigati-theme-toggle:hover { background: #f1f5f9; }
.sigati-theme-toggle .theme-icon-dark { display: none; }
html[data-theme="dark"] .sigati-theme-toggle .theme-icon-light { display: none; }
html[data-theme="dark"] .sigati-theme-toggle .theme-icon-dark { display: inline; }

/* ================================================================
   BASE Y ACCESIBILIDAD
   ================================================================ */
html[data-theme="dark"] {
    color-scheme: dark;
    background: var(--sigati-dark-bg);
    --sigati-table-head: #172438;
    --sigati-table-head-text: #d8e2ee;
    --sigati-table-border: #33445c;
    --sigati-table-row-alt: #111c2d;
    --sigati-table-row-hover: #1a2d46;
    --sigati-table-focus: rgb(34 211 238 / 8%);
}

html[data-theme="dark"] body {
    background: var(--sigati-dark-bg) !important;
    color: var(--sigati-dark-text-soft) !important;
}

html[data-theme="dark"] ::selection { background: #155e75; color: #fff; }

html[data-theme="dark"] :focus-visible {
    outline-color: var(--sigati-dark-focus) !important;
}

html[data-theme="dark"] a:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.nav-link):not(.mobile-tab-active) {
    text-decoration-color: rgb(140 200 255 / 55%);
}

html[data-theme="dark"] hr,
html[data-theme="dark"] [class*="divide-"] > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--sigati-dark-border-soft) !important;
}

html[data-theme="dark"] code,
html[data-theme="dark"] kbd,
html[data-theme="dark"] pre {
    color: #e5edf7;
}

html[data-theme="dark"] kbd {
    border-color: #465a74 !important;
    background: #1c2a3e !important;
}

/* ================================================================
   SHELL, CABECERA Y BOTONES
   ================================================================ */
html[data-theme="dark"] [data-shell-content] > header {
    border-color: var(--sigati-dark-border-soft) !important;
    background: rgb(8 13 23 / 94%) !important;
    box-shadow: 0 1px 0 rgb(255 255 255 / 4%), 0 10px 30px rgb(0 0 0 / 14%);
}

html[data-theme="dark"] [data-shell-content] > header [data-open-sidebar] {
    border-color: var(--sigati-dark-border) !important;
    background: var(--sigati-dark-surface-2) !important;
    color: var(--sigati-dark-heading) !important;
}

html[data-theme="dark"] .sigati-theme-toggle,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .map-control-button,
html[data-theme="dark"] .map-popup-secondary-action {
    border-color: #435873 !important;
    background: var(--sigati-dark-surface-2) !important;
    color: var(--sigati-dark-text) !important;
}

html[data-theme="dark"] .sigati-theme-toggle:hover,
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] [data-shell-content] > header [data-open-sidebar]:hover {
    border-color: #5a7392 !important;
    background: #21324a !important;
    color: #fff !important;
}

html[data-theme="dark"] .btn-ghost { color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .btn-primary { background: #1d5e98 !important; color: #fff !important; }
html[data-theme="dark"] .btn-primary:hover { background: #2874b6 !important; }
html[data-theme="dark"] .btn-success { background: #237a4d !important; color: #fff !important; }
html[data-theme="dark"] .btn-danger { background: #b53b49 !important; color: #fff !important; }
html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .btn:disabled,
html[data-theme="dark"] .btn-primary:disabled,
html[data-theme="dark"] .btn-secondary:disabled { opacity: .58 !important; }

/* Sidebar: conservar identidad azul, pero subir contraste de textos secundarios. */
html[data-theme="dark"] .sigati-sidebar-classic .nav-link { color: #d7e9fb !important; }
html[data-theme="dark"] .sigati-sidebar-classic .nav-link:hover { color: #fff !important; }
html[data-theme="dark"] .sigati-sidebar-classic nav section > p,
html[data-theme="dark"] .sigati-sidebar-classic .text-blue-200,
html[data-theme="dark"] .sigati-sidebar-classic .text-blue-200\/75 { color: #b9d9f5 !important; }
html[data-theme="dark"] .sigati-sidebar-classic .nav-link-active,
html[data-theme="dark"] .sigati-sidebar-classic .nav-link-active:hover {
    background: #f4f8fc !important;
    color: #12335c !important;
}

/* ================================================================
   SUPERFICIES, TARJETAS Y TEXTO
   ================================================================ */
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .map-operational-canvas,
html[data-theme="dark"] .map-operational-sidebar,
html[data-theme="dark"] .dashboard-comparison-card,
html[data-theme="dark"] .dashboard-command-bar,
html[data-theme="dark"] .sigati-wizard-nav,
html[data-theme="dark"] .sigati-drawer-panel,
html[data-theme="dark"] .sigati-inline-editor > form,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .mobile-operation-card,
html[data-theme="dark"] .mobile-catalog-card {
    border-color: var(--sigati-dark-border-soft) !important;
    background: var(--sigati-dark-surface) !important;
    color: var(--sigati-dark-text-soft) !important;
    box-shadow: 0 10px 28px rgb(0 0 0 / 24%);
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .catalog-card:hover {
    border-color: #405875 !important;
}

html[data-theme="dark"] .text-slate-100,
html[data-theme="dark"] .text-slate-200,
html[data-theme="dark"] .text-slate-300 { color: #e5edf7 !important; }
html[data-theme="dark"] .text-slate-400 { color: var(--sigati-dark-faint) !important; }
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-600 { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-800 { color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .text-slate-900 { color: var(--sigati-dark-heading) !important; }

html[data-theme="dark"] .label,
html[data-theme="dark"] [data-mobile-offline-app] label.field > span:first-child { color: #dbe7f4 !important; }
html[data-theme="dark"] .help,
html[data-theme="dark"] .section-copy,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .detail-label { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .text-muni-navy,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .form-section-title,
html[data-theme="dark"] .detail-value { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .text-muni-blue,
html[data-theme="dark"] .link-action { color: var(--sigati-dark-blue) !important; }
html[data-theme="dark"] .text-muni-cyan,
html[data-theme="dark"] .section-kicker { color: var(--sigati-dark-cyan) !important; }
html[data-theme="dark"] .text-muni-green { color: var(--sigati-dark-green) !important; }

/* ================================================================
   CAMPOS, SELECTS, FECHAS Y FORMULARIOS
   ================================================================ */
html[data-theme="dark"] .field,
html[data-theme="dark"] [data-mobile-offline-app] label.field > input,
html[data-theme="dark"] [data-mobile-offline-app] label.field > select,
html[data-theme="dark"] [data-mobile-offline-app] label.field > textarea,
html[data-theme="dark"] [data-mobile-offline-app] label.field > div > input,
html[data-theme="dark"] [data-mobile-offline-app] label.field > div > select,
html[data-theme="dark"] [data-mobile-offline-app] label.field > div > textarea,
html[data-theme="dark"] [data-mobile-offline-app] [data-mobile-maintenance-checklist] input,
html[data-theme="dark"] [data-mobile-offline-app] [data-mobile-maintenance-checklist] select {
    border-color: #40536d !important;
    background: #0d1624 !important;
    color: #f4f8fc !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .field::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #91a4ba !important; opacity: 1 !important; }
html[data-theme="dark"] .field:hover,
html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover { border-color: #5a7392 !important; }
html[data-theme="dark"] .field:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: var(--sigati-dark-focus) !important;
    --tw-ring-color: rgb(34 211 238 / 20%) !important;
}
html[data-theme="dark"] select option { background: #101826; color: #f1f5f9; }
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="month"] { color-scheme: dark; }
html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] { color-scheme: dark; accent-color: #22c6cf; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled { background: #152031 !important; color: #9fb0c5 !important; opacity: 1 !important; }
html[data-theme="dark"] .error,
html[data-theme="dark"] .field-error { color: var(--sigati-dark-red) !important; }

/* ================================================================
   UTILIDADES TAILWIND USADAS EN VISTAS
   ================================================================ */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-white\/70,
html[data-theme="dark"] .bg-white\/80,
html[data-theme="dark"] .bg-white\/85,
html[data-theme="dark"] .bg-white\/90,
html[data-theme="dark"] .bg-white\/95 { background-color: var(--sigati-dark-surface) !important; }
html[data-theme="dark"] .bg-slate-50 { background-color: #111c2d !important; }
html[data-theme="dark"] .bg-slate-100 { background-color: #172438 !important; }
html[data-theme="dark"] .bg-slate-950 { background-color: #050910 !important; }
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-200\/80,
html[data-theme="dark"] .border-slate-200\/90,
html[data-theme="dark"] .border-slate-300 { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .divide-blue-100 > :not([hidden]) ~ :not([hidden]) { border-color: var(--sigati-dark-border-soft) !important; }

/* Azules */
html[data-theme="dark"] .bg-blue-50,
html[data-theme="dark"] .bg-blue-50\/40,
html[data-theme="dark"] .bg-blue-50\/50,
html[data-theme="dark"] .bg-blue-50\/60,
html[data-theme="dark"] .bg-blue-50\/70 { background-color: #102a46 !important; }
html[data-theme="dark"] .bg-blue-100 { background-color: #173b61 !important; }
html[data-theme="dark"] .text-blue-700,
html[data-theme="dark"] .text-blue-800,
html[data-theme="dark"] .text-blue-900,
html[data-theme="dark"] .text-blue-950 { color: #a8d3ff !important; }
html[data-theme="dark"] .border-blue-100,
html[data-theme="dark"] .border-blue-200,
html[data-theme="dark"] .border-blue-300 { border-color: #315f8f !important; }
html[data-theme="dark"] .ring-blue-100 { --tw-ring-color: rgb(96 165 250 / 22%) !important; }

/* Cyan / teal */
html[data-theme="dark"] .bg-cyan-50,
html[data-theme="dark"] .bg-cyan-50\/40,
html[data-theme="dark"] .bg-cyan-50\/60,
html[data-theme="dark"] .bg-cyan-50\/70 { background-color: #0c3038 !important; }
html[data-theme="dark"] .bg-cyan-100 { background-color: #13414b !important; }
html[data-theme="dark"] .text-cyan-700,
html[data-theme="dark"] .text-cyan-800,
html[data-theme="dark"] .text-cyan-900,
html[data-theme="dark"] .text-cyan-950 { color: #8cecef !important; }
html[data-theme="dark"] .border-cyan-100,
html[data-theme="dark"] .border-cyan-200,
html[data-theme="dark"] .border-cyan-300 { border-color: #2d6f79 !important; }
html[data-theme="dark"] .bg-teal-50 { background-color: #0d312f !important; }
html[data-theme="dark"] .bg-teal-100 { background-color: #124642 !important; }
html[data-theme="dark"] .text-teal-700 { color: #79eee0 !important; }
html[data-theme="dark"] .border-teal-200 { border-color: #286d66 !important; }

/* Verdes */
html[data-theme="dark"] .bg-emerald-50 { background-color: #102b20 !important; }
html[data-theme="dark"] .bg-emerald-100 { background-color: #164331 !important; }
html[data-theme="dark"] .text-emerald-500,
html[data-theme="dark"] .text-emerald-600,
html[data-theme="dark"] .text-emerald-700,
html[data-theme="dark"] .text-emerald-800,
html[data-theme="dark"] .text-emerald-900 { color: var(--sigati-dark-green) !important; }
html[data-theme="dark"] .border-emerald-200,
html[data-theme="dark"] .border-emerald-300 { border-color: #347157 !important; }

/* Amarillos / naranjas */
html[data-theme="dark"] .bg-amber-50,
html[data-theme="dark"] .bg-amber-50\/60,
html[data-theme="dark"] .bg-amber-50\/70 { background-color: #34270e !important; }
html[data-theme="dark"] .bg-amber-100,
html[data-theme="dark"] .bg-amber-100\/70 { background-color: #493712 !important; }
html[data-theme="dark"] .text-amber-600,
html[data-theme="dark"] .text-amber-700,
html[data-theme="dark"] .text-amber-800,
html[data-theme="dark"] .text-amber-900,
html[data-theme="dark"] .text-amber-950 { color: var(--sigati-dark-amber) !important; }
html[data-theme="dark"] .border-amber-200,
html[data-theme="dark"] .border-amber-300 { border-color: #806326 !important; }
html[data-theme="dark"] .bg-orange-50 { background-color: #39200e !important; }
html[data-theme="dark"] .bg-orange-100 { background-color: #4b2a13 !important; }
html[data-theme="dark"] .text-orange-600,
html[data-theme="dark"] .text-orange-700,
html[data-theme="dark"] .text-orange-800 { color: var(--sigati-dark-orange) !important; }
html[data-theme="dark"] .border-orange-200 { border-color: #7f4a25 !important; }

/* Rojos */
html[data-theme="dark"] .bg-red-50 { background-color: #35151b !important; }
html[data-theme="dark"] .bg-red-100 { background-color: #4c1d25 !important; }
html[data-theme="dark"] .text-red-600,
html[data-theme="dark"] .text-red-700,
html[data-theme="dark"] .text-red-800,
html[data-theme="dark"] .text-red-900,
html[data-theme="dark"] .text-red-950 { color: var(--sigati-dark-red) !important; }
html[data-theme="dark"] .border-red-100,
html[data-theme="dark"] .border-red-200,
html[data-theme="dark"] .border-red-300 { border-color: #7b3845 !important; }
html[data-theme="dark"] .bg-rose-50 { background-color: #391520 !important; }
html[data-theme="dark"] .bg-rose-100 { background-color: #512031 !important; }
html[data-theme="dark"] .text-rose-600,
html[data-theme="dark"] .text-rose-700,
html[data-theme="dark"] .text-rose-800,
html[data-theme="dark"] .text-rose-900 { color: var(--sigati-dark-rose) !important; }
html[data-theme="dark"] .border-rose-200 { border-color: #7d3951 !important; }

/* Sky */
html[data-theme="dark"] .bg-sky-50 { background-color: #0d2940 !important; }
html[data-theme="dark"] .bg-sky-100 { background-color: #123c5b !important; }
html[data-theme="dark"] .text-sky-700,
html[data-theme="dark"] .text-sky-800,
html[data-theme="dark"] .text-sky-900 { color: #9bd8ff !important; }
html[data-theme="dark"] .border-sky-200 { border-color: #336a8e !important; }

/* ================================================================
   TABLAS
   ================================================================ */
html[data-theme="dark"] .table-wrap {
    scrollbar-color: #647b98 #111c2d !important;
}
html[data-theme="dark"] .table-wrap::-webkit-scrollbar-track { background: #111c2d !important; }
html[data-theme="dark"] .table-wrap::-webkit-scrollbar-thumb { background: #647b98 !important; border-color: #111c2d !important; }
html[data-theme="dark"] .data-table { color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .data-table thead,
html[data-theme="dark"] .data-table thead th {
    background: #172438 !important;
    color: #d4e0ee !important;
}
html[data-theme="dark"] .data-table td { color: #d8e2ee !important; }
html[data-theme="dark"] .data-table tbody,
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .data-table tr,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .data-table th { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .data-table tbody tr:nth-child(even) { background: #111c2d !important; }
html[data-theme="dark"] .data-table tbody tr:hover,
html[data-theme="dark"] .data-table tbody tr:focus-within { background: #1a2d46 !important; }
html[data-theme="dark"] .data-table td[colspan] { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .data-table a.font-black { color: var(--sigati-dark-blue) !important; }

/* ================================================================
   CATÁLOGOS EN TARJETAS
   ================================================================ */
html[data-theme="dark"] .catalog-results-meta { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .catalog-card-title { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .catalog-card-subtitle { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .catalog-card-field { border-color: var(--sigati-dark-border-soft) !important; background: #142238 !important; }
html[data-theme="dark"] .catalog-card-label { color: #a6b7ca !important; }
html[data-theme="dark"] .catalog-card-value { color: #e0e9f3 !important; }
html[data-theme="dark"] .catalog-card-actions { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .catalog-avatar { background: linear-gradient(145deg,#183656,#15444a) !important; color:#dff8ff !important; }
html[data-theme="dark"] .catalog-asset-icon { background:#1a3655 !important; color:#a8d3ff !important; }
html[data-theme="dark"] .catalog-live-empty { border-color:#40536d !important; background:#101826 !important; color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .catalog-searching::after { color: var(--sigati-dark-blue) !important; }

/* ================================================================
   BUSCADOR UNIVERSAL
   ================================================================ */
html[data-theme="dark"] .sigati-universal-search-form {
    border-color: #40536d !important;
    background: #0d1624 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .sigati-universal-search-form:focus-within {
    border-color: var(--sigati-dark-focus) !important;
    background: #101a2a !important;
    box-shadow: 0 0 0 3px rgb(34 211 238 / 16%) !important;
}
html[data-theme="dark"] .sigati-universal-search-icon,
html[data-theme="dark"] .sigati-universal-search-state,
html[data-theme="dark"] .sigati-universal-search-meta,
html[data-theme="dark"] .sigati-universal-search-subtitle,
html[data-theme="dark"] .sigati-universal-search-recent-title,
html[data-theme="dark"] .sigati-universal-search-examples span { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-universal-search input[type="search"] { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .sigati-universal-search input[type="search"]::placeholder { color: var(--sigati-dark-faint) !important; }
html[data-theme="dark"] .sigati-universal-search-shortcut,
html[data-theme="dark"] .sigati-universal-search-chip,
html[data-theme="dark"] .sigati-universal-search-recent-item {
    border-color: #435873 !important;
    background: #172438 !important;
    color: #dce7f3 !important;
}
html[data-theme="dark"] .sigati-universal-search-panel {
    border-color: var(--sigati-dark-border) !important;
    background: #101826 !important;
    color: var(--sigati-dark-text-soft) !important;
    box-shadow: 0 24px 60px rgb(0 0 0 / 42%) !important;
}
html[data-theme="dark"] .sigati-universal-search-group + .sigati-universal-search-group,
html[data-theme="dark"] .sigati-universal-search-result + .sigati-universal-search-result,
html[data-theme="dark"] .sigati-universal-search-all,
html[data-theme="dark"] .sigati-universal-search-actions,
html[data-theme="dark"] .sigati-universal-search-recent { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .sigati-universal-search-group-title { background: #142238 !important; color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-universal-search-result:hover,
html[data-theme="dark"] .sigati-universal-search-result:focus-within,
html[data-theme="dark"] .sigati-universal-search-main:focus-visible,
html[data-theme="dark"] .sigati-universal-search-recent-item:hover,
html[data-theme="dark"] .sigati-universal-search-recent-item:focus-visible { background: #1a2d46 !important; }
html[data-theme="dark"] .sigati-universal-search-title { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .sigati-universal-search-badge { background: #183655 !important; color: #a8d3ff !important; }
html[data-theme="dark"] .sigati-universal-search-action { border-color: #435873 !important; background: #172438 !important; color: #dce7f3 !important; }
html[data-theme="dark"] .sigati-universal-search-action:hover { background: #21324a !important; }
html[data-theme="dark"] .sigati-universal-search-action.is-primary { border-color: #2d78b4 !important; background: #235f93 !important; color: #fff !important; }
html[data-theme="dark"] .sigati-universal-search-interpretation { border-color: #315f8f !important; background: #102a46 !important; }
html[data-theme="dark"] .sigati-universal-search-interpretation-label,
html[data-theme="dark"] .sigati-universal-search-match strong { color: #b9dcff !important; }
html[data-theme="dark"] .sigati-universal-search-match { border-color: #315f8f !important; background: #142f4d !important; color: #e7f2fd !important; }
html[data-theme="dark"] .sigati-universal-search-context { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-universal-search-clear { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-universal-search-clear:hover { color: #fff !important; }

/* ================================================================
   SELECTORES CON BÚSQUEDA
   ================================================================ */
html[data-theme="dark"] .sigati-combobox-input {
    border-color: #40536d !important;
    background: #0d1624 !important;
    color: #f4f8fc !important;
}
html[data-theme="dark"] .sigati-combobox-input:hover { border-color: #5a7392 !important; }
html[data-theme="dark"] .sigati-combobox-input:focus { border-color: var(--sigati-dark-focus) !important; box-shadow: 0 0 0 3px rgb(34 211 238 / 16%) !important; }
html[data-theme="dark"] .sigati-combobox-placeholder,
html[data-theme="dark"] .sigati-combobox-search-icon,
html[data-theme="dark"] .sigati-combobox-toggle,
html[data-theme="dark"] .sigati-combobox-empty { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-combobox-toggle:hover { background: #21324a !important; color: #fff !important; }
html[data-theme="dark"] .sigati-combobox-listbox { border-color: var(--sigati-dark-border) !important; background: #101826 !important; box-shadow: 0 20px 40px rgb(0 0 0 / 38%) !important; }
html[data-theme="dark"] .sigati-combobox-option { color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .sigati-combobox-option-active { background: #1a2d46 !important; color: #fff !important; }
html[data-theme="dark"] .sigati-combobox-option[aria-selected='true'] { background: #153451 !important; color: #cce7ff !important; box-shadow: inset 0 0 0 1px #315f8f !important; }
html[data-theme="dark"] .sigati-combobox-option-selected { color: var(--sigati-dark-cyan) !important; }
html[data-theme="dark"] .sigati-combobox-group { color: var(--sigati-dark-faint) !important; }
html[data-theme="dark"] .sigati-combobox-native { background: #101826 !important; color: var(--sigati-dark-muted) !important; }

/* ================================================================
   DRAWERS, TOASTS, AYUDA Y WIZARDS
   ================================================================ */
html[data-theme="dark"] .dashboard-mini-stat,
html[data-theme="dark"] .dashboard-quick-action,
html[data-theme="dark"] .multi-file-zone,
html[data-theme="dark"] .multi-file-item,
html[data-theme="dark"] .detail-item,
html[data-theme="dark"] .map-detail-metric,
html[data-theme="dark"] .map-detail-bar-row,
html[data-theme="dark"] .sigati-drawer-field,
html[data-theme="dark"] .sigati-skeleton-card {
    border-color: var(--sigati-dark-border-soft) !important;
    background: #142238 !important;
}
html[data-theme="dark"] .dashboard-mini-stat span,
html[data-theme="dark"] .multi-file-meta,
html[data-theme="dark"] .sigati-drawer-field dt,
html[data-theme="dark"] .sigati-drawer-subtitle,
html[data-theme="dark"] .sigati-wizard-meta { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .dashboard-mini-stat strong,
html[data-theme="dark"] .multi-file-name,
html[data-theme="dark"] .sigati-drawer-field dd,
html[data-theme="dark"] .sigati-drawer-title,
html[data-theme="dark"] .sigati-empty-state-title { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .sigati-drawer-header,
html[data-theme="dark"] .sigati-drawer-actions,
html[data-theme="dark"] .sigati-wizard-controls { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .sigati-drawer-actions { background: #0d1624 !important; }
html[data-theme="dark"] .sigati-drawer-kicker { color: var(--sigati-dark-cyan) !important; }
html[data-theme="dark"] .sigati-drawer-close { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-drawer-close:hover { background: #21324a !important; color: #fff !important; }
html[data-theme="dark"] .sigati-toast { border-color: var(--sigati-dark-border) !important; background: #142238 !important; color: var(--sigati-dark-text-soft) !important; box-shadow: 0 18px 45px rgb(0 0 0 / 38%) !important; }
html[data-theme="dark"] .sigati-toast-title { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .sigati-toast-message { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-toast-close { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-toast-close:hover { background: #21324a !important; color: #fff !important; }
html[data-theme="dark"] .sigati-toast-action,
html[data-theme="dark"] .sigati-autosave-discard,
html[data-theme="dark"] .sigati-inline-editor > summary { color: var(--sigati-dark-blue) !important; }
html[data-theme="dark"] .sigati-help-tip-trigger { color: var(--sigati-dark-faint) !important; }
html[data-theme="dark"] .sigati-help-tip-content { border-color: var(--sigati-dark-border) !important; background: #172438 !important; color: #e3edf7 !important; box-shadow: 0 14px 36px rgb(0 0 0 / 35%) !important; }
html[data-theme="dark"] .sigati-empty-state { border-color: #40536d !important; background: #111c2d !important; }
html[data-theme="dark"] .sigati-empty-state-copy { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-wizard-track { background: #293b52 !important; }
html[data-theme="dark"] .sigati-wizard-step-button { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-wizard-step-button:hover:not(:disabled) { background: #1a2d46 !important; color: #fff !important; }
html[data-theme="dark"] .sigati-wizard-step-button[aria-current="step"] { background: #153451 !important; color: #cce7ff !important; }
html[data-theme="dark"] .sigati-wizard-step-number { background: #2a3c54 !important; color: #dce7f3 !important; }
html[data-theme="dark"] .sigati-wizard-step-button[aria-current="step"] .sigati-wizard-step-number { background: #2874b6 !important; color: #fff !important; }
html[data-theme="dark"] .sigati-skeleton-line { background: linear-gradient(90deg,#26374d 25%,#344860 45%,#26374d 65%) !important; background-size:220% 100% !important; }

/* ================================================================
   DASHBOARD Y PULSO OPERATIVO
   ================================================================ */
html[data-theme="dark"] .dashboard-period-selector { border-color: var(--sigati-dark-border-soft) !important; background: #0d1624 !important; }
html[data-theme="dark"] .dashboard-period-option { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .dashboard-period-option:hover { color: #fff !important; background: #21324a !important; }
html[data-theme="dark"] .dashboard-period-active { background: #235f93 !important; color: #fff !important; }
html[data-theme="dark"] .dashboard-priority-row { border-color: var(--sigati-dark-border-soft) !important; background: #142238 !important; }
html[data-theme="dark"] .dashboard-priority-row:hover { background: #1a2d46 !important; }
html[data-theme="dark"] .dashboard-quick-action { color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .dashboard-quick-action:hover { background: #1a2d46 !important; color: #fff !important; }
html[data-theme="dark"] .trend-chart { border-color: var(--sigati-dark-border-soft) !important; background: linear-gradient(180deg,#102038,#101826) !important; }
html[data-theme="dark"] .trend-chart-grid { stroke: #3b4f68 !important; }
html[data-theme="dark"] .trend-chart-axis-label { fill: #b5c3d4 !important; }
html[data-theme="dark"] [data-donut] circle:first-child { stroke: #30435a !important; }
html[data-theme="dark"] .sigati-pulse { filter: saturate(.92) brightness(.92); }
html[data-theme="dark"] .sigati-pulse__copy,
html[data-theme="dark"] .sigati-pulse__detail,
html[data-theme="dark"] .sigati-pulse__status span { color: #d5e4f2 !important; }
html[data-theme="dark"] .sigati-pulse__title,
html[data-theme="dark"] .sigati-pulse__status strong,
html[data-theme="dark"] .sigati-pulse__value { color: #fff !important; }

/* ================================================================
   ESTRUCTURA / JERARQUÍA
   ================================================================ */
html[data-theme="dark"] .structure-tree { border-color: var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .structure-node > .structure-node::before { background: #40536d !important; }
html[data-theme="dark"] .structure-summary {
    border-color: var(--sigati-dark-border-soft) !important;
    background: #101826 !important;
    color: var(--sigati-dark-text-soft) !important;
}
html[data-theme="dark"] .structure-summary:hover { border-color: #4e6989 !important; background: #172438 !important; }
html[data-theme="dark"] .structure-toggle,
html[data-theme="dark"] .structure-code { background: #183655 !important; color: #b9dcff !important; }
html[data-theme="dark"] .structure-content { border-color: #31506f !important; }
html[data-theme="dark"] .structure-metric { border-color: #35506a !important; background: linear-gradient(135deg,#142238,#17314a) !important; color: #e0e9f3 !important; }

/* ================================================================
   ACTIVO 360
   ================================================================ */
html[data-theme="dark"] .asset360-tabbar { border-color: var(--sigati-dark-border) !important; background: rgb(16 24 38 / 96%) !important; box-shadow: 0 8px 24px rgb(0 0 0 / 30%) !important; }
html[data-theme="dark"] .asset360-tab { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .asset360-tab:hover { background: #1a2d46 !important; color: #fff !important; }
html[data-theme="dark"] .asset360-tab[aria-selected="true"] { background: #235f93 !important; color: #fff !important; }
html[data-theme="dark"] .asset360-metric,
html[data-theme="dark"] .asset360-note { border-color: var(--sigati-dark-border-soft) !important; background: #101826 !important; }
html[data-theme="dark"] .asset360-metric-label,
html[data-theme="dark"] .asset360-event time,
html[data-theme="dark"] .asset360-event p { color: var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .asset360-metric-value,
html[data-theme="dark"] .asset360-event h3 { color: var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .asset360-progress { background: #2a3c54 !important; }
html[data-theme="dark"] .asset360-alert { background: #142238 !important; color: var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .asset360-alert[data-level="critica"] { border-color:#e45b6b !important; background:#35151b !important; }
html[data-theme="dark"] .asset360-alert[data-level="alta"] { border-color:#f08c4b !important; background:#39200e !important; }
html[data-theme="dark"] .asset360-alert[data-level="media"] { border-color:#d6ad43 !important; background:#34270e !important; }
html[data-theme="dark"] .asset360-alert[data-level="baja"] { border-color:#4db1e8 !important; background:#0d2940 !important; }
html[data-theme="dark"] .asset360-timeline::before { background:#40536d !important; }
html[data-theme="dark"] .asset360-event::before { border-color:#101826 !important; box-shadow:0 0 0 2px #315f8f !important; }
html[data-theme="dark"] .asset360-compare th,
html[data-theme="dark"] .asset360-compare td { border-color:var(--sigati-dark-border-soft) !important; color:var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .asset360-compare th { background:#172438 !important; color:#d4e0ee !important; }
html[data-theme="dark"] .asset360-chip-ok { background:#164331 !important; color:#9ef0bd !important; }
html[data-theme="dark"] .asset360-chip-warn { background:#493712 !important; color:#fde68a !important; }
html[data-theme="dark"] .asset360-chip-muted { background:#293b52 !important; color:#d8e2ee !important; }
html[data-theme="dark"] .asset360-note[data-pinned="true"] { border-color:#3f78a5 !important; background:#102a46 !important; }
html[data-theme="dark"] .asset360-gallery a { border-color:var(--sigati-dark-border-soft) !important; background:#111c2d !important; }
html[data-theme="dark"] .asset360-empty { border-color:#40536d !important; color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .asset360-summary { color:var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .asset360-link { color:var(--sigati-dark-blue) !important; }

/* ================================================================
   MAPA Y POPUPS
   ================================================================ */
html[data-theme="dark"] .map-location-card { border-color:var(--sigati-dark-border-soft) !important; background:#142238 !important; color:var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .map-location-card:hover { border-color:#3f7f88 !important; background:#16313d !important; }
html[data-theme="dark"] .map-legend { border-color:#40536d !important; background:rgb(16 24 38 / 96%) !important; color:#d8e2ee !important; }
html[data-theme="dark"] .map-detail-handle { background:#60748f !important; }
html[data-theme="dark"] .map-detail-loading,
html[data-theme="dark"] .map-detail-metric span,
html[data-theme="dark"] .map-detail-tab,
html[data-theme="dark"] .map-detail-empty { color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .map-detail-metric strong,
html[data-theme="dark"] .map-detail-section-title,
html[data-theme="dark"] .map-detail-tab.is-active { color:var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .map-detail-actions,
html[data-theme="dark"] .map-detail-tabs { border-color:var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .map-detail-tab:hover { color:var(--sigati-dark-blue) !important; }
html[data-theme="dark"] .map-detail-empty { border-color:#40536d !important; background:#111c2d !important; }
html[data-theme="dark"] .map-detail-bar-track { background:#293b52 !important; }

/* Leaflet genera sus popups fuera de varias tarjetas, por eso necesita reglas propias. */
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip {
    background:#101826 !important;
    color:var(--sigati-dark-text-soft) !important;
}
html[data-theme="dark"] .leaflet-popup-content-wrapper { border:1px solid var(--sigati-dark-border) !important; box-shadow:0 18px 40px rgb(0 0 0 / 40%) !important; }
html[data-theme="dark"] .municipal-map-popup { color:var(--sigati-dark-text-soft) !important; }
html[data-theme="dark"] .map-popup-metrics div { background:#172438 !important; }
html[data-theme="dark"] .map-popup-metrics strong { color:var(--sigati-dark-heading) !important; }
html[data-theme="dark"] .map-popup-metrics span { color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .municipal-map-popup-actions { border-color:var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .leaflet-control-zoom a,
html[data-theme="dark"] .leaflet-control-layers { background:#101826 !important; color:#f1f5f9 !important; border-color:#40536d !important; }
html[data-theme="dark"] .leaflet-control-zoom a:hover { background:#21324a !important; }

/* ================================================================
   BADGES Y ESTADOS
   ================================================================ */
html[data-theme="dark"] .badge-green,
html[data-theme="dark"] .map-health-pill--normal,
html[data-theme="dark"] .mobile-operation-status-processed { background:#164331 !important; color:#9ef0bd !important; }
html[data-theme="dark"] .badge-rose,
html[data-theme="dark"] .map-health-pill--critico,
html[data-theme="dark"] .mobile-operation-status-conflict { background:#512031 !important; color:#ffb6c0 !important; }
html[data-theme="dark"] .map-health-pill--incompleto { background:#123c5b !important; color:#a8ddff !important; }
html[data-theme="dark"] .map-health-pill--atencion,
html[data-theme="dark"] .mobile-operation-status-pending { background:#493712 !important; color:#fde68a !important; }
html[data-theme="dark"] .mobile-operation-status-rejected { background:#293b52 !important; color:#d8e2ee !important; }
html[data-theme="dark"] .mobile-catalog-stat { border-color:#315f8f !important; background:#102a46 !important; }
html[data-theme="dark"] .mobile-catalog-stat strong { color:#d8ecff !important; }
html[data-theme="dark"] .mobile-catalog-stat span { color:#9dcbf7 !important; }
html[data-theme="dark"] .mobile-tab { color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .mobile-tab:hover { background:#1a2d46 !important; color:#fff !important; }
html[data-theme="dark"] .mobile-tab-active { background:#235f93 !important; color:#fff !important; }

/* ================================================================
   CASOS QUE DEBEN SEGUIR BLANCOS
   ================================================================ */
/* Las etiquetas QR necesitan fondo blanco para mantener lectura/escaneo confiable. */
html[data-theme="dark"] .qr-label-card,
html[data-theme="dark"] .qr-label-card .bg-white {
    background:#fff !important;
    color:#111827 !important;
}
html[data-theme="dark"] .qr-label-card .qr-label-brand strong,
html[data-theme="dark"] .qr-label-card .qr-label-code { color:#12335c !important; }
html[data-theme="dark"] .qr-label-card .qr-label-name { color:#334155 !important; }
html[data-theme="dark"] .qr-label-card .qr-label-meta,
html[data-theme="dark"] .qr-label-card .qr-label-location,
html[data-theme="dark"] .qr-label-card .qr-label-warning { color:#64748b !important; }

/* ================================================================
   IMPRESIÓN
   ================================================================ */
@media print {
    .sigati-theme-toggle { display: none !important; }
    html[data-theme="dark"] { color-scheme: light; }
    html[data-theme="dark"] body { background: #fff !important; color: #111827 !important; }
    html[data-theme="dark"] .acta-document,
    html[data-theme="dark"] .print-sheet,
    html[data-theme="dark"] .qr-label-card { background:#fff !important; color:#111827 !important; }
}

/* ================================================================
   AJUSTES DE CONTRASTE FINALES SOBRE COMPONENTES LEGADOS
   ================================================================ */
html[data-theme="dark"] .dashboard-level-heading { border-color:#31506f !important; }
html[data-theme="dark"] .dashboard-command-bar { background:linear-gradient(135deg,#101826 0%,#142238 100%) !important; }
html[data-theme="dark"] .dashboard-mini-stat { background:linear-gradient(145deg,#101826,#142238) !important; }
html[data-theme="dark"] .dashboard-quick-action { background:linear-gradient(135deg,#101826 0%,#142238 100%) !important; }
html[data-theme="dark"] .dashboard-delta-up { background:#164331 !important; color:#9ef0bd !important; }
html[data-theme="dark"] .dashboard-delta-down { background:#512031 !important; color:#ffb6c0 !important; }
html[data-theme="dark"] .dashboard-delta-flat { background:#293b52 !important; color:#d8e2ee !important; }

html[data-theme="dark"] .multi-file-zone { border-color:#3c638a !important; background:linear-gradient(145deg,#101826 0%,#142238 100%) !important; }
html[data-theme="dark"] .multi-file-zone-active { border-color:#31b6c0 !important; background:#12313a !important; box-shadow:0 0 0 3px rgb(49 182 192 / 15%) !important; }
html[data-theme="dark"] .multi-file-summary,
html[data-theme="dark"] .multi-file-message { color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .multi-file-message[data-tone="success"] { color:var(--sigati-dark-green) !important; }
html[data-theme="dark"] .multi-file-message[data-tone="error"] { color:var(--sigati-dark-red) !important; }
html[data-theme="dark"] .multi-file-visual { background:#17304a !important; }
html[data-theme="dark"] .multi-file-remove { border-color:#7d3951 !important; background:#391520 !important; color:#ffb6c0 !important; }
html[data-theme="dark"] .multi-file-remove:hover { border-color:#a64d67 !important; background:#512031 !important; }

html[data-theme="dark"] .sigati-pulse {
    --pulse-accent:#4ade80;
    border-color:#2d6a50 !important;
    background:#10271f !important;
    color:#c9f7d9 !important;
    filter:none !important;
    box-shadow:0 8px 24px rgb(0 0 0 / 18%) !important;
}
html[data-theme="dark"] .sigati-pulse--warning {
    --pulse-accent:#fbbf24;
    border-color:#806326 !important;
    background:#34270e !important;
    color:#fdebb3 !important;
}
html[data-theme="dark"] .sigati-pulse--critical {
    --pulse-accent:#fb7185;
    border-color:#7d3951 !important;
    background:#391520 !important;
    color:#ffd1d8 !important;
}
html[data-theme="dark"] .sigati-pulse__signal { background:rgb(255 255 255 / 8%) !important; box-shadow:inset 0 0 0 1px rgb(255 255 255 / 8%) !important; }
html[data-theme="dark"] .sigati-pulse__eyebrow { color:currentColor !important; opacity:.82 !important; }
html[data-theme="dark"] .sigati-pulse__item,
html[data-theme="dark"] .sigati-pulse__empty { border-color:#344a61 !important; background:rgb(16 24 38 / 82%) !important; color:#e2eaf4 !important; }
html[data-theme="dark"] .sigati-pulse__item:hover { background:#1a2d46 !important; }
html[data-theme="dark"] .sigati-pulse__arrow { color:#d8e2ee !important; opacity:.72 !important; }
html[data-theme="dark"] .sigati-pulse__empty { color:#9ef0bd !important; }

html[data-theme="dark"] .sigati-toast-icon { box-shadow:inset 0 0 0 1px rgb(255 255 255 / 8%) !important; }
html[data-theme="dark"] .sigati-toast--success .sigati-toast-icon { background:#164331 !important; color:#9ef0bd !important; }
html[data-theme="dark"] .sigati-toast--info .sigati-toast-icon { background:#123c5b !important; color:#a8ddff !important; }
html[data-theme="dark"] .sigati-toast--warning .sigati-toast-icon { background:#493712 !important; color:#fde68a !important; }
html[data-theme="dark"] .sigati-toast--error .sigati-toast-icon { background:#4c1d25 !important; color:#fca5a5 !important; }
html[data-theme="dark"] .sigati-toast-action { background:#183655 !important; color:#b9dcff !important; }
html[data-theme="dark"] .sigati-toast-action:hover { background:#214569 !important; }
html[data-theme="dark"] .sigati-drawer-status { background:#123c5b !important; color:#a8ddff !important; }
html[data-theme="dark"] .sigati-help-tip-trigger { border-color:#3f6f9a !important; background:#17304a !important; color:#b9dcff !important; }
html[data-theme="dark"] .sigati-empty-state-icon { background:#183655 !important; color:#a8d3ff !important; }
html[data-theme="dark"] .sigati-autosave-status { border-color:#336a8e !important; background:#0d2940 !important; color:#b9e4ff !important; }
html[data-theme="dark"] .sigati-inline-editor[open] > summary { color:#d8ecff !important; }

/* Hover de utilidades claras que de otro modo vuelven a iluminar la pantalla. */
html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-slate-100:hover { background:#1a2d46 !important; }
html[data-theme="dark"] .hover\:bg-blue-50:hover { background:#153451 !important; }
html[data-theme="dark"] .hover\:bg-cyan-50:hover,
html[data-theme="dark"] .hover\:bg-cyan-50\/40:hover { background:#16313d !important; }
html[data-theme="dark"] .hover\:text-muni-blue:hover { color:#b9dcff !important; }
html[data-theme="dark"] .hover\:text-muni-cyan:hover { color:#9ff4f4 !important; }

/* Detalles de tablas y combobox que usan colores directos en capas antiguas. */
html[data-theme="dark"] .data-table td[colspan] { background:#101826 !important; }
html[data-theme="dark"] .data-table td.text-right { border-left-color:var(--sigati-dark-border-soft) !important; }
html[data-theme="dark"] .data-table td.text-right a:hover,
html[data-theme="dark"] .data-table td.text-right button:hover,
html[data-theme="dark"] .data-table td:last-child > a.font-semibold:hover,
html[data-theme="dark"] .data-table td:last-child > button.font-semibold:hover { background:#183655 !important; }
html[data-theme="dark"] .sigati-combobox-clear { color:var(--sigati-dark-muted) !important; }
html[data-theme="dark"] .sigati-combobox-clear:hover { background:#21324a !important; color:#fff !important; }
html[data-theme="dark"] .sigati-combobox-group { background:#101826 !important; color:var(--sigati-dark-faint) !important; }
html[data-theme="dark"] .map-runtime-error { color:#ffb0bc !important; }

/* Posición del selector en pantallas de autenticación sin depender de recompilar Tailwind. */
body > .sigati-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
}

/* ========================================================================
   H24 R2 · Modo claro confortable
   Claro no significa blanco puro: fondo frío suave, tarjetas marfil-azuladas
   y contraste suficiente para jornadas largas.
   ======================================================================== */
html[data-theme="light"]{
    color-scheme:light;
    --sigati-light-bg:#edf3f8;
    --sigati-light-surface:#f7fafc;
    --sigati-light-surface-2:#f1f5f9;
    --sigati-light-surface-3:#e9f0f6;
    --sigati-light-border:#d4dfe9;
    --sigati-light-text:#20364f;
    --sigati-light-muted:#64778b;
}
html[data-theme="light"] body{background:var(--sigati-light-bg)!important;color:var(--sigati-light-text)!important}
html[data-theme="light"] [data-shell-content]>header{
    border-color:#d3dee8!important;
    background:rgb(241 246 250 / .94)!important;
    box-shadow:0 1px 0 rgb(255 255 255 / .65),0 7px 22px rgb(39 59 81 / .055)!important;
}
html[data-theme="light"] #contenido-principal{background:transparent!important}
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .form-section,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .map-operational-canvas,
html[data-theme="light"] .map-operational-sidebar,
html[data-theme="light"] .dashboard-comparison-card,
html[data-theme="light"] .dashboard-command-bar,
html[data-theme="light"] .catalog-card{
    border-color:var(--sigati-light-border)!important;
    background:var(--sigati-light-surface)!important;
    box-shadow:0 8px 24px rgb(44 63 82 / .055)!important;
}
html[data-theme="light"] .field,
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea{
    border-color:#ccd8e3!important;
    background:#f3f7fa!important;
    color:#1c334d!important;
}
html[data-theme="light"] .field:focus,
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus{background:#f9fbfd!important}
html[data-theme="light"] .sigati-theme-toggle,
html[data-theme="light"] .btn-secondary{
    border-color:#cbd7e2!important;
    background:#f2f6f9!important;
    color:#28466a!important;
}
html[data-theme="light"] .sigati-theme-toggle:hover,
html[data-theme="light"] .btn-secondary:hover{background:#e9f0f6!important;border-color:#b7c7d6!important}
html[data-theme="light"] .sigati-combobox-control{border-color:#ccd8e3!important;background:#f3f7fa!important}
html[data-theme="light"] .sigati-combobox-listbox{border-color:#cbd8e3!important;background:#f8fafc!important;box-shadow:0 16px 38px rgb(34 54 74 / .13)!important}
html[data-theme="light"] .sigati-combobox-option:hover,
html[data-theme="light"] .sigati-combobox-option[aria-selected="true"]{background:#e9f3fb!important}
