/* ==========================================
   ESTILO INICIO / LOGIN — ISPM 2025 (AISLADO)
   ========================================== */

.index-page {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */
.index-page .inicio-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
}

/* ==========================================
   PANEL IZQUIERDO (INFO)
   ========================================== */
.index-page .panel-izquierdo {
  background: linear-gradient(135deg, #1d2f6f, #1e40af);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.index-page .logo {
  width: 220px;
  margin-bottom: 20px;
}

.index-page .panel-izquierdo h1 {
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.4;
  color: #ffffff !important;
}
.index-page .panel-izquierdo h1 span {
 color: #ffffff !important
}
.index-page .panel-izquierdo .descripcion {
  margin-top: 15px;
  font-size: 15px;
  max-width: 320px;
  opacity: 0.9;
  color: #ffffff !important;
}

/* ==========================================
   PANEL DERECHO (FORM LOGIN)
   ========================================== */
.index-page .panel-derecho {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
}

.index-page .card-login {
  background: #fff;
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 80%;
  max-width: 400px;
}

.index-page .card-login h2 {
  color: #1d2f6f;
  margin-bottom: 25px;
}

.index-page label {
  display: block;
  text-align: left;
  font-size: 15px;
  margin-bottom: 6px;
  color: #334155;
}

.index-page input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.index-page input:focus {
  border-color: #1d2f6f;
  outline: none;
}

/* ==========================================
   BOTÓN PRINCIPAL
   ========================================== */
.index-page button {
  width: 100%;
  background: #1d2f6f;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s;
}
.index-page button:hover {
  background: #2a3fa5;
}

/* ==========================================
   NOTA Y ENLACES
   ========================================== */
.index-page .nota {
  font-size: 13px;
  margin-top: 20px;
  color: #475569;
}
.index-page .nota a {
  color: #1d2f6f;
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================
   FOOTER
   ========================================== */
.index-page footer {
  text-align: center;
  font-size: 14px;
  color: #475569;
  padding: 20px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.index-page footer img {
  width: 40px;
  vertical-align: middle;
  margin-right: 10px;
}
.index-page footer span {
  color: #1d2f6f;
  font-weight: 600;
}

/* ==========================================
   MENSAJES / TOASTER
   ========================================== */
.index-page .mensaje {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1d2f6f;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
  transition: all 0.4s ease;
}
.index-page .mensaje.error { background: #dc2626; }
.index-page .mensaje.success { background: #16a34a; }
.index-page .hidden { display: none; }

/* ==========================================
   ÁREAS Y TARJETAS (INFO VISUAL)
   ========================================== */
.index-page .bloque-area {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease-in-out;
}
.index-page .bloque-area:hover {
  transform: translateY(-2px);
}
.index-page .titulo-area {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 700;
  color: #1d2f6f;
  border-left: 5px solid #1d2f6f;
  padding-left: 10px;
  letter-spacing: 0.5px;
}

.index-page .grid-electivos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.index-page .electivo-card {
  flex: 1 1 calc(33.3% - 12px);
  min-width: 180px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  padding: 18px 12px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}
.index-page .electivo-card:hover {
  border-color: #1d2f6f;
  box-shadow: 0 4px 12px rgba(29, 47, 111, 0.2);
}
.index-page .electivo-card.selected {
  background: #1d2f6f;
  color: #fff;
  border-color: #1d2f6f;
  box-shadow: 0 4px 16px rgba(29, 47, 111, 0.3);
}

/* ==========================================
   ENLACE ADMIN
   ========================================== */
.index-page .link-admin {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.index-page .link-admin:hover {
  text-decoration: underline;
  color: #1e3a8a;
}

/* ==========================================
   RESPONSIVO
   ========================================== */
@media (max-width: 800px) {
  .index-page .inicio-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .index-page .panel-izquierdo {
    padding: 30px;
  }
}
/* ==========================================
   DASHBOARD — ISPM 2025 (UNIFICADO)
   ========================================== */
.dashboard-header {
  text-align: center;
  background: linear-gradient(90deg, #1d2f6f, #2563eb);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.dashboard-header .logo {
  width: 90px;
  margin-bottom: 10px;
}
.dashboard-main {
  padding: 30px;
  max-width: 1000px;
  margin: 0 auto;
}
.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}
.btn-azul {
  background: #2563eb;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-azul:hover {
  background: #1d2f6f;
}
.tarjetas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}
.tarjeta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  padding: 20px;
  width: 180px;
  transition: transform 0.2s;
}
.tarjeta:hover {
  transform: translateY(-4px);
}
.tarjeta h2 {
  color: #2563eb;
  margin-bottom: 6px;
}
.tarjeta p {
  font-size: 2rem;
  font-weight: bold;
  color: #1e293b;
}
.tabla-section h2 {
  color: #1d2f6f;
  margin-bottom: 15px;
}
.tabla {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.tabla th, .tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.tabla th {
  background: #2563eb;
  color: white;
}
.tabla tr:hover td {
  background: #f1f5f9;
}
footer {
  text-align: center;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  padding: 15px;
  border-top: 1px solid #e2e8f0;
}
/* ==========================================
   LOGIN ADMIN MODAL — UNIFICADO
   ========================================== */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
.admin-modal.hidden { display: none; }
.admin-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  padding: 28px 32px;
  width: 320px;
  text-align: center;
  animation: aparecer 0.3s ease;
}
@keyframes aparecer {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.admin-card input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.admin-card .acciones {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.btn-rojo {
  background: #dc2626;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-rojo:hover {
  background: #b91c1c;
}
.error-msg {
  color: #dc2626;
  margin-top: 8px;
  font-size: 0.9rem;
  min-height: 1rem;
}
/* ==========================================
   GESTIÓN DE ESTUDIANTES
   ========================================== */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.tab {
  border: none;
  background: #e5e7eb;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--texto);
  transition: 0.2s;
}

.tab.active {
  background: #2563eb;
  color: #fff;
}

.filtros {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.filtros input {
  width: 260px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.tabla {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.tabla th, .tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.tabla th {
  background: #2563eb;
  color: white;
  font-weight: 600;
}

.tabla tr:hover td {
  background: #f8fafc;
}
/* ==========================================
   GESTIÓN DE ESTUDIANTES
   ========================================== */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.tab {
  border: none;
  background: #e5e7eb;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--texto);
  transition: 0.2s;
}

.tab.active {
  background: #2563eb;
  color: #fff;
}

.filtros {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.filtros input {
  width: 260px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.tabla {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.tabla th, .tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.tabla th {
  background: #2563eb;
  color: white;
  font-weight: 600;
}

.tabla tr:hover td {
  background: #f8fafc;
  cursor: pointer;
}

/* 🔹 Modal */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  z-index: 999;
}

.modal.hidden { display: none; }

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
}

.modal-content input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.acciones-modal {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.btn-rojo {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-rojo:hover { background: #b91c1c; }
/* ==========================================
   DASHBOARD VISUAL
   ========================================== */
.admin-info {
  text-align: center;
  margin-top: -5px;
  margin-bottom: 25px;
  font-size: 15px;
  color: #1e3a8a;
}

.panel-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 30px auto 50px;
  max-width: 900px;
}

.panel-card {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.panel-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.panel-card p {
  font-size: 14px;
  opacity: 0.9;
}
/* =============================
   DASHBOARD ADMIN ISPM 2025
============================= */
.contenido {
  padding: 40px 20px;
  text-align: center;
}

.contenido h1 {
  color: var(--azul);
  font-size: 2rem;
  margin-bottom: 10px;
}

.admin-info {
  color: var(--texto);
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Métricas */
.tarjetas {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.tarjeta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 20px 40px;
  width: 200px;
  transition: transform .2s ease;
}

.tarjeta:hover {
  transform: scale(1.05);
}

.tarjeta h2 {
  color: var(--azulClaro);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tarjeta p {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

/* Secciones de gestión */
.subtitulo-seccion {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--azul);
}

.panel-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.panel-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.panel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  background: var(--azulClaro);
  color: #fff;
}

.panel-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.panel-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* =============================
   DASHBOARD ADMIN ISPM 2025
============================= */
.dashboard-root {
  background: var(--gris);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contenido {
  padding: 40px 20px;
  text-align: center;
}

.contenido h1 {
  color: var(--azul);
  font-size: 2rem;
  margin-bottom: 10px;
}

.admin-info {
  color: var(--texto);
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Métricas */
.tarjetas {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.tarjeta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 20px 40px;
  width: 200px;
  transition: transform .2s ease;
}

.tarjeta:hover {
  transform: scale(1.05);
}

.tarjeta h2 {
  color: var(--azulClaro);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tarjeta p {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

/* Secciones */
.subtitulo-seccion {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--azul);
}

.panel-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.panel-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.panel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  background: var(--azulClaro);
  color: #fff;
}

.panel-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.panel-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}
/* Fix colores de texto en cards del Dashboard */
.panel-card {
  color: var(--texto);        /* texto visible por defecto */
}

.panel-card h3,
.panel-card p {
  color: var(--texto);        /* asegura color en hijos */
}

.panel-card:hover {
  background: var(--azulClaro);
  color: #fff;                /* al hover, se pone blanco */
}

.panel-card:hover h3,
.panel-card:hover p {
  color: #fff;                /* hijos también en blanco al hover */
}

/* Opcional: mejora legibilidad de métricas y títulos */
.contenido h1 {
  letter-spacing: .3px;
}
.panel-card h3 {
  font-weight: 700;
}
.panel-card p {
  opacity: .95;
}
/* =============================
   🔹 SECCIÓN: GESTIÓN DE ESTUDIANTES
   Aislada dentro de .estudiantes-root
============================= */

.estudiantes-root {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  margin: 0;
  padding: 0;
}

/* HEADER */
.estudiantes-root .dashboard-header {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #1e3a8a;
  color: #fff;
  padding: 15px 25px;
}

.estudiantes-root .dashboard-header .logo {
  width: 55px;
  height: auto;
}

.estudiantes-root .dashboard-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

/* MAIN CARD */
.estudiantes-root .dashboard-main {
  max-width: 1100px;
  margin: 30px auto;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* TABS */
.estudiantes-root .tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  gap: 10px;
}

.estudiantes-root .tab {
  background: #e5e7eb;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.estudiantes-root .tab.active {
  background: #2563eb;
  color: #fff;
}

/* FILTROS */
.estudiantes-root .filtros {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.estudiantes-root .filtros input, 
.estudiantes-root .filtros select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

/* BOTONES */
.estudiantes-root .btn-azul {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.estudiantes-root .btn-azul:hover {
  background: #1e3a8a;
}

.estudiantes-root .btn-rojo {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.estudiantes-root .btn-rojo:hover {
  background: #991b1b;
}

/* TABLA */
.estudiantes-root .tabla {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.estudiantes-root th {
  background: #1e3a8a;
  color: #fff;
  padding: 10px;
  text-align: left;
}

.estudiantes-root td {
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.estudiantes-root tr.grupo td {
  background: #e0e7ff;
  font-weight: bold;
  color: #1e3a8a;
}

/* MODAL */
.estudiantes-root .modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.estudiantes-root .modal.hidden {
  display: none;
}

.estudiantes-root .modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.estudiantes-root .modal-content input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.estudiantes-root .acciones-modal {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

/* FOOTER */
.estudiantes-root footer {
  text-align: center;
  margin-top: 30px;
  color: #666;
  font-size: 13px;
}
/* =============================== */
/* 🔹 Estilos de selección de electivos (cards) */
/* =============================== */

.electivo-card.selected {
  border: 2px solid #2563eb !important;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
}

.electivo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
/* ==== BOTONES DE NAVEGACIÓN ==== */
.next, .prev {
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.next {
  background: var(--azulClaro);
  color: #fff;
  transition: 0.3s;
}
.next:hover {
  background: var(--azul);
}
.prev {
  background: #9ca3af;
  color: #fff;
  transition: 0.3s;
}
.prev:hover {
  background: #6b7280;
}
/* Estilo extra para el formulario plano */
input, select {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
}

button:hover {
  opacity: 0.9;
}

h3 {
  font-weight: 600;
}

label {
  display: block;
  margin-top: 6px;
  font-weight: 500;
}
/* ======================================================
   ESTILO INSTITUCIONAL — ELECTIVIDAD ISPM 2025
   ====================================================== */

:root {
  --azul: #1e3a8a;
  --azulClaro: #2563eb;
  --gris: #f1f5f9;
  --blanco: #ffffff;
  --texto: #1f2937;
  --verde: #16a34a;
  --rojo: #dc2626;
  --amarillo: #facc15;
}

/* Fondo general */
body {
  background: var(--gris);
  color: var(--texto);
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

/* Header superior */
header {
  background: var(--azul);
  color: var(--blanco);
  text-align: center;
  padding: 18px 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

header h1 {
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
}

/* Contenedor principal */
main {
  max-width: 960px;
  margin: 35px auto;
  background: var(--blanco);
  border-radius: 18px;
  padding: 35px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Subtítulo */
h2 {
  color: var(--azul);
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
}

/* Cajas informativas del estudiante */
#infoAlumno {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

#infoAlumno div {
  background: var(--gris);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 500;
  color: var(--texto);
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

/* Cajas de secciones */
.seccion-card {
  background: var(--blanco);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.seccion-card h3 {
  color: var(--azul);
  margin-top: 0;
}

/* Fondos de color por sección */
.amarillo { background: #fffbea; }
.celeste  { background: #eff6ff; }
.lila     { background: #f5f3ff; }

/* Inputs y selects */
input, select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  margin-top: 4px;
  margin-bottom: 12px;
  outline: none;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  border-color: var(--azulClaro);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* Botón principal */
button, .btn {
  background: var(--azulClaro);
  color: var(--blanco);
  font-weight: 600;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover, .btn:hover {
  background: var(--azul);
  transform: translateY(-1px);
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Mensaje emergente (toast) */
#mensajeEmergente {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--azul);
  color: var(--blanco);
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

#mensajeEmergente.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 35px;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Checkbox de salud */
#saludBox label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

#saludBox input[type="checkbox"] {
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 640px) {
  main {
    margin: 15px;
    padding: 20px;
  }
  #infoAlumno {
    flex-direction: column;
    align-items: center;
  }
}
.mensaje {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2563eb;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  transform: translateY(20px);
  z-index: 100;
}
.mensaje.visible {
  opacity: 1;
  transform: translateY(0);
}
.electivo-card.selected {
  border: 2px solid #1e3a8a;
  background: #e0e7ff;
}
.confirmaciones label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e3a8a;
  cursor: pointer;
}
.confirmaciones label span {
  line-height: 1.4;
}
.confirmaciones a:hover {
  text-decoration: underline;
}
.tabla-container {
  margin-top: 1rem;
  background: #f9fafb;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tabla {
  width: 100%;
  border-collapse: collapse;
}

.tabla th, .tabla td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.tabla th {
  background: #f1f5f9;
  color: #1e3a8a;
  font-weight: 700;
}

.hidden { display: none; }

.danger {
  background: #dc2626;
  color: white;
}
/* 🔹 EXTENSIONES UI POSTULACIONES — ISPM 2025 v2.5 */
.btn-flotante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 999;
}
.btn-flotante:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(37,99,235,0.35);
}
.export-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  margin-left: 8px;
}
.export-menu {
  position: absolute;
  right: 15px;
  top: 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 10;
}
.export-menu div {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1e3a8a;
}
.export-menu div:hover {
  background: #eff6ff;
}
.export-menu.hidden { display: none; }

.contador-seleccionados {
  font-weight: 600;
  color: #2563eb;
  align-self: center;
}

.badge.postulado {
  background: #9ca3af;
  color: #fff;
  font-weight: 600;
}

.sticky-filtros {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 10px 0;
}
/* ==============================================
   ESTILOS BASE — POSTULACIONES ISPM 2025
   ============================================== */

:root {
  --azul: #1e3a8a;
  --azulClaro: #2563eb;
  --grisFondo: #f8fafc;
  --grisTexto: #555;
  --blanco: #fff;
  --verdeClaro: #ecfdf5;
  --grisBorde: #e5e7eb;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--grisFondo);
  color: #1f2937;
  margin: 0;
  padding: 0;
}

/* Encabezado */
header {
  display: flex;
  align-items: center;
  background: var(--azul);
  color: var(--blanco);
  padding: 16px 28px;
  gap: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

header img {
  width: 50px;
  height: auto;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

main {
  max-width: 1150px;
  margin: 28px auto;
  background: var(--blanco);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 25px;
  min-height: 60vh;
  overflow: visible;
}

/* ==========================
   FILTROS Y CONTADOR
   ========================== */
.filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.filtros select,
.filtros input {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  min-width: 220px;
}

.contador-seleccionados {
  font-weight: 600;
  color: var(--azulClaro);
  align-self: center;
  min-width: 140px;
  text-align: center;
}

/* Sticky para filtros */
.sticky-filtros {
  position: sticky;
  top: 0;
  background: var(--blanco);
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 12px 0;
}

/* ==========================
   TABLAS Y CARDS
   ========================== */
.electivo-card {
  background: #f9fafb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 22px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.electivo-card:hover {
  transform: scale(1.01);
}

.electivo-head {
  background: #eef2ff;
  padding: 12px 16px;
  border-bottom: 2px solid var(--grisBorde);
  position: relative;
}

.electivo-head h3 {
  margin: 0;
  color: var(--azul);
  font-size: 1rem;
  font-weight: 600;
}

.electivo-meta {
  font-size: 13px;
  color: var(--grisTexto);
  margin-top: 4px;
}

table.alumnos {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.alumnos th {
  background: var(--azul);
  color: var(--blanco);
  padding: 8px;
  text-align: left;
}

table.alumnos td {
  padding: 8px;
  border-bottom: 1px solid var(--grisBorde);
}

tr.ya-asignado {
  background: var(--verdeClaro);
}

tr:hover {
  background: #f1f5f9;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--azulClaro);
  color: var(--blanco);
  font-size: 12px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.badge.postulado {
  background: #9ca3af;
}

/* ==========================
   BOTONES
   ========================== */
.btn-guardar {
  display: block;
  margin: 25px auto 5px;
  padding: 10px 18px;
  background: var(--azulClaro);
  color: var(--blanco);
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-guardar:hover {
  background: var(--azul);
}

.btn-guardar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Botón flotante */
.btn-flotante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--azulClaro);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  display: flex;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}
.btn-flotante:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 15px rgba(37,99,235,0.4);
}

/* Menú de exportación */
.export-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  margin-left: 8px;
}
.export-menu {
  position: absolute;
  right: 15px;
  top: 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 10;
}
.export-menu div {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--azul);
}
.export-menu div:hover {
  background: #eff6ff;
}
.export-menu.hidden {
  display: none;
}

/* ==========================
   ESTADOS Y TOAST
   ========================== */
.empty {
  text-align: center;
  color: #777;
  padding: 12px 0;
  font-size: 14px;
}

#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  background: var(--azul);
  color: var(--blanco);
  font-size: 14px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 100;
}
#toast.show {
  opacity: 1;
}

/* ==========================
   PIE DE PÁGINA
   ========================== */
footer {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin-top: 45px;
  padding-bottom: 25px;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 768px) {
  .filtros select,
  .filtros input {
    min-width: 100%;
  }
  main {
    margin: 10px;
    padding: 18px;
  }
  header {
    flex-direction: column;
    text-align: center;
  }
}
/* ============================================
   🔹 Animaciones visuales ISPM 2025 (logos + mensajes)
   ============================================ */

/* Animación de entrada suave para logo */
.logo-animada {
  opacity: 0;
  transform: translateY(-20px);
  animation: logoFadeIn 1.2s ease-out forwards;
}

@keyframes logoFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efecto de brillo suave en hover */
.logo-animada:hover {
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
  transform: scale(1.03);
  transition: 0.3s;
}

/* ============================================
   🔔 Animaciones para los mensajes TOAST
   ============================================ */
.toast-global {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #1e3a8a;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-weight: 600;
  font-size: 15px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-global.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Íconos por tipo */
.toast-global::before {
  font-size: 20px;
  display: inline-block;
}

.toast-global.success::before { content: "✅"; }
.toast-global.error::before { content: "❌"; }
.toast-global.warning::before { content: "⚠️"; }
.toast-global.info::before { content: "ℹ️"; }

.toast-global.success { background: #16a34a; }
.toast-global.error { background: #dc2626; }
.toast-global.warning { background: #f59e0b; }
.toast-global.info { background: #2563eb; }

.toast-global.hidden {
  display: none;
}
/* ===============================================
   🔧 FIX VISUAL DE MENSAJEEMERGENTE ANTIGUO
   =============================================== */
.mensaje.visible {
  display: block !important;
  opacity: 1 !important;
}
/* ======================================================
   🔧 FIX VISUAL — VISIBILIDAD DE MENSAJES CLÁSICOS
   ====================================================== */
.mensaje.visible {
  display: block !important;
  opacity: 1 !important;
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #1e3a8a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9999;
}

.mensaje.error { background: #dc2626; }
.mensaje.success { background: #16a34a; }
.mensaje.warning { background: #f59e0b; }
.mensaje.info { background: #2563eb; }
/* ======================================================
   🩵 FIX: Posición correcta del mensaje emergente
   ====================================================== */
.mensaje {
  position: fixed !important;
  bottom: 25px;
  right: 25px;
  background: #1e3a8a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9999 !important;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 320px;
}

.mensaje.visible {
  opacity: 1;
  transform: translateY(0);
}

.mensaje.error { background: #dc2626; }
.mensaje.success { background: #16a34a; }
.mensaje.warning { background: #f59e0b; }
.mensaje.info { background: #2563eb; }
/* ===========================================================
   ESTILOS INSTITUCIONALES ISPM 2025
   Pop-ups y mensajes globales — index.css
   =========================================================== */

/* 🔹 TOAST GLOBAL (ya usado por mostrarMensaje) */
#toastGlobal {
  position: fixed;
  bottom: 30px;
  right: 30px;
  min-width: 280px;
  max-width: 380px;
  background: #1e3a8a;
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.3s ease;
  z-index: 9999;
}

#toastGlobal.show {
  opacity: 1;
  transform: translateY(0);
}

#toastGlobal.success {
  background: #16a34a;
}

#toastGlobal.error {
  background: #dc2626;
}

#toastGlobal.warning {
  background: #f59e0b;
}

#toastGlobal.info {
  background: #1e3a8a;
}

#toastTexto {
  margin: 0;
  line-height: 1.4;
}

/* ===========================================================
   🔹 POP-UP GLOBAL
   =========================================================== */

#popupGlobal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#popupGlobal .popup-content {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 20px;
  max-width: 420px;
  width: 95%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  animation: popupFadeIn 0.35s ease;
}

#popupGlobal h2 {
  color: #1e3a8a;
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}

#popupContenido {
  color: #222;
  font-size: 14px;
  margin-bottom: 12px;
  text-align: left;
}

#popupCerrar {
  background: #1e3a8a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#popupCerrar:hover {
  background: #163179;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================================================
   🔹 RESPONSIVIDAD (MÓVILES)
   =========================================================== */
@media (max-width: 480px) {
  #toastGlobal {
    bottom: 20px;
    right: 20px;
    font-size: 13px;
    padding: 12px 14px;
  }

  #popupGlobal .popup-content {
    padding: 18px;
    max-width: 95%;
  }

  #popupCerrar {
    width: 100%;
    padding: 10px;
  }
}
/* ============================================
   🔔 SISTEMA GLOBAL DE MENSAJES (TOAST)
   ============================================ */
.toast-global {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e3a8a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 2000;
}

.toast-global.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast-global.success {
  background: #16a34a;
}
.toast-global.error {
  background: #dc2626;
}
.toast-global.warning {
  background: #f59e0b;
}
.toast-global.info {
  background: #2563eb;
}

/* ============================================
   💬 POPUP GLOBAL (MENSAJES GRANDES)
   ============================================ */
.popup-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.popup-global.visible {
  opacity: 1;
  pointer-events: auto;
}

.popup-contenido {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: popupIn 0.35s ease-out;
}

@keyframes popupIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-contenido h3 {
  color: #1e3a8a;
  margin-bottom: 10px;
  font-size: 20px;
}

.popup-contenido p {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.4;
}

/* Botón del popup */
.btn-cerrar {
  background: #1e3a8a;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-cerrar:hover {
  background: #2563eb;
}

/* ============================================
   ✨ EFECTOS DE ENTRADA (para suavizar interfaz)
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease forwards;
}

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 0.4s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   ⚙️ GENERAL FIXES — COMPATIBILIDAD Y RESPONSIVE
   ============================================ */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2500;
}

.admin-card {
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 420px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.admin-card h2 {
  color: #1e3a8a;
  margin-bottom: 10px;
  text-align: center;
}

.admin-card label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: #1f2937;
}

.admin-card input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.btn-azul {
  background: #1e3a8a;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-azul:hover {
  background: #2563eb;
}

.btn-rojo {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-rojo:hover {
  background: #ef4444;
}
/* ============================================================
   FORMULARIO ELECTIVIDAD ISPM 2025
   — Integrado en index.css (v3.2 extendido)
   ============================================================ */

:root {
  --azul-oscuro: #1e3a8a;
  --azul: #2563eb;
  --azul-claro: #3b82f6;
  --gris-fondo: #f5f6fa;
  --gris-borde: #e5e7eb;
  --gris-texto: #1f2937;
  --ok: #16a34a;
  --error: #dc2626;
  --warning: #f59e0b;
  --radius: 14px;
  --sombra-suave: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------------------
   Layout general
------------------------------------------------------------ */
body {
  background: var(--gris-fondo);
  color: var(--gris-texto);
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
  scroll-behavior: smooth;
}

header {
  background: var(--azul-oscuro);
  color: #fff;
  text-align: center;
  padding: 14px 0;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.layout {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: 2fr 1fr;
    gap: 28px;
  }
}

/* ------------------------------------------------------------
   Tarjetas y bloques
------------------------------------------------------------ */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra-suave);
  padding: 24px;
  border: 1px solid var(--gris-borde);
}

.card h1, .card h2, .card h3 {
  color: var(--azul-oscuro);
  margin-top: 0;
}

.bloque {
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  animation: fadeIn .4s ease;
}

.bloque h2 {
  text-align: center;
  margin-top: 0;
  color: var(--azul-oscuro);
}

/* ------------------------------------------------------------
   Chips identidad
------------------------------------------------------------ */
#barraIdentidad {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.chip {
  background: #eef2ff;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  font-weight: 600;
  color: var(--azul-oscuro);
  font-size: .95rem;
}

/* ------------------------------------------------------------
   Selector de nivel
------------------------------------------------------------ */
.nivel-btns {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btnNivel {
  background: var(--azul-oscuro);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 26px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background .25s, transform .25s;
}
.btnNivel:hover {
  background: var(--azul);
  transform: translateY(-2px);
}
.btnNivel:active {
  transform: translateY(1px);
}

/* ------------------------------------------------------------
   Estado / mensajes superiores
------------------------------------------------------------ */
.estado-info {
  background: #f1f5f9;
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  text-align: center;
  padding: 16px;
  margin-bottom: 20px;
  animation: fadeIn .4s ease;
}

/* ------------------------------------------------------------
   Secciones y tarjetas de electivos
------------------------------------------------------------ */
.grid-secciones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 800px) {
  .grid-secciones {
    grid-template-columns: repeat(3, 1fr);
  }
}
.seccion-card {
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.05);
  transition: box-shadow .25s, transform .25s;
}
.seccion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.1);
}
.seccion-card h3 {
  margin-top: 0;
  color: var(--azul-oscuro);
  border-bottom: 1px solid var(--gris-borde);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------
   Curso card (electivos)
------------------------------------------------------------ */
.curso-card {
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 6px 0;
  background: #f9fafb;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.curso-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.curso-card.disabled {
  opacity: .55;
  pointer-events: none;
  filter: grayscale(0.3);
}
.curso-card.selected {
  border: 2px solid var(--azul);
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}
.meta {
  font-size: .9rem;
  color: #475569;
  margin-top: 2px;
}
.bar {
  background: #e5e7eb;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.fill {
  height: 6px;
  transition: width .4s ease;
}

/* ------------------------------------------------------------
   Inputs y selects
------------------------------------------------------------ */
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border .25s, box-shadow .25s;
}
input:focus, select:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}
.formline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* ------------------------------------------------------------
   Confirmaciones y checks
------------------------------------------------------------ */
.confirm {
  margin-top: 18px;
  background: #f9fafb;
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.confirm label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  color: var(--gris-texto);
}
.confirm a {
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
}
.confirm a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------
   Botones principales
------------------------------------------------------------ */
.btnPrimary {
  background: var(--azul-oscuro);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: background .25s, transform .25s;
}
.btnPrimary:hover {
  background: var(--azul);
  transform: scale(1.03);
}
.btnPrimary:active {
  transform: scale(.97);
}

/* ------------------------------------------------------------
   Aside (resumen sticky)
------------------------------------------------------------ */
.aside {
  position: sticky;
  top: 40px;
  align-self: start;
  animation: fadeIn .6s ease;
}
@media (min-width: 980px) {
  .aside {
    position: fixed;
    top: 100px;
    right: 50px;
    width: 300px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    transform-origin: top;
    transition: transform .3s ease;
  }
}
.resumen {
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 18px;
}
.resumen h3 {
  text-align: center;
  margin-top: 0;
  color: var(--azul-oscuro);
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 4px;
}
.resumen .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
  font-size: .95rem;
}
.resumen .item:last-child {
  border: none;
}
.resumen .item b {
  color: var(--azul-oscuro);
  font-weight: 700;
}

/* ------------------------------------------------------------
   Toast / mensaje emergente
------------------------------------------------------------ */
#mensajeEmergente {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--azul);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
  z-index: 1000;
  max-width: 90%;
}
#mensajeEmergente.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   Resultados de asignación
------------------------------------------------------------ */
.asignados {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.asig-card {
  background: #f8fafc;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.asig-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
footer {
  text-align: center;
  font-size: .85rem;
  color: #6b7280;
  margin: 40px 0 24px;
}

/* ------------------------------------------------------------
   Animaciones y modo oscuro opcional
------------------------------------------------------------ */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}

@media (prefers-color-scheme: dark) {
  body { background: #0f172a; color: #e2e8f0; }
  .card, .bloque, .seccion-card, .resumen, .asig-card {
    background: #1e293b;
    border-color: #334155;
  }
  .curso-card {
    background: #334155;
    border-color: #475569;
  }
  .curso-card.selected {
    border-color: var(--azul-claro);
    background: #1e3a8a33;
  }
  .btnPrimary, .btnNivel { background: var(--azul-claro); }
  header { background: var(--azul-claro); }
  #mensajeEmergente { background: var(--azul-claro); }
  .chip { background: #334155; border-color: #475569; color: #e2e8f0; }
}
/* ============================================================
   Ajustes visuales versión escritorio — v3.3 refinada
   ============================================================ */

/* ---- Contenedor principal más centrado y aireado ---- */
.layout {
  max-width: 1400px;
  margin: 48px auto 60px auto;
  padding: 0 40px;
  gap: 40px;
}

/* ---- Tarjeta principal más ancha y con padding equilibrado ---- */
.card.principal {
  padding: 36px 50px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

/* ---- Espaciado extra entre bloques Plan Común y Diferenciado ---- */
#planComun {
  margin-bottom: 30px;
}
#planComun select {
  margin-top: 10px;
  font-size: 1.05rem;
  padding: 14px;
}

/* ---- Títulos más elegantes ---- */
.bloque h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--azul-oscuro);
  text-align: center;
  margin-bottom: 16px;
}

/* ---- Secciones equilibradas en escritorio ---- */
@media (min-width: 1000px) {
  .grid-secciones {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
  }
  .seccion-card {
    padding: 20px 18px;
  }
  .curso-card {
    margin: 8px 0;
  }
}

/* ---- Aside más limpio y alineado con el contenido ---- */
.aside {
  top: 120px;
  right: 80px;
  width: 320px;
}
.resumen {
  background: #ffffffcc;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(226,232,240,0.8);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}
.resumen h3 {
  font-size: 1.1rem;
  letter-spacing: -0.2px;
}
.resumen .item {
  padding: 8px 0;
}

/* ---- Footer fijo visualmente al final ---- */
footer {
  margin-top: 80px;
  padding: 30px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}
footer strong {
  color: var(--azul-oscuro);
}
footer::before {
  content: "────────────────────────────";
  display: block;
  color: #cbd5e1;
  font-size: 0.8rem;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* ---- Fondo general más uniforme ---- */
body {
  background: linear-gradient(180deg, #e8edfb 0%, #f5f6fa 100%);
}
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  }
  .card.principal {
    background: #1e293b;
  }
  footer {
    background: #0f172a;
    color: #94a3b8;
    border-top-color: #1e293b;
  }
}
/* ============================================================
   Secciones horizontales — vista escritorio mejorada v3.4
   ============================================================ */

/* Contenedor de secciones — estilo horizontal */
.grid-secciones {
  display: flex;
  flex-direction: row;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.grid-secciones::-webkit-scrollbar {
  height: 8px;
}
.grid-secciones::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.grid-secciones::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Cada bloque de sección */
.seccion-card {
  flex: 1 1 33%;
  min-width: 340px;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--gris-borde);
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  scroll-snap-align: start;
  transition: transform .25s, box-shadow .25s;
}

.seccion-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.seccion-card h3 {
  color: var(--azul-oscuro);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

/* Tarjetas dentro de cada sección */
.curso-card {
  margin: 6px 0;
  border-radius: 12px;
  background: #f9fafb;
  transition: all .25s ease;
}
.curso-card:hover {
  transform: scale(1.02);
  background: #eef2ff;
}
.curso-card.selected {
  border-color: var(--azul);
  background: #e0e7ff;
}

/* Inputs de respaldo centrados */
.seccion-card label {
  font-size: 0.9rem;
  color: #475569;
  margin-top: 10px;
  display: block;
}
.seccion-card select {
  margin-top: 6px;
  font-size: 0.95rem;
  padding: 8px;
}

/* Adaptación móvil: vertical */
@media (max-width: 900px) {
  .grid-secciones {
    flex-direction: column;
    gap: 18px;
    overflow: visible;
  }
  .seccion-card {
    width: 100%;
    max-width: none;
  }
}
/* ============================================================
   RESUMEN FINAL Y CONFIRMACIONES REFINADAS — v3.5
   ============================================================ */

/* ---- Reubicación del resumen (ya no fixed) ---- */
.aside {
  position: static;
  width: 100%;
  margin-top: 30px;
}
.resumen {
  border: 1px solid var(--gris-borde);
  border-radius: 16px;
  background: #f9fafb;
  padding: 20px 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  animation: fadeIn .4s ease;
}
.resumen h3 {
  text-align: center;
  color: var(--azul-oscuro);
  margin-bottom: 16px;
  font-size: 1.2rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}
.resumen .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
  font-size: .95rem;
}
.resumen .item:last-child {
  border: none;
}
.resumen .item b {
  font-weight: 600;
  color: var(--azul-oscuro);
}

/* ---- Mejor diseño de caja de confirmaciones ---- */
.confirm {
  margin-top: 24px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  animation: fadeIn .4s ease;
}
.confirm label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .95rem;
  color: #1f2937;
  background: #ffffffcc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  transition: background .3s, box-shadow .3s;
}
.confirm label:hover {
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}
.confirm input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--azul);
  transform: scale(1.15);
}
.confirm a {
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
}
.confirm a:hover {
  text-decoration: underline;
}

/* ---- Estilo especial para la declaración de salud ---- */
#saludBox {
  background: #fffbea;
  border-color: #facc15;
}
#saludBox:hover {
  background: #fef9c3;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}
#saludBox input[type="checkbox"] {
  accent-color: #f59e0b;
}

/* ---- Botón enviar centrado ---- */
.confirm .center {
  text-align: center;
  margin-top: 12px;
}
.btnPrimary {
  background: var(--azul-oscuro);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .25s;
}
.btnPrimary:hover {
  background: var(--azul);
  transform: scale(1.03);
}

/* ---- Footer separado visualmente ---- */
footer {
  margin-top: 60px;
  padding: 40px 0 30px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: .9rem;
  color: #475569;
  line-height: 1.6;
}
footer span {
  font-weight: 600;
  color: var(--azul-oscuro);
}
/* === Overrides v3.3.1 — fondo blanco + confirm ordenadas === */
body { background:#fff !important; }
.card.principal, .bloque, .seccion-card { background:#fff !important; }

.confirm { background:#f1f5f9 !important; border:1px solid #cbd5e1 !important; }
.confirm .chk{
  display:flex; align-items:flex-start; gap:10px;
  background:#fff; border:1px solid #e2e8f0; border-radius:10px;
  padding:10px 12px; margin:0;
}
.confirm .chk input{ margin-top:2px; accent-color:#2563eb; transform:scale(1.1); }
#saludBox.chk{ background:#fffbea; border-color:#facc15; }
/* ============================================================
   MEJORA VISUAL — ELECTIVOS Y CHECKBOXES v3.4
   ============================================================ */

/* ----- Tarjetas de electivos ----- */
.curso-card {
  margin: 8px 0;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: pointer;
}
.curso-card:hover {
  background: #f8fafc;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37,99,235,0.1);
}
.curso-card.selected {
  background: #e0edff;
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30,58,138,0.15);
}
.curso-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.curso-card .meta {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.4;
}
.curso-card .bar {
  height: 6px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 6px;
}
.curso-card .bar .fill {
  height: 100%;
  border-radius: 4px;
}

/* Título del electivo */
.curso-card div[style*="font-weight:800"] {
  color: #1e3a8a !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}
.curso-card.selected div[style*="font-weight:800"] {
  color: #0f172a !important;
}

/* ----- Contenedor secciones ----- */
.grid-secciones {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}
.seccion-card {
  flex: 1 1 32%;
  min-width: 320px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.seccion-card h3 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
  font-size: 1.1rem;
}

/* ----- CHECKBOXES MEJORADOS ----- */
.confirm {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 14px;
  transition: background 0.3s, border-color 0.3s;
}
.chk:hover {
  background: #f1f5f9;
  border-color: #2563eb;
}
.chk input[type="checkbox"] {
  accent-color: #2563eb;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.chk span {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.4;
}
.chk a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.chk a:hover {
  text-decoration: underline;
}

/* Caja especial de salud */
#saludBox {
  border-color: #facc15;
  background: #fffbea;
}
#saludBox:hover {
  background: #fef9c3;
  border-color: #eab308;
}
#saludBox input[type="checkbox"] {
  accent-color: #f59e0b;
}
#saludBox span b {
  color: #b45309;
}

/* ----- Botón de enviar centrado ----- */
.btnPrimary {
  background: linear-gradient(90deg,#1e3a8a,#2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btnPrimary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(37,99,235,0.25);
}

/* ----- Ajustes de color global (fondo blanco forzado) ----- */
body, main, .card, .bloque {
  background: #ffffff !important;
}
/* ============================================================
   MEJORA VISUAL — ELECTIVOS Y CHECKBOXES v3.4
   ============================================================ */

/* ----- Tarjetas de electivos ----- */
.curso-card {
  margin: 8px 0;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: pointer;
}
.curso-card:hover {
  background: #f8fafc;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37,99,235,0.1);
}
.curso-card.selected {
  background: #e0edff;
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30,58,138,0.15);
}
.curso-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.curso-card .meta {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.4;
}
.curso-card .bar {
  height: 6px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 6px;
}
.curso-card .bar .fill {
  height: 100%;
  border-radius: 4px;
}

/* Título del electivo */
.curso-card div[style*="font-weight:800"] {
  color: #1e3a8a !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}
.curso-card.selected div[style*="font-weight:800"] {
  color: #0f172a !important;
}

/* ----- Contenedor secciones ----- */
.grid-secciones {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}
.seccion-card {
  flex: 1 1 32%;
  min-width: 320px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.seccion-card h3 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
  font-size: 1.1rem;
}

/* ----- CHECKBOXES MEJORADOS ----- */
.confirm {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 14px;
  transition: background 0.3s, border-color 0.3s;
}
.chk:hover {
  background: #f1f5f9;
  border-color: #2563eb;
}
.chk input[type="checkbox"] {
  accent-color: #2563eb;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.chk span {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.4;
}
.chk a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.chk a:hover {
  text-decoration: underline;
}

/* Caja especial de salud */
#saludBox {
  border-color: #facc15;
  background: #fffbea;
}
#saludBox:hover {
  background: #fef9c3;
  border-color: #eab308;
}
#saludBox input[type="checkbox"] {
  accent-color: #f59e0b;
}
#saludBox span b {
  color: #b45309;
}

/* ----- Botón de enviar centrado ----- */
.btnPrimary {
  background: linear-gradient(90deg,#1e3a8a,#2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btnPrimary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(37,99,235,0.25);
}

/* ----- Ajustes de color global (fondo blanco forzado) ----- */
body, main, .card, .bloque {
  background: #ffffff !important;
}
/* ============================================================
   CORRECCIÓN DEFINITIVA — FONDO BLANCO TOTAL (v3.4.1)
   ============================================================ */

/* --- Forzar fondo global blanco --- */
html, body {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* --- Quitar herencias de clases antiguas --- */
body.formulario-page,
main.layout,
.card,
.bloque,
section.card,
.principal,
header,
footer {
  background: #ffffff !important;
  box-shadow: none !important;
  border: none !important;
}

/* --- Quitar gradientes antiguos si quedaban --- */
body::before, body::after,
main::before, main::after {
  background: none !important;
  content: none !important;
}

/* --- Restablecer tipografía y contraste --- */
h1, h2, h3, h4, h5, h6, p, span, label {
  color: #0f172a !important;
}

/* --- Header minimalista --- */
header {
  background: #ffffff !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 10px 0 !important;
}
header h1 {
  color: #1e3a8a !important;
  text-align: center !important;
}

/* --- Footer limpio --- */
footer {
  background: #ffffff !important;
  color: #334155 !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* --- Tarjetas blancas y limpias --- */
.card.principal,
.seccion-card,
.bloque {
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04) !important;
}
/* ============================================================
   MEJORA VISUAL — ELECTIVOS Y CHECKBOXES v3.4
   ============================================================ */

/* ----- Tarjetas de electivos ----- */
.curso-card {
  margin: 8px 0;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: pointer;
}
.curso-card:hover {
  background: #f8fafc;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37,99,235,0.1);
}
.curso-card.selected {
  background: #e0edff;
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30,58,138,0.15);
}
.curso-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.curso-card .meta {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.4;
}
.curso-card .bar {
  height: 6px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 6px;
}
.curso-card .bar .fill {
  height: 100%;
  border-radius: 4px;
}

/* Título del electivo */
.curso-card div[style*="font-weight:800"] {
  color: #1e3a8a !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}
.curso-card.selected div[style*="font-weight:800"] {
  color: #0f172a !important;
}

/* ----- Contenedor secciones ----- */
.grid-secciones {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}
.seccion-card {
  flex: 1 1 32%;
  min-width: 320px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.seccion-card h3 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
  font-size: 1.1rem;
}

/* ----- CHECKBOXES MEJORADOS ----- */
.confirm {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 14px;
  transition: background 0.3s, border-color 0.3s;
}
.chk:hover {
  background: #f1f5f9;
  border-color: #2563eb;
}
.chk input[type="checkbox"] {
  accent-color: #2563eb;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.chk span {
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.4;
}
.chk a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.chk a:hover {
  text-decoration: underline;
}

/* Caja especial de salud */
#saludBox {
  border-color: #facc15;
  background: #fffbea;
}
#saludBox:hover {
  background: #fef9c3;
  border-color: #eab308;
}
#saludBox input[type="checkbox"] {
  accent-color: #f59e0b;
}
#saludBox span b {
  color: #b45309;
}

/* ----- Botón de enviar centrado ----- */
.btnPrimary {
  background: linear-gradient(90deg,#1e3a8a,#2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btnPrimary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(37,99,235,0.25);
}

/* ----- Ajustes de color global (fondo blanco forzado) ----- */
body, main, .card, .bloque {
  background: #ffffff !important;
}
/* ============================================================
   FIX VISUAL HEADER + BOTONES NIVEL (v3.4.3)
   ============================================================ */

/* --- HEADER: más contraste y centrado --- */
header {
  background: #ffffff !important;
  border-bottom: 2px solid #e2e8f0 !important;
  text-align: center !important;
  padding: 18px 0 !important;
}
header h1 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: 0.3px;
}

/* --- BODY general para coherencia --- */
body {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* --- TITULOS DENTRO DEL MAIN --- */
main h3, main h2, main h4, main label, main span {
  color: #0f172a !important;
}

/* --- BOTONES DE NIVEL (III y IV Medio) --- */
.nivel-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btnNivel {
  background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 14px;
  padding: 18px 60px;
  font-weight: 700;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(30,58,138,0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btnNivel:hover {
  background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(30,58,138,0.3);
}

/* --- Para pantallas grandes, aún más amplios --- */
@media (min-width: 992px) {
  .btnNivel {
    padding: 22px 80px;
    font-size: 1.4rem;
  }
}

/* --- Barra de identidad (nombre / apoderado / rut) --- */
#barraIdentidad {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
#barraIdentidad .chip {
  background: #e0e7ff;
  color: #1e3a8a !important;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 30px;
}
/* ============================================================
   FIX VISUAL — CENTRADO Y DISTRIBUCIÓN DE FORMULARIO (v3.6)
   ============================================================ */

/* --- Fondo general blanco uniforme --- */
body {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* --- Contenedor principal centrado --- */
main.layout, .card.principal {
  margin-inline: auto;
  max-width: 1200px;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* --- Grid de secciones ajustado y centrado --- */
.grid-secciones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
  width: 100%;
}

@media (min-width: 768px) {
  .grid-secciones {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .grid-secciones {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Tarjetas dentro de secciones equilibradas --- */
.seccion-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.seccion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- Ajuste visual de títulos y campos --- */
.seccion-card h3 {
  text-align: center;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
}

.seccion-card select, 
.seccion-card input {
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.seccion-card select:focus, 
.seccion-card input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
  outline: none;
}

/* --- Comportamiento en móviles --- */
@media (max-width: 600px) {
  main.layout {
    padding: 20px;
    max-width: 100%;
  }
  .seccion-card {
    max-width: 100%;
  }
}

/* --- Alineación de botones finales --- */
.btnPrimary, button[type="submit"] {
  display: block;
  margin: 25px auto 10px auto;
  background: linear-gradient(90deg,#2563eb,#1e3a8a);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btnPrimary:hover, button[type="submit"]:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(37,99,235,0.25);
}

/* --- Footer fijo y limpio --- */
footer {
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb;
  color: #475569 !important;
  text-align: center;
  padding: 30px 0 40px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}
/* ===============================
   ESTILO VISUAL INICIAL — CENTRADO, COLOR Y LOGO
   =============================== */

.izquierda {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 30px;
}

.izquierda h1, 
.izquierda p {
  color: #ffffff !important;
}

.izquierda img.logo-ispm {
  max-height: 130px !important; /* aumenta tamaño logo */
  margin-bottom: 24px;
  filter: brightness(100%);
  transition: transform 0.3s ease;
}

.izquierda img.logo-ispm:hover {
  transform: scale(1.05);
}
/* =========================================================
   ESTILO INICIAL — ELECTIVIDAD ISPM 2025
   Profesional, centrado, responsivo
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.index-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =============================
   CONTENEDOR PRINCIPAL (50/50)
   ============================= */
.inicio-container {
  display: flex;
  height: 90vh;
  max-width: 1100px;
  margin: auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.08);
}

/* =============================
   PANEL IZQUIERDO
   ============================= */
.panel-izquierdo {
  flex: 1;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 30px;
}

.panel-izquierdo .logo {
  max-height: 150px;
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.panel-izquierdo .logo:hover {
  transform: scale(1.05);
}

.panel-izquierdo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #fff;
}

.panel-izquierdo h1 span {
  font-weight: 800;
  color: #fff;
}

.panel-izquierdo .descripcion {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 350px;
  line-height: 1.5;
}

/* =============================
   PANEL DERECHO
   ============================= */
.panel-derecho {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  padding: 40px;
}

.card-login {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 35px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-align: left;
  animation: fadeIn 0.5s ease;
}

.card-login h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  color: #1e3a8a;
}

.card-login label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #334155;
}

.card-login input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.card-login input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =============================
   BOTONES
   ============================= */
.btn-principal {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-principal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.nota {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
  color: #475569;
}

.nota a {
  color: #1e3a8a;
  font-weight: 600;
  text-decoration: none;
}

.nota a:hover {
  text-decoration: underline;
}

/* =============================
   MODAL ADMIN
   ============================= */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.admin-modal.hidden {
  display: none;
}

.admin-card {
  background: #fff;
  padding: 30px 25px;
  border-radius: 16px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.admin-card h2 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 15px;
}

.admin-card label {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 4px;
  display: block;
}

.admin-card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 12px;
}

.admin-card .acciones {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.btn-azul,
.btn-rojo {
  flex: 1;
  margin: 5px;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-azul {
  background: #1e3a8a;
  color: #fff;
}

.btn-rojo {
  background: #dc2626;
  color: #fff;
}

/* =============================
   TOAST GLOBAL
   ============================= */
.toast-global {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e3a8a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast-global.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =============================
   FOOTER
   ============================= */
footer {
  text-align: center;
  margin: 25px 0;
  font-size: 0.85rem;
  color: #475569;
}

footer img {
  height: 35px;
  vertical-align: middle;
  margin-bottom: 6px;
}

/* =============================
   ANIMACIONES Y RESPONSIVO
   ============================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 850px) {
  .inicio-container {
    flex-direction: column;
    height: auto;
  }
  .panel-izquierdo {
    padding: 40px 20px;
  }
  .panel-derecho {
    padding: 20px;
  }
}
/* =========================================================
   ESTILO INICIAL — ELECTIVIDAD ISPM 2025
   Profesional, centrado, responsivo
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.index-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =============================
   CONTENEDOR PRINCIPAL (50/50)
   ============================= */
.inicio-container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  max-width: 1200px;
  margin: auto;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

/* =============================
   PANEL IZQUIERDO (AZUL)
   ============================= */
.panel-izquierdo {
  flex: 1;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  text-align: center;
}

.panel-izquierdo .logo {
  max-height: 150px;
  margin-bottom: 25px;
  filter: brightness(100%);
  transition: transform 0.3s ease;
}

.panel-izquierdo .logo:hover {
  transform: scale(1.05);
}

.panel-izquierdo h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.panel-izquierdo h1 span {
  font-weight: 800;
  color: #ffffff;
}

.panel-izquierdo .descripcion {
  color: #f1f5f9;
  font-size: 1rem;
  max-width: 380px;
  line-height: 1.5;
  margin-top: 12px;
  opacity: 0.9;
}

/* =============================
   PANEL DERECHO (LOGIN)
   ============================= */
.panel-derecho {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  padding: 40px;
}

.card-login {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 35px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease;
}

.card-login h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  color: #1e3a8a;
}

.card-login label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #334155;
}

.card-login input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.card-login input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =============================
   BOTONES
   ============================= */
.btn-principal {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-principal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.nota {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
  color: #475569;
}

.nota a {
  color: #1e3a8a;
  font-weight: 600;
  text-decoration: none;
}

.nota a:hover {
  text-decoration: underline;
}

/* =============================
   MODAL ADMIN
   ============================= */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.admin-modal.hidden {
  display: none;
}

.admin-card {
  background: #fff;
  padding: 30px 25px;
  border-radius: 16px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.admin-card h2 {
  text-align: center;
  color: #1e3a8a;
  margin-bottom: 15px;
}

.admin-card label {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 4px;
  display: block;
}

.admin-card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 12px;
}

.admin-card .acciones {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.btn-azul,
.btn-rojo {
  flex: 1;
  margin: 5px;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-azul {
  background: #1e3a8a;
  color: #fff;
}

.btn-rojo {
  background: #dc2626;
  color: #fff;
}

/* =============================
   TOAST GLOBAL
   ============================= */
.toast-global {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e3a8a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast-global.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =============================
   FOOTER
   ============================= */
footer {
  text-align: center;
  margin: 25px 0;
  font-size: 0.85rem;
  color: #475569;
}

footer img {
  height: 35px;
  vertical-align: middle;
  margin-bottom: 6px;
}

/* =============================
   ANIMACIONES Y RESPONSIVO
   ============================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- RESPONSIVO ----- */
@media (max-width: 850px) {
  .inicio-container {
    flex-direction: column;
    height: auto;
    box-shadow: none;
  }

  .panel-izquierdo {
    padding: 40px 20px;
    border-radius: 0;
  }

  .panel-derecho {
    padding: 25px;
    background: #ffffff;
  }

  .card-login {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
}
/* CONSULTA RESULTADOS */
.consulta-root { font-family: 'Inter', sans-serif; }
.consulta-card { transition: all .25s ease; }
.consulta-card:hover { transform: translateY(-3px); }

/* Animación modal */
#modalFAQ { animation: fadeIn .25s ease; }
@keyframes fadeIn {
  from { opacity:0; } 
  to { opacity:1; }
}
/* ============================================================
   ESTILOS PARA CONSULTA DE RESULTADOS — ISPM 2025
   (Añadir al final de index.css)
   ============================================================ */

/* Layout general */
.consulta-root {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  font-family: 'Inter', sans-serif;
}

/* Panel previo animado */
#preResultado {
  display: none;
  text-align: center;
  margin-top: 40px;
  padding: 25px;
  background: #f1f5f9;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(0,0,0,0.10);
  animation: fadeIn .3s ease;
}

.pre-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buscador */
.input-rut {
  width: 260px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
}

.btn-buscar {
  background: #1e3a8a;
  padding: 10px 18px;
  margin-left: 10px;
  border-radius: 10px;
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

/* Cards principales */
.consulta-card {
  background: #fff;
  padding: 22px;
  margin-top: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.10);
}

/* Estado General */
.estado-card {
  margin-top: 25px;
  background: #eef2ff;
  padding: 18px;
  border-left: 5px solid #6366f1;
  border-radius: 14px;
}

/* Contador de visitas */
.contador-visitas {
  margin-top: 15px;
  text-align: center;
  color: #475569;
  font-size: .9rem;
}

/* Secciones */
.seccion-box {
  background: #f8fafc;
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
  border-left: 6px solid #3b82f6;
}

.sec-2 { border-left-color: #22c55e; }
.sec-3 { border-left-color: #f97316; }

.titulo-electivo {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1e293b;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  border-radius: 9999px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
}

.pill-primera { background: #16a34a; }
.pill-segunda { background: #2563eb; }
.pill-aleatoria { background: #64748b; }
.pill-forzosa { background: #dc2626; }
.pill-no { background: #0f172a; }

/* Botones generales */
.btn-general {
  background: #1e3a8a;
  color: #fff;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

/* Mini FAQ */
.faq-mini {
  margin-top: 30px;
  background: #f1f5f9;
  padding: 18px;
  border-radius: 14px;
}

/* MODAL FAQ */
#modalFAQ {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#modalFAQ .modal-box {
  background: white;
  width: 95%;
  max-width: 700px;
  border-radius: 18px;
  padding: 22px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 10px 35px rgba(0,0,0,.25);
}

#modalFAQ h3 {
  margin-top: 0;
  color: #1e3a8a;
}

/* Cerrar modal */
.btn-close-modal {
  background: #475569;
  padding: 8px 14px;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
}

/* Responsivo */
@media (max-width: 500px) {
  .input-rut {
    width: 200px;
  }
}
/* ============================================================
   MÓDULO 3 — POSTULACIONES / ASIGNACIÓN MANUAL — CSS v4.2
   ============================================================ */

/* Columnas nuevas: Plan Común + Nivel */
table.alumnos td:nth-child(5),
table.alumnos td:nth-child(6),
table.alumnos th:nth-child(5),
table.alumnos th:nth-child(6) {
  white-space: nowrap;
}

/* Checkbox moderno */
table.alumnos input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* Fila asignada */
tr.ya-asignado {
  background: #ecfdf5 !important;
  border-left: 4px solid #10b981;
}

/* Hover fila */
table.alumnos tbody tr:hover {
  background: #f3f4f6 !important;
}

/* Badge estado */
.badge {
  background: #1e3a8a;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.badge.postulado {
  background: #9ca3af;
  color: #fff;
}

/* Texto Plan Común */
td.plan-comun {
  font-weight: 500;
  color: #111827;
}

/* Encabezado de tarjeta */
.electivo-card {
  background: #f9fafb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.electivo-head {
  background: #eef2ff;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
  position: relative;
}

.electivo-head h3 {
  color: #1e3a8a;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.electivo-meta {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
}

/* Export button */
.export-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1e3a8a;
}
.export-btn:hover {
  opacity: 0.7;
}

/* Menú de exportación */
.export-menu {
  position: absolute;
  right: 15px;
  top: 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 160px;
  z-index: 10;
}
.export-menu div {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1e3a8a;
}
.export-menu div:hover {
  background: #eff6ff;
}

.export-menu.hidden {
  display: none;
}

/* Botón flotante (respaldo) */
.btn-flotante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  display: flex;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}
.btn-flotante:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 15px rgba(37,99,235,0.4);
}

/* TOAST mejorado */
#toast {
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Filtros sticky */
.sticky-filtros select,
.sticky-filtros input {
  background: #ffffff;
}

/* ============================================================
   BOTÓN — VER SOLO ASIGNADOS
   ============================================================ */

.btn-solo-asignados {
  padding: 8px 14px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  min-width: 180px;
}

.btn-solo-asignados:hover {
  background: #059669;
}

.btn-solo-asignados.active {
  background: #047857;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
}
/* Tarjetas de Electividad */
.reporte-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

/* Tarjetas de Plan Común */
.reporte-pc-card {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

.reporte-pc-card strong {
  color: #1e40af;
}

.reporte-pc-curso-title {
  background: #1e3a8a;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  margin: 12px 0;
  font-weight: 600;
}

/* PDF Pages */
.page {
  page-break-before: always;
  break-before: page;
}

.page:first-child {
  page-break-before: avoid;
}

/* Header for PDF */
.report-header {
  text-align: center;
  margin-bottom: 8px;
}
/* ============================================================
   ESTILOS MÓDULO REPORTES — ISPM 2025
   Electividad + Plan Común
   ============================================================ */

:root {
  --azul: #1e3a8a;
  --azulClaro: #2563eb;
  --gris: #f8fafc;
  --blanco: #fff;
}

/* -----------------------------
   TARJETAS GENERALES
----------------------------- */
.card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card strong {
  color: var(--azul);
  font-weight: 600;
}

/* -----------------------------
   TARJETAS PLAN COMÚN
----------------------------- */
.card-pc {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card-pc strong {
  color: #1e40af;
  font-weight: 600;
}

/* -----------------------------
   SECCIÓN / BLOQUE
----------------------------- */
.seccion-block {
  margin: 22px 0;
}

/* -----------------------------
   CONTENEDOR REPORTES
----------------------------- */
#contenedorReportes h2 {
  margin-top: 22px;
  color: var(--azul);
}

#contenedorReportes h3 {
  margin: 12px 0;
  color: var(--azul);
  font-weight: 600;
}

/* -----------------------------
   LISTAS
----------------------------- */
#contenedorReportes ul {
  margin: 8px 0 0 20px;
  padding: 0;
}

/* -----------------------------
   BOTONES PDF / EXCEL
----------------------------- */
#btnPDF,
#btnExcel {
  color: white !important;
  font-weight: 600;
  border: none !important;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}

#btnPDF {
  background: #16a34a !important;
}

#btnPDF:hover {
  background: #0f8b32 !important;
}

#btnExcel {
  background: #0284c7 !important;
}

#btnExcel:hover {
  background: #0369a1 !important;
}

/* -----------------------------
   TOAST
----------------------------- */
#toast {
  position: fixed;
  bottom: 22px;
  right: 18px;
  background: var(--azul);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .3s;
  z-index: 9999;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

/* -----------------------------
   CANVAS CHART
----------------------------- */
canvas {
  max-width: 100%;
}

/* -----------------------------
   RESPONSIVE
----------------------------- */
@media(max-width: 700px) {
  .card, .card-pc {
    padding: 10px;
  }

  #contenedorReportes h2 {
    font-size: 20px;
  }

  #contenedorReportes h3 {
    font-size: 17px;
  }
}
/* ============================================================
   🎨 ESTILO GENERAL — ISPM 2025
   Compatible con todos los módulos del sistema
   (asignación, consulta, dashboard, estudiantes)
   Autor: Óscar & José ❤️ 
   ============================================================ */

:root {
  --azul-oscuro: #1e3a8a;
  --azul: #2563eb;
  --azul-claro: #3b82f6;
  --rojo: #dc2626;
  --gris-900: #0f172a;
  --gris-700: #334155;
  --gris-600: #475569;
  --gris-400: #94a3b8;
  --gris-300: #cbd5e1;
  --gris-200: #e2e8f0;
  --gris-100: #f1f5f9;
  --gris-50:  #f8fafc;
}

/* ---------------------------
   BASE
----------------------------*/
body {
  margin: 0;
  padding: 0;
  background: var(--gris-50);
  font-family: 'Inter', sans-serif;
  color: var(--gris-900);
}

h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--azul-oscuro);
  margin-top: 0;
}

p {
  color: var(--gris-700);
  line-height: 1.5rem;
}

a {
  color: var(--azul);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------------------------
   CONTENEDORES
----------------------------*/
main, .main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.panel-asignacion,
.panel-config,
.consulta-card,
.panel {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.07);
  margin-top: 20px;
}

/* ---------------------------
   BOTONES
----------------------------*/
.btn-primario,
.btn-secundario,
.btn-general {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.btn-primario {
  background: var(--azul-oscuro);
  color: #fff;
}

.btn-primario:hover {
  background: #162b6e;
}

.btn-secundario {
  background: var(--rojo);
  color: #fff;
}

.btn-secundario:hover {
  background: #b42020;
}

.btn-general {
  background: var(--azul);
  color: #fff;
}

.btn-general:hover {
  background: var(--azul-claro);
}

/* ---------------------------
   INPUTS
----------------------------*/
input, select, textarea {
  border: 1px solid var(--gris-300);
  border-radius: 10px;
  padding: 10px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  width: auto;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .25);
}

/* ---------------------------
   TABLAS
----------------------------*/
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--gris-200);
  padding: 10px;
}

th {
  background: var(--gris-100);
  font-weight: 700;
  color: var(--gris-900);
}

td {
  color: var(--gris-900);
}

/* ---------------------------
   LOGS
----------------------------*/
.log {
  background: var(--gris-50);
  border: 1px solid var(--gris-200);
  padding: 14px;
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  max-height: 250px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.3rem;
}

/* ---------------------------
   PROGRESO
----------------------------*/
.progreso {
  background: var(--gris-200);
  border-radius: 9999px;
  height: 16px;
  overflow: hidden;
}

.progreso-fill {
  background: var(--azul);
  height: 100%;
  width: 0%;
  transition: width .3s ease;
}

/* ---------------------------
   TOAST / MENSAJES
----------------------------*/
#mensajeEmergente {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--azul-oscuro);
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600;
  display: none;
  z-index: 9999;
  min-width: 180px;
  text-align: center;
}

#mensajeEmergente.visible {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(6px);}
  to   {opacity: 1; transform: translateY(0);}
}

/* ---------------------------
   CONSULTA RESULTADOS
----------------------------*/
.consulta-root {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
}

.seccion-box {
  background: var(--gris-50);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
  border-left: 6px solid var(--azul);
}

/* colores dinámicos */
.sec-1 { border-left-color: #3b82f6; }
.sec-2 { border-left-color: #22c55e; }
.sec-3 { border-left-color: #f97316; }

/* pills */
.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: .8rem;
  color: white;
  font-weight: 600;
  margin-bottom: 6px;
}

.pill-primera  { background: #16a34a; }
.pill-segunda  { background: #2563eb; }
.pill-aleatoria { background: #64748b; }
.pill-forzosa  { background: #dc2626; }
.pill-no       { background: #0f172a; }

/* ---------------------------
   FAQ
----------------------------*/
#modalFAQ {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#modalFAQ .modal-box {
  background: #fff;
  width: 95%;
  max-width: 700px;
  border-radius: 20px;
  padding: 22px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 10px 35px rgba(0,0,0,.25);
}

/* ---------------------------
   RESPONSIVE
----------------------------*/
@media (max-width: 720px) {
  main, .main {
    padding: 16px;
  }

  .acciones {
    flex-direction: column;
    width: 100%;
  }

  .btn-primario,
  .btn-secundario {
    width: 100%;
    text-align: center;
  }

  input, select {
    width: 100% !important;
  }
}
