/* =========================================
   ENLIGHT - Member Learning Portal CSS
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
  --navy-deep: #0d1b35;
  --navy: #152444;
  --navy-mid: #1c3060;
  --gold: #c9a84c;
  --gold-light: #e2c06a;
  --gold-dark: #a07c30;
  --white: #ffffff;
  --sidebar-bg: #0d1b35;
  --sidebar-w: 280px;
  --content-bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'Inter', sans-serif; background: var(--content-bg); color: var(--text); }

/* ---- AUTH PAGE ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 30%, rgba(201,168,76,0.08) 0%, transparent 70%);
}

.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  width: min(460px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo img { height: 64px; }

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  text-align: center;
  color: var(--navy-deep);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.auth-form .form-group { margin-bottom: 1.25rem; }

.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.auth-form input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.auth-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }

.auth-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}
.auth-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.82rem; color: var(--text-muted); }
.auth-footer a { color: var(--gold-dark); text-decoration: none; font-weight: 600; }

/* ---- PORTAL LAYOUT ---- */
.portal-wrapper { display: flex; min-height: 100vh; }

.portal-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.portal-logo-wrap {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.portal-logo-wrap img { height: 42px; width: auto; display: block; }

.portal-user-card {
  margin: 1rem;
  padding: 1rem;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
}

.portal-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.portal-user-role {
  font-size: 0.72rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.portal-nav { flex: 1; padding: 0.5rem 0; }

.portal-nav-section {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.portal-nav-link:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.portal-nav-link.active { background: rgba(201,168,76,0.12); color: var(--gold-light); border-left-color: var(--gold); }
.portal-nav-link .icon { font-size: 1rem; width: 20px; text-align: center; }

.portal-nav-link .prog-badge {
  margin-left: auto;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
}

.portal-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.portal-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.portal-logout-btn:hover { background: rgba(239,68,68,0.2); }

/* ---- PORTAL MAIN ---- */
.portal-main { margin-left: var(--sidebar-w); flex: 1; }

.portal-topbar {
  background: var(--card-bg);
  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: 100;
  box-shadow: var(--shadow);
}

.portal-page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.portal-content { padding: 2rem; }

.portal-page { display: none; }
.portal-page.active { display: block; }

/* ---- WELCOME BANNER ---- */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: '🎓';
  position: absolute;
  right: 2rem;
  bottom: 0;
  font-size: 6rem;
  opacity: 0.08;
  line-height: 1;
}

.welcome-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.welcome-sub { font-size: 0.875rem; color: rgba(255,255,255,0.65); margin-bottom: 1.25rem; }

.welcome-stats {
  display: flex;
  gap: 2rem;
}

.welcome-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-light);
}

.welcome-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* ---- COURSE CARDS ---- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

.course-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  color: inherit;
}

.course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.course-card-header {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  padding: 1.5rem;
  position: relative;
}

.course-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.course-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.course-card-abbr { font-size: 0.75rem; color: var(--gold-light); font-weight: 600; }

.course-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
}

.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}

.course-card-body { padding: 1.25rem; }

.course-meta { display: flex; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.course-progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-progress-pct {
  font-weight: 700;
  color: var(--gold-dark);
}

.course-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.course-cta .link-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- COURSE VIEWER ---- */
.course-viewer { display: none; }
.course-viewer.active { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; }

.lesson-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: calc(100vh - 120px);
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
}

.lesson-sidebar-header {
  padding: 1rem;
  background: var(--navy-deep);
  color: var(--white);
}

.lesson-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lesson-sidebar-body { flex: 1; overflow-y: auto; }

.lesson-module { border-bottom: 1px solid var(--border); }

.lesson-module-header {
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: var(--transition);
}

.lesson-item:hover { background: rgba(201,168,76,0.06); }
.lesson-item.active { background: rgba(201,168,76,0.1); color: var(--gold-dark); font-weight: 600; }
.lesson-item.completed { color: var(--text-muted); }

.lesson-status-icon { flex-shrink: 0; font-size: 0.85rem; }

.lesson-main {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.lesson-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.lesson-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--navy-deep);
  margin-bottom: 0.25rem;
}

.lesson-subtitle { font-size: 0.82rem; color: var(--text-muted); }

.lesson-body { padding: 2rem; min-height: 400px; line-height: 1.8; }

.lesson-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy-deep);
  margin: 1.5rem 0 0.75rem;
}

.lesson-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.25rem 0 0.5rem;
}

.lesson-body p { margin-bottom: 1rem; color: var(--text-muted); }

.lesson-body ul, .lesson-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.lesson-body li { margin-bottom: 0.4rem; }

.lesson-body .key-point {
  background: linear-gradient(135deg, rgba(13,27,53,0.04), rgba(13,27,53,0.02));
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.lesson-body .definition {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.lesson-body .definition strong { color: var(--navy-deep); display: block; margin-bottom: 0.25rem; }

.lesson-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
}

.lesson-nav-btn:hover { border-color: var(--gold); color: var(--gold-dark); }

.lesson-nav-btn.primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* ---- AI CHAT TUTOR ---- */
.ai-tutor-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  color: var(--gold-light);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,27,53,0.3);
  transition: var(--transition);
}

.ai-tutor-toggle:hover { transform: scale(1.08); }

.ai-tutor-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: 900;
  width: 360px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  height: 480px;
}

.ai-tutor-panel.open { display: flex; }

.ai-tutor-header {
  background: var(--navy-deep);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-tutor-avatar {
  width: 36px; height: 36px;
  background: rgba(201,168,76,0.2);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ai-tutor-title { color: var(--white); font-weight: 700; font-size: 0.9rem; }
.ai-tutor-sub { color: rgba(255,255,255,0.5); font-size: 0.72rem; }

.ai-tutor-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.2rem;
  cursor: pointer;
}

.ai-tutor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.6;
}

.chat-msg.bot {
  background: rgba(13,27,53,0.06);
  border-radius: 4px 12px 12px 12px;
  align-self: flex-start;
}

.chat-msg.user {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border-radius: 12px 12px 4px 12px;
  align-self: flex-end;
  font-weight: 500;
}

.ai-tutor-input-wrap {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

.ai-tutor-input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.83rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.ai-tutor-input:focus { border-color: var(--gold); }

.ai-tutor-send {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- EXAM ---- */
.exam-fullscreen {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.exam-fullscreen.active { display: flex; }

.exam-header {
  background: var(--navy-deep);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.exam-title { color: var(--white); font-weight: 700; font-size: 0.95rem; }
.exam-subtitle { color: rgba(255,255,255,0.6); font-size: 0.78rem; }

.exam-timer {
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold-light);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.05em;
}

.exam-timer.danger { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #fca5a5; }

.exam-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.exam-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.exam-body { flex: 1; overflow-y: auto; padding: 2.5rem; display: flex; gap: 2rem; }

.exam-questions-wrap { flex: 1; max-width: 760px; margin: 0 auto; }

.exam-question-counter {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.exam-question-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--navy-deep);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.exam-options { display: flex; flex-direction: column; gap: 0.75rem; }

.exam-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.exam-option:hover { border-color: var(--gold); background: rgba(201,168,76,0.04); }
.exam-option.selected { border-color: var(--gold); background: rgba(201,168,76,0.08); }

.exam-option-letter {
  width: 30px; height: 30px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
}

.exam-option.selected .exam-option-letter {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}

.exam-option-text { font-size: 0.92rem; line-height: 1.6; padding-top: 0.2rem; }

.exam-question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.exam-nav-btn {
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exam-nav-btn:hover { border-color: var(--gold); }

.exam-nav-btn.submit-btn {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border-color: var(--gold);
}

.exam-q-map {
  width: 200px;
  flex-shrink: 0;
}

.exam-q-map-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.exam-q-dots { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.exam-q-dot {
  width: 28px; height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.exam-q-dot.answered { background: rgba(201,168,76,0.15); border-color: var(--gold); color: var(--gold-dark); }
.exam-q-dot.current { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }

/* ---- WARNING OVERLAY ---- */
.tab-warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(239,68,68,0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}
.tab-warning-overlay.show { display: flex; }

.tab-warning-icon { font-size: 4rem; margin-bottom: 1rem; }
.tab-warning-title { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.tab-warning-text { font-size: 1rem; opacity: 0.85; margin-bottom: 2rem; max-width: 480px; line-height: 1.7; }

.tab-warning-btn {
  background: var(--white);
  color: #dc2626;
  padding: 0.85rem 2.5rem;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

/* ---- RESULTS ---- */
.exam-result-page {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.exam-result-page.show { display: flex; }

.result-card {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  max-width: 580px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

.result-icon { font-size: 4rem; margin-bottom: 1rem; }

.result-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--navy-deep);
  margin-bottom: 0.5rem;
}

.result-subtitle { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 2rem; }

.result-score-wrap {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.result-score {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}

.result-score-label { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-top: 0.5rem; }

.result-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-break-item { text-align: center; }
.result-break-num { font-size: 1.5rem; font-weight: 800; color: var(--navy-deep); }
.result-break-label { font-size: 0.75rem; color: var(--text-muted); }

.result-message {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: left;
}

.result-message.pass { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #15803d; }
.result-message.fail { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #dc2626; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .portal-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .portal-sidebar.open { transform: none; }
  .portal-main { margin-left: 0; }
  .course-viewer.active { grid-template-columns: 1fr; }
  .lesson-sidebar { height: auto; position: static; }
  .exam-body { flex-direction: column; }
  .exam-q-map { display: none; }
  .ai-tutor-panel { width: calc(100vw - 2rem); right: 1rem; }
}
