@import url("https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Chakra+Petch:wght@400;500;600;700&display=swap");

:root {
    --bg-primary: #0F1115;
    --bg-secondary: #1A1D23;
    --card-bg: #232730;
    --surface-elevated: #2F3440;

    --text-primary: #FFFFFF;
    --text-secondary: #A0A6B1;
    --text-muted: #6B7280;

    --risk-critical: #FF1F1F;
    --risk-high: #FF8A00;
    --risk-medium: #FFD60A;
    --risk-low: #30D158;

    --accent-blue: #3B82F6;
    --accent-violet: #7C3AED;

    --border-subtle: rgba(160, 166, 177, 0.22);
    --border-strong: rgba(160, 166, 177, 0.34);
    --overlay-soft: rgba(160, 166, 177, 0.08);
    --overlay-strong: rgba(160, 166, 177, 0.16);
    --focus-ring: rgba(59, 130, 246, 0.28);
    --modal-close-filter: invert(1) grayscale(100%) brightness(1.85);
    --modal-close-filter-hover: invert(1) grayscale(100%) brightness(2.15);

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow-lg: 0 16px 30px rgba(0, 0, 0, 0.36);
    --font-ui: "Chakra Petch", "Segoe UI", "Inter", "Roboto", sans-serif;
    --font-display: "Chakra Petch", "Segoe UI", "Inter", "Roboto", sans-serif;

    /* Compatibility aliases for legacy styles */
    --primary-color: var(--accent-blue);
    --primary-light: #60A5FA;
    --secondary-color: var(--accent-blue);
    --accent-color: var(--risk-critical);
    --success-color: var(--risk-low);
    --warning-color: var(--risk-medium);
    --danger-color: var(--risk-critical);
    --bg-dark: var(--bg-primary);
    --bg-card: var(--card-bg);
    --bg-card-hover: var(--surface-elevated);
    --bg-surface: var(--bg-secondary);
    --border-color: var(--border-subtle);
    --sidebar-gradient-start: #13161D;
    --sidebar-gradient-end: #171B23;
    --sidebar-link-hover-bg: rgba(59, 130, 246, 0.13);
    --sidebar-link-active-color: var(--text-primary);
    --heading-color: var(--text-primary);
    --strong-color: var(--text-primary);
    --input-bg: var(--bg-secondary);
    --input-focus-bg: rgba(47, 52, 64, 0.95);

    --bs-body-bg: var(--bg-primary);
    --bs-body-color: var(--text-primary);
    --bs-secondary-color: var(--text-secondary);
    --bs-border-color: var(--border-subtle);
    /* Bootstrap trae info=cian #0dcaf0, primary=#0d6efd y success=#198754 por
       defecto. El success/danger del producto evitan el verde y el rojo de
       fábrica. El info azul se conserva aquí (Risk); Sentinel lo sustituye
       por el rojo de producto en ux-polish. */
    --bs-primary-rgb: 59, 130, 246;
    --bs-info-rgb: 59, 130, 246;
    --bs-info-bg-subtle: rgba(59, 130, 246, 0.12);
    --bs-info-border-subtle: rgba(59, 130, 246, 0.28);
    --bs-info-text-emphasis: #bcd6ff;
    --bs-success: var(--risk-low);
    --bs-success-rgb: 48, 209, 88;
    --bs-success-bg-subtle: rgba(48, 209, 88, 0.14);
    --bs-success-border-subtle: rgba(48, 209, 88, 0.32);
    --bs-success-text-emphasis: var(--risk-low);
    --bs-danger: var(--risk-critical);
    --bs-danger-rgb: 255, 31, 31;
    --bs-link-color: #3B82F6;
    --bs-link-color-rgb: 59, 130, 246;
    --bs-link-hover-color: #6ba4ff;
}

html[data-theme="light_red"] {
    /* Superficies */
    --bg-primary: #f7f5f3;
    --bg-secondary: #fcfbfa;
    --card-bg: #ffffff;
    --opn-surface: #ffffff;
    --input-bg: #ffffff;
    --surface-elevated: #f2efec;
    --opn-ground: #faf8f6;
    --opn-filter-panel: #f4f2ef;
    --input-focus-bg: #ffffff;
    --action-primary-soft: #f7eef0;
    --bs-info-bg-subtle: #f3f5f7;

    /* Tinta */
    --heading-color: #121110;
    --strong-color: #121110;
    --text-primary: #1a1714;
    --opn-ink: #262220;
    --text-secondary: #55504b;
    --opn-label: #635c56;
    --text-muted: #6f6862;
    --opn-placeholder: #79726b;

    /* Marca — carmín */
    --opn-red: #9a1b2e;
    --primary-color: #9a1b2e;
    --action-primary: #9a1b2e;
    --ux-accent: #9a1b2e;
    --primary-light: #c0424f;
    --action-primary-dark: #74111f;
    --bs-link-hover-color: #74111f;
    --sidebar-link-active-color: #8a1728;

    /* Segundo eje — pizarra */
    --accent-blue: #2f4a63;
    --secondary-color: #2f4a63;
    --action-secondary: #2f4a63;
    --ux-accent-2: #2f4a63;
    --bs-link-color: #2f4a63;
    --input-focus-border: #2f4a63;
    --action-secondary-dark: #22374a;
    --bs-info-text-emphasis: #243b4f;
    --accent-violet: #5f3b63;
    --accent-color: #8a5a17;

    /* Riesgo */
    --risk-critical: #9a1b2e;
    --danger-color: #9a1b2e;
    --risk-high: #a34a0c;
    --warning: #a34a0c;
    --opn-warning: #a34a0c;
    --risk-medium: #8a6a12;
    --risk-low: #0f6b4f;
    --success-color: #0f6b4f;
    --risk-critical-soft: #f8eaec;
    --risk-high-soft: #fbf0e4;
    --risk-medium-soft: #f8f2de;
    --risk-low-soft: #eaf3ef;
    --risk-critical-line: #eed3d7;
    --risk-high-line: #e5cba6;
    --risk-medium-line: #e2d3a4;
    --risk-low-line: #c3ddd1;
    --risk-high-ink: #8f4009;
    --risk-medium-ink: #74580f;
    --risk-low-ink: #0d5c44;

    /* Bordes, veladuras y foco */
    --border-subtle: #e8e3de;
    --opn-hairline: #e8e3de;
    --opn-hairline-soft: #f1edea;
    --border-strong: #cfc7bf;
    --bs-info-border-subtle: #d7dfe6;
    --overlay-soft: rgba(154, 27, 46, .05);
    --overlay-strong: rgba(154, 27, 46, .10);
    --focus-ring: rgba(47, 74, 99, .20);
    --sidebar-link-hover-bg: rgba(26, 23, 20, .045);

    /* Barra lateral */
    --sidebar-gradient-start: #ffffff;
    --sidebar-gradient-end: #f6f3f0;

    /* Tipografía.
       Los tokens nuevos no se llaman como los que ya usa el tema
       (--font-ui, --font-display, --cc-mono). Si no se unen, Space
       Grotesk no pinta nada y Chakra Petch sigue mandando. */
    --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-reading: 'Source Serif 4', Georgia, serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --font-ui: var(--font-sans);
    --font-display: var(--font-sans);
    --cc-mono: var(--font-mono);
    --reading-size: 16px;
    --reading-leading: 1.65;
    --reading-measure: 68ch;

    /* Elevación — ya no se hereda del oscuro */
    --shadow-sm: 0 1px 2px rgba(30, 22, 20, .05);
    --shadow-md: 0 1px 2px rgba(30, 22, 20, .04), 0 8px 20px -12px rgba(30, 22, 20, .16);
    --shadow-lg: 0 1px 2px rgba(30, 22, 20, .05), 0 24px 48px -28px rgba(30, 22, 20, .22);

    /* Capa Bootstrap — los cinco tripletes semánticos. Sin esto,
       bg-info-subtle y btn-info siguen pintando con la paleta de
       fábrica. Los cuatro --bs-* que ya existen como var(...) se
       dejan: son el mismo valor. */
    --bs-primary: #9a1b2e;
    --bs-danger: #9a1b2e;
    --bs-danger-bg-subtle: #f8eaec;
    --bs-danger-border-subtle: #eed3d7;
    --bs-danger-text-emphasis: #8a1728;
    --bs-success: #0f6b4f;
    --bs-success-bg-subtle: #eaf3ef;
    --bs-success-border-subtle: #c3ddd1;
    --bs-success-text-emphasis: #0d5c44;
    --bs-warning: #a34a0c;
    --bs-warning-bg-subtle: #fbf0e4;
    --bs-warning-border-subtle: #e5cba6;
    --bs-warning-text-emphasis: #8f4009;
    --bs-info: #2f4a63;
    --bs-secondary-bg-subtle: #f4f2ef;
    --bs-secondary-border-subtle: #e8e3de;
    --bs-secondary-text-emphasis: #3b3531;
    --bs-light: #f7f5f3;
    --bs-light-border-subtle: #e8e3de;
    --bs-emphasis-color: #121110;
    --bs-border-color-translucent: rgba(26, 23, 20, .09);
    --bs-focus-ring-color: rgba(47, 74, 99, .20);

    /* Alias que el resto del CSS todavía lee con el nombre viejo */
    --warning-color: var(--warning);
    --bg-dark: var(--bg-primary);
    --bg-card: var(--card-bg);
    --bg-card-hover: var(--surface-elevated);
    --bg-surface: var(--bg-secondary);
    --border-color: var(--border-subtle);
    --bs-body-bg: var(--bg-primary);
    --bs-body-color: var(--text-primary);
    --bs-secondary-color: var(--text-secondary);
    --bs-border-color: var(--border-subtle);
    --bs-primary-rgb: 154, 27, 46;
    --bs-info-rgb: 47, 74, 99;
    --bs-success-rgb: 15, 107, 79;
    --bs-danger-rgb: 154, 27, 46;
    --bs-warning-rgb: 163, 74, 12;
    --bs-link-color-rgb: 47, 74, 99;
    --modal-close-filter: sepia(1) saturate(2200%) hue-rotate(330deg) brightness(0.72) contrast(1.2);
    --modal-close-filter-hover: sepia(1) saturate(2600%) hue-rotate(330deg) brightness(0.62) contrast(1.28);
}


* {
    scrollbar-color: var(--surface-elevated) var(--bg-primary);
}

body {
    background:
        radial-gradient(ellipse at 10% -10%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 95% 0%, rgba(124, 58, 237, 0.11) 0%, transparent 35%),
        linear-gradient(180deg, #11141A 0%, var(--bg-primary) 45%, #0D0F13 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    letter-spacing: 0.1px;
    font-family: var(--font-ui);
}

h1, h2, h3, h4, h5, h6,
.page-title,
.card-header {
    font-family: var(--font-display);
}

html[data-theme="light_red"] body {
    background:
        radial-gradient(ellipse at 10% -12%, rgba(154, 27, 46, .035) 0%, transparent 42%),
        linear-gradient(180deg, #fcfbfa 0%, #f9f7f5 55%, #f5f2ef 100%);
    font-family: var(--font-sans);
}

/* Bloques de lectura larga: narrativa de alerta, lectura ejecutiva, briefing */
html[data-theme="light_red"] .opn-reading,
html[data-theme="light_red"] .es360-briefing-lead,
html[data-theme="light_red"] .es360-briefing-why,
html[data-theme="light_red"] .es360-briefing-evidence,
html[data-theme="light_red"] .es-alert-modal-narrative-shell,
html[data-theme="light_red"] #es-event360-executive-summary {
    font-family: var(--font-reading);
    font-size: var(--reading-size);
    line-height: var(--reading-leading);
    max-width: var(--reading-measure);
    color: #2a2521;
    text-wrap: pretty;
}

/* La respuesta del copiloto NO es prosa: son tarjetas y dos columnas de lista.
   Estaba en el grupo de arriba y heredaba `max-width: 68ch` ≈ 545px dentro de un
   modal de ~1.400px: la mitad derecha quedaba vacía y las dos columnas se
   quedaban en ~270px cada una, partiendo el texto cada tres palabras. Se queda
   con la tipografía de lectura y sin el tope de medida. El color ya no se fija
   aquí: lo ponen los tokens del módulo, que valen para los dos temas. */
html[data-theme="light_red"] .es-oracle-answer {
    font-family: var(--font-reading);
    font-size: var(--reading-size);
    line-height: var(--reading-leading);
    text-wrap: pretty;
}


a {
    color: var(--bs-link-color, var(--accent-blue));
}

a:hover {
    color: var(--bs-link-hover-color);
}

.sidebar {
    background: linear-gradient(180deg, var(--sidebar-gradient-start) 0%, var(--sidebar-gradient-end) 100%);
    border-right: 1px solid var(--border-subtle);
}

.brand-logo {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo i {
    color: var(--accent-blue);
}

.sidebar .sidebar-link {
    color: var(--text-secondary);
    border-left-color: transparent;
}

.sidebar .sidebar-link i {
    color: var(--text-muted);
}

.sidebar .sidebar-link:hover,
.sidebar .sidebar-link.active {
    background: var(--sidebar-link-hover-bg);
    border-left-color: var(--accent-blue);
    color: var(--text-primary);
}

.sidebar .sidebar-link:hover i,
.sidebar .sidebar-link.active i {
    color: var(--accent-blue);
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 14px 16px 4px;
    user-select: none;
}

/* Subgrupo dentro de una sección del menú. Los veinte enlaces de Inteligencia
   Corporativa se leían como una lista plana; estas etiquetas dan jerarquía sin
   quitar ningún acceso. Más discretas que .sidebar-section-label para que no
   compitan con el título del módulo: el tamaño y el peso, no un color bajo AA. */
.sidebar-subsection-label {
    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 12px 16px 2px;
    user-select: none;
}

.sidebar-subsection-toggle {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 7px;
    pointer-events: auto;
}

.sidebar-subsection-toggle:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
}

.sidebar-subsection-icons {
    align-items: center;
    display: inline-flex;
    flex: 0 0 11px;
    justify-content: center;
    width: 11px;
}

.sidebar-subsection-icons i {
    font-size: .58rem;
    opacity: .78;
}

.sidebar-subsection-icon-closed {
    display: none;
}

.sidebar-subsection-label.is-collapsed .sidebar-subsection-icon-open {
    display: none;
}

.sidebar-subsection-label.is-collapsed .sidebar-subsection-icon-closed {
    display: inline-block;
}

.sidebar .sidebar-subsection-hidden {
    display: none !important;
}

html.sidebar-collapsed .sidebar .sidebar-subsection-label {
    display: none;
}

.sidebar-section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    pointer-events: auto;
}

.sidebar-section-icons {
    width: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-section-icon-open,
.sidebar-section-icon-closed {
    font-size: 0.68rem;
    opacity: 0.82;
}

.sidebar-section-icon-closed {
    display: none;
}

.sidebar-section-label.is-collapsed .sidebar-section-icon-open {
    display: none;
}

.sidebar-section-label.is-collapsed .sidebar-section-icon-closed {
    display: inline-block;
}

.sidebar .sidebar-section-hidden {
    display: none !important;
}

body[data-operational-focus="true"] .sidebar .sidebar-link.opn-operational-secondary:not(.active) {
    opacity: 0.62;
}

body[data-operational-focus="true"] .sidebar .sidebar-link.opn-operational-secondary:not(.active):hover {
    opacity: 0.86;
}

.sidebar-secondary-group {
    margin: 8px 10px 0;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.sidebar-secondary-group > summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.sidebar-secondary-group > summary::-webkit-details-marker {
    display: none;
}

.sidebar-secondary-group .sidebar-link {
    padding-left: 14px;
    padding-right: 14px;
}

body[data-operational-focus="true"] .sidebar-secondary-group {
    margin-top: 12px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-subtle);
}

.sidebar-user {
    color: var(--text-secondary);
}

.main-content {
    padding: 24px 26px 32px;
}

.topbar-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-strong);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1030;
}

.page-title {
    color: var(--text-primary);
    font-size: 1.52rem;
    font-weight: 650;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.91rem;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--text-muted);
    --bs-breadcrumb-item-active-color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(26, 29, 35, 0.72);
    padding: 0.38rem 0.72rem;
    width: fit-content;
    max-width: 100%;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.stat-card,
.card,
.card-custom,
.modal-content {
    background: linear-gradient(180deg, rgba(41, 46, 56, 0.98) 0%, rgba(35, 39, 48, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.20);
}

html[data-theme="light_red"] .stat-card,
html[data-theme="light_red"] .card,
html[data-theme="light_red"] .card-custom,
html[data-theme="light_red"] .modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 245, 245, 0.99) 100%);
    box-shadow: 0 6px 16px rgba(191, 31, 31, 0.09);
}

.stat-card {
    display: block;
    padding: 18px;
    min-height: 124px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-value {
    color: var(--text-primary);
    font-size: 2rem;
    line-height: 1.1;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 36%);
}

.stat-card.kpi-critical {
    border-color: rgba(255, 31, 31, 0.38);
}

.stat-card.kpi-high {
    border-color: rgba(255, 138, 0, 0.35);
}

.stat-card.kpi-medium {
    border-color: rgba(255, 214, 10, 0.35);
}

.stat-card.kpi-low {
    border-color: rgba(48, 209, 88, 0.35);
}

.stat-card .stat-icon {
    border-radius: var(--radius-md);
}

.kpi-icon-critical {
    background: rgba(255, 31, 31, 0.16);
    color: var(--risk-critical);
}

.kpi-icon-high {
    background: rgba(255, 138, 0, 0.16);
    color: var(--risk-high);
}

.kpi-icon-tracking {
    background: rgba(124, 58, 237, 0.2);
    color: #B794F6;
}

.kpi-icon-total {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.card .card-header,
.card-custom .card-header,
.modal-header,
.modal-footer {
    border-color: var(--border-subtle);
}

.card .card-header,
.card-custom .card-header {
    color: var(--text-primary);
    font-weight: 610;
}

.card-body {
    color: var(--text-primary);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-striped-bg: rgba(160, 166, 177, 0.03);
    --bs-table-hover-bg: rgba(59, 130, 246, 0.08);
    --bs-table-hover-color: var(--text-primary);
    color: var(--text-primary);
}

.table-custom th,
.table th {
    background: rgba(26, 29, 35, 0.9) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-subtle) !important;
}

html[data-theme="light_red"] .table-custom th,
html[data-theme="light_red"] .table th {
    background: rgba(255, 237, 237, 0.95) !important;
    color: var(--text-secondary) !important;
}

html[data-theme="light_red"] .table td {
    border-color: rgba(191, 31, 31, 0.16) !important;
}

html[data-theme="light_red"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(191, 31, 31, 0.08);
}

.table td {
    border-color: rgba(160, 166, 177, 0.14) !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
}

/* Event Sentinel · Centro de Eventos: improve contrast on cards */
body[data-page="event-sentinel-events"] .card,
body[data-page="event-sentinel-events"] .card-custom {
    border-color: var(--border-strong) !important;
}

body[data-page="event-sentinel-events"] .card-header,
body[data-page="event-sentinel-events"] .card-body,
body[data-page="event-sentinel-events"] .card-title,
body[data-page="event-sentinel-events"] .table,
body[data-page="event-sentinel-events"] .table td {
    color: var(--text-primary) !important;
}

body[data-page="event-sentinel-events"] .text-muted,
body[data-page="event-sentinel-events"] .small.text-muted {
    color: var(--text-secondary) !important;
}

body[data-page="alerts-list"] .alerts-table-wrap,
body[data-page="alerts-list"] .card .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

body[data-page="alerts-list"] .alerts-table,
body[data-page="alerts-list"] .card .table-responsive > table.table {
    min-width: 1180px;
    table-layout: fixed;
    width: 100%;
}

body[data-page="alerts-list"] .table-custom th,
body[data-page="alerts-list"] .table-custom td {
    vertical-align: middle;
    overflow-wrap: anywhere;
}

body[data-page="alerts-list"] .alerts-table th {
    white-space: normal;
    line-height: 1.15;
}

body[data-page="alerts-list"] .alerts-status-cell,
body[data-page="alerts-list"] .alerts-sla-cell,
body[data-page="alerts-list"] .alerts-phase-cell,
body[data-page="alerts-list"] .alerts-actions-cell {
    white-space: nowrap;
}

body[data-page="alerts-list"] .alerts-status-cell {
    min-width: 118px;
}

body[data-page="alerts-list"] .alerts-sla-cell {
    min-width: 96px;
}

body[data-page="alerts-list"] .alerts-phase-cell {
    min-width: 96px;
}

body[data-page="alerts-list"] .alerts-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    max-width: 132px;
    padding: 0.42rem 0.72rem;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}

body[data-page="alerts-list"] .alerts-date-cell {
    white-space: normal;
    line-height: 1.2;
}

body[data-page="alerts-list"] .alerts-reason-copy,
body[data-page="alerts-list"] .alerts-coverage-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body[data-page="alerts-list"] .alerts-reason-copy {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

body[data-page="alerts-list"] .alerts-coverage-note {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

body[data-page="alerts-list"] .alerts-icon-action {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0;
}

@media (max-width: 1500px) {
    body[data-page="alerts-list"] .alerts-table,
    body[data-page="alerts-list"] .card .table-responsive > table.table {
        min-width: 100%;
        font-size: 0.86rem;
    }

    body[data-page="alerts-list"] .alerts-table col:nth-child(4),
    body[data-page="alerts-list"] .alerts-table col:nth-child(5),
    body[data-page="alerts-list"] .alerts-table col:nth-child(6),
    body[data-page="alerts-list"] .alerts-table col:nth-child(9),
    body[data-page="alerts-list"] .alerts-table col:nth-child(10),
    body[data-page="alerts-list"] .alerts-table th:nth-child(4),
    body[data-page="alerts-list"] .alerts-table td:nth-child(4),
    body[data-page="alerts-list"] .alerts-table th:nth-child(5),
    body[data-page="alerts-list"] .alerts-table td:nth-child(5),
    body[data-page="alerts-list"] .alerts-table th:nth-child(6),
    body[data-page="alerts-list"] .alerts-table td:nth-child(6),
    body[data-page="alerts-list"] .alerts-table th:nth-child(9),
    body[data-page="alerts-list"] .alerts-table td:nth-child(9),
    body[data-page="alerts-list"] .alerts-table th:nth-child(10),
    body[data-page="alerts-list"] .alerts-table td:nth-child(10) {
        display: none;
    }

    body[data-page="alerts-list"] .alerts-table col:nth-child(1) { width: 13%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(2) { width: 18%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(3) { width: 11%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(7) { width: 14%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(8) { width: 12%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(11) { width: 24%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(12) { width: 8%; }

    body[data-page="alerts-list"] .alerts-status-cell,
    body[data-page="alerts-list"] .alerts-sla-cell,
    body[data-page="alerts-list"] .alerts-actions-cell {
        min-width: 0;
        white-space: normal;
    }

    body[data-page="alerts-list"] .alerts-status-badge {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        line-height: 1.15;
    }
}

@media (max-width: 1100px) {
    body[data-page="alerts-list"] .alerts-table,
    body[data-page="alerts-list"] .card .table-responsive > table.table {
        font-size: 0.82rem;
    }

    body[data-page="alerts-list"] .alerts-table col:nth-child(8),
    body[data-page="alerts-list"] .alerts-table th:nth-child(8),
    body[data-page="alerts-list"] .alerts-table td:nth-child(8) {
        display: none;
    }

    body[data-page="alerts-list"] .alerts-table col:nth-child(1) { width: 15%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(2) { width: 22%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(3) { width: 13%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(7) { width: 15%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(11) { width: 26%; }
    body[data-page="alerts-list"] .alerts-table col:nth-child(12) { width: 9%; }

    body[data-page="alerts-list"] .alerts-reason-copy {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

.opn-structured-text {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.opn-structured-text-title {
    color: var(--text-primary);
    font-weight: 700;
}

.opn-structured-text-p {
    margin: 0;
    color: var(--text-secondary);
}

.opn-structured-text-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
}

.table tbody tr[data-href],
.table tbody tr[data-open-href] {
    cursor: pointer;
}

.table tbody tr.opn-row-clickable {
    cursor: pointer;
}

.table tbody tr.opn-row-clickable > td:first-child {
    position: relative;
    padding-left: 1.25rem;
}

.table tbody tr.opn-row-clickable > td:first-child::before {
    content: "↗";
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-blue);
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.42;
    transition: transform 0.18s ease, opacity 0.18s ease;
    pointer-events: none;
}

.table tbody tr.opn-row-clickable:hover > td:first-child::before {
    opacity: 0.9;
    transform: translate(2px, -50%);
}

.table tbody tr.opn-row-clickable td.opn-row-selectable {
    cursor: text;
    user-select: text;
}

.sortable {
    cursor: pointer;
}

.score-cell,
.trend-score-cell {
    min-width: 130px;
}

.trend-score-cell {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.trend-score-cell small {
    color: var(--text-secondary);
}

.form-control,
.form-select,
textarea {
    background-color: var(--input-bg);
    border-color: var(--border-subtle);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    color: var(--text-primary);
    border-color: var(--accent-blue);
    background-color: var(--input-focus-bg);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.81rem;
    font-weight: 520;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 560;
    border-width: 1px;
}

.btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: #FFFFFF !important;
}

.btn-outline-info {
    color: var(--accent-blue);
    border-color: rgba(59, 130, 246, 0.52);
}

.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:active {
    color: #FFFFFF !important;
    border-color: var(--accent-blue) !important;
    background: rgba(59, 130, 246, 0.22) !important;
}

.btn-outline-light,
.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-strong);
    background: rgba(26, 29, 35, 0.72);
}

html[data-theme="light_red"] .btn-outline-light,
html[data-theme="light_red"] .btn-outline-secondary {
    background: rgba(255, 244, 244, 0.9);
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: var(--text-primary) !important;
    background: rgba(47, 52, 64, 0.88) !important;
    border-color: rgba(160, 166, 177, 0.46) !important;
}

.btn-danger {
    background: var(--risk-critical);
    border-color: var(--risk-critical);
    color: #FFFFFF;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background: #D80D0D !important;
    border-color: #D80D0D !important;
}

.btn-outline-danger {
    color: var(--risk-critical);
    border-color: rgba(255, 31, 31, 0.52);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    color: #FFFFFF !important;
    background: rgba(255, 31, 31, 0.22) !important;
    border-color: var(--risk-critical) !important;
}

.btn-outline-success {
    color: var(--risk-low);
    border-color: rgba(48, 209, 88, 0.5);
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active {
    color: #FFFFFF !important;
    background: rgba(48, 209, 88, 0.22) !important;
    border-color: var(--risk-low) !important;
}

.support-chat-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(59, 130, 246, 0.56);
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    box-shadow: var(--shadow-lg);
    z-index: 1060;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.support-chat-toggle:hover,
.support-chat-toggle:focus {
    background: #2563EB;
    border-color: #60A5FA;
}

body[data-page^="event-sentinel"] .support-chat-toggle,
body[data-page^="event-sentinel"] .support-chat-panel {
    display: none !important;
}

.support-chat-panel {
    position: fixed;
    right: 22px;
    bottom: 88px;
    width: min(420px, calc(100vw - 28px));
    max-height: min(680px, calc(100vh - 114px));
    background: linear-gradient(180deg, rgba(41, 46, 56, 0.99) 0%, rgba(26, 29, 35, 0.99) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1060;
    overflow: hidden;
}

.support-chat-header,
.support-chat-actions,
.support-chat-form {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-chat-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.support-chat-messages {
    padding: 12px;
    height: min(360px, calc(100vh - 330px));
    min-height: 220px;
    overflow: auto;
}

.support-chat-message {
    display: flex;
    margin-bottom: 10px;
}

.support-chat-message > div {
    max-width: 86%;
    border-radius: var(--radius-md);
    padding: 9px 11px;
    font-size: 0.9rem;
    line-height: 1.38;
    border: 1px solid var(--border-subtle);
}

.support-chat-message.assistant {
    justify-content: flex-start;
}

.support-chat-message.assistant > div {
    background: rgba(160, 166, 177, 0.09);
    color: var(--text-primary);
}

.support-chat-message.user {
    justify-content: flex-end;
}

.support-chat-message.user > div {
    background: rgba(59, 130, 246, 0.24);
    border-color: rgba(59, 130, 246, 0.42);
    color: #fff;
}

.support-chat-form {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 0;
}

.support-thinking {
    padding: 0 12px 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.support-thinking-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: inline-block;
    animation: supportThinkingPulse 1s infinite ease-in-out;
}

.support-thinking-dot:nth-child(3) {
    animation-delay: 0.16s;
}

.support-thinking-dot:nth-child(4) {
    animation-delay: 0.32s;
}

@keyframes supportThinkingPulse {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.support-onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.62);
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.support-onboarding-active .support-onboarding-overlay {
    background: transparent;
}

body.support-onboarding-active .support-onboarding-overlay::before {
    content: "";
    position: fixed;
    inset: 0;
    left: 265px;
    background: rgba(4, 6, 10, 0.56);
}

.support-onboarding-card {
    width: min(560px, 100%);
    background: linear-gradient(180deg, rgba(41, 46, 56, 0.99) 0%, rgba(26, 29, 35, 0.99) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Los paneles flotantes de ayuda cableaban un degradado oscuro sin variante
   clara, así que en light_red salía un modal oscuro sobre una página blanca
   (visto en producción en la guía «Ayuda ENS»). Se corrigen los tres que
   estaban sin cubrir, siguiendo el mismo patrón que .card/.modal-content. */
html[data-theme="light_red"] .support-onboarding-card,
html[data-theme="light_red"] .support-chat-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 245, 245, 0.99) 100%);
    box-shadow: 0 6px 16px rgba(191, 31, 31, 0.09);
}

.support-onboarding-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 0;
}

.support-onboarding-body {
    color: var(--text-secondary);
    margin: 14px 0 18px;
    line-height: 1.48;
}

.support-onboarding-highlight {
    position: relative;
    z-index: 1071;
    outline: 3px solid rgba(59, 130, 246, 0.85);
    outline-offset: 3px;
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.16);
    animation: supportOnboardingFocusPulse 1.1s ease-in-out infinite;
}

.sidebar .support-onboarding-highlight {
    background: rgba(59, 130, 246, 0.2) !important;
    border-left-color: var(--accent-blue) !important;
    color: var(--text-primary) !important;
}

.sidebar .support-onboarding-highlight i {
    color: var(--accent-blue) !important;
}

@keyframes supportOnboardingFocusPulse {
    0%, 100% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.12);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.25);
        opacity: 0.96;
    }
}

@media (max-width: 575.98px) {
    .support-chat-toggle {
        right: 14px;
        bottom: 14px;
    }

    .support-chat-panel {
        right: 14px;
        bottom: 76px;
    }

    .support-chat-form {
        flex-direction: column;
    }
}

.badge {
    border-radius: 999px;
    padding: 5px 9px;
    font-weight: 650;
}

.badge.bg-secondary {
    background: rgba(107, 114, 128, 0.35) !important;
    color: #D1D5DB;
}

.badge-risk-low {
    background: rgba(48, 209, 88, 0.16);
    color: var(--risk-low);
}

.badge-risk-medium {
    background: rgba(255, 214, 10, 0.16);
    color: var(--risk-medium);
}

.badge-risk-high {
    background: rgba(255, 138, 0, 0.16);
    color: var(--risk-high);
}

.badge-risk-critical {
    background: rgba(255, 31, 31, 0.17);
    color: var(--risk-critical);
}

.badge-status {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 630;
}

.badge-status.nueva,
.badge-status.new {
    background: rgba(59, 130, 246, 0.18);
    color: #93C5FD;
}

.badge-status.en-revision,
.badge-status.en_revision,
.badge-status.en-investigacion,
.badge-status.en_investigacion,
.badge-status.review,
.badge-status.active {
    background: rgba(255, 214, 10, 0.17);
    color: var(--risk-medium);
}

.badge-status.triage {
    background: rgba(59, 130, 246, 0.22);
    color: #BFDBFE;
}

.badge-status.escalada,
.badge-status.escalada-rrhh,
.badge-status.escalada_rrhh,
.badge-status.escalada-legal,
.badge-status.escalada_legal,
.badge-status.escalada-seguridad,
.badge-status.escalada_seguridad,
.badge-status.escalated,
.badge-status.critical {
    background: rgba(255, 31, 31, 0.17);
    color: var(--risk-critical);
}

.badge-status.mitigada,
.badge-status.completed,
.badge-status.cerrada,
.badge-status.closed {
    background: rgba(48, 209, 88, 0.17);
    color: var(--risk-low);
}

.badge-status.descartada,
.badge-status.dismissed,
.badge-status.falso-positivo,
.badge-status.falso_positivo,
.badge-status.false-positive {
    background: rgba(107, 114, 128, 0.33);
    color: #D1D5DB;
}

.score-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(160, 166, 177, 0.2);
    overflow: hidden;
}

.score-fill {
    border-radius: 999px;
}

.timeline-item {
    border-left: 2px solid rgba(160, 166, 177, 0.22);
}

.timeline-item::before {
    background: var(--accent-blue);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.14);
}

.filter-grid {
    gap: 12px;
}

body[data-page="employees-list"] .employees-filter-panel {
    overflow: hidden;
    border-color: rgba(236, 48, 92, 0.28);
    background:
        radial-gradient(circle at 8% 0%, rgba(236, 48, 92, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(35, 39, 48, 0.96), rgba(24, 27, 35, 0.94));
}

body[data-page="employees-list"] .employees-filter-panel .card-body {
    padding: 22px 24px 24px;
}

body[data-page="employees-list"] .employees-filter-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(160, 166, 177, 0.14);
}

body[data-page="employees-list"] .employees-filter-eyebrow {
    margin-bottom: 5px;
    color: var(--accent-pink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body[data-page="employees-list"] .employees-filter-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.15rem, 1.4vw, 1.45rem);
    font-weight: 800;
}

body[data-page="employees-list"] .employees-filter-copy {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

body[data-page="employees-list"] .employees-filter-meta {
    display: inline-flex;
    min-width: 190px;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid rgba(160, 166, 177, 0.18);
    border-radius: 16px;
    background: rgba(8, 10, 16, 0.26);
    text-align: right;
}

body[data-page="employees-list"] .employees-filter-meta span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body[data-page="employees-list"] .employees-filter-meta strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

body[data-page="employees-list"] .employees-filter-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.3fr) repeat(3, minmax(190px, 1fr));
    gap: 18px 16px;
    align-items: end;
}

body[data-page="employees-list"] .employees-filter-field {
    min-width: 0;
}

body[data-page="employees-list"] .employees-filter-field .form-label {
    display: flex;
    align-items: center;
    min-height: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 750;
}

body[data-page="employees-list"] .employees-filter-field .form-control,
body[data-page="employees-list"] .employees-filter-field .form-select {
    min-height: 48px;
    border-color: rgba(236, 48, 92, 0.24);
    border-radius: 14px;
    background-color: rgba(12, 14, 22, 0.68);
    font-size: 0.95rem;
}

body[data-page="employees-list"] .employees-filter-field .form-control:focus,
body[data-page="employees-list"] .employees-filter-field .form-select:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(236, 48, 92, 0.18);
}

body[data-page="employees-list"] .employees-filter-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-top: 22px;
    padding: 16px;
    border: 1px solid rgba(160, 166, 177, 0.14);
    border-radius: 18px;
    background: rgba(8, 10, 16, 0.22);
}

body[data-page="employees-list"] .employees-filter-actions-copy {
    display: flex;
    min-width: 190px;
    flex-direction: column;
    gap: 2px;
}

body[data-page="employees-list"] .employees-filter-actions-copy span {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 800;
}

body[data-page="employees-list"] .employees-filter-actions-copy small {
    color: var(--text-secondary);
}

body[data-page="employees-list"] .employees-filter-shortcuts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

body[data-page="employees-list"] .employees-filter-shortcuts .btn {
    min-height: 40px;
    padding-inline: 16px;
    border-radius: 13px;
    font-weight: 750;
}

html[data-theme="light_red"] body[data-page="employees-list"] .employees-filter-panel {
    border-color: rgba(191, 31, 31, 0.18);
    background:
        radial-gradient(circle at 8% 0%, rgba(191, 31, 31, 0.08), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 247, 0.94));
}

html[data-theme="light_red"] body[data-page="employees-list"] .employees-filter-meta,
html[data-theme="light_red"] body[data-page="employees-list"] .employees-filter-actions {
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light_red"] body[data-page="employees-list"] .employees-filter-field .form-control,
html[data-theme="light_red"] body[data-page="employees-list"] .employees-filter-field .form-select {
    border-color: rgba(191, 31, 31, 0.22);
    background-color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 1400px) {
    body[data-page="employees-list"] .employees-filter-grid {
        grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(170px, 1fr));
    }
}

@media (max-width: 992px) {
    body[data-page="employees-list"] .employees-filter-header,
    body[data-page="employees-list"] .employees-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body[data-page="employees-list"] .employees-filter-meta {
        width: 100%;
        text-align: left;
    }

    body[data-page="employees-list"] .employees-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body[data-page="employees-list"] .employees-filter-shortcuts {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    body[data-page="employees-list"] .employees-filter-panel .card-body {
        padding: 18px;
    }

    body[data-page="employees-list"] .employees-filter-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="employees-list"] .employees-filter-actions-copy,
    body[data-page="employees-list"] .employees-filter-shortcuts {
        width: 100%;
    }

    body[data-page="employees-list"] .employees-filter-shortcuts {
        flex-direction: column;
    }

    body[data-page="employees-list"] .employees-filter-shortcuts .btn {
        width: 100%;
    }
}

.empty-state {
    border: 1px dashed rgba(160, 166, 177, 0.35);
    color: var(--text-secondary);
    background: rgba(26, 29, 35, 0.55);
    border-radius: var(--radius-md);
}

.widget-list li {
    border-bottom: 1px solid rgba(160, 166, 177, 0.14);
}

.kpi-risk.low { color: var(--risk-low); }
.kpi-risk.medium { color: var(--risk-medium); }
.kpi-risk.high { color: var(--risk-high); }
.kpi-risk.critical { color: var(--risk-critical); }

.border-subtle {
    border-color: var(--border-subtle) !important;
}

.pagination .page-link {
    background: var(--bg-secondary);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

.pagination .page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.custom-toast {
    color: var(--text-primary);
    background: rgba(26, 29, 35, 0.94);
    border-color: var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease;
}

.custom-toast.is-entering {
    opacity: 0;
    transform: translateY(-8px);
}

.custom-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.custom-toast.success { border-color: rgba(48, 209, 88, 0.55); }
.custom-toast.warning { border-color: rgba(255, 214, 10, 0.55); }
.custom-toast.danger { border-color: rgba(255, 31, 31, 0.55); }
.custom-toast.info { border-color: rgba(59, 130, 246, 0.55); }

@media (max-width: 991px) {
    body.support-onboarding-active .support-onboarding-overlay::before {
        left: 0;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 265px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        z-index: 1040;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open #sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .main-content {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-title {
        font-size: 1.3rem;
    }


}

/* ============================================ */
/* LIGHT RED THEME - Professional Light Mode   */
/* ============================================ */

/* Fix contrast issues for light_red theme */
html[data-theme="light_red"] .page-title,
html[data-theme="light_red"] .card-header,
html[data-theme="light_red"] .topbar-heading {
    color: var(--heading-color);
}

html[data-theme="light_red"] .stat-card,
html[data-theme="light_red"] .card,
html[data-theme="light_red"] .card-custom,
html[data-theme="light_red"] .modal-content {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
}

html[data-theme="light_red"] .breadcrumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 240, 240, 0.95));
    border-color: rgba(196, 30, 58, 0.2);
    --bs-breadcrumb-divider-color: #c41e3a;
    --bs-breadcrumb-item-active-color: #1a1a1a;
}

html[data-theme="light_red"] .breadcrumb-item,
html[data-theme="light_red"] .breadcrumb-item a {
    color: #b91c1c;
    font-weight: 500;
}

html[data-theme="light_red"] .breadcrumb-item.active {
    color: #1a1a1a;
    font-weight: 600;
}

html[data-theme="light_red"] .kpi-icon-critical {
    background: rgba(196, 30, 58, 0.12);
    color: var(--risk-critical);
}

html[data-theme="light_red"] .kpi-icon-high {
    background: rgba(217, 119, 6, 0.12);
    color: var(--risk-high);
}

html[data-theme="light_red"] .border-secondary-subtle {
    border-color: rgba(196, 30, 58, 0.15) !important;
}

/* ============================================ */
/* MODAL IMPROVEMENTS - Structured Sections    */
/* ============================================ */

.modal-header {
    background: linear-gradient(135deg, var(--surface-elevated), var(--card-bg));
    border-bottom: 2px solid var(--border-strong);
    padding: 1.25rem;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

.modal-body {
    background: var(--card-bg);
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-footer {
    background: var(--surface-elevated);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 1.5rem;
}

/* Modal section headers for logical grouping */
.modal-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-section-title:first-child {
    margin-top: 0;
}

/* Form styling improvements */
.form-label {
    font-weight: 550;
    color: var(--text-primary);
}

.form-label small {
    color: var(--text-muted);
    font-weight: normal;
}

.form-control, .form-select {
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Light Red Theme - KPI and Table Improvements */
html[data-theme="light_red"] .bg-black.bg-opacity-25 {
    background-color: rgba(196, 30, 58, 0.08) !important;
    color: var(--text-primary);
    border-color: rgba(196, 30, 58, 0.20) !important;
}

html[data-theme="light_red"] .table-dark {
    background-color: transparent !important;
    border-color: var(--border-subtle);
}

html[data-theme="light_red"] .table-dark thead {
    background-color: rgba(196, 30, 58, 0.05) !important;
}

/* Light Red Theme - Badge color adjustments */
html[data-theme="light_red"] .badge {
    color: #1a1a1a;
}

html[data-theme="light_red"] .badge.bg-success {
    background: rgba(5, 150, 105, 0.15) !important;
    color: #047857;
    font-weight: 600;
}

html[data-theme="light_red"] .badge.bg-danger {
    background: rgba(185, 28, 28, 0.15) !important;
    color: #991b1b;
    font-weight: 600;
}

html[data-theme="light_red"] .badge.bg-warning {
    background: rgba(217, 119, 6, 0.15) !important;
    color: #b45309;
    font-weight: 600;
}

html[data-theme="light_red"] .badge.bg-info {
    background: rgba(166, 31, 43, 0.13) !important;
    color: #7f151f;
    font-weight: 600;
}

html[data-theme="light_red"] .badge.bg-secondary {
    background: rgba(107, 114, 128, 0.12) !important;
    color: #4b5563;
    font-weight: 600;
}

html[data-theme="light_red"] .badge.bg-primary {
    background: rgba(185, 28, 28, 0.12) !important;
    color: #991b1b;
    font-weight: 600;
}

/* Light Red · premium contrast pass */
html[data-theme="light_red"] a {
    color: var(--bs-link-color);
}

html[data-theme="light_red"] a:hover {
    color: var(--bs-link-hover-color);
}

html[data-theme="light_red"] .sidebar {
    box-shadow: 8px 0 28px rgba(87, 42, 35, 0.06);
}

html[data-theme="light_red"] .sidebar .sidebar-link {
    color: #5f5551;
}

html[data-theme="light_red"] .sidebar .sidebar-link i {
    color: #7f706b;
}

html[data-theme="light_red"] .sidebar .sidebar-link:hover,
html[data-theme="light_red"] .sidebar .sidebar-link.active {
    background: linear-gradient(90deg, rgba(166, 31, 43, 0.11), rgba(166, 31, 43, 0.025));
    color: #7d1720;
    border-left-color: #a61f2b;
}

html[data-theme="light_red"] .sidebar .sidebar-link:hover i,
html[data-theme="light_red"] .sidebar .sidebar-link.active i,
html[data-theme="light_red"] body[data-module-surface="sentinel"] .brand-logo i,
html[data-theme="light_red"] body[data-module-surface="sentinel"] .sidebar .sidebar-link.active i {
    color: #a61f2b;
}

html[data-theme="light_red"] .stat-card,
html[data-theme="light_red"] .card,
html[data-theme="light_red"] .card-custom,
html[data-theme="light_red"] .modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 252, 250, 0.99));
    border-color: #e3d2cd;
    box-shadow: 0 18px 44px rgba(71, 35, 28, 0.08), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

html[data-theme="light_red"] .stat-card:hover,
html[data-theme="light_red"] .card-custom:hover {
    border-color: #c9aaa3;
    box-shadow: 0 20px 50px rgba(71, 35, 28, 0.11);
}

html[data-theme="light_red"] .table-custom th,
html[data-theme="light_red"] .table th {
    background: linear-gradient(180deg, #f3e8e5, #ead8d3) !important;
    color: #453b37 !important;
    border-color: #ddc9c3 !important;
}

html[data-theme="light_red"] .table td {
    color: #211916;
    border-color: #eadbd7 !important;
}

html[data-theme="light_red"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(166, 31, 43, 0.045) !important;
}

html[data-theme="light_red"] .form-control,
html[data-theme="light_red"] .form-select,
html[data-theme="light_red"] textarea {
    background: linear-gradient(180deg, #ffffff, #fbf7f5);
    border-color: #d9c7c1;
    color: #1f1714;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

html[data-theme="light_red"] .form-control::placeholder,
html[data-theme="light_red"] textarea::placeholder {
    color: #8a7c77;
    opacity: 1;
}

html[data-theme="light_red"] .form-control:focus,
html[data-theme="light_red"] .form-select:focus,
html[data-theme="light_red"] textarea:focus {
    background: #ffffff;
    border-color: #a61f2b;
    box-shadow: 0 0 0 3px rgba(166, 31, 43, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light_red"] .btn-primary {
    /* Las acciones principales mantienen la marca, sin mezclar el rojo de
       prioridad con el ámbar de advertencia. */
    background: #a61f2b;
    border-color: #8f1721;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(166, 31, 43, 0.16);
}

html[data-theme="light_red"] .btn-primary:hover,
html[data-theme="light_red"] .btn-primary:focus,
html[data-theme="light_red"] .btn-primary:active {
    background: #7f151f !important;
    border-color: var(--action-primary-dark) !important;
    color: #ffffff !important;
}

html[data-theme="light_red"] .btn-info {
    background: var(--bs-info) !important;
    border-color: var(--bs-info) !important;
    color: #ffffff !important;
    box-shadow: none;
}

html[data-theme="light_red"] .btn-info:hover,
html[data-theme="light_red"] .btn-info:focus,
html[data-theme="light_red"] .btn-info:active {
    background: var(--action-secondary-dark) !important;
    border-color: var(--action-secondary-dark) !important;
    color: #ffffff !important;
}

html[data-theme="light_red"] .btn-success {
    background: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
    color: #ffffff !important;
    box-shadow: none;
}

html[data-theme="light_red"] .btn-success:hover,
html[data-theme="light_red"] .btn-success:focus,
html[data-theme="light_red"] .btn-success:active {
    background: var(--bs-success-text-emphasis) !important;
    border-color: var(--bs-success-text-emphasis) !important;
    color: #ffffff !important;
}

html[data-theme="light_red"] .btn-warning {
    background: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
    color: #ffffff !important;
    box-shadow: none;
}

html[data-theme="light_red"] .btn-warning:hover,
html[data-theme="light_red"] .btn-warning:focus,
html[data-theme="light_red"] .btn-warning:active {
    background: var(--bs-warning-text-emphasis) !important;
    border-color: var(--bs-warning-text-emphasis) !important;
    color: #ffffff !important;
}

html[data-theme="light_red"] .btn-outline-light,
html[data-theme="light_red"] .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.86);
    border-color: #d7c2bc;
    color: #332622;
}

html[data-theme="light_red"] .btn-outline-light:hover,
html[data-theme="light_red"] .btn-outline-light:focus,
html[data-theme="light_red"] .btn-outline-light:active,
html[data-theme="light_red"] .btn-outline-secondary:hover,
html[data-theme="light_red"] .btn-outline-secondary:focus,
html[data-theme="light_red"] .btn-outline-secondary:active {
    background: #f2e7e4 !important;
    border-color: #b9958d !important;
    color: #191311 !important;
}

html[data-theme="light_red"] .btn-outline-info {
    color: var(--bs-info);
    border-color: var(--bs-info-border-subtle);
    background: var(--card-bg);
}

html[data-theme="light_red"] .btn-outline-info:hover,
html[data-theme="light_red"] .btn-outline-info:focus,
html[data-theme="light_red"] .btn-outline-info:active {
    color: #ffffff !important;
    background: var(--bs-info) !important;
    border-color: var(--bs-info) !important;
}

html[data-theme="light_red"] .bg-info,
html[data-theme="light_red"] .bg-info-subtle {
    background-color: var(--bs-info-bg-subtle) !important;
}

html[data-theme="light_red"] .text-info,
html[data-theme="light_red"] .text-info-emphasis {
    color: var(--bs-info-text-emphasis) !important;
}

html[data-theme="light_red"] .border-info,
html[data-theme="light_red"] .border-info-subtle {
    border-color: var(--bs-info-border-subtle) !important;
}

html[data-theme="light_red"] .badge.bg-info-subtle,
html[data-theme="light_red"] .badge.text-info,
html[data-theme="light_red"] .badge.border-info-subtle {
    background: var(--bs-info-bg-subtle) !important;
    border-color: var(--bs-info-border-subtle) !important;
    color: var(--bs-info-text-emphasis) !important;
}

html[data-theme="light_red"] .badge.bg-secondary-subtle,
html[data-theme="light_red"] .badge.border-secondary,
html[data-theme="light_red"] #layout-role-pill {
    background: linear-gradient(135deg, #fffefd, #e7edf2) !important;
    border-color: #7b8b96 !important;
    color: #26323a !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}

html[data-theme="light_red"] .badge-risk-low {
    background: rgba(8, 127, 91, 0.12);
    color: #075f46;
}

html[data-theme="light_red"] .badge-risk-medium {
    background: rgba(138, 90, 0, 0.13);
    color: #6f4700;
}

html[data-theme="light_red"] .badge-risk-high {
    background: rgba(180, 83, 9, 0.13);
    color: #8b3f07;
}

html[data-theme="light_red"] .badge-risk-critical,
html[data-theme="light_red"] .badge-status.escalada,
html[data-theme="light_red"] .badge-status.escalada-rrhh,
html[data-theme="light_red"] .badge-status.escalada_rrhh,
html[data-theme="light_red"] .badge-status.escalada-legal,
html[data-theme="light_red"] .badge-status.escalada_legal,
html[data-theme="light_red"] .badge-status.escalada-seguridad,
html[data-theme="light_red"] .badge-status.escalada_seguridad,
html[data-theme="light_red"] .badge-status.escalated,
html[data-theme="light_red"] .badge-status.critical {
    background: rgba(179, 38, 47, 0.12);
    color: #8f1721;
}

html[data-theme="light_red"] .badge-status.nueva,
html[data-theme="light_red"] .badge-status.new,
html[data-theme="light_red"] .badge-status.triage {
    background: rgba(15, 111, 143, 0.12);
    color: #0b5872;
}

html[data-theme="light_red"] .badge-status.en-revision,
html[data-theme="light_red"] .badge-status.en_revision,
html[data-theme="light_red"] .badge-status.en-investigacion,
html[data-theme="light_red"] .badge-status.en_investigacion,
html[data-theme="light_red"] .badge-status.review,
html[data-theme="light_red"] .badge-status.active {
    background: rgba(138, 90, 0, 0.13);
    color: #6f4700;
}

html[data-theme="light_red"] .badge-status.mitigada,
html[data-theme="light_red"] .badge-status.completed,
html[data-theme="light_red"] .badge-status.cerrada,
html[data-theme="light_red"] .badge-status.closed {
    background: rgba(8, 127, 91, 0.12);
    color: #075f46;
}

html[data-theme="light_red"] .badge-status.descartada,
html[data-theme="light_red"] .badge-status.dismissed,
html[data-theme="light_red"] .badge-status.falso-positivo,
html[data-theme="light_red"] .badge-status.falso_positivo,
html[data-theme="light_red"] .badge-status.false-positive {
    background: rgba(77, 69, 64, 0.12);
    color: #554a45;
}

html[data-theme="light_red"] .custom-toast {
    background: rgba(255, 255, 255, 0.96);
    color: #191311;
    border-color: #c7aaa3;
    box-shadow: 0 24px 60px rgba(42, 30, 26, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.75) inset;
}

html[data-theme="light_red"] .custom-toast.success {
    border-color: #0b8a62;
    box-shadow: 0 24px 60px rgba(8, 127, 91, 0.18);
}

html[data-theme="light_red"] .custom-toast.warning {
    border-color: #b45309;
    box-shadow: 0 24px 60px rgba(180, 83, 9, 0.18);
}

html[data-theme="light_red"] .custom-toast.danger {
    border-color: #b3262f;
    box-shadow: 0 24px 60px rgba(179, 38, 47, 0.20);
}

html[data-theme="light_red"] .custom-toast.info {
    border-color: #a61f2b;
    box-shadow: 0 24px 60px rgba(166, 31, 43, 0.16);
}

/* Settings shell */
.settings-side-nav {
    background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    max-height: calc(100vh - 8.75rem);
    overflow: auto;
    padding: .75rem;
    position: sticky;
    top: 5.75rem;
    max-width: 100%;
    width: 18rem;
    z-index: 5;
}

.settings-side-nav.settings-side-nav-pending {
    visibility: hidden;
}

.page-wrapper:has(> .settings-side-nav) {
    display: grid;
    gap: 1rem;
    grid-template-columns: 18rem minmax(0, 1fr);
}

.page-wrapper:has(> .settings-side-nav) > nav[aria-label="breadcrumb"] {
    grid-column: 1 / -1;
}

.page-wrapper:has(> .settings-side-nav) > .settings-side-nav {
    grid-column: 1;
    grid-row: 1 / span 30;
}

.page-wrapper:has(> .settings-side-nav):has(> nav[aria-label="breadcrumb"]) > .settings-side-nav {
    grid-row: 2 / span 30;
}

.page-wrapper:has(> .settings-side-nav) > :not(nav[aria-label="breadcrumb"]):not(.settings-side-nav) {
    grid-column: 2;
}

.settings-side-header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.settings-side-title {
    align-items: center;
    color: var(--text-primary);
    display: flex;
    font-size: 1.05rem;
    font-weight: 800;
    gap: .55rem;
}

.settings-side-close {
    align-items: center;
    border-radius: 999px;
    color: var(--text-muted);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    text-decoration: none;
    width: 2rem;
}

.settings-side-close:hover {
    background: var(--sidebar-link-hover-bg);
    color: var(--text-primary);
}

.settings-side-search {
    margin-bottom: .55rem;
}

.settings-side-search .input-group-text,
.settings-side-search .form-control {
    background: color-mix(in srgb, var(--bg-secondary) 86%, transparent);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

.settings-side-search .form-control::placeholder {
    color: var(--text-muted);
}

.settings-side-section {
    border-top: 1px solid var(--border-subtle);
    padding: .7rem 0 .15rem;
}

.settings-side-section:first-of-type {
    border-top: 0;
}

.settings-side-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: flex;
    justify-content: space-between;
    padding: 0 .45rem .25rem;
    text-align: left;
    width: 100%;
}

.settings-side-toggle i {
    color: var(--text-muted);
    font-size: .8rem;
    transition: transform .18s ease;
}

.settings-side-section.is-collapsed .settings-side-toggle i {
    transform: rotate(-90deg);
}

.settings-side-label {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    margin: 0;
    text-transform: uppercase;
}

.settings-side-links {
    display: grid;
    gap: .12rem;
}

.settings-side-section.is-collapsed .settings-side-links {
    display: none;
}

.settings-side-section.is-hidden {
    display: none;
}

.settings-side-link {
    align-items: center;
    border-radius: 8px;
    color: var(--text-secondary);
    display: flex;
    gap: .65rem;
    min-height: 2.35rem;
    padding: .45rem .55rem;
    text-decoration: none;
}

.settings-side-link i {
    color: var(--text-muted);
    flex: 0 0 1.2rem;
    font-size: 1rem;
    text-align: center;
}

.settings-side-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-side-link:hover,
.settings-side-link.active {
    background: var(--sidebar-link-hover-bg);
    color: var(--sidebar-link-active-color);
}

.settings-side-link:hover i,
.settings-side-link.active i {
    color: var(--sidebar-link-active-color);
}

@media (max-width: 1199.98px) {
    .page-wrapper:has(> .settings-side-nav) {
        display: block;
    }

    .settings-side-nav {
        margin-bottom: 1rem;
        max-height: none;
        position: relative;
        top: auto;
        width: 100%;
    }
}

.sentinel-activity-timeline {
    display: grid;
    gap: .75rem;
}

.sentinel-activity-stage {
    display: grid;
    gap: .75rem;
    grid-template-columns: 2rem minmax(0, 1fr);
}

.sentinel-activity-stage-icon {
    align-items: center;
    background: var(--sidebar-link-hover-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--sidebar-link-active-color);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.sentinel-activity-stage-body {
    background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    min-width: 0;
    padding: .75rem;
}

.sentinel-activity-raw {
    background: color-mix(in srgb, var(--bg-secondary) 86%, black);
    border: 1px solid var(--border-subtle);
    max-height: 24rem;
    overflow: auto;
    white-space: pre-wrap;
}

.sentinel-activity-tabs .btn {
    min-width: 7.4rem;
}

#sentinel-tab-activity-panel .card .h5 {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
/* ============================================ */


/* Tema claro-rojo: el modal de crear/editar usuario lleva utilidades bg-dark/text-light
   hardcodeadas (con !important de Bootstrap) que dejan los textos de los checkbox y
   campos ilegibles. Lo forzamos a superficie clara + texto oscuro para que se lea. */
html[data-theme="light_red"] #admin-user-modal .modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%) !important;
    color: #2b2b2b !important;
}
html[data-theme="light_red"] #admin-user-modal,
html[data-theme="light_red"] #admin-user-modal .modal-header,
html[data-theme="light_red"] #admin-user-modal .modal-footer,
html[data-theme="light_red"] #admin-user-modal label,
html[data-theme="light_red"] #admin-user-modal .form-label,
html[data-theme="light_red"] #admin-user-modal .form-check-label,
html[data-theme="light_red"] #admin-user-modal .text-light {
    color: #2b2b2b !important;
}
html[data-theme="light_red"] #admin-user-modal .text-muted { color: #6b6b6b !important; }
html[data-theme="light_red"] #admin-user-modal .form-control,
html[data-theme="light_red"] #admin-user-modal .form-select {
    background-color: #ffffff !important;
    color: #2b2b2b !important;
    border-color: rgba(196, 30, 58, 0.25) !important;
}
html[data-theme="light_red"] #admin-user-modal .form-control::placeholder { color: #9a9a9a !important; }
html[data-theme="light_red"] #admin-user-modal .border-secondary { border-color: rgba(196, 30, 58, 0.2) !important; }
html[data-theme="light_red"] #admin-user-modal .form-check-input {
    background-color: #ffffff !important;
    border-color: rgba(196, 30, 58, 0.45) !important;
}
html[data-theme="light_red"] #admin-user-modal .form-check-input:checked {
    background-color: #c41e3a !important;
    border-color: #c41e3a !important;
}
.brand-logo-symbol {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
}
