/* ==========================================
   CSS DESIGN SYSTEM - SGE PUBLIC SCHOOLS
   ========================================== */

/* Design Tokens & Variables */
:root {
    --bg-deep: #0B0F19;
    --bg-card: #1E293B;
    --bg-sidebar: #0F172A;
    --border-color: #334155;
    --border-hover: #475569;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --emerald-bright: #00FF66;
    --emerald-primary: #10B981;
    --emerald-dark: #059669;
    --emerald-glow: rgba(16, 185, 129, 0.15);
    
    --blue-primary: #3B82F6;
    --blue-dark: #2563EB;
    --blue-glow: rgba(59, 130, 246, 0.15);
    
    --amber-primary: #F59E0B;
    --amber-glow: rgba(245, 158, 11, 0.15);
    
    --rose-primary: #EF4444;
    --rose-dark: #DC2626;
    --rose-glow: rgba(239, 68, 68, 0.15);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-emerald: 0 0 15px rgba(16, 185, 129, 0.25);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* App Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* 1. Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-bright));
    color: var(--bg-deep);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-emerald);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 11px;
    color: var(--emerald-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.school-year {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.school-year i {
    color: var(--emerald-primary);
}

/* Sidebar Menu navigation */
.sidebar-menu {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 18px 0 8px 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}

.menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.menu-item.active {
    background-color: var(--emerald-glow);
    color: var(--emerald-bright);
    border-left-color: var(--emerald-bright);
    font-weight: 600;
}

.menu-item.active i {
    color: var(--emerald-bright);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.15);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--border-radius-md);
}

.user-pill .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--emerald-primary);
    color: var(--bg-deep);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 20px;
    width: fit-content;
    margin-top: 2px;
}

/* 2. Main Content & Header */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.header {
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
}

.page-title-area h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Simulation Role Switcher */
.role-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-card);
    padding: 6px 14px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.role-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-label i {
    color: var(--emerald-primary);
}

.custom-select-wrapper {
    position: relative;
}

.role-select {
    background-color: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 30px 6px 12px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: var(--transition-smooth);
}

.role-select:hover {
    border-color: var(--emerald-primary);
}

.custom-select-wrapper::after {
    content: "\f0d7";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Content Sections Base */
.content-body {
    padding: 32px;
    flex: 1;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Hidden Classes */
.hidden {
    display: none !important;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.btn-primary {
    background-color: var(--blue-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    background-color: var(--blue-dark);
    box-shadow: var(--shadow-sm);
}

.btn-emerald {
    background-color: var(--emerald-primary);
    color: var(--bg-deep);
}

.btn-emerald:hover {
    background-color: var(--emerald-bright);
    box-shadow: var(--shadow-emerald);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* ==========================================
   METRICAS - DASHBOARD PRINCIPAL
   ========================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.metric-icon.students {
    background-color: var(--blue-glow);
    color: var(--blue-primary);
}

.metric-icon.staff {
    background-color: rgba(163, 163, 163, 0.07);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.metric-icon.attendance {
    background-color: var(--emerald-glow);
    color: var(--emerald-primary);
}

.metric-icon.incident {
    background-color: var(--amber-glow);
    color: var(--amber-primary);
}

.metric-details {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    margin: 4px 0;
    line-height: 1;
}

.metric-growth {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-growth.positive {
    color: var(--emerald-primary);
}

.metric-subtext {
    font-size: 11px;
    color: var(--text-muted);
}

.alert-warning {
    color: var(--amber-primary);
    font-weight: 600;
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}

/* Cards System */
.chart-card, .recent-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Chart Styles */
.chart-container {
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 10px;
}

.svg-chart {
    width: 100%;
    height: 100%;
}

.bar-group {
    cursor: pointer;
}

.bar-group rect {
    transition: var(--transition-smooth);
}

.bar-group:hover rect {
    opacity: 1;
    filter: brightness(1.2);
}

.chart-text {
    font-size: 11px;
    font-weight: 600;
}

.chart-value-text {
    font-size: 10px;
    font-weight: 700;
}

/* Alerts List in Dashboard */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.alert-item:hover {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.04);
}

.alert-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #334155;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.alert-item-content {
    flex: 1;
    min-width: 0;
}

.alert-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-item-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-warning {
    background-color: var(--amber-glow);
    color: var(--amber-primary);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: var(--rose-glow);
    color: var(--rose-primary);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================
   TABLAS Y FILTROS - GESTION ESTUDIANTES
   ========================================== */
.section-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 16px 24px;
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    width: 320px;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    background-color: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px 10px 40px;
    border-radius: var(--border-radius-md);
    outline: none;
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.select-group select {
    background-color: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.select-group select:focus {
    border-color: var(--emerald-primary);
}

/* Premium Table Styling */
.table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Badges & Cell customizers */
.student-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.table-avatar.color-student {
    background-color: var(--blue-glow);
    color: var(--blue-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.table-avatar.color-staff {
    background: linear-gradient(135deg, #475569, #334155);
}

.attendance-pct-cell {
    font-weight: 600;
}

.attendance-pct-cell.good {
    color: var(--emerald-primary);
}

.attendance-pct-cell.warning {
    color: var(--amber-primary);
}

.attendance-pct-cell.danger {
    color: var(--rose-primary);
}

.average-cell {
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================
   PERSONAL (DOCENTES, ADMINS, OBREROS)
   ========================================== */
.staff-header-summary {
    margin-bottom: 24px;
}

.staff-header-summary h3 {
    font-size: 20px;
    font-weight: 700;
}

.section-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Incidencia state styling */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-pill.presente {
    background-color: var(--emerald-glow);
    color: var(--emerald-bright);
    border: 1px solid rgba(0, 255, 102, 0.2);
}

.status-pill.ausente {
    background-color: var(--rose-glow);
    color: var(--rose-primary);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pill.permiso {
    background-color: var(--amber-glow);
    color: var(--amber-primary);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-pill.reposo {
    background-color: var(--rose-glow);
    color: var(--rose-primary);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
    }
}

/* Switch styling for attendance control */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-primary);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--emerald-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Actions buttons for staff */
.staff-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-icon.active-permiso {
    background-color: var(--amber-glow);
    border-color: var(--amber-primary);
    color: var(--amber-primary);
}

.btn-icon.active-reposo {
    background-color: var(--rose-glow);
    border-color: var(--rose-primary);
    color: var(--rose-primary);
}

/* ==========================================
   SIMULADOR DE ASISTENCIA DIARIA (AULA)
   ========================================== */
.attendance-setup-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.setup-header {
    margin-bottom: 16px;
}

.setup-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.setup-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.setup-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
}

.attendance-sheet-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.sheet-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    font-size: 14px;
}

.info-item .label {
    color: var(--text-secondary);
    margin-right: 4px;
}

.info-item .value {
    font-weight: 700;
}

.text-success {
    color: var(--emerald-primary) !important;
}

.text-danger {
    color: var(--rose-primary) !important;
}

.date-badge {
    margin-left: auto;
    background-color: var(--bg-deep);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--emerald-primary);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Quick Attendance check buttons in table */
.attendance-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.btn-att-toggle {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-att-toggle.presente:hover {
    border-color: var(--emerald-primary);
    color: var(--emerald-primary);
}

.btn-att-toggle.presente.active {
    background-color: var(--emerald-primary);
    color: var(--bg-deep);
    border-color: var(--emerald-primary);
    box-shadow: var(--shadow-emerald);
}

.btn-att-toggle.ausente:hover {
    border-color: var(--rose-primary);
    color: var(--rose-primary);
}

.btn-att-toggle.ausente.active {
    background-color: var(--rose-primary);
    color: var(--text-primary);
    border-color: var(--rose-primary);
    box-shadow: var(--rose-glow);
}

/* ==========================================
   PORTAL ESTUDIANTE: VISTAS
   ========================================== */
.student-profile-hero {
    background: linear-gradient(135deg, #1E293B, #0F172A);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.student-profile-hero::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
    pointer-events: none;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-primary), var(--emerald-primary));
    color: var(--bg-deep);
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.profile-hero-info h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.student-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.badge-status-student {
    margin-top: 12px;
}

.badge-emerald {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--emerald-glow);
    color: var(--emerald-bright);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Info Grid student portal */
.student-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.info-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.info-card-title i {
    color: var(--emerald-primary);
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-val {
    font-weight: 600;
}

.stats-summary {
    display: flex;
    flex-direction: column;
}

.dashboard-stats-row {
    display: flex;
    gap: 16px;
    flex: 1;
}

.stat-box {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.box-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.box-value {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0;
}

.box-value.highlight-emerald {
    color: var(--emerald-primary);
}

.box-value.highlight-blue {
    color: var(--blue-primary);
}

.box-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Card accent header */
.card-accent-header {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.card-accent-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.card-accent-header p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Boleta digital table stylings */
.boleta-table td.text-center, .boleta-table th.text-center {
    text-align: center;
}

.grade-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}

.grade-pill.passed {
    background-color: var(--emerald-glow);
    color: var(--emerald-bright);
}

.grade-pill.failed {
    background-color: var(--rose-glow);
    color: var(--rose-primary);
}

.grade-pill.empty {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

/* Student Attendance dashboard */
.attendance-summary-header {
    display: flex;
    align-items: center;
    gap: 32px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.attendance-summary-header .metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    justify-content: center;
}

.attendance-summary-header .metric .val {
    font-size: 24px;
    font-weight: 800;
    color: var(--emerald-primary);
}

.attendance-summary-header .metric .lbl {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.attendance-summary-header .indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ind-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ind-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.bg-success {
    background-color: var(--emerald-primary);
}

.bg-danger {
    background-color: var(--rose-primary);
}

.bg-warning {
    background-color: var(--amber-primary);
}

/* Attendance calendar dots */
.attendance-calendar-grid {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.calendar-dots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.calendar-dot {
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    background-color: #334155;
    position: relative;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.calendar-dot:hover {
    transform: scale(1.15);
}

.calendar-dot.present {
    background-color: var(--emerald-primary);
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.calendar-dot.absent {
    background-color: var(--rose-primary);
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.calendar-dot.justified {
    background-color: var(--amber-primary);
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

.calendar-dot::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 10;
}

.calendar-dot:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================
   MODAL DE DETALLE DEL ESTUDIANTE
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
}

.student-profile-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--blue-primary);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-student-meta h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-student-meta p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

/* Modal Navigation Tabs */
.modal-nav {
    display: flex;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
}

.modal-nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.modal-nav-item:hover {
    color: var(--text-primary);
}

.modal-nav-item.active {
    color: var(--emerald-primary);
    border-bottom-color: var(--emerald-primary);
}

/* Modal Content Area */
.modal-body-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-tab-pane {
    display: none;
}

.modal-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.modal-pane-grid {
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 24px;
}

.pane-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pane-subtitle i {
    color: var(--emerald-primary);
}

.info-properties {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.prop-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
}

.prop-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.prop-value {
    font-size: 14px;
    font-weight: 500;
    margin-top: 2px;
}

/* Gradient card for downloads / action panel */
.action-card-gradient {
    background: linear-gradient(145deg, #1E293B, #0F172A);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.action-card-gradient h4 {
    font-size: 14px;
    font-weight: 700;
}

.action-card-gradient p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Simulation Loader Animation */
.loader-container {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-bg {
    background-color: var(--bg-deep);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--emerald-primary);
    transition: width 0.1s linear;
}

.loader-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.success-card {
    background-color: var(--emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--emerald-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.4s ease-out;
}

/* Boleta modal headers */
.boleta-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.boleta-modal-header h4 {
    font-size: 15px;
    font-weight: 700;
}

.boleta-modal-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

.promedio-badge {
    background-color: var(--emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
}

.promedio-badge span {
    color: var(--text-secondary);
    margin-right: 6px;
}

.promedio-badge strong {
    color: var(--emerald-primary);
    font-size: 16px;
}

/* Modal Attendance tab specific layout */
.metrics-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.mini-card {
    border-radius: var(--border-radius-md);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-card.bg-success {
    background-color: var(--emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.mini-card.bg-success .num { color: var(--emerald-primary); }

.mini-card.bg-danger {
    background-color: var(--rose-glow);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.mini-card.bg-danger .num { color: var(--rose-primary); }

.mini-card.bg-warning {
    background-color: var(--blue-glow);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.mini-card.bg-warning .num { color: var(--blue-primary); }

.mini-card .num {
    font-size: 22px;
    font-weight: 800;
}

.mini-card .lbl {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 4px;
}

.history-list-wrapper h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.attendance-history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-date {
    font-weight: 600;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    justify-content: flex-end;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--emerald-primary);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-error {
    border-left-color: var(--rose-primary);
}

.toast.toast-warning {
    border-left-color: var(--amber-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   NUEVOS ESTILOS: CONTROL BIOMÉTRICO Y AULA
   ========================================== */
.biometric-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 24px;
    align-items: start;
}

.biometric-reader-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.scanner-interface {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
}

.fingerprint-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: var(--bg-deep);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.fingerprint-wrapper i {
    font-size: 76px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.fingerprint-wrapper.active {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.fingerprint-wrapper.active i {
    color: var(--emerald-bright);
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
}

/* LÁSER DE ESCANEO ANIME */
.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--emerald-bright), transparent);
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 8px var(--emerald-bright);
}

.fingerprint-wrapper.scanning .scanner-laser {
    opacity: 1;
    animation: laserScan 1.6s ease-in-out infinite;
}

@keyframes laserScan {
    0%, 100% {
        top: 10%;
    }
    50% {
        top: 90%;
    }
}

.biometric-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.full-width {
    width: 100% !important;
}

.full-width select {
    width: 100% !important;
}

/* Biometric reports */
.biometric-reports-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.biometric-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    gap: 8px;
}

.biometric-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.biometric-tab-btn:hover {
    color: var(--text-primary);
}

.biometric-tab-btn.active {
    color: var(--emerald-primary);
    border-bottom-color: var(--emerald-primary);
}

.biometric-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.biometric-pane.active {
    display: block;
}

/* Classroom manager & general tabs */
.classroom-setup-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.classroom-tabs-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.classroom-tabs-nav {
    display: flex;
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
}

.classroom-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.classroom-tab-btn:hover {
    color: var(--text-primary);
}

.classroom-tab-btn.active {
    color: var(--emerald-primary);
    border-bottom-color: var(--emerald-primary);
}

.classroom-tabs-content {
    padding: 24px;
}

.classroom-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.classroom-pane.active {
    display: block;
}

/* Timeline of planification */
.planification-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    margin-left: 10px;
    margin-top: 10px;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    left: -27px;
    top: 5px;
    border: 2px solid var(--bg-card);
}

.timeline-item.active::before {
    background-color: var(--emerald-primary);
    box-shadow: 0 0 8px var(--emerald-primary);
}

.timeline-week {
    font-size: 11px;
    font-weight: 700;
    color: var(--emerald-primary);
    text-transform: uppercase;
}

.timeline-content-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.timeline-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Grading box */
.class-grades-grading-box {
    margin-top: 24px;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

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

.grading-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.grading-box-header h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--emerald-primary);
    text-transform: uppercase;
}

.grading-box-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

.grade-input {
    width: 60px;
    background-color: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 700;
    outline: none;
    transition: var(--transition-smooth);
}

.grade-input:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
}

.grade-input.reprobado {
    color: var(--rose-primary);
    border-color: rgba(239, 68, 68, 0.3);
}

.grade-input.aprobado {
    color: var(--emerald-bright);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Timeline Layout for Representative Portal */
.rep-planning-layout, .classroom-planning-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.planning-card {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
}

.planning-title {
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.planning-title i {
    color: var(--emerald-primary);
}

.small-table td, .small-table th {
    padding: 10px 14px;
    font-size: 13px;
}

/* Horario de Clases grid style */
.schedule-grid-table th {
    text-align: center;
}

.schedule-grid-table td {
    text-align: center;
    font-size: 12px;
    height: 70px;
    vertical-align: middle;
}

.schedule-block {
    padding: 6px 8px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.schedule-block .subject {
    font-size: 12px;
    color: var(--text-primary);
}

.schedule-block .teacher {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.block-blue {
    background-color: var(--blue-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.block-emerald {
    background-color: var(--emerald-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.block-amber {
    background-color: var(--amber-glow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.block-purple {
    background-color: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.block-rose {
    background-color: var(--rose-glow);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.block-grey {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

/* ==========================================
   PANTALLA DE ACCESO BIOMÉTRICO (LOGIN)
   ========================================== */
.login-screen-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1E293B 0%, #0B0F19 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.login-screen-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 440px;
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.5s ease-out;
}

.login-header {
    text-align: center;
}

.login-logo-icon {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-bright));
    color: var(--bg-deep);
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-emerald);
}

.login-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.login-header p {
    font-size: 12px;
    color: var(--emerald-primary);
    font-weight: 600;
    margin-top: 2px;
}

.login-select, .login-input {
    width: 100%;
    background-color: var(--bg-deep);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    outline: none;
    transition: var(--transition-smooth);
}

.login-select:focus, .login-input:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.login-biometric-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 8px;
}

.biometric-instruction {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.login-biometric-section .fingerprint-wrapper {
    width: 120px;
    height: 120px;
    background-color: rgba(11, 15, 25, 0.6);
    border-color: var(--border-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: fingerPulse 2s infinite ease-in-out;
}

@keyframes fingerPulse {
    0%, 100% {
        border-color: var(--border-color);
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }
    50% {
        border-color: var(--emerald-primary);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    }
}

.login-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================
   ESTILOS DE LOGOUT / CERRAR SESIÓN
   ========================================== */
.sidebar-logout-wrapper {
    padding: 0 16px;
    margin-top: auto;
    margin-bottom: 12px;
}

.logout-link {
    color: var(--rose-primary) !important;
    border-left-color: transparent !important;
    font-weight: 600;
}

.logout-link i {
    color: var(--rose-primary) !important;
}

.logout-link:hover {
    background-color: var(--rose-glow) !important;
    color: #ff6e6e !important;
}

/* Estilos para el Overlay y Botón Móvil del Sidebar (Por defecto ocultos en escritorio) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.sidebar-close-mobile {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    z-index: 1002;
    transition: var(--transition-smooth);
}

.sidebar-close-mobile:hover {
    color: var(--text-primary);
}

/* Modificación de overflow para tablas en general */
.table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    min-width: 750px; /* Evita que las tablas se compriman en móvil */
}

/* ==========================================
   RESPONSIVIDAD (MOBILE & TABLET)
   ========================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        left: 0;
    }

    .sidebar-close-mobile {
        display: block; /* Visible sólo en móvil */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .content-body {
        padding: 16px;
    }
    
    .section-filters-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .select-group select {
        width: 100%;
    }
    
    .student-info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-card {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }

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

    .modal-pane-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .metrics-mini-grid {
        gap: 8px;
    }

    .mini-card {
        padding: 12px 8px;
    }

    .mini-card .num {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
    }

    .header-right {
        width: 100%;
    }

    .role-selector-container {
        width: 100%;
        justify-content: space-between;
        padding: 8px 12px;
    }

    .role-select {
        flex: 1;
        max-width: 220px;
    }

    .setup-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .setup-controls .select-group select {
        width: 100%;
    }

    .sheet-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sheet-info-bar .date-badge {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }

    .student-profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .dashboard-stats-row {
        flex-direction: column;
    }

    .attendance-summary-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .attendance-summary-header .indicators {
        justify-content: center;
    }
}

