:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #172554;
    --accent-color: #0d9488;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --info-bg: #e0f2fe;
    --info-text: #075985;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
}

/* ========================================================
   ARQUITECTURA DE DISEÑO: SIDEBAR OSCURO + TOPBAR (CHRONOS)
   ======================================================== */
.portal-layout-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #070d1e;
}

/* 1. SIDEBAR LATERAL IZQUIERDA */
.portal-sidebar {
    width: 275px;
    min-width: 275px;
    height: 100vh;
    background: linear-gradient(180deg, #070d1e 0%, #070d1e 65%, rgba(7, 13, 30, 0.92) 100%), url('../img/campus_banner.jpg') no-repeat bottom center / cover;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 1045;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

/* Modo Colapsado Desktop (74px) */
.portal-sidebar.collapsed {
    width: 74px;
    min-width: 74px;
}

.portal-sidebar.collapsed .sidebar-brand-box {
    padding: 16px 8px;
    justify-content: center;
}

.portal-sidebar.collapsed .sidebar-brand-text {
    display: none !important;
}

.portal-sidebar.collapsed .sidebar-section-label {
    display: none !important;
}

.portal-sidebar.collapsed .sidebar-nav-list .nav-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

.portal-sidebar.collapsed .sidebar-nav-list .nav-link span,
.portal-sidebar.collapsed .sidebar-nav-list .nav-link .badge {
    display: none !important;
}

.portal-sidebar.collapsed .sidebar-nav-list .nav-link i {
    font-size: 1.3rem;
    width: auto;
    margin: 0;
}

.portal-sidebar.collapsed .sidebar-user-footer {
    justify-content: center;
    padding: 12px 6px;
}

.portal-sidebar.collapsed .sidebar-user-footer .sidebar-user-text,
.portal-sidebar.collapsed .sidebar-user-footer .sidebar-logout-btn {
    display: none !important;
}

.sidebar-brand-box {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #050a17;
}

.sidebar-logo-glow img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.4));
}

.sidebar-brand-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.sidebar-brand-subtitle {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Scrollbar discreto de la barra lateral */
.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.sidebar-menu-wrapper:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #475569;
    text-transform: uppercase;
    padding: 14px 14px 6px 14px;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-list .nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-list .nav-link {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    background: transparent;
}

.sidebar-nav-list .nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    color: #64748b;
    transition: color 0.2s ease;
}

.sidebar-nav-list .nav-link:hover:not(.active) {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-list .nav-link:hover:not(.active) i {
    color: #94a3b8;
}

/* Active State: Azul corporativo (#2563eb) con brillo sutil */
.sidebar-nav-list .nav-link.active {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
    border-color: rgba(96, 165, 250, 0.3);
}

.sidebar-nav-list .nav-link.active i {
    color: #ffffff !important;
}

/* Footer del Sidebar: Perfil del Usuario */
.sidebar-user-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: #040813;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.sidebar-user-name {
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.82rem;
}

.sidebar-user-role {
    color: #818cf8;
    font-size: 0.68rem;
    font-weight: 600;
}

.sidebar-logout-btn {
    color: #94a3b8;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* 2. ÁREA PRINCIPAL (HEADER Y CUERPO) */
.portal-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: #f8fafc;
    min-width: 0;
}

/* Topbar Superior */
.portal-topbar {
    height: 64px;
    min-height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    z-index: 10;
}

.status-indicator-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.portal-topbar .module-switcher-container {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.portal-topbar .module-switcher-btn {
    color: #64748b;
}

.portal-topbar .module-switcher-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

.portal-topbar .module-switcher-btn.active {
    color: #ffffff;
    background: #2563eb;
}

.portal-content-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 30px;
    background-color: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.portal-content-body::-webkit-scrollbar {
    width: 6px;
}

.portal-content-body::-webkit-scrollbar-track {
    background: transparent;
}

.portal-content-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.portal-content-body:hover::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
}

/* ========================================================
   COMPONENTES PREMIUM DEL DASHBOARD PRINCIPAL (CHRONOS UI)
   ======================================================== */

/* 1. Tarjeta Panorámica de Bienvenida con Campus de Fondo */
.welcome-banner-card {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.93) 48%, rgba(255, 255, 255, 0.45) 100%), 
                url('../img/campus_banner.jpg') no-repeat center right / cover;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    padding: 22px 28px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.welcome-sun-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fef9c3;
    border: 1px solid #fef08a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.18);
    flex-shrink: 0;
}

/* 2. Tarjetas Superiores de Métricas (KPI Cards) */
.kpi-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -3px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.kpi-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.kpi-big-number {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

/* 3. Píldoras de Filtro del Gráfico de Asistencia */
.chart-filter-pill {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-filter-pill.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}

.chart-filter-pill:hover:not(.active) {
    background: #f1f5f9;
    color: #0f172a;
}

/* Semántica Estricta de Colores y Tipografía del Sistema RNS */
.btn-primary, .btn-primary:active, .btn-primary:focus {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    font-weight: 600;
}
.btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.btn-outline-primary {
    color: #2563eb !important;
    border-color: #2563eb !important;
    font-weight: 600;
}
.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary:focus {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Botón Dark Glass para sidebar collapse */
.btn-dark-glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    transition: all 0.2s ease;
}
.btn-dark-glass:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* Estado Vacío Elegante (Empty States) */
.empty-state-card {
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.2s ease;
}
.empty-state-card:hover {
    border-color: #94a3b8;
    background: #fafafa;
}

/* 4. Mini Donut SVG & Legend */
.donut-center-pct {
    font-size: 1.5rem;
    font-weight: 800;
    fill: #0f172a;
}

.donut-center-sub {
    font-size: 0.65rem;
    font-weight: 600;
    fill: #64748b;
    text-transform: uppercase;
}

/* 5. Cajas de Estado del Sistema */
.system-status-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.system-status-box:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Responsive Drawer para Móviles / Tablets */
@media (max-width: 991.98px) {
    .portal-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
    }

    .portal-sidebar.show-mobile {
        transform: translateX(0);
    }

    .portal-topbar {
        padding: 0 16px;
    }

    .portal-content-body {
        padding: 16px;
    }
}

/* Legacy Navbar Fallback */
.navbar-portal {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Cards & Metric Badges */
.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.metric-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Custom Nav Tabs */
.nav-pills-custom .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-pills-custom .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.nav-pills-custom .nav-link:hover:not(.active) {
    background-color: rgba(30, 58, 138, 0.06);
    color: var(--primary-color);
}

/* Badges for Attendance States */
.badge-presente {
    background-color: var(--success-bg);
    color: var(--success-text);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge-injustificada {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge-justificada {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge-tardia {
    background-color: var(--info-bg);
    color: var(--info-text);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge-escape {
    background-color: #f3e8ff;
    color: #6b21a8;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Tables */
.table-custom {
    border-collapse: separate;
    border-spacing: 0 6px;
}

.table-custom thead th {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}

.table-custom tbody tr {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.table-custom tbody tr:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    transform: scale(1.002);
}

.table-custom tbody td {
    border: none;
    padding: 14px 16px;
    vertical-align: middle;
}

.table-custom tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-custom tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ==========================================================================
   VISTA 1: LOGIN ENTERPRISE AURORA MESH & LIVING SHOWCASE UI
   ========================================================================== */

.login-page-wrapper {
    background-color: #07101e;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.5) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.35) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.3) 0px, transparent 50%);
    position: relative;
    overflow-x: hidden;
}

/* Columna Hero Izquierda */
.login-hero-side {
    background: transparent;
    position: relative;
    z-index: 2;
}

/* Orbes de iluminación ambiental animados */
.hero-ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 1;
    animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35), rgba(37, 99, 235, 0.1));
    top: -40px;
    left: 5%;
}

.orb-2 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.08));
    bottom: -60px;
    left: 25%;
    animation-delay: -5s;
}

.orb-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.28), rgba(6, 182, 212, 0.08));
    top: 30%;
    right: 2%;
    animation-delay: -9s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, 20px) scale(1.08); }
    100% { transform: translate(-20px, -15px) scale(0.95); }
}

.badge-pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.text-gradient-cyan {
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphic Command Terminal Showcase */
.live-showcase-terminal {
    background: rgba(13, 27, 49, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.showcase-widget {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 12px 14px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.showcase-widget:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.4);
}

.bento-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bg-emerald {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.bg-cyan {
    background: rgba(6, 182, 212, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.bg-amber {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.bg-purple {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.35);
}

.bento-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #ffffff;
    line-height: 1.2;
}

.bento-desc {
    font-size: 0.74rem;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.35;
}

.live-feed-ticker {
    background: rgba(16, 185, 129, 0.1);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 14px;
    font-size: 0.73rem;
    color: #a7f3d0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Columna Derecha: Tarjeta de Acceso Flotante */
.login-form-side {
    background: transparent;
    position: relative;
    z-index: 2;
}

.login-glass-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 26px;
    box-shadow: 0 30px 65px -15px rgba(0, 0, 0, 0.45), 0 0 35px rgba(56, 189, 248, 0.15);
}

.login-brand-logo {
    max-height: 82px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(30, 58, 138, 0.22));
    transition: transform 0.3s ease;
}

.login-brand-logo:hover {
    transform: scale(1.03);
}

/* Modern Input Groups */
.input-group-modern {
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.input-group-modern:focus-within {
    background-color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.input-group-modern .input-group-text {
    background: transparent;
    border: none;
    color: #64748b;
    padding-left: 14px;
    padding-right: 8px;
    font-size: 1.05rem;
}

.input-group-modern .form-control {
    border: none;
    padding: 10px 12px;
    font-size: 0.92rem;
    color: #0f172a;
    background: transparent;
}

.input-group-modern .form-control:focus {
    box-shadow: none;
    outline: none;
}

.btn-password-toggle {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 0 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.btn-password-toggle:hover {
    color: #1e293b;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    background-size: 200% auto;
    color: #ffffff;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider-with-text span {
    padding: 0 12px;
}

/* Tarjeta Legacy Retenida por compatibilidad */
.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #ffffff;
    padding: 35px 30px;
    text-align: center;
}

.input-group-modern:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-group-modern .input-group-text {
    background: transparent;
    border: none;
    color: #64748b;
    padding-left: 14px;
    padding-right: 8px;
    font-size: 1.05rem;
}

.input-group-modern .form-control {
    border: none;
    padding: 10px 12px;
    font-size: 0.92rem;
    color: #0f172a;
    background: transparent;
}

.input-group-modern .form-control:focus {
    box-shadow: none;
    outline: none;
}

.btn-password-toggle {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 0 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.btn-password-toggle:hover {
    color: #1e293b;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider-with-text span {
    padding: 0 12px;
}

/* Tarjeta Legacy Retenida por compatibilidad */
.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #ffffff;
    padding: 35px 30px;
    text-align: center;
}

/* Section Filter Pills */
.section-pill {
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.section-pill:hover, .section-pill.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

/* Print Friendly */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: #ffffff;
    }
    .metric-card, .table-custom tbody tr {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ========================================================
   CONMUTADOR DE MÓDULOS DE SUITE (ECOSISTEMA INSTITUCIONAL)
   ======================================================== */
.module-switcher-container {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border-radius: 50rem;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.module-switcher-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.module-switcher-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.module-switcher-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.module-switcher-btn.active-chronos {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.module-status-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.badge-locked {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-active-mod {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Modal de Upselling / Activación de Módulo */
.modal-upsell-header-chronos {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #4c1d95 100%);
}

.modal-upsell-header-academico {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0369a1 100%);
}

.upsell-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.upsell-feature-item:hover {
    transform: translateX(4px);
    background: #ffffff;
    border-color: #cbd5e1;
}

.upsell-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ===================================================
   MÓDULO: COMUNICADOS MASIVOS & SMARTPHONE MOCKUP
   =================================================== */

.smartphone-preview-wrapper {
    max-width: 380px;
    margin: 0 auto;
}

.smartphone-device {
    background: #0f172a;
    border: 10px solid #1e293b;
    border-radius: 42px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 2px #334155;
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}

.smartphone-notch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px 4px 18px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    position: relative;
    z-index: 10;
}

.smartphone-notch-pill {
    width: 96px;
    height: 20px;
    background: #000000;
    border-radius: 20px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.smartphone-camera-dot {
    width: 7px;
    height: 7px;
    background: #1e293b;
    border-radius: 50%;
}

.smartphone-screen-body {
    flex: 1;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 16px 14px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.push-notification-banner {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 12px 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    animation: slideDownPush 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownPush {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.push-app-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.push-app-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: bold;
}

.push-app-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #475569;
}

.push-app-time {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-left: auto;
}

.push-msg-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 4px;
}

.push-msg-body {
    font-size: 0.78rem;
    color: #334155;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phone-inapp-preview-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.badge-tipo-urgente {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    animation: pulseUrgente 2s infinite;
}

@keyframes pulseUrgente {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.badge-tipo-importante {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.badge-tipo-convocatoria {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

.badge-tipo-informativo {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
}

.comunicado-historial-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comunicado-historial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.08);
}

.comunicado-historial-card.urgente {
    border-left-color: #ef4444;
}

.comunicado-historial-card.importante {
    border-left-color: #f59e0b;
}

.comunicado-historial-card.convocatoria {
    border-left-color: #8b5cf6;
}

/* ========================================================
   MÓDULO DE COMEDOR ESCOLAR & TIQUETES PANEA - MEP
   ======================================================== */
.badge-comedor-reservado {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 700;
}

.badge-comedor-canjeado {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-weight: 700;
}

.badge-comedor-cancelado {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.comedor-cutoff-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 16px 20px;
}

.scanner-viewport-box {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #090d16;
    border: 2px solid #1e293b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-laser-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #22c55e;
    box-shadow: 0 0 12px #22c55e;
    animation: scannerLaser 2s ease-in-out infinite alternate;
    z-index: 5;
}

@keyframes scannerLaser {
    0% { top: 20%; opacity: 0.8; }
    50% { opacity: 1; }
    100% { top: 80%; opacity: 0.8; }
}

.val-result-card {
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.val-result-autorizado {
    background: #f0fdf4;
    border-color: #22c55e;
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.25);
    animation: pulseAutorizado 0.5s ease;
}

@keyframes pulseAutorizado {
    0% { transform: scale(0.96); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.val-result-denegado {
    background: #fef2f2;
    border-color: #ef4444;
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.25);
    animation: shakeDenegado 0.4s ease;
}

@keyframes shakeDenegado {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.val-result-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.25);
}

