:root {
  --primary: #1565C0;
  --primary-dark: #0D47A1;
  --primary-light: #E3F2FD;
  --accent: #00897B;
  --gold: #F9A825;
  --text: #212121;
  --text-muted: #757575;
  --border: #E0E0E0;
  --bg: #F5F7FA;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --radius: 1rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ─────────────────────────────────────────────── */
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.text-primary { color: var(--primary) !important; }
.navbar { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* ── Landing Page ────────────────────────────────────────── */
body.landing { background: #fff; }

.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1976D2 100%);
  padding: 5rem 0;
}

.hero-section .lead { font-size: 1.2rem; }

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 60px; height: 60px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  font-size: 1.5rem;
  color: var(--primary);
}

.pricing-card { border: 2px solid var(--primary-light); }
.price-badge {
  display: inline-block;
  background: var(--gold);
  color: #333;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.price-display .price-amount { font-size: 3.5rem; font-weight: 800; color: var(--primary); }
.price-display .price-period { font-size: 1.1rem; color: var(--text-muted); }

/* ── Auth ────────────────────────────────────────────────── */
.auth-card { max-width: 480px; margin: 0 auto; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.15); }
.form-control-lg { font-size: 1rem; }

/* ── Curriculum ──────────────────────────────────────────── */
.curriculum-card { transition: box-shadow 0.2s; }
.curriculum-card:hover:not(.locked) { box-shadow: var(--shadow-lg) !important; }
.curriculum-card.locked { opacity: 0.65; }

.status-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.status-icon.passed { background: #E8F5E9; color: #2E7D32; font-size: 1.2rem; }
.status-icon.locked { background: #F5F5F5; color: #9E9E9E; font-size: 0.9rem; }
.status-icon.active { background: var(--primary-light); color: var(--primary); }

/* ── Quiz ────────────────────────────────────────────────── */
.question-num {
  width: 32px; height: 32px; min-width: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

.option-label {
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.option-label:hover { border-color: var(--primary); background: var(--primary-light); }
.option-label.selected { border-color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* ── Section Number ──────────────────────────────────────── */
.section-num {
  width: 36px; height: 36px; min-width: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

.section-num-lg {
  width: 56px; height: 56px; min-width: 56px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.4rem;
}

.section-row {
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.15s;
}
.section-row:hover { background: var(--primary-light); }

/* ── Lesson Content ──────────────────────────────────────── */
.lesson-content { line-height: 1.8; }
.lesson-content h2, .lesson-content h3 { color: var(--primary); margin-top: 1.5rem; }
.lesson-content ul, .lesson-content ol { padding-left: 1.5rem; }
.lesson-content li { margin-bottom: 0.4rem; }
.lesson-content strong { color: var(--primary-dark); }

/* ── Admin ───────────────────────────────────────────────── */
.team-row { border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.team-row:last-child { border-bottom: none; padding-bottom: 0; }

.lesson-item, .quiz-item { background: #fafafa; }

.invite-link-box {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  word-break: break-all;
}

/* ── Billing ─────────────────────────────────────────────── */
.pricing-box {
  background: var(--primary-light);
  border: 1px solid #BBDEFB;
}

/* ── Quiz CTA ────────────────────────────────────────────── */
.quiz-cta { background: linear-gradient(135deg, #F3F8FF 0%, var(--primary-light) 100%); }

/* ── Progress Bar ────────────────────────────────────────── */
.progress { background: #E0E0E0; }
.progress-bar { border-radius: 6px; }

/* ── Badges ──────────────────────────────────────────────── */
.bg-primary-subtle { background-color: var(--primary-light) !important; }

/* ── Details/Summary (add lesson/question forms) ─────────── */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-section { padding: 3rem 0; }
  .hero-section h1 { font-size: 2rem; }
  .price-display .price-amount { font-size: 2.5rem; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* ── Tables ──────────────────────────────────────────────── */
.table { --bs-table-hover-bg: var(--primary-light); }
.table th { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
