/* ============================================================
   LearnHub - Professional Design System
   Pastel Blue Color Palette
   ============================================================ */

/* CSS Custom Properties */
:root {
  --color-primary: #3B82F6;
  --color-primary-dark: #2563EB;
  --color-primary-light: #DBEAFE;
  --color-bg: #F0F7FF;
  --color-surface: #FFFFFF;
  --color-text: #1E3A5F;
  --color-text-muted: #64748B;
  --color-border: #BFDBFE;
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;

  --shadow-sm: 0 1px 3px rgba(59, 130, 246, 0.08);
  --shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
  --shadow-lg: 0 8px 32px rgba(59, 130, 246, 0.16);
  --shadow-card: 0 2px 12px rgba(30, 58, 95, 0.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

.text-gradient {
  background: linear-gradient(135deg, #3B82F6, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

main.main-content {
  flex: 1;
}

.page-wrapper {
  padding: 48px 0;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-title-sm {
  font-size: 1.25rem;
  font-weight: 700;
}

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

.section-cta {
  text-align: center;
  margin-top: 40px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 8px; }
.p-6 { padding: 24px; }
.p-0 { padding: 0; }
.gap-2 { gap: 8px; }

.flex { display: flex; }
.items-center { align-items: center; }
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 24px 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}

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

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
}

.btn-danger:hover {
  background: #DC2626;
  color: white;
}

.btn-white {
  background: white;
  color: var(--color-primary);
  border-color: white;
}

.btn-white:hover {
  background: #F0F7FF;
  color: var(--color-primary-dark);
}

.btn-secondary {
  background: #F1F5F9;
  color: var(--color-text);
  border-color: #F1F5F9;
}

.btn-sm { padding: 7px 14px; font-size: 0.875rem; }
.btn-xs { padding: 5px 10px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-label-link {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-primary);
}

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

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control:disabled {
  background: #F8FAFC;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.required {
  color: var(--color-error);
}

.input-password-wrap {
  position: relative;
}

.input-password-wrap .form-control {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--color-primary);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

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

.input-group-text {
  padding: 10px 14px;
  background: var(--color-primary-light);
  border: 1.5px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-weight: 600;
  color: var(--color-primary);
}

.input-group .form-control {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, #F8FBFF, white);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.card-body {
  padding: 24px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-primary { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-secondary { background: #F1F5F9; color: #475569; }
.badge-sm { font-size: 0.6875rem; padding: 3px 8px; }
.badge-level-beginner { background: #D1FAE5; color: #065F46; }
.badge-level-intermediate { background: #FEF3C7; color: #92400E; }
.badge-level-advanced { background: #FEE2E2; color: #991B1B; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid;
}

.alert-success { background: #D1FAE5; border-color: #A7F3D0; color: #065F46; }
.alert-error { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }
.alert-info { background: var(--color-primary-light); border-color: var(--color-border); color: #1E40AF; }
.alert-sm { padding: 8px 14px; font-size: 0.85rem; }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.6;
  line-height: 1;
  padding: 0;
  color: inherit;
}

.alert-close:hover { opacity: 1; }

.alert-dismissible { position: relative; }

.flash-wrapper {
  padding: 12px 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand:hover { color: var(--color-primary); }
.nav-brand span { color: var(--color-text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition);
}

.nav-dropdown-toggle:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 1001;
}

.nav-dropdown-menu-right {
  right: 0;
  left: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all var(--transition);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

.dropdown-item-danger:hover {
  background: #FEE2E2;
  color: var(--color-error);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .nav-brand {
  color: white;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-links li + li {
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  margin-top: 48px;
  font-size: 0.85rem;
  opacity: 0.5;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-bg) 0%, #EBF5FF 50%, #F0F7FF 100%);
  padding: 80px 0 64px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.avatar-stack {
  display: flex;
}

.avatar-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  margin-right: -8px;
}

.hero-visual {
  position: relative;
}

.hero-illustration {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-lg);
}

.hero-card-float {
  position: absolute;
  z-index: 10;
}

.hero-card-1 {
  top: -16px;
  right: -16px;
}

.hero-card-2 {
  bottom: -16px;
  left: -16px;
}

.hero-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.mini-card-icon {
  font-size: 1.5rem;
}

.mini-card-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
}

.mini-card-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 32px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 32px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ============================================================
   COURSE CARDS
   ============================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
  text-decoration: none;
}

.course-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-primary-light);
  overflow: hidden;
}

.course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.course-card:hover .course-card-thumb img {
  transform: scale(1.05);
}

.course-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.course-level-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.badge-beginner { background: rgba(209,250,229,0.95); color: #065F46; }
.badge-intermediate { background: rgba(254,243,199,0.95); color: #92400E; }
.badge-advanced { background: rgba(254,226,226,0.95); color: #991B1B; }

.course-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.course-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
}

.course-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.course-instructor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.instructor-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  color: white;
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructor-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

.instructor-avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.price-free { color: var(--color-success); font-weight: 800; font-size: 1.1rem; }
.price-free-lg { font-size: 2rem; color: var(--color-success); font-weight: 900; }
.price-amount { font-size: 1.1rem; font-weight: 800; color: var(--color-text); }

/* ============================================================
   STEPS / HOW IT WORKS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition);
}

.step-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  margin-top: 12px;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.testimonial-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.testimonial-stars {
  font-size: 1rem;
  margin-bottom: 16px;
}

.testimonial-text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  padding: 80px 0;
}

.cta-content {
  text-align: center;
  color: white;
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--color-bg) 0%, #EBF5FF 100%);
  padding: 60px 0;
  border-bottom: 1px solid var(--color-border);
}

.page-hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.page-hero-sub {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 32px;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-search {
  flex: 1;
  position: relative;
  min-width: 200px;
}

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

.search-input {
  padding-left: 42px;
}

.results-info {
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   COURSE DETAIL PAGE  (cd- prefix)
   ============================================================ */

/* Hero band */
.cd-hero {
  background: linear-gradient(135deg, #1E3A5F 0%, #1D4ED8 100%);
  padding: 52px 0 48px;
  color: white;
}

.cd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 18px;
}
.cd-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; }
.cd-breadcrumb a:hover { color: white; }

.cd-category {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 99px;
  letter-spacing: .04em;
  margin-bottom: 14px;
}

.cd-title {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0 0 14px;
  line-height: 1.25;
  max-width: 680px;
}

.cd-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 620px;
}

.cd-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .875rem;
  color: rgba(255,255,255,.8);
}
.cd-meta strong { color: white; }

/* ── 2-column page layout ── */
.cd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
  padding: 40px 0 64px;
}

/* ── Left content column ── */
.cd-content { min-width: 0; }

.cd-section {
  background: white;
  border: 1px solid #E8F0FE;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}

.cd-section:last-child { margin-bottom: 0; }

.cd-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cd-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0 0 18px;
}

.cd-section-meta {
  font-size: .82rem;
  color: #94A3B8;
}

/* What you'll learn */
.cd-learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.cd-learn-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: #374151;
  line-height: 1.5;
}

.cd-check {
  color: #10B981;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Requirements */
.cd-req-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cd-req-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: #64748B;
  padding: 5px 0;
}

.cd-req-list li::before {
  content: '•';
  color: #3B82F6;
  font-weight: 700;
  flex-shrink: 0;
}

/* Instructor */
.cd-instructor-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cd-instructor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border: 2px solid #BFDBFE;
}

.cd-instructor-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 4px;
}

.cd-instructor-role {
  font-size: .85rem;
  color: #64748B;
}

/* ── Right sticky sidebar ── */
.cd-sidebar {
  position: sticky;
  top: 80px;
}

.cd-sidebar-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #E8F0FE;
  box-shadow: 0 4px 24px rgba(59,130,246,.1);
  overflow: hidden;
}

.cd-sidebar-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.cd-sidebar-body {
  padding: 22px;
}

.cd-price {
  font-size: 2rem;
  font-weight: 900;
  color: #1E3A5F;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}

.cd-cta {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .95rem;
  padding: .75rem 1rem;
}

.cd-guarantee {
  font-size: .75rem;
  color: #94A3B8;
  text-align: center;
  margin: 8px 0 0;
}

.cd-enrolled-tag {
  color: #10B981;
  font-size: .82rem;
  text-align: center;
  margin: 8px 0 0;
  font-weight: 600;
}

.cd-features {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  border-top: 1px solid #F1F5FF;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cd-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  color: #64748B;
}

.cd-features li span {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.cd-preview-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  font-size: .78rem;
  color: #065F46;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .cd-layout {
    grid-template-columns: 1fr;
    padding: 24px 0 48px;
    gap: 24px;
  }
  .cd-sidebar {
    position: static;
    order: -1;
  }
  .cd-title { font-size: 1.6rem; }
  .cd-learn-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 20px;
  text-decoration: none;
}

.auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  margin-bottom: 6px;
}

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

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 32px;
  color: white;
}

.welcome-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.welcome-title {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 4px;
}

.welcome-sub {
  opacity: 0.8;
  font-size: 0.9rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.dashboard-section {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrap {
  margin: 12px 0;
}

.progress-bar-track {
  height: 8px;
  background: var(--color-primary-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #7C3AED);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-bar-green {
  background: linear-gradient(90deg, var(--color-success), #059669);
}

.progress-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ============================================================
   MY COURSES
   ============================================================ */
.my-courses-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.my-course-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow var(--transition);
}

.my-course-item:hover {
  box-shadow: var(--shadow);
}

.my-course-thumb {
  width: 120px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-primary-light);
}

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

.my-course-info {
  flex: 1;
}

.my-course-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.my-course-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.my-course-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.completion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-success);
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: 6px;
}

/* ============================================================
   PROFILE
   ============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-avatar-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  color: white;
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.profile-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.profile-role {
  margin-bottom: 10px;
}

.profile-joined {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.profile-nav {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition);
}

.profile-nav-link:last-child { border-bottom: none; }

.profile-nav-link:hover,
.profile-nav-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

/* ============================================================
   LEARNING ROOM
   ============================================================ */
.learn-room {
  display: flex;
  height: calc(100vh - 68px);
  overflow: hidden;
}

.learn-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.learn-sidebar-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--color-border);
}

.learn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.learn-back:hover { color: var(--color-primary); }

.learn-course-title {
  font-weight: 800;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.learn-progress-bar-wrap {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.learn-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

.learn-progress-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.lesson-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.lesson-item {
  border-radius: var(--radius);
  margin-bottom: 2px;
  overflow: hidden;
}

.lesson-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition);
}

.lesson-item-inner:hover {
  background: var(--color-primary-light);
  text-decoration: none;
}

.lesson-item-active .lesson-item-inner {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
}

.lesson-item-inner-disabled {
  color: var(--color-text-muted);
  cursor: default;
}

.lesson-num-wrap {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-playing {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-name {
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-duration {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Learn Main */
.learn-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.learn-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.learn-sidebar-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
}

.learn-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.video-wrap {
  background: #000;
  flex-shrink: 0;
}

.video-container {
  position: relative;
  aspect-ratio: 16/9;
  max-height: 480px;
  margin: 0 auto;
  width: 100%;
}

.video-iframe {
  width: 100%;
  height: 100%;
  max-height: 480px;
  display: block;
}

.learn-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

.learn-content-header {
  margin-bottom: 24px;
}

.learn-lesson-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.learn-lesson-desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.learn-lesson-content {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.learn-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  gap: 16px;
}

.learn-nav-left, .learn-nav-right {
  flex: 1;
}

.learn-nav-right { text-align: right; }

.learn-nav-center {
  flex-shrink: 0;
}

.completed-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-success);
  font-weight: 700;
  font-size: 0.9375rem;
}

.course-completed-badge {
  background: #D1FAE5;
  color: #065F46;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* ============================================================
   PAYMENT PAGES
   ============================================================ */
.payment-result-card {
  max-width: 520px;
  margin: 80px auto;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.payment-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.payment-icon-success { background: var(--color-success); }
.payment-icon-cancel { background: var(--color-error); }

.payment-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.payment-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.payment-detail-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.payment-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.payment-detail-row:last-child { border-bottom: none; }

.payment-detail-label { color: var(--color-text-muted); }
.payment-detail-value { font-weight: 600; }

.payment-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-body {
  display: flex;
  min-height: 100vh;
  background: #F8FAFC;
}

.admin-sidebar {
  width: 260px;
  background: var(--color-text);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 100;
}

.admin-sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-header .nav-brand {
  color: white;
}

.admin-nav {
  padding: 16px 0;
}

.admin-nav-section {
  margin-bottom: 8px;
}

.admin-nav-label {
  display: block;
  padding: 8px 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  text-decoration: none;
}

.admin-nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  text-decoration: none;
}

.admin-nav-link.active {
  background: rgba(59, 130, 246, 0.25);
  color: #93C5FD;
  border-left: 3px solid var(--color-primary);
}

.admin-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-sidebar-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  display: flex;
  color: var(--color-text-muted);
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.admin-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
}

.admin-content {
  padding: 32px;
  flex: 1;
}

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-page-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-page-sub {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.admin-breadcrumb {
  display: inline-block;
  color: var(--color-primary);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

/* Admin Stats */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

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

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
}

.admin-stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.admin-stat-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.admin-quick-actions {
  display: flex;
  gap: 12px;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

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

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: #F8FAFC;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

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

.table tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: #F8FBFF; }

.table-course-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.table-course-title {
  font-weight: 600;
}

.table-course-slug,
.table-lesson-title {
  font-weight: 600;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.about-heading {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 28px 0 12px;
}

.about-heading:first-child { margin-top: 0; }

.about-text {
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.about-feature-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.about-feature h3 {
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.about-feature p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.about-stats-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.about-stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.about-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
}

.about-stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

.contact-heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-item-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: 0.9375rem;
  font-weight: 600;
}

.contact-social h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-link {
  padding: 6px 14px;
  background: var(--color-primary-light);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
}

.social-link:hover {
  background: var(--color-primary);
  color: white;
}

/* ============================================================
   FAQ PAGE
   ============================================================ */
.faq-container {
  max-width: 780px;
}

.faq-section {
  margin-bottom: 40px;
}

.faq-category {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
  background: white;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: background var(--transition);
}

.faq-question:hover { background: var(--color-bg); }

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--color-text-muted);
}

.faq-item.faq-open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.faq-open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 20px 18px;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.faq-cta {
  text-align: center;
  padding: 32px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-top: 32px;
}

.faq-cta p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-container {
  max-width: 780px;
}

.legal-content h2 {
  font-size: 1.2rem;
  margin: 28px 0 10px;
  color: var(--color-text);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p, .legal-content li {
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content a {
  color: var(--color-primary);
}

.pdpa-notice {
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  margin-bottom: 28px;
}

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
  padding: 48px;
}

.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-primary-light);
  line-height: 1;
  margin-bottom: 8px;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 400px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* ============================================================
   COURSE CARD ENROLLED
   ============================================================ */
.course-card-enrolled {
  border: 1px solid var(--color-border);
  text-decoration: none;
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */
@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .course-hero-layout {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
    order: -1;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-stats-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .about-stat-card {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: var(--shadow);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .navbar {
    position: relative;
  }

  .navbar-inner {
    flex-wrap: wrap;
    position: relative;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .stats-grid {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stat-divider {
    display: none;
  }

  .stat-item {
    width: 50%;
    flex: none;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-content {
    padding: 20px;
  }

  .learn-room {
    flex-direction: column;
    height: auto;
  }

  .learn-sidebar {
    width: 100%;
    height: auto;
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .my-course-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .my-course-thumb {
    width: 100%;
    height: 160px;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .section { padding: 40px 0; }
  .hero { padding: 48px 0 40px; }

  .learn-nav {
    flex-direction: column;
    text-align: center;
  }

  .learn-nav-left, .learn-nav-right {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .page-hero-title {
    font-size: 1.75rem;
  }

  .payment-result-card {
    margin: 32px auto;
    padding: 32px 24px;
  }
}

/* ============================================================
   ADDITIONAL COMPONENTS
   ============================================================ */

/* Stats cards grid (admin dashboard) */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

/* ── Lesson list (public course show page) ── */
.lesson-list-public {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}

.lesson-list-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: .75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #F1F5FF;
  background: white;
  transition: background .15s;
}

.lesson-list-item:last-child {
  border-bottom: none;
}

/* clickable rows */
.lesson-list-item--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}

.lesson-list-item--link:hover {
  background: #EFF6FF;
  border-left-color: var(--color-primary);
}

.lesson-list-item--link:hover .lesson-title {
  color: var(--color-primary);
}

/* locked rows */
.lesson-list-item--locked {
  border-left: 3px solid transparent;
  opacity: .7;
  cursor: not-allowed;
  background: #FAFCFF;
}

/* lesson number bubble */
.lesson-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #3B82F6;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid #BFDBFE;
}

.lesson-list-item--locked .lesson-num {
  background: #F1F5F9;
  color: #94A3B8;
  border-color: #E2E8F0;
}

/* text block */
.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-title {
  font-weight: 600;
  color: #1E3A5F;
  font-size: .875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}

.lesson-desc {
  font-size: .775rem;
  color: #94A3B8;
  margin-top: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* right meta block */
.lesson-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.lesson-duration {
  font-size: .775rem;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
}

/* Search filter bar (courses index) */
.search-filter-bar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
}

