@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   FEVEEM - SALA SITUACIONAL Y CONTROL DE MANDO NACIONAL
   DISEÑO EJECUTIVO EN SHELL: SIDEBAR LATERAL + CANVAS ESPACIOSO
   COLORES DESCANSADOS A LA VISTA (APROBADOS) + DISTRIBUCIÓN REESTRUCTURADA
   ========================================================================== */

/* 1. PALETA DE COLORES CALIBRADA (MODO OSCURO PREDETERMINADO) */
:root, [data-theme="dark"] {
    color-scheme: dark;
    --adm-bg: #0b1120;
    --adm-surface: #151e32;
    --adm-surface-alt: #1c2740;
    --adm-border: rgba(255, 255, 255, 0.1);
    --adm-border-light: rgba(255, 255, 255, 0.05);

    --adm-text-title: #f8fafc;
    --adm-text-body: #cbd5e1;
    --adm-text-muted: #94a3b8;

    --adm-blue: #38bdf8;
    --adm-blue-bg: rgba(56, 189, 248, 0.12);
    --adm-blue-border: rgba(56, 189, 248, 0.25);

    --adm-green: #34d399;
    --adm-green-bg: rgba(52, 211, 153, 0.12);
    --adm-green-border: rgba(52, 211, 153, 0.25);

    --adm-red: #fb7185;
    --adm-red-bg: rgba(251, 113, 133, 0.12);
    --adm-red-border: rgba(251, 113, 133, 0.25);

    --adm-amber: #fbbf24;
    --adm-amber-bg: rgba(251, 191, 36, 0.12);
    --adm-amber-border: rgba(251, 191, 36, 0.25);

    --adm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --adm-shadow-card: 0 4px 14px rgba(0, 0, 0, 0.3);
    --adm-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   PALETA MODO CLARO EJECUTIVA Y DESCANSADA A LA VISTA (CERO FATIGA OCULAR)
   Inspirada en sistemas de diseño de alta gama (Stripe, Linear, Apple macOS)
   ========================================================================== */
[data-theme="light"] {
    color-scheme: light;
    /* Fondo lienzo: crema cálido descansado, suave y elegante (cero encandilamiento) */
    --adm-bg: #f4efe6;
    --adm-surface: #ffffff;
    --adm-surface-alt: #faf7f2;
    --adm-border: #ded7cc;
    --adm-border-light: #ece6dc;

    /* Tipografía nítida y descansada en escala cálida Stone */
    --adm-text-title: #1c1917; /* Stone 900 */
    --adm-text-body: #44403c;  /* Stone 700 */
    --adm-text-muted: #78716c; /* Stone 500 */

    /* Acentos suaves y sobrios armonizados */
    --adm-blue: #0284c7;
    --adm-blue-bg: #f0f9ff;
    --adm-blue-border: #bae6fd;

    --adm-green: #15803d;
    --adm-green-bg: #f0fdf4;
    --adm-green-border: #bbf7d0;

    --adm-red: #be123c;
    --adm-red-bg: #fff1f2;
    --adm-red-border: #fecdd3;

    --adm-amber: #b45309;
    --adm-amber-bg: #fffbeb;
    --adm-amber-border: #fde68a;

    /* Sombras más oscuras y marcadas con tinte cálido (relieve y profundidad natural) */
    --adm-shadow-sm: 0 2px 5px rgba(44, 38, 30, 0.12), 0 1px 2px rgba(44, 38, 30, 0.08);
    --adm-shadow-card: 0 6px 18px -2px rgba(44, 38, 30, 0.16), 0 3px 8px -1px rgba(44, 38, 30, 0.10);
    --adm-shadow-md: 0 12px 28px -4px rgba(44, 38, 30, 0.22), 0 6px 12px -2px rgba(44, 38, 30, 0.12);
}

/* ==========================================================================
   SCROLLBARS GLOBALES EJECUTIVOS (CERO BARRAS BLANCAS DEL NAVEGADOR)
   ========================================================================== */
html, body, .table-wrap, * {
    scrollbar-width: thin;
    scrollbar-color: #38bdf8 #0f172a;
}

::-webkit-scrollbar,
*::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    background-color: #0b1120 !important;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
    background: #0f172a !important;
    background-color: #0f172a !important;
    border-radius: 8px !important;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
    background: #0284c7 !important;
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover {
    background: #38bdf8 !important;
}

::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Eliminar definitivamente botones y flechas nativas blancas de Windows */
::-webkit-scrollbar-button,
*::-webkit-scrollbar-button,
.table-wrap::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

[data-theme="light"] html,
[data-theme="light"] body,
[data-theme="light"] * {
    scrollbar-color: rgba(148, 163, 184, 0.5) rgba(241, 245, 249, 0.8);
}
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 2. RESET Y TIPOGRAFÍA */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--adm-bg);
    color: var(--adm-text-body);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Cintillo Tricolor Nacional */
.cintillo-tricolor {
    display: flex;
    height: 4px;
    width: 100%;
}
.cintillo-tricolor .franja-amarillo { flex: 1; background: #facc15; }
.cintillo-tricolor .franja-azul { flex: 1; background: #0284c7; }
.cintillo-tricolor .franja-rojo { flex: 1; background: #dc2626; }

/* 3. CABECERA INSTITUCIONAL SUPERIOR (MINIMALISTA Y FORMAL) */
.header-institucional {
    background: var(--adm-surface);
    border-bottom: 1px solid var(--adm-border);
    padding: 12px 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--adm-shadow-sm);
    transition: background-color 0.25s ease;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 28px;
    background: var(--adm-border);
}

.brand-texts h1 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--adm-text-title);
}

.brand-texts p {
    font-size: 0.74rem;
    color: var(--adm-text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-theme-toggle {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-body);
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
    background: var(--adm-border);
    color: var(--adm-text-title);
}

.link-back-portal {
    background: var(--adm-blue-bg);
    border: 1px solid var(--adm-blue-border);
    color: var(--adm-blue);
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.link-back-portal:hover {
    background: var(--adm-blue);
    color: #fff;
}

/* 4. VISTA DE LOGIN */
.admin-login-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.login-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--adm-shadow-md);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-logo {
    width: 52px;
    height: auto;
    object-fit: contain;
}

.login-badge {
    display: inline-block;
    background: var(--adm-blue-bg);
    color: var(--adm-blue);
    border: 1px solid var(--adm-blue-border);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.login-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--adm-text-title);
}

.login-subtitle {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-form label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--adm-text-body);
}

.login-form input {
    width: 100%;
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-title);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
    border-color: var(--adm-blue);
    box-shadow: 0 0 0 3px var(--adm-blue-bg);
}

.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-group input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--adm-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--adm-text-title);
}

.btn-primary-login {
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s ease;
}

.btn-primary-login:hover {
    background: #0369a1;
}

.login-alert {
    background: var(--adm-red-bg);
    border: 1px solid var(--adm-red-border);
    color: var(--adm-red);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: none;
    align-items: center;
    gap: 8px;
}

.login-footer-info {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--adm-text-muted);
}

/* ==========================================================================
   5. NUEVA ARQUITECTURA DE DISTRIBUCIÓN: DASHBOARD SHELL (SIDEBAR + CANVAS)
   ========================================================================== */

.dashboard-shell {
    display: flex;
    min-height: calc(100vh - 70px);
    background: var(--adm-bg);
}

/* A. SIDEBAR DE CONTROL SITUACIONAL (COLUMNA FIJA DE CONTROL) */
.dashboard-sidebar {
    width: 315px;
    min-width: 315px;
    background: var(--adm-surface);
    border-right: 1px solid var(--adm-border);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}
.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: var(--adm-border);
    border-radius: 4px;
}

.sidebar-brand-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.65) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-live-pill {
    font-size: 0.62rem;
    font-weight: 700;
    color: #34d399;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sidebar-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
    margin: 0;
}

.sidebar-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
}

.sidebar-section-title {
    font-size: 0.70rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 2px 2px 2px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.sidebar-section-title svg {
    color: #38bdf8;
    opacity: 0.85;
}

.sidebar-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.01em;
}

.sidebar-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #0b1329;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding: 0 28px 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #f1f5f9;
    border-radius: 8px;
    height: 38px;
    font-size: 0.78rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar-filter-select:hover {
    border-color: rgba(56, 189, 248, 0.35);
    background-color: #0d1733;
}

.sidebar-filter-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
    background-color: #0d1733;
}

.sidebar-filter-select option {
    background-color: #0f172a;
    color: #f1f5f9;
    padding: 8px 12px;
}

.cycle-pill-sidebar {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.16);
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cycle-status-dot {
    font-size: 0.65rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-sidebar-refresh {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
    border-radius: 8px;
    height: 38px;
    font-weight: 600;
    font-size: 0.80rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 4px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 3px 10px rgba(2, 132, 199, 0.35);
}

.btn-sidebar-refresh:hover {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 5px 16px rgba(2, 132, 199, 0.5);
    transform: translateY(-1px);
}

.btn-sidebar-refresh:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.btn-sidebar-refresh svg {
    transition: transform 0.3s ease;
}

.btn-sidebar-refresh:hover svg {
    transform: rotate(90deg);
}

.sidebar-divider {
    height: 1px;
    background: var(--adm-border);
    margin: 4px 0;
}

.sidebar-status-box {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.16);
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.45;
}

.sidebar-status-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: pulseLive 2s infinite ease-in-out;
}

.sidebar-status-box p {
    font-size: 0.70rem;
    color: #94a3b8;
    margin: 0;
}

@keyframes pulseLive {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
}

.btn-sidebar-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.20);
    color: #f87171;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.38);
    color: #fca5a5;
    transform: translateY(-1px);
}

/* B. ÁREA PRINCIPAL DEL DASHBOARD (CANVAS ESPACIOSO Y BIEN DISTRIBUIDO) */
.dashboard-content-area {
    flex: 1;
    min-width: 0;
    padding: 32px 38px 60px 38px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1540px;
    overflow-x: hidden;
}

/* Encabezado Principal */
.content-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--adm-border);
    gap: 20px;
    flex-wrap: wrap;
}

.header-texts h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--adm-text-title);
    letter-spacing: -0.01em;
}

.header-texts p {
    font-size: 0.86rem;
    color: var(--adm-text-muted);
    margin-top: 4px;
}

.header-chips {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chip-live {
    background: var(--adm-green-bg);
    border: 1px solid var(--adm-green-border);
    color: var(--adm-green);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.chip-cycle {
    background: var(--adm-blue-bg);
    border: 1px solid var(--adm-blue-border);
    color: var(--adm-blue);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}

/* 4 KPIs Clave */
.kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-box {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--adm-shadow-md);
}

.kpi-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.kpi-box.blue::before { background: #0284c7; }
.kpi-box.green::before { background: #059669; }
.kpi-box.amber::before { background: #d97706; }
.kpi-box.rose::before { background: #e11d48; }

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--adm-text-muted);
}

.kpi-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.kpi-box.blue .kpi-icon-badge { background: var(--adm-blue-bg); color: var(--adm-blue); }
.kpi-box.green .kpi-icon-badge { background: var(--adm-green-bg); color: var(--adm-green); }
.kpi-box.amber .kpi-icon-badge { background: var(--adm-amber-bg); color: var(--adm-amber); }
.kpi-box.rose .kpi-icon-badge { background: var(--adm-red-bg); color: var(--adm-red); }

.kpi-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--adm-text-title);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 6px 0;
}

.kpi-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
}

.tag-pill {
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.7rem;
}

.tag-pill.blue { background: var(--adm-blue-bg); color: var(--adm-blue); }
.tag-pill.green { background: var(--adm-green-bg); color: var(--adm-green); }
.tag-pill.amber { background: var(--adm-amber-bg); color: var(--adm-amber); }
.tag-pill.rose { background: var(--adm-red-bg); color: var(--adm-red); }

.subtext {
    color: var(--adm-text-muted);
    font-size: 0.74rem;
}

/* C. LA TRÍADA ESTUDIANTIL (3 TARJETAS EN PARALELO CON MÁXIMO PROTAGONISMO) */
.triada-showcase-container {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    font-size: 1.6rem;
}

.section-title-bar h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--adm-text-title);
}

.section-desc {
    font-size: 0.76rem;
    color: var(--adm-text-muted);
    margin-top: 2px;
}

.badge-pill {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-body);
    padding: 4px 12px;
    border-radius: 20px;
}

.triada-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.triada-card {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.triada-card:hover {
    transform: translateY(-2px);
    border-color: var(--adm-blue);
}

.triada-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.triada-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.triada-avatar.blue { background: var(--adm-blue-bg); }
.triada-avatar.green { background: var(--adm-green-bg); }
.triada-avatar.rose { background: var(--adm-red-bg); }

.triada-role-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.triada-role-pill.blue { background: var(--adm-blue-bg); color: var(--adm-blue); }
.triada-role-pill.green { background: var(--adm-green-bg); color: var(--adm-green); }
.triada-role-pill.rose { background: var(--adm-red-bg); color: var(--adm-red); }

.triada-role-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--adm-text-title);
    margin-top: 2px;
}

.triada-metric-val {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--adm-text-title);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.triada-role-desc {
    font-size: 0.76rem;
    color: var(--adm-text-muted);
    line-height: 1.45;
}

/* D. ANALÍTICA VISUAL Y DESPLIEGUE TERRITORIAL (2 COLUMNAS SIMÉTRICAS 50% / 50%) */
.analytics-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.dash-panel {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.panel-header h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--adm-text-title);
}

.panel-desc {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
    margin-top: 2px;
}

.badge-mini {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-muted);
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-mini.green {
    background: var(--adm-green-bg);
    border-color: var(--adm-green-border);
    color: var(--adm-green);
}

.panel-inner-divider {
    height: 1px;
    background: var(--adm-border-light);
    margin: 4px 0;
}

/* Gráfico de Años */
.years-chart-container {
    padding-top: 8px;
}

.years-bars-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-items: flex-end;
    height: 110px;
}

.year-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
}

.year-val {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--adm-text-title);
    font-family: 'Inter', sans-serif;
}

.year-bar {
    width: 100%;
    max-width: 38px;
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    border-radius: 6px 6px 0 0;
    min-height: 12px;
    transition: height 0.4s ease;
}

.year-bar.tecnica {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.year-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--adm-text-muted);
}

.year-tag.gold {
    color: var(--adm-amber);
    font-weight: 700;
}

/* Paridad de Género */
.gender-visual-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gender-numbers-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gender-stat-card {
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gender-role-lbl {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--adm-text-body);
}

.gender-number-highlight {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--adm-text-title);
    font-family: 'Inter', sans-serif;
}

.gender-progress-track {
    height: 16px;
    background: var(--adm-surface-alt);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    border: 1px solid var(--adm-border);
}

.gender-seg-fem {
    background: #ec4899;
    transition: width 0.4s ease;
}

.gender-seg-masc {
    background: #0284c7;
    transition: width 0.4s ease;
}

.gender-footer-note {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--adm-text-muted);
}

.parity-verified-badge {
    background: var(--adm-green-bg);
    color: var(--adm-green);
    border: 1px solid var(--adm-green-border);
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}

/* Despliegue Territorial por Estado (Panel Derecho Amplio) */
.territory-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    min-width: 0;
}

.territory-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 8px;
}

.territory-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.territory-scroll-area::-webkit-scrollbar-track {
    background: var(--adm-surface-alt);
    border-radius: 4px;
}
.territory-scroll-area::-webkit-scrollbar-thumb {
    background: var(--adm-border);
    border-radius: 4px;
}

.territory-item-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.territory-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
}

.territory-name {
    font-weight: 700;
    color: var(--adm-text-title);
    letter-spacing: 0.02em;
}

.territory-stats {
    color: var(--adm-text-muted);
    font-size: 0.74rem;
}

.territory-track {
    height: 7px;
    background: var(--adm-surface-alt);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--adm-border);
}

.territory-fill {
    height: 100%;
    background: var(--adm-blue);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* E. TABLA SITUACIONAL A ANCHO COMPLETO (100% RESPIRABLE, CERO APLASTAMIENTO) */
.full-width-table-panel {
    width: 100%;
    min-width: 0;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 16px;
    padding: 26px 30px;
    box-shadow: var(--adm-shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.table-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-search-input {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-title);
    border-radius: 8px;
    padding: 0 16px;
    height: 38px;
    width: 280px;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.btn-table-action {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-table-action.demo {
    background: var(--adm-blue-bg);
    border: 1px solid var(--adm-blue-border);
    color: var(--adm-blue);
}
.btn-table-action.demo:hover {
    background: var(--adm-blue);
    color: #fff;
}

.btn-table-action.clear {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-muted);
}
.btn-table-action.clear:hover {
    background: var(--adm-red-bg);
    border-color: var(--adm-red-border);
    color: var(--adm-red);
}

.table-search-input:focus {
    border-color: var(--adm-blue);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 14px 14px;
    padding-bottom: 6px;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: #38bdf8 #0f172a !important;
}

.table-wrap::-webkit-scrollbar {
    height: 8px !important;
    width: 8px !important;
    background-color: #0b1120 !important;
}

.table-wrap::-webkit-scrollbar-track {
    background: #0f172a !important;
    background-color: #0f172a !important;
    border-radius: 8px !important;
    margin: 0 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #0284c7 !important;
    background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    transition: background 0.2s ease;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: #38bdf8 !important;
}

.table-wrap::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

[data-theme="light"] .table-wrap {
    scrollbar-color: rgba(148, 163, 184, 0.5) rgba(241, 245, 249, 0.9);
}
[data-theme="light"] .table-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
}
[data-theme="light"] .table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
[data-theme="light"] .table-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.situational-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.84rem;
    min-width: 780px;
}

.situational-table thead th {
    background: var(--adm-surface-alt);
    color: var(--adm-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
    border-bottom: 1px solid var(--adm-border);
    white-space: nowrap;
}

.situational-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--adm-border-light);
    color: var(--adm-text-body);
}

.situational-table tbody tr:hover td {
    background: var(--adm-surface-alt);
}

.badge-dep {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.badge-dep.nac { background: var(--adm-blue-bg); color: var(--adm-blue); }
.badge-dep.est { background: var(--adm-surface-alt); color: var(--adm-text-muted); border: 1px solid var(--adm-border); }
.badge-dep.priv { background: var(--adm-amber-bg); color: var(--adm-amber); }

.badge-status-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--adm-green-bg);
    border: 1px solid var(--adm-green-border);
    color: var(--adm-green);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ==========================================================================
   6. RESPONSIVE DESIGN ADAPTABLE
   ========================================================================== */
@media screen and (max-width: 1200px) {
    .analytics-row-2 {
        grid-template-columns: 1fr;
    }

    .kpi-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .dashboard-shell {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--adm-border);
    }

    .triada-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 600px) {
    .dashboard-content-area {
        padding: 16px 14px 40px 14px;
        gap: 20px;
    }

    .kpi-grid-4 {
        grid-template-columns: 1fr;
    }

    .years-bars-row {
        gap: 6px;
    }

    .header-institucional {
        padding: 10px 16px;
    }
}


/* ==========================================================================
   BOTONES DE ACCIÓN EN TABLA SITUACIONAL Y MODALES DE DETALLE / EDICIÓN / PDF
   ========================================================================== */

.btn-table-row-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    font-size: 0.73rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-table-row-action.view {
    background: var(--adm-blue-bg);
    color: var(--adm-blue);
    border-color: var(--adm-blue-border);
}
.btn-table-row-action.view:hover {
    background: var(--adm-blue);
    color: #0b1120;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.btn-table-row-action.edit {
    background: var(--adm-amber-bg);
    color: var(--adm-amber);
    border-color: var(--adm-amber-border);
}
.btn-table-row-action.edit:hover {
    background: var(--adm-amber);
    color: #0b1120;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.btn-table-row-action.pdf {
    background: var(--adm-green-bg);
    color: var(--adm-green);
    border-color: var(--adm-green-border);
}
.btn-table-row-action.pdf:hover {
    background: var(--adm-green);
    color: #0b1120;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

/* MODALES FLOTANTES DEL PANEL DE ADMINISTRACIÓN */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-modal-container {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUpModal 0.25s ease-out;
}

@keyframes slideUpModal {
    from { transform: translateY(20px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.detail-modal-size {
    width: 100%;
    max-width: 960px;
}

.edit-modal-size {
    width: 100%;
    max-width: 860px;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--adm-surface-alt);
    border-bottom: 1px solid var(--adm-border);
    gap: 16px;
}

.admin-modal-title-box h3 {
    margin: 4px 0 0 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--adm-text-title);
}

.admin-modal-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.82rem;
    color: var(--adm-text-muted);
}

.admin-modal-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--adm-blue-bg);
    color: var(--adm-blue);
    border: 1px solid var(--adm-blue-border);
    letter-spacing: 0.5px;
}

.admin-modal-badge.warning {
    background: var(--adm-amber-bg);
    color: var(--adm-amber);
    border-color: var(--adm-amber-border);
}

.admin-modal-actions-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-modal-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-action.print {
    background: var(--adm-green-bg);
    color: var(--adm-green);
    border-color: var(--adm-green-border);
}
.btn-modal-action.print:hover {
    background: var(--adm-green);
    color: #0b1120;
}

.btn-modal-action.edit {
    background: var(--adm-amber-bg);
    color: var(--adm-amber);
    border-color: var(--adm-amber-border);
}
.btn-modal-action.edit:hover {
    background: var(--adm-amber);
    color: #0b1120;
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-title);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-modal-close:hover {
    background: var(--adm-red-bg);
    color: var(--adm-red);
    border-color: var(--adm-red-border);
}

/* PESTAÑAS DENTRO DEL MODAL */
.admin-modal-tabs {
    display: flex;
    background: var(--adm-surface);
    border-bottom: 1px solid var(--adm-border);
    padding: 0 24px;
    gap: 8px;
}

.modal-tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--adm-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab-btn:hover {
    color: var(--adm-text-title);
}

.modal-tab-btn.active {
    color: var(--adm-blue);
    border-bottom-color: var(--adm-blue);
}

/* CUERPO Y SCROLL DEL MODAL */
.admin-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* TARJETAS DE DATOS Y GRIDS */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-card {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    padding: 14px 16px;
}

.detail-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--adm-text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-card-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--adm-text-title);
    word-break: break-word;
}

/* VOCERÍAS EN MODAL */
.section-voceria-box {
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    margin-bottom: 18px;
    overflow: hidden;
}

.section-voceria-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--adm-text-title);
    border-bottom: 1px solid var(--adm-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vocero-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    padding: 14px 16px;
}

.vocero-card-pill {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border-light);
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--adm-blue);
}

.vocero-card-pill.v2 {
    border-left-color: var(--adm-green);
}

.vocero-card-pill.v3 {
    border-left-color: var(--adm-red);
}

.vocero-card-role {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.vocero-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--adm-text-title);
}

.vocero-card-meta {
    font-size: 0.75rem;
    color: var(--adm-text-muted);
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-gender {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}
.badge-gender.fem {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}
.badge-gender.masc {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* FOOTER DEL MODAL DE EDICIÓN */
.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: var(--adm-surface-alt);
    border-top: 1px solid var(--adm-border);
}

.btn-modal-cancel {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--adm-border);
    color: var(--adm-text-body);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--adm-text-title);
}

.btn-modal-save {
    padding: 10px 22px;
    background: var(--adm-blue);
    border: none;
    color: #0b1120;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-modal-save:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
}

/* FORMULARIOS DE EDICIÓN */
.form-edit-group {
    margin-bottom: 16px;
}
.form-edit-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--adm-text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.form-edit-input, .form-edit-select {
    width: 100%;
    box-sizing: border-box;
    background: var(--adm-surface-alt);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--adm-text-title);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-edit-input:focus, .form-edit-select:focus {
    border-color: var(--adm-blue);
    outline: none;
}

/* ESTILOS DE IMPRESIÓN PARA EL ACTA OFICIAL */
@media print {
    body * {
        visibility: hidden !important;
    }
    #adminPrintActaArea, #adminPrintActaArea * {
        visibility: visible !important;
    }
    #adminPrintActaArea {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        color: black !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
}

/* Mobile Responsive Modals for Admin Panel */
@media screen and (max-width: 600px) {
    .admin-modal-container {
        width: 95% !important;
        margin: 10px auto !important;
        max-height: 94vh !important;
        border-radius: 12px !important;
    }
    .admin-modal-header {
        padding: 12px 14px !important;
        flex-wrap: wrap !important;
    }
    .admin-modal-body {
        padding: 12px 14px !important;
    }
    .admin-modal-footer {
        padding: 10px 14px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }
    .admin-modal-footer button {
        width: 100% !important;
        margin: 0 !important;
    }
    .modal-grid-2, .modal-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* ==========================================================================
   REFINAMIENTOS ESPECÍFICOS DE MODO CLARO (PALETA CREMA & SOMBRAS PROFUNDAS)
   ========================================================================== */

/* Fondo general y Shell en Crema Confort */
[data-theme="light"] body {
    background-color: #f4efe6;
    color: #44403c;
}
[data-theme="light"] .dashboard-shell {
    background: #f4efe6;
}

/* Cabecera y acciones superiores */
[data-theme="light"] .header-institucional {
    background: #ffffff;
    border-bottom: 1px solid #ded7cc;
    box-shadow: 0 2px 10px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .brand-divider {
    background: #ded7cc;
}
[data-theme="light"] .brand-texts h1 {
    color: #1c1917;
}
[data-theme="light"] .brand-texts p {
    color: #78716c;
}
[data-theme="light"] .btn-theme-toggle {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    color: #57534e;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .btn-theme-toggle:hover {
    background: #ede6dc;
    color: #1c1917;
    border-color: #c7beaf;
}
[data-theme="light"] .link-back-portal {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    color: #57534e;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .link-back-portal:hover {
    background: #ede6dc;
    color: #1c1917;
    border-color: #c7beaf;
}

/* Sidebar Situacional */
[data-theme="light"] .dashboard-sidebar {
    background: #faf7f2;
    border-right: 1px solid #ded7cc;
    box-shadow: 4px 0 16px rgba(44, 38, 30, 0.05);
}
[data-theme="light"] .sidebar-brand-card {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 2px 8px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .sidebar-badge {
    background: #ede6dc;
    color: #44403c;
    border: 1px solid #ded7cc;
}
[data-theme="light"] .sidebar-live-pill {
    color: #15803d;
}
[data-theme="light"] .sidebar-title {
    color: #1c1917;
}
[data-theme="light"] .sidebar-desc {
    color: #78716c;
}
[data-theme="light"] .sidebar-section-title {
    color: #78716c;
}
[data-theme="light"] .sidebar-section-title svg {
    color: #0284c7;
}
[data-theme="light"] .sidebar-filter-label {
    color: #44403c;
}
[data-theme="light"] .sidebar-filter-select {
    background-color: #ffffff;
    border: 1.5px solid #d6cebe;
    color: #1c1917;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
[data-theme="light"] .sidebar-filter-select:hover {
    border-color: #a8a29e;
}
[data-theme="light"] .sidebar-filter-select:focus {
    border-color: #78716c;
    box-shadow: 0 0 0 3px rgba(120, 113, 108, 0.18);
}
[data-theme="light"] .cycle-pill-sidebar {
    background: #ffffff;
    border: 1px solid #ded7cc;
    color: #57534e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.05);
}
[data-theme="light"] .cycle-status-dot {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Botón Actualizar Filtros - Tono Carbón Cálido con Sombra Profunda */
[data-theme="light"] .btn-sidebar-refresh,
[data-theme="light"] .btn-filter-refresh {
    background: #292524 !important;
    color: #ffffff !important;
    border: 1px solid #1c1917 !important;
    box-shadow: 0 4px 14px rgba(44, 38, 30, 0.28) !important;
}
[data-theme="light"] .btn-sidebar-refresh:hover,
[data-theme="light"] .btn-filter-refresh:hover {
    background: #1c1917 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44, 38, 30, 0.38) !important;
}

/* Caja de Estado 100% Operativo */
[data-theme="light"] .sidebar-status-box,
[data-theme="light"] .live-status-card {
    background: #ffffff !important;
    border: 1px solid #ded7cc !important;
    color: #78716c !important;
    box-shadow: 0 3px 10px rgba(44, 38, 30, 0.08) !important;
}
[data-theme="light"] .sidebar-status-head,
[data-theme="light"] .live-status-pill {
    color: #292524 !important;
    font-weight: 700 !important;
}
[data-theme="light"] .sidebar-status-box p,
[data-theme="light"] .live-status-card p {
    color: #78716c !important;
}
[data-theme="light"] .pulse-indicator {
    background: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2) !important;
}
[data-theme="light"] .btn-sidebar-logout {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.05);
}
[data-theme="light"] .btn-sidebar-logout:hover {
    background: #b91c1c;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

/* Banner de Título */
[data-theme="light"] .content-header-banner {
    border-bottom: 1px solid #ded7cc;
}
[data-theme="light"] .header-texts h2 {
    color: #1c1917;
}
[data-theme="light"] .header-texts p {
    color: #78716c;
}
[data-theme="light"] .chip-live {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .chip-cycle {
    background: #ffffff;
    border: 1px solid #ded7cc;
    color: #57534e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}

/* Tarjetas KPI con Sombras Profundas y Fondo Marfil/Blanco */
[data-theme="light"] .kpi-box {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 6px 18px -2px rgba(44, 38, 30, 0.15), 0 3px 8px -1px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .kpi-box:hover {
    box-shadow: 0 12px 28px -4px rgba(44, 38, 30, 0.22), 0 5px 12px -2px rgba(44, 38, 30, 0.12);
}
[data-theme="light"] .kpi-box::before {
    height: 2.5px;
    opacity: 0.8;
}
[data-theme="light"] .kpi-box.blue::before { background: #38bdf8; }
[data-theme="light"] .kpi-box.green::before { background: #34d399; }
[data-theme="light"] .kpi-box.amber::before { background: #fbbf24; }
[data-theme="light"] .kpi-box.rose::before { background: #fb7185; }

[data-theme="light"] .kpi-label {
    color: #78716c;
    font-weight: 700;
}
[data-theme="light"] .kpi-val {
    color: #1c1917;
}
[data-theme="light"] .kpi-icon-badge {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .kpi-box.blue .kpi-icon-badge { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }
[data-theme="light"] .kpi-box.green .kpi-icon-badge { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
[data-theme="light"] .kpi-box.amber .kpi-icon-badge { background: #fffbeb; color: #d97706; border-color: #fde68a; }
[data-theme="light"] .kpi-box.rose .kpi-icon-badge { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }

[data-theme="light"] .tag-pill.blue {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
[data-theme="light"] .tag-pill.green {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
[data-theme="light"] .tag-pill.amber {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
[data-theme="light"] .tag-pill.rose {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
[data-theme="light"] .subtext {
    color: #a8a29e;
}

/* Tríada Estudiantil */
[data-theme="light"] .triada-showcase-container {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 6px 18px -2px rgba(44, 38, 30, 0.15), 0 3px 8px -1px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .triada-card {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    box-shadow: 0 3px 8px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .triada-card:hover {
    background: #ffffff;
    border-color: #c7beaf;
    box-shadow: 0 8px 22px rgba(44, 38, 30, 0.16);
}
[data-theme="light"] .triada-avatar {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .triada-avatar.blue { background: #f0f9ff; border: 1px solid #bae6fd; color: #0284c7; }
[data-theme="light"] .triada-avatar.green { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
[data-theme="light"] .triada-avatar.rose { background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48; }

[data-theme="light"] .triada-role-pill.blue { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; font-weight: 600; }
[data-theme="light"] .triada-role-pill.green { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; font-weight: 600; }
[data-theme="light"] .triada-role-pill.rose { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; font-weight: 600; }

/* Paneles de Analítica & Ranking Territorial */
[data-theme="light"] .dash-panel {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 6px 18px -2px rgba(44, 38, 30, 0.15), 0 3px 8px -1px rgba(44, 38, 30, 0.08);
}
[data-theme="light"] .badge-mini {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    color: #57534e;
}
[data-theme="light"] .badge-mini.green {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
[data-theme="light"] .year-col-label,
[data-theme="light"] .year-val {
    color: #57534e;
}
[data-theme="light"] .territory-track,
[data-theme="light"] .parity-track {
    background: #ede6dc;
    border-color: #d6cebe;
}

/* Tabla Situacional */
[data-theme="light"] .situational-table thead th {
    background: #faf7f2;
    color: #57534e;
    border-bottom: 2px solid #ded7cc;
    font-weight: 700;
}
[data-theme="light"] .situational-table tbody tr {
    border-bottom: 1px solid #f5f0e8;
}
[data-theme="light"] .situational-table tbody tr:hover {
    background: #faf7f2;
}
[data-theme="light"] .table-search-input {
    background: #ffffff;
    border: 1.5px solid #d6cebe;
    color: #1c1917;
    box-shadow: 0 1px 3px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .table-search-input:focus {
    border-color: #78716c;
    box-shadow: 0 0 0 3px rgba(120, 113, 108, 0.18);
}
[data-theme="light"] .btn-table-row-action {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    color: #57534e;
    box-shadow: 0 1px 2px rgba(44, 38, 30, 0.05);
}
[data-theme="light"] .btn-table-row-action:hover {
    background: #ede6dc;
    color: #1c1917;
    border-color: #c7beaf;
}
[data-theme="light"] .btn-table-row-action.view:hover {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}
[data-theme="light"] .btn-table-row-action.edit:hover {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
[data-theme="light"] .btn-table-row-action.pdf:hover {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

/* Modales */
[data-theme="light"] .admin-modal-overlay {
    background: rgba(30, 24, 16, 0.55);
}
[data-theme="light"] .admin-modal-container {
    background: #ffffff;
    border: 1px solid #ded7cc;
    box-shadow: 0 24px 50px -8px rgba(30, 24, 16, 0.38), 0 10px 20px -5px rgba(30, 24, 16, 0.20);
}
[data-theme="light"] .admin-modal-header {
    background: #faf7f2;
    border-bottom: 1px solid #ded7cc;
}
[data-theme="light"] .admin-modal-tabs {
    background: #ffffff;
    border-bottom: 1px solid #ded7cc;
}
[data-theme="light"] .detail-card {
    background: #faf7f2;
    border: 1px solid #ded7cc;
    box-shadow: 0 2px 6px rgba(44, 38, 30, 0.06);
}
[data-theme="light"] .form-input-admin {
    background: #ffffff;
    border: 1.5px solid #d6cebe;
    color: #1c1917;
}
[data-theme="light"] .form-input-admin:focus {
    border-color: #78716c;
    box-shadow: 0 0 0 3px rgba(120, 113, 108, 0.18);
}
