/* ============================================================
   ESTILOS MODERNOS - DOCENTEMASTER 2027
   Plataforma de Preparación Concurso Docente Colombia
   Especialidad Educación Física & Tronco Común CNSC
   ============================================================ */

:root {
  --primary: #c59b27;          /* Oro Real DocenteMaster (del nuevo logo) */
  --primary-hover: #b0881e;
  --primary-light: #fef9c3;
  --primary-dark: #8c6a12;
  --primary-glow: rgba(212, 175, 55, 0.4);
  
  --secondary: #1e293b;        /* Deep Slate institucional */
  --secondary-light: #f1f5f9;
  
  --accent: #f59e0b;           /* Ámbar de advertencia / Convivencia */
  --accent-light: #fef3c7;
  
  --gold: #d4af37;
  --gold-light: #fef08a;
  --gold-dark: #92400e;
  
  --danger: #ef4444;           /* Rojo error / alerta */
  --danger-light: #fee2e2;
  
  --success: #10b981;          /* Verde éxito */
  --success-light: #d1fae5;
  
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  
  /* Neutrales - Modo Claro */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-page: #0a0e17;
  --bg-surface: #111827;
  --bg-subtle: #1a2234;
  --border: #2d3748;
  --border-strong: #4a5568;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary-light: #3a2e05;
  --primary-dark: #fef08a;
  --secondary-light: #1e293b;
  --accent-light: #78350f;
  --danger-light: #7f1d1d;
  --success-light: #064e3b;
  --purple-light: #4c1d95;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Contenedor Principal */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* NAVBAR SUPERIOR */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.brand-logo-container {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
  background: #000;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.35s ease, 
              border-color 0.35s ease, 
              border-radius 0.35s ease;
  cursor: pointer;
  position: relative;
  z-index: 10;
  transform-origin: center center;
}

/* Al posar el cursor sobre el logo se amplía para apreciarlo en detalle */
.brand-logo-container:hover .brand-logo-img,
.brand-logo-img:hover {
  transform: scale(2.2);
  border-radius: 14px;
  border-color: #fef08a;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 28px rgba(212, 175, 55, 0.95);
  z-index: 9999;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Métricas en el Header */
.header-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

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

.streak-flame {
  font-size: 1.1rem;
  animation: pulseFlame 1.8s infinite ease-in-out;
}

@keyframes pulseFlame {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(-5deg); }
}

.theme-toggle, .btn-icon {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover, .btn-icon:hover {
  background: var(--border);
  transform: translateY(-1px);
}

/* BARRA DE NAVEGACIÓN SECUNDARIA / PESTAÑAS */
.tabs-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 61px;
  z-index: 90;
}

.tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--primary);
}

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

.nav-tab-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.nav-tab.active .nav-tab-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ÁREA DE CONTENIDO PRINCIPAL */
.main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem 1.5rem;
  width: 100%;
}

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

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

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

/* BOTONES GLOBALES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #0b0f19;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e5c05b 0%, #c59b27 100%);
  color: #000;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* ============================================================
   SECCIÓN 1: DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Banner de Bienvenida y Meta Diaria */
.hero-card {
  grid-column: span 12;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #926915 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.25rem 2rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 0 15px rgba(212, 175, 55, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-text h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-text p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 650px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  background: linear-gradient(135deg, #fef08a 0%, #d4af37 100%);
  color: #0b0f19;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.hero-actions .btn-primary:hover {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.hero-actions .btn-outline {
  border-color: rgba(255,255,255,0.4);
  color: white;
}

.hero-actions .btn-outline:hover {
  background: rgba(255,255,255,0.15);
}

/* Tarjeta de Avance Global */
.readiness-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.readiness-dial-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 1rem auto;
}

.readiness-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.readiness-circle-bg {
  fill: none;
  stroke: var(--bg-subtle);
  stroke-width: 12;
}

.readiness-circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.readiness-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.readiness-percentage {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.readiness-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 0.25rem;
}

.readiness-status-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.status-inicio { background: #fee2e2; color: #991b1b; }
.status-medio { background: #fef3c7; color: #92400e; }
.status-aprobado { background: #d1fae5; color: #065f46; }

/* Tarjeta de Racha y Meta Diaria */
.daily-goal-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.daily-progress-container {
  margin: 1rem 0;
}

.daily-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f97316);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.daily-summary-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-box {
  background: var(--bg-subtle);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-box-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-box-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tarjeta Pregunta del Día */
.daily-question-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to bottom, var(--bg-surface), var(--bg-subtle));
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.daily-question-preview {
  font-size: 0.9rem;
  color: var(--text-main);
  font-style: italic;
  margin: 0.75rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Desglose de Competencias y Componentes */
.components-card {
  grid-column: span 8;
}

.component-bar-item {
  margin-bottom: 1rem;
}

.component-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.component-bar-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.component-bar-percent {
  font-weight: 700;
}

.comp-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Accesos Rápidos */
.quick-access-card {
  grid-column: span 4;
}

.quick-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.quick-link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.quick-link-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(4px);
}

.quick-link-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ============================================================
   SECCIÓN 2: SIMULACROS
   ============================================================ */
.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.simulacros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.sim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sim-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.sim-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(to bottom right, var(--bg-surface), #f0fdf4);
}

[data-theme="dark"] .sim-card.featured {
  background: linear-gradient(to bottom right, var(--bg-surface), #064e3b15);
}

.sim-badge-top {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-featured {
  background: var(--primary);
  color: white;
}

.badge-official {
  background: var(--secondary);
  color: white;
}

.sim-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.sim-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.sim-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: flex;
  gap: 0.75rem;
}

.sim-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.sim-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.sim-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.sim-actions {
  display: flex;
  gap: 0.75rem;
}

/* ============================================================
   PANTALLA DE SIMULACRO ACTIVO (QUIZ RUNNER)
   ============================================================ */
.quiz-active-container {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-width: 1000px;
  margin: 0 auto;
}

.quiz-active-container.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.quiz-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-title-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quiz-timer-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--danger-light);
  color: var(--danger);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
}

.quiz-timer-pill.practice {
  background: var(--secondary-light);
  color: var(--secondary);
}

.quiz-palette-wrapper {
  margin-bottom: 1.5rem;
}

.palette-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.question-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 120px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.palette-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.palette-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}

.palette-btn.current {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.palette-btn.answered {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.palette-btn.flagged {
  border-color: var(--accent);
  background: var(--accent-light);
  color: #b45309;
}

.question-card-inner {
  margin: 1.5rem 0;
}

.q-meta-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.q-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.q-prompt-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
  transform: translateX(4px);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item.correct-answer {
  border-color: var(--success);
  background: var(--success-light);
}

.option-item.wrong-answer {
  border-color: var(--danger);
  background: var(--danger-light);
}

.option-marker {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-item.selected .option-marker {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.option-item.correct-answer .option-marker {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.option-item.wrong-answer .option-marker {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.option-text {
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.5;
  flex: 1;
}

/* Caja de Explicación Inmediata (Modo Práctica o Revisión) */
.explanation-box {
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
}

.explanation-box.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.explanation-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.explanation-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.explanation-ref {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Barra Inferior del Quiz */
.quiz-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   PANTALLA DE RESULTADOS DEL SIMULACRO
   ============================================================ */
.results-container {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.results-container.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

.results-badge-icon {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.results-badge-icon.aprobado {
  background: var(--success-light);
  color: var(--success);
}

.results-badge-icon.reprobado {
  background: var(--danger-light);
  color: var(--danger);
}

.results-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.results-score-big {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin: 1rem 0;
}

.results-score-big span {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.results-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.results-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.breakdown-card {
  background: var(--bg-subtle);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.breakdown-val {
  font-size: 1.6rem;
  font-weight: 800;
}

.breakdown-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   SECCIÓN 3.1: BIBLIOTECA DE DOCUMENTOS OFICIALES EN PDF
   ============================================================ */
.pdf-info-banner {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pdf-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.pdf-info-banner-left h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.pdf-info-banner-left p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
}

.pdf-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pdf-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.pdf-search-box i.fa-magnifying-glass {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.pdf-search-box input {
  width: 100%;
  padding: 0.9rem 3rem 0.9rem 3.25rem;
  font-size: 0.95rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.pdf-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.pdf-search-box #pdfSearchClearBtn {
  position: absolute;
  right: 0.75rem;
}

.pdf-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.pdf-pill {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.pdf-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.pdf-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.pdf-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pdf-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.pdf-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent-color, var(--primary));
}

.pdf-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.pdf-card-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.pdf-card-size-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pdf-card-entidad {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.pdf-card-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.pdf-card-resumen {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.pdf-card-articles-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

.pdf-card-articles-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-card-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pdf-card-articles-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.pdf-card-articles-list li i {
  color: var(--success);
  margin-top: 0.2rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.pdf-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pdf-card-actions .btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
  font-size: 0.84rem;
  padding: 0.55rem 0.85rem;
}

/* MODAL DEL VISOR DE PDF */
.pdf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pdf-modal-container {
  width: 94vw;
  max-width: 1240px;
  height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pdf-modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
}

.pdf-modal-title-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.pdf-modal-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: #ef444415;
  color: #dc2626;
  border: 1px solid #ef444430;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pdf-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.pdf-modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pdf-modal-body {
  flex: 1;
  background: #334155;
  overflow: hidden;
  position: relative;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-modal-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

.pdf-modal-hint {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-modal-hint kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .pdf-modal-container {
    width: 98vw;
    height: 94vh;
  }
  .pdf-modal-header {
    padding: 0.75rem 1rem;
  }
  .pdf-modal-title {
    max-width: 200px;
    font-size: 0.95rem;
  }
  .hide-mobile {
    display: none;
  }
  .pdf-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SECCIÓN 3: BIBLIOTECA NORMATIVA & GUÍAS DE ESTUDIO
   ============================================================ */
.guides-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-accordion {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.guide-accordion:hover {
  border-color: var(--border-strong);
}

.guide-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg-surface);
  transition: var(--transition);
}

.guide-header:hover {
  background: var(--bg-subtle);
}

.guide-title-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guide-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.guide-main-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.guide-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.guide-toggle-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.guide-accordion.open .guide-toggle-icon {
  transform: rotate(180deg);
}

.guide-body {
  display: none;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.93rem;
  line-height: 1.7;
}

.guide-accordion.open .guide-body {
  display: block;
}

.guide-key-points {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.guide-key-points li {
  margin-bottom: 0.6rem;
}

.trampa-alerta {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.trampa-alerta-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.trampa-alerta-text {
  font-size: 0.85rem;
  color: #7f1d1d;
}

/* ============================================================
   SECCIÓN 4: FLASHCARDS INTERACTIVAS (MEMORIZACIÓN ACTIVA)
   ============================================================ */
.flashcards-wrapper {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.flashcard-scene {
  perspective: 1000px;
  width: 100%;
  height: 340px;
  margin: 2rem 0;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}

.flashcard-inner.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 2px solid var(--border);
}

.flashcard-front {
  background: var(--bg-surface);
  color: var(--text-main);
}

.flashcard-back {
  background: linear-gradient(135deg, var(--bg-surface), var(--primary-light));
  color: var(--text-main);
  transform: rotateY(180deg);
  border-color: var(--primary);
}

.fc-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--primary);
}

.fc-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  max-width: 90%;
}

.fc-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fc-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ============================================================
   SECCIÓN 5: ESTADÍSTICAS & HISTORIAL
   ============================================================ */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.stat-metric-num {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.stat-metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.history-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.table-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

/* ============================================================
   SECCIÓN 2.5: FICHAS DE ESTUDIO & CONCEPTOS MAESTROS
   ============================================================ */
.learning-path-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.learning-path-steps {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.path-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.fichas-filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.ficha-pill-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.ficha-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ficha-pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.fichas-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.ficha-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ficha-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.ficha-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ficha-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ficha-module-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.ficha-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.ficha-resumen {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.concept-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.concept-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.concept-item-detalle {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.formula-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 0.85rem;
  white-space: pre-line;
}

[data-theme="dark"] .formula-box {
  color: #fbbf24;
}

.example-box {
  background: var(--primary-light);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-line;
}

.items-clave-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.items-clave-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.items-clave-list li {
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-main);
}

.ficha-footer-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* FOOTER */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* ============================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ============================================================ */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .readiness-card,
  .daily-goal-card,
  .daily-question-card,
  .components-card,
  .quick-access-card {
    grid-column: span 12;
  }
  
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 0.5rem 1rem;
  }
  
  .brand-title {
    font-size: 1rem;
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .simulacros-grid {
    grid-template-columns: 1fr;
  }
  
  .quiz-active-container {
    padding: 1.25rem;
  }
  
  .results-breakdown-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .flashcard-scene {
    height: 380px;
  }
}

/* ============================================================
   ESTILOS: RUTA & ESTRATEGIA GANADORA CNSC / SIMO
   ============================================================ */

.estrategia-nav-pills {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  scrollbar-width: thin;
}

.est-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.est-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.est-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.est-block-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.est-progress-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* FASES DEL PLAN DE 1 AÑO */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.phase-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.phase-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.phase-badge-num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.phase-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.phase-range {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.phase-objective {
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--bg-surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  line-height: 1.4;
}

.phase-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.phase-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.phase-step-item:hover {
  border-color: var(--primary);
}

.phase-step-item.checked {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.04);
}

.phase-step-item.checked .step-title-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.step-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.step-content-box {
  flex: 1;
}

.step-title-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-desc-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

/* HORARIO SEMANAL */
.weekly-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.schedule-day-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
}

.schedule-day-card.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-day-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-time-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.schedule-component-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.4rem 0 0.6rem 0;
}

.schedule-act-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.schedule-act-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.schedule-act-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
}

.schedule-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* SEMÁFORO DE INTERNET */
.traffic-light-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.traffic-col {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.traffic-col-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}

.traffic-red .traffic-col-header {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}

.traffic-yellow .traffic-col-header {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.traffic-green .traffic-col-header {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.traffic-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red { background: var(--danger); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.dot-yellow { background: var(--accent); box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
.dot-green { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }

.traffic-col-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.traffic-item-card {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.traffic-item-title {
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.traffic-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.traffic-item-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* VRM CHECKLIST */
.vrm-checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.vrm-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.86rem;
  color: var(--text-main);
  cursor: pointer;
  background: var(--bg-surface);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.vrm-check-item input {
  margin-top: 2px;
  accent-color: var(--accent);
}

/* REGLAS DE JUICIO SITUACIONAL */
.rules-accordion-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rule-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 1.5rem;
  transition: var(--transition);
}

.rule-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.rule-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.rule-vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rule-bad-box {
  background: rgba(239, 68, 68, 0.06);
  border-left: 4px solid var(--danger);
  padding: 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.rule-good-box {
  background: rgba(16, 185, 129, 0.06);
  border-left: 4px solid var(--success);
  padding: 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* CALCULADORA SIMO */
.simo-calc-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.simo-control-group {
  margin-bottom: 1.25rem;
}

.simo-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  flex-wrap: wrap;
  gap: 0.35rem;
}

.simo-badge-weight {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.simo-slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.simo-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  cursor: pointer;
}

.simo-slider-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  min-width: 80px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.simo-field-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.simo-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.simo-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.simo-results-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.simo-result-header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.simo-grand-score {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
  margin: 0.5rem 0;
  font-variant-numeric: tabular-nums;
}

.simo-status-display {
  text-align: center;
  margin: 1rem 0;
}

.simo-status-pill {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 900;
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.zone-eliminado {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.zone-riesgo {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid var(--accent);
}

.zone-media {
  background: rgba(2, 132, 199, 0.15);
  color: #0369a1;
  border: 1px solid #0284c7;
}

.zone-ganadora {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid var(--success);
}

.simo-status-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.35;
}

.simo-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.75rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.simo-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.simo-breakdown-item strong {
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.simo-advice-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .simo-calc-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TABLA TÉCNICA EN FICHAS DE ESTUDIO (Referencia, Eje Central, Población)
   ========================================================================== */
.ficha-technical-table {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.tech-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tech-label {
  font-weight: 800;
  color: var(--text-main);
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tech-val {
  color: var(--text-main);
  flex: 1;
  font-weight: 500;
  line-height: 1.5;
}

/* ==========================================================================
   MATRIZ GENERAL DE JUICIO SITUACIONAL (DILEMAS ÉTICOS CNSC)
   ========================================================================== */
.matriz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 1.5rem;
}

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

.matriz-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.matriz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.matriz-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.matriz-badge-ref {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.matriz-dilemma-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.matriz-cols-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.matriz-box-trap {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.matriz-box-trap-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #dc2626;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="dark"] .matriz-box-trap-title {
  color: #f87171;
}

.matriz-box-trap-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}

.matriz-box-official {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.matriz-box-official-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="dark"] .matriz-box-official-title {
  color: #34d399;
}

.matriz-box-official-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}

.matriz-rule-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-main);
}

.matriz-rule-box strong {
  color: #6366f1;
}

.matriz-action-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   MODAL DE PRÁCTICA CASO SITUACIONAL CNSC
   ========================================================================== */
.practice-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.practice-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.practice-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
}

.practice-modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.practice-modal-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.practice-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.practice-modal-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.practice-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.practice-enunciado {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.practice-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.practice-option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.5;
  width: 100%;
}

.practice-option-item:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-subtle);
  transform: translateX(4px);
}

.practice-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.practice-option-item.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.practice-option-item.correct .practice-option-letter {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.practice-option-item.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.practice-option-item.wrong .practice-option-letter {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.practice-feedback-alert {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.practice-feedback-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.practice-feedback-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.practice-modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   BARRA DE BÚSQUEDA GLOBAL SUPERIOR (HEADER)
   ========================================================================== */
.global-search-container {
  flex: 1;
  max-width: 520px;
  position: relative;
  margin: 0 1rem;
}

.global-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.global-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.global-search-box input {
  width: 100%;
  height: 40px;
  padding: 0 2.5rem 0 2.6rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.88rem;
  transition: var(--transition);
}

.global-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.global-search-clear {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  padding: 0.5rem;
}

.global-search-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.global-search-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
}

.global-search-type-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  margin-top: 2px;
}

.global-search-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.global-search-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .global-search-container {
    max-width: 260px;
    margin: 0 0.5rem;
  }
}

@media (max-width: 640px) {
  .global-search-container {
    display: none;
  }
}

/* ==========================================================================
   RUTA GUIADA DE INICIO (ONBOARDING EN 5 PASOS)
   ========================================================================== */
.onboarding-route-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.route-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 1100px) {
  .route-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .route-steps-grid {
    grid-template-columns: 1fr;
  }
}

.route-step-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.route-step-box:hover {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

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

.route-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.route-step-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.route-step-status.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.route-step-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.route-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex: 1;
}

.route-step-action .btn {
  width: 100%;
}

/* ==========================================================================
   PANEL DE COBERTURA TOTAL 100% (AUDITORÍA INTEGRAL)
   ========================================================================== */
.coverage-board-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.coverage-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

@media (max-width: 1000px) {
  .coverage-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.coverage-stat-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.coverage-stat-pill:hover {
  border-color: var(--primary);
  background: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.coverage-stat-pill i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cov-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.cov-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Checklist dentro del Modal de Cobertura */
.cov-checklist-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cov-category-group {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

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

.cov-category-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cov-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cov-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  gap: 0.75rem;
  transition: var(--transition);
}

.cov-item-row.studied {
  opacity: 0.85;
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

.cov-item-name {
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

.cov-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
