.sidebar.collapsed .sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}
/* Logo circular en sidebar: tamaño normal y reducido */
.sidebar .admin-logo {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: all 0.3s ease-in-out;
}

.sidebar.collapsed .admin-logo {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    display: flex;
}

.sidebar .admin-logo img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease-in-out;
}

.sidebar.collapsed .admin-logo img {
    width: 40px;
    height: 40px;
}

/* Ocultar texto cuando está colapsado */
.sidebar.collapsed .logo span {
    display: none;
}

/* Contenedor del botón toggle */
.sidebar-toggle-container {
    padding: 0 1.5rem 1rem;
    text-align: center;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    width: 100%;
    max-width: 200px;
}

.sidebar.collapsed .sidebar-toggle-container {
    padding: 0 0.5rem 1rem;
}

.sidebar.collapsed .sidebar-toggle {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    border-radius: 50%;
    max-width: 40px;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Ocultar texto de navegación cuando está colapsado */
.sidebar.collapsed .nav-item span {
    display: none;
}

/* Ocultar detalles del usuario cuando está colapsado */
.sidebar.collapsed .user-details {
    display: none;
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

/* Centrar íconos cuando está colapsado */
.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 1rem 0.5rem;
    text-align: center;
}

.sidebar.collapsed .nav-item a i {
    margin-right: 0;
    width: auto;
}

.sidebar.collapsed .logout-btn {
    justify-content: center;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.sidebar.collapsed .logout-btn i {
    margin-right: 0;
}

/* Centrar logo cuando está colapsado */
.sidebar.collapsed .sidebar-header {
    text-align: center;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar.collapsed .logo {
    justify-content: center;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Centrar avatar del usuario cuando está colapsado */
.sidebar.collapsed .user-info {
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0 10px;
}

.sidebar.collapsed .user-avatar {
    margin-left: auto;
    margin-right: auto;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

/* Ajustar botón de logout cuando está colapsado */
.sidebar.collapsed .logout-btn {
    width: 40px;
    height: 40px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10 auto;
}
/* Utilidades responsivas para dashboard */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.responsive-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

.responsive-group {
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
}
/* ===== VARIABLES CSS ===== */
:root {
    /* Colores principales */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    
    /* Texto */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Bordes */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-color: #e2e8f0;
    
    /* Transiciones */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* ===== PÁGINA DE LOGIN ===== */
.login-body {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1e40af 100%);
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 { width: 100px; height: 100px; top: 20%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 60px; height: 60px; top: 60%; left: 80%; animation-delay: 2s; }
.shape-3 { width: 80px; height: 80px; top: 80%; left: 20%; animation-delay: 4s; }
.shape-4 { width: 120px; height: 120px; top: 10%; left: 70%; animation-delay: 1s; }
.shape-5 { width: 40px; height: 40px; top: 40%; left: 60%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    margin-bottom: 1rem;
    color: white;
    font-size: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Formulario de Login */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition-base);
    background-color: var(--bg-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input {
    margin-right: 0.5rem;
    width: auto;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    margin-right: 0.5rem;
}

.loading-spinner {
    position: absolute;
    right: 1rem;
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-dark);
}

.footer-links a i {
    margin-right: 0.5rem;
}

.version-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== ALERT MESSAGES ===== */
.alert-container {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    border: 1px solid;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fed7aa;
    color: #d97706;
}

.alert i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-body {
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 0%;
    animation: loading 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: var(--transition-base);
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-fast);
    border-radius: 0;
    position: relative;
}

.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active a {
    background-color: var(--primary-color);
    color: white;
}

.nav-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: white;
}

.nav-item a i {
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.user-avatar {
    aspect-ratio: 1/1;
    padding: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.user-details {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: white;
}

.logout-btn i {
    margin-right: 0.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: var(--transition-base);
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

.main-header {
    background: var(--bg-primary);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: var(--border-radius);
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

#pageTitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.user-menu-btn:hover {
    background-color: var(--bg-secondary);
}

.user-menu-btn i:first-child {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.user-menu-btn i:last-child {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 1000;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.user-menu-dropdown a:hover {
    background-color: var(--bg-secondary);
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
}

.user-menu-dropdown a i {
    margin-right: 0.75rem;
    width: 16px;
}

.user-menu-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 2rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard Overview */
.dashboard-overview {
    max-width: 1200px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    min-width: 60px;
    min-height: 60px;
    aspect-ratio: 1/1;
    box-sizing: border-box;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
}

.chart-placeholder i {
    margin-bottom: 1rem;
}

/* Botones */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-base);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #475569;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.btn-export {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn-export:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Cards */
.filters-card,
.results-card,
.warning-card,
.elimination-filters,
.elimination-results,
.config-overview,
.courses-grid,
.preview-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-base);
    border: 1px solid var(--border-color);
}

.filters-card h3,
.results-card h3,
.warning-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: var(--bg-primary);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Warning Card */
.warning-card {
    background: #fef7f0;
    border-color: #fed7aa;
    display: flex;
    align-items: flex-start;
}

.warning-icon {
    color: var(--warning-color);
    font-size: 2rem;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.warning-content h3 {
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.warning-content p {
    color: #92400e;
    line-height: 1.6;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.data-table .action-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    margin: 0 0.25rem;
}

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.selection-controls {
    display: flex;
    gap: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pagination Container - Nuevos estilos mejorados */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-controls .btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-controls .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-controls .btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.pagination-controls .btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-secondary);
    user-select: none;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-controls .btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
}

/* Config Overview */
.overview-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.overview-stats .stat-item {
    text-align: center;
    padding: 1.5rem 2rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.overview-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.overview-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.overview-stats .stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Course Category Tabs */
.course-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.course-tab {
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-tab i {
    font-size: 1.1rem;
}

.course-tab:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-color);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.course-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.course-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: var(--transition-base);
    position: relative;
}

.course-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.course-item.inactive {
    opacity: 0.6;
    border-color: var(--text-muted);
}

.course-item.inactive::after {
    content: 'INACTIVO';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.course-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.course-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.course-code {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.course-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.course-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem;
}

/* Form Preview */
.form-preview {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

.form-preview label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-preview select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--bg-primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(-50px);
    transition: var(--transition-base);
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Form Groups in Modals */
.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: var(--bg-primary);
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para detalle de registro */
.detalle-section {
    margin-bottom: 2rem;
}

.detalle-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detalle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detalle-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.detalle-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.detalle-item .value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.detalle-item .value.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.warning-text {
    color: var(--danger-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo span,
    .sidebar .nav-item span,
    .sidebar .user-details,
    .sidebar .logout-btn span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
        padding: 0;
    .filters-grid {
        grid-template-columns: 1fr;
    }
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 50%;
        background: var(--primary-color);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 0.5rem auto;
    
    .filters-actions .btn {
        flex: 1;
    }
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        background: var(--danger-color);
        color: #fff;
        font-size: 1.2rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-tabs {
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem;
    }
    
    .course-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-width: fit-content;
    }
    
    .course-tab i {
        font-size: 1rem;
    }
    
    .overview-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-right: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ===== UTILIDADES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

/* ===== ESTADOS DE HOVER Y FOCUS ===== */
.interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.interactive:active {
    transform: translateY(0);
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Add missing closing brace for @media (max-width: 768px) */
}

/* ==================== ESTILOS PARA CONFIGURACIÓN DE CUPOS ==================== */
.cupos-config-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 8px;
    border: 2px solid #ffc107;
}

.cupos-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cupos-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.cupo-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #ffc107;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cupo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cupo-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #856404;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.cupo-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0.75rem 0;
    font-family: 'Courier New', monospace;
}

.cupo-stats {
    font-size: 0.875rem;
    color: #666;
    margin: 0.5rem 0;
}

.btn-edit-cupo {
    background-color: #ffc107;
    color: #333;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-edit-cupo:hover {
    background-color: #e0a800;
    transform: scale(1.05);
}

.btn-edit-cupo:active {
    transform: scale(0.98);
}

.modal-cupos .modal-content {
    max-width: 500px;
}

.warning-message-cupos {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.warning-message-cupos ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.warning-message-cupos strong {
    display: block;
    margin-bottom: 0.5rem;
}

.id-preview {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    border: 2px dashed #dee2e6;
}

@media (max-width: 768px) {
    .cupos-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .cupo-value {
        font-size: 1.5rem;
    }
}
