/* ============================================================
   ECOSISTEMA EDUCATIVO - Hoja de Estilos Principal
   Prof. Mtr. Alvaro Lyon - Cs del Comportamiento
   UNEG - Universidad Nacional Experimental de Guayana
   ============================================================ */

/* --- Variables CSS --- */
:root {
  /* Colores primarios por materia */
  --dh-color: #1B3A5C;
  --dh-light: #2A5A8C;
  --dh-bg: rgba(27,58,92,0.08);
  
  --psde1-color: #2D6A4F;
  --psde1-light: #40916C;
  --psde1-bg: rgba(45,106,79,0.08);
  
  --psde2-color: #7B2D3B;
  --psde2-light: #A34D5E;
  --psde2-bg: rgba(123,45,59,0.08);
  
  --pse-color: #92600A;
  --pse-light: #B87A14;
  --pse-bg: rgba(146,96,10,0.08);

  /* Colores generales */
  --primary: #0F2440;
  --primary-light: #1B3A5C;
  --primary-dark: #081428;
  --accent: #E8A838;
  --accent-light: #F5C563;
  --bg: #F5F7FA;
  --bg-white: #FFFFFF;
  --text: #1A1A2E;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --success: #10B981;
  --success-bg: rgba(16,185,129,0.1);
  --danger: #EF4444;
  --danger-bg: rgba(239,68,68,0.1);
  --warning: #F59E0B;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Tipografía */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset y Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anti-copia: deshabilitar selección de texto en el quiz */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* --- Contenedor principal --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0F2440 0%, #1B3A5C 30%, #2A5A8C 60%, #1B3A5C 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(232,168,56,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 30%, rgba(45,106,79,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(123,45,59,0.06) 0%, transparent 50%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2%, 1%) rotate(1deg); }
  100% { transform: translate(1%, -1%) rotate(-1deg); }
}

/* Partículas decorativas */
.hero-particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232,168,56,0.15);
  border: 1px solid rgba(232,168,56,0.3);
  color: var(--accent-light);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
  letter-spacing: 0;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-schedule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .hero { min-height: 480px; }
  .hero h1 { font-size: 2.5rem; }
  .hero h1 span { font-size: 1.1rem; }
  .hero-subtitle { font-size: 1.05rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
}

/* ============================================================
   SECCIONES DE MATERIAS
   ============================================================ */
.subjects-section {
  padding: 3rem 0;
}

.subject-block {
  margin-bottom: 3rem;
}

.subject-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--border);
}

.subject-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.subject-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.subject-header .subject-short {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

/* Colores específicos por materia */
.subject-block.dh .subject-header { border-bottom-color: var(--dh-color); }
.subject-block.dh .subject-icon { background: var(--dh-bg); }
.subject-block.dh .subject-header h2 { color: var(--dh-color); }

.subject-block.psde1 .subject-header { border-bottom-color: var(--psde1-color); }
.subject-block.psde1 .subject-icon { background: var(--psde1-bg); }
.subject-block.psde1 .subject-header h2 { color: var(--psde1-color); }

.subject-block.psde2 .subject-header { border-bottom-color: var(--psde2-color); }
.subject-block.psde2 .subject-icon { background: var(--psde2-bg); }
.subject-block.psde2 .subject-header h2 { color: var(--psde2-color); }

.subject-block.pse .subject-header { border-bottom-color: var(--pse-color); }
.subject-block.pse .subject-icon { background: var(--pse-bg); }
.subject-block.pse .subject-header h2 { color: var(--pse-color); }

/* ============================================================
   TARJETAS DE EXAMEN
   ============================================================ */
.exam-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .exam-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .exam-grid { grid-template-columns: repeat(4, 1fr); }
}

.exam-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid var(--border);
}

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

.exam-card.active { cursor: pointer; }
.exam-card.inactive { opacity: 0.5; pointer-events: none; }

/* Borde izquierdo por materia */
.exam-card.dh { border-left-color: var(--dh-color); }
.exam-card.psde1 { border-left-color: var(--psde1-color); }
.exam-card.psde2 { border-left-color: var(--psde2-color); }
.exam-card.pse { border-left-color: var(--pse-color); }

.exam-card.inactive { border-left-color: var(--text-muted); }

.exam-card-body {
  padding: 1.25rem;
}

.exam-unit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.dh .exam-unit { background: var(--dh-bg); color: var(--dh-color); }
.psde1 .exam-unit { background: var(--psde1-bg); color: var(--psde1-color); }
.psde2 .exam-unit { background: var(--psde2-bg); color: var(--psde2-color); }
.pse .exam-unit { background: var(--pse-bg); color: var(--pse-color); }
.inactive .exam-unit { background: var(--bg); color: var(--text-muted); }

.exam-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.inactive .exam-title { color: var(--text-muted); }

.exam-questions {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.inactive .exam-questions { color: var(--text-muted); }

.exam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.exam-btn.active-btn {
  color: #FFFFFF;
}

.dh .exam-btn.active-btn { background: var(--dh-color); }
.dh .exam-btn.active-btn:hover { background: var(--dh-light); }

.psde1 .exam-btn.active-btn { background: var(--psde1-color); }
.psde1 .exam-btn.active-btn:hover { background: var(--psde1-light); }

.psde2 .exam-btn.active-btn { background: var(--psde2-color); }
.psde2 .exam-btn.active-btn:hover { background: var(--psde2-light); }

.pse .exam-btn.active-btn { background: var(--pse-color); }
.pse .exam-btn.active-btn:hover { background: var(--pse-light); }

.exam-btn.inactive-btn {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer .footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5rem;
}

/* ============================================================
   FORMULARIO DE DATOS DEL ESTUDIANTE
   ============================================================ */
.student-form-container {
  max-width: 560px;
  margin: 2rem auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.student-form-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 1.5rem 2rem;
  color: #FFFFFF;
}

.student-form-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.student-form-header p {
  font-size: 0.85rem;
  opacity: 0.8;
}

.student-form-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,58,92,0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font);
}

.form-submit:hover { background: var(--primary-light); }
.form-submit:disabled { background: var(--text-muted); cursor: not-allowed; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

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

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s;
}

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

.modal-header {
  padding: 1.5rem 1.5rem 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.modal-body {
  padding: 1.25rem 1.5rem;
}

.modal-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.modal-body .info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

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

.modal-body .info-item .label {
  font-weight: 600;
  color: var(--text);
  min-width: 100px;
}

.modal-body .info-item .value {
  color: var(--text-light);
}

.modal-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--primary-light); }

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}
.btn-success:hover { background: #059669; }

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}
.btn-danger:hover { background: #DC2626; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-light); background: var(--bg); }

.btn-block { width: 100%; }

/* ============================================================
   QUIZ - PRESENTACIÓN DE EXAMEN
   ============================================================ */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Header sticky del quiz */
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem;
}

.quiz-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.quiz-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.quiz-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  margin-right: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.quiz-timer.warning { color: var(--warning); }
.quiz-timer.danger { color: var(--danger); animation: timerPulse 1s ease-in-out infinite; }

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.quiz-lock-icon {
  font-size: 0.85rem;
  opacity: 0.5;
}

.quiz-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Cuerpo del quiz */
.quiz-body {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Pregunta individual */
.question-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.question-text .open-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Opciones de respuesta */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.88rem;
  line-height: 1.5;
}

.option-item:hover {
  border-color: var(--primary-light);
  background: rgba(27,58,92,0.03);
}

.option-item.selected {
  border-color: var(--primary);
  background: rgba(27,58,92,0.06);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text);
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-item.selected .option-letter {
  background: var(--primary);
  color: #FFFFFF;
}

.option-text {
  flex: 1;
  color: var(--text);
}

/* Respuesta abierta */
.open-answer {
  width: 100%;
  min-height: 100px;
  padding: 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.open-answer:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,58,92,0.1);
}

.open-answer::placeholder {
  color: var(--text-muted);
}

/* Navegación del quiz */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.quiz-nav .btn {
  min-width: 120px;
}

/* Puntos de navegación */
.question-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.q-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-white);
  color: var(--text-light);
}

.q-dot:hover { border-color: var(--primary-light); }

.q-dot.answered {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.q-dot.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,58,92,0.2);
}

.q-dot.open-q {
  border-style: dashed;
}

/* ============================================================
   RESULTADOS
   ============================================================ */
.results-container {
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
}

.results-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.results-header {
  padding: 2rem;
  color: #FFFFFF;
}

.results-header.pass {
  background: linear-gradient(135deg, #059669, #10B981);
}

.results-header.fail {
  background: linear-gradient(135deg, #DC2626, #EF4444);
}

.results-score {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.results-label {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
}

.results-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.results-badge.pass {
  background: rgba(255,255,255,0.2);
}

.results-badge.fail {
  background: rgba(255,255,255,0.2);
}

.results-details {
  padding: 1.5rem 2rem;
}

.results-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.results-stat:last-child { border-bottom: none; }

.results-stat .label { color: var(--text-light); }
.results-stat .value { font-weight: 700; color: var(--text); }
.results-stat .value.correct { color: var(--success); }
.results-stat .value.incorrect { color: var(--danger); }

.results-actions {
  padding: 0 2rem 2rem;
}

/* ============================================================
   PANEL DEL PROFESOR
   ============================================================ */
.prof-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.prof-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.prof-header .back-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}

.prof-header .back-link:hover { color: var(--primary); }

/* Login del profesor */
.prof-login {
  max-width: 400px;
  margin: 3rem auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
}

.prof-login h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.prof-login p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Tabs del panel */
.prof-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.prof-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font);
}

.prof-tab:hover { color: var(--text); }

.prof-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Sección de activación */
.activation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .activation-grid { grid-template-columns: repeat(2, 1fr); }
}

.activation-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border-left: 4px solid var(--border);
  transition: border-color 0.2s;
}

.activation-card.is-active { border-left-color: var(--success); }
.activation-card.is-inactive { border-left-color: var(--text-muted); }

.activation-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.activation-card-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--text-muted);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

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

.activation-card-body {
  font-size: 0.8rem;
  color: var(--text-light);
}

.activation-card-body .form-control {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

.activation-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.activation-card-actions .btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

/* Stats del profesor */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filtros */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filters-bar .form-control {
  flex: 1;
  min-width: 150px;
  font-size: 0.85rem;
}

/* Tabla de resultados */
.results-table-wrapper {
  overflow-x: auto;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.results-table th {
  background: var(--primary);
  color: #FFFFFF;
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.results-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.results-table tr:hover td {
  background: rgba(27,58,92,0.03);
}

.results-table .score-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.score-badge.pass { background: var(--success-bg); color: var(--success); }
.score-badge.fail { background: var(--danger-bg); color: var(--danger); }

/* Detalle del estudiante */
.student-detail {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.student-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.student-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.student-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.student-info p {
  font-size: 0.8rem;
  color: var(--text-light);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-item {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.detail-item .label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.detail-item .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

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

.slide-up {
  animation: slideUp 0.4s ease-out;
}

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

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.w-full { width: 100%; }

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================================
   RESPONSIVE ADICIONAL
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .hero h1 span { font-size: 0.8rem; }
  .hero-subtitle { font-size: 0.85rem; }
  
  .question-card { padding: 1rem; }
  .question-text { font-size: 0.92rem; }
  .option-item { font-size: 0.82rem; padding: 0.7rem 0.85rem; }
  
  .quiz-nav { flex-direction: column; }
  .quiz-nav .btn { width: 100%; min-width: 0; }
  
  .student-form-body { padding: 1.25rem; }
  
  .modal { margin: 0.5rem; }
  .modal-header { padding: 1rem 1rem 0; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0 1rem 1rem; flex-direction: column; }
  .modal-footer .btn { width: 100%; }
}
