/* =============================================
   EDURX LMS — Global Styles
   Theme: Dark + Purple — Professional 2026
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg:        #07070e;
  --bg2:       #0d0d1a;
  --bg3:       #111126;
  --surface:   #14142b;
  --surface2:  #1a1a35;
  --surface3:  #1f1f3f;
  --border:    rgba(120, 80, 255, 0.15);
  --border2:   rgba(120, 80, 255, 0.3);

  --purple:    #7c4dff;
  --purple2:   #9c70ff;
  --purple3:   #b399ff;
  --purple-glow: rgba(124, 77, 255, 0.35);
  --purple-dim:  rgba(124, 77, 255, 0.08);

  --teal:      #00e5c8;
  --pink:      #ff4fa3;
  --amber:     #ffb347;
  --red:       #ff5c5c;
  --green:     #00d68f;

  --text:      #e8e8ff;
  --text2:     #9090c0;
  --text3:     #555580;
  --text4:     #333360;

  --font:      'Outfit', sans-serif;
  --font2:     'Inter', sans-serif;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow:    0 8px 40px rgba(0,0,0,0.6);
  --shadow-purple: 0 8px 40px rgba(124,77,255,0.25);

  --sidebar-w: 260px;
  --nav-h:     64px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(124,77,255,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ===== UTILITY ===== */
.container { max-width: 1300px; margin: 0 auto; padding: 0 28px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1{margin-top:4px;} .mt-2{margin-top:8px;} .mt-3{margin-top:16px;} .mt-4{margin-top:24px;}
.mb-1{margin-bottom:4px;} .mb-2{margin-bottom:8px;} .mb-3{margin-bottom:16px;} .mb-4{margin-bottom:24px;}
.text-muted { color: var(--text2); }
.text-purple { color: var(--purple2); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ===== GLOW EFFECT ===== */
.glow { box-shadow: var(--shadow-purple); }

/* ===== GRADIENT TEXT ===== */
.grad-text {
  background: linear-gradient(135deg, var(--purple2), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(7,7,14,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; display: flex;
  align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 22px; font-weight: 900; letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--purple3));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 4px 15px var(--purple-glow);
}
.nav-logo span { color: var(--purple2); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 7px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--purple-dim); color: var(--text);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px; cursor: pointer;
  transition: border-color .2s;
}
.nav-user:hover { border-color: var(--border2); }
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple3));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 100;
  padding: 20px 12px;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  letter-spacing: 2px; text-transform: uppercase;
  padding: 0 12px; margin-bottom: 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all .18s; border: none;
  background: transparent; width: 100%; text-align: left;
  text-decoration: none;
}
.sidebar-item:hover { background: var(--surface); color: var(--text); }
.sidebar-item.active {
  background: linear-gradient(90deg, rgba(124,77,255,0.2), rgba(124,77,255,0.05));
  color: var(--purple2);
  border-left: 3px solid var(--purple);
  padding-left: 9px;
}
.sidebar-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-badge {
  margin-left: auto; background: var(--purple);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

/* ===== MAIN LAYOUT ===== */
.app-wrap {
  display: flex; min-height: 100vh;
  padding-top: var(--nav-h);
}
.main-area {
  flex: 1; margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--nav-h));
  padding: 32px;
}
.page-header {
  margin-bottom: 28px;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-header h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
}
.page-header p { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; border: none;
  transition: all .2s; cursor: pointer; font-family: var(--font);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), #a050ff);
  color: #fff; box-shadow: 0 4px 15px var(--purple-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--purple-glow);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border2); background: var(--surface3); }
.btn-outline {
  background: transparent; color: var(--purple2);
  border: 1px solid var(--border2);
}
.btn-outline:hover { background: var(--purple-dim); }
.btn-ghost {
  background: transparent; color: var(--text2); border: none;
}
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-danger { background: rgba(255,92,92,0.15); color: var(--red); border: 1px solid rgba(255,92,92,0.3); }
.btn-danger:hover { background: rgba(255,92,92,0.25); }
.btn-success { background: rgba(0,214,143,0.15); color: var(--green); border: 1px solid rgba(0,214,143,0.3); }
.btn-success:hover { background: rgba(0,214,143,0.25); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 32px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: 15px; font-weight: 700; }

/* ===== COURSE CARD ===== */
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  display: flex; flex-direction: column;
}
.course-card:hover {
  border-color: rgba(124,77,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,77,255,0.1);
}
.course-thumb {
  height: 160px; position: relative;
  background: var(--bg3); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb .thumb-placeholder {
  font-size: 52px; opacity: .6;
}
.course-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,7,14,0.8) 0%, transparent 60%);
}
.course-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.course-level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 10px;
}
.level-beginner { background: rgba(0,214,143,0.12); color: var(--green); }
.level-intermediate { background: rgba(255,179,71,0.12); color: var(--amber); }
.level-advanced { background: rgba(255,92,92,0.12); color: var(--red); }
.course-title {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  margin-bottom: 6px; color: var(--text);
}
.course-instructor { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.course-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: var(--text3); margin-top: auto;
}
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-price {
  font-size: 18px; font-weight: 800;
  color: var(--purple2); margin-top: 12px;
}
.course-price.free { color: var(--green); }
.course-progress-wrap { margin-top: 12px; }
.progress-bar-track {
  height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  transition: width .4s ease;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text2); margin-bottom: 7px;
}
.form-control {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

/* ===== STATS CARD ===== */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.stat-icon-purple { background: rgba(124,77,255,0.15); }
.stat-icon-teal   { background: rgba(0,229,200,0.12); }
.stat-icon-pink   { background: rgba(255,79,163,0.12); }
.stat-icon-amber  { background: rgba(255,179,71,0.12); }
.stat-icon-green  { background: rgba(0,214,143,0.12); }
.stat-value {
  font-size: 30px; font-weight: 800; letter-spacing: -1px;
  line-height: 1; margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--text2); }
.stat-change {
  font-size: 12px; margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ===== TABLE ===== */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--surface2); }
.data-table th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px; border-top: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,0.015); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 5px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-purple { background: rgba(124,77,255,0.15); color: var(--purple2); }
.badge-green  { background: rgba(0,214,143,0.12); color: var(--green); }
.badge-red    { background: rgba(255,92,92,0.12); color: var(--red); }
.badge-amber  { background: rgba(255,179,71,0.12); color: var(--amber); }
.badge-teal   { background: rgba(0,229,200,0.12); color: var(--teal); }
.badge-pink   { background: rgba(255,79,163,0.12); color: var(--pink); }

/* ===== AVATAR ===== */
.avatar {
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  background: linear-gradient(135deg,var(--purple),var(--purple3));
  color: #fff;
}
.avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar-md  { width: 42px; height: 42px; font-size: 15px; }
.avatar-lg  { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl  { width: 88px; height: 88px; font-size: 32px; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  backdrop-filter: blur(6px);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 32px;
  width: 90%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .25s;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
}
.modal-header h3 { font-size: 19px; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface2); border: none;
  color: var(--text2); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }

/* ===== TABS ===== */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface);
  border-radius: 10px; padding: 4px;
  border: 1px solid var(--border);
  width: fit-content; margin-bottom: 24px;
}
.tab-btn {
  padding: 7px 18px; border-radius: 8px;
  background: transparent; border: none;
  font-size: 13px; font-weight: 600;
  color: var(--text2); cursor: pointer;
  transition: all .2s; font-family: var(--font);
}
.tab-btn.active {
  background: var(--purple);
  color: #fff; box-shadow: 0 4px 12px var(--purple-glow);
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  border-left: 3px solid;
}
.alert-success { background: rgba(0,214,143,.08); color: var(--green); border-color: var(--green); }
.alert-error   { background: rgba(255,92,92,.08);  color: var(--red);   border-color: var(--red); }
.alert-info    { background: rgba(124,77,255,.08); color: var(--purple2); border-color: var(--purple); }
.alert-warn    { background: rgba(255,179,71,.08); color: var(--amber); border-color: var(--amber); }

/* ===== VIDEO PLAYER ===== */
.yt-embed-wrap {
  position: relative; padding-bottom: 56.25%;
  height: 0; overflow: hidden;
  border-radius: var(--radius); background: #000;
}
.yt-embed-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none; border-radius: var(--radius);
}

/* ===== LESSON LAYOUT ===== */
.lesson-page { display: flex; min-height: calc(100vh - var(--nav-h)); }
.lesson-sidebar {
  width: 320px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  overflow-y: auto;
}
.lesson-content { flex: 1; padding: 28px; overflow-y: auto; max-width: 900px; }
.lesson-sidebar-head {
  padding: 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg2); z-index: 10;
}
.unit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; border-bottom: 1px solid rgba(120,80,255,0.07);
  cursor: pointer; transition: background .15s;
}
.unit-item:hover { background: var(--surface); }
.unit-item.active {
  background: rgba(124,77,255,0.1);
  border-left: 3px solid var(--purple); padding-left: 17px;
}
.unit-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: all .2s;
}
.unit-check.done { background: var(--green); border-color: var(--green); color: #000; }
.unit-item-info { flex: 1; min-width: 0; }
.unit-item-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-item-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.lesson-group-title {
  padding: 12px 20px 6px;
  font-size: 11px; font-weight: 700;
  color: var(--purple2); text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px;
  background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(124,77,255,0.1), transparent);
}
.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px; padding: 40px;
  width: 100%; max-width: 440px;
}
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 900;
  margin-bottom: 28px; justify-content: center;
}
.auth-logo .logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--purple3));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.auth-divider {
  text-align: center; position: relative;
  margin: 20px 0; font-size: 12px; color: var(--text3);
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 38%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ===== LANDING ===== */
.hero-section {
  min-height: 90vh; display: flex; align-items: center;
  padding: 100px 0 60px; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 65% 50%, rgba(124,77,255,0.12), transparent),
    radial-gradient(circle 400px at 20% 70%, rgba(0,229,200,0.06), transparent);
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,80,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,80,255,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(124,77,255,0.1);
  border: 1px solid rgba(124,77,255,0.25);
  font-size: 12px; font-weight: 600; color: var(--purple2);
  margin-bottom: 22px;
}
.hero-h1 {
  font-size: clamp(38px,6vw,72px);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 20px;
}
.hero-h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--purple2), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 17px; color: var(--text2); line-height: 1.75;
  max-width: 500px; margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 36px; margin-top: 52px;
  padding-top: 32px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero-stat-val {
  font-size: 26px; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text), var(--purple3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat-label { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ===== SECTION ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--bg2); }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--purple2); margin-bottom: 10px;
}
.section-h2 {
  font-size: clamp(26px,4vw,42px); font-weight: 900;
  letter-spacing: -1px; margin-bottom: 14px;
}
.section-sub {
  font-size: 16px; color: var(--text2); max-width: 500px; line-height: 1.7;
}

/* ===== FEATURE CARDS ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all .25s;
}
.feature-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124,77,255,0.1);
}
.feature-icon-wrap {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--purple-dim); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 48px;
  align-items: start;
}
.price-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px; padding: 32px;
  position: relative; transition: all .25s;
}
.price-card.featured {
  border-color: var(--purple);
  background: linear-gradient(145deg, rgba(124,77,255,0.08), var(--surface));
  box-shadow: 0 0 40px rgba(124,77,255,0.15);
}
.price-popular {
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), #a050ff);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap;
}
.price-name { font-size: 14px; font-weight: 700; color: var(--text2); margin-bottom: 12px; }
.price-amount { font-size: 52px; font-weight: 900; letter-spacing: -2px; line-height: 1; }
.price-period { font-size: 13px; color: var(--text3); margin-bottom: 24px; margin-top: 4px; }
.price-features { margin-bottom: 28px; }
.price-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; font-size: 14px; color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.price-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* ===== TESTIMONIALS ===== */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.stars { color: #ffc832; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testi-text { font-size: 14px; color: var(--text2); line-height: 1.8; margin-bottom: 18px; font-style: italic; }
.testi-name { font-size: 14px; font-weight: 700; }
.testi-role { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px; margin-bottom: 48px;
}
.footer-brand-desc { color: var(--text2); font-size: 14px; line-height: 1.7; margin-top: 14px; max-width: 270px; }
.footer-col h5 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text3); margin-bottom: 16px;
}
.footer-col a { display: block; color: var(--text2); font-size: 14px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--purple2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px; display: flex;
  align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text3); flex-wrap: wrap; gap: 8px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.breadcrumb a { color: var(--text2); transition: color .2s; }
.breadcrumb a:hover { color: var(--purple2); }
.breadcrumb span { color: var(--text3); }

/* ===== DRAG-DROP SORT ===== */
.sortable-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px; cursor: grab;
  transition: all .15s;
}
.sortable-item:hover { border-color: var(--border2); }
.sortable-item.dragging { opacity: .5; cursor: grabbing; }
.drag-handle { color: var(--text3); font-size: 16px; cursor: grab; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
.empty-state h4 { font-size: 17px; font-weight: 700; color: var(--text2); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 300px; margin: 0 auto; }

/* ===== SEARCH ===== */
.search-wrap { position: relative; }
.search-wrap input { padding-left: 42px; }
.search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text3); pointer-events: none;
}

/* ===== HAMBURGER ===== */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }


/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideIn { from{opacity:0;transform:translateX(-16px)} to{opacity:1;transform:translateX(0)} }
@keyframes spin    { to{transform:rotate(360deg)} }
.anim-fade  { animation:fadeIn .4s ease both }
.anim-up    { animation:fadeUp .5s ease both }
.anim-slide { animation:slideIn .4s ease both }
.d1{animation-delay:.1s} .d2{animation-delay:.2s} .d3{animation-delay:.3s}
.spinner    { animation:spin 1s linear infinite }

/* =====================================================
   DROPZONE
   ===================================================== */
.dropzone {
  border:2px dashed var(--border2); border-radius:var(--radius);
  padding:32px; text-align:center; cursor:pointer;
  transition:all .2s; background:var(--purple-dim);
}
.dropzone:hover { border-color:var(--purple); background:rgba(124,77,255,0.12); }
.dropzone p { font-size:14px; color:var(--text2); margin-top:10px; }

/* =====================================================
   SIDEBAR OVERLAY  (mobile backdrop)
   ===================================================== */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  z-index: 150;
}
#sidebar-overlay.show { display: block; }

/* =====================================================
   ADMIN MOBILE TOP BAR
   ===================================================== */
.admin-mobile-bar {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  height: 54px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 160;
}
.admin-mobile-bar .bar-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 800; color: var(--text);
  text-decoration: none;
}
.admin-mobile-bar .bar-logo .logo-dot {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--purple3));
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.admin-mobile-bar .hamburger-btn {
  width: 40px; height: 40px; border: none; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--text2); flex-shrink: 0;
}
.admin-mobile-bar .hamburger-btn svg { width: 20px; height: 20px; }

/* =====================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ===================================================== */
@media (max-width: 900px) {

  /* ---- Admin mobile bar visible ---- */
  .admin-mobile-bar { display: flex; }

  /* ---- Push app content below navbar + mobile bar ---- */
  .app-wrap {
    padding-top: calc(var(--nav-h) + 54px);
  }

  /* ---- Sidebar: hidden off-screen, slides in ---- */
  .sidebar {
    top: calc(var(--nav-h) + 54px);
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }

  /* ---- Main area full width ---- */
  .main-area {
    margin-left: 0;
    padding: 22px 18px;
  }

  /* ---- Nav ---- */
  .hamburger { display: flex; }
  .nav-links  { display: none; }

  /* ---- Grids ---- */
  .grid-4     { grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }

  /* ---- Page header stacks ---- */
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

  /* ---- Disable hover card lift on touch ---- */
  .card:hover { transform: none; box-shadow: none; }
}

/* =====================================================
   RESPONSIVE — MOBILE  (≤ 640px)
   ===================================================== */
@media (max-width: 640px) {

  /* ---- Layout ---- */
  .main-area { padding: 14px 12px; }

  /* ---- Grids all single column ---- */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }

  /* ---- Buttons ---- */
  .page-header .btn { width: 100%; justify-content: center; }

  /* ---- Breadcrumb ---- */
  .breadcrumb { font-size: 12px; flex-wrap: wrap; gap: 4px; }

  /* ---- Auth ---- */
  .auth-card { padding: 22px 16px; margin: 14px; }

  /* ---- Hero ---- */
  .hero-h1  { font-size: clamp(26px, 8vw, 48px); letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { justify-content: center; }

  /* ---- Tables ---- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 480px; }

  /* ---- Forms ---- */
  .form-row, .form-row-2 { grid-template-columns: 1fr !important; }

  /* ---- Lessons page unit form ---- */
  .unit-form-grid { grid-template-columns: 1fr !important; }

  /* ---- Lesson player layout ---- */
  .lesson-page { flex-direction: column; }
  .lesson-sidebar {
    width: 100% !important;
    max-height: 320px;
    overflow-y: auto;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }

  /* ---- Cards ---- */
  .card { border-radius: var(--radius-sm); }

  /* ---- Nav ---- */
  .nav-inner { padding: 0 12px; }
  .nav-logo  { font-size: 17px; }
  .nav-actions .btn-ghost { display: none; }

  /* ---- Headings ---- */
  .page-header h1 { font-size: 19px; }

  /* ---- Alerts ---- */
  .alert { font-size: 13px; padding: 10px 13px; }
}

/* =====================================================
   RESPONSIVE — SMALL PHONES  (≤ 400px)
   ===================================================== */
@media (max-width: 400px) {
  .admin-mobile-bar { height: 50px; padding: 0 12px; }
  .app-wrap { padding-top: calc(var(--nav-h) + 50px); }
  .sidebar  { top: calc(var(--nav-h) + 50px); }
  .main-area { padding: 12px 10px; }
  .page-header h1 { font-size: 17px; }
  .btn    { padding: 8px 14px; font-size: 13px; }
  .btn-sm { padding: 5px 10px;  font-size: 11px; }
}
