/* ============================================================
   JOEGOL ACADEMY — Design System v2.0
   Soft, modern, Udemy-inspired light theme
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-gray);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Brand */
  --orange:        #E8440A;
  --orange-hover:  #c93a08;
  --orange-light:  #FF6B35;
  --orange-50:     #fff3ef;
  --orange-100:    #ffddd4;
  --orange-200:    #ffc1ad;

  /* Grays */
  --white:    #ffffff;
  --bg-gray:  #f7f9fa;
  --bg-card:  #ffffff;
  --gray-50:  #f7f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8e9eb;
  --gray-300: #d1d7dc;
  --gray-400: #9aa0a6;
  --gray-500: #6a6f73;
  --gray-700: #3d3d3d;
  --gray-900: #1c1d1f;

  /* Text */
  --text-primary:   #1c1d1f;
  --text-secondary: #6a6f73;
  --text-muted:     #9aa0a6;

  /* Status */
  --green:       #1cad59;
  --green-light: #ecfdf5;
  --blue:        #3b82f6;
  --blue-light:  #eff6ff;
  --purple:      #7c3aed;
  --purple-light:#f5f3ff;
  --yellow:      #f59e0b;
  --yellow-light:#fffbeb;
  --red:         #ef4444;
  --red-light:   #fef2f2;

  /* Roles */
  --role-admin:       #E8440A;
  --role-enseignant:  #7c3aed;
  --role-moderateur:  #0891b2;
  --role-superviseur: #059669;
  --role-surveillant: #d97706;
  --role-etudiant:    #6a6f73;

  /* Layout */
  --header-h:     64px;
  --sidebar-w:    240px;
  --container:    1280px;
  --container-sm: 960px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --shadow-xl: 0 8px 40px rgba(0,0,0,.14);

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur:  200ms;
}

/* ── Container ────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 24px; }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.15; color: var(--text-primary); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);    font-weight: 700; line-height: 1.2;  color: var(--text-primary); }
h3 { font-size: 1.2rem;  font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h4 { font-size: 1rem;    font-weight: 600; color: var(--text-primary); }
p  { color: var(--text-secondary); line-height: 1.65; }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text-muted) !important; }
.text-small  { font-size: 0.8125rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,68,10,.3); }

.btn-secondary {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}
.btn-secondary:hover { background: #333; border-color: #333; }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-outline:hover { background: var(--orange); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-white {
  background: #fff;
  color: var(--text-primary);
  border-color: #fff;
}
.btn-white:hover { background: var(--gray-100); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }

.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-xl { padding: 16px 36px; font-size: 1.0625rem; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── Badges / Pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-orange  { background: var(--orange-50);  color: var(--orange); }
.badge-green   { background: var(--green-light); color: #059669; }
.badge-blue    { background: var(--blue-light);  color: #2563eb; }
.badge-purple  { background: var(--purple-light);color: var(--purple); }
.badge-gray    { background: var(--gray-100);    color: var(--gray-500); }
.badge-yellow  { background: var(--yellow-light);color: #92400e; }
.badge-red     { background: var(--red-light);   color: #b91c1c; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.role-admin       { background: rgba(232,68,10,.1);  color: var(--role-admin); }
.role-enseignant  { background: rgba(124,58,237,.1); color: var(--role-enseignant); }
.role-moderateur  { background: rgba(8,145,178,.1);  color: var(--role-moderateur); }
.role-superviseur { background: rgba(5,150,105,.1);  color: var(--role-superviseur); }
.role-surveillant { background: rgba(217,119,6,.1);  color: var(--role-surveillant); }
.role-etudiant    { background: var(--gray-100);     color: var(--role-etudiant); }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.form-label .required { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--dur), box-shadow var(--dur);
  outline: none;
}
.form-control:focus  { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-100); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.is-error { border-color: var(--red); }
.form-control.is-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.1); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' fill='none' stroke='%236a6f73' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

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

.input-group { position: relative; display: flex; align-items: center; }
.input-group .form-control { padding-left: 40px; }
.input-group .input-icon { position: absolute; left: 12px; color: var(--gray-400); pointer-events: none; }
.input-group .input-suffix { position: absolute; right: 12px; color: var(--gray-400); }

/* Checkbox & Radio */
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input[type=checkbox],
.form-check input[type=radio] {
  width: 18px; height: 18px;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label { font-size: 0.9rem; color: var(--text-secondary); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-body    { padding: 24px; }
.card-header  { padding: 16px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.card-footer  { padding: 14px 24px; border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.card-title   { font-size: 1rem; font-weight: 700; color: var(--text-primary); }

/* ── Course Cards ─────────────────────────────────────────── */
.course-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}
.course-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gray-100);
}
.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.course-card:hover .course-thumb img { transform: scale(1.04); }
.course-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f3f4, #e8e9eb);
}
.course-badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-sm);
}
.course-badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-sm);
}
.course-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur);
}
.course-card:hover .course-play-overlay { opacity: 1; }
.course-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.course-body { padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.course-category { font-size: 0.75rem; font-weight: 600; color: var(--orange); text-transform: uppercase; letter-spacing: .3px; }
.course-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-instructor { font-size: 0.8125rem; color: var(--text-muted); }
.course-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.course-rating { display: flex; align-items: center; gap: 4px; color: var(--yellow); font-weight: 700; font-size: 0.875rem; }
.course-rating span { color: var(--text-muted); font-weight: 400; }

.course-progress-wrap { margin-top: auto; }
.course-progress-bar {
  height: 5px;
  background: var(--gray-200);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 4px;
}
.course-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: var(--r-full);
  transition: width 600ms var(--ease);
}
.course-progress-label { font-size: 0.75rem; color: var(--text-muted); }

.course-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.course-price      { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.course-price-old  { font-size: 0.875rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.course-price-free { color: var(--green); font-weight: 700; }

/* Course grid layouts */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.courses-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.courses-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Header / Topbar ──────────────────────────────────────── */
#app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.header-logo img { height: 36px; width: auto; }
.header-logo-text {
  display: none;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: -.5px;
}
.header-logo-sub { font-size: 0.6rem; font-weight: 600; color: var(--gray-400); letter-spacing: 2px; text-transform: uppercase; display: block; margin-top: -2px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.header-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur);
  white-space: nowrap;
}
.header-nav-link:hover, .header-nav-link.active { background: var(--gray-100); color: var(--text-primary); }
.header-nav-link.active { font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* Notification bell */
.notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: all var(--dur);
}
.notif-btn:hover { background: var(--gray-100); color: var(--text-primary); }
.notif-count {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  background: var(--orange);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* User menu */
.user-menu-wrap { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--r-full);
  transition: background var(--dur);
  cursor: pointer;
}
.user-btn:hover { background: var(--gray-100); }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-btn-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn-chevron { color: var(--text-muted); transition: transform var(--dur); }
.user-btn.open .user-btn-chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  transition: opacity var(--dur), transform var(--dur);
  pointer-events: none;
  z-index: 200;
}
.user-dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.user-dropdown-header { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); }
.user-dropdown-name   { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.user-dropdown-email  { font-size: 0.775rem; color: var(--text-muted); margin-top: 2px; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background var(--dur);
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--text-primary); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* Mobile hamburger */
.ham-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--r-md);
  transition: background var(--dur);
}
.ham-btn:hover { background: var(--gray-100); }
.ham-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--dur);
}
.ham-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; }
.ham-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Drawer ────────────────────────────────────────── */
#mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}
#mobile-drawer.open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity 300ms;
}
#mobile-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  box-shadow: var(--shadow-xl);
  transform: translateX(-100%);
  transition: transform 300ms var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
#mobile-drawer.open .drawer-panel { transform: none; }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--dur);
}
.drawer-close:hover { background: var(--gray-100); }
.drawer-nav { padding: 12px 12px; flex: 1; }
.drawer-section { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 12px 8px 6px; }
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--dur);
  font-weight: 500;
}
.drawer-link:hover, .drawer-link.active { background: var(--orange-50); color: var(--orange); }
.drawer-link.active { font-weight: 600; }
.drawer-footer { padding: 16px; border-top: 1px solid var(--gray-200); }
.drawer-user { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.drawer-user-info { flex: 1; min-width: 0; }
.drawer-user-name  { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.drawer-user-role  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Page Layout ──────────────────────────────────────────── */
#app-wrap { min-height: 100vh; display: flex; flex-direction: column; }
#app-main  { flex: 1; }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 96px 0; }
.section-white { background: #fff; }
.section-gray  { background: var(--gray-50); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-bottom: 10px;
}
.section-title    { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: var(--text-primary); margin-bottom: 12px; }
.section-subtitle { font-size: 1.0625rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--text-primary) 0%, #2a1a30 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(232,68,10,.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(124,58,237,.15) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(232,68,10,.2); border: 1px solid rgba(232,68,10,.3); color: #ff9472; padding: 5px 14px; border-radius: var(--r-full); font-size: 0.8125rem; font-weight: 600; margin-bottom: 20px; }
.hero-title   { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 18px; }
.hero-title em { color: var(--orange); font-style: normal; }
.hero-desc    { font-size: 1.125rem; color: rgba(255,255,255,.7); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats   { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat-num { font-size: 1.75rem; font-weight: 900; color: #fff; }
.hero-stat-lbl { font-size: 0.8rem; color: rgba(255,255,255,.55); margin-top: 2px; }

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 24px 0; }
.stats-bar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stats-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid var(--gray-200);
}
.stats-bar-item:last-child { border-right: none; }
.stats-bar-num { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); }
.stats-bar-lbl { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }

/* ── Feature Grid ─────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  padding: 28px 24px;
  background: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--gray-200);
  transition: all var(--dur);
}
.feature-card:hover { border-color: var(--orange-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--orange-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--orange);
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 0.875rem; line-height: 1.6; }

/* ── Testimonials ─────────────────────────────────────────── */
.testi-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.testi-stars { color: var(--yellow); letter-spacing: 2px; font-size: 0.9rem; }
.testi-text  { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }
.testi-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.testi-name   { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.testi-role   { font-size: 0.775rem; color: var(--text-muted); }

/* ── Payment Logos ────────────────────────────────────────── */
.payment-logos { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; align-items: center; }
.payment-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  transition: all var(--dur);
  min-width: 90px;
}
.payment-logo-item:hover { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-100); }
.payment-logo-item img { height: 28px; width: auto; object-fit: contain; }
.payment-logo-item span { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }

/* ── Steps ────────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.step-card { text-align: center; position: relative; }
.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 2;
}
.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  background: var(--gray-200);
  z-index: 1;
}
.step-card h3 { font-size: 0.9375rem; margin-bottom: 8px; }
.step-card p  { font-size: 0.8125rem; }

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
  padding: 64px 0;
  text-align: center;
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 28px; font-size: 1.0625rem; }

/* ── Dashboard Layout ─────────────────────────────────────── */
.dash-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.dash-sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--gray-200);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-main { flex: 1; min-width: 0; padding: 32px; background: var(--gray-50); }
.dash-sidebar-section { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 14px 8px 6px; }
.dash-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur);
}
.dash-sidebar-link:hover { background: var(--gray-100); color: var(--text-primary); }
.dash-sidebar-link.active { background: var(--orange-50); color: var(--orange); font-weight: 600; }
.dash-sidebar-link .badge { margin-left: auto; }

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--gray-900);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-main { flex: 1; min-width: 0; padding: 32px; background: var(--gray-50); }
.admin-sidebar-section { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.3); padding: 14px 10px 5px; }
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 0.8375rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  transition: all var(--dur);
}
.admin-sidebar-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.admin-sidebar-link.active { background: var(--orange); color: #fff; }
.admin-sidebar-link .badge { margin-left: auto; font-size: 0.65rem; }

/* ── Stat Cards (Dashboard) ───────────────────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-orange { background: var(--orange-50);  color: var(--orange); }
.stat-icon-green  { background: var(--green-light); color: var(--green); }
.stat-icon-blue   { background: var(--blue-light);  color: var(--blue); }
.stat-icon-purple { background: var(--purple-light);color: var(--purple); }
.stat-icon-yellow { background: var(--yellow-light);color: var(--yellow); }
.stat-num   { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.8125rem; color: var(--text-muted); }
.stat-trend { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }
.stat-trend.up   { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--gray-200); background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  background: var(--gray-50);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--gray-50); }

/* ── Progress bars ────────────────────────────────────────── */
.progress { height: 8px; background: var(--gray-200); border-radius: var(--r-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); border-radius: var(--r-full); transition: width 600ms var(--ease); }
.progress-fill.green  { background: var(--green); }
.progress-fill.blue   { background: var(--blue); }
.progress-fill.purple { background: var(--purple); }

/* ── Alerts / Flash ───────────────────────────────────────── */
.alert {
  padding: 14px 16px;
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  border-width: 1px;
  border-style: solid;
}
.alert-success { background: var(--green-light);  border-color: #a7f3d0; color: #065f46; }
.alert-error   { background: var(--red-light);    border-color: #fecaca; color: #991b1b; }
.alert-info    { background: var(--blue-light);   border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: var(--yellow-light); border-color: #fde68a; color: #92400e; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); gap: 0; }
.tab-item {
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--dur);
  white-space: nowrap;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--orange); border-bottom-color: var(--orange); }

/* Category tabs (Udemy-style) */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tab {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-300);
  color: var(--text-secondary);
  background: #fff;
  cursor: pointer;
  transition: all var(--dur);
}
.cat-tab:hover { border-color: var(--orange); color: var(--orange); }
.cat-tab.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.96) translateY(8px);
  transition: transform var(--dur);
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title  { font-size: 1.0625rem; font-weight: 700; }
.modal-close  { width: 30px; height: 30px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all var(--dur); }
.modal-close:hover { background: var(--gray-100); color: var(--text-primary); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 24px;
}
.auth-card {
  background: #fff;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  width: 100%;
  max-width: 440px;
  padding: 40px;
}
.auth-logo    { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 44px; margin: 0 auto 8px; }
.auth-title   { text-align: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 28px; }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200); }
.auth-divider span { position: relative; background: #fff; padding: 0 12px; font-size: 0.8rem; color: var(--text-muted); }
.auth-link { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }
.auth-link a { color: var(--orange); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--orange); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-300); }

/* ── Empty States ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state-icon { color: var(--gray-300); margin: 0 auto 20px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p  { font-size: 0.9rem; color: var(--text-muted); max-width: 360px; margin: 0 auto 24px; }

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 24px 0;
  margin-bottom: 32px;
}
.page-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 1.5rem; margin-bottom: 4px; }
.page-header p  { font-size: 0.875rem; color: var(--text-muted); margin: 0; }

/* ── Course Lesson Player ─────────────────────────────────── */
.player-layout  { display: flex; min-height: calc(100vh - var(--header-h)); }
.player-video   { flex: 1; background: #000; position: relative; }
.player-sidebar {
  width: 360px;
  flex-shrink: 0;
  background: #fff;
  border-left: 1px solid var(--gray-200);
  overflow-y: auto;
  max-height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
}
.player-sidebar-header { padding: 16px; border-bottom: 1px solid var(--gray-200); font-weight: 700; font-size: 0.9375rem; }
.lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--dur);
}
.lesson-item:hover { background: var(--gray-50); }
.lesson-item.active { background: var(--orange-50); border-left: 3px solid var(--orange); }
.lesson-item.done   { color: var(--text-muted); }
.lesson-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson-item.done .lesson-check { background: var(--green); border-color: var(--green); color: #fff; }
.lesson-title { font-size: 0.8375rem; font-weight: 500; flex: 1; color: var(--text-primary); }
.lesson-dur   { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }

/* ── Quiz ─────────────────────────────────────────────────── */
.quiz-wrap { max-width: 720px; margin: 0 auto; padding: 32px 24px; }
.quiz-card { background: #fff; border-radius: var(--r-xl); border: 1px solid var(--gray-200); overflow: hidden; }
.quiz-progress { height: 4px; background: var(--gray-200); }
.quiz-progress-fill { height: 100%; background: var(--orange); transition: width 400ms var(--ease); }
.quiz-body   { padding: 32px; }
.quiz-num    { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; }
.quiz-q      { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 24px; line-height: 1.4; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur);
  margin-bottom: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.quiz-option:hover { border-color: var(--orange); background: var(--orange-50); color: var(--orange); }
.quiz-option.selected { border-color: var(--orange); background: var(--orange-50); color: var(--orange); font-weight: 600; }
.quiz-option.correct  { border-color: var(--green); background: var(--green-light); color: #065f46; }
.quiz-option.wrong    { border-color: var(--red); background: var(--red-light); color: #991b1b; }
.quiz-option-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--gray-300); flex-shrink: 0; transition: all var(--dur); display: flex; align-items: center; justify-content: center; }
.quiz-option.selected .quiz-option-radio { border-color: var(--orange); background: var(--orange); }
.quiz-option.correct  .quiz-option-radio { border-color: var(--green);  background: var(--green); }
.quiz-option.wrong    .quiz-option-radio { border-color: var(--red);    background: var(--red); }
.quiz-footer { padding: 20px 32px; border-top: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.quiz-timer  { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.quiz-timer.warn  { color: var(--yellow); }
.quiz-timer.crit  { color: var(--red);    }

/* Score circle */
.score-circle-wrap { display: flex; flex-direction: column; align-items: center; padding: 32px; }
.score-circle { width: 140px; height: 140px; position: relative; margin-bottom: 16px; }
.score-circle svg { transform: rotate(-90deg); }
.score-circle-bg   { fill: none; stroke: var(--gray-200); stroke-width: 10; }
.score-circle-fill { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 800ms var(--ease); }
.score-circle-fill.pass { stroke: var(--green); }
.score-circle-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-pct  { font-size: 1.75rem; font-weight: 900; color: var(--text-primary); }
.score-lbl  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Certificate ──────────────────────────────────────────── */
.cert-preview {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.cert-header-band { background: linear-gradient(135deg, var(--orange), var(--orange-light)); padding: 32px 40px; text-align: center; color: #fff; }
.cert-body        { padding: 40px; text-align: center; }
.cert-seal        { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 8px 24px rgba(232,68,10,.3); }
.cert-student     { font-size: 2rem; font-weight: 900; color: var(--text-primary); margin-bottom: 8px; }
.cert-formation   { font-size: 1rem; color: var(--text-secondary); margin-bottom: 24px; }
.cert-num         { font-family: monospace; font-size: 0.875rem; color: var(--text-muted); background: var(--gray-50); padding: 8px 16px; border-radius: var(--r-full); display: inline-block; }

/* ── Community ────────────────────────────────────────────── */
.community-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.msg-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color var(--dur);
}
.msg-card.pinned { border-color: var(--orange); }
.msg-card.teacher { border-left: 3px solid var(--purple); }
.msg-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: #fff; font-weight: 700; font-size: 0.8125rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-author-name { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.msg-author-time { font-size: 0.75rem; color: var(--text-muted); }
.msg-content { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg-reactions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.reaction-btn { display: flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-full); background: var(--gray-100); font-size: 0.8rem; cursor: pointer; border: 1.5px solid transparent; transition: all var(--dur); }
.reaction-btn:hover, .reaction-btn.active { background: var(--orange-50); border-color: var(--orange-200); }

.compose-area {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  padding: 16px;
  margin-bottom: 20px;
}
.compose-area textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 0.9rem;
  resize: none;
  min-height: 80px;
  transition: border-color var(--dur);
  outline: none;
}
.compose-area textarea:focus { border-color: var(--orange); }

/* ── Classes Virtuelles ───────────────────────────────────── */
.class-card {
  background: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--dur);
}
.class-card:hover { box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.class-card.live  { border-color: var(--orange); box-shadow: 0 4px 20px rgba(232,68,10,.12); }
.class-status-bar { padding: 8px 16px; font-size: 0.75rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.class-status-bar.live     { background: rgba(232,68,10,.08); color: var(--orange); }
.class-status-bar.upcoming { background: rgba(28,173,89,.08);  color: var(--green); }
.class-status-bar.ended    { background: var(--gray-50);       color: var(--text-muted); }
.class-body { padding: 20px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 6px; animation: live-pulse 1.2s ease-in-out infinite; }
@keyframes live-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

/* ── Notification Bell Dropdown ───────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur), transform var(--dur);
  pointer-events: none;
  z-index: 200;
}
.notif-dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.notif-header strong { font-size: 0.9375rem; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); transition: background var(--dur); cursor: pointer; }
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--orange-50); }
.notif-item-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--orange-100); color: var(--orange); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item-text { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.8375rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-item-time  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Footer ───────────────────────────────────────────────── */
#app-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.6);
  padding: 56px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand { max-width: 280px; }
.footer-logo  { height: 36px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.65; color: rgba(255,255,255,.45); }
.footer-heading { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 14px; }
.footer-link { display: block; font-size: 0.875rem; color: rgba(255,255,255,.5); padding: 3px 0; transition: color var(--dur); }
.footer-link:hover { color: var(--orange); }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom-left  { font-size: 0.8125rem; }
.footer-bottom-right { display: flex; gap: 16px; }

/* ── Spinner / Loading ────────────────────────────────────── */
.spinner { width: 24px; height: 24px; border: 3px solid var(--gray-200); border-top-color: var(--orange); border-radius: 50%; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.85); z-index: 500; display: flex; align-items: center; justify-content: center; }

/* ── Utilities ────────────────────────────────────────────── */
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-none   { display: none !important; }
.d-block  { display: block; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: 4px;  }
.gap-8  { gap: 8px;  }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.flex-1 { flex: 1; min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full  { width: 100%; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded-full { border-radius: var(--r-full); }
.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; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.p-16  { padding: 16px; }
.p-24  { padding: 24px; }
.p-32  { padding: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── PAGE TRANSITION (keep from v1) ──────────────────────── */
#pt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
}
.pt-strip {
  flex: 1;
  background: var(--orange);
  transform: translateY(-108%);
  transition: transform 0.6s cubic-bezier(.76,0,.24,1);
  transition-delay: calc(var(--d, 0ms));
}
#pt-overlay.precover .pt-strip {
  transform: translateY(0) !important;
  transition: none !important;
}
#pt-overlay.exit .pt-strip    { transform: translateX(108%); }
#pt-overlay.exit-up .pt-strip  { transform: translateY(-108%); }
#pt-overlay.exit-down .pt-strip { transform: translateY(108%); }

/* Watermark anti-copy */
#watermark-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .035;
  background-repeat: repeat;
  background-size: 220px 110px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .courses-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .stat-cards     { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .header-nav     { display: none; }
  .ham-btn        { display: flex; }
  .courses-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .courses-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .steps-grid     { grid-template-columns: repeat(2, 1fr); }
  .step-card:not(:last-child)::after { display: none; }
  .stats-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar-item { border-right: none; border-bottom: 1px solid var(--gray-200); padding: 16px; }
  .dash-layout    { flex-direction: column; }
  .dash-sidebar   { width: 100%; position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 8px; border-right: none; border-bottom: 1px solid var(--gray-200); }
  .admin-layout   { flex-direction: column; }
  .admin-sidebar  { width: 100%; position: static; height: auto; flex-direction: row; overflow-x: auto; }
  .community-layout { grid-template-columns: 1fr; }
  .player-layout  { flex-direction: column; }
  .player-sidebar { width: 100%; position: static; max-height: 400px; border-left: none; border-top: 1px solid var(--gray-200); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section   { padding: 40px 0; }
  .courses-grid, .courses-grid-4, .courses-grid-3 { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid    { grid-template-columns: 1fr; }
  .stat-cards    { grid-template-columns: 1fr 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .auth-card     { padding: 28px 20px; }
  .dash-main, .admin-main { padding: 16px; }
  .hero-stats    { gap: 20px; }
  .hero-actions  { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (min-width: 961px) {
  #mobile-drawer { display: none !important; }
}
