/* EnglishFlow - Curriculum Path, Lesson Viewer & Quiz Gate Styles */

/* --- UNIFIED PROGRESSION HERO & LEARNING PATH STYLES --- */
.unified-path-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 28px 32px;
  margin-bottom: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.path-hero-content {
  flex: 1;
  min-width: 320px;
}

.path-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.path-hero-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

.path-hero-sub {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 16px 0;
  max-width: 680px;
}

.path-hero-stages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-tag.stage-a1 { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stage-tag.stage-a2 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.stage-tag.stage-b1 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.stage-tag.stage-b2 { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.stage-arrow { font-size: 0.7rem; color: #64748b; }

.path-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 260px;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  border-radius: 12px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}

.hero-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.4s ease;
}

.hero-active-day-pill {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-active-day-pill strong {
  color: #ffffff;
}

/* Callout diagnóstico opcional */
.diagnostic-optional-callout {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 16px 22px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.callout-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.callout-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.callout-left h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
}

.callout-left p {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0;
}

.btn-start-diag-callout {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-start-diag-callout:hover {
  background: #3b82f6;
  color: #ffffff;
}

/* Divisores de Etapa Pedagógica */
.path-stage-milestone {
  border-radius: 12px;
  padding: 16px 22px;
  margin: 32px 0 20px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.stage-milestone-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.stage-milestone-badge {
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-milestone-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.stage-milestone-desc {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

/* --- TARJETAS INTEGRADAS DE DÍA (DAY PATH CARD) --- */
.day-path-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
  position: relative;
}

.day-path-card.day-card-active {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(17, 24, 39, 0.98));
}

.day-path-card.day-card-completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(20, 35, 30, 0.7), rgba(15, 23, 42, 0.95));
}

.day-path-card.day-card-locked {
  opacity: 0.72;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Header del Día */
.day-path-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.day-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.day-number-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.day-circle-num {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.day-number-circle.circle-active {
  background: rgba(59, 130, 246, 0.2);
  border: 3px solid #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  animation: currentPulse 2.5s infinite ease-in-out;
}

.day-number-circle.circle-completed {
  background: rgba(16, 185, 129, 0.2);
  border: 3px solid #10b981;
  color: #34d399;
}

.day-number-circle.circle-locked {
  background: rgba(255, 255, 255, 0.04);
  border: 3px solid #334155;
  color: #64748b;
}

.day-header-titles {
  flex: 1;
}

.day-level-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.day-level-pill {
  background: var(--accent, #3b82f6);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.day-duration-pill {
  font-size: 0.75rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.day-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.day-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
}

/* Status Pills */
.day-status-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.day-status-pill.status-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.day-status-pill.status-active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.3);
}

.day-status-pill.status-locked {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sincronización con Recursos */
.day-resource-sync-bar {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.resource-sync-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #93c5fd;
}

.resource-sync-info strong {
  color: #ffffff;
}

.btn-goto-resource-modal,
.btn-goto-resource-tab {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  padding: 7px 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-goto-resource-modal:hover,
.btn-goto-resource-tab:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

/* Bloque de Trabajo */
.day-work-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.day-work-block.work-block-locked {
  filter: grayscale(0.5);
}

/* Cajas de Sección */
.day-section-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px 20px;
}

.section-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.section-badge-icon.icon-theory { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.section-badge-icon.icon-practice { background: rgba(16, 185, 129, 0.18); color: #34d399; }

.section-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 0 0;
}

/* Elementos de Teoría */
.formula-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.formula-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #93c5fd;
}

.formula-code {
  color: #34d399;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  font-size: 0.88rem;
}

.rule-text {
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.rule-pitfall-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #fde68a;
}

/* Elementos de Práctica */
.practice-sub-unit {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.practice-sub-unit:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sub-unit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.audio-drill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 8px;
}

.audio-phrase-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phrase-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.phrase-ipa {
  font-size: 0.82rem;
  color: #94a3b8;
}

.audio-buttons-group {
  display: flex;
  gap: 8px;
}

.btn-card-audio {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-card-audio.play-normal {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.btn-card-audio.play-normal:hover {
  background: #3b82f6;
  color: #ffffff;
}

.btn-card-audio.play-slow {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-card-audio.play-slow:hover {
  background: rgba(255, 255, 255, 0.15);
}

.phonetic-tip-note {
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phonetic-tip-note i {
  color: #f59e0b;
}

/* Oraciones */
.sentences-practice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-sentence-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sentence-sound {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-sentence-sound:hover {
  background: #10b981;
  color: #ffffff;
}

.mini-sentence-content {
  flex: 1;
}

.sent-en {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.sent-es {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* Vocabulario Interactivo */
.vocab-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interactive-vocab-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.interactive-vocab-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.v-word { font-weight: 800; font-size: 0.88rem; color: #ffffff; }
.v-ipa { font-size: 0.75rem; color: #94a3b8; }
.v-es { font-size: 0.8rem; color: #34d399; }
.v-icon { font-size: 0.75rem; color: #60a5fa; opacity: 0.7; }

/* Caja de Quiz Gate */
.gate-section-box {
  border-radius: 12px;
  padding: 20px 24px;
}

.gate-section-box.box-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.gate-section-box.box-completed {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.gate-section-box.box-locked {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gate-flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.gate-left {
  flex: 1;
  min-width: 260px;
}

.gate-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gate-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.gate-instruction {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.45;
}

.btn-gate-cta {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-gate-start {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.btn-gate-start:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.7);
}

.btn-gate-retake {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-gate-retake:hover {
  background: rgba(255, 255, 255, 0.12);
}

.locked-gate-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Light theme overrides para alto contraste */
body.light-theme .unified-path-hero,
[data-theme="light"] .unified-path-hero {
  background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .path-hero-title,
[data-theme="light"] .path-hero-title {
  color: #0f172a !important;
}

body.light-theme .path-hero-sub,
[data-theme="light"] .path-hero-sub {
  color: #334155 !important;
}

body.light-theme .hero-stat-card,
[data-theme="light"] .hero-stat-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-theme .stat-val,
[data-theme="light"] .stat-val {
  color: #0f172a !important;
}

body.light-theme .day-path-card,
[data-theme="light"] .day-path-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .day-title,
[data-theme="light"] .day-title,
body.light-theme .section-title,
[data-theme="light"] .section-title,
body.light-theme .phrase-text,
[data-theme="light"] .phrase-text,
body.light-theme .sent-en,
[data-theme="light"] .sent-en,
body.light-theme .v-word,
[data-theme="light"] .v-word,
body.light-theme .gate-heading,
[data-theme="light"] .gate-heading {
  color: #0f172a !important;
}

body.light-theme .day-desc,
[data-theme="light"] .day-desc,
body.light-theme .rule-text,
[data-theme="light"] .rule-text,
body.light-theme .gate-instruction,
[data-theme="light"] .gate-instruction,
body.light-theme .sent-es,
[data-theme="light"] .sent-es {
  color: #334155 !important;
}

body.light-theme .formula-banner,
[data-theme="light"] .formula-banner {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

body.light-theme .audio-drill-row,
[data-theme="light"] .audio-drill-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-theme .interactive-vocab-chip,
[data-theme="light"] .interactive-vocab-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .day-resource-sync-bar,
[data-theme="light"] .day-resource-sync-bar {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

body.light-theme .resource-sync-info strong,
[data-theme="light"] .resource-sync-info strong {
  color: #1e3a8a !important;
}

body.light-theme .resource-sync-info,
[data-theme="light"] .resource-sync-info {
  color: #1d4ed8 !important;
}

/* --- LEARNING PATH QUEUE --- */
.curriculum-path-section {
  position: relative;
  max-width: 860px;
  margin: 0 auto 4rem;
}

.path-node-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 2rem;
  position: relative;
}

.path-node-wrapper::after {
  content: '';
  position: absolute;
  top: 75px;
  left: 36px;
  width: 3px;
  height: calc(100% - 35px);
  background: var(--border-color);
  z-index: 1;
}

.path-node-wrapper:last-child::after {
  display: none;
}

.path-node-wrapper.completed::after {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.node-circle {
  width: 74px;
  height: 74px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  border: 4px solid #334155;
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 2;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}

.node-day-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.node-circle.completed {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
}

.node-circle.current {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
  animation: currentPulse 2.5s infinite ease-in-out;
}

@keyframes currentPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.8); }
}

.node-circle.locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #1e293b;
  color: #64748b;
}

.node-details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  flex: 1;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.path-node-wrapper.current .node-details {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(18, 26, 44, 0.95));
}

.node-details:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.node-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.node-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.badge-score {
  font-size: 0.75rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.node-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
}

.node-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 14px;
}

.btn-node-open {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-node-open:hover {
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-1px);
}

.locked-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- LESSON STUDY MODAL --- */
.lesson-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 800px;
  max-width: 95vw;
  max-height: 90vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: zoomInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lesson-modal-content .modal-header-bar {
  padding: 20px 28px 15px;
  margin-bottom: 0;
}

.lesson-body-scroll {
  padding: 24px 28px 36px;
  overflow-y: auto;
}

.lesson-header-section {
  margin-bottom: 22px;
}

.lesson-header-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.lesson-main-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Target phrase card */
.target-phrase-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 26px;
}

.phrase-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}

.target-phrase-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.target-phrase-ipa {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #60a5fa;
  margin-bottom: 18px;
}

.audio-controls-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-audio-pill {
  background: var(--primary);
  color: #022c22;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-audio-pill:hover {
  box-shadow: 0 0 18px var(--primary-glow);
}

.btn-audio-pill.slow {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-audio-pill.slow:hover {
  background: rgba(255, 255, 255, 0.15);
}

.phonetic-tip-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #fde68a;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lesson-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Vocab grid */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.vocab-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.vocab-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.vocab-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.vocab-word {
  font-size: 1rem;
  color: #ffffff;
}

.vocab-sound-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
}

.vocab-ipa {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #93c5fd;
  margin-bottom: 4px;
}

.vocab-trans {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Sentences */
.sentences-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.sentence-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sentence-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.sentence-play-btn:hover {
  background: var(--accent);
  color: white;
}

.sentence-en {
  font-weight: 600;
  font-size: 0.98rem;
  color: #ffffff;
}

.sentence-es {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Quiz CTA */
.quiz-gate-cta-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cta-left h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.cta-left p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- QUIZ GATE MODAL --- */
.quiz-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 740px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: zoomInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-header-bar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.95);
  flex-shrink: 0;
}

.quiz-title-tag {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-exit-dashboard-header:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.quiz-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  width: 0%;
  transition: width 0.35s ease;
}

.quiz-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  scrollbar-gutter: stable;
}

.quiz-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.quiz-topic {
  color: var(--accent);
  font-weight: 600;
}

.quiz-prompt-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 20px;
}

.quiz-audio-trigger-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-choice-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  color: var(--text-main);
}

.quiz-choice-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.choice-tag {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* Word order question */
.word-order-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-dropzone {
  min-height: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dropzone-placeholder {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.selected-word-tag {
  background: var(--accent);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
}

.scrambled-words-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.word-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.word-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.word-chip.used {
  opacity: 0.3;
  pointer-events: none;
}

.order-alert-box {
  width: 100%;
}

.order-alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shakeAnim 0.35s ease;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.order-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.btn-order-reset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Matching Board */
.matching-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .matching-board {
    grid-template-columns: 1fr;
  }
}

.match-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.match-card:hover:not(.matched) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--accent) !important;
  transform: translateY(-2px);
}

.match-card.matched {
  cursor: default;
  opacity: 0.9;
}

/* Cloze Sentence & Blanks */
.cloze-blank-slot:hover {
  background: rgba(56, 189, 248, 0.25) !important;
}

.cloze-option-chip:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: var(--accent) !important;
  transform: translateY(-2px);
}

/* Remediation & CCQ Cards */
.remediation-wizard-card, .ccq-card, .paso-c-card {
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ccq-opt-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: #fbbf24 !important;
  transform: translateX(4px);
}

.btn-play-compare-audio:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Feedback Box */
.quiz-feedback-box {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideInToast 0.25s ease;
}

.quiz-feedback-box.correct {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--primary);
  color: #a7f3d0;
}

.quiz-feedback-box.correct i {
  color: var(--primary);
}

.quiz-feedback-box.incorrect {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid var(--danger);
  color: #fecdd3;
}

.quiz-feedback-box.incorrect i {
  color: var(--danger);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}

.feedback-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Final Gate Card */
.quiz-final-card {
  text-align: center;
  padding: 10px 0;
}

.final-icon-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 20px;
}

.quiz-final-card.pass .final-icon-circle {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--primary);
  color: var(--primary);
}

.quiz-final-card.fail .final-icon-circle {
  background: rgba(244, 63, 94, 0.15);
  border: 2px solid var(--danger);
  color: var(--danger);
}

.quiz-score-display {
  font-size: 3rem;
  font-weight: 900;
  margin: 10px 0;
  color: #ffffff;
}

.gate-success-box, .gate-fail-box {
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gate-success-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--primary);
  color: #a7f3d0;
}

.gate-fail-box {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid var(--danger);
  color: #fecdd3;
}

.quiz-final-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* Diagnostic Lock Banner */
.diagnostic-lock-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: fadeInView 0.3s ease;
}

.lock-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.lock-banner-content {
  flex: 1;
}

.lock-banner-content h4 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lock-banner-content p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.btn-unlock-diag {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-unlock-diag:hover {
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   CURRICULUM LIGHT MODE CONTRAST OVERRIDES ([data-theme="light"])
   Garantiza contraste óptimo y legibilidad completa de textos y tarjetas
   ========================================================================== */
[data-theme="light"] .daily-session-plan-box {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .session-task-row {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .session-task-row:hover {
  background: #f1f5f9 !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

[data-theme="light"] .session-task-row.task-done {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

[data-theme="light"] .task-num {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .task-title {
  color: #0f172a !important;
}

[data-theme="light"] .task-duration {
  color: #475569 !important;
}

[data-theme="light"] .node-details {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .path-node-wrapper.current .node-details {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

[data-theme="light"] .node-title,
[data-theme="light"] .cta-left h3,
[data-theme="light"] .lesson-header-section h2,
[data-theme="light"] .lesson-section-title,
[data-theme="light"] .vocab-word,
[data-theme="light"] .target-phrase-text,
[data-theme="light"] .lock-banner-content h4 {
  color: #0f172a !important;
}

[data-theme="light"] .node-desc,
[data-theme="light"] .node-time,
[data-theme="light"] .cta-left p,
[data-theme="light"] .lesson-main-desc,
[data-theme="light"] .vocab-meaning,
[data-theme="light"] .sentence-es,
[data-theme="light"] .lock-banner-content p,
body.light-theme .cta-left p,
body.light-theme .lesson-main-desc,
body.light-theme .vocab-meaning,
body.light-theme .sentence-es,
body.light-theme .lock-banner-content p {
  color: #334155 !important;
}

[data-theme="light"] .lesson-modal-content,
[data-theme="light"] .quiz-modal-content,
body.light-theme .lesson-modal-content,
body.light-theme .quiz-modal-content {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .quiz-header-bar,
body.light-theme .quiz-header-bar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .quiz-prompt-text,
body.light-theme .quiz-prompt-text {
  color: #0f172a !important;
}

[data-theme="light"] .quiz-step-header,
body.light-theme .quiz-step-header {
  color: #475569 !important;
}

[data-theme="light"] .quiz-choice-btn,
body.light-theme .quiz-choice-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .quiz-choice-btn:hover,
body.light-theme .quiz-choice-btn:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #0f172a !important;
}

[data-theme="light"] .choice-tag,
body.light-theme .choice-tag {
  background: #f1f5f9 !important;
  color: #2563eb !important;
}

[data-theme="light"] .word-chip,
body.light-theme .word-chip {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .word-chip:hover,
body.light-theme .word-chip:hover {
  background: #f1f5f9 !important;
  border-color: #2563eb !important;
}

[data-theme="light"] .order-dropzone,
body.light-theme .order-dropzone {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .dropzone-placeholder,
body.light-theme .dropzone-placeholder {
  color: #64748b !important;
}

[data-theme="light"] .match-card,
body.light-theme .match-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .cloze-option-chip,
body.light-theme .cloze-option-chip {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .quiz-score-display,
body.light-theme .quiz-score-display {
  color: #0f172a !important;
}

[data-theme="light"] .quiz-final-card h3,
body.light-theme .quiz-final-card h3 {
  color: #0f172a !important;
}

[data-theme="light"] .quiz-final-card p,
body.light-theme .quiz-final-card p {
  color: #334155 !important;
}

[data-theme="light"] .quiz-audio-trigger-box,
body.light-theme .quiz-audio-trigger-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-order-reset,
body.light-theme .btn-order-reset {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .remediation-wizard-card,
body.light-theme .remediation-wizard-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .ccq-card,
body.light-theme .ccq-card {
  background: #fefce8 !important;
  border: 1px solid #fde047 !important;
  color: #0f172a !important;
}

[data-theme="light"] .ccq-opt-btn,
body.light-theme .ccq-opt-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .target-phrase-card,
body.light-theme .target-phrase-card {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .target-phrase-ipa,
body.light-theme .target-phrase-ipa {
  color: #0369a1 !important;
}

[data-theme="light"] .phonetic-tip-box,
body.light-theme .phonetic-tip-box {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

[data-theme="light"] .vocab-card,
body.light-theme .vocab-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .vocab-ipa,
body.light-theme .vocab-ipa {
  color: #0284c7 !important;
}

[data-theme="light"] .quiz-gate-cta-card,
body.light-theme .quiz-gate-cta-card {
  background: linear-gradient(135deg, #f8fafc, #edf2f7) !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .diagnostic-lock-banner,
body.light-theme .diagnostic-lock-banner {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

[data-theme="light"] .lock-banner-content h4,
body.light-theme .lock-banner-content h4 {
  color: #0f172a !important;
}

[data-theme="light"] .month-tab-btn,
body.light-theme .month-tab-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .month-tab-btn:hover,
body.light-theme .month-tab-btn:hover {
  background: #f8fafc !important;
  border-color: #3b82f6 !important;
}

[data-theme="light"] .month-tab-btn.active,
body.light-theme .month-tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.08)) !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="light"] .tab-month-name,
body.light-theme .tab-month-name {
  color: #0f172a !important;
}

[data-theme="light"] .tab-days-row,
body.light-theme .tab-days-row {
  color: #64748b !important;
}

[data-theme="light"] .tab-progress-track,
body.light-theme .tab-progress-track {
  background: #e2e8f0 !important;
}

[data-theme="light"] .current-month-banner,
body.light-theme .current-month-banner {
  background: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .month-banner-title,
body.light-theme .month-banner-title {
  color: #0f172a !important;
}

[data-theme="light"] .month-banner-desc,
body.light-theme .month-banner-desc {
  color: #334155 !important;
}

[data-theme="light"] .month-banner-progress,
body.light-theme .month-banner-progress {
  color: #475569 !important;
}

[data-theme="light"] .month-banner-progress strong,
body.light-theme .month-banner-progress strong {
  color: #0f172a !important;
}

/* ==========================================================================
   MONTH PHASE SELECTOR & 6-MONTH ROADMAP TABS
   ========================================================================== */

.month-selector-wrapper {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.month-selector-header {
  margin-bottom: 18px;
}

.month-selector-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.month-selector-title i {
  color: #60a5fa;
}

.month-selector-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.4;
}

.month-tabs-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px 0;
}

.month-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  outline: none;
}

.month-tab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.month-tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.16));
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 0 12px rgba(59, 130, 246, 0.2);
}

.month-tab-btn.done {
  border-color: rgba(16, 185, 129, 0.45);
}

.month-tab-btn.locked {
  opacity: 0.75;
}

.tab-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tab-month-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.tab-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tab-badge.badge-done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.tab-badge.badge-active {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.5);
  animation: pulseActive 2s infinite;
}

.tab-badge.badge-locked {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-level-row {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
}

.tab-days-row {
  font-size: 0.75rem;
  color: #94a3b8;
}

.tab-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.tab-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Selected Month Phase Banner */
.current-month-banner {
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.month-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.month-banner-badge {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.month-banner-progress {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.month-banner-progress strong {
  color: #ffffff;
}

.month-banner-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.month-banner-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.day-month-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Light theme overrides for Month Selector & Banners */
[data-theme="light"] .month-selector-wrapper {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .month-selector-title {
  color: #0f172a !important;
}

[data-theme="light"] .month-selector-sub {
  color: #475569 !important;
}

[data-theme="light"] .month-tab-btn {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .month-tab-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .month-tab-btn.active {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="light"] .tab-month-name {
  color: #0f172a !important;
}

[data-theme="light"] .tab-days-row {
  color: #475569 !important;
}

[data-theme="light"] .tab-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .tab-badge.badge-done {
  background: #dcfce7 !important;
  color: #166534 !important;
}

[data-theme="light"] .tab-badge.badge-active {
  background: #dbeafe !important;
  color: #1e40af !important;
}

[data-theme="light"] .tab-progress-track {
  background: #e2e8f0 !important;
}

[data-theme="light"] .current-month-banner {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .month-banner-title {
  color: #0f172a !important;
}

[data-theme="light"] .month-banner-desc {
  color: #334155 !important;
}

[data-theme="light"] .month-banner-progress {
  color: #475569 !important;
}

[data-theme="light"] .month-banner-progress strong {
  color: #0f172a !important;
}

[data-theme="light"] .day-month-pill {
  background: #f1f5f9 !important;
  color: #475569 !important;
}



