/* ============================================
   style/styles.css - ARCHIVO PRINCIPAL
   Importa todos los módulos CSS del sistema
   ============================================ */


/* Variables globales del sistema */
:root {
    /* Colores principales */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --border-color: #e2e8f0;
    
    /* Sombras */
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Otros */
    --border-radius: 0.5rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================
   TEMA OSCURO - Aplicado a html.dark-mode
   ============================================= */
:root.dark-mode {
    /* Inversión de Colores del Tema */
    --system-bg: #0f172a;       /* Fondo principal muy oscuro */
    --system-text: #f1f5f9;     /* Texto principal muy claro */
    --system-card-bg: #1e293b;  /* Fondo de tarjetas/contenedores oscuro */
    --system-border: #334155;   /* Borde más oscuro */

    /* Puedes invertir también las principales si se usan en otros sitios */
    --light-color: #1e293b;
    --dark-color: #f8fafc; 

    /* Ajuste de colores primarios para mejor visibilidad */
    --primary-color: #3b82f6; 
    --primary-dark: #2563eb;
}

/* ============================================
   RESET Y CONFIGURACIÓN BASE
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* =============================================
   APLICACIÓN GLOBAL DEL TEMA (ELIMINADAS REGLAS REDUNDANTES)
   ============================================= */

/* ============================================
   NAVBAR Y HEADER - Optimizado + Dark Mode
   ============================================ */

.navbar-custom {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 81, 255, 0.85); /* azul translúcido */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  transition: background 0.3s ease, padding 0.3s ease;
  padding: 0.5rem 0; /* más compacto */
}

/* Efecto hover sutil */
.navbar-custom:hover {
  background: rgba(37, 99, 235, 0.95); /* azul sólido al pasar el mouse */
}

/* Logo e identidad */
.navbar-brand {
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.brand-icon .logo-img {
  padding-right: 8px;
  max-height: 65px !important; /* más compacto */
  width: auto !important;
  object-fit: contain !important;
  transition: transform 0.3s ease;
}

.brand-icon .logo-img:hover {
  transform: scale(1.05);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.8rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.1;
}

/* Links */
.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* Dropdowns */
.navbar-nav .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  background-color: #ffff;

}

.navbar-toggler-icon{
    filter: invert(100%) sepia(100%) saturate(200%) hue-rotate(180deg);
}

.navbar-nav .dropdown-item {
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
  transform: translateX(4px);
}

.navbar-nav .dropdown-item i {
  width: 1.25rem;
  text-align: center;
}

/* ---------- MODO OSCURO ---------- */
/* === Theme toggle styles & dark-mode helpers === */

html {
  transition: background-color 0.3s ease, color 0.3s ease;
}


/* small helper: visually hidden (screen readers) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Toggle base (fits navbar) */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.35rem .6rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-weight:600;
  transition:all .22s ease;
  height:38px;
  min-width:48px;
}

/* Icons group: only show the relevant icon via CSS */
.theme-toggle .icon-moon{ display:none; }
.theme-toggle .icon-sun{ display:inline-block; }

/* When dark-mode is active (applies to html or body) */
.dark-mode .theme-toggle{
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  color: #e6eef8;
}
.dark-mode .theme-toggle .icon-moon{ display:inline-block; }
.dark-mode .theme-toggle .icon-sun{ display:none; }

/* hover/focus */
.theme-toggle:hover,
.theme-toggle:focus{ transform:translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); outline:none }

/* Make it look good on dark navbar/light navbar */
.navbar-custom .theme-toggle { border-color: rgba(255,255,255,0.12); color: #fff; }
body:not(.dark-mode) .navbar-custom .theme-toggle { color: #fff; }

/* Responsive: small screens */
@media (max-width:480px){
  .theme-toggle{ padding:.25rem .45rem; height:34px; font-size:.95rem }
}

/* Optional: small slide knob variant (if prefieres una apariencia tipo switch)
   - Si querés usarlo, reemplaza el HTML inside button with a small <span class="switch">...</span>
   - Mantengo el diseño con icon swapping porque es simple y consistente. */

/* end theme toggle CSS */



/* ---------- ANIMACIÓN OPCIONAL ---------- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive: logo y padding más chicos en móvil */
@media (max-width: 768px) {
  .navbar-custom {
    padding: 0.4rem 0;
  }
  .brand-icon .logo-img {
    max-height: 45px !important;
  }
  .brand-title {
    font-size: 1rem;
  }
}

/* ============================================
   CONTENEDORES Y LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.form-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-white {
    color: #fff;
}


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

.text-muted {
    color: #6c757d;
}

/* ============================================
   BOTONES - Estilos generales consolidados
   ============================================ */
/* Base compartida para todos los tipos de botones */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-warning {
    color: #000;
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.btn-info {
    color: #000;
    background: linear-gradient(135deg, var(--info-color) 0%, #0891b2 100%);
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.w-100 {
    width: 100%;
}

/* ============================================
   TARJETAS (CARDS)
   ============================================ */
.card {
    background: white;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--light-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* ============================================
   TABLAS
   ============================================ */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

/* ============================================
   UTILIDADES DE ESPACIADO
   ============================================ */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* ============================================
   IMÁGENES
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.img-fluid:hover {
    transform: scale(1.02);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); color: #000; }
.bg-danger { background-color: var(--danger-color); }
.bg-info { background-color: var(--info-color); }
.bg-light { background-color: var(--light-color); color: #000; }
.bg-dark { background-color: var(--dark-color); }

/* ============================================
   ESTILOS ESPECÍFICOS - PERFIL
   ============================================ */
.profile-header {
    background: linear-gradient(291deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: #2563eb;
    margin: 0 auto 20px;
    border: 4px solid white;
}

.info-card {
    border-left: 4px solid #2563eb;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    background: var(--light-color);
}

/* ============================================
   ESTILOS ESPECÍFICOS - NOTAS
   ============================================ */
.nota-pendiente {
    background-color: #fff3cd;
}

.nota-aprobada {
    background-color: #d1e7dd;
}

.tabla-notas input[type="number"] {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* ============================================
   ESTILOS ESPECÍFICOS - ASISTENCIAS
   ============================================ */
.alumno-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.alumno-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.btn-group-asistencia .btn {
    width: 100px;
}

/* ============================================
   MÓDULO: LOGIN MODERNO
   ============================================ */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    max-width: 450px;
    width: 100%;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(291deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
}

.login-header .logo-circle {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #2563eb;
    font-weight: bold;
}

.login-body {
    padding: 2.5rem 2rem;
}

.input-group-custom {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group-custom .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #2563eb;
    font-size: 1.2rem;
}

.input-group-custom input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group-custom input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(291deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #718096;
    font-size: 0.875rem;
}

.btn-register {
    width: 100%;
    padding: 0.875rem;
    background: white;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-register:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.help-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.help-text a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.help-text a:hover {
    text-decoration: underline;
}

/* ============================================
   MÓDULO: REGISTRO EN 2 PASOS
   ============================================ */
.registro-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.registro-card {
    max-width: 550px;
    width: 100%;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.registro-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.registro-header .icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #10b981;
}

.registro-body {
    padding: 2.5rem 2rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: #10b981;
    color: white;
}

.step.completed .step-circle {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #94a3b8;
}

.step.active .step-label {
    color: #10b981;
    font-weight: 600;
}

.input-group-registro {
    margin-bottom: 1.5rem;
}

.input-group-registro label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-group-registro input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group-registro input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-group-registro .help-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
    text-align: left;
}

.user-info-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.user-info-card h4 {
    color: #059669;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.user-info-card h4 i {
    margin-right: 0.5rem;
}

.user-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #a7f3d0;
}

.user-info-item:last-child {
    border-bottom: none;
}

.user-info-label {
    font-weight: 600;
    color: #065f46;
}

.user-info-value {
    color: #047857;
}

.btn-registro {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-registro:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.btn-secundario {
    width: 100%;
    padding: 0.875rem;
    background: white;
    color: #10b981;
    border: 2px solid #10b981;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secundario:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
}

.password-requirements {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.password-requirements h5 {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    font-size: 0.875rem;
    color: #64748b;
    padding: 0.25rem 0;
}

.password-requirements li::before {
    content: "✓ ";
    color: #10b981;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ============================================
   MÓDULO: IMPORTACIÓN CSV
   ============================================ */
.vista-previa {
    display: none;
    margin-bottom: 1.5rem;
}

.vista-previa.show {
    display: block;
}

/* Sticky header en tablas de errores */
.table-responsive {
    position: relative;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Estadísticas de importación - CONSOLIDADO */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    background: var(--light-color);
}

.stat-card h3 {
    margin: 0;
    font-size: 2rem;
}

/* ============================================
   UTILIDADES - Animaciones, Progress, File Input
   ============================================ */
.progress {
    height: 30px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #e2e8f0;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: width 0.6s ease;
}

.card.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

input[type="file"] {
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(291deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}


/* ============================================
   ESTILOS ESPECÍFICOS - BOLETÍN
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .boletin-container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 20px !important;
    }

}


.boletin-container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0;
    font-family: var(--font-family);
}

.boletin-header {
    background: linear-gradient(291deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.boletin-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #2563eb;
}

.boletin-logo-img { 
    width: 70px; 
    height: auto; 
    object-fit: contain;
}

.boletin-title {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.boletin-subtitle {
    font-size: 18px;
    margin: 5px 0;
}

.info-alumno {
    padding: 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.info-row {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.info-label {
    font-weight: bold;
    width: 200px;
    color: #4a5568;
}

.info-value {
    flex: 1;
    color: #2d3748;
}

.notas-section {
    padding: 30px;
}

.tabla-boletin {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;

}
.tabla-boletin th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

.tabla-boletin td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.materia-nombre {
    text-align: left;
    font-weight: 500;
}

.profesor-nombre {
    font-size: 12px;
    color: #718096;
    display: block;
    margin-top: 4px;
}

.nota-final-col {
    background: #edf2ff;
    font-weight: bold;
    font-size: 16px;
}

.nota-desaprobada {
    color: #dc3545;
}

.resumen-section {
    padding: 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

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

.resumen-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.resumen-label {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
}

.resumen-valor {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
}

.estado-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-top: 20px;
}

.estado-aprobado {
    background: #d1fae5;
    color: #065f46;
}

.estado-desaprobado {
    background: #fee2e2;
    color: #991b1b;
}

.footer-boletin {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #718096;
    border-top: 1px solid #e2e8f0;
}



/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .navbar-brand .brand-text {
        display: none;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }


    .login-container,
    .registro-container {
        padding: 1rem;
    }
    
    .login-card,
    .registro-card {
        margin: 1rem;
    }
    
    .login-header,
    .registro-header {
        padding: 1.5rem 1rem;
    }
    
    .login-body,
    .registro-body {
        padding: 1.5rem 1rem;
    }
    
    .step-indicator::before {
        left: 20%;
        right: 20%;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   ANIMACIONES Y EFECTOS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   SCROLLBAR PERSONALIZADA
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}


/* ============================================
   ESTILOS PARA INDEX
   ============================================ */

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(
        0deg,
        rgba(0,0,0,0.5),
        rgba(0,0,0,0.5)
    ),url("../imagenes/FrenteEscuela.jpeg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; 
}


.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 2rem 0;
}

.hero-text {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary {
    background: white;
    color: #2563eb;
}

.btn-hero-primary:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-3px);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========== SECTIONS GENERALES ========== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== FEATURES SECTION ========== */
.features-section {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.icon-primary { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.icon-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.icon-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.icon-info { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.icon-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.feature-description {
    color: #64748b;
    line-height: 1.7;
}
.description {
    color: #64748b;
 }

/* ========== ABOUT SECTION ========== */
.about-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.about-badge {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #2563eb;
}

.about-badge i {
    font-size: 1.5rem;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.about-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #334155;
}

.about-feature-item i {
    color: #10b981;
    font-size: 1.2rem;
}

/* ========== ROLES SECTION ========== */
.roles-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 60px 20px;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.role-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border-top: 4px solid #2563eb;
    position: relative;
}

.role-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.15);
    border-top-color: #1d4ed8;
}


.role-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-bottom: 15px;
}

.role-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.role-features {
    list-style: none;
    margin: 20px 0;
}

.role-features li {
    padding: 8px 0;
    color: #1e293b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.role-features li:last-child {
    margin-bottom: 20px;
}

.role-features li i {
    color: #2563eb;
    margin-right: 12px;
    font-size: 1.1rem;
    font-weight: bold;
}

.role-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.role-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

/* ========== CTA SECTION ========== */
.cta-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.cta-description {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta-primary {
    background: white;
    color: #2563eb;
}

.btn-cta-primary:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-cta-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-outline:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-3px);
}

/* ========== FOOTER ========== */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-description {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-contact i {
    color: #2563eb;
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: #334155;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

.footer-credits {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-hero {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .roles-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    section {
        padding: 3rem 0;
    }
}


/* ============================================
   DARK MODE
   ============================================ */

/* Variables para modo oscuro */
html.dark-mode {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #e0e4e9;
    --success-color: #10b981;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --info-color: #22d3ee;
    --light-color: #1e293b;
    --dark-color: #f1f5f9;
    --border-color: #334155;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #e9ecf0;
    --text-muted: #94a3b8;
    
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Transiciones suaves para el cambio de tema */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark-mode * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========== BODY Y FONDOS ========== */
html.dark-mode body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
}

/* ========== NAVBAR ========== */
html.dark-mode .navbar-custom {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}
html.dark-mode .info-label{
    color: var(--text-primary);
}

html.dark-mode .info-value{
    color: var(--text-primary);
}

html.dark-mode .navbar-brand,
html.dark-mode .navbar-nav .nav-link {
    color: var(--text-primary) !important;
}

html.dark-mode .navbar-nav .nav-link:hover {
    background-color: rgba(51, 65, 85, 0.5);
    color: #fff !important;
}

html.dark-mode .navbar-nav .dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

html.dark-mode .navbar-nav .dropdown-item {
    color: var(--text-secondary);
}

html.dark-mode .navbar-nav .dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

html.dark-mode .dropdown-divider {
    border-color: var(--border-color);
}

/* ========== BOTÓN DE TOGGLE ========== */
html.dark-mode .theme-toggle {
    background: rgba(51, 65, 85, 0.5);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-primary);
}

html.dark-mode .theme-toggle:hover {
    background: rgba(51, 65, 85, 0.8);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* Mostrar icono correcto según el tema */
html.dark-mode .theme-toggle .icon-sun {
    display: none;
}

html.dark-mode .theme-toggle .icon-moon {
    display: inline-block;
}

html:not(.dark-mode) .theme-toggle .icon-sun {
    display: inline-block;
}

html:not(.dark-mode) .theme-toggle .icon-moon {
    display: none;
}

/* ========== TARJETAS (CARDS) ========== */
html.dark-mode .card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .card-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-bottom: 1px solid var(--border-color);
}

html.dark-mode .card-body {
    background: var(--bg-secondary);
}

html.dark-mode .card-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* ========== FORMULARIOS ========== */
html.dark-mode .form-control,
html.dark-mode .form-select,
html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode input[type="password"],
html.dark-mode input[type="number"],
html.dark-mode input[type="date"],
html.dark-mode textarea {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .form-control:focus,
html.dark-mode input:focus,
html.dark-mode textarea:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

html.dark-mode .form-label {
    color: var(--text-primary);
}

html.dark-mode .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ========== TABLAS ========== */
html.dark-mode .table {
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.dark-mode .table th,
html.dark-mode .table td {
    border-bottom-color: var(--border-color);
}

html.dark-mode .table thead th {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

html.dark-mode .table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

html.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(51, 65, 85, 0.3);
}

html.dark-mode .table-bordered {
    border-color: var(--border-color);
}

/* ========== ALERTAS ========== */
html.dark-mode .alert {
    border-color: var(--border-color);
}

html.dark-mode .alert-success {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: #a7f3d0;
}

html.dark-mode .alert-warning {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: #fde68a;
}

html.dark-mode .alert-danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fecaca;
}

html.dark-mode .alert-info {
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
    color: #bae6fd;
}

/* ========== BOTONES ========== */
html.dark-mode .btn-secondary {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .btn-secondary:hover {
    background-color: #475569;
    border-color: var(--border-color);
}

html.dark-mode .btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .btn-outline-light:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* ========== BADGES ========== */
html.dark-mode .badge.bg-light {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

html.dark-mode .badge.bg-secondary {
    background-color: #475569 !important;
}

/* ========== MÓDULO LOGIN ========== */
html.dark-mode .login-container,
html.dark-mode .registro-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html.dark-mode .login-card,
html.dark-mode .registro-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

html.dark-mode .login-body,
html.dark-mode .registro-body {
    background: var(--bg-secondary);
}

html.dark-mode .input-group-custom input,
html.dark-mode .input-group-registro input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .input-group-custom input:focus,
html.dark-mode .input-group-registro input:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
}

html.dark-mode .divider::before {
    background: var(--border-color);
}

html.dark-mode .divider span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

html.dark-mode .help-text {
    color: var(--text-secondary);
}

html.dark-mode .user-info-card {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: var(--success-color);
}

html.dark-mode .user-info-item {
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

html.dark-mode .password-requirements {
    background: var(--bg-tertiary);
}

html.dark-mode .password-requirements h5,
html.dark-mode .password-requirements li {
    color: var(--text-secondary);
}

/* ========== PERFIL ========== */
html.dark-mode .profile-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

html.dark-mode .info-card {
    background: var(--bg-secondary);
    border-left-color: var(--primary-color);
}

html.dark-mode .stat-card {
    background: var(--bg-tertiary);
}

/* ========== BOLETÍN ========== */
html.dark-mode .boletin-container {
    background: var(--bg-secondary);
}

html.dark-mode .info-alumno {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-color);
}

html.dark-mode .notas-section {
    background: var(--bg-secondary);
}

html.dark-mode .tabla-boletin td {
    border-color: var(--border-color);
}

html.dark-mode .nota-final-col {
    background: rgba(59, 130, 246, 0.2);
}

html.dark-mode .resumen-section {
    background: var(--bg-tertiary);
    border-top-color: var(--border-color);
}

html.dark-mode .resumen-item {
    background: var(--bg-secondary);
}

html.dark-mode .resumen-label{
    color: var(--text-primary);
}

html.dark-mode .footer-boletin {
    border-top-color: var(--border-color);
    color: var(--text-muted);
}

/* ========== ASISTENCIAS ========== */
html.dark-mode .alumno-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html.dark-mode .alumno-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* ========== HERO SECTION (INDEX) ========== */
html.dark-mode .hero-section {
    background-image: linear-gradient(
        0deg,
        rgba(15, 23, 42, 0.85),
        rgba(15, 23, 42, 0.85)
    ), url("../imagenes/FrenteEscuela.jpeg");
}

html.dark-mode .features-section,
html.dark-mode .roles-section {
    background: var(--bg-primary);
}

html.dark-mode .feature-card,
html.dark-mode .role-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

html.dark-mode .feature-title,
html.dark-mode .role-title,
html.dark-mode .section-title {
    color: var(--text-primary);
}

html.dark-mode .feature-description,
html.dark-mode .section-description {
    color: var(--text-secondary);
}

html.dark-mode .about-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html.dark-mode .about-title {
    color: var(--text-primary);
}

html.dark-mode .about-text {
    color: var(--text-secondary);
}

html.dark-mode .stat-label,
html.dark-mode .about-feature-item {
    color: var(--text-secondary);
}

/* ========== FOOTER ========== */
html.dark-mode .footer {
    background: #0f172a;
    border-top: 1px solid var(--border-color);
}

html.dark-mode .footer-logo-text {
    color: var(--text-primary);
}

html.dark-mode .footer-description,
html.dark-mode .footer-links a,
html.dark-mode .footer-contact li {
    color: var(--text-secondary);
}

html.dark-mode .footer-title {
    color: var(--text-primary);
}

html.dark-mode .footer-bottom {
    border-top-color: var(--border-color);
    color: var(--text-secondary);
}

html.dark-mode .social-link {
    background: var(--bg-tertiary);
}

html.dark-mode .social-link:hover {
    background: var(--primary-color);
}

/* ========== SCROLLBAR ========== */
html.dark-mode ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

html.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
}

html.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ========== LISTA DE ENLACES ========== */
html.dark-mode .list-group-item {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode .list-group-item:hover {
    background-color: var(--bg-tertiary);
}

/* ========== PROGRESS BARS ========== */
html.dark-mode .progress {
    background: var(--bg-tertiary);
}

/* ========== TEXT UTILITIES ========== */
html.dark-mode .text-muted {
    color: var(--text-muted) !important;
}

html.dark-mode h1, 
html.dark-mode h2, 
html.dark-mode h3, 
html.dark-mode h4, 
html.dark-mode h5, 
html.dark-mode h6 {
    color: var(--text-primary);
}

html.dark-mode h1 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== FILE INPUT ========== */
html.dark-mode input[type="file"] {
    color: var(--text-primary);
}

html.dark-mode input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* ========== SELECT ========== */
html.dark-mode select {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.dark-mode select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========== MODAL (si usas modales de Bootstrap) ========== */
html.dark-mode .modal-content {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

html.dark-mode .modal-header {
    border-bottom-color: var(--border-color);
}

html.dark-mode .modal-footer {
    border-top-color: var(--border-color);
}

html.dark-mode .modal-title {
    color: var(--text-primary);
}

/* ============================================
   CORRECCIONES ESPECÍFICAS DE BOTONES EN DARK MODE
   ============================================ */

/* ========== BOTONES DE LOGIN ========== */
html.dark-mode .btn-login {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
}

html.dark-mode .btn-login:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white !important;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.5);
}

html.dark-mode .btn-register {
    background: var(--bg-secondary);
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
}

html.dark-mode .btn-register:hover {
    background: var(--primary-color);
    color: white !important;
}

/* ========== BOTONES DE REGISTRO ========== */
html.dark-mode .btn-registro {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
}

html.dark-mode .btn-registro:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white !important;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.5);
}

html.dark-mode .btn-secundario {
    background: var(--bg-secondary);
    color: var(--success-color) !important;
    border: 2px solid var(--success-color);
}

html.dark-mode .btn-secundario:hover {
    background: var(--success-color);
    color: white !important;
}

/* ========== BOTONES DEL HERO (LANDING PAGE) ========== */
html.dark-mode .btn-hero {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

html.dark-mode .btn-hero-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
}

html.dark-mode .btn-hero-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white !important;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

html.dark-mode .btn-hero-secondary {
    background: transparent;
    color: white !important;
    border: 2px solid white;
}

html.dark-mode .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    border-color: white;
}

/* ========== BOTONES CTA (LANDING PAGE) ========== */
html.dark-mode .btn-cta-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
}

html.dark-mode .btn-cta-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

html.dark-mode .btn-cta-outline {
    background: transparent;
    color: white !important;
    border: 2px solid white;
}

html.dark-mode .btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* ========== BOTONES DEL ROL (LANDING PAGE) ========== */
html.dark-mode .role-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
}

html.dark-mode .role-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white !important;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

/* ========== BOTONES GENERALES DE BOOTSTRAP ========== */
html.dark-mode .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    border: none;
}

html.dark-mode .btn-primary:hover,
html.dark-mode .btn-primary:focus {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white !important;
}

html.dark-mode .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    border: none;
}

html.dark-mode .btn-success:hover,
html.dark-mode .btn-success:focus {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white !important;
}

html.dark-mode .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000 !important;
    border: none;
}

html.dark-mode .btn-warning:hover,
html.dark-mode .btn-warning:focus {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #000 !important;
}

html.dark-mode .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white !important;
    border: none;
}

html.dark-mode .btn-danger:hover,
html.dark-mode .btn-danger:focus {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white !important;
}

html.dark-mode .btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white !important;
    border: none;
}

html.dark-mode .btn-info:hover,
html.dark-mode .btn-info:focus {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white !important;
}

/* ========== BOTONES OUTLINE EN DARK MODE ========== */
html.dark-mode .btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
    background: transparent;
}

html.dark-mode .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white !important;
}

html.dark-mode .btn-outline-success {
    color: var(--success-color) !important;
    border-color: var(--success-color);
    background: transparent;
}

html.dark-mode .btn-outline-success:hover {
    background: var(--success-color);
    color: white !important;
}

html.dark-mode .btn-outline-warning {
    color: var(--warning-color) !important;
    border-color: var(--warning-color);
    background: transparent;
}

html.dark-mode .btn-outline-warning:hover {
    background: var(--warning-color);
    color: #000 !important;
}

html.dark-mode .btn-outline-danger {
    color: var(--danger-color) !important;
    border-color: var(--danger-color);
    background: transparent;
}

html.dark-mode .btn-outline-danger:hover {
    background: var(--danger-color);
    color: white !important;
}

html.dark-mode .btn-outline-info {
    color: var(--info-color) !important;
    border-color: var(--info-color);
    background: transparent;
}

html.dark-mode .btn-outline-info:hover {
    background: var(--info-color);
    color: white !important;
}

/* ========== ASEGURAR VISIBILIDAD EN LINKS DE BOTONES ========== */
html.dark-mode a.btn,
html.dark-mode button.btn {
    text-decoration: none;
}

/* Específico para enlaces que parecen botones */
html.dark-mode a.btn-primary,
html.dark-mode a.btn-success,
html.dark-mode a.btn-warning,
html.dark-mode a.btn-danger,
html.dark-mode a.btn-info {
    color: inherit !important;
}

/* ========== BOTONES DE ASISTENCIA ========== */
html.dark-mode .btn-group-asistencia .btn-check:checked + .btn-outline-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white !important;
}

html.dark-mode .btn-group-asistencia .btn-check:checked + .btn-outline-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000 !important;
}

html.dark-mode .btn-group-asistencia .btn-check:checked + .btn-outline-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white !important;
}

/* ========== BOTONES EN FOOTER ========== */
html.dark-mode .footer .btn {
    color: white !important;
}

/* ========== FIX PARA INPUT FILE BUTTON ========== */
html.dark-mode input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
}

html.dark-mode input[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

/* ========== ASEGURAR CONTRASTE EN TODOS LOS ESTADOS ========== */
html.dark-mode .btn:active,
html.dark-mode .btn:focus,
html.dark-mode .btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== DROPDOWN BUTTONS ========== */
html.dark-mode .dropdown-toggle {
    color: var(--text-primary) !important;
}

html.dark-mode .dropdown-toggle::after {
    border-top-color: var(--text-primary);
}

/* ========== PRINT (mantener claro) ========== */
