/* ===== VARIABLES ===== */
:root {
  --primary: #1a2b4a;
  --primary-light: #243d6b;
  --primary-dark: #111c30;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-gray: #f8fafc;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { line-height: 1.3; font-weight: 600; color: var(--text); }
ul, ol { padding-left: 1.5rem; }
p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

pre {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

table { border-collapse: collapse; width: 100%; }
table th { text-align: left; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== PUBLIC NAVBAR ===== */
.navbar {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.navbar-brand {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-brand:hover { text-decoration: none; color: white; }
.navbar-nav {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  align-items: center;
  flex-wrap: nowrap;
}
.navbar-nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.navbar-nav a:hover { color: white; background: rgba(255,255,255,0.12); text-decoration: none; }
.navbar-nav .btn-nav {
  background: var(--accent);
  color: white !important;
  font-weight: 600;
  margin-left: 0.5rem;
}
.navbar-nav .btn-nav:hover { background: var(--accent-hover); }
.navbar-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  line-height: 1;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a6e 100%);
  color: white;
  padding: 5rem 0 4.5rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}
.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}
.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.82;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero-stat-num { font-size: 2rem; font-weight: 700; color: white; }
.hero-stat-label { font-size: 0.8rem; opacity: 0.7; margin-top: 0.15rem; }

/* ===== SECTIONS ===== */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-gray); }
.section-header { margin-bottom: 2.5rem; }
.section-header.centered { text-align: center; }
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-title { font-size: 1.75rem; color: var(--primary); margin-bottom: 0.5rem; }
.section-desc { color: var(--text-muted); max-width: 560px; }
.section-header.centered .section-desc { margin: 0 auto; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.4;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; border-color: white; }
.btn-secondary { background: white; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-gray); color: var(--text); }
.btn-danger { background: var(--error); color: white; border-color: var(--error); }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ===== CARDS ===== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-label .req { color: var(--error); }
.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-control::placeholder { color: #94a3b8; }
textarea.form-control { min-height: 160px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ===== ALERTS ===== */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #15803d; border-color: #bbf7d0; }
.alert-error { background: var(--error-bg); color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: #fde68a; }

/* ===== PROGRESS ===== */
.progress {
  background: var(--bg-gray);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
  min-width: 4px;
}
.progress-bar.full { background: var(--success); }

/* ===== TABLES ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-gray);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-error { background: #fee2e2; color: #b91c1c; }

/* ===== PAGE HEADER (PUBLIC) ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #243d6b 100%);
  color: white;
  padding: 3rem 0;
}
.page-header h1 { font-size: 1.875rem; color: white; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.8; max-width: 600px; margin: 0; }

/* ===== INFO TABLE (public detail pages) ===== */
.info-table { width: 100%; border-collapse: collapse; }
.info-table td {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: top;
}
.info-table td:first-child {
  width: 38%;
  font-weight: 500;
  color: var(--text-muted);
  padding-right: 1rem;
}

/* ===== DOCUMENT LIST ===== */
.doc-list { list-style: none; padding: 0; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: white;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text);
}
.doc-item:hover { background: var(--bg-gray); text-decoration: none; }
.doc-icon {
  width: 40px;
  height: 40px;
  background: #eff6ff;
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 500; font-size: 0.9rem; }
.doc-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.doc-arrow { color: var(--text-muted); font-size: 0.9rem; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.pricing-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: border-color 0.2s;
}
.pricing-card.featured {
  border-color: var(--accent);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.pricing-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.pricing-price { font-size: 2.25rem; font-weight: 700; color: var(--primary); line-height: 1; margin: 1rem 0 0.25rem; }
.pricing-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-features { list-style: none; padding: 0; margin-bottom: 1.75rem; }
.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer p { font-size: 0.8rem; margin: 0; }
.footer a { color: rgba(255,255,255,0.75); }
.footer a:hover { color: white; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: 0.8rem; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gray);
  padding: 2rem 1rem;
}
.login-card {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-icon {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}
.login-logo h2 { font-size: 1.375rem; color: var(--primary); }
.login-logo p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; margin-bottom: 0; }

/* ===== APP LAYOUT (student/admin) ===== */
.app-layout { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s;
}
.app-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.app-sidebar-brand {
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  text-decoration: none;
  line-height: 1.3;
}
.app-sidebar-brand:hover { text-decoration: none; color: white; }
.app-sidebar-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.app-sidebar-nav { flex: 1; padding: 0.75rem 0; }
.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 0.875rem 1.5rem 0.375rem;
  font-weight: 600;
}
.app-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.app-sidebar-nav a:hover {
  color: white;
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.app-sidebar-nav a.active {
  color: white;
  background: rgba(255,255,255,0.12);
  border-left-color: var(--accent);
  font-weight: 500;
}
.app-sidebar-nav .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.app-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
}
.app-sidebar-footer .user-name { color: white; font-weight: 500; display: block; margin-bottom: 0.5rem; }
.app-sidebar-footer a { color: rgba(255,255,255,0.55); }
.app-sidebar-footer a:hover { color: rgba(255,255,255,0.9); }

.app-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background: var(--bg-gray);
  display: flex;
  flex-direction: column;
}
.app-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 1rem;
}
.app-topbar-title { font-weight: 600; font-size: 0.95rem; }
.app-topbar-right { display: flex; align-items: center; gap: 1rem; }
.app-content { padding: 2rem; flex: 1; }
.page-title { font-size: 1.375rem; font-weight: 700; color: var(--primary); margin-bottom: 1.5rem; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.375rem; font-weight: 500; }

/* ===== SECTION PROGRESS (dashboard) ===== */
.sections-list { display: flex; flex-direction: column; gap: 0.75rem; }
.section-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.section-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.625rem;
}
.section-item-title { font-weight: 500; font-size: 0.9rem; }
.section-item-count { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ===== LESSON LAYOUT ===== */
.lesson-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: calc(100vh - 60px);
}
.lesson-toc {
  background: white;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
}
.lesson-toc-title {
  padding: 1rem 1.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.lesson-toc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.4;
  transition: background 0.1s;
}
.lesson-toc-item:hover { background: var(--bg-gray); text-decoration: none; color: var(--text); }
.lesson-toc-item.active { background: #eff6ff; color: var(--accent); }
.lesson-toc-item.completed .toc-icon { color: var(--success); }
.toc-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 0.8rem; }

.lesson-body { padding: 2rem 2.5rem; max-width: 820px; }
.lesson-title { font-size: 1.625rem; color: var(--primary); margin-bottom: 0.5rem; }
.lesson-meta { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* ===== VIDEO ===== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: #000;
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.video-placeholder {
  background: var(--bg-gray);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
}

/* ===== LESSON CONTENT ===== */
.lesson-content h2 { font-size: 1.375rem; margin: 1.75rem 0 0.75rem; color: var(--primary); }
.lesson-content h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; color: var(--primary); }
.lesson-content ul, .lesson-content ol { margin: 0.75rem 0 0.75rem 1.5rem; }
.lesson-content li { margin-bottom: 0.35rem; }
.lesson-content table { margin: 1rem 0; border: 1px solid var(--border); }
.lesson-content table th, .lesson-content table td { padding: 0.5rem 0.75rem; border: 1px solid var(--border); font-size: 0.875rem; }
.lesson-content table th { background: var(--bg-gray); }

/* ===== TEST ===== */
.test-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.test-header { margin-bottom: 1.5rem; }
.test-header h2 { font-size: 1.25rem; color: var(--primary); }
.test-header p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; margin-bottom: 0; }

.question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.question-num { font-size: 0.72rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.question-text { font-weight: 500; margin-bottom: 1rem; line-height: 1.5; }
.choices { display: flex; flex-direction: column; gap: 0.5rem; }
.choice-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.15s;
  font-size: 0.9rem;
  line-height: 1.4;
}
.choice-label:hover { background: var(--bg-gray); border-color: var(--accent); }
.choice-label input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

/* ===== SCORE ===== */
.score-result {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}
.score-result.good { border-color: var(--success); }
.score-result.ok { border-color: var(--warning); }
.score-result.bad { border-color: var(--error); }
.score-num { font-size: 3rem; font-weight: 700; color: var(--primary); line-height: 1; }
.score-label { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.5rem; margin-bottom: 0; }
.score-message { margin-top: 0.75rem; font-weight: 500; margin-bottom: 0; }
.score-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ===== ADMIN LESSON FORM ===== */
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 800px;
}

/* ===== QUESTIONS ADMIN ===== */
.question-admin-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.question-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.question-admin-text { font-weight: 500; font-size: 0.9rem; }
.choice-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}
.choice-correct { color: var(--success); font-weight: 600; }
.choice-wrong { color: var(--text-muted); }

.add-question-form {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.add-question-form h3 { font-size: 1rem; margin-bottom: 1.25rem; }
.choice-inputs { display: flex; flex-direction: column; gap: 0.625rem; }
.choice-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.choice-input-row input[type="radio"] {
  accent-color: var(--success);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.choice-radio-label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-toc { display: none; }
  .lesson-body { padding: 1.5rem; }
}

@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  .navbar-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 0.75rem;
    gap: 0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav li { width: 100%; }
  .navbar-nav a { display: block; padding: 0.75rem 1rem; width: 100%; }

  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }

  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .app-content { padding: 1rem; }
  .app-topbar { padding: 0 1rem; }
}

@media (max-width: 560px) {
  .cards-grid-3, .cards-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3.5rem 0 3rem; }
}
