/* ==============================================================
   ADMIN-G4S — Modo Oscuro (Dark Theme)
   Soporta [data-theme="dark"], [data-bs-theme="dark"] y .dark-mode
   Overrides por componente alineados a los archivos CSS:
   - Encabezado: "Encabezado G4S"
   - Tarjetas: "Tarjetas AdminKit"
   - Modales: "Modales" y "Modal G4S"
   - Grids: "DevExtreme Grid y Componentes" y "Grid G4S"
   - Pestañas: "Pestañas legacy" y "Pestañas G4S"
   - Tablas y log: "Tablas estándar" y "Log G4S"
   - Seguimiento: sección final del archivo
   ============================================================== */
[data-theme="dark"],
.dark-mode,
:root[data-theme="dark"],
:root[data-bs-theme="dark"] {
    --ui-bg-surface: #222e3c;
    --ui-bg-subtle: #1c2633;
    --ui-bg-muted: #2b3947;
    --ui-text-main: #e9ecef;
    --ui-text-secondary: #cbd5e1;
    --ui-text-muted: #94a3b8;
    --ui-border-card: #313d4f;
    --ui-border-card-subtle: #2b3543;
    --ui-hairline-strong: #3e4c60;
    --ui-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 6px 16px -8px rgba(0, 0, 0, 0.4);
    --ui-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 28px -12px rgba(0, 0, 0, 0.6);
    --ui-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --ui-bi-titulo: #f87171;
    color-scheme: dark;
}
/* General y Layout */
html[data-theme="dark"],
html.dark-mode,
body.dark-mode,
[data-theme="dark"] body {
    background-color: #141b24 !important;
    color: #e9ecef;
}
[data-theme="dark"] .main,
[data-theme="dark"] .content,
.dark-mode .main,
.dark-mode .content {
    background-color: #141b24 !important;
}
[data-theme="dark"] .wrapper:before,
.dark-mode .wrapper:before {
    background: #141b24 !important;
}
/* Encabezado G4S */
[data-theme="dark"] .ui-page-header,
.dark-mode .ui-page-header {
    border-bottom-color: rgba(233, 236, 239, 0.12) !important;
}
[data-theme="dark"] .ui-page-header-title,
.dark-mode .ui-page-header-title {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ui-page-header-subtitle,
.dark-mode .ui-page-header-subtitle {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .ui-page-header-meta,
.dark-mode .ui-page-header-meta {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .ui-page-header-action-alt,
.dark-mode .ui-page-header-action-alt {
    border-color: rgba(233, 236, 239, 0.22) !important;
    background-color: rgba(233, 236, 239, 0.05) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .ui-page-header-action-alt:hover,
.dark-mode .ui-page-header-action-alt:hover {
    background-color: rgba(233, 236, 239, 0.12) !important;
    border-color: rgba(233, 236, 239, 0.4) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-page-header-action,
.dark-mode .ui-page-header-action {
    border-color: rgba(255, 107, 122, 0.55) !important;
    background-color: rgba(227, 6, 19, 0.16) !important;
    color: #ff8a95 !important;
}
[data-theme="dark"] .ui-page-header-action:hover,
.dark-mode .ui-page-header-action:hover {
    background-color: rgba(227, 6, 19, 0.28) !important;
    border-color: rgba(255, 107, 122, 0.8) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-page-header-action i,
.dark-mode .ui-page-header-action i {
    color: inherit !important;
}
[data-theme="dark"] .ui-page-header-action-success,
.dark-mode .ui-page-header-action-success {
    border-color: rgba(74, 222, 128, 0.35) !important;
    background-color: rgba(74, 222, 128, 0.08) !important;
    color: #4ade80 !important;
}
[data-theme="dark"] .ui-page-header-action-success:hover,
.dark-mode .ui-page-header-action-success:hover {
    background-color: rgba(74, 222, 128, 0.15) !important;
    border-color: rgba(74, 222, 128, 0.55) !important;
    color: #86efac !important;
}
[data-theme="dark"] .ui-page-header-badge,
.dark-mode .ui-page-header-badge {
    border-color: rgba(227, 6, 19, 0.5) !important;
    background-color: rgba(227, 6, 19, 0.15) !important;
    color: #ff6b7a !important;
}
/* Tarjetas AdminKit */
[data-theme="dark"] .card,
.dark-mode .card {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    box-shadow: 0 0 .875rem 0 rgba(0,0,0,.25);
    color: #e9ecef;
}
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
.dark-mode .card-header,
.dark-mode .card-footer {
    background-color: transparent !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
/* Tarjetas Credencial G4S */
[data-theme="dark"] .ui-card,
.dark-mode .ui-card {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-card::before,
.dark-mode .ui-card::before {
    background-color: #313d4f !important;
}
[data-theme="dark"] .ui-card.ui-card-hover:hover,
[data-theme="dark"] .ui-card.ui-card-interactive:hover,
.dark-mode .ui-card.ui-card-hover:hover,
.dark-mode .ui-card.ui-card-interactive:hover {
    border-color: #3e4c60 !important;
}
[data-theme="dark"] .ui-card-title,
.dark-mode .ui-card-title {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ui-card-subtitle,
.dark-mode .ui-card-subtitle {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .ui-card-header,
[data-theme="dark"] .ui-card-footer,
.dark-mode .ui-card-header,
.dark-mode .ui-card-footer {
    border-color: #313d4f !important;
    background-color: transparent !important;
}
[data-theme="dark"] .ui-card-action,
.dark-mode .ui-card-action {
    border-top-color: #313d4f !important;
}
[data-theme="dark"] .ui-card-action .btn,
[data-theme="dark"] .ui-card-action .btn-ingresar,
.dark-mode .ui-card-action .btn,
.dark-mode .ui-card-action .btn-ingresar {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-card.ui-card-hover:hover .ui-card-action .btn,
[data-theme="dark"] .ui-card.ui-card-interactive:hover .ui-card-action .btn,
.dark-mode .ui-card.ui-card-hover:hover .ui-card-action .btn,
.dark-mode .ui-card.ui-card-interactive:hover .ui-card-action .btn {
    background-color: #e30613 !important;
    border-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-card-divider,
.dark-mode .ui-card-divider {
    background: #313d4f !important;
}
[data-theme="dark"] .ui-card-icon-box.icon-box-dark,
.dark-mode .ui-card-icon-box.icon-box-dark {
    background-color: rgba(233, 236, 239, 0.08) !important;
    border-color: rgba(233, 236, 239, 0.15) !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-card-kpi-value,
.dark-mode .ui-card-kpi-value {
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-card-kpi-label,
[data-theme="dark"] .ui-card-kpi-meta,
[data-theme="dark"] .ui-card-kpi-unit,
.dark-mode .ui-card-kpi-label,
.dark-mode .ui-card-kpi-meta,
.dark-mode .ui-card-kpi-unit {
    color: #94a3b8 !important;
}
[data-theme="dark"] .ui-card-kpi.is-positive .ui-card-kpi-value,
.dark-mode .ui-card-kpi.is-positive .ui-card-kpi-value {
    color: #4ade80 !important;
}
[data-theme="dark"] .ui-card-kpi.is-negative .ui-card-kpi-value,
.dark-mode .ui-card-kpi.is-negative .ui-card-kpi-value {
    color: #f87171 !important;
}
[data-theme="dark"] .ui-card-metric,
.dark-mode .ui-card-metric {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-card-metric.is-active,
.dark-mode .ui-card-metric.is-active {
    border-color: #f87171 !important;
}
[data-theme="dark"] .ui-card-metric-label,
[data-theme="dark"] .ui-card-metric-value,
[data-theme="dark"] .ui-card-metric-unit,
.dark-mode .ui-card-metric-label,
.dark-mode .ui-card-metric-value,
.dark-mode .ui-card-metric-unit {
    color: #adb5bd !important;
}
[data-theme="dark"] .ui-text-red,
.dark-mode .ui-text-red {
    color: #f87171 !important;
}
[data-theme="dark"] .ui-card-metric-bar,
.dark-mode .ui-card-metric-bar {
    background-color: var(--ui-bg-muted) !important;
}
[data-theme="dark"] .ui-card-metric-delta,
.dark-mode .ui-card-metric-delta {
    background-color: var(--ui-bg-muted) !important;
}
[data-theme="dark"] .ui-card-metric-delta.is-up,
.dark-mode .ui-card-metric-delta.is-up {
    color: #6ee7b7 !important;
}
[data-theme="dark"] .ui-card-metric-delta.is-down,
.dark-mode .ui-card-metric-delta.is-down {
    color: #fca5a5 !important;
}
[data-theme="dark"] .ui-card-metric-delta.is-flat,
.dark-mode .ui-card-metric-delta.is-flat {
    color: #94a3b8 !important;
}
/* Colores de texto y títulos */
[data-theme="dark"] .text-dark,
.dark-mode .text-dark {
    color: #e9ecef !important;
}
[data-theme="dark"] .card-title,
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
.dark-mode .card-title,
.dark-mode h1, .dark-mode h2, .dark-mode h3,
.dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .text-secondary,
.dark-mode .text-secondary {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .text-body,
.dark-mode .text-body {
    color: #e9ecef !important;
}
[data-theme="dark"] .text-muted,
.dark-mode .text-muted {
    color: #a3b3c7 !important;
}
/* Colores contextuales legibles en fondo oscuro */
[data-theme="dark"] .text-danger,
.dark-mode .text-danger { color: #f87171 !important; }
[data-theme="dark"] .text-success,
.dark-mode .text-success { color: #4ade80 !important; }
[data-theme="dark"] .text-warning,
.dark-mode .text-warning { color: #fbbf24 !important; }
[data-theme="dark"] .text-info,
.dark-mode .text-info { color: #38bdf8 !important; }
[data-theme="dark"] .text-primary,
.dark-mode .text-primary { color: #60a5fa !important; }
/* Navbar */
[data-theme="dark"] .navbar,
[data-theme="dark"] .navbar-bg,
[data-theme="dark"] .navbar-light,
.dark-mode .navbar,
.dark-mode .navbar-bg,
.dark-mode .navbar-light {
    background-color: #222e3c !important;
    border-bottom: 1px solid #313d4f !important;
}
[data-theme="dark"] .nav-icon,
[data-theme="dark"] .nav-link,
.dark-mode .nav-icon,
.dark-mode .nav-link {
    color: #e9ecef !important;
}
[data-theme="dark"] .navbar-nav .nav-link span.text-dark,
.dark-mode .navbar-nav .nav-link span.text-dark {
    color: #e9ecef !important;
}
[data-theme="dark"] .dropdown-toggle::after,
.dark-mode .dropdown-toggle::after {
    color: #e9ecef !important;
}
[data-theme="dark"] .input-group-navbar .form-control,
.dark-mode .input-group-navbar .form-control {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .input-group-navbar .btn,
.dark-mode .input-group-navbar .btn {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #adb5bd !important;
}
/* Sidebar */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .sidebar-nav,
.dark-mode .sidebar,
.dark-mode .sidebar-nav {
    background: #1b2532 !important;
}
[data-theme="dark"] .sidebar,
.dark-mode .sidebar {
    border-right: 1px solid #2b3543 !important;
}
[data-theme="dark"] .sidebar-link,
[data-theme="dark"] a.sidebar-link,
.dark-mode .sidebar-link,
.dark-mode a.sidebar-link {
    background: transparent !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .sidebar-link:hover,
.dark-mode .sidebar-link:hover {
    color: #ffffff !important;
    background: #222e3c !important;
}
[data-theme="dark"] .sidebar-item.active > .sidebar-link,
[data-theme="dark"] .sidebar-item.active .sidebar-link:hover,
.dark-mode .sidebar-item.active > .sidebar-link,
.dark-mode .sidebar-item.active .sidebar-link:hover {
    background: #222e3c !important;
    border-left-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .sidebar-header,
.dark-mode .sidebar-header {
    color: #94a3b8 !important;
}
/* Dropdowns y Listas */
[data-theme="dark"] .dropdown-menu,
.dark-mode .dropdown-menu {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
[data-theme="dark"] .dropdown-item,
.dark-mode .dropdown-item {
    color: #e9ecef !important;
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus,
.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
    background-color: #313d4f !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dropdown-divider,
.dark-mode .dropdown-divider {
    border-color: #313d4f !important;
}
[data-theme="dark"] .dropdown-menu-header,
[data-theme="dark"] .dropdown-menu-footer,
.dark-mode .dropdown-menu-header,
.dark-mode .dropdown-menu-footer {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .list-group-item,
.dark-mode .list-group-item {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
/* Modales */
[data-theme="dark"] .modal-content,
.dark-mode .modal-content {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
[data-theme="dark"] .modal-body,
.dark-mode .modal-header,
.dark-mode .modal-footer,
.dark-mode .modal-body {
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .btn-close,
.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
/* Formularios */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea.form-control,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode textarea.form-control {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
    color-scheme: dark;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] textarea.form-control:focus,
.dark-mode .form-control:focus,
.dark-mode .form-select:focus,
.dark-mode textarea.form-control:focus {
    background-color: #1a232f !important;
    border-color: #e30613 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.25) !important;
}
[data-theme="dark"] .input-group-text,
.dark-mode .input-group-text {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea.form-control::placeholder,
.dark-mode .form-control::placeholder,
.dark-mode textarea.form-control::placeholder {
    color: #7c8ca1 !important;
}
[data-theme="dark"] .form-check-input,
.dark-mode .form-check-input {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .form-check-input:checked,
.dark-mode .form-check-input:checked {
    background-color: #e30613 !important;
    border-color: #e30613 !important;
}
[data-theme="dark"] .form-check-label,
[data-theme="dark"] .form-label,
.dark-mode .form-check-label,
.dark-mode .form-label {
    color: #e9ecef !important;
}
/* Tablas estándar y variantes Bootstrap */
[data-theme="dark"] .table,
[data-theme="dark"] .table-hover,
.dark-mode .table,
.dark-mode .table-hover {
    --bs-table-color: #e9ecef;
    --bs-table-bg: #222e3c;
    --bs-table-border-color: #313d4f;
    --bs-table-striped-bg: #1a2430;
    --bs-table-hover-bg: #2c3a4b;
    color: #e9ecef;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table > :not(caption) > * > *,
.dark-mode .table > :not(caption) > * > * {
    background-color: #222e3c;
    border-bottom-color: #313d4f !important;
    color: #e9ecef;
}
[data-theme="dark"] thead th,
[data-theme="dark"] .table thead th,
.dark-mode thead th,
.dark-mode .table thead th {
    background-color: #1a232f !important;
    color: #f1f5f9 !important;
    border-bottom: 2px solid #313d4f !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #1a2430 !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > *,
.dark-mode .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #222e3c !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .table-hover > tbody > tr:hover > *,
.dark-mode .table-hover > tbody > tr:hover > * {
    background-color: #2c3a4b !important;
    color: #ffffff !important;
}
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light > th,
[data-theme="dark"] .table-light > td,
.dark-mode .table-light,
.dark-mode .table-light > th,
.dark-mode .table-light > td {
    --bs-table-bg: #1a232f !important;
    --bs-table-color: #e9ecef !important;
    background-color: #1a232f !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-secondary,
[data-theme="dark"] .table-secondary > th,
[data-theme="dark"] .table-secondary > td,
[data-theme="dark"] .table-active,
[data-theme="dark"] .table-active > th,
[data-theme="dark"] .table-active > td,
.dark-mode .table-secondary,
.dark-mode .table-secondary > th,
.dark-mode .table-secondary > td,
.dark-mode .table-active,
.dark-mode .table-active > th,
.dark-mode .table-active > td {
    --bs-table-bg: #263342 !important;
    --bs-table-color: #e9ecef !important;
    background-color: #263342 !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-bordered > :not(caption) > * > *,
.dark-mode .table-bordered,
.dark-mode .table-bordered > :not(caption) > * > * {
    border-color: #313d4f !important;
}
/* DevExtreme Grid y Componentes */
[data-theme="dark"] .dx-widget,
.dark-mode .dx-widget {
    color: #e9ecef;
}
[data-theme="dark"] .dx-datagrid,
.dark-mode .dx-datagrid,
[data-theme="dark"] .dx-datagrid-container,
.dark-mode .dx-datagrid-container {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-datagrid-header-panel,
[data-theme="dark"] .dx-datagrid-borders > .dx-datagrid-header-panel,
[data-theme="dark"] .dx-datagrid-header-panel .dx-toolbar,
[data-theme="dark"] .dx-datagrid-header-panel .dx-toolbar-items-container,
[data-theme="dark"] .dx-datagrid-header-panel .dx-toolbar-after,
[data-theme="dark"] .dx-datagrid-header-panel .dx-toolbar-before,
.dark-mode .dx-datagrid-header-panel,
.dark-mode .dx-datagrid-borders > .dx-datagrid-header-panel,
.dark-mode .dx-datagrid-header-panel .dx-toolbar,
.dark-mode .dx-datagrid-header-panel .dx-toolbar-items-container,
.dark-mode .dx-datagrid-header-panel .dx-toolbar-after,
.dark-mode .dx-datagrid-header-panel .dx-toolbar-before {
    background-color: #222e3c !important;
    border-bottom: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-header-panel .dx-toolbar-button .dx-button,
.dark-mode .dx-datagrid-header-panel .dx-toolbar-button .dx-button {
    background-color: #1c2633 !important;
    border: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-header-panel .dx-icon,
.dark-mode .dx-datagrid-header-panel .dx-icon {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .dx-datagrid-search-panel,
[data-theme="dark"] .dx-datagrid-search-panel.dx-texteditor,
[data-theme="dark"] .dx-datagrid-search-panel.dx-editor-outlined,
.dark-mode .dx-datagrid-search-panel,
.dark-mode .dx-datagrid-search-panel.dx-texteditor,
.dark-mode .dx-datagrid-search-panel.dx-editor-outlined {
    background-color: #1c2633 !important;
    border: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-search-panel .dx-texteditor-input,
.dark-mode .dx-datagrid-search-panel .dx-texteditor-input {
    color: #e9ecef !important;
    background-color: transparent !important;
}
[data-theme="dark"] .dx-datagrid-search-panel .dx-placeholder,
.dark-mode .dx-datagrid-search-panel .dx-placeholder {
    color: #64748b !important;
}
[data-theme="dark"] .dx-datagrid-headers,
[data-theme="dark"] .dx-datagrid-headers .dx-header-row > td,
[data-theme="dark"] .dx-datagrid-headers .dx-datagrid-table .dx-row > td,
.dark-mode .dx-datagrid-headers,
.dark-mode .dx-datagrid-headers .dx-header-row > td,
.dark-mode .dx-datagrid-headers .dx-datagrid-table .dx-row > td {
    background-color: #1c2633 !important;
    color: #e9ecef !important;
    border-bottom: 1px solid #313d4f !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-datagrid-headers .dx-datagrid-text-content,
.dark-mode .dx-datagrid-headers .dx-datagrid-text-content {
    color: #e9ecef !important;
    font-weight: 600;
}
[data-theme="dark"] .dx-header-filter,
[data-theme="dark"] .dx-sort-up,
[data-theme="dark"] .dx-sort-down,
.dark-mode .dx-header-filter,
.dark-mode .dx-sort-up,
.dark-mode .dx-sort-down {
    color: #adb5bd !important;
}
[data-theme="dark"] .dx-datagrid-filter-row,
[data-theme="dark"] .dx-datagrid-filter-row > td,
[data-theme="dark"] .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td,
.dark-mode .dx-datagrid-filter-row,
.dark-mode .dx-datagrid-filter-row > td,
.dark-mode .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor,
[data-theme="dark"] .dx-datagrid-filter-row .dx-editor-container,
[data-theme="dark"] .dx-datagrid-filter-row .dx-editor-cell,
.dark-mode .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor,
.dark-mode .dx-datagrid-filter-row .dx-editor-container,
.dark-mode .dx-datagrid-filter-row .dx-editor-cell {
    background-color: #161e28 !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-filter-row .dx-texteditor-input,
.dark-mode .dx-datagrid-filter-row .dx-texteditor-input {
    color: #e9ecef !important;
    background-color: transparent !important;
}
[data-theme="dark"] .dx-datagrid-filter-row .dx-icon,
[data-theme="dark"] .dx-datagrid-filter-row .dx-filter-range-content,
.dark-mode .dx-datagrid-filter-row .dx-icon,
.dark-mode .dx-datagrid-filter-row .dx-filter-range-content {
    color: #94a3b8 !important;
}
/* Menú de operadores del filtro de columna */
[data-theme="dark"] .dx-overlay-content.dx-filter-menu,
.dark-mode .dx-overlay-content.dx-filter-menu {
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
[data-theme="dark"] .dx-filter-menu .dx-submenu,
.dark-mode .dx-filter-menu .dx-submenu {
    background-color: #222e3c !important;
    border: 1px solid #313d4f !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    padding: 6px 0 !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item,
.dark-mode .dx-filter-menu .dx-menu-item {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item .dx-menu-item-text,
.dark-mode .dx-filter-menu .dx-menu-item .dx-menu-item-text {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item .dx-icon,
.dark-mode .dx-filter-menu .dx-menu-item .dx-icon {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item:hover,
[data-theme="dark"] .dx-filter-menu .dx-menu-item.dx-state-focused,
.dark-mode .dx-filter-menu .dx-menu-item:hover,
.dark-mode .dx-filter-menu .dx-menu-item.dx-state-focused {
    background-color: #2c3a4b !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item.dx-menu-item-selected,
.dark-mode .dx-filter-menu .dx-menu-item.dx-menu-item-selected {
    background-color: rgba(227, 6, 19, 0.16) !important;
    color: #ff8a95 !important;
}
[data-theme="dark"] .dx-filter-menu .dx-menu-item.dx-menu-item-selected .dx-menu-item-text,
.dark-mode .dx-filter-menu .dx-menu-item.dx-menu-item-selected .dx-menu-item-text {
    color: #ff8a95 !important;
}
[data-theme="dark"] .dx-filter-menu .dx-context-menu-content-delimiter,
.dark-mode .dx-filter-menu .dx-context-menu-content-delimiter {
    background-color: #313d4f !important;
}
[data-theme="dark"] .dx-datagrid-rowsview .dx-data-row > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-row > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-datagrid-table .dx-data-row > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-datagrid-table .dx-row > td,
.dark-mode .dx-datagrid-rowsview .dx-data-row > td,
.dark-mode .dx-datagrid-rowsview .dx-row > td,
.dark-mode .dx-datagrid-rowsview .dx-datagrid-table .dx-data-row > td,
.dark-mode .dx-datagrid-rowsview .dx-datagrid-table .dx-row > td {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-bottom: 1px solid #2d3846 !important;
    border-color: #2d3846 !important;
}
[data-theme="dark"] .dx-datagrid .dx-row-alt > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-data-row.dx-row-alt > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-row-alt > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-datagrid-table .dx-data-row.dx-row-alt > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-datagrid-table .dx-row-alt > td,
.dark-mode .dx-datagrid .dx-row-alt > td,
.dark-mode .dx-datagrid-rowsview .dx-data-row.dx-row-alt > td,
.dark-mode .dx-datagrid-rowsview .dx-row-alt > td,
.dark-mode .dx-datagrid-rowsview .dx-datagrid-table .dx-data-row.dx-row-alt > td,
.dark-mode .dx-datagrid-rowsview .dx-datagrid-table .dx-row-alt > td {
    background-color: #1a2430 !important;
    color: #e9ecef !important;
    border-bottom: 1px solid #2d3846 !important;
    border-color: #2d3846 !important;
}
[data-theme="dark"] .dx-datagrid-rowsview .dx-data-row:hover > td,
[data-theme="dark"] .dx-datagrid-rowsview .dx-row:hover > td,
.dark-mode .dx-datagrid-rowsview .dx-data-row:hover > td,
.dark-mode .dx-datagrid-rowsview .dx-row:hover > td {
    background-color: #2c3a4b !important;
    color: #ffffff !important;
}
/* Master-detail del DataGrid en modo oscuro */
[data-theme="dark"] .dx-datagrid-rowsview .dx-master-detail-row > .dx-master-detail-cell,
[data-theme="dark"] .dx-datagrid-rowsview .dx-master-detail-row .dx-master-detail-cell,
[data-theme="dark"] .dx-datagrid-rowsview .dx-master-detail-row > .dx-datagrid-group-space,
[data-theme="dark"] .dx-datagrid-rowsview .dx-master-detail-row .dx-datagrid-group-space,
.dark-mode .dx-datagrid-rowsview .dx-master-detail-row > .dx-master-detail-cell,
.dark-mode .dx-datagrid-rowsview .dx-master-detail-row .dx-master-detail-cell,
.dark-mode .dx-datagrid-rowsview .dx-master-detail-row > .dx-datagrid-group-space,
.dark-mode .dx-datagrid-rowsview .dx-master-detail-row .dx-datagrid-group-space {
    background-color: #1a2430 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-color: #2d3846 !important;
    color: #e9ecef !important;
    padding: 8px 12px !important;
}
[data-theme="dark"] .dx-datagrid-rowsview .dx-master-detail-cell,
[data-theme="dark"] .dx-datagrid-rowsview .dx-detail-row > td,
.dark-mode .dx-datagrid-rowsview .dx-master-detail-cell,
.dark-mode .dx-datagrid-rowsview .dx-detail-row > td {
    background-color: #1a2430 !important;
    border-color: #2d3846 !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .custodia-detail-wrapper,
.dark-mode .custodia-detail-wrapper {
    background-color: #1a2430 !important;
    border-top-color: #2d3846 !important;
    padding: 1rem 1.25rem !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .custodia-resource-card,
.dark-mode .custodia-resource-card {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .custodia-resource-card:hover,
.dark-mode .custodia-resource-card:hover {
    border-color: #3e4c60 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}
[data-theme="dark"] .custodia-resource-meta-row,
.dark-mode .custodia-resource-meta-row {
    border-bottom-color: #2d3846 !important;
}
[data-theme="dark"] .custodia-resource-meta-label,
.dark-mode .custodia-resource-meta-label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .custodia-resource-meta-value,
.dark-mode .custodia-resource-meta-value {
    color: #e9ecef !important;
}
[data-theme="dark"] .custodia-detail-wrapper .text-body,
.dark-mode .custodia-detail-wrapper .text-body {
    color: #e9ecef !important;
}
[data-theme="dark"] .custodia-detail-wrapper .text-muted,
.dark-mode .custodia-detail-wrapper .text-muted {
    color: #94a3b8 !important;
}
[data-theme="dark"] .custodia-resource-icon.bg-primary-subtle,
.dark-mode .custodia-resource-icon.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.18) !important;
}
[data-theme="dark"] .custodia-resource-icon.bg-info-subtle,
.dark-mode .custodia-resource-icon.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.18) !important;
}
[data-theme="dark"] .custodia-resource-icon.bg-success-subtle,
.dark-mode .custodia-resource-icon.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.18) !important;
}
[data-theme="dark"] .custodia-resource-icon.bg-warning-subtle,
.dark-mode .custodia-resource-icon.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.18) !important;
}
[data-theme="dark"] .custodia-resource-icon.bg-secondary-subtle,
.dark-mode .custodia-resource-icon.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.18) !important;
}
[data-theme="dark"] .dx-datagrid-rowsview .dx-selection.dx-row > td,
.dark-mode .dx-datagrid-rowsview .dx-selection.dx-row > td {
    background-color: rgba(227, 6, 19, 0.25) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-datagrid-content-fixed .dx-row > td,
.dark-mode .dx-datagrid-content-fixed .dx-row > td {
    background-color: #222e3c !important;
    border-color: #2d3846 !important;
}
[data-theme="dark"] .dx-datagrid-content-fixed .dx-row-alt > td,
.dark-mode .dx-datagrid-content-fixed .dx-row-alt > td {
    background-color: #1a2430 !important;
    border-color: #2d3846 !important;
}
[data-theme="dark"] .dx-datagrid-total-footer,
[data-theme="dark"] .dx-datagrid-summary-item,
.dark-mode .dx-datagrid-total-footer,
.dark-mode .dx-datagrid-summary-item {
    background-color: #1c2633 !important;
    color: #e9ecef !important;
    border-top: 1px solid #313d4f !important;
}
[data-theme="dark"] .dx-datagrid-pager,
[data-theme="dark"] .dx-pager,
.dark-mode .dx-datagrid-pager,
.dark-mode .dx-pager {
    background-color: #1c2633 !important;
    color: #e9ecef !important;
    border-top: 1px solid #313d4f !important;
}
[data-theme="dark"] .dx-pager .dx-page,
[data-theme="dark"] .dx-pager .dx-prev-button,
[data-theme="dark"] .dx-pager .dx-next-button,
.dark-mode .dx-pager .dx-page,
.dark-mode .dx-pager .dx-prev-button,
.dark-mode .dx-pager .dx-next-button {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dx-pager .dx-selection,
.dark-mode .dx-pager .dx-selection {
    background-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-pager .dx-page-size,
.dark-mode .dx-pager .dx-page-size {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dx-pager .dx-page-size.dx-selection,
.dark-mode .dx-pager .dx-page-size.dx-selection {
    background-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-datagrid .dx-pager,
.dark-mode .dx-datagrid .dx-pager {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    border-top-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid .dx-pager .dx-page.dx-selection,
[data-theme="dark"] .dx-datagrid .dx-pager .dx-page-size.dx-selection,
.dark-mode .dx-datagrid .dx-pager .dx-page.dx-selection,
.dark-mode .dx-datagrid .dx-pager .dx-page-size.dx-selection {
    background-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-datagrid .dx-pager .dx-info,
[data-theme="dark"] .dx-datagrid .dx-pager .dx-page,
[data-theme="dark"] .dx-datagrid .dx-pager .dx-page-size,
[data-theme="dark"] .dx-datagrid .dx-pager .dx-prev-button,
[data-theme="dark"] .dx-datagrid .dx-pager .dx-next-button,
.dark-mode .dx-datagrid .dx-pager .dx-info,
.dark-mode .dx-datagrid .dx-pager .dx-page,
.dark-mode .dx-datagrid .dx-pager .dx-page-size,
.dark-mode .dx-datagrid .dx-pager .dx-prev-button,
.dark-mode .dx-datagrid .dx-pager .dx-next-button {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .dx-datagrid .dx-datagrid-group-panel,
.dark-mode .dx-datagrid .dx-datagrid-group-panel {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
    border-bottom-color: #313d4f !important;
    color: #a8b6c8 !important;
}
[data-theme="dark"] .dx-datagrid .dx-datagrid-group-panel .dx-group-panel-message,
.dark-mode .dx-datagrid .dx-datagrid-group-panel .dx-group-panel-message {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .dx-datagrid .dx-datagrid-group-panel .dx-group-panel-item,
.dark-mode .dx-datagrid .dx-datagrid-group-panel .dx-group-panel-item {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datagrid-borders > .dx-datagrid-rowsview,
[data-theme="dark"] .dx-datagrid-borders > .dx-datagrid-headers,
[data-theme="dark"] .dx-datagrid-borders > .dx-datagrid-pager,
.dark-mode .dx-datagrid-borders > .dx-datagrid-rowsview,
.dark-mode .dx-datagrid-borders > .dx-datagrid-headers,
.dark-mode .dx-datagrid-borders > .dx-datagrid-pager {
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-texteditor.dx-editor-outlined,
.dark-mode .dx-texteditor.dx-editor-outlined {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-texteditor.dx-editor-outlined .dx-texteditor-input,
.dark-mode .dx-texteditor.dx-editor-outlined .dx-texteditor-input {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-popup-normal,
[data-theme="dark"] .dx-overlay-content,
[data-theme="dark"] .dx-dropdowneditor-overlay,
.dark-mode .dx-popup-normal,
.dark-mode .dx-overlay-content,
.dark-mode .dx-dropdowneditor-overlay {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}
/* DateBox: input, calendario y reloj en modo oscuro */
[data-theme="dark"] .dx-datebox.dx-texteditor,
[data-theme="dark"] .dx-datebox.dx-texteditor.dx-editor-filled,
[data-theme="dark"] .dx-datebox.dx-texteditor.dx-editor-outlined,
[data-theme="dark"] .dx-datebox.dx-texteditor.dx-editor-underlined,
.dark-mode .dx-datebox.dx-texteditor,
.dark-mode .dx-datebox.dx-texteditor.dx-editor-filled,
.dark-mode .dx-datebox.dx-texteditor.dx-editor-outlined,
.dark-mode .dx-datebox.dx-texteditor.dx-editor-underlined {
    background-color: #2a3646 !important;
    border-color: #3d4a5c !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datebox.dx-state-hover,
.dark-mode .dx-datebox.dx-state-hover {
    background-color: #314052 !important;
    border-color: #4a5a70 !important;
}
[data-theme="dark"] .dx-datebox .dx-texteditor-input,
.dark-mode .dx-datebox .dx-texteditor-input {
    color: #e9ecef !important;
    background-color: transparent !important;
}
[data-theme="dark"] .dx-datebox .dx-placeholder,
.dark-mode .dx-datebox .dx-placeholder {
    color: #94a3b8 !important;
}
[data-theme="dark"] .dx-datebox.dx-state-focused,
.dark-mode .dx-datebox.dx-state-focused {
    background-color: #314052 !important;
    border-color: #e30613 !important;
}
[data-theme="dark"] .dx-datebox .dx-button,
[data-theme="dark"] .dx-datebox .dx-icon,
.dark-mode .dx-datebox .dx-button,
.dark-mode .dx-datebox .dx-icon {
    color: #e9ecef !important;
    background-color: transparent !important;
}
[data-theme="dark"] .dx-datebox-wrapper .dx-overlay-content,
[data-theme="dark"] .dx-datebox-wrapper .dx-popup-content,
.dark-mode .dx-datebox-wrapper .dx-overlay-content,
.dark-mode .dx-datebox-wrapper .dx-popup-content {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-calendar,
.dark-mode .dx-calendar {
    background-color: #222e3c !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-calendar-navigator,
[data-theme="dark"] .dx-calendar-caption-button,
.dark-mode .dx-calendar-navigator,
.dark-mode .dx-calendar-caption-button {
    background-color: #1c2633 !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-calendar-cell,
.dark-mode .dx-calendar-cell {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-calendar-cell.dx-calendar-other-month,
.dark-mode .dx-calendar-cell.dx-calendar-other-month {
    color: #64748b !important;
}
[data-theme="dark"] .dx-calendar-cell.dx-state-hover,
.dark-mode .dx-calendar-cell.dx-state-hover {
    background-color: #313d4f !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-calendar-cell.dx-calendar-selected,
.dark-mode .dx-calendar-cell.dx-calendar-selected {
    background-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-timeview,
[data-theme="dark"] .dx-timeview-clock,
.dark-mode .dx-timeview,
.dark-mode .dx-timeview-clock {
    background-color: #222e3c !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-timeview-hour,
[data-theme="dark"] .dx-timeview-minute,
[data-theme="dark"] .dx-timeview-field,
.dark-mode .dx-timeview-hour,
.dark-mode .dx-timeview-minute,
.dark-mode .dx-timeview-field {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datebox-wrapper .dx-button,
[data-theme="dark"] .dx-datebox-buttons-container .dx-button,
.dark-mode .dx-datebox-wrapper .dx-button,
.dark-mode .dx-datebox-buttons-container .dx-button {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-datebox-wrapper .dx-button .dx-button-text,
.dark-mode .dx-datebox-wrapper .dx-button .dx-button-text {
    color: #e9ecef !important;
}
[data-theme="dark"] .custodia-context-menu.dx-overlay-content,
.dark-mode .custodia-context-menu.dx-overlay-content {
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
[data-theme="dark"] .custodia-context-menu .dx-submenu,
.dark-mode .custodia-context-menu .dx-submenu {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .dx-list-item,
[data-theme="dark"] .dx-menu-item,
.dark-mode .dx-list-item,
.dark-mode .dx-menu-item {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-list-item:hover,
[data-theme="dark"] .dx-list-item.dx-state-hover,
[data-theme="dark"] .dx-menu-item:hover,
.dark-mode .dx-list-item:hover,
.dark-mode .dx-list-item.dx-state-hover,
.dark-mode .dx-menu-item:hover {
    background-color: #313d4f !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-list-item.dx-list-item-selected,
.dark-mode .dx-list-item.dx-list-item-selected {
    background-color: #2b3947 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-header-filter-menu,
.dark-mode .dx-header-filter-menu {
    background-color: #222e3c !important;
}
/* Select2 */
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
.dark-mode .select2-container--bootstrap-5 .select2-selection {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.dark-mode .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #e9ecef !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown,
.dark-mode .select2-container--bootstrap-5 .select2-dropdown {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-search__field,
.dark-mode .select2-container--bootstrap-5 .select2-search__field {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option,
.dark-mode .select2-container--bootstrap-5 .select2-results__option {
    color: #e9ecef !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted,
.dark-mode .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #313d4f !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--selected,
.dark-mode .select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: #2b3947 !important;
    color: #ffffff !important;
}
/* SweetAlert2 y Alertify */
[data-theme="dark"] .swal2-popup,
.dark-mode .swal2-popup {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border: 1px solid #313d4f !important;
}
[data-theme="dark"] .swal2-title,
[data-theme="dark"] .swal2-html-container,
.dark-mode .swal2-title,
.dark-mode .swal2-html-container {
    color: #e9ecef !important;
}
[data-theme="dark"] .alertify .ajs-dialog,
.dark-mode .alertify .ajs-dialog {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border: 1px solid #313d4f !important;
}
[data-theme="dark"] .alertify .ajs-header,
[data-theme="dark"] .alertify .ajs-footer,
.dark-mode .alertify .ajs-header,
.dark-mode .alertify .ajs-footer {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .alertify .ajs-body,
.dark-mode .alertify .ajs-body {
    color: #e9ecef !important;
}
/* Alertas y Cajas de Estado */
[data-theme="dark"] .alert-light,
.dark-mode .alert-light {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="dark"] .alert-light .text-dark,
.dark-mode .alert-light .text-dark {
    color: #e9ecef !important;
}
[data-theme="dark"] .alert-info,
.dark-mode .alert-info {
    background-color: rgba(13, 202, 240, 0.15) !important;
    border-color: rgba(13, 202, 240, 0.35) !important;
    color: #6edff6 !important;
}
[data-theme="dark"] .alert-warning,
.dark-mode .alert-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.35) !important;
    color: #ffda6a !important;
}
[data-theme="dark"] .alert-success,
.dark-mode .alert-success {
    background-color: rgba(25, 135, 84, 0.15) !important;
    border-color: rgba(25, 135, 84, 0.35) !important;
    color: #75b798 !important;
}
[data-theme="dark"] .alert-danger,
.dark-mode .alert-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
    color: #ea868f !important;
}
[data-theme="dark"] .alert-primary,
.dark-mode .alert-primary {
    background-color: rgba(13, 110, 253, 0.15) !important;
    border-color: rgba(13, 110, 253, 0.35) !important;
    color: #8bb9fe !important;
}
[data-theme="dark"] .alert-secondary,
.dark-mode .alert-secondary {
    background-color: #2b3947 !important;
    border-color: #313d4f !important;
    color: #cbd5e1 !important;
}
/* Detalle de Usuario y Asignaciones */
[data-theme="dark"] .bg-danger-light,
.dark-mode .bg-danger-light {
    background-color: rgba(220, 53, 69, 0.18) !important;
    border: 1px solid rgba(220, 53, 69, 0.25) !important;
}
[data-theme="dark"] .border-dashed,
.dark-mode .border-dashed {
    border-color: #313d4f !important;
}
[data-theme="dark"] .scrollbar::-webkit-scrollbar-thumb,
.dark-mode .scrollbar::-webkit-scrollbar-thumb {
    background: #475569 !important;
    border-radius: 10px;
}
[data-theme="dark"] .scrollbar::-webkit-scrollbar-track,
.dark-mode .scrollbar::-webkit-scrollbar-track {
    background: #1c2633 !important;
}
[data-theme="dark"] .bg-light .bg-white,
.dark-mode .bg-light .bg-white,
[data-theme="dark"] .alert-light .bg-white,
.dark-mode .alert-light .bg-white {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .nav-tabs .nav-link,
.dark-mode .nav-tabs .nav-link {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .nav-tabs .nav-link:hover:not(.active),
.dark-mode .nav-tabs .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .nav-tabs .nav-link.active,
.dark-mode .nav-tabs .nav-link.active {
    border-bottom: 3px solid #dc3545 !important;
    color: #f87171 !important;
    background-color: transparent !important;
}
[data-theme="dark"] .btn-light,
.dark-mode .btn-light {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .btn-light:hover,
.dark-mode .btn-light:hover {
    background-color: #263342 !important;
    border-color: #3d4c60 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .btn-outline-dark,
.dark-mode .btn-outline-dark {
    border-color: #4a5a70 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .btn-outline-dark:hover,
.dark-mode .btn-outline-dark:hover {
    background-color: #313d4f !important;
    color: #ffffff !important;
}
[data-theme="dark"] .progress,
.dark-mode .progress {
    background-color: #1c2633 !important;
    border: 1px solid #313d4f !important;
}
[data-theme="dark"] .badge.bg-warning,
[data-theme="dark"] .badge.bg-warning.text-dark,
.dark-mode .badge.bg-warning,
.dark-mode .badge.bg-warning.text-dark {
    color: #10182a !important;
}
/* Utilidades de fondo y borde */
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white,
.dark-mode .bg-light,
.dark-mode .bg-white {
    background-color: #1a232f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border,
[data-theme="dark"] .border-end,
[data-theme="dark"] .border-start,
.dark-mode .border-bottom,
.dark-mode .border-top,
.dark-mode .border,
.dark-mode .border-end,
.dark-mode .border-start {
    border-color: #313d4f !important;
}
/* Badges con fondo sutil */
[data-theme="dark"] .bg-primary-subtle,
.dark-mode .bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.2) !important;
    color: #8bb9fe !important;
}
[data-theme="dark"] .bg-danger-subtle,
.dark-mode .bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #ea868f !important;
}
[data-theme="dark"] .bg-success-subtle,
.dark-mode .bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.2) !important;
    color: #75b798 !important;
}
[data-theme="dark"] .bg-warning-subtle,
.dark-mode .bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffda6a !important;
}
[data-theme="dark"] .bg-info-subtle,
.dark-mode .bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.2) !important;
    color: #6edff6 !important;
}
/* Accordion */
[data-theme="dark"] .accordion-item,
.dark-mode .accordion-item {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .accordion-button,
.dark-mode .accordion-button {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .accordion-button:not(.collapsed),
.dark-mode .accordion-button:not(.collapsed) {
    background-color: #1c2633 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .accordion-button::after,
.dark-mode .accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}
[data-theme="dark"] .accordion-body,
.dark-mode .accordion-body {
    background-color: #222e3c !important;
    color: #e9ecef !important;
}
/* Footer */
[data-theme="dark"] .footer,
.dark-mode .footer {
    background-color: #222e3c !important;
    border-top: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
/* Stats e Iconos */
[data-theme="dark"] .stat,
.dark-mode .stat {
    background-color: #1c2633 !important;
    color: #8bb9fe !important;
}
[data-theme="dark"] .stat .text-primary,
.dark-mode .stat .text-primary {
    color: #8bb9fe !important;
}
/* Tarjetas Hover */
.hover-card {
    border-radius: 12px !important;
    background: #ffffff;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    text-decoration: none !important;
    overflow: hidden;
    position: relative;
    display: block;
}
.hover-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
}
.hover-card .card-body {
    padding: 1.1rem 1.25rem;
    position: relative;
    z-index: 1;
}
.hover-card .icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    transition: all 0.25s ease;
    margin: 0;
}
.hover-card:hover .icon-wrapper {
    background-color: #dc3545;
    color: #ffffff;
    transform: scale(1.05);
}
.hover-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}
.hover-card:hover .card-title {
    color: #dc3545;
}
.hover-card .card-desc {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.25;
    margin-top: 3px;
    margin-bottom: 0;
}
.hover-card .arrow-indicator {
    color: #adb5bd;
    font-size: 0.9rem;
    transition: transform 0.25s ease, color 0.25s ease;
}
.hover-card:hover .arrow-indicator {
    transform: translateX(4px);
    color: #dc3545;
}
[data-theme="dark"] .hover-card,
.dark-mode .hover-card {
    background: #222e3c !important;
    border-color: #313d4f !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}
[data-theme="dark"] .hover-card:hover,
.dark-mode .hover-card:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}
[data-theme="dark"] .hover-card .icon-wrapper,
.dark-mode .hover-card .icon-wrapper {
    background-color: rgba(220, 53, 69, 0.18);
    color: #ff6b7a;
}
[data-theme="dark"] .hover-card:hover .icon-wrapper,
.dark-mode .hover-card:hover .icon-wrapper {
    background-color: #dc3545;
    color: #ffffff;
}
[data-theme="dark"] .hover-card .card-title,
.dark-mode .hover-card .card-title {
    color: #e9ecef !important;
}
[data-theme="dark"] .hover-card:hover .card-title,
.dark-mode .hover-card:hover .card-title {
    color: #ff6b7a !important;
}
[data-theme="dark"] .hover-card .card-desc,
.dark-mode .hover-card .card-desc {
    color: #adb5bd !important;
}
[data-theme="dark"] .hover-card .arrow-indicator,
.dark-mode .hover-card .arrow-indicator {
    color: #6c757d;
}
[data-theme="dark"] .hover-card:hover .arrow-indicator,
.dark-mode .hover-card:hover .arrow-indicator {
    color: #ff6b7a;
}
/* Chat e Historial (SAM-MI) */
[data-theme="dark"] #chat-history,
.dark-mode #chat-history {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .chat-message,
.dark-mode .chat-message {
    background-color: #222e3c !important;
    border: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .chat-message.user-message,
.dark-mode .chat-message.user-message {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0a58ca !important;
}
[data-theme="dark"] .chat-message .message-body,
.dark-mode .chat-message .message-body {
    color: #e9ecef !important;
}
[data-theme="dark"] .login-theme-toggle-wrapper,
.dark-mode .login-theme-toggle-wrapper {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1050;
}
[data-theme="dark"] .btn-login-theme-toggle,
.dark-mode .btn-login-theme-toggle {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #fbbf24 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .btn-login-theme-toggle:hover,
.dark-mode .btn-login-theme-toggle:hover {
    background: rgba(40, 53, 72, 0.95) !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
    color: #fef08a !important;
}
[data-theme="dark"] .login-container,
.dark-mode .login-container {
    background: rgba(30, 41, 59, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-top: 4px solid var(--ui-red) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] .system-status-badge,
.dark-mode .system-status-badge {
    background: rgba(227, 6, 19, 0.16) !important;
    border: 1px solid rgba(227, 6, 19, 0.35) !important;
    color: #ff6b7a !important;
}
[data-theme="dark"] .login-title,
[data-theme="dark"] .login-container h1,
.dark-mode .login-title,
.dark-mode .login-container h1 {
    color: #ffffff !important;
}
[data-theme="dark"] .login-subtitle,
.dark-mode .login-subtitle {
    color: #94a3b8 !important;
}
[data-theme="dark"] .btn-google,
.dark-mode .btn-google {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .btn-google:hover,
.dark-mode .btn-google:hover {
    background: #283548 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] footer.login-footer,
.dark-mode footer.login-footer {
    background: rgba(15, 23, 42, 0.88) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] footer.login-footer p,
.dark-mode footer.login-footer p {
    color: #94a3b8 !important;
}
[data-theme="dark"] footer.login-footer .social-icons a,
.dark-mode footer.login-footer .social-icons a {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] footer.login-footer .social-icons a:hover,
.dark-mode footer.login-footer .social-icons a:hover {
    background: var(--ui-red) !important;
    border-color: var(--ui-red) !important;
    color: #ffffff !important;
}
/* Modal G4S */
[data-theme="dark"] .ui-modal .modal-header,
[data-theme="dark"] .ui-modal .modal-footer,
.dark-mode .ui-modal .modal-header,
.dark-mode .ui-modal .modal-footer {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-modal .modal-body,
.dark-mode .ui-modal .modal-body {
    background-color: #1c2633 !important;
}
[data-theme="dark"] .ui-modal-title,
[data-theme="dark"] .ui-modal-data dd,
.dark-mode .ui-modal-title,
.dark-mode .ui-modal-data dd {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ui-modal-subtitle,
[data-theme="dark"] .ui-modal-hint,
[data-theme="dark"] .ui-modal-data dt,
[data-theme="dark"] .ui-modal-file-caption,
[data-theme="dark"] .ui-modal-section-title,
.dark-mode .ui-modal-subtitle,
.dark-mode .ui-modal-hint,
.dark-mode .ui-modal-data dt,
.dark-mode .ui-modal-file-caption,
.dark-mode .ui-modal-section-title {
    color: #a8b6c8 !important;
}
[data-theme="dark"] .ui-modal-section + .ui-modal-section,
.dark-mode .ui-modal-section + .ui-modal-section {
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-modal-preview,
[data-theme="dark"] .ui-modal-empty,
.dark-mode .ui-modal-preview,
.dark-mode .ui-modal-empty {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-modal-preview-img,
[data-theme="dark"] .ui-modal-preview-frame,
.dark-mode .ui-modal-preview-img,
.dark-mode .ui-modal-preview-frame {
    background-color: #ffffff !important;
}
[data-theme="dark"] .ui-modal .btn-outline-secondary,
.dark-mode .ui-modal .btn-outline-secondary {
    --bs-btn-color: #e9ecef;
    --bs-btn-border-color: #4b5a6d;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #313d4f;
    --bs-btn-hover-border-color: #5b6b82;
}
/* Pestañas legacy (.btn-tab / .tab-header) */
[data-theme="dark"] .tab-header,
.dark-mode .tab-header {
    background-color: #1a232f !important;
    border-bottom-color: #313d4f !important;
}
[data-theme="dark"] .btn-tab,
.dark-mode .btn-tab {
    background-color: transparent !important;
    color: #a8b6c8 !important;
    border-color: transparent !important;
}
[data-theme="dark"] .btn-tab:hover,
.dark-mode .btn-tab:hover {
    background-color: #222e3c !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .btn-tab.active,
.dark-mode .btn-tab.active {
    background-color: #222e3c !important;
    color: #ff6b7a !important;
    border-bottom-color: #e30613 !important;
}
[data-theme="dark"] #dropdownEstadosMenu.active,
.dark-mode #dropdownEstadosMenu.active {
    background-color: #222e3c !important;
    color: #ff6b7a !important;
    border-bottom-color: #e30613 !important;
}
/* Pestañas G4S */
[data-theme="dark"] .ui-tabs,
.dark-mode .ui-tabs {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-tabs-item,
.dark-mode .ui-tabs-item {
    color: #adb5bd !important;
}
[data-theme="dark"] .ui-tabs-item i,
.dark-mode .ui-tabs-item i {
    color: #94a3b8 !important;
}
[data-theme="dark"] .ui-tabs-item:hover,
.dark-mode .ui-tabs-item:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-tabs-item:hover i,
.dark-mode .ui-tabs-item:hover i {
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-tabs-item.active,
.dark-mode .ui-tabs-item.active {
    background-color: #2a3747 !important;
    border-color: #3b4a5d !important;
    color: #e30613 !important;
}
[data-theme="dark"] .ui-tabs-item.active i,
.dark-mode .ui-tabs-item.active i {
    color: #e30613 !important;
}
/* Grid G4S */
[data-theme="dark"] .ui-grid,
.dark-mode .ui-grid {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed,
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-row > td,
.dark-mode .ui-grid .dx-datagrid-content-fixed,
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-row > td {
    background-color: transparent !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-header-row > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-header-row > td:not(.dx-last-cell) {
    background-color: #1c2633 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-datagrid-filter-row > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-datagrid-filter-row > td:not(.dx-last-cell) {
    background-color: #1a232f !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-data-row > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-data-row > td:not(.dx-last-cell) {
    background-color: #222e3c !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-row-alt > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-row-alt > td:not(.dx-last-cell) {
    background-color: #1a2430 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-data-row:hover > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-data-row:hover > td:not(.dx-last-cell) {
    background-color: #2c3a4b !important;
}
/* Sin líneas de cierre ni costura de columnas fijas */
[data-theme="dark"] .ui-grid .dx-datagrid-headers:has(.dx-datagrid-filter-row) .dx-header-row > td,
.dark-mode .ui-grid .dx-datagrid-headers:has(.dx-datagrid-filter-row) .dx-header-row > td {
    border-bottom: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td,
.dark-mode .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td {
    border-bottom: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-rowsview .dx-data-row:not(:has(+ .dx-data-row)) > td,
.dark-mode .ui-grid .dx-datagrid-rowsview .dx-data-row:not(:has(+ .dx-data-row)) > td {
    border-bottom: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-pager,
.dark-mode .ui-grid .dx-datagrid-pager {
    border-top: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-row > td:not(.dx-last-cell),
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-row > td:not(.dx-last-cell) {
    border-right: 0 !important;
}
/* Filas de relleno y celdas ocultas sin fondo propio */
[data-theme="dark"] .ui-grid .dx-datagrid .dx-freespace-row > td,
.dark-mode .ui-grid .dx-datagrid .dx-freespace-row > td,
[data-theme="dark"] .ui-grid .dx-datagrid-rowsview .dx-freespace-row > td,
.dark-mode .ui-grid .dx-datagrid-rowsview .dx-freespace-row > td {
    background-color: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-right: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid .dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid-headers .dx-header-row > td.dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid-content-fixed .dx-row > td.dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid-rowsview .dx-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid .dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid-headers .dx-header-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid-content-fixed .dx-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid-rowsview .dx-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid .dx-datagrid-table .dx-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid .dx-datagrid-table .dx-header-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td.dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid .dx-datagrid-table .dx-row > td.dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid .dx-datagrid-table .dx-header-row > td.dx-hidden-cell,
[data-theme="dark"] .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td.dx-hidden-cell {
    background-color: transparent !important;
    border: 0 !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td.dx-hidden-cell,
.dark-mode .ui-grid .dx-datagrid .dx-datagrid-table .dx-datagrid-filter-row > td.dx-hidden-cell {
    background-color: #1a232f !important;
}
[data-theme="dark"] .ui-grid .dx-datagrid-headers:has(.dx-datagrid-filter-row),
.dark-mode .ui-grid .dx-datagrid-headers:has(.dx-datagrid-filter-row) {
    background-color: #1a232f !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action,
.dark-mode .ui-grid .ui-grid-action {
    background-color: rgba(227, 6, 19, 0.12) !important;
    border-color: rgba(227, 6, 19, 0.35) !important;
    color: #f87171 !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action:hover,
[data-theme="dark"] .ui-grid .ui-grid-action:focus-visible,
.dark-mode .ui-grid .ui-grid-action:hover,
.dark-mode .ui-grid .ui-grid-action:focus-visible {
    background-color: #e30613 !important;
    border-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-info,
.dark-mode .ui-grid .ui-grid-action-info {
    background-color: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #93c5fd !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-info:hover,
[data-theme="dark"] .ui-grid .ui-grid-action-info:focus-visible,
.dark-mode .ui-grid .ui-grid-action-info:hover,
.dark-mode .ui-grid .ui-grid-action-info:focus-visible {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-success,
.dark-mode .ui-grid .ui-grid-action-success {
    background-color: rgba(34, 197, 94, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #86efac !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-success:hover,
[data-theme="dark"] .ui-grid .ui-grid-action-success:focus-visible,
.dark-mode .ui-grid .ui-grid-action-success:hover,
.dark-mode .ui-grid .ui-grid-action-success:focus-visible {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-warning,
.dark-mode .ui-grid .ui-grid-action-warning {
    background-color: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fcd34d !important;
}
[data-theme="dark"] .ui-grid .ui-grid-action-warning:hover,
[data-theme="dark"] .ui-grid .ui-grid-action-warning:focus-visible,
.dark-mode .ui-grid .ui-grid-action-warning:hover,
.dark-mode .ui-grid .ui-grid-action-warning:focus-visible {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .ui-grid .ui-grid-icon-link,
.dark-mode .ui-grid .ui-grid-icon-link {
    color: #f87171 !important;
}
[data-theme="dark"] .ui-card-badge,
.dark-mode .ui-card-badge {
    background-color: rgba(227, 6, 19, 0.15) !important;
    border-color: rgba(227, 6, 19, 0.30) !important;
    color: #f87171 !important;
}
[data-theme="dark"] .ui-card-badge.badge-warning,
.dark-mode .ui-card-badge.badge-warning {
    background-color: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.30) !important;
    color: #fbbf24 !important;
}
[data-theme="dark"] .ui-card-badge.badge-success,
.dark-mode .ui-card-badge.badge-success {
    background-color: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.30) !important;
    color: #4ade80 !important;
}
[data-theme="dark"] .ui-card-badge.badge-info,
.dark-mode .ui-card-badge.badge-info {
    background-color: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #93c5fd !important;
}
[data-theme="dark"] .ui-card-badge.badge-danger,
.dark-mode .ui-card-badge.badge-danger {
    background-color: rgba(227, 6, 19, 0.22) !important;
    border-color: rgba(227, 6, 19, 0.42) !important;
    color: #fca5a5 !important;
}
[data-theme="dark"] .ui-card-badge.badge-dark,
.dark-mode .ui-card-badge.badge-dark {
    background-color: rgba(148, 163, 184, 0.12) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    color: #cbd5e1 !important;
}
/* Log G4S */
[data-theme="dark"] .ui-log-scroll,
.dark-mode .ui-log-scroll {
    border-color: #313d4f !important;
}
[data-theme="dark"] .ui-log-table > :not(caption) > * > *,
.dark-mode .ui-log-table > :not(caption) > * > * {
    border-bottom-color: #2d3846 !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .ui-log-table thead th,
.dark-mode .ui-log-table thead th {
    background-color: #1c2633 !important;
    color: #adb5bd !important;
    border-bottom-color: #313d4f !important;
}
[data-theme="dark"] .ui-log-table .log-new,
.dark-mode .ui-log-table .log-new {
    color: #f87171 !important;
}
[data-theme="dark"] .ui-log-table .table-danger,
.dark-mode .ui-log-table .table-danger {
    background-color: rgba(220, 38, 38, 0.22) !important;
    color: #fecaca !important;
}
[data-theme="dark"] .ui-modal .ui-card-badge.badge-dark,
.dark-mode .ui-modal .ui-card-badge.badge-dark {
    background-color: rgba(148, 163, 184, 0.16) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #e2e8f0 !important;
}
/* Correcciones Globales de Tablas, Alertas y Pestañas en Modo Oscuro */
[data-theme="dark"] .table > :not(caption) > * > *,
.dark-mode .table > :not(caption) > * > * {
    --bs-table-accent-bg: transparent !important;
    box-shadow: none !important;
}
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light th,
[data-theme="dark"] .table-light td,
.dark-mode .table-light,
.dark-mode .table-light th,
.dark-mode .table-light td {
    --bs-table-bg: #1a232f !important;
    --bs-table-color: #e9ecef !important;
    --bs-table-accent-bg: transparent !important;
    background-color: #1a232f !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-secondary,
[data-theme="dark"] .table-secondary th,
[data-theme="dark"] .table-secondary td,
[data-theme="dark"] .table-active,
[data-theme="dark"] .table-active th,
[data-theme="dark"] .table-active td,
.dark-mode .table-secondary,
.dark-mode .table-secondary th,
.dark-mode .table-secondary td,
.dark-mode .table-active,
.dark-mode .table-active th,
.dark-mode .table-active td {
    --bs-table-bg: #263342 !important;
    --bs-table-color: #e9ecef !important;
    --bs-table-accent-bg: transparent !important;
    background-color: #263342 !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-primary,
[data-theme="dark"] .table-primary th,
[data-theme="dark"] .table-primary td,
.dark-mode .table-primary,
.dark-mode .table-primary th,
.dark-mode .table-primary td {
    --bs-table-bg: #1e2d40 !important;
    --bs-table-color: #e9ecef !important;
    --bs-table-accent-bg: transparent !important;
    background-color: #1e2d40 !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .table-dark,
[data-theme="dark"] .table-dark th,
[data-theme="dark"] .table-dark td,
.dark-mode .table-dark,
.dark-mode .table-dark th,
.dark-mode .table-dark td {
    --bs-table-bg: #161f2b !important;
    --bs-table-color: #e9ecef !important;
    --bs-table-accent-bg: transparent !important;
    background-color: #161f2b !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .alert-dark,
.dark-mode .alert-dark {
    background-color: #1a232f !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .alert .btn-outline-info,
.dark-mode .alert .btn-outline-info {
    color: #6edff6 !important;
    border-color: rgba(13, 202, 240, 0.55) !important;
    background-color: rgba(13, 202, 240, 0.1) !important;
}
[data-theme="dark"] .alert .btn-outline-info:hover,
.dark-mode .alert .btn-outline-info:hover {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #0f172a !important;
}
[data-theme="dark"] .card > .card-body.bg-white,
.dark-mode .card > .card-body.bg-white {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .nav-tabs,
.dark-mode .nav-tabs {
    border-bottom-color: #313d4f !important;
}
[data-theme="dark"] .nav-tabs-custom .nav-link,
.dark-mode .nav-tabs-custom .nav-link {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .nav-tabs-custom .nav-link:hover:not(.active),
.dark-mode .nav-tabs-custom .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}
[data-theme="dark"] .nav-tabs-custom .nav-link.active,
.dark-mode .nav-tabs-custom .nav-link.active {
    border-bottom: 3px solid #dc3545 !important;
    color: #f87171 !important;
    background-color: transparent !important;
}
/* Fichas Técnicas de Recursos, Puestos y Sitios (public/ficha/) */
[data-theme="dark"] .sortable-column > .card,
.dark-mode .sortable-column > .card {
    background-color: #222e3c !important;
    border: 1px solid #313d4f !important;
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .sortable-column > .card:hover,
.dark-mode .sortable-column > .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
[data-theme="dark"] .sortable-column > .card > .card-header,
.dark-mode .sortable-column > .card > .card-header {
    background: #1c2633 !important;
    border-bottom: 1px solid #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .sortable-column > .card > .card-header .card-title,
.dark-mode .sortable-column > .card > .card-header .card-title {
    color: #e9ecef !important;
}
[data-theme="dark"] .sortable-column > .card > .card-header .card-title > i:first-child,
.dark-mode .sortable-column > .card > .card-header .card-title > i:first-child {
    background: rgba(220, 53, 69, 0.16) !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="dark"] .ficha-card-action-btn,
.dark-mode .ficha-card-action-btn {
    background-color: #2b3947 !important;
    color: #cbd5e1 !important;
    border: 1px solid #3e4c60 !important;
}
[data-theme="dark"] .ficha-card-action-btn:hover,
.dark-mode .ficha-card-action-btn:hover {
    background-color: rgba(220, 53, 69, 0.22) !important;
    color: #ff6b7a !important;
    border-color: rgba(220, 53, 69, 0.45) !important;
}
[data-theme="dark"] .sortable-column > .card > .card-header .badge.bg-white,
.dark-mode .sortable-column > .card > .card-header .badge.bg-white {
    background-color: rgba(220, 53, 69, 0.18) !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
}
[data-theme="dark"] .drag-handle-card,
.dark-mode .drag-handle-card {
    background-color: #2b3947 !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="dark"] .drag-handle-card:hover,
.dark-mode .drag-handle-card:hover {
    background-color: rgba(220, 53, 69, 0.25) !important;
    border-color: #ff6b7a !important;
    color: #ffffff !important;
}
[data-theme="dark"] .sortable-column > .card > .card-body > p.card-text,
.dark-mode .sortable-column > .card > .card-body > p.card-text {
    color: #e9ecef !important;
    border-bottom: 1px dashed #313d4f !important;
}
[data-theme="dark"] .sortable-column > .card > .card-body > p.card-text:last-child,
.dark-mode .sortable-column > .card > .card-body > p.card-text:last-child {
    border-bottom: none !important;
}
[data-theme="dark"] .sortable-column > .card > .card-body > p.card-text:hover,
.dark-mode .sortable-column > .card > .card-body > p.card-text:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}
[data-theme="dark"] .sortable-column > .card > .card-body > p.card-text > strong:first-child,
.dark-mode .sortable-column > .card > .card-body > p.card-text > strong:first-child {
    color: #94a3b8 !important;
}
[data-theme="dark"] .hr-text,
.dark-mode .hr-text,
[data-theme="dark"] .sortable-column > .card > .card-body .hr-text,
.dark-mode .sortable-column > .card > .card-body .hr-text {
    color: #94a3b8 !important;
}
[data-theme="dark"] .hr-text::before,
[data-theme="dark"] .hr-text::after,
.dark-mode .hr-text::before,
.dark-mode .hr-text::after {
    border-color: #313d4f !important;
    background-color: #313d4f !important;
}
[data-theme="dark"] .hr-text > span,
.dark-mode .hr-text > span {
    background-color: #222e3c !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .card.sortable-ghost-card,
.dark-mode .card.sortable-ghost-card {
    background-color: rgba(220, 53, 69, 0.14) !important;
    border: 2px dashed #ff6b7a !important;
}
[data-theme="dark"] #mostrar_imagenes .border.border-secondary.rounded,
.dark-mode #mostrar_imagenes .border.border-secondary.rounded {
    background-color: #1c2633 !important;
    color: #94a3b8 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .card-body img[src*="configuracion/images/"],
.dark-mode .card-body img[src*="configuracion/images/"] {
    background-color: #ffffff !important;
    border-color: #313d4f !important;
}
/* DevExtreme Scheduler (Programación / Calendario en Fichas) */
[data-theme="dark"] .dx-scheduler,
[data-theme="dark"] .dx-scheduler-work-space,
[data-theme="dark"] .dx-scheduler-container,
.dark-mode .dx-scheduler,
.dark-mode .dx-scheduler-work-space,
.dark-mode .dx-scheduler-container {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-scheduler-header,
[data-theme="dark"] .dx-scheduler-header .dx-toolbar,
[data-theme="dark"] .dx-scheduler-header .dx-toolbar-items-container,
.dark-mode .dx-scheduler-header,
.dark-mode .dx-scheduler-header .dx-toolbar,
.dark-mode .dx-scheduler-header .dx-toolbar-items-container {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-scheduler-header .dx-button,
[data-theme="dark"] .dx-scheduler-navigator .dx-button,
[data-theme="dark"] .dx-scheduler-view-switcher .dx-button,
.dark-mode .dx-scheduler-header .dx-button,
.dark-mode .dx-scheduler-navigator .dx-button,
.dark-mode .dx-scheduler-view-switcher .dx-button {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-scheduler-header .dx-button .dx-icon,
[data-theme="dark"] .dx-scheduler-header .dx-button .dx-button-text,
.dark-mode .dx-scheduler-header .dx-button .dx-icon,
.dark-mode .dx-scheduler-header .dx-button .dx-button-text {
    color: #e9ecef !important;
}
[data-theme="dark"] .dx-scheduler-header .dx-button:hover,
.dark-mode .dx-scheduler-header .dx-button:hover {
    background-color: #2c3a4b !important;
}
[data-theme="dark"] .dx-scheduler-view-switcher .dx-buttongroup-item.dx-item-selected,
[data-theme="dark"] .dx-scheduler-header .dx-buttongroup-item.dx-item-selected,
.dark-mode .dx-scheduler-view-switcher .dx-buttongroup-item.dx-item-selected,
.dark-mode .dx-scheduler-header .dx-buttongroup-item.dx-item-selected {
    background-color: #e30613 !important;
    border-color: #e30613 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .dx-scheduler-header-panel,
[data-theme="dark"] .dx-scheduler-header-panel-cell,
[data-theme="dark"] .dx-scheduler-header-panel-empty-cell,
.dark-mode .dx-scheduler-header-panel,
.dark-mode .dx-scheduler-header-panel-cell,
.dark-mode .dx-scheduler-header-panel-empty-cell {
    background-color: #1c2633 !important;
    color: #cbd5e1 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-scheduler-time-panel,
[data-theme="dark"] .dx-scheduler-time-panel-cell,
[data-theme="dark"] .dx-scheduler-group-header,
[data-theme="dark"] .dx-scheduler-all-day-title,
.dark-mode .dx-scheduler-time-panel,
.dark-mode .dx-scheduler-time-panel-cell,
.dark-mode .dx-scheduler-group-header,
.dark-mode .dx-scheduler-all-day-title {
    background-color: #1c2633 !important;
    color: #94a3b8 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] .dx-scheduler-date-table,
[data-theme="dark"] .dx-scheduler-date-table-cell,
[data-theme="dark"] .dx-scheduler-all-day-table-cell,
.dark-mode .dx-scheduler-date-table,
.dark-mode .dx-scheduler-date-table-cell,
.dark-mode .dx-scheduler-all-day-table-cell {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border-color: #2d3846 !important;
}
[data-theme="dark"] .dx-scheduler-date-table-other-month.dx-scheduler-date-table-cell,
.dark-mode .dx-scheduler-date-table-other-month.dx-scheduler-date-table-cell {
    background-color: #1a232f !important;
    color: #64748b !important;
    opacity: 1 !important;
}
[data-theme="dark"] .dx-scheduler-date-table-current-date.dx-scheduler-date-table-cell,
.dark-mode .dx-scheduler-date-table-current-date.dx-scheduler-date-table-cell {
    background-color: rgba(227, 6, 19, 0.08) !important;
}
[data-theme="dark"] .dx-scheduler-date-table-cell-text,
.dark-mode .dx-scheduler-date-table-cell-text {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .dx-scheduler-date-table-other-month .dx-scheduler-date-table-cell-text,
.dark-mode .dx-scheduler-date-table-other-month .dx-scheduler-date-table-cell-text {
    color: #64748b !important;
}
[data-theme="dark"] .dx-scheduler-appointment-tooltip-wrapper .dx-overlay-content,
[data-theme="dark"] .dx-tooltip-wrapper .dx-overlay-content,
.dark-mode .dx-scheduler-appointment-tooltip-wrapper .dx-overlay-content,
.dark-mode .dx-tooltip-wrapper .dx-overlay-content {
    background-color: #222e3c !important;
    color: #e9ecef !important;
    border: 1px solid #313d4f !important;
}
[data-theme="dark"] .dx-scheduler-appointment-tooltip-wrapper .dx-overlay-content div,
[data-theme="dark"] .dx-tooltip-wrapper .dx-overlay-content div,
.dark-mode .dx-scheduler-appointment-tooltip-wrapper .dx-overlay-content div,
.dark-mode .dx-tooltip-wrapper .dx-overlay-content div {
    color: #e9ecef !important;
}
/* FilePond en Modo Oscuro */
[data-theme="dark"] .filepond--root,
.dark-mode .filepond--root {
    color: #e9ecef !important;
}
[data-theme="dark"] .filepond--panel-root,
.dark-mode .filepond--panel-root {
    background-color: #1c2633 !important;
    border: 1px dashed #3e4c60 !important;
}
[data-theme="dark"] .filepond--drop-label,
[data-theme="dark"] .filepond--drop-label label,
.dark-mode .filepond--drop-label,
.dark-mode .filepond--drop-label label {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .filepond--label-action,
.dark-mode .filepond--label-action {
    color: #ff6b7a !important;
    text-decoration-color: #ff6b7a !important;
}

/* Modal de novedades — formulario */
[data-theme="dark"] #mdl-novedades .modal-content,
.dark-mode #mdl-novedades .modal-content {
    background-color: #222e3c !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .modal-header,
[data-theme="dark"] #mdl-novedades #view-novedad-form .modal-footer,
.dark-mode #mdl-novedades #view-novedad-form .modal-header,
.dark-mode #mdl-novedades #view-novedad-form .modal-footer {
    background-color: #222e3c !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .modal-body,
.dark-mode #mdl-novedades #view-novedad-form .modal-body {
    background-color: #1c2633 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso {
    background-color: #1c2633 !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso:hover,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso:hover {
    border-color: #3d4c60 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-grupo-body,
.dark-mode #mdl-novedades #view-novedad-form .novedad-grupo-body {
    background-color: #1a232f !important;
    background-image: radial-gradient(#2c3a4b 1px, transparent 1px) !important;
    border-color: #313d4f !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-grupo-body:hover,
.dark-mode #mdl-novedades #view-novedad-form .novedad-grupo-body:hover {
    border-color: #3d4c60 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-grupo-footer,
.dark-mode #mdl-novedades #view-novedad-form .novedad-grupo-footer {
    background-color: #1a232f !important;
    border-top-color: #313d4f !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-empty,
.dark-mode #mdl-novedades #view-novedad-form .novedad-empty {
    color: #94a3b8 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-meta,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-meta,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-tipo,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-grip,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-meta-label,
.dark-mode #mdl-novedades #view-novedad-form .novedad-meta,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-meta,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-tipo,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-grip,
.dark-mode #mdl-novedades #view-novedad-form .novedad-meta-label {
    color: #94a3b8 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-meta-item strong,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-meta-value,
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-name,
.dark-mode #mdl-novedades #view-novedad-form .novedad-meta-item strong,
.dark-mode #mdl-novedades #view-novedad-form .novedad-meta-value,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-name {
    color: #e9ecef !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-cliente,
.dark-mode #mdl-novedades #view-novedad-form .novedad-cliente {
    color: #cbd5e1 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-phone,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-phone {
    background-color: rgba(74, 222, 128, 0.1) !important;
    border-color: rgba(74, 222, 128, 0.28) !important;
    color: #86efac !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-phone:hover,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-phone:hover {
    background-color: rgba(74, 222, 128, 0.16) !important;
    border-color: rgba(74, 222, 128, 0.42) !important;
    color: #bbf7d0 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-recurso-sin-tel,
.dark-mode #mdl-novedades #view-novedad-form .novedad-recurso-sin-tel {
    color: #94a3b8 !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .novedad-meta-item,
.dark-mode #mdl-novedades #view-novedad-form .novedad-meta-item {
    border-left-color: #313d4f !important;
}
[data-theme="dark"] #mdl-novedades #view-novedad-form .ui-page-header-action,
.dark-mode #mdl-novedades #view-novedad-form .ui-page-header-action {
    color: #ff6b7a !important;
}
[data-theme="dark"] .custodia-seguimiento,
.dark-mode .custodia-seguimiento {
    --custodia-seguimiento-acento: #2dd4bf;
    --custodia-seguimiento-acento-suave: rgba(45, 212, 191, 0.14);
}
[data-theme="dark"] .custodia-recurso-card--custodios,
.dark-mode .custodia-recurso-card--custodios {
    --recurso-acento: #ff6b7a;
    --recurso-acento-suave: rgba(255, 107, 122, 0.14);
}
[data-theme="dark"] .custodia-recurso-card--patrullas,
.dark-mode .custodia-recurso-card--patrullas {
    --recurso-acento: #38bdf8;
    --recurso-acento-suave: rgba(56, 189, 248, 0.14);
}
[data-theme="dark"] .custodia-recurso-card--gps,
.dark-mode .custodia-recurso-card--gps {
    --recurso-acento: #2dd4bf;
    --recurso-acento-suave: rgba(45, 212, 191, 0.14);
}

/* ==============================================================
   Avisos G4S (ui-notice)
   ============================================================== */
[data-theme="dark"] .ui-notice,
.dark-mode .ui-notice {
    --notice-bg: var(--ui-bg-subtle);
    --notice-border: var(--ui-border-card);
    box-shadow: none;
}

[data-theme="dark"] .ui-notice-info,
.dark-mode .ui-notice-info {
    --notice-accent: #60a5fa;
    --notice-icon-bg: rgba(96, 165, 250, 0.16);
    --notice-icon-color: #93c5fd;
}

[data-theme="dark"] .ui-notice-warning,
.dark-mode .ui-notice-warning {
    --notice-accent: #fbbf24;
    --notice-icon-bg: rgba(251, 191, 36, 0.16);
    --notice-icon-color: #fcd34d;
}

[data-theme="dark"] .ui-notice-danger,
.dark-mode .ui-notice-danger {
    --notice-accent: #f87171;
    --notice-icon-bg: rgba(248, 113, 113, 0.16);
    --notice-icon-color: #fca5a5;
}

[data-theme="dark"] .ui-notice-success,
.dark-mode .ui-notice-success {
    --notice-accent: #4ade80;
    --notice-icon-bg: rgba(74, 222, 128, 0.16);
    --notice-icon-color: #86efac;
}

/* Cantidad de servicios por ruta */
[data-theme="dark"] .custodia-ruta-cantidad,
.dark-mode .custodia-ruta-cantidad {
    background-color: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.32);
    color: #93c5fd;
}

/* Botones compactos */
[data-theme="dark"] .btn-compact-danger,
.dark-mode .btn-compact-danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background-color: rgba(248, 113, 113, 0.1);
}
[data-theme="dark"] .btn-compact-danger:hover,
.dark-mode .btn-compact-danger:hover {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.6);
    background-color: rgba(248, 113, 113, 0.16);
}
[data-theme="dark"] .btn-compact-success,
.dark-mode .btn-compact-success {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
    background-color: rgba(74, 222, 128, 0.1);
}
[data-theme="dark"] .btn-compact-success:hover,
.dark-mode .btn-compact-success:hover {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.6);
    background-color: rgba(74, 222, 128, 0.16);
}
[data-theme="dark"] .btn-compact-secondary,
.dark-mode .btn-compact-secondary {
    color: #cbd5e1;
    border-color: rgba(203, 213, 225, 0.3);
    background-color: rgba(203, 213, 225, 0.08);
}
[data-theme="dark"] .btn-compact-secondary:hover,
.dark-mode .btn-compact-secondary:hover {
    color: #e2e8f0;
    border-color: rgba(203, 213, 225, 0.5);
    background-color: rgba(203, 213, 225, 0.14);
}
