/* ==========================================================================
   SISTEMA DE GESTIÓN DE EGRESADOS - EXPOGRAD
   Paleta: Azul (#1E3A8A / #0D6EFD), Amarillo (#FFC107 / #F59E0B), Naranja (#FD7E14 / #EA580C)
   Estados: Verde Presente (#198754 / #10B981), Rojo Falta (#DC3545 / #EF4444)
   ========================================================================== */

:root {
    --theme-blue: #1e3a8a;
    --theme-blue-light: #2563eb;
    --theme-blue-subtle: #eff6ff;
    
    --theme-yellow: #ffc107;
    --theme-yellow-dark: #d97706;
    --theme-yellow-subtle: #fffbeb;
    
    --theme-orange: #fd7e14;
    --theme-orange-dark: #ea580c;
    --theme-orange-subtle: #fff7ed;

    --status-presente: #10b981;
    --status-presente-bg: #ecfdf5;
    --status-presente-border: #6ee7b7;

    --status-falta: #ef4444;
    --status-falta-bg: #fef2f2;
    --status-falta-border: #fca5a5;

    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-family);
    color: #334155;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* ================= Colores Temáticos Personalizados ================= */
.bg-theme-blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important;
}

.text-theme-blue {
    color: #1e3a8a !important;
}

.bg-theme-blue-subtle {
    background-color: #e0e7ff !important;
    color: #1e3a8a !important;
}

.btn-theme-blue {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
    transition: all 0.2s ease;
}

.btn-theme-blue:hover, .btn-theme-blue:focus {
    background-color: #172554;
    border-color: #172554;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.bg-theme-yellow {
    background-color: #ffc107 !important;
}

.text-theme-yellow {
    color: #ffc107 !important;
}

.btn-theme-yellow {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #1e293b;
    transition: all 0.2s ease;
}

.btn-theme-yellow:hover, .btn-theme-yellow:focus {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.bg-theme-orange {
    background-color: #fd7e14 !important;
}

.text-theme-orange {
    color: #ea580c !important;
}

.btn-theme-orange {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: #ffffff;
    transition: all 0.2s ease;
}

.btn-theme-orange:hover, .btn-theme-orange:focus {
    background-color: #ea580c;
    border-color: #ea580c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* ================= Barra de Navegación ================= */
.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.4);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.2s ease;
}

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

.nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-bottom: 2px solid #ffc107;
    font-weight: 600;
}

.badge-pill-glow {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
}

/* ================= Encabezados de Módulo ================= */
.card-theme-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #ea580c 100%);
    border-radius: 14px;
}

/* ================= Stat Cards ================= */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ================= Tablas ================= */
.custom-table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-theme-header {
    background: #f1f5f9;
}

.table-theme-header th {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.avatar-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
}

/* ================= Badges de Estado ================= */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.badge-presente {
    background-color: var(--status-presente-bg);
    color: #065f46;
    border: 1px solid var(--status-presente-border);
}

.badge-falta {
    background-color: var(--status-falta-bg);
    color: #991b1b;
    border: 1px solid var(--status-falta-border);
}

/* ================= Vista Pública Resaltada ================= */
.public-attendance-table tr {
    transition: all 0.2s ease;
}

.row-highlight-presente {
    background-color: #f0fdf4 !important;
    border-left: 5px solid #10b981 !important;
}

.row-highlight-presente:hover {
    background-color: #dcfce7 !important;
}

.row-highlight-falta {
    background-color: #fef2f2 !important;
    border-left: 5px solid #ef4444 !important;
}

.row-highlight-falta:hover {
    background-color: #fee2e2 !important;
}

.status-banner-presente {
    background-color: #10b981;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.status-banner-falta {
    background-color: #ef4444;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.status-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid #ffffff;
}

.legend-box {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

/* ================= Tarjetas / Cards de Estudiantes ================= */
.student-card {
    border-radius: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #ffffff;
}

.student-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(30, 58, 138, 0.12) !important;
}

.student-card-header {
    height: 90px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #fd7e14 100%);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.student-avatar-wrap {
    margin-top: -50px;
}

.student-card-avatar {
    width: 96px;
    height: 96px;
    object-fit: cover;
    background-color: #ffffff;
    padding: 3px;
}

.student-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.student-firstname {
    font-weight: 500;
}

.status-card-badge.status-presente {
    background-color: #ecfdf5;
    color: #047857;
    border: 1.5px solid #10b981;
}

.status-card-badge.status-falta {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1.5px solid #ef4444;
}

/* ================= Preview Avatar en Modal ================= */
.avatar-preview {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

/* ================= Utilidades & Login ================= */
.login-brand-icon {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 193, 7, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.border-dashed {
    border-style: dashed !important;
}

.shadow-2xs {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fs-xs {
    font-size: 0.75rem;
}

.fs-2xs {
    font-size: 0.65rem;
}

.fs-3xs {
    font-size: 0.5rem;
}

.fs-sm {
    font-size: 0.875rem;
}

.text-success-light {
    color: #86efac !important;
}

.text-danger-light {
    color: #fca5a5 !important;
}

@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid #e2e8f0;
    }
}
