:root {
  --bg-base: #060d10;
  --bg-surface: #0b1519;
  --bg-surface-hover: #0e1c22;
  --bg-input: #0a1418;
  --border-subtle: #15262e;
  --border-accent: rgba(0, 212, 255, 0.35);
  --cyan-primary: #00d4ff;
  --cyan-soft: #22d3ee;
  --cyan-bg: rgba(0, 212, 255, 0.1);
  --green-ok: #10b981;
  --green-bg: rgba(16, 185, 129, 0.14);
  --amber-warn: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --red-err: #ef4444;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --yt-bg: rgba(220, 38, 38, 0.14);
  --yt-border: rgba(239, 68, 68, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 212, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 212, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 360px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.14) 0%, rgba(6, 13, 16, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

.navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(6, 13, 16, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link-accent { color: var(--cyan-soft); font-weight: 600; }
.nav-link-master { color: #fbbf24; font-weight: 600; }

.user-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan-soft);
  background: var(--cyan-bg);
  border: 1px solid rgba(0, 212, 255, 0.28);
  padding: 4px 11px;
  border-radius: 999px;
}

.user-pill.master-pill {
  color: #fcd34d;
  background: var(--amber-bg);
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.btn-youtube {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-youtube svg { color: #ef4444; }
.btn-youtube:hover {
  background: rgba(220, 38, 38, 0.24);
  border-color: rgba(239, 68, 68, 0.55);
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 24px 80px;
}

.hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 42px;
}

.hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyan-soft);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.28);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(1.95rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 0.96rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 26px;
}

.hero-subtitle strong { color: var(--text-primary); font-weight: 600; }

.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto 20px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px 12px 42px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  background: #0b161b;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: rgba(0, 212, 255, 0.35);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--cyan-primary);
  border-color: var(--cyan-primary);
  color: #041014;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.28);
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, rgba(11, 21, 25, 0.6) 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-left: 3px solid var(--cyan-primary);
  border-radius: 10px;
}

.section-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.section-header-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan-soft);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.22);
  padding: 4px 10px;
  border-radius: 6px;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.level-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.level-card:hover {
  transform: translateY(-2px);
  background: var(--bg-surface-hover);
  border-color: rgba(0, 212, 255, 0.35);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.level-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan-soft);
  background: var(--cyan-bg);
  border: 1px solid rgba(0, 212, 255, 0.24);
  padding: 4px 10px;
  border-radius: 6px;
}

.level-topics-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.level-topics-count.unlocked-badge { color: var(--green-ok); }

.level-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.38;
  margin-bottom: 14px;
}

.topics-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.topics-list li {
  position: relative;
  padding-left: 15px;
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

.topics-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan-primary);
  font-size: 0.8rem;
}

.btn-module {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.07);
  border: 1px solid rgba(0, 212, 255, 0.22);
  color: var(--cyan-soft);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-module:hover {
  background: rgba(0, 212, 255, 0.16);
  border-color: var(--cyan-primary);
  color: #ffffff;
}

.btn-module.btn-module-unlocked {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.btn-module.btn-module-unlocked:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--green-ok);
  color: #ffffff;
}

/* Aula Privada */
.classroom-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.classroom-topbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.classroom-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-back-catalog {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-catalog:hover {
  border-color: var(--cyan-primary);
  color: #ffffff;
}

.classroom-kicker {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: var(--cyan-soft);
  letter-spacing: 0.08em;
}

.classroom-student-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.classroom-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-summary-box { min-width: 215px; margin-right: 6px; }

.progress-summary-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  gap: 10px;
}

.progress-summary-labels strong {
  color: var(--cyan-soft);
  font-family: 'JetBrains Mono', monospace;
}

.progress-track {
  width: 100%;
  height: 7px;
  background: #060d10;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #10b981);
  transition: width 0.3s ease;
}

.btn-admin-launch {
  background: var(--amber-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-admin-launch:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #ffffff;
}

.btn-exam-launch {
  background: var(--cyan-primary);
  border: 1px solid var(--cyan-primary);
  color: #041014;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-exam-launch.exam-passed {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.btn-cert-preview {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-cert-preview.cert-unlocked {
  background: var(--cyan-bg);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--cyan-soft);
}

.classroom-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.classroom-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  position: sticky;
  top: 82px;
}

.sidebar-section-group { margin-bottom: 18px; }
.sidebar-section-group:last-child { margin-bottom: 0; }

.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.sidebar-level-block { margin-bottom: 10px; }

.sidebar-level-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 8px;
  margin-bottom: 4px;
}

.sidebar-lesson-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.77rem;
  line-height: 1.38;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: all 0.15s ease;
}

.sidebar-lesson-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.sidebar-lesson-btn.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
  color: #ffffff;
  font-weight: 600;
}

.lesson-status-dot {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  margin-top: 1px;
}

.lesson-status-dot.done {
  background: var(--green-bg);
  border-color: var(--green-ok);
  color: var(--green-ok);
}

.classroom-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
}

.video-stage {
  aspect-ratio: 16 / 9;
  max-height: 430px;
  width: 100%;
  background:
    radial-gradient(circle at center, rgba(0, 212, 255, 0.13) 0%, rgba(6, 13, 16, 0.97) 72%),
    linear-gradient(to right, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px, 28px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  position: relative;
}

.video-stage-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan-soft);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.play-sim-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cyan-primary);
  color: #041014;
  border: none;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.38);
  margin-bottom: 14px;
  transition: transform 0.2s ease;
}

.play-sim-btn:hover { transform: scale(1.06); }

.video-stage-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  max-width: 640px;
  margin-bottom: 6px;
}

.video-stage-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 520px;
}

.video-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 18px;
  background: rgba(4, 9, 12, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.sim-timeline {
  flex: 1;
  height: 5px;
  background: #15262e;
  border-radius: 999px;
  overflow: hidden;
}

.sim-timeline-fill {
  height: 100%;
  background: var(--cyan-primary);
  transition: width 0.4s linear;
}

.lesson-header-box { padding: 22px; }

.lesson-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.lesson-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan-soft);
}

.lesson-main-title {
  font-size: 1.24rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.lesson-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-complete-toggle {
  padding: 9px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(0, 212, 255, 0.35);
  background: var(--cyan-primary);
  color: #041014;
}

.btn-complete-toggle.is-done {
  background: var(--green-bg);
  border-color: var(--green-ok);
  color: #6ee7b7;
}

.btn-step {
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-step:disabled { opacity: 0.4; cursor: not-allowed; }

.lesson-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
}

.panel-box-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.8rem;
}

.resource-name { color: var(--text-primary); font-weight: 500; }

.resource-size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-download-sim {
  background: var(--cyan-bg);
  border: 1px solid rgba(0, 212, 255, 0.28);
  color: var(--cyan-soft);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-download-sim:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #ffffff;
}

.notes-textarea {
  width: 100%;
  min-height: 118px;
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  resize: vertical;
  margin-bottom: 10px;
}

.notes-textarea:focus { outline: none; border-color: var(--cyan-primary); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: 14px;
  color: var(--text-secondary);
}

.btn-secondary {
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--cyan-bg);
  border: 1px solid var(--border-accent);
  color: var(--cyan-soft);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.hidden { display: none !important; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 9, 0.84);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0b161b;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.modal-card.modal-wide { max-width: 760px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cyan-soft);
  background: var(--cyan-bg);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { color: #ffffff; }

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

.modal-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-input {
  width: 100%;
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.86rem;
}

.modal-input:focus { outline: none; border-color: var(--cyan-primary); }

.modal-submit {
  padding: 11px 16px;
  border-radius: 8px;
  border: none;
  background: var(--cyan-primary);
  color: #041014;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-submit:disabled { opacity: 0.55; cursor: wait; }

.modal-feedback {
  font-size: 0.82rem;
  color: var(--cyan-soft);
  margin-top: 4px;
}

.modal-feedback.error { color: #fca5a5; }

.syllabus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: rgba(6, 13, 16, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
}

.syllabus-list li {
  position: relative;
  padding-left: 16px;
  line-height: 1.48;
}

.syllabus-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan-primary);
}

/* Evaluación y Certificado */
.exam-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.exam-pill {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #060d10;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.exam-pill.answered {
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
}

.exam-pill.current {
  border-color: var(--cyan-primary);
  background: var(--cyan-primary);
  color: #041014;
}

.exam-question-card {
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.exam-q-section {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan-soft);
  margin-bottom: 8px;
}

.exam-q-text {
  font-size: 0.96rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.48;
  margin-bottom: 16px;
}

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

.exam-option-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.42;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.exam-option-btn.selected {
  border-color: var(--cyan-primary);
  background: rgba(0, 212, 255, 0.12);
  color: #ffffff;
}

.exam-option-letter {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exam-option-btn.selected .exam-option-letter {
  background: var(--cyan-primary);
  border-color: var(--cyan-primary);
  color: #041014;
}

.exam-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exam-result-banner {
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.exam-result-banner.failed {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}

.exam-review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.exam-review-item {
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--green-ok);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.79rem;
}

.exam-review-item.wrong { border-left-color: var(--red-err); }

.certificate-preview {
  background:
    radial-gradient(circle at top right, rgba(0, 212, 255, 0.14), transparent 55%),
    linear-gradient(135deg, #071318 0%, #0d2129 100%);
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 12px;
  padding: 26px 22px;
  text-align: center;
}

.certificate-preview h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan-soft);
  margin-bottom: 10px;
}

.certificate-preview .cert-student {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 10px 0;
  border-bottom: 1px solid rgba(0, 212, 255, 0.35);
  padding-bottom: 8px;
}

.cert-meta-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.cert-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cert-locked-box {
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.admin-row {
  background: #060d10;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.81rem;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #0d1f26;
  border: 1px solid var(--cyan-primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 60;
}

@media (max-width: 1024px) {
  .levels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .classroom-layout { grid-template-columns: 1fr; }
  .classroom-sidebar { position: static; max-height: 360px; }
  .lesson-panels-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .navbar-inner { padding: 12px 16px; }
  .nav-actions { gap: 10px; }
  .btn-youtube span { display: none; }
  .levels-grid { grid-template-columns: 1fr; }
  .catalog-meta { flex-direction: column; align-items: flex-start; }
}
.topics-list {
  max-height: 290px;
  overflow-y: auto;
  padding-right: 6px;
}

.topics-list::-webkit-scrollbar {
  width: 5px;
}

.topics-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.25);
  border-radius: 999px;
}