/* =========================================================================
   PRO-UI · Capa de rediseño visual profesional
   Sistema de Solicitudes · Fundación del Niño · Municipio Iribarren
   -------------------------------------------------------------------------
   CÓMO FUNCIONA (importante para mantenimientos futuros)
   Se carga DESPUÉS de styles.css, effects.css y del <style> inline de
   includes/header.php. Como la mayor parte del diseño real vive en estilos
   INLINE (que ganan por orden de aparición), esta capa gana el cascade por
   ESPECIFICIDAD, no por posición:

     · Tokens tema claro ..... html:root                            (0,1,1)  > :root (0,1,0)
     · Tokens tema oscuro .... html[data-theme="dark"]              (0,1,1)  > [data-theme="dark"] (0,1,0)
     · Componentes claro ..... body .componente                     (0,1,1)  > .componente (0,1,0)
     · Componentes oscuro .... html[data-theme="dark"] body .comp   (0,3,1)

   Por eso TODO selector de componente lleva el prefijo `body`, y todo color
   fijo tiene su variante bajo html[data-theme="dark"].

   VOCABULARIO CUBIERTO
   Se estiliza el vocabulario REALMENTE usado en el markup, que no coincide
   con el de styles.css: cada página declara sus propias clases en su <style>.
     - Chrome del layout: .top-header .sidebar .menu-* .user-dropdown-menu
     - KPIs:      .stat-card-new(+.pendiente/.proceso/.aprobada/.rechazada/
                  .completada/.seguimiento/.reclamo), .stat-card-pink
                  (+.total/.urgentes/.proximas/.hoy), .stat-box(+mods)
     - Paneles:   .content-card-new .card-header-new .card-body-new
                  .form-card* .result-card-new .filter-card-new .grafico-card
                  .content-card .profile-card .benef-card .dato-card
                  .user-card .main-card .register-card .nota-card
     - Tablas:    .table .table-container .tabla-wrapper .tabla-solicitudes
                  .tabla-embarazadas .tabla-usuarios .tabla-solicitantes
     - Botones:   .btn(+variantes) .btn-action(+variantes) .btn-save .btn-cancel
                  .btn-print-new .btn-toggle-todos .btn-barra .btn-orden
     - Formularios: .form-control .form-select .form-control-simple
                  .form-control-new .form-label-new .form-label-simple
     - Estados:   .badge .estado-badge .estado-badge-new .prioridad-badge
                  .badge-rol-new .badge-estado-new .semanas-badge
                  .advertencia-parto .timeline-tag .menu-badge
     - Modales:   .modal-* (Bootstrap) .modal-eliminar-* .modal-reclamo-*
                  .modal-header-pink .confirm-*
     - Otros:     .filtro-tab .page-hero .hero-* .timeline-* .paginacion*
                  .empty-state* .aviso-* .detail-* .detalle-* .toast-*
                  .rol-selector .rol-option .permiso-* .dato-* .section-*

   REGLA DE ORO DE ESTA CAPA
   Solo se tocan propiedades COSMÉTICAS: color, fondo, borde, sombra, radio,
   tipografía, interlineado y transición. NO se toca display, position,
   z-index, overflow, ancho/alto, padding ni margin de las clases cuyo valor
   original no se conoce, para no alterar densidad de tablas ni ningún layout.
   No se renombra ni se elimina ninguna clase, id, form, acción AJAX ni
   permiso. Ninguna funcionalidad depende de estas propiedades.
   ========================================================================= */


/* =========================================================================
   1 · TOKENS · PALETA RENOVADA (TEMA CLARO)
   Se pasa del turquesa "candy" (#14b8a6) a un VERDE AZULADO PROFUNDO tipo
   petróleo institucional, y del fondo menta al neutro pizarra.
   Se conservan los NOMBRES originales de las variables para que TODO el
   sistema adopte la paleta, incluidas las páginas con <style> propio.
   ========================================================================= */
html:root {
    /* Marca: rampa petróleo (reemplaza la escala turquesa) */
    --turquoise-50:  #f1faf9;
    --turquoise-100: #d7f0ee;
    --turquoise-200: #aee2df;
    --turquoise-300: #7ccdc8;
    --turquoise-400: #45b2ac;
    --turquoise-500: #219891;
    --turquoise-600: #157d78;
    --turquoise-700: #10635f;
    --turquoise-800: #104f4c;
    --turquoise-900: #0f403e;
    --turquoise-950: #062a29;

    /* Acento rosa (módulo Embarazadas): rosa más sobrio */
    --pink-50:  #fdf3f7;
    --pink-100: #fbe4ee;
    --pink-200: #f7c9dd;
    --pink-300: #efa1c4;
    --pink-400: #e0709f;
    --pink-500: #cc4b80;
    --pink-600: #b03468;
    --pink-700: #8f2753;
    --pink-800: #742045;
    --pink-900: #5c1a37;

    --accent-coral:   #e8687a;
    --accent-amber:   #d9822b;
    --accent-emerald: #17916b;
    --accent-rose:    #cf3f56;
    --accent-sky:     #2b7fb8;
    --accent-violet:  #6d5bc4;

    --state-pending:   #d9822b;
    --state-process:   #1a8fa8;
    --state-approved:  #17916b;
    --state-rejected:  #c2413a;
    --state-completed: #157d78;

    /* Neutros: escala pizarra con matiz frío, más institucional */
    --text-primary:    #0e1a1c;
    --text-secondary:  #41545a;
    --text-tertiary:   #64777d;
    --text-quaternary: #94a6ab;
    --text-muted:      #c3d0d4;

    --border-light:   #eef2f3;
    --border-default: #dfe6e8;
    --border-medium:  #c6d2d5;

    --border-turquoise:        rgba(16, 99, 95, 0.14);
    --border-turquoise-strong: rgba(16, 99, 95, 0.28);
    --border-pink:             rgba(176, 52, 104, 0.15);
    --border-pink-strong:      rgba(176, 52, 104, 0.30);

    /* Superficies: el lienzo deja de ser menta y pasa a pizarra clara */
    --white:             #ffffff;
    --white-soft:        #fbfdfd;
    --white-warm:        #fdfdfd;
    --bg-white:          #ffffff;
    --bg-white-soft:     #f7fafa;
    --bg-turquoise-soft: #f4f7f8;

    /* Alias que usa el <style> inline de includes/header.php */
    --text-dark:   #0e1a1c;
    --text-medium: #41545a;
    --text-light:  #94a6ab;

    /* Sombras multicapa de baja opacidad = acabado premium */
    --shadow-xs: 0 1px 2px rgba(14, 26, 28, 0.04);
    --shadow-sm: 0 1px 3px rgba(14, 26, 28, 0.05), 0 1px 2px rgba(14, 26, 28, 0.03);
    --shadow-md: 0 4px 12px rgba(14, 26, 28, 0.06), 0 2px 4px rgba(14, 26, 28, 0.03);
    --shadow-lg: 0 12px 28px rgba(14, 26, 28, 0.08), 0 4px 8px rgba(14, 26, 28, 0.04);
    --shadow-xl: 0 24px 48px rgba(14, 26, 28, 0.10), 0 8px 16px rgba(14, 26, 28, 0.05);

    --shadow-turquoise-sm: 0 4px 12px rgba(16, 99, 95, 0.10);
    --shadow-turquoise-md: 0 8px 24px rgba(16, 99, 95, 0.14);
    --shadow-turquoise-lg: 0 16px 40px rgba(16, 99, 95, 0.18);

    --shadow-pink-sm: 0 4px 12px rgba(176, 52, 104, 0.10);
    --shadow-pink-md: 0 8px 24px rgba(176, 52, 104, 0.14);
    --shadow-pink-lg: 0 16px 40px rgba(176, 52, 104, 0.18);

    --gradient-turquoise:       linear-gradient(135deg, #10635f, #157d78);
    --gradient-turquoise-light: linear-gradient(135deg, #157d78, #219891);
    --gradient-turquoise-soft:  linear-gradient(135deg, #f1faf9, #d7f0ee);
    --gradient-pink:            linear-gradient(135deg, #b03468, #cc4b80);
    --gradient-pink-light:      linear-gradient(135deg, #cc4b80, #e0709f);
    --gradient-pink-soft:       linear-gradient(135deg, #fdf3f7, #fbe4ee);
    --gradient-hero:            linear-gradient(135deg, #062a29 0%, #10635f 55%, #157d78 100%);
    --gradient-hero-pink:       linear-gradient(135deg, #5c1a37 0%, #b03468 55%, #cc4b80 100%);

    /* Radios algo más contenidos = menos "juguetón" */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-2xl: 20px;

    /* Tokens propios de esta capa */
    --pro-surface:   #ffffff;
    --pro-surface-2: #f7fafa;
    --pro-ring:      0 0 0 3px rgba(33, 152, 145, 0.18);
    --pro-header-grad:  linear-gradient(135deg, #062a29 0%, #0f403e 35%, #10635f 70%, #157d78 100%);
    --pro-sidebar-grad: linear-gradient(180deg, #ffffff 0%, #f7fafa 45%, #eef6f5 100%);
}


/* =========================================================================
   2 · TOKENS · TEMA OSCURO
   Se replican las INVERSIONES que ya hacía effects.css (la escala turquesa
   se da vuelta: 50 = superficie oscura, 950 = casi blanco), con la paleta
   nueva. Sin este bloque el tema nocturno se rompería.
   ========================================================================= */
html[data-theme="dark"] {
    --turquoise-50:  #062a29;
    --turquoise-100: #0f403e;
    --turquoise-200: #104f4c;
    --turquoise-300: #10635f;
    --turquoise-400: #157d78;
    --turquoise-500: #45b2ac;
    --turquoise-600: #7ccdc8;
    --turquoise-700: #aee2df;
    --turquoise-800: #d7f0ee;
    --turquoise-900: #f1faf9;
    --turquoise-950: #ffffff;

    --pink-50:  #3a1126;
    --pink-100: #5c1a37;
    --pink-200: #742045;
    --pink-300: #8f2753;
    --pink-400: #b03468;
    --pink-500: #e0709f;
    --pink-600: #efa1c4;
    --pink-700: #f7c9dd;
    --pink-800: #fbe4ee;
    --pink-900: #fdf3f7;

    --text-primary:    #e8f0f1;
    --text-secondary:  #b9c8cb;
    --text-tertiary:   #8fa2a6;
    --text-quaternary: #6b7e83;
    --text-muted:      #4a5b60;

    --border-light:   #1b292c;
    --border-default: #26363a;
    --border-medium:  #35474b;

    --border-turquoise:        rgba(69, 178, 172, 0.22);
    --border-turquoise-strong: rgba(69, 178, 172, 0.40);
    --border-pink:             rgba(224, 112, 159, 0.22);
    --border-pink-strong:      rgba(224, 112, 159, 0.40);

    --white:             #101b1e;
    --white-soft:        #162326;
    --white-warm:        #101b1e;
    --bg-white:          #101b1e;
    --bg-white-soft:     #162326;
    --bg-turquoise-soft: #0a1416;

    --text-dark:   #e8f0f1;
    --text-medium: #b9c8cb;
    --text-light:  #8fa2a6;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40), 0 2px 4px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45), 0 4px 8px rgba(0, 0, 0, 0.30);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.55), 0 8px 16px rgba(0, 0, 0, 0.35);

    --shadow-turquoise-sm: 0 4px 12px rgba(69, 178, 172, 0.12);
    --shadow-turquoise-md: 0 8px 24px rgba(69, 178, 172, 0.16);
    --shadow-turquoise-lg: 0 16px 40px rgba(69, 178, 172, 0.20);

    --shadow-pink-sm: 0 4px 12px rgba(224, 112, 159, 0.12);
    --shadow-pink-md: 0 8px 24px rgba(224, 112, 159, 0.16);
    --shadow-pink-lg: 0 16px 40px rgba(224, 112, 159, 0.20);

    /* Los gradientes no tenían variante oscura: se definen aquí para que
       ninguna superficie clara se cuele en modo nocturno. */
    --gradient-turquoise:       linear-gradient(135deg, #10635f, #157d78);
    --gradient-turquoise-light: linear-gradient(135deg, #157d78, #219891);
    --gradient-turquoise-soft:  linear-gradient(135deg, #162326, #101b1e);
    --gradient-pink:            linear-gradient(135deg, #742045, #b03468);
    --gradient-pink-light:      linear-gradient(135deg, #b03468, #cc4b80);
    --gradient-pink-soft:       linear-gradient(135deg, #3a1126, #2a0d1c);
    --gradient-hero:            linear-gradient(135deg, #04191a 0%, #0f403e 55%, #10635f 100%);
    --gradient-hero-pink:       linear-gradient(135deg, #3a1126 0%, #742045 55%, #8f2753 100%);

    --pro-surface:   #101b1e;
    --pro-surface-2: #162326;
    --pro-ring:      0 0 0 3px rgba(69, 178, 172, 0.25);
    --pro-header-grad:  linear-gradient(135deg, #04191a 0%, #0a2b2b 35%, #0f403e 70%, #10635f 100%);
    --pro-sidebar-grad: linear-gradient(180deg, #101b1e 0%, #0d181b 45%, #0a1416 100%);

    color-scheme: dark;
}


/* =========================================================================
   3 · CORRECCIÓN DE UN FALLO EXISTENTE (aditivo, no quita nada)
   effects.css anima .page-loader .loader-content con `fadeInUp`, pero ese
   @keyframes no está definido en ningún .css global: solo existe dentro de
   login.php, que es un documento aparte. La animación nunca se ejecutaba.
   ========================================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes proFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* =========================================================================
   4 · BASE Y TIPOGRAFÍA
   ========================================================================= */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
}

/* IMPORTANTE · NO se fuerza `color` en h1-h6, p, small ni a.
   Hay encabezados, párrafos y enlaces sobre fondos oscuros (heroes, cabeceras
   con degradado, botones-enlace de la landing) cuyo color lo fija cada página.
   Forzarlo desde aquí con especificidad (0,1,1) volvería ese texto ilegible en
   las páginas cuyo detalle no se ha revisado una por una. El color se hereda o
   lo definen los tokens de arriba y las reglas de componente de más abajo. */
body h1, body h2, body h3, body h4, body h5, body h6 {
    letter-spacing: -0.018em;
}
body h1 { font-weight: 800; letter-spacing: -0.028em; }
body h2 { font-weight: 700; letter-spacing: -0.024em; }
body h3 { font-weight: 700; letter-spacing: -0.020em; }
body h4, body h5, body h6 { font-weight: 600; }

/* Guardas de contraste: texto dentro de contenedores con degradado oscuro. */
body .page-hero h1, body .page-hero h2, body .page-hero h3, body .page-hero p,
body .dashboard-hero h1, body .dashboard-hero h2, body .dashboard-hero h3, body .dashboard-hero p,
body .detail-hero h1, body .detail-hero h2, body .detail-hero h3, body .detail-hero p,
body .page-hero-pink h1, body .page-hero-pink h2, body .page-hero-pink h3, body .page-hero-pink p {
    color: #ffffff;
}

body a { text-underline-offset: 3px; }
body hr { border: 0; border-top: 1px solid var(--border-default); opacity: 1; }
body ::selection { background: var(--turquoise-200); color: var(--turquoise-950); }

body code, body kbd, body samp {
    font-family: var(--font-mono);
    background: var(--pro-surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--turquoise-800);
}

/* Anillo de foco solo para teclado. Se excluyen los controles que ya
   tienen su propio box-shadow de foco, para no duplicar el indicador. */
body :focus-visible { outline: 2px solid var(--turquoise-500); outline-offset: 2px; }
body .form-control:focus-visible,
body .form-select:focus-visible,
body .form-check-input:focus-visible,
body .btn:focus-visible,
body .menu-item:focus-visible,
body .btn-action:focus-visible { outline: none; }

body .text-muted { color: var(--text-tertiary); }


/* =========================================================================
   5 · CABECERA (top-header)
   Su degradado y colores eran HEX literales dentro de header.php: no bastaba
   con cambiar los tokens.
   ========================================================================= */
body .top-header {
    background: var(--pro-header-grad);
    box-shadow:
        0 12px 32px rgba(4, 25, 26, 0.22),
        0 3px 10px rgba(16, 99, 95, 0.18),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body .top-header .brand .brand-text .brand-title { font-weight: 800; letter-spacing: -0.02em; }
body .top-header .brand .brand-text .brand-sub { letter-spacing: 2.2px; color: var(--turquoise-200); }

body .top-header .btn-toggle,
body .top-header .icon-btn {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.22s ease, border-color 0.22s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.22s ease;
}

body .top-header .btn-toggle:hover,
body .top-header .icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(174, 226, 223, 0.45);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

body .top-header .user-info {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-full);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body .top-header .user-info:hover,
body .top-header .user-info.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(174, 226, 223, 0.45);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
body .top-header .user-info .avatar {
    background: linear-gradient(135deg, #ffffff, #d7f0ee);
    color: var(--turquoise-700);
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-weight: 800;
}
body .top-header .user-info .user-details .user-rol { color: var(--turquoise-200); letter-spacing: 0.6px; }
body .top-header .user-info .chevron { color: var(--turquoise-200); }


/* =========================================================================
   6 · SIDEBAR
   Igual: fondo con HEX literales en header.php.
   NO se toca ancho, posición, z-index ni los estados funcionales
   (.collapsed / .mobile-open / .active / data-tooltip siguen intactos).
   ========================================================================= */
body .sidebar {
    background: var(--pro-sidebar-grad);
    border-right: 1px solid var(--border-default);
    box-shadow: 4px 0 16px rgba(14, 26, 28, 0.04), 8px 0 32px rgba(14, 26, 28, 0.02);
}

body .sidebar .menu-section .section-title {
    color: var(--turquoise-700);
    letter-spacing: 2.2px;
    font-weight: 800;
    opacity: 0.95;
}
body .sidebar .menu-section .section-divider {
    background: linear-gradient(90deg, var(--border-default) 0%, rgba(223, 230, 232, 0.1) 100%);
}

body .sidebar .menu-item {
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition: background-color 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
body .sidebar .menu-item .menu-icon-wrapper {
    background: var(--pro-surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}
body .sidebar .menu-item .menu-icon { color: var(--turquoise-600); }

body .sidebar .menu-item:hover {
    color: var(--turquoise-800);
    background: var(--turquoise-50);
    border-color: var(--border-turquoise);
    box-shadow: 0 4px 14px rgba(14, 26, 28, 0.06);
    transform: translateX(3px);
}
body .sidebar .menu-item:hover .menu-icon-wrapper {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600));
    border-color: transparent;
    box-shadow: 0 5px 14px rgba(16, 99, 95, 0.22);
}
body .sidebar .menu-item:hover .menu-icon { color: #ffffff; }

body .sidebar .menu-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600));
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(16, 99, 95, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
body .sidebar .menu-item.active .menu-icon-wrapper { background: rgba(255, 255, 255, 0.20); border-color: transparent; }
body .sidebar .menu-item.active .menu-icon { color: #ffffff; }

body .sidebar .menu-item .menu-badge {
    background: var(--turquoise-100);
    color: var(--turquoise-800);
    border: 1px solid var(--border-turquoise);
    border-radius: var(--radius-full);
    font-weight: 800;
}
body .sidebar .menu-item.active .menu-badge { background: #ffffff; color: var(--turquoise-700); border-color: transparent; }
body .sidebar .menu-item .menu-badge.primary { background: var(--turquoise-100); color: var(--turquoise-800); }
body .sidebar .menu-item .menu-badge.success { background: #e7f6ef; color: #0f6042; }
body .sidebar .menu-item .menu-badge.warning { background: #fdf3e7; color: #8a5316; }

/* Variante rosa (Embarazadas) */
body .sidebar .menu-item.menu-pink .menu-icon-wrapper { background: var(--pink-50); border-color: var(--border-pink); }
body .sidebar .menu-item.menu-pink .menu-icon { color: var(--pink-600); }
body .sidebar .menu-item.menu-pink:hover { background: var(--pink-50); color: var(--pink-800); border-color: var(--border-pink-strong); }
body .sidebar .menu-item.menu-pink:hover .menu-icon-wrapper {
    background: linear-gradient(135deg, var(--pink-600), var(--pink-500));
    box-shadow: 0 5px 14px rgba(176, 52, 104, 0.22);
}
body .sidebar .menu-item.menu-pink.active {
    background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
    box-shadow: 0 8px 20px rgba(176, 52, 104, 0.28);
}
body .sidebar .menu-item.menu-pink .menu-badge {
    background: linear-gradient(135deg, var(--pink-600), var(--pink-500));
    color: #ffffff;
    border-color: transparent;
}

/* Variante admin (rojo) */
body .sidebar .menu-item.menu-admin .menu-icon-wrapper { background: #fdf1f0; border-color: rgba(194, 65, 58, 0.16); }
body .sidebar .menu-item.menu-admin .menu-icon { color: #c2413a; }
body .sidebar .menu-item.menu-admin:hover { background: #fdf1f0; color: #8f2b26; border-color: rgba(194, 65, 58, 0.3); }
body .sidebar .menu-item.menu-admin:hover .menu-icon-wrapper {
    background: linear-gradient(135deg, #a8322c, #c2413a);
    box-shadow: 0 5px 14px rgba(194, 65, 58, 0.22);
}
body .sidebar .menu-item.menu-admin.active {
    background: linear-gradient(135deg, #a8322c, #c2413a);
    box-shadow: 0 8px 20px rgba(194, 65, 58, 0.28);
}
body .sidebar .menu-item.menu-admin .menu-badge {
    background: linear-gradient(135deg, #a8322c, #c2413a);
    color: #ffffff;
    border-color: transparent;
}

body .sidebar::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
body .sidebar::-webkit-scrollbar-thumb:hover { background: var(--turquoise-300); }

/* Tooltip del sidebar colapsado (data-tooltip, solo color) */
body .sidebar.collapsed .menu-item::after { background: var(--turquoise-950); border-radius: var(--radius-md); }
body .sidebar.collapsed .menu-item::before { border-color: transparent var(--turquoise-950) transparent transparent; }

/* Dropdown de usuario de la cabecera */
body .user-dropdown-menu {
    background: var(--pro-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}
body .user-dropdown-menu .user-header { border-bottom: 1px solid var(--border-light); }
body .user-dropdown-menu .user-header .info strong { color: var(--text-primary); }
body .user-dropdown-menu .user-header .info small { color: var(--text-tertiary); }
body .user-dropdown-menu .user-header .avatar-large {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-500));
    border: 2px solid var(--pro-surface);
    box-shadow: var(--shadow-turquoise-sm);
}
body .user-dropdown-menu .dropdown-item-custom { border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 600; }
body .user-dropdown-menu .dropdown-item-custom i { color: var(--turquoise-600); }
body .user-dropdown-menu .dropdown-item-custom:hover { background: var(--turquoise-50); color: var(--turquoise-800); }
body .user-dropdown-menu .dropdown-item-custom.menu-pink i { color: var(--pink-600); }
body .user-dropdown-menu .dropdown-item-custom.menu-pink:hover { background: var(--pink-50); color: var(--pink-800); }
body .user-dropdown-menu .dropdown-item-custom.text-danger i { color: var(--state-rejected); }
body .user-dropdown-menu .dropdown-item-custom.text-danger:hover { background: #fdf1f0; color: #8f2b26; }
body .user-dropdown-menu .dropdown-divider-custom { border-top: 1px solid var(--border-light); }

/* Pie de página.
   ACOTADO a `body .main-content ~ .footer` a propósito: el <footer> de
   includes/footer.php es hermano de <main class="main-content">. Sin acotar,
   esta regla alcanzaría pies de página ajenos con degradado oscuro y texto
   blanco —por ejemplo verificar.php— y los dejaría ilegibles (texto blanco
   sobre fondo blanco). No ampliar este selector sin revisar esas páginas. */
body .main-content ~ .footer { border-top: 1px solid var(--border-default) !important; }
body .main-content ~ .footer small { color: var(--text-tertiary); }


/* =========================================================================
   7 · CONTENEDORES Y PANELES
   Vocabulario real de las páginas: .content-card-new, .card-header-new,
   .card-body-new, .form-card*, .result-card-new, .grafico-card, etc.
   Solo superficie, borde, radio, sombra y color (sin padding ni tamaño).
   ========================================================================= */
body .main-content { background: var(--bg-turquoise-soft); }

body .content-card-new,
body .result-card-new,
body .filter-card-new,
body .grafico-card,
body .form-card,
body .content-card,
body .profile-card,
body .benef-card,
body .nota-card,
body .dato-card,
body .user-card,
body .main-card,
body .search-card,
body .tabla-wrapper,
body .solicitante-hist-card,
body .card {
    background: var(--pro-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

body .content-card-new,
body .result-card-new,
body .grafico-card,
body .form-card,
body .dato-card,
body .benef-card { overflow: hidden; }

body .card-header-new,
body .form-card-header,
body .grafico-card-header,
body .content-card .card-header {
    background: var(--pro-surface);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-primary);
    font-weight: 700;
}
body .card-header-new .header-title,
body .header-title { color: var(--text-primary); font-weight: 700; letter-spacing: -0.01em; }
body .card-header-new .title-icon,
body .title-icon { color: var(--turquoise-600); }
body .card-body-new,
body .form-card-body,
body .grafico-card-body { color: var(--text-secondary); }

body .card-body { padding: 24px; }
body .card-footer { background: var(--pro-surface-2); border-top: 1px solid var(--border-default); }

/* Encabezado de gráficos: variante rosa (módulo materno) */
body .grafico-card.pink .grafico-card-header,
body .grafico-card.pink { border-color: var(--border-pink); }
body .grafico-card.pink .grafico-card-header { color: var(--pink-800); }

/* Nota / anotación dentro de una ficha */
body .nota-card { background: var(--pro-surface-2); border-left: 3px solid var(--turquoise-500); }
body .nota-icon { color: var(--turquoise-600); }

/* Tarjetas de perfil y beneficiario */
body .profile-avatar,
body .benef-card-avatar,
body .benef-avatar {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-500));
    color: #ffffff;
    border-radius: var(--radius-full);
}
body .profile-name,
body .benef-card-name,
body .benef-name { color: var(--text-primary); font-weight: 700; }
body .profile-meta,
body .benef-card-sub { color: var(--text-tertiary); }
body .meta-item .info-label,
body .benef-info-item .info-label,
body .info-label { color: var(--text-tertiary); font-weight: 600; }
body .meta-item .info-value,
body .benef-info-item .info-value,
body .info-value { color: var(--text-primary); }

/* Avisos suaves (editar_solicitud, solicitante_detalle, solicitudes) */
body .aviso-sutil,
body .aviso-neutral {
    background: var(--turquoise-50);
    border: 1px solid var(--border-turquoise);
    border-left: 3px solid var(--turquoise-500);
    border-radius: var(--radius-lg);
    color: var(--turquoise-800);
}
body .aviso-sutil .aviso-icon { color: var(--turquoise-600); }
body .aviso-sutil .aviso-title { color: var(--turquoise-900); font-weight: 700; }
body .aviso-sutil .aviso-text { color: var(--text-secondary); }
body .aviso-sutil .aviso-link { color: var(--turquoise-600); font-weight: 600; }
body .aviso-cedula-solicitante,
body .aviso-cedula-fija { color: var(--text-primary); font-weight: 700; }
body .aviso-foraneo { background: #fdf3e7; border-color: #f3ddc0; border-left-color: var(--state-pending); color: #8a5316; }
body .aviso-sync { background: #e8f5f8; border-color: #c9e6ec; border-left-color: var(--state-process); color: #12606f; }

/* Secciones internas de las fichas */
body .detail-section-title,
body .detalle-section-title,
body .section-title {
    color: var(--turquoise-800);
    font-weight: 700;
    letter-spacing: -0.01em;
}
body .section-divider { background: linear-gradient(90deg, var(--border-default), rgba(223, 230, 232, 0.05)); }
body .section-block { border-top: 1px solid var(--border-light); }
body .detalle-section { border-top: 1px solid var(--border-light); }
body .detalle-dato .dato-label,
body .detalle-dato label { color: var(--text-tertiary); font-weight: 600; }
body .detalle-dato .dato-value { color: var(--text-primary); }
body .dato-label { color: var(--text-tertiary); font-weight: 600; }
body .dato-value { color: var(--text-primary); }
body .dato-item, body .dato-row { border-bottom: 1px solid var(--border-light); }
body .mono { font-family: var(--font-mono); color: var(--turquoise-700); }

/* Pasos de formulario (alta de solicitud) */
body .form-step-number {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-500));
    color: #ffffff;
    border-radius: var(--radius-full);
    font-weight: 800;
}
body .form-step-title { color: var(--text-primary); font-weight: 700; }
body .form-step-content { color: var(--text-secondary); }


/* =========================================================================
   8 · TARJETAS KPI
   Rediseño deliberado: se abandona el bloque de color saturado y se pasa a
   superficie clara con acento de color, número en tinta y etiqueta legible.
   Se fijan SIEMPRE fondo y color juntos para garantizar contraste.
   ========================================================================= */
body .stat-card-new,
body .stat-card-pink,
body .stat-box {
    background: var(--pro-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

body .stat-card-new .stat-number-big,
body .stat-card-pink .stat-number-big,
body .stat-box .numero {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.03em;
}
body .stat-card-new .stat-label-new,
body .stat-card-pink .stat-label-new,
body .stat-box .label {
    color: var(--text-tertiary);
    font-weight: 600;
}
body .stat-card-new .stat-trend,
body .stat-card-pink .stat-trend {
    background: #e7f6ef;
    color: #0f6042;
    border-radius: var(--radius-full);
    font-weight: 700;
}
body .stat-card-new .stat-trend.negative,
body .stat-card-pink .stat-trend.negative { background: #fdf1f0; color: #8f2b26; }

/* Acento por estado: barra superior + círculo de icono */
body .stat-card-new { border-top: 3px solid var(--turquoise-600); }
body .stat-card-new.pendiente  { border-top-color: var(--state-pending); }
body .stat-card-new.proceso    { border-top-color: var(--state-process); }
body .stat-card-new.aprobada   { border-top-color: var(--state-approved); }
body .stat-card-new.rechazada  { border-top-color: var(--state-rejected); }
body .stat-card-new.completada { border-top-color: var(--state-completed); }
body .stat-card-new.seguimiento{ border-top-color: var(--accent-violet); }
body .stat-card-new.reclamo    { border-top-color: var(--accent-coral); }

body .stat-card-new .stat-icon-circle { background: var(--turquoise-50); color: var(--turquoise-600); border-radius: var(--radius-full); }
body .stat-card-new.pendiente  .stat-icon-circle { background: #fdf3e7; color: #8a5316; }
body .stat-card-new.proceso    .stat-icon-circle { background: #e8f5f8; color: #12606f; }
body .stat-card-new.aprobada   .stat-icon-circle { background: #e7f6ef; color: #0f6042; }
body .stat-card-new.rechazada  .stat-icon-circle { background: #fdf1f0; color: #8f2b26; }
body .stat-card-new.completada .stat-icon-circle { background: var(--turquoise-50); color: var(--turquoise-700); }
body .stat-card-new.seguimiento .stat-icon-circle { background: #efedfb; color: #4b3fa0; }
body .stat-card-new.reclamo    .stat-icon-circle { background: #fdeef0; color: #a5303f; }

/* KPIs del módulo Embarazadas (acento rosa) */
body .stat-card-pink { border-top: 3px solid var(--pink-500); }
body .stat-card-pink .stat-icon-circle { background: var(--pink-50); color: var(--pink-600); border-radius: var(--radius-full); }
body .stat-card-pink .stat-number-big { color: var(--pink-700); }
body .stat-card-pink.urgentes { border-top-color: var(--state-rejected); }
body .stat-card-pink.urgentes .stat-icon-circle { background: #fdf1f0; color: #8f2b26; }
body .stat-card-pink.urgentes .stat-number-big { color: #8f2b26; }
body .stat-card-pink.proximas { border-top-color: var(--state-pending); }
body .stat-card-pink.proximas .stat-icon-circle { background: #fdf3e7; color: #8a5316; }
body .stat-card-pink.hoy { border-top-color: var(--state-process); }
body .stat-card-pink.hoy .stat-icon-circle { background: #e8f5f8; color: #12606f; }

/* Variantes de .stat-box (fichas de solicitante / actividad) */
body .stat-box.primary { border-top: 3px solid var(--turquoise-600); }
body .stat-box.purple  { border-top: 3px solid var(--accent-violet); }
body .stat-box.success { border-top: 3px solid var(--state-approved); }
body .stat-box.warning { border-top: 3px solid var(--state-pending); }
body .stat-box.info    { border-top: 3px solid var(--state-process); }
body .stat-box.danger  { border-top: 3px solid var(--state-rejected); }
body .stat-box.primary .numero { color: var(--turquoise-700); }
body .stat-box.purple  .numero { color: #4b3fa0; }
body .stat-box.success .numero { color: #0f6042; }
body .stat-box.warning .numero { color: #8a5316; }
body .stat-box.info    .numero { color: #12606f; }
body .stat-box.danger  .numero { color: #8f2b26; }

/* KPIs pequeños con barra inferior (styles.css) */
body .stat-mini-pink {
    background: var(--pro-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
body .stat-mini-pink::before { background: linear-gradient(90deg, var(--pink-600), var(--pink-400)); }
body .stat-mini-pink:hover { border-color: var(--border-pink-strong); transform: translateY(-3px); box-shadow: var(--shadow-pink-md); }
body .stat-mini-pink .num { color: var(--pink-600); font-weight: 800; }
body .stat-mini-pink .lbl { color: var(--pink-700); }
body .stat-mini-pink.urgente .num { color: var(--state-rejected); }
body .stat-mini-pink.urgente .lbl { color: #8f2b26; }


/* =========================================================================
   9 · TABLAS
   Solo cabecera, bordes y hover. NO se toca el tamaño de fuente ni el
   padding de las tablas densas: su densidad la controla cada página y
   alterarla podría descuadrar columnas y romper la lectura de acciones.
   ========================================================================= */
body .table-container { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }

body .table thead th,
body .tabla-solicitudes thead th,
body .tabla-embarazadas thead th,
body .tabla-usuarios thead th,
body .tabla-solicitantes thead th {
    background: var(--pro-surface-2);
    color: var(--turquoise-800);
    border-bottom: 1px solid var(--border-default);
}

body .table tbody td,
body .tabla-solicitudes tbody td,
body .tabla-embarazadas tbody td,
body .tabla-usuarios tbody td,
body .tabla-solicitantes tbody td {
    border-bottom: 1px solid var(--border-light);
}

body .table tbody tr:hover,
body .tabla-solicitudes tbody tr:hover,
body .tabla-embarazadas tbody tr:hover,
body .tabla-usuarios tbody tr:hover,
body .tabla-solicitantes tbody tr:hover { background: var(--turquoise-50); }

body .table tbody tr:last-child td { border-bottom: none; }
body .table-striped tbody tr:nth-child(odd) { background: var(--pro-surface-2); }

body .tabla-solicitudes tbody tr.selected {
    background: var(--turquoise-100);
    border-left: 3px solid var(--turquoise-600);
}
body .tabla-embarazadas tbody tr.urgente { background: #fdf1f0; }
body .tabla-solicitudes .numero-sol { color: var(--turquoise-700); }
body .tabla-solicitudes .numero-sol::before { background: var(--turquoise-500); }
body .tabla-solicitudes .text-center { color: inherit; }


/* =========================================================================
   10 · BOTONES
   ========================================================================= */
body .btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background-color 0.22s ease, border-color 0.22s ease,
                box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
body .btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
body .btn:disabled { box-shadow: none; transform: none; }

body .btn-primary { background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600)); border-color: transparent; color: #ffffff; box-shadow: 0 4px 14px rgba(16, 99, 95, 0.22); }
body .btn-primary:hover { background: linear-gradient(135deg, var(--turquoise-800), var(--turquoise-700)); border-color: transparent; color: #ffffff; box-shadow: 0 8px 22px rgba(16, 99, 95, 0.28); }

body .btn-pink { background: linear-gradient(135deg, var(--pink-700), var(--pink-500)); border-color: transparent; color: #ffffff; box-shadow: 0 4px 14px rgba(176, 52, 104, 0.22); }
body .btn-pink:hover { background: linear-gradient(135deg, var(--pink-800), var(--pink-600)); border-color: transparent; color: #ffffff; }

body .btn-success { background: var(--state-approved); border-color: transparent; color: #ffffff; }
body .btn-success:hover { background: #12734f; border-color: transparent; color: #ffffff; }
body .btn-warning { background: var(--state-pending); border-color: transparent; color: #ffffff; }
body .btn-warning:hover { background: #b96c1f; border-color: transparent; color: #ffffff; }
body .btn-danger { background: var(--state-rejected); border-color: transparent; color: #ffffff; }
body .btn-danger:hover { background: #9d332d; border-color: transparent; color: #ffffff; }
body .btn-info { background: var(--state-process); border-color: transparent; color: #ffffff; }
body .btn-info:hover { background: #14748a; border-color: transparent; color: #ffffff; }

body .btn-secondary { background: var(--pro-surface); border: 1px solid var(--border-medium); color: var(--text-secondary); }
body .btn-secondary:hover { background: var(--pro-surface-2); border-color: var(--border-turquoise-strong); color: var(--turquoise-800); }
body .btn-light { background: var(--pro-surface); border: 1px solid var(--border-default); color: var(--text-secondary); }
body .btn-light:hover { background: var(--pro-surface-2); border-color: var(--border-medium); color: var(--text-primary); }
body .btn-outline-primary { background: transparent; border: 1px solid var(--turquoise-500); color: var(--turquoise-700); }
body .btn-outline-primary:hover { background: var(--turquoise-600); border-color: var(--turquoise-600); color: #ffffff; }
body .btn-sm { border-radius: var(--radius-sm); }
body .btn-lg { border-radius: var(--radius-lg); }

/* Botones de acción de las tablas (55 usos). Se unifica el acabado pero se
   respeta su tamaño, definido por cada página, para no alterar el alto de
   fila ni el alineado de la columna de acciones. */
body .btn-action {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 1px 3px rgba(14, 26, 28, 0.14);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
}
body .btn-action:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(14, 26, 28, 0.20); filter: saturate(1.05); }
body .btn-action:disabled { filter: grayscale(0.4); }

/* Botones propios de las páginas */
body .btn-save {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600));
    border: 1px solid transparent;
    color: #ffffff;
    border-radius: var(--radius-md);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(16, 99, 95, 0.22);
}
body .btn-save:hover { background: linear-gradient(135deg, var(--turquoise-800), var(--turquoise-700)); color: #ffffff; }
body .btn-cancel {
    background: var(--pro-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 600;
}
body .btn-cancel:hover { background: var(--pro-surface-2); color: var(--text-primary); }
body .btn-print-new {
    background: var(--pro-surface);
    border: 1px solid var(--border-medium);
    color: var(--turquoise-700);
    border-radius: var(--radius-md);
    font-weight: 600;
}
body .btn-print-new:hover { background: var(--turquoise-50); border-color: var(--border-turquoise-strong); }
body .btn-toggle-todos { border-radius: var(--radius-md); font-weight: 600; }
body .btn-barra, body .btn-barra-primary, body .btn-barra-secondary, body .btn-barra-danger { border-radius: var(--radius-md); font-weight: 700; }
body .btn-orden { border-radius: var(--radius-md); font-weight: 700; border: 1px solid var(--border-default); background: var(--pro-surface); color: var(--text-tertiary); }
body .btn-orden.inactive { background: var(--pro-surface); color: var(--text-tertiary); }
body .btn-orden.active { background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600)); color: #ffffff; border-color: transparent; box-shadow: 0 3px 10px rgba(16, 99, 95, 0.28); }


/* =========================================================================
   11 · FORMULARIOS
   Se cubren los tres vocabularios reales: .form-control (Bootstrap),
   .form-control-simple (67 usos) y .form-control-new (30 usos).
   Solo fondo, borde, radio, color y foco: NO alto ni padding, para no
   descuadrar las rejillas de los formularios.
   ========================================================================= */
body .form-control,
body .form-select,
body .form-control-simple,
body .form-control-new,
body .form-control-benef,
body .input-edit,
body .select-unidad,
body .select-unidad-edit {
    background: var(--pro-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body .form-control:focus,
body .form-select:focus,
body .form-control-simple:focus,
body .form-control-new:focus,
body .form-control-benef:focus,
body .input-edit:focus,
body .select-unidad:focus,
body .select-unidad-edit:focus {
    border-color: var(--turquoise-500);
    box-shadow: var(--pro-ring);
    background: var(--pro-surface);
}

body .form-control::placeholder,
body .form-control-simple::placeholder,
body .form-control-new::placeholder { color: var(--text-quaternary); }

body .form-control:disabled,
body .form-select:disabled,
body .form-control-simple:disabled,
body .form-control-new:disabled {
    background: var(--pro-surface-2);
    color: var(--text-tertiary);
    border-color: var(--border-light);
}

body .form-label,
body .form-label-new,
body .form-label-simple,
body .form-label-sm {
    color: var(--text-secondary);
    font-weight: 600;
}
body .form-label i,
body .form-label-new i { color: var(--turquoise-600); }
body .form-text { color: var(--text-tertiary); }

body .form-check-input {
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background-color: var(--pro-surface);
}
body .form-check-input:checked { background-color: var(--turquoise-600); border-color: var(--turquoise-600); }
body .form-check-input:focus { border-color: var(--turquoise-500); box-shadow: var(--pro-ring); }
body .form-check-label { color: var(--text-secondary); }

body .search-box input { background: var(--pro-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-lg); }
body .search-box input:focus { border-color: var(--turquoise-500); box-shadow: var(--pro-ring); }
body .search-box .search-icon { color: var(--turquoise-500); }
body .input-group-text { background: var(--pro-surface-2); border: 1px solid var(--border-medium); color: var(--turquoise-700); }

/* Selector de rol (usuarios.php) */
body .rol-option {
    background: var(--pro-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
}
body .rol-option .rol-name { color: var(--text-secondary); font-weight: 700; }
body .rol-option .rol-icon { color: var(--text-tertiary); }
body .rol-option:hover { border-color: var(--border-turquoise-strong); background: var(--pro-surface-2); }
body .rol-option.active-admin { border-color: var(--state-rejected); background: #fdf1f0; }
body .rol-option.active-admin .rol-name, body .rol-option.active-admin .rol-icon { color: #8f2b26; }
body .rol-option.active-supervisor { border-color: var(--accent-violet); background: #efedfb; }
body .rol-option.active-supervisor .rol-name, body .rol-option.active-supervisor .rol-icon { color: #4b3fa0; }
body .rol-option.active-atencion { border-color: var(--turquoise-500); background: var(--turquoise-50); }
body .rol-option.active-atencion .rol-name, body .rol-option.active-atencion .rol-icon { color: var(--turquoise-800); }

/* Matriz de permisos (usuarios.php) */
body .permiso-modulo { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
body .permiso-modulo-header { background: var(--pro-surface-2); border-bottom: 1px solid var(--border-default); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
body .permiso-modulo-titulo { color: var(--text-primary); font-weight: 700; }
body .permiso-item { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); }
body .permiso-item.checked { background: var(--turquoise-50); border-color: var(--border-turquoise-strong); }
body .permiso-nombre { color: var(--text-secondary); }
body .permisos-count-badge { background: var(--turquoise-100); color: var(--turquoise-800); border-radius: var(--radius-full); font-weight: 800; }

/* Requisitos de contraseña (registro.php) */
body .requirement { color: var(--text-tertiary); }
body .requirement.valid { color: var(--state-approved); }
body .requirement.invalid { color: var(--state-rejected); }


/* =========================================================================
   12 · BADGES Y ESTADOS
   Se fijan fondo + color + borde juntos para asegurar contraste legible en
   los dos temas.
   ========================================================================= */
body .badge { border-radius: var(--radius-full); font-weight: 700; }

body .estado-badge,
body .estado-badge-new {
    border-radius: var(--radius-full);
    font-weight: 700;
    border: 1px solid transparent;
}
body .estado-pendiente,
body .estado-badge-new.pendiente   { background: #fdf3e7; color: #8a5316; border-color: #f3ddc0; }
body .estado-en_proceso,
body .estado-badge-new.en_proceso  { background: #e8f5f8; color: #12606f; border-color: #c9e6ec; }
body .estado-aprobada,
body .estado-badge-new.aprobada    { background: #e7f6ef; color: #0f6042; border-color: #c6e9d9; }
body .estado-rechazada,
body .estado-badge-new.rechazada   { background: #fdf1f0; color: #8f2b26; border-color: #f6d2cf; }
body .estado-completada,
body .estado-badge-new.completada  { background: var(--turquoise-50); color: var(--turquoise-900); border-color: var(--border-turquoise); }

body .prioridad-badge { border-radius: var(--radius-full); font-weight: 700; border: 1px solid transparent; }
body .prioridad-badge.alta    { background: #fdf1f0; color: #8f2b26; border-color: #f6d2cf; }
body .prioridad-badge.media   { background: #fdf3e7; color: #8a5316; border-color: #f3ddc0; }
body .prioridad-badge.baja    { background: #e7f6ef; color: #0f6042; border-color: #c6e9d9; }
body .prioridad-badge.urgente { background: #fdf1f0; color: #8f2b26; border-color: #f6d2cf; }

body .badge-rol-new { border-radius: var(--radius-full); font-weight: 700; }
body .badge-rol-new.admin      { background: #fdf1f0; color: #8f2b26; }
body .badge-rol-new.supervisor { background: #efedfb; color: #4b3fa0; }
body .badge-rol-new.atencion   { background: var(--turquoise-50); color: var(--turquoise-800); }

body .badge-estado-new { border-radius: var(--radius-full); font-weight: 700; }
body .badge-estado-new.activo   { background: #e7f6ef; color: #0f6042; }
body .badge-estado-new.inactivo { background: #f1f4f5; color: #5c6b70; }

body .semanas-badge { border-radius: var(--radius-full); font-weight: 700; }
body .advertencia-parto { border-left: 3px solid var(--state-rejected); border-radius: var(--radius-sm); }
body .filtro-chip { border-radius: var(--radius-full); font-weight: 700; }
body .tel-badge { background: var(--turquoise-50); color: var(--turquoise-800); border-radius: var(--radius-full); font-weight: 700; }
body .wa-link { color: #128c7e; font-weight: 600; }


/* =========================================================================
   13 · MODALES, ALERTAS Y CONFIRMACIÓN
   ========================================================================= */
body .modal-content { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }
body .modal-header { background: linear-gradient(135deg, var(--turquoise-800), var(--turquoise-600)); border-bottom: none; }
body .modal-header .modal-title { color: #ffffff; font-weight: 700; }
body .modal-header-pink { background: linear-gradient(135deg, var(--pink-800), var(--pink-500)); }
body .modal-body { background: var(--pro-surface); }
body .modal-footer { background: var(--pro-surface-2); border-top: 1px solid var(--border-default); }
body .modal-header .btn-close { filter: brightness(0) invert(1); opacity: 0.9; }
body .modal-header .btn-close:hover { opacity: 1; }

/* Modales propios de eliminación y reclamo */
body .modal-eliminar-content,
body .modal-reclamo-content { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }
body .modal-eliminar-header,
body .modal-reclamo-header { background: linear-gradient(135deg, #a8322c, var(--state-rejected)); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
body .modal-reclamo-header { background: linear-gradient(135deg, #8a5316, var(--state-pending)); }
body .modal-nota-header { background: linear-gradient(135deg, var(--turquoise-800), var(--turquoise-600)); }
body .modal-eliminar-title,
body .modal-reclamo-title { color: #ffffff; font-weight: 700; }
body .modal-eliminar-subtitle,
body .modal-reclamo-subtitle { color: rgba(255, 255, 255, 0.85); }
body .modal-eliminar-icon,
body .modal-reclamo-icon { background: rgba(255, 255, 255, 0.18); color: #ffffff; border-radius: var(--radius-full); }
body .modal-eliminar-info,
body .modal-reclamo-info { background: var(--pro-surface-2); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
body .modal-eliminar-info-item,
body .modal-reclamo-info-item { border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
body .modal-eliminar-advertencia { background: #fdf1f0; color: #8f2b26; border-left: 3px solid var(--state-rejected); border-radius: var(--radius-md); }
body .modal-eliminar-confirm-input,
body .modal-reclamo-textarea { background: var(--pro-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-md); color: var(--text-primary); }
body .modal-eliminar-btn-delete { background: var(--state-rejected); border-color: transparent; color: #ffffff; border-radius: var(--radius-md); font-weight: 700; }
body .modal-reclamo-btn-confirm { background: var(--state-pending); border-color: transparent; color: #ffffff; border-radius: var(--radius-md); font-weight: 700; }
body .modal-eliminar-btn-cancel,
body .modal-reclamo-btn-cancel { background: var(--pro-surface-2); border: 1px solid var(--border-medium); color: var(--text-secondary); border-radius: var(--radius-md); }

/* Notas y sus tipos */
body .nota-tipo-opt { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-secondary); }
body .nota-tipo-opt.selected { background: var(--turquoise-50); border-color: var(--border-turquoise-strong); color: var(--turquoise-800); }
body .nota-item { border-bottom: 1px solid var(--border-light); }
body .nota-item .nota-texto { color: var(--text-secondary); }
body .nota-item .nota-eliminar { color: var(--state-rejected); }

/* Alertas */
body .alert { border: 1px solid transparent; border-left: 4px solid; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); font-weight: 500; }
body .alert-success { background: #e7f6ef; border-left-color: var(--state-approved); color: #0f6042; }
body .alert-danger  { background: #fdf1f0; border-left-color: var(--state-rejected); color: #8f2b26; }
body .alert-warning { background: #fdf3e7; border-left-color: var(--state-pending);  color: #8a5316; }
body .alert-info    { background: #e8f5f8; border-left-color: var(--state-process);  color: #12606f; }

body .confirm-modal { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); }
body .confirm-title { color: var(--text-primary); font-weight: 800; }
body .confirm-message { color: var(--text-secondary); }
body .confirm-btn { border-radius: var(--radius-md); font-weight: 700; }
body .confirm-btn.cancel { background: var(--pro-surface-2); border: 1px solid var(--border-medium); color: var(--text-secondary); }
body .confirm-btn.cancel:hover { background: var(--border-light); color: var(--text-primary); }

body .alerta-urgente-banner {
    background: linear-gradient(135deg, #fdf1f0, #fbe0dd);
    border-left: 4px solid var(--state-rejected);
    color: #8f2b26;
    border-radius: var(--radius-md);
}
body .search-counter {
    background: var(--turquoise-50);
    border-left: 4px solid var(--turquoise-500);
    color: var(--turquoise-800);
    border-radius: var(--radius-md);
}
body .no-results-message { color: var(--text-tertiary); }


/* =========================================================================
   14 · FILTROS, TABS Y DROPDOWNS
   ========================================================================= */
body .filtros-tabs { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
body .filtro-tab { border-radius: var(--radius-md); color: var(--text-tertiary); font-weight: 600; }
body .filtro-tab:hover { background: var(--turquoise-50); color: var(--turquoise-700); }
body .filtro-tab.active { background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600)); color: #ffffff; box-shadow: 0 3px 10px rgba(16, 99, 95, 0.26); }
body .filtro-tab .count { background: rgba(0, 0, 0, 0.06); border-radius: var(--radius-full); }
body .filtro-tab.active .count { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
body .filtros-card, body .filtros-grid { border-radius: var(--radius-lg); }
body .filtros-activos-bar { color: var(--text-secondary); }

body .dropdown-menu { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
body .dropdown-item { border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 600; }
body .dropdown-item i { color: var(--turquoise-600); }
body .dropdown-item:hover { background: var(--turquoise-50); color: var(--turquoise-800); }
body .dropdown-divider { border-top: 1px solid var(--border-light); }

body .barra-seleccion-flotante {
    background: linear-gradient(135deg, var(--turquoise-900), var(--turquoise-700));
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 34px rgba(16, 99, 95, 0.34);
}


/* =========================================================================
   15 · TIMELINE / ACTIVIDAD
   ========================================================================= */
body .timeline-item { border-left: 2px solid var(--border-default); }
body .timeline-icon {
    background: var(--turquoise-50);
    color: var(--turquoise-600);
    border-radius: var(--radius-full);
    border: 2px solid var(--pro-surface);
}
body .timeline-title,
body .timeline-accion { color: var(--text-primary); font-weight: 700; }
body .timeline-content,
body .timeline-descripcion,
body .timeline-comment { color: var(--text-secondary); }
body .timeline-meta,
body .timeline-fecha { color: var(--text-tertiary); }
body .timeline-tag { background: var(--pro-surface-2); color: var(--text-secondary); border-radius: var(--radius-full); font-weight: 600; }
body .timeline-tag.modulo-tag { background: var(--turquoise-50); color: var(--turquoise-800); }
body .timeline-tag.ip-tag { background: #efedfb; color: #4b3fa0; }
body .timeline-solicitud-card { background: var(--pro-surface-2); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
body .benef-solicitud-item { border-bottom: 1px solid var(--border-light); }
body .benef-solicitud-numero { color: var(--turquoise-700); font-weight: 700; }
body .benef-solicitud-fecha { color: var(--text-tertiary); }


/* =========================================================================
   16 · PAGINACIÓN Y ESTADOS VACÍOS
   ========================================================================= */
body .paginacion a,
body .paginacion span,
body .paginacion-solicitudes a,
body .paginacion-solicitudes span {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--pro-surface);
    color: var(--text-secondary);
    font-weight: 600;
}
body .paginacion a:hover,
body .paginacion-solicitudes a:hover { background: var(--turquoise-50); color: var(--turquoise-800); border-color: var(--border-turquoise-strong); }
body .paginacion span.active,
body .paginacion-solicitudes span.active {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(16, 99, 95, 0.26);
}

body .empty-state,
body .empty-state-new { color: var(--text-tertiary); }
body .empty-state i,
body .empty-state-new i { color: var(--text-quaternary); }
body .empty-state h5,
body .empty-state-new h5 { color: var(--text-secondary); }
body .empty-state p,
body .empty-state-new p { color: var(--text-tertiary); }


/* =========================================================================
   17 · ENCABEZADOS DE PÁGINA (hero) Y TOASTS
   ========================================================================= */
body .page-hero { background: var(--gradient-hero); border-radius: var(--radius-lg); box-shadow: var(--shadow-turquoise-md); }
body .page-hero h1 { color: #ffffff; font-weight: 800; letter-spacing: -0.02em; }
body .page-hero .hero-greeting { color: var(--turquoise-200); font-weight: 700; }
body .page-hero .hero-sub { color: rgba(255, 255, 255, 0.88); }
body .page-hero-pink { background: var(--gradient-hero-pink); border-radius: var(--radius-xl); box-shadow: var(--shadow-pink-lg); }
body .dashboard-hero { background: var(--gradient-hero); border-radius: var(--radius-xl); box-shadow: var(--shadow-turquoise-md); }
body .dashboard-hero .hero-subtitle { color: rgba(255, 255, 255, 0.85); }
body .dashboard-hero .hero-date { color: var(--turquoise-200); }
body .detail-hero { background: var(--gradient-hero); border-radius: var(--radius-lg); box-shadow: var(--shadow-turquoise-md); }
body .detail-hero .detail-meta { color: rgba(255, 255, 255, 0.85); }
body .header-edit { color: var(--text-primary); }

body .toast-notification { background: var(--pro-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }
body .toast-notification .toast-title { color: var(--text-primary); font-weight: 700; }
body .toast-notification .toast-message { color: var(--text-secondary); }
body .toast-notification .toast-close { color: var(--text-tertiary); }

body .page-loader { background: linear-gradient(135deg, #ffffff, #f1faf9); }
body .loader-logo {
    background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-500));
    box-shadow: 0 16px 40px rgba(16, 99, 95, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
}
body .loader-text { color: var(--text-secondary); font-weight: 600; }
body .spinner-ring { background: var(--turquoise-500); }
body #progressBar { background: linear-gradient(90deg, var(--turquoise-600), var(--turquoise-400)); }
body .section-tag { background: var(--turquoise-50); color: var(--turquoise-800); border-radius: var(--radius-full); font-weight: 700; }


/* =========================================================================
   18 · TEMA OSCURO · COMPONENTES
   html[data-theme="dark"] body .x = (0,3,1): supera con holgura las reglas
   [data-theme="dark"] .x de styles.css, effects.css y de cada página.
   ========================================================================= */
html[data-theme="dark"] body .card,
html[data-theme="dark"] body .content-card-new,
html[data-theme="dark"] body .result-card-new,
html[data-theme="dark"] body .filter-card-new,
html[data-theme="dark"] body .grafico-card,
html[data-theme="dark"] body .form-card,
html[data-theme="dark"] body .content-card,
html[data-theme="dark"] body .profile-card,
html[data-theme="dark"] body .benef-card,
html[data-theme="dark"] body .nota-card,
html[data-theme="dark"] body .dato-card,
html[data-theme="dark"] body .user-card,
html[data-theme="dark"] body .main-card,
html[data-theme="dark"] body .search-card,
html[data-theme="dark"] body .tabla-wrapper,
html[data-theme="dark"] body .table-container,
html[data-theme="dark"] body .modal-content,
html[data-theme="dark"] body .modal-eliminar-content,
html[data-theme="dark"] body .modal-reclamo-content,
html[data-theme="dark"] body .confirm-modal,
html[data-theme="dark"] body .dropdown-menu,
html[data-theme="dark"] body .toast-notification,
html[data-theme="dark"] body .filtros-tabs,
html[data-theme="dark"] body .stat-mini-pink,
html[data-theme="dark"] body .stat-card-new,
html[data-theme="dark"] body .stat-card-pink,
html[data-theme="dark"] body .stat-box,
html[data-theme="dark"] body .user-dropdown-menu,
html[data-theme="dark"] body .permiso-modulo,
html[data-theme="dark"] body .permiso-item,
html[data-theme="dark"] body .rol-option,
html[data-theme="dark"] body .nota-tipo-opt,
html[data-theme="dark"] body .timeline-solicitud-card,
html[data-theme="dark"] body .footer {
    background: var(--pro-surface);
    border-color: var(--border-default);
}

html[data-theme="dark"] body .card-header-new,
html[data-theme="dark"] body .form-card-header,
html[data-theme="dark"] body .grafico-card-header,
html[data-theme="dark"] body .permiso-modulo-header,
html[data-theme="dark"] body .card-footer,
html[data-theme="dark"] body .modal-footer,
html[data-theme="dark"] body .modal-body,
html[data-theme="dark"] body .modal-eliminar-info,
html[data-theme="dark"] body .modal-reclamo-info,
html[data-theme="dark"] body .nota-card,
html[data-theme="dark"] body .aviso-sutil,
html[data-theme="dark"] body .aviso-neutral {
    background: var(--pro-surface-2);
    border-color: var(--border-default);
}
html[data-theme="dark"] body .card-header-new .header-title { color: var(--text-primary); }

html[data-theme="dark"] body .table thead th,
html[data-theme="dark"] body .tabla-solicitudes thead th,
html[data-theme="dark"] body .tabla-embarazadas thead th,
html[data-theme="dark"] body .tabla-usuarios thead th,
html[data-theme="dark"] body .tabla-solicitantes thead th {
    background: var(--pro-surface-2);
    color: var(--turquoise-700);
    border-bottom-color: var(--border-default);
}
html[data-theme="dark"] body .table tbody td,
html[data-theme="dark"] body .tabla-solicitudes tbody td,
html[data-theme="dark"] body .tabla-embarazadas tbody td,
html[data-theme="dark"] body .tabla-usuarios tbody td,
html[data-theme="dark"] body .tabla-solicitantes tbody td { border-bottom-color: var(--border-light); }
html[data-theme="dark"] body .table tbody tr:hover,
html[data-theme="dark"] body .tabla-solicitudes tbody tr:hover,
html[data-theme="dark"] body .tabla-embarazadas tbody tr:hover,
html[data-theme="dark"] body .tabla-usuarios tbody tr:hover,
html[data-theme="dark"] body .tabla-solicitantes tbody tr:hover { background: rgba(69, 178, 172, 0.07); }
html[data-theme="dark"] body .table-striped tbody tr:nth-child(odd) { background: var(--pro-surface-2); }
html[data-theme="dark"] body .tabla-solicitudes tbody tr.selected { background: rgba(69, 178, 172, 0.14); }
html[data-theme="dark"] body .tabla-embarazadas tbody tr.urgente { background: rgba(194, 65, 58, 0.12); }

html[data-theme="dark"] body .form-control,
html[data-theme="dark"] body .form-select,
html[data-theme="dark"] body .form-control-simple,
html[data-theme="dark"] body .form-control-new,
html[data-theme="dark"] body .form-control-benef,
html[data-theme="dark"] body .input-edit,
html[data-theme="dark"] body .select-unidad,
html[data-theme="dark"] body .select-unidad-edit,
html[data-theme="dark"] body .search-box input,
html[data-theme="dark"] body .modal-eliminar-confirm-input,
html[data-theme="dark"] body .modal-reclamo-textarea {
    background: var(--pro-surface);
    border-color: var(--border-medium);
    color: var(--text-primary);
}
html[data-theme="dark"] body .form-control:focus,
html[data-theme="dark"] body .form-select:focus,
html[data-theme="dark"] body .form-control-simple:focus,
html[data-theme="dark"] body .form-control-new:focus { border-color: var(--turquoise-500); box-shadow: var(--pro-ring); }
html[data-theme="dark"] body .form-control::placeholder,
html[data-theme="dark"] body .form-control-simple::placeholder,
html[data-theme="dark"] body .form-control-new::placeholder { color: var(--text-quaternary); }
html[data-theme="dark"] body .form-control:disabled,
html[data-theme="dark"] body .form-select:disabled,
html[data-theme="dark"] body .form-control-simple:disabled { background: var(--pro-surface-2); color: var(--text-tertiary); }
html[data-theme="dark"] body .form-check-input { background-color: var(--pro-surface); border-color: var(--border-medium); }
html[data-theme="dark"] body .form-check-input:checked { background-color: var(--turquoise-500); border-color: var(--turquoise-500); }
html[data-theme="dark"] body .input-group-text { background: var(--pro-surface-2); border-color: var(--border-medium); }

html[data-theme="dark"] body .btn-secondary,
html[data-theme="dark"] body .btn-light,
html[data-theme="dark"] body .btn-cancel,
html[data-theme="dark"] body .btn-print-new,
html[data-theme="dark"] body .btn-orden {
    background: var(--pro-surface-2);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}
html[data-theme="dark"] body .btn-secondary:hover,
html[data-theme="dark"] body .btn-light:hover,
html[data-theme="dark"] body .btn-cancel:hover { background: var(--border-light); color: var(--text-primary); }

html[data-theme="dark"] body .estado-pendiente  { background: rgba(217, 130, 43, 0.16); color: #f0b878; border-color: rgba(217, 130, 43, 0.32); }
html[data-theme="dark"] body .estado-en_proceso { background: rgba(26, 143, 168, 0.16); color: #7fd0e0; border-color: rgba(26, 143, 168, 0.32); }
html[data-theme="dark"] body .estado-aprobada   { background: rgba(23, 145, 107, 0.16); color: #77d4ac; border-color: rgba(23, 145, 107, 0.32); }
html[data-theme="dark"] body .estado-rechazada  { background: rgba(194, 65, 58, 0.18);  color: #f0a099; border-color: rgba(194, 65, 58, 0.34); }
html[data-theme="dark"] body .estado-completada { background: rgba(69, 178, 172, 0.16); color: #8fd8d3; border-color: rgba(69, 178, 172, 0.32); }

html[data-theme="dark"] body .alert-success { background: rgba(23, 145, 107, 0.14); color: #9adfc0; }
html[data-theme="dark"] body .alert-danger  { background: rgba(194, 65, 58, 0.16);  color: #f0a099; }
html[data-theme="dark"] body .alert-warning { background: rgba(217, 130, 43, 0.14); color: #f0c894; }
html[data-theme="dark"] body .alert-info    { background: rgba(26, 143, 168, 0.14); color: #9ad8e6; }

html[data-theme="dark"] body .stat-card-new .stat-icon-circle,
html[data-theme="dark"] body .stat-card-pink .stat-icon-circle { background: rgba(69, 178, 172, 0.14); color: var(--turquoise-600); }
html[data-theme="dark"] body .stat-card-pink .stat-icon-circle { background: rgba(224, 112, 159, 0.14); color: var(--pink-500); }
html[data-theme="dark"] body .stat-card-pink .stat-number-big { color: var(--pink-500); }
html[data-theme="dark"] body .stat-card-new .stat-number-big,
html[data-theme="dark"] body .stat-box .numero { color: var(--text-primary); }
html[data-theme="dark"] body .stat-card-new .stat-trend { background: rgba(23, 145, 107, 0.18); color: #77d4ac; }
html[data-theme="dark"] body .stat-card-new .stat-trend.negative { background: rgba(194, 65, 58, 0.18); color: #f0a099; }
html[data-theme="dark"] body .stat-mini-pink .num { color: var(--pink-500); }
html[data-theme="dark"] body .stat-mini-pink .lbl { color: var(--pink-600); }

html[data-theme="dark"] body .aviso-sutil,
html[data-theme="dark"] body .aviso-neutral { color: var(--turquoise-700); border-left-color: var(--turquoise-500); }
html[data-theme="dark"] body .aviso-sutil .aviso-title { color: var(--turquoise-700); }
html[data-theme="dark"] body .aviso-foraneo { background: rgba(217, 130, 43, 0.14); color: #f0c894; border-left-color: var(--state-pending); }
html[data-theme="dark"] body .aviso-sync { background: rgba(26, 143, 168, 0.14); color: #9ad8e6; border-left-color: var(--state-process); }

html[data-theme="dark"] body .alerta-urgente-banner { background: linear-gradient(135deg, rgba(194, 65, 58, 0.20), rgba(194, 65, 58, 0.10)); color: #f0a099; }
html[data-theme="dark"] body .search-counter { background: var(--pro-surface-2); border-left-color: var(--turquoise-500); color: var(--turquoise-700); }
html[data-theme="dark"] body .nota-card { border-left-color: var(--turquoise-500); }
html[data-theme="dark"] body .timeline-item { border-left-color: var(--border-default); }
html[data-theme="dark"] body .timeline-icon { background: rgba(69, 178, 172, 0.14); color: var(--turquoise-600); border-color: var(--pro-surface); }
html[data-theme="dark"] body .timeline-tag { background: var(--pro-surface-2); color: var(--text-secondary); }
html[data-theme="dark"] body .timeline-tag.modulo-tag { background: rgba(69, 178, 172, 0.14); color: var(--turquoise-700); }

html[data-theme="dark"] body .paginacion a,
html[data-theme="dark"] body .paginacion span,
html[data-theme="dark"] body .paginacion-solicitudes a,
html[data-theme="dark"] body .paginacion-solicitudes span { background: var(--pro-surface-2); border-color: var(--border-default); color: var(--text-secondary); }

html[data-theme="dark"] body .page-loader { background: linear-gradient(135deg, #0a1416, #101b1e); }
html[data-theme="dark"] body .tabla-solicitudes .numero-sol { color: var(--turquoise-600); }
html[data-theme="dark"] body .dato-label,
html[data-theme="dark"] body .info-label { color: var(--text-tertiary); }
html[data-theme="dark"] body .dato-value,
html[data-theme="dark"] body .info-value { color: var(--text-primary); }
html[data-theme="dark"] body .mono { color: var(--turquoise-600); }
html[data-theme="dark"] body .permisos-count-badge { background: rgba(69, 178, 172, 0.16); color: var(--turquoise-700); }
html[data-theme="dark"] body .permiso-item.checked { background: rgba(69, 178, 172, 0.10); border-color: var(--border-turquoise-strong); }
html[data-theme="dark"] body .btn-orden.active { background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-600)); color: #ffffff; }
html[data-theme="dark"] body .section-tag { background: rgba(69, 178, 172, 0.14); color: var(--turquoise-700); }
html[data-theme="dark"] body .badge-estado-new.inactivo { background: #232f33; color: #9fb0b4; }
html[data-theme="dark"] body .badge-rol-new.admin { background: rgba(194, 65, 58, 0.18); color: #f0a099; }
html[data-theme="dark"] body .badge-rol-new.supervisor { background: rgba(109, 91, 196, 0.20); color: #b7abe8; }
html[data-theme="dark"] body .badge-rol-new.atencion { background: rgba(69, 178, 172, 0.16); color: var(--turquoise-700); }
html[data-theme="dark"] body .modal-eliminar-advertencia { background: rgba(194, 65, 58, 0.16); color: #f0a099; }

html[data-theme="dark"] body .sidebar .menu-item .menu-badge.success { background: rgba(23, 145, 107, 0.18); color: #77d4ac; }
html[data-theme="dark"] body .sidebar .menu-item .menu-badge.warning { background: rgba(217, 130, 43, 0.18); color: #f0c894; }
html[data-theme="dark"] body .sidebar .menu-item.menu-admin .menu-icon-wrapper { background: rgba(194, 65, 58, 0.16); border-color: rgba(194, 65, 58, 0.3); }
html[data-theme="dark"] body .sidebar .menu-item.menu-admin:hover { background: rgba(194, 65, 58, 0.14); color: #f0a099; }
html[data-theme="dark"] body .user-dropdown-menu .dropdown-item-custom.text-danger:hover { background: rgba(194, 65, 58, 0.16); color: #f0a099; }
html[data-theme="dark"] body .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme="dark"] body .modal-header .btn-close { filter: brightness(0) invert(1); }
html[data-theme="dark"] body code,
html[data-theme="dark"] body kbd,
html[data-theme="dark"] body samp { background: var(--pro-surface-2); border-color: var(--border-default); color: var(--turquoise-700); }


/* =========================================================================
   19 · LOGIN (página standalone)
   login.php no enlaza assets/css/*.css: tiene su propio <style> y su propio
   :root. Al cargar esta capa allí, sus var(--turquoise-*) adoptan la paleta
   nueva automáticamente. Aquí se corrigen los HEX literales que no pasan
   por variables, para que el acabado sea coherente.
   ========================================================================= */
body .login-right { background: #ffffff; box-shadow: -24px 0 60px rgba(14, 26, 28, 0.10); }
body .login-right .login-wrapper { animation: proFadeUp 0.6s ease-out both; }
body .logo-container { border-bottom: 1px solid var(--border-default); }
body .logo-container h2 { color: var(--text-primary); letter-spacing: -0.03em; }
body .logo-container h2 small { color: var(--text-tertiary); letter-spacing: 2.4px; }
body .welcome-subtitle { color: var(--text-secondary); }
body .form-group-custom label { color: var(--text-secondary); }
body .input-group-custom { border: 1px solid var(--border-medium); border-radius: var(--radius-lg); background: var(--pro-surface); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
body .input-group-custom:focus-within { border-color: var(--turquoise-500); box-shadow: var(--pro-ring); }
body .input-group-custom .input-icon { background: var(--pro-surface-2); color: var(--turquoise-600); border-right: 1px solid var(--border-default); }
body .input-group-custom:focus-within .input-icon { background: var(--turquoise-50); color: var(--turquoise-700); }
body .input-group-custom input { color: var(--text-primary); }
body .input-group-custom input::placeholder { color: var(--text-quaternary); }
body .input-group-custom .btn-show-password { background: var(--pro-surface-2); color: var(--turquoise-600); border-left: 1px solid var(--border-default); }
body .input-group-custom .btn-show-password:hover { background: var(--turquoise-50); color: var(--turquoise-700); }
body .remember-row .form-check-input { border: 1.5px solid var(--border-medium); }
body .remember-row .form-check-input:checked { background-color: var(--turquoise-600); border-color: var(--turquoise-600); box-shadow: 0 0 0 3px rgba(33, 152, 145, 0.18); }
body .remember-row .form-check-label { color: var(--text-secondary); }
body .btn-login-custom { background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-500)); border-radius: var(--radius-lg); box-shadow: 0 10px 28px rgba(16, 99, 95, 0.26); }
body .btn-login-custom:hover { box-shadow: 0 16px 40px rgba(16, 99, 95, 0.34); }
body .login-footer-custom { border-top: 1px solid var(--border-light); }
body .login-footer-custom .security-info { color: var(--text-tertiary); }
body .login-footer-custom .security-info i { color: var(--turquoise-600); }
body .login-footer-custom .copyright { color: var(--text-quaternary); }


/* =========================================================================
   20 · IMPRESIÓN
   Bloque mínimo y ADDITIVO: no oculta ni reordena nada (de eso ya se encarga
   styles.css). Solo evita que el acabado nuevo ensucie el papel. Respeta
   .no-print y no afecta a los comprobantes, que no cargan esta hoja.
   ========================================================================= */
@media print {
    body .card,
    body .table-container,
    body .content-card-new,
    body .result-card-new,
    body .stat-card-new,
    body .stat-card-pink,
    body .stat-box,
    body .modal-content,
    body .card:hover,
    body .stat-card-new:hover { box-shadow: none !important; transform: none !important; }

    body .top-header,
    body .sidebar { background: #ffffff !important; color: #000000 !important; }

    body .card,
    body .content-card-new,
    body .result-card-new { border: 1px solid #d8dee0 !important; }

    body .table thead th,
    body .tabla-solicitudes thead th,
    body .tabla-embarazadas thead th { background: #f2f5f6 !important; color: #000000 !important; }

    body .page-hero,
    body .dashboard-hero,
    body .detail-hero,
    body .page-hero-pink { background: #ffffff !important; color: #000000 !important; box-shadow: none !important; }
    body .page-hero h1,
    body .page-hero .hero-greeting,
    body .page-hero .hero-sub { color: #000000 !important; }
}


/* =========================================================================
   21 · ACCESIBILIDAD · MOVIMIENTO REDUCIDO
   Respeta la preferencia del sistema operativo. Mejora aditiva.
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    body *,
    body *::before,
    body *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    body .stat-card-new:hover,
    body .stat-card-pink:hover,
    body .card:hover,
    body .btn:hover,
    body .btn-action:hover { transform: none !important; }
}
