/* =========================================================
   SISTEMA MÉDICO ESCOLAR - I.E.M
   Hoja de estilos personalizada (Vanilla CSS Premium)
   ========================================================= */

:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-subtle: #e0f2fe;
    --navy-dark: #0b132b;
    --navy-surface: #1c2541;
    --navy-accent: #3a506b;
    --emergency: #dc2626;
    --emergency-hover: #b91c1c;
    --emergency-subtle: #fee2e2;
    --success: #059669;
    --success-subtle: #d1fae5;
    --warning: #d97706;
    --warning-subtle: #fef3c7;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
    --shadow-emergency: 0 10px 30px rgba(220, 38, 38, 0.3);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--navy-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

main {
    flex: 1 0 auto;
    background-color: var(--bg-page);
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================================
   NAVBAR (MINIMALISTA, LIMPIO Y ORGANIZADO)
   ========================================================= */
.navbar {
    background-color: rgba(11, 19, 43, 0.95) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
    padding: 10px 0;
    transition: all 0.25s ease;
    border: none !important;
    margin-bottom: 0 !important;
}

.navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.navbar-brand i {
    filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.4));
    font-size: 1.25rem;
}

.nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 6px 12px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.9rem;
    opacity: 0.85;
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #38bdf8 !important;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.1);
    box-shadow: inset 0 -2px 0 #38bdf8;
}

.nav-lock-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

/* =========================================================
   HERO SECTIONS
   ========================================================= */
.hero {
    background:
        linear-gradient(135deg, rgba(11, 19, 43, 0.88), rgba(28, 37, 65, 0.92)),
        url("https://images.unsplash.com/photo-1584515933487-779824d29309?q=80&w=1920");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 150px 20px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-emergencias {
    background:
        linear-gradient(135deg, rgba(153, 27, 27, 0.92), rgba(11, 19, 43, 0.94)),
        url("https://images.unsplash.com/photo-1516549655169-df83a0774514?q=80&w=1920");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 140px 20px 80px;
    text-align: center;
}

.hero-estudiantes {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.9)),
        url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?q=80&w=1920");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 140px 20px 75px;
    text-align: center;
}

.hero h1 {
    font-size: 2.85rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p.lead {
    font-size: 1.2rem;
    max-width: 820px;
    margin: 0 auto 30px;
    color: #e2e8f0;
    font-weight: 400;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================================
   CARDS Y COMPONENTES
   ========================================================= */
.card-custom {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    background: var(--card-bg);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-clickable {
    cursor: pointer;
}

.card-portal-access {
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.35s ease;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.card-portal-access:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-portal-access.access-emergency {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}

.card-portal-access.access-emergency:hover {
    border-color: var(--emergency);
}

.card-portal-access.access-security {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

.card-portal-access.access-security:hover {
    border-color: var(--primary);
}

/* ICONOS */
.icon-box {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
    transition: transform 0.3s ease;
}

.card-custom:hover .icon-box {
    transform: scale(1.08);
}

.icon-box.bg-danger-gradient {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.3);
}

.icon-box.bg-success-gradient {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.3);
}

.icon-box.bg-warning-gradient {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.3);
}

.icon-box.bg-navy-gradient {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-accent));
    box-shadow: 0 8px 18px rgba(11, 19, 43, 0.3);
}

/* =========================================================
   EMERGENCIAS Y TRIAGE
   ========================================================= */
.emergency-call-banner {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 35px;
    border-radius: 24px;
    box-shadow: var(--shadow-emergency);
    position: relative;
    overflow: hidden;
}

.emergency-call-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.pulse-btn {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }

    70% {
        box-shadow: 0 0 0 16px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.card-triage {
    border-radius: 16px;
    border-left: 6px solid transparent;
    transition: all 0.3s ease;
}

.card-triage.triage-rojo {
    border-left-color: #dc2626;
    background: #fffafa;
}

.card-triage.triage-amarillo {
    border-left-color: #d97706;
    background: #fffdf5;
}

.card-triage.triage-verde {
    border-left-color: #059669;
    background: #f6fbf8;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* =========================================================
   PORTAL DE ESTUDIANTES - PANTALLA DE SEGURIDAD / LOGIN GATE
   ========================================================= */
.security-gate-wrapper {
    max-width: 650px;
    margin: 40px auto;
}

.security-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.security-card-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-surface));
    color: white;
    padding: 35px 30px;
    text-align: center;
}

.security-shield-icon {
    width: 80px;
    height: 80px;
    background: rgba(56, 189, 248, 0.15);
    border: 2px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
}

.security-notice-badge {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
}

/* =========================================================
   ESTUDIANTES AUTORIZADOS - TARJETAS Y TABLA
   ========================================================= */
.student-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 10px auto 16px;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

.badge-rh {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}

.section-title {
    font-weight: 800;
    margin-bottom: 35px;
    position: relative;
    color: var(--navy-dark);
    letter-spacing: -0.4px;
}

.section-title::after {
    content: '';
    width: 55px;
    height: 4px;
    background: var(--primary);
    display: block;
    margin: 10px auto 0;
    border-radius: 3px;
}

.section-title.text-start::after {
    margin: 10px 0 0;
}

/* =========================================================
   TABLA CLÍNICA
   ========================================================= */
.table th,
.table td {
    vertical-align: middle;
    padding: 14px 16px;
}

.table thead th {
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
    background: var(--navy-dark) !important;
    color: #ffffff !important;
}

/* =========================================================
   DATO MÉDICO (MODAL Y DETALLES)
   ========================================================= */
.dato-medico {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.dato-medico.alergia {
    border-left-color: var(--emergency);
    background: #fff5f5;
}

.dato-medico.tratamiento {
    border-left-color: var(--warning);
    background: #fffdf5;
}

.dato-medico.contacto {
    border-left-color: var(--success);
    background: #f4fbf7;
}

/* =========================================================
   FILTROS RÁPIDOS
   ========================================================= */
.btn-filter {
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 16px;
    transition: all 0.2s ease;
}

.btn-filter.active {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: var(--navy-dark);
    color: #ffffff;
    padding: 55px 0 25px;
    margin-top: auto;
}

footer p,
footer small {
    color: #94a3b8 !important;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #38bdf8 !important;
}

/* LÍNEAS DE AUXILIO EN FOOTER (BOMBEROS, CRUZ ROJA, 123) - MÁXIMO CONTRASTE */
footer a.btn {
    text-decoration: none !important;
}

footer a.btn-outline-danger {
    border-color: #ef4444 !important;
    color: #f87171 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

footer a.btn-outline-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

footer a.btn-outline-warning {
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.08) !important;
}

footer a.btn-outline-warning:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

/* FIX BOMBEROS: Fondo oscuro con texto cian en reposo, y azul institucional con blanco en hover para evitar que se tape el texto */
footer a.btn-outline-info {
    border-color: #0284c7 !important;
    color: #38bdf8 !important;
    background: rgba(2, 132, 199, 0.15) !important;
    font-weight: 600 !important;
}

footer a.btn-outline-info:hover,
footer a.btn-outline-info:focus,
footer a.btn-outline-info:active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0369a1 !important;
}

footer a.btn-outline-info i {
    color: #38bdf8 !important;
}

footer a.btn-outline-info:hover i {
    color: #ffffff !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {

    .hero,
    .hero-emergencias,
    .hero-estudiantes {
        padding: 120px 15px 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p.lead {
        font-size: 1rem;
    }

    .emergency-call-banner {
        padding: 24px;
    }
}

/* =========================================================
   PORTAL DE CONSULTA ESTUDIANTIL Y RECAPTCHA
   ========================================================= */
.hero-consulta {
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.92), rgba(15, 23, 42, 0.94)),
        url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=1920");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 130px 20px 75px;
    text-align: center;
}

/* WIDGET RECAPTCHA "NO SOY UN ROBOT" */
.recaptcha-container {
    display: inline-block;
    width: 100%;
    max-width: 330px;
}

.recaptcha-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    user-select: none;
    transition: all 0.2s ease;
}

.recaptcha-widget:hover {
    border-color: #9ca3af;
    background: #ffffff;
}

.recaptcha-left {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.recaptcha-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.recaptcha-checkbox:hover {
    border-color: #4b5563;
}

.recaptcha-checkbox.loading {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #0284c7;
    border-radius: 50%;
    animation: recaptchaSpin 0.75s linear infinite;
}

.recaptcha-checkbox.verified {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    font-size: 16px;
    animation: recaptchaPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes recaptchaSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes recaptchaPop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.recaptcha-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.recaptcha-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 12px;
    border-left: 1px solid #e5e7eb;
}

.recaptcha-brand i {
    font-size: 1.5rem;
    color: #0284c7;
}

.recaptcha-brand span {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* CARNÉ DIGITAL / FICHA MÉDICA ESTUDIANTIL */
.student-health-sheet {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.health-sheet-header {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: white;
    padding: 30px;
    position: relative;
}

.health-status-badge {
    position: absolute;
    top: 25px;
    right: 30px;
}

.health-metric-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    height: 100%;
    transition: all 0.25s ease;
}

.health-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

/* TABS DE LOGIN MODERNO DUAL */
.login-dual-tabs .nav-link {
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 16px !important;
    color: #64748b !important;
    background: #f1f5f9;
    border: none;
    transition: all 0.2s ease;
}

.login-dual-tabs .nav-link.active {
    color: #ffffff !important;
    background: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* =========================================================
   ESTILOS DE IMPRESIÓN (FICHA CLÍNICA, CARNÉ Y REPORTES)
   ========================================================= */
@page {
    size: letter portrait;
    margin: 8mm 8mm;
}

@media print {
    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 8pt !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ocultar elementos de navegación y componentes interactivos */
    .navbar,
    .hero,
    .hero-emergencias,
    .hero-estudiantes,
    .hero-consulta,
    footer,
    .btn,
    button,
    #inputBusqueda,
    .input-group,
    .nav,
    .nav-tabs,
    .contenedor-pestanas-clinicas,
    .pestanas-grid-clinicas,
    #vistasEstudiantesTab,
    #seccionEstadisticasYFiltros,
    #seccionAccesoFiltros,
    .recaptcha-widget,
    .a11y-trigger-btn,
    .contacto-trigger-btn,
    .a11y-panel,
    .contacto-panel,
    .modal-backdrop,
    .modal:not(.show),
    #pantallaBloqueo,
    .alert:not(.alert-impresion),
    #alertaGlobal,
    .dropdown-menu,
    .nav-lock-badge,
    #tarjetaFormularioConsulta,
    #formConsultaEstudiante {
        display: none !important;
    }

    /* Reset global de contenedores para evitar cortes en el margen derecho */
    main,
    .container,
    .container-fluid,
    .row,
    [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        float: none !important;
        flex: none !important;
    }

    /* =========================================================
       1. IMPRESIÓN DEL CARNÉ DE SALUD DEL ESTUDIANTE (1 SOLA HOJA)
       ========================================================= */
    body.imprimiendo-carne-salud #tarjetaFormularioConsulta,
    body.imprimiendo-carne-salud #formConsultaEstudiante,
    body.imprimiendo-carne-salud .card-header,
    body.imprimiendo-carne-salud .card-footer,
    body.imprimiendo-carne-salud .btn,
    body.imprimiendo-carne-salud .hero,
    body.imprimiendo-carne-salud footer,
    body.imprimiendo-carne-salud .navbar {
        display: none !important;
    }

    body.imprimiendo-carne-salud #resultadoConsultaEstudiante,
    #resultadoConsultaEstudiante:not(.d-none) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Contenedor principal de la ficha médica individual */
    .student-health-sheet {
        box-shadow: none !important;
        border: 2px solid #0f172a !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        color: #0f172a !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
    }

    /* Cabecera elegante y compacta */
    .student-health-sheet .health-sheet-header {
        background: #0f172a !important;
        color: #ffffff !important;
        padding: 10px 14px !important;
        border-bottom: 2px solid #0f172a !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .student-health-sheet .health-sheet-header * {
        color: #ffffff !important;
    }

    .student-health-sheet .student-avatar {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        font-size: 16px !important;
        border: 2px solid #38bdf8 !important;
        background: #ffffff !important;
        color: #0369a1 !important;
        margin-right: 12px !important;
    }

    .student-health-sheet .health-sheet-header h3 {
        font-size: 13pt !important;
        font-weight: 800 !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.15 !important;
        color: #ffffff !important;
    }

    .student-health-sheet .health-sheet-header small {
        font-size: 7.5pt !important;
        color: #cbd5e1 !important;
    }

    .student-health-sheet .health-sheet-header .badge {
        font-size: 7pt !important;
        padding: 2px 6px !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
    }

    /* Padding compacto del cuerpo interno */
    .student-health-sheet > div:last-child,
    .student-health-sheet .p-4.p-md-5 {
        padding: 8px 12px !important;
    }

    /* Cuadrícula de 4 Métricas Clave en una sola línea */
    .student-health-sheet .row.g-3.mb-4:first-of-type {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    .student-health-sheet .row.g-3.mb-4:first-of-type > div {
        flex: 1 1 25% !important;
        max-width: 25% !important;
        width: 25% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .health-metric-card {
        padding: 4px 6px !important;
        border-radius: 6px !important;
        border: 1px solid #94a3b8 !important;
        background: #f8fafc !important;
        height: auto !important;
        min-height: 0 !important;
        text-align: center !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .health-metric-card small:first-child {
        font-size: 6pt !important;
        font-weight: 800 !important;
        margin-bottom: 1px !important;
        color: #475569 !important;
    }

    .health-metric-card span {
        font-size: 11pt !important;
        font-weight: 800 !important;
        display: block !important;
        line-height: 1.1 !important;
    }

    .health-metric-card small:last-child {
        font-size: 6pt !important;
        margin-top: 1px !important;
        color: #64748b !important;
    }

    /* Filas de Condiciones y Diagnóstico (2 Columnas lado a lado) */
    .student-health-sheet .row.g-4.mb-4 {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    .student-health-sheet .row.g-4.mb-4 > .col-md-6 {
        flex: 1 1 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .dato-medico {
        padding: 6px 10px !important;
        border-radius: 6px !important;
        border: 1px solid #cbd5e1 !important;
        border-left-width: 4px !important;
        background: #f8fafc !important;
        height: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .dato-medico h6 {
        font-size: 7.5pt !important;
        font-weight: 800 !important;
        margin-bottom: 2px !important;
    }

    .dato-medico p,
    .dato-medico small {
        font-size: 7pt !important;
        line-height: 1.25 !important;
        margin-bottom: 1px !important;
        color: #1e293b !important;
    }

    .dato-medico a {
        font-size: 7pt !important;
        color: #047857 !important;
        text-decoration: none !important;
    }

    /* Caja de recomendaciones oficiales de Dra. Valeria Restrepo Morales */
    .student-health-sheet .bg-light.p-4.rounded-4.border.mb-4 {
        padding: 6px 10px !important;
        border-radius: 6px !important;
        margin-bottom: 6px !important;
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .student-health-sheet .bg-light.p-4.rounded-4.border.mb-4 h6 {
        font-size: 7.5pt !important;
        font-weight: 800 !important;
        margin: 0 !important;
    }

    .student-health-sheet .bg-light.p-4.rounded-4.border.mb-4 small {
        font-size: 6.5pt !important;
    }

    .student-health-sheet .bg-light.p-4.rounded-4.border.mb-4 p {
        font-size: 7pt !important;
        line-height: 1.25 !important;
        margin-top: 3px !important;
    }

    /* Pie institucional y aviso confidencial */
    .student-health-sheet .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.pt-3.border-top {
        padding-top: 4px !important;
        margin-top: 0 !important;
    }

    .student-health-sheet .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.pt-3.border-top small {
        font-size: 6pt !important;
    }

    .student-health-sheet .d-flex.gap-2 {
        display: none !important;
    }

    /* =========================================================
       2. IMPRESIÓN DEL REPORTE GENERAL CONSOLIDADO DE ESTUDIANTES (ADMIN)
       ========================================================= */
    #reporteImpresionOficial {
        display: block !important;
        margin: 0 0 10px 0 !important;
        border-bottom: 2px solid #0f172a !important;
        padding-bottom: 6px !important;
    }

    #reporteImpresionOficial h2 {
        font-size: 11pt !important;
        font-weight: 800 !important;
        margin: 0 0 2px 0 !important;
        color: #0f172a !important;
    }

    #reporteImpresionOficial h3 {
        font-size: 8pt !important;
        font-weight: 700 !important;
        margin: 0 0 2px 0 !important;
        color: #334155 !important;
    }

    #reporteImpresionOficial p,
    #reporteImpresionOficial div {
        font-size: 7pt !important;
        color: #475569 !important;
    }

    #vistaTarjetas,
    #vistaPerfil,
    #vistaAgenda,
    #vistaAlertas,
    #vistaContactos,
    #vistaPolizas {
        display: none !important;
    }

    #vistaTabla,
    #vistaTabla .table-responsive {
        display: block !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    #vistaTabla .table {
        table-layout: fixed !important;
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 0 !important;
        font-size: 6.8pt !important;
    }

    #vistaTabla th,
    #vistaTabla td {
        border: 1px solid #94a3b8 !important;
        color: #000000 !important;
        padding: 4px 5px !important;
        background: #ffffff !important;
        vertical-align: middle !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

    #vistaTabla th {
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        font-size: 6.8pt !important;
    }

    /* Ocultar el avatar para no malgastar espacio en ancho */
    #vistaTabla .avatar-sm {
        display: none !important;
    }

    /* Ocultar columna 9: Acciones (botones de ver/editar/eliminar) */
    #vistaTabla th:last-child,
    #vistaTabla td:last-child {
        display: none !important;
    }

    /* Quitar truncamiento para que el texto se lea completo */
    #vistaTabla .text-truncate {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 100% !important;
        display: inline !important;
    }

    /* Anchos matemáticos exactos que suman 100% para las 8 columnas */
    #vistaTabla th:nth-child(1),
    #vistaTabla td:nth-child(1) {
        width: 19% !important;
        font-weight: 700 !important;
    }

    #vistaTabla th:nth-child(2),
    #vistaTabla td:nth-child(2) {
        width: 5% !important;
        text-align: center !important;
    }

    #vistaTabla th:nth-child(3),
    #vistaTabla td:nth-child(3) {
        width: 9% !important;
    }

    #vistaTabla th:nth-child(4),
    #vistaTabla td:nth-child(4) {
        width: 15% !important;
    }

    #vistaTabla th:nth-child(5),
    #vistaTabla td:nth-child(5) {
        width: 15% !important;
    }

    #vistaTabla th:nth-child(6),
    #vistaTabla td:nth-child(6) {
        width: 15% !important;
    }

    #vistaTabla th:nth-child(7),
    #vistaTabla td:nth-child(7) {
        width: 14% !important;
    }

    #vistaTabla th:nth-child(8),
    #vistaTabla td:nth-child(8) {
        width: 8% !important;
        text-align: center !important;
    }

    #vistaTabla tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* =========================================================
       3. IMPRESIÓN DE FICHA CLÍNICA INDIVIDUAL EN MODAL
       ========================================================= */
    body.imprimiendo-ficha-modal #reporteImpresionOficial,
    body.imprimiendo-ficha-modal #vistaTabla,
    body.imprimiendo-ficha-modal #vistaTarjetas,
    body.imprimiendo-ficha-modal #vistaPerfil,
    body.imprimiendo-ficha-modal #vistaAgenda,
    body.imprimiendo-ficha-modal #vistaAlertas,
    body.imprimiendo-ficha-modal #vistaContactos,
    body.imprimiendo-ficha-modal #vistaPolizas,
    body:has(.modal.show) #reporteImpresionOficial,
    body:has(.modal.show) #vistaTabla,
    body:has(.modal.show) #vistaTarjetas {
        display: none !important;
    }

    .modal.show {
        position: static !important;
        display: block !important;
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal.show .modal-dialog {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal.show .modal-content {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .modal.show .modal-header {
        border-bottom: 2px solid #0f172a !important;
        padding: 8px 0 !important;
        display: flex !important;
        background: transparent !important;
        color: #000000 !important;
    }

    .modal.show .modal-header h5 {
        color: #000000 !important;
        font-weight: 800 !important;
    }

    .modal.show .modal-header .btn-close,
    .modal.show .modal-footer {
        display: none !important;
    }

    .modal.show .modal-body {
        padding: 12px 0 !important;
        color: #000000 !important;
    }

    /* =========================================================
       4. PROTOCOLOS Y EMERGENCIAS
       ========================================================= */
    .emergency-call-banner {
        border: 2px solid #dc2626 !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
    }

    .card-triage,
    .service-card {
        border: 1px solid #94a3b8 !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        margin-bottom: 15px !important;
    }
}

/* =========================================================
   SUITE DE ACCESIBILIDAD UNIVERSAL - WIDGET PREMIUM
   (Inspirado exactamente en el diseño de referencia)
   ========================================================= */

/* BOTÓN FLOTANTE TRIGGER ACCESIBILIDAD (INFERIOR DERECHO - COLORES RENOVADOS) */
.a11y-trigger-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%);
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.a11y-trigger-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 210, 255, 0.7);
    background: linear-gradient(135deg, #00b4d8 0%, #0056b3 100%);
    border-color: rgba(255, 255, 255, 0.45);
}

.a11y-trigger-btn:active {
    transform: scale(0.96);
}

.a11y-trigger-icon {
    font-size: 1.6rem;
    color: #ffffff;
}

.a11y-badge-a {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffcc00;
    color: #0b1120;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* BOTÓN FLOTANTE TRIGGER CONTACTO (JUSTO ARRIBA DE ACCESIBILIDAD) */
.contacto-trigger-btn {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.contacto-trigger-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.7);
    background: linear-gradient(135deg, #059669, #047857);
}

.contacto-trigger-btn:active {
    transform: scale(0.96);
}

.contacto-trigger-icon {
    font-size: 1.45rem;
    color: #ffffff;
}

.contacto-badge-online {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid #0c1322;
    box-shadow: 0 0 8px #22c55e;
    animation: contactoBlink 2s infinite;
}

@keyframes contactoBlink {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.25);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* PANEL FLOTANTE DE CONTACTO (ESTILO PREMIUM GLASSMORPHIC) */
.contacto-panel {
    position: fixed;
    bottom: 154px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #0c1322;
    background: rgba(12, 19, 34, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.25);
    padding: 22px 20px;
    color: #f1f5f9;
    z-index: 1055;
    display: none;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
}

.contacto-panel.abierto {
    display: block;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.contacto-panel::-webkit-scrollbar {
    width: 5px;
}

.contacto-panel::-webkit-scrollbar-track {
    background: transparent;
}

.contacto-panel::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.contacto-panel .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.contacto-panel .form-control {
    background: #111c2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.82rem;
    border-radius: 10px;
}

.contacto-panel .form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
    background: #0d1726;
    color: #ffffff;
}

.contacto-panel .form-control::placeholder {
    color: #64748b;
}

.btn-submit-contacto {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 50px;
    font-size: 0.88rem;
    padding: 10px 18px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
}

.btn-submit-contacto:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

/* PANEL FLOTANTE DE ACCESIBILIDAD (COLORES MODERNOS Y ACCESIBLES) */
.a11y-panel {
    position: fixed;
    bottom: 154px;
    right: 24px;
    width: 335px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 99, 235, 0.25);
    padding: 20px 18px;
    color: #f1f5f9;
    z-index: 1055;
    display: none;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
}

.a11y-panel.abierto {
    display: block;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.a11y-panel::-webkit-scrollbar {
    width: 5px;
}

.a11y-panel::-webkit-scrollbar-track {
    background: transparent;
}

.a11y-panel::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

/* HEADER DEL PANEL */
.a11y-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.a11y-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.04em;
    margin: 0;
}

.a11y-header-title i {
    font-size: 1.2rem;
}

.a11y-btn-reset {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.a11y-btn-reset:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
}

/* TITULO DE SECCIÓN */
.a11y-sec-title {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.a11y-sec-title i {
    color: #00d2ff;
    font-size: 0.85rem;
}

.a11y-section {
    margin-bottom: 18px;
}

/* SECCIÓN 1: TEMAS DE COLOR (SWATCHES) */
.a11y-themes-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    text-align: center;
}

.a11y-theme-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.a11y-swatch {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid transparent;
}

.a11y-swatch-default {
    background: #0f172a;
    border-color: #334155;
}

.a11y-swatch-claro {
    background: #ffffff;
    border-color: #cbd5e1;
}

.a11y-swatch-azul {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-color: #38bdf8;
}

.a11y-swatch-sepia {
    background: #ecd7bc;
    border-color: #d4b896;
}

.a11y-swatch-contraste {
    background: #000000;
    border-color: #ffff00;
}

.a11y-theme-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 6px;
    transition: color 0.2s ease;
}

/* TEMA ACTIVO: ANILLO DOBLE RESALTADO */
.a11y-theme-item.active .a11y-swatch {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.a11y-theme-item.active .a11y-theme-label {
    color: #60a5fa;
    font-weight: 700;
}

/* SECCIÓN 2: TAMAÑO DE TEXTO (SLIDER) */
.a11y-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
}

.a11y-letter-small {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.a11y-letter-large {
    font-size: 1.25rem;
    font-weight: 800;
    color: #94a3b8;
}

.a11y-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #1e293b;
    outline: none;
    cursor: pointer;
}

.a11y-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
    transition: transform 0.15s ease;
}

.a11y-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.a11y-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.a11y-slider-value {
    text-align: center;
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 6px;
}

/* SECCIONES SEGMENTADAS: BOTONES DE FUENTE, INTERLINEADO, FOCO */
.a11y-btn-group {
    display: flex;
    gap: 6px;
}

.a11y-pill-btn {
    flex: 1;
    background: #101a2c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 8px 6px;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.a11y-pill-btn:hover {
    color: #f1f5f9;
    background: #16243d;
    border-color: rgba(59, 130, 246, 0.3);
}

.a11y-pill-btn.active {
    background: rgba(37, 99, 235, 0.2) !important;
    border: 1.5px solid #3b82f6 !important;
    color: #93c5fd !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
    font-weight: 700;
}

/* SECCIÓN 6: LECTURA POR VOZ */
.a11y-voice-btn {
    width: 100%;
    background: #101a2c;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.a11y-voice-btn:hover {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
}

.a11y-voice-btn.reproduciendo {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
    animation: a11yPulse 1.5s infinite;
}

@keyframes a11yPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* AVATARES RÁPIDOS */
.avatar-quick-pick {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.avatar-quick-pick:hover {
    transform: scale(1.15);
    border-color: #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

/* =========================================================
   DEFINICIÓN COMPLETA DE LOS 5 TEMAS VISUALES
   ========================================================= */

/* 1. TEMA DEFAULT (MODERNO DARK SLATE / MIDNIGHT) */
.tema-default,
.tema-default body {
    background-color: #0b1120 !important;
    color: #f1f5f9 !important;
}

.tema-default .bg-white,
.tema-default .bg-light,
.tema-default .card,
.tema-default .student-card,
.tema-default .service-card,
.tema-default .triage-card,
.tema-default .modal-content,
.tema-default .student-health-sheet,
.tema-default .health-metric-card,
.tema-default .dropdown-menu {
    background-color: #152238 !important;
    color: #f8fafc !important;
    border-color: #243552 !important;
}

.tema-default h1,
.tema-default h2,
.tema-default h3,
.tema-default h4,
.tema-default h5,
.tema-default h6 {
    color: #f8fafc !important;
}

.tema-default .text-muted,
.tema-default .text-secondary {
    color: #94a3b8 !important;
}

.tema-default .text-dark:not(.badge):not(.alert *) {
    color: #f8fafc !important;
}

.tema-default .table {
    color: #f1f5f9 !important;
    background-color: #152238 !important;
    border-color: #243552 !important;
}

.tema-default .table th {
    background-color: #0b1120 !important;
    color: #38bdf8 !important;
    border-color: #243552 !important;
}

.tema-default .table td {
    background-color: #152238 !important;
    color: #f1f5f9 !important;
    border-color: #243552 !important;
}

.tema-default .form-control,
.tema-default .form-select {
    background-color: #0b1120 !important;
    color: #f8fafc !important;
    border-color: #2a3f61 !important;
}

.tema-default .form-control:focus,
.tema-default .form-select:focus {
    border-color: #00d2ff !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 210, 255, 0.25) !important;
}

.tema-default .input-group-text {
    background-color: #152238 !important;
    color: #94a3b8 !important;
    border-color: #2a3f61 !important;
}

.tema-default .recaptcha-widget {
    background-color: #152238 !important;
    border-color: #2a3f61 !important;
}

.tema-default .recaptcha-text {
    color: #f8fafc !important;
}

.tema-default .border,
.tema-default .border-bottom,
.tema-default .border-top {
    border-color: #243552 !important;
}

/* 2. TEMA CLARO (CLÍNICO / BLANCO PURO) */
.tema-claro,
.tema-claro body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.tema-claro main {
    background-color: #f1f5f9 !important;
}

.tema-claro .bg-white,
.tema-claro .card,
.tema-claro .student-card,
.tema-claro .service-card,
.tema-claro .triage-card,
.tema-claro .modal-content,
.tema-claro .student-health-sheet,
.tema-claro .health-metric-card,
.tema-claro .dropdown-menu {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

.tema-claro h1,
.tema-claro h2,
.tema-claro h3,
.tema-claro h4,
.tema-claro h5,
.tema-claro h6,
.tema-claro .text-dark {
    color: #0f172a !important;
}

.tema-claro .text-muted,
.tema-claro .text-secondary {
    color: #64748b !important;
}

.tema-claro .table {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.tema-claro .table th {
    background-color: #f8fafc !important;
    color: #0369a1 !important;
    border-color: #e2e8f0 !important;
}

.tema-claro .table td {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #f1f5f9 !important;
}

.tema-claro .form-control,
.tema-claro .form-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.tema-claro .input-group-text {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* 3. TEMA AZUL NOCHE (DEEP OCEAN MIDNIGHT) */
.tema-azul-noche,
.tema-azul-noche body {
    background-color: #050d1a !important;
    color: #e2e8f0 !important;
}

.tema-azul-noche .hero,
.tema-azul-noche .hero-emergencias,
.tema-azul-noche .hero-estudiantes,
.tema-azul-noche .hero-consulta {
    background: linear-gradient(135deg, #03142e, #0a254d) !important;
}

.tema-azul-noche .card,
.tema-azul-noche .bg-white,
.tema-azul-noche .bg-light,
.tema-azul-noche .student-card,
.tema-azul-noche .service-card,
.tema-azul-noche .triage-card,
.tema-azul-noche .modal-content,
.tema-azul-noche .student-health-sheet,
.tema-azul-noche .health-metric-card,
.tema-azul-noche .dropdown-menu {
    background-color: #0c1a30 !important;
    color: #f8fafc !important;
    border-color: #172e54 !important;
}

.tema-azul-noche h1,
.tema-azul-noche h2,
.tema-azul-noche h3,
.tema-azul-noche h4,
.tema-azul-noche h5,
.tema-azul-noche h6 {
    color: #f8fafc !important;
}

.tema-azul-noche .text-dark:not(.badge):not(.alert *) {
    color: #f8fafc !important;
}

.tema-azul-noche .text-muted,
.tema-azul-noche .text-secondary {
    color: #7dd3fc !important;
}

.tema-azul-noche .table {
    color: #e2e8f0 !important;
    background-color: #0c1a30 !important;
    border-color: #172e54 !important;
}

.tema-azul-noche .table th {
    background-color: #050d1a !important;
    color: #38bdf8 !important;
    border-color: #172e54 !important;
}

.tema-azul-noche .table td {
    background-color: #0c1a30 !important;
    color: #e2e8f0 !important;
    border-color: #172e54 !important;
}

.tema-azul-noche .form-control,
.tema-azul-noche .form-select {
    background-color: #061122 !important;
    color: #f8fafc !important;
    border-color: #1f3b6a !important;
}

.tema-azul-noche .form-control:focus,
.tema-azul-noche .form-select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25) !important;
}

.tema-azul-noche .input-group-text {
    background-color: #0c1a30 !important;
    color: #7dd3fc !important;
    border-color: #1f3b6a !important;
}

/* 4. TEMA SEPIA (CONFORT VISUAL Y CALIDEZ) */
.tema-sepia,
.tema-sepia body {
    background-color: #f4ecd8 !important;
    color: #433422 !important;
}

.tema-sepia .hero,
.tema-sepia .hero-emergencias,
.tema-sepia .hero-estudiantes,
.tema-sepia .hero-consulta {
    background: linear-gradient(135deg, #4a3420, #362516) !important;
}

.tema-sepia .card,
.tema-sepia .bg-white,
.tema-sepia .bg-light,
.tema-sepia .student-card,
.tema-sepia .service-card,
.tema-sepia .triage-card,
.tema-sepia .modal-content,
.tema-sepia .student-health-sheet,
.tema-sepia .health-metric-card,
.tema-sepia .dropdown-menu {
    background-color: #faf4e8 !important;
    color: #433422 !important;
    border-color: #e2d2ba !important;
}

.tema-sepia .text-dark,
.tema-sepia h1,
.tema-sepia h2,
.tema-sepia h3,
.tema-sepia h4,
.tema-sepia h5,
.tema-sepia h6 {
    color: #2c1e10 !important;
}

.tema-sepia .text-muted,
.tema-sepia .text-secondary {
    color: #7c6853 !important;
}

.tema-sepia .table {
    color: #433422 !important;
    background-color: #faf4e8 !important;
    border-color: #e2d2ba !important;
}

.tema-sepia .table th {
    background-color: #ece1cb !important;
    color: #854d0e !important;
    border-color: #e2d2ba !important;
}

.tema-sepia .table td {
    background-color: #faf4e8 !important;
    color: #433422 !important;
    border-color: #e2d2ba !important;
}

.tema-sepia .form-control,
.tema-sepia .form-select {
    background-color: #ffffff !important;
    color: #433422 !important;
    border-color: #d8c4a7 !important;
}

.tema-sepia .btn-primary {
    background-color: #a16207 !important;
    border-color: #854d0e !important;
    color: #ffffff !important;
}

.tema-sepia .btn-primary:hover {
    background-color: #854d0e !important;
}

/* 5. TEMA CONTRASTE (WCAG AAA - NEGRO & AMARILLO NEÓN) */
.tema-contraste,
.tema-contraste body {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.tema-contraste .card,
.tema-contraste .bg-white,
.tema-contraste .bg-light,
.tema-contraste .modal-content,
.tema-contraste .student-card,
.tema-contraste .service-card,
.tema-contraste .triage-card,
.tema-contraste .student-health-sheet,
.tema-contraste .health-metric-card,
.tema-contraste .dropdown-menu {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffff00 !important;
}

.tema-contraste h1,
.tema-contraste h2,
.tema-contraste h3,
.tema-contraste h4,
.tema-contraste h5,
.tema-contraste h6,
.tema-contraste .text-dark,
.tema-contraste .text-primary {
    color: #ffff00 !important;
}

.tema-contraste .text-secondary,
.tema-contraste .text-muted {
    color: #e2e8f0 !important;
}

.tema-contraste p,
.tema-contraste li,
.tema-contraste label,
.tema-contraste .form-label,
.tema-contraste td {
    color: #ffffff !important;
}

.tema-contraste a {
    color: #ffff00 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

.tema-contraste .btn-primary,
.tema-contraste .btn-info,
.tema-contraste .btn-outline-primary {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffff00 !important;
    font-weight: 800 !important;
}

.tema-contraste .btn-primary *,
.tema-contraste .btn-info *,
.tema-contraste .btn-outline-primary * {
    color: #000000 !important;
}

.tema-contraste .btn-success {
    background-color: #00ff88 !important;
    color: #000000 !important;
    border: 2px solid #00ff88 !important;
    font-weight: 800 !important;
}

.tema-contraste .btn-success * {
    color: #000000 !important;
}

.tema-contraste .btn-danger {
    background-color: #ff3366 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    font-weight: 800 !important;
}

.tema-contraste .btn-danger * {
    color: #ffffff !important;
}

.tema-contraste .form-control,
.tema-contraste .form-select {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
    font-weight: bold !important;
}

.tema-contraste .table,
.tema-contraste .table th,
.tema-contraste .table td {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffff00 !important;
}

.tema-contraste .table th {
    color: #ffff00 !important;
}

/* REGLAS GLOBALES PARA BADGES, ALERTAS Y PLACEHOLDERS EN TODOS LOS TEMAS */
.badge.bg-warning,
.badge.bg-warning-subtle,
.badge.bg-light,
.badge.bg-info-subtle,
.tema-default .badge.bg-warning,
.tema-azul-noche .badge.bg-warning,
.tema-sepia .badge.bg-warning,
.tema-contraste .badge.bg-warning,
.tema-default .badge.bg-light,
.tema-azul-noche .badge.bg-light,
.tema-default .alert-warning,
.tema-azul-noche .alert-warning {
    color: #0f172a !important;
}

.badge.bg-warning {
    background-color: #f59e0b !important;
}

.badge.bg-light {
    background-color: #f1f5f9 !important;
}

.badge.bg-danger,
.badge.bg-success,
.badge.bg-primary,
.badge.bg-secondary,
.badge.bg-dark {
    color: #ffffff !important;
}

.tema-contraste .badge {
    border: 1px solid #ffff00 !important;
    font-weight: 800 !important;
}

.tema-contraste .badge.bg-warning,
.tema-contraste .badge.bg-light {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

.tema-contraste .badge.bg-danger {
    background-color: #ff3366 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.tema-contraste .badge.bg-success {
    background-color: #00ff88 !important;
    color: #000000 !important;
    border-color: #00ff88 !important;
}

.tema-contraste .badge.bg-primary,
.tema-contraste .badge.bg-info {
    background-color: #00e5ff !important;
    color: #000000 !important;
    border-color: #00e5ff !important;
}

/* PLACEHOLDERS CLAROS EN TODOS LOS MODOS */
.form-control::placeholder,
.tema-default .form-control::placeholder,
.tema-azul-noche .form-control::placeholder,
.tema-contraste .form-control::placeholder,
.tema-sepia .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* PROTECCIÓN COMPLETA PARA EL PANEL DE ACCESIBILIDAD Y CONTACTO */
.a11y-panel,
.contacto-panel {
    color: #f1f5f9 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

.a11y-panel .a11y-header-title { color: #60a5fa !important; }
.a11y-panel .a11y-sec-title { color: #94a3b8 !important; }
.a11y-panel .a11y-sec-title i { color: #00d2ff !important; }
.a11y-panel .a11y-theme-label { color: #cbd5e1 !important; }
.a11y-panel .a11y-btn-reset { color: #94a3b8 !important; background: transparent !important; }
.a11y-panel .a11y-btn-reset:hover { color: #60a5fa !important; }
.a11y-panel .a11y-tool-btn { background: #1e293b !important; color: #e2e8f0 !important; border: 1px solid #334155 !important; }
.a11y-panel .a11y-tool-btn.active { background: #0284c7 !important; color: #ffffff !important; border-color: #38bdf8 !important; }
.a11y-panel .a11y-counter-val { color: #38bdf8 !important; }
.a11y-panel .a11y-pill-btn { background: #1e293b !important; color: #cbd5e1 !important; border-color: rgba(255, 255, 255, 0.1) !important; }
.a11y-panel .a11y-pill-btn.active { background: rgba(37, 99, 235, 0.3) !important; border-color: #3b82f6 !important; color: #93c5fd !important; }


/* =========================================================
   ASISTENCIAS TIPOGRÁFICAS Y DE LECTURA
   ========================================================= */

/* TIPOS DE FUENTE */
.font-sans,
.font-sans body {
    font-family: 'Montserrat', 'Inter', system-ui, sans-serif !important;
}

.font-serif,
.font-serif body,
.font-serif h1,
.font-serif h2,
.font-serif h3,
.font-serif p,
.font-serif span,
.font-serif button,
.font-serif input {
    font-family: 'Merriweather', 'Georgia', serif !important;
}

.font-mono,
.font-mono body,
.font-mono h1,
.font-mono h2,
.font-mono h3,
.font-mono p,
.font-mono span,
.font-mono button,
.font-mono input {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
}

.font-dislexia,
.font-dislexia body,
.font-dislexia h1,
.font-dislexia h2,
.font-dislexia h3,
.font-dislexia p,
.font-dislexia span,
.font-dislexia button,
.font-dislexia input,
.font-dislexia select {
    font-family: 'OpenDyslexic', 'Verdana', 'Comic Sans MS', sans-serif !important;
    letter-spacing: 0.055em !important;
    word-spacing: 0.1em !important;
    line-height: 1.85 !important;
}

/* INTERLINEADO */
.spacing-amplio body,
.spacing-amplio p,
.spacing-amplio li,
.spacing-amplio td,
.spacing-amplio div {
    line-height: 1.85 !important;
}

.spacing-maximo body,
.spacing-maximo p,
.spacing-maximo li,
.spacing-maximo td,
.spacing-maximo div {
    line-height: 2.2 !important;
}

/* INDICADOR DE FOCO */
.foco-resaltado *:focus-visible,
.foco-resaltado a:focus,
.foco-resaltado button:focus,
.foco-resaltado input:focus,
.foco-resaltado select:focus {
    outline: 3px solid #00d2ff !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.8) !important;
}

/* =========================================================
   8. AISLAMIENTO DEL PORTAL ADMIN (ACCESO SALUD)
   Los widgets flotantes (Accesibilidad y Contacto) solo
   deben aparecer en páginas de cara al usuario / estudiante.
   ========================================================= */
body.pagina-admin #a11yTriggerBtn,
body.pagina-admin #a11yPanel,
body.pagina-admin #contactoTriggerBtn,
body.pagina-admin #contactoPanel {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* =========================================================
   9. CAMPANITA DE NOTIFICACIONES Y AGENDA ADMIN
   ========================================================= */
.btn-campana-notif {
    position: relative;
    transition: all 0.25s ease;
    border-radius: 50px;
    font-size: 0.82rem;
}

.btn-campana-notif:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.campana-animada {
    display: inline-block;
    animation: bellSwing 2s infinite ease-in-out;
}

@keyframes bellSwing {

    0%,
    100% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-14deg);
    }

    30% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(0);
    }
}

.badge-campana-notif {
    font-size: 0.72rem;
    padding: 0.3em 0.55em;
    animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {

    0%,
    100% {
        transform: translate(50%, -50%) scale(1);
    }

    50% {
        transform: translate(50%, -50%) scale(1.15);
    }
}

/* TARJETAS DE SOLICITUD DE AGENDA */
.notif-solicitud-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    overflow: hidden;
}

.notif-solicitud-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.notif-solicitud-card.pendiente {
    border-left: 5px solid #f59e0b;
}

.notif-solicitud-card.aceptada {
    border-left: 5px solid #10b981;
    background: #f8fafc;
}

.notif-solicitud-card.rechazada {
    border-left: 5px solid #ef4444;
    background: #f8fafc;
}

/* SIMULADOR DE DESPACHO DE CORREO INSTITUCIONAL */
.email-client-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.email-client-header {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.email-client-body {
    padding: 18px;
    background: #f8fafc;
}

.email-field-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

.email-field-label {
    width: 90px;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
}

.email-status-stamp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* =========================================================
   10. PESTAÑAS CLÍNICAS PREMIUM (MÁXIMA VISIBILIDAD & ORGANIZACIÓN)
   ========================================================= */
.contenedor-pestanas-clinicas {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.pestanas-grid-clinicas {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.pestanas-grid-clinicas .nav-item {
    width: 100% !important;
    margin: 0 !important;
}

.btn-tab-clinica {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    text-align: center;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: 100% !important;
    height: 100% !important;
}

.btn-tab-clinica:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1) !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.btn-tab-clinica .tab-titulo {
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-tab-clinica .tab-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.2s ease;
}

@media (max-width: 820px) {
    .pestanas-grid-clinicas {
        grid-template-columns: 1fr !important;
    }
}

/* Tab 1: Directorio en Tarjetas Clínicas (Activo) */
.btn-tab-clinica.tab-tarjetas.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4) !important;
}

.btn-tab-clinica.tab-tarjetas.active i {
    color: #ffffff !important;
}

.btn-tab-clinica.tab-tarjetas.active .tab-badge {
    background-color: #ffffff !important;
    color: #1d4ed8 !important;
    border: none !important;
}

/* Tab 2: Historial Médico General (Tabla) (Activo) */
.btn-tab-clinica.tab-tabla.active {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #047857 !important;
    box-shadow: 0 8px 22px rgba(5, 150, 105, 0.4) !important;
}

.btn-tab-clinica.tab-tabla.active i {
    color: #ffffff !important;
}

.btn-tab-clinica.tab-tabla.active .tab-badge {
    background-color: #ffffff !important;
    color: #047857 !important;
    border: none !important;
}

/* Tab 3: Mi Perfil & Foto Institucional (Activo) */
.btn-tab-clinica.tab-perfil.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.4) !important;
}

.btn-tab-clinica.tab-perfil.active i {
    color: #ffffff !important;
}

.btn-tab-clinica.tab-perfil.active .tab-badge {
    background-color: #ffffff !important;
    color: #0284c7 !important;
    border: none !important;
}

/* =========================================================
   11. BOTÓN CAMPANITA SUPERIOR DE NOTIFICACIONES (MÁS ARRIBA)
   ========================================================= */
.btn-campana-superior {
    background: #fef08a !important;
    border: 2px solid #eab308 !important;
    color: #713f12 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25) !important;
    transition: all 0.25s ease !important;
}

.btn-campana-superior:hover {
    background: #fde047 !important;
    border-color: #ca8a04 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(234, 179, 8, 0.4) !important;
    color: #422006 !important;
}

/* Adaptación para Temas Oscuros */
.tema-oscuro .contenedor-pestanas-clinicas,
.tema-azul-noche .contenedor-pestanas-clinicas {
    background: #1e293b;
    border-color: #334155;
}

.tema-oscuro .btn-tab-clinica,
.tema-azul-noche .btn-tab-clinica {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.tema-oscuro .btn-tab-clinica:hover,
.tema-azul-noche .btn-tab-clinica:hover {
    border-color: #64748b !important;
    color: #ffffff !important;
}