/* ============================================================
   TechTutor - Professional Design System
   Deep Navy + Electric Blue + Amber Accents
   Font: DM Sans + JetBrains Mono
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

/* Variables */
:root {
  --navy:    #0d1b2a;
  --navy-2:  #1b2d42;
  --navy-3:  #243447;
  --blue:    #2563eb;
  --blue-l:  #3b82f6;
  --blue-xl: #60a5fa;
  --amber:   #f59e0b;
  --amber-l: #fbbf24;
  --green:   #10b981;
  --red:     #ef4444;
  --purple:  #8b5cf6;
  --text:    #0f172a;
  --text-2:  #334155;
  --text-3:  #64748b;
  --border:  #e2e8f0;
  --bg:      #f8fafc;
  --bg-2:    #f1f5f9;
  --white:   #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.1);
  --radius:  10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'DM Serif Display', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-l); }

img { max-width: 100%; display: block; }

/* ============================================================
   LAYOUT
============================================================ */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   NAVBAR
============================================================ */

.navbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  font-weight: 400;
}

.navbar-brand span { color: var(--amber); }

.navbar-brand .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--amber));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.navbar-nav {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}

.navbar-nav a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   BUTTONS
============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37,99,235,.4);
  color: var(--white);
}

.btn-amber {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(245,158,11,.35);
}

.btn-amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245,158,11,.4);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.3);
}

.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
  color: var(--white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline-dark:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: 8px; }
.btn-danger { background: var(--red); color: white; }
.btn-success { background: var(--green); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: none;
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

/* ============================================================
   CARDS
============================================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body { padding: 24px; }
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
}

.card-hover { transition: all var(--transition); }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue-xl);
}

/* ============================================================
   COURSE CARDS
============================================================ */

.course-card {
  display: flex; flex-direction: column;
  height: 100%;
}

.course-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  position: relative;
  overflow: hidden;
}

.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.course-card .thumb .badge {
  position: absolute; top: 12px; left: 12px;
}

.course-card .thumb .level-badge {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.6);
  color: white;
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.course-card .body { padding: 20px; flex: 1; }
.course-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.course-card .meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: .8rem;
  color: var(--text-3);
  margin-bottom: 12px;
}

.course-card .meta i { color: var(--blue-xl); }

.course-card .footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.course-card .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
}

.course-card .price.free { color: var(--green); }

.stars {
  display: flex; align-items: center; gap: 4px;
  color: var(--amber);
  font-size: .85rem;
}

/* ============================================================
   BADGES
============================================================ */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-navy   { background: var(--navy); color: white; }
.badge-gray   { background: #f1f5f9; color: var(--text-2); }

/* ============================================================
   FORMS
============================================================ */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-control.is-invalid { border-color: var(--red); }

.form-control::placeholder { color: #94a3b8; }

.form-text {
  font-size: .8rem;
  color: var(--text-3);
  margin-top: 5px;
}

.invalid-feedback {
  font-size: .8rem;
  color: var(--red);
  margin-top: 5px;
  display: flex; align-items: center; gap: 4px;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.input-group .input-icon {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.input-group .form-control { padding-left: 40px; }

.form-check {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
}

.form-check input[type=checkbox],
.form-check input[type=radio] {
  width: 18px; height: 18px;
  accent-color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   TABLES
============================================================ */

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   SIDEBAR LAYOUT
============================================================ */

.sidebar-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}

.sidebar {
  background: var(--navy);
  padding: 24px 0;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 8px; }

.sidebar-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  padding: 12px 24px 6px;
}

.sidebar-nav { list-style: none; }

.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,.06);
}

.sidebar-nav a.active {
  color: var(--white);
  background: rgba(37,99,235,.25);
  border-left-color: var(--blue-xl);
}

.sidebar-nav a i { width: 18px; text-align: center; opacity: .8; }

.main-content {
  padding: 32px;
  background: var(--bg);
  overflow-x: hidden;
}

/* ============================================================
   DASHBOARD STATS
============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 16px;
  transition: all var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.blue   { background: #dbeafe; color: var(--blue); }
.stat-icon.green  { background: #d1fae5; color: var(--green); }
.stat-icon.amber  { background: #fef3c7; color: var(--amber); }
.stat-icon.purple { background: #ede9fe; color: var(--purple); }
.stat-icon.red    { background: #fee2e2; color: var(--red); }
.stat-icon.navy   { background: var(--navy-2); color: var(--blue-xl); }

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: .8rem;
  color: var(--text-3);
  font-weight: 500;
}

.stat-delta {
  font-size: .75rem;
  margin-top: 4px;
}

.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }

/* ============================================================
   PROGRESS
============================================================ */

.progress-bar {
  background: var(--bg-2);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--blue), var(--blue-l));
  transition: width .5s ease;
}

.progress-fill.green  { background: linear-gradient(90deg, var(--green), #34d399); }
.progress-fill.amber  { background: linear-gradient(90deg, var(--amber), var(--amber-l)); }
.progress-fill.red    { background: linear-gradient(90deg, var(--red), #f87171); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #a78bfa); }

/* ============================================================
   CODE BLOCKS
============================================================ */

.code-block {
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow);
}

.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--navy-2);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.code-block-lang {
  font-size: .75rem;
  color: var(--amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: #e2e8f0;
  line-height: 1.7;
}

.copy-btn {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover { background: rgba(255,255,255,.2); color: white; }
.copy-btn.copied { background: rgba(16,185,129,.2); color: var(--green); }

/* ============================================================
   FLASH MESSAGES
============================================================ */

.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .9rem;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================================
   MODALS
============================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.95) translateY(20px);
  transition: transform .25s ease;
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 24px 28px 0;
  display: flex; align-items: center; justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-close {
  background: var(--bg-2); border: none; border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px 28px; }
.modal-footer { padding: 0 28px 24px; display: flex; gap: 12px; justify-content: flex-end; }

/* ============================================================
   TABS
============================================================ */

.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  background: none; border: none;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  border-radius: 8px 8px 0 0;
}

.tab-btn:hover { color: var(--blue); background: var(--bg-2); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   EXAM / TEST UI
============================================================ */

.exam-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.exam-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.exam-timer {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.exam-timer.warning { color: var(--amber); }
.exam-timer.danger  { color: var(--red); animation: pulse 1s infinite; }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.question-number {
  font-size: .75rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.option-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--transition);
  user-select: none;
}

.option-item:hover { border-color: var(--blue); background: #eff6ff; }
.option-item.selected { border-color: var(--blue); background: #dbeafe; }
.option-item.correct  { border-color: var(--green); background: #d1fae5; }
.option-item.wrong    { border-color: var(--red); background: #fee2e2; }

.option-key {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--text-2);
  flex-shrink: 0;
}

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

.question-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}

.q-dot {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-3);
}

.q-dot:hover { border-color: var(--blue); color: var(--blue); }
.q-dot.answered { background: var(--blue); border-color: var(--blue); color: white; }
.q-dot.current  { background: var(--amber); border-color: var(--amber); color: white; }
.q-dot.flagged  { background: #fee2e2; border-color: var(--red); color: var(--red); }

/* ============================================================
   DRAG & DROP
============================================================ */

.draggable-item {
  cursor: grab;
  user-select: none;
  transition: all var(--transition);
}

.draggable-item:active { cursor: grabbing; }
.draggable-item.dragging { opacity: .5; transform: scale(.98); }
.drag-over { border-color: var(--blue) !important; background: #eff6ff !important; }

/* ============================================================
   GRID UTILITIES
============================================================ */

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px; }

/* ============================================================
   HERO
============================================================ */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, #1a3a5c 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(37,99,235,.2) 0%, transparent 60%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 em { color: var(--amber); font-style: normal; }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex; gap: 40px;
  margin-top: 50px;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
}

.hero-stat-label {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}

/* ============================================================
   LESSON CONTENT
============================================================ */

.lesson-body h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); margin: 28px 0 12px; }
.lesson-body h3 { font-size: 1.15rem; color: var(--navy-2); margin: 20px 0 10px; }
.lesson-body p { color: var(--text-2); line-height: 1.8; margin-bottom: 16px; }
.lesson-body ul, .lesson-body ol { margin-left: 24px; margin-bottom: 16px; }
.lesson-body li { color: var(--text-2); margin-bottom: 6px; line-height: 1.7; }
.lesson-body blockquote {
  border-left: 4px solid var(--blue);
  padding: 12px 20px;
  background: #eff6ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
  color: var(--text-2);
}

/* ============================================================
   CHAPTER SIDEBAR
============================================================ */

.chapter-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: sticky;
  top: 90px;
}

.chapter-list { list-style: none; }

.chapter-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  color: var(--text-2);
  font-size: .87rem;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.chapter-list li a:hover { color: var(--blue); background: #eff6ff; }
.chapter-list li a.active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }
.chapter-list li a.done { color: var(--green); }

.chapter-list .check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; }
.chapter-list .done .check { background: var(--green); border-color: var(--green); display: flex; align-items: center; justify-content: center; }
.chapter-list .done .check::after { content:'✓'; color:white; font-size:10px; }

/* ============================================================
   TAGS
============================================================ */

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text-2);
  transition: all var(--transition);
}
.tag:hover { border-color: var(--blue); color: var(--blue); background: #eff6ff; }

/* ============================================================
   SEARCH
============================================================ */

.search-bar {
  position: relative;
  max-width: 400px;
}

.search-bar input {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-family: var(--font);
  font-size: .88rem;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.search-bar input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-bar .search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

/* ============================================================
   TOOLTIPS
============================================================ */

[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   AVATAR
============================================================ */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-placeholder {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   PAGINATION
============================================================ */

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 32px;
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-2);
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   CHART PLACEHOLDER
============================================================ */

.chart-wrap { position: relative; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 16px;
}
.legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-2);
}
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============================================================
   PAGE HEADER
============================================================ */

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.page-header p { color: var(--text-3); }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--text-3);
  margin-bottom: 10px;
}

.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--border); }

/* ============================================================
   EMPTY STATE
============================================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: .5;
}

.empty-state h3 { font-size: 1.1rem; color: var(--text-2); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; }

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1024px) {
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; height: auto; }
  .exam-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 50px; }
  .main-content { padding: 20px 16px; }
  .navbar-nav { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: 1fr; }
  .modal { border-radius: var(--radius-lg); }
}

/* ============================================================
   SCROLLBAR
============================================================ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   UTILITY CLASSES
============================================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.flex-1 { flex: 1; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-sm   { font-size: .82rem; }
.text-xs   { font-size: .72rem; }
.text-lg   { font-size: 1.1rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-muted { color: var(--text-3); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: var(--shadow); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
