/* ═══════════════════════════════════════════
   ABC INSTITUTE ERP — style.css
   Theme: Crimson Snow · Red Accent · Plus Jakarta Sans + Inter
═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:         #ffffff;
  --bg2:        #f8fafc;
  --bg3:        #f1f5f9;
  --card:       rgba(255, 255, 255, 0.8);
  --card2:      rgba(241, 245, 249, 0.8);
  --backdrop:   blur(20px);
  --border:     rgba(0, 0, 0, 0.08);
  --border2:    rgba(0, 0, 0, 0.15);

  --teal:       #ef4444; /* Primary Red */
  --teal-d:     #dc2626; /* Darker Red */
  --teal-glow:  rgba(239, 68, 68, 0.15);
  --blue:       #be123c; /* Secondary Dark Rose */
  --amber:      #f59e0b;
  --red:        #e11d48; /* Darker Rose for better white text contrast */
  --green:      #059669; /* Darker Emerald for better white text contrast */

  --text:       #0f172a;
  --text-2:     #475569;
  --text-3:     #64748b; /* Slate 500 for readable tertiary text */

  --r-sm:       10px;
  --r-md:       16px;
  --r-lg:       20px;
  --r-xl:       28px;

  --shadow:     0 4px 20px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.08);

  --font-head:  'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body:  'Inter', 'DM Sans', sans-serif;

  --nav-h:      64px;
  --trans:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, .nav-brand, .tab, .enrol-step { user-select: none; -webkit-user-select: none; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
h1, h2, h3, h4, .hero-title, .section-title, .dash-header h1 {
  letter-spacing: -0.02em;
}

/* Global Ambient Mesh Glows */
body::before, body::after {
  content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: -1; filter: blur(100px);
  will-change: transform;
}
body::before {
  top: -20%; left: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(239,68,68,0.08) 0%, transparent 70%);
  animation: floatOrb 15s ease-in-out infinite alternate;
}
body::after {
  bottom: -20%; right: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(190,18,60,0.08) 0%, transparent 70%);
  animation: floatOrb 20s ease-in-out infinite alternate-reverse;
}

.announcement-banner {
  background: var(--teal); color: #fff; text-align: center;
  padding: 10px 20px; font-size: 15px; font-weight: 500;
  z-index: 90; position: relative;
}

a { color: var(--teal); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select, button { font-family: var(--font-body); }
img { max-width: 100%; display: block; }
textarea { resize: vertical; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.mobile-only-link { display: none !important; }
.text-muted { color: var(--text-2); }
.mt-2 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1.2rem; }
.full { width: 100%; }
.center { justify-content: center; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ══════════════════════════════════════════
   PAGES SYSTEM
══════════════════════════════════════════ */
.page { display: none; min-height: 100dvh; }
.page.active { display: block; animation: fadeIn 0.4s ease-out; }

/* ══════════════════════════════════════════
   GLOBAL NAV
══════════════════════════════════════════ */
#global-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 1.5rem;
}
#global-nav.active { display: flex; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  color: #ffffff; letter-spacing: .5px; flex-shrink: 0;
  box-shadow: 0 4px 12px var(--teal-glow), inset 0 2px 4px rgba(255,255,255,0.5);
}
.nav-logo.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; }
.nav-logo.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }
.nav-name {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  color: var(--text);
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
  margin-top: 4px;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links button {
  background: none; border: none; color: var(--text-2);
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 15px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  transition: var(--trans);
}
.nav-links button:hover, .nav-links button.active {
  background: var(--bg3); color: var(--text);
}
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-user { font-size: 15px; color: var(--text-2); }
.logout-btn {
  background: none; border: 1px solid #000;
  color: var(--text-2); padding: 7px 16px;
  border-radius: var(--r-sm); font-size: 15px; cursor: pointer;
  transition: var(--trans);
  display: flex; align-items: center; gap: 6px;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #ffffff; border: 1px solid #000;
  padding: 12px 26px; border-radius: var(--r-md);
  font-size: 16px; font-weight: 700;
  cursor: pointer; transition: var(--trans);
  box-shadow: 0 4px 16px var(--teal-glow), inset 0 1px 0 rgba(255,255,255,0.4);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--teal-d), #9f1239); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-primary:active, .btn-ghost:active, .btn-danger:active, .btn-approve:active { transform: scale(0.96) translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.btn-lg { padding: 15px 36px; font-size: 18px; border-radius: var(--r-lg); }

.btn-ghost {
  background: none; border: 1px solid #000;
  color: var(--text); padding: 11px 24px;
  border-radius: var(--r-md); font-size: 16px; font-weight: 500;
  cursor: pointer; transition: var(--trans);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-glow); }
.btn-ghost.btn-lg { padding: 15px 36px; font-size: 18px; border-radius: var(--r-lg); }

.btn-danger {
  background: var(--red); color: #fff; border: 1px solid #000;
  padding: 10px 20px; border-radius: var(--r-md);
  font-size: 15px; cursor: pointer; transition: var(--trans);
}
.btn-danger:hover { opacity: 0.85; }

.btn-approve {
  background: var(--green); color: #fff; border: 1px solid #000;
  padding: 10px 20px; border-radius: var(--r-md);
  font-size: 15px; cursor: pointer; transition: var(--trans);
}
.btn-approve:hover { opacity: 0.85; }

.wa-btn {
  background: rgba(37,211,102,0.12);
  border: 1px solid #000;
  color: #15803d; /* Darker green for WCAG contrast on light backgrounds */
  padding: 9px 18px; border-radius: var(--r-md);
  font-size: 15px; cursor: pointer; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: var(--trans); white-space: nowrap;
}
.wa-btn:hover { background: rgba(37,211,102,0.2); }

.back-btn {
  background: none; border: none; color: var(--text-2);
  font-size: 15px; cursor: pointer; padding: 4px 0;
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 4px;
  transition: var(--trans);
}
.back-btn:hover { color: var(--text); }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.form-group label {
  font-size: 15px; font-weight: 500; color: var(--text-2);
}
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 16px; transition: var(--trans);
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid transparent; border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }
.form-group select option { background: var(--bg3); }

.form-error {
  background: rgba(229,69,69,0.12);
  border: 1px solid rgba(229,69,69,0.3);
  color: #ff7070; padding: 12px 16px;
  border-radius: var(--r-md); font-size: 15px;
  margin-bottom: .5rem;
}

.role-toggle {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.role-btn {
  background: var(--bg3); border: 1px solid #000;
  color: var(--text-2); padding: 10px 20px;
  border-radius: var(--r-md); font-size: 16px; cursor: pointer;
  transition: var(--trans); font-weight: 500;
}
.role-btn:hover:not(.active) { background: var(--card2); border-color: var(--border); color: var(--text); }
.role-btn.active {
  background: var(--teal-glow); border-color: var(--teal);
  color: var(--teal);
}

/* ══════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════ */
#page-landing { position: relative; overflow: hidden; }

.landing-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.bg-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse, var(--teal-glow) 0%, transparent 70%);
  filter: blur(40px);
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

.land-nav {
  position: relative; z-index: 10;
  display: flex; align-items: center;
  padding: 1.2rem 2rem; gap: 1rem;
}
.land-nav-actions {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}

.hero {
  position: relative; z-index: 5;
  max-width: 720px; margin: 0 auto;
  padding: 5rem 2rem 4rem;
  text-align: center;
  animation: fadeUp .8s ease;
}
.hero-badge {
  display: inline-block;
  background: var(--teal-glow); border: 1px solid rgba(20,184,166,0.3);
  color: var(--teal); padding: 8px 22px; border-radius: 50px;
  font-size: 15px; font-weight: 500; margin-bottom: 2rem;
}
.hero-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(48px, 8vw, 88px); line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 1.5rem;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--teal);
}
.hero-sub {
  font-size: 20px; color: var(--text-2); line-height: 1.7;
  max-width: 520px; margin: 0 auto 2.5rem;
}
.hero-actions {
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.stat-pill {
  background: var(--card); border: 1px solid var(--border);
  padding: 10px 24px; border-radius: 50px;
  font-size: 16px; color: var(--text-2);
}
.stat-pill .stat-n { font-weight: 700; color: var(--text); margin-right: 4px; }

.courses-preview {
  position: relative; z-index: 5;
  max-width: 1100px; margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-title {
  font-family: var(--font-head); font-weight: 700; font-size: 32px;
  margin-bottom: .5rem;
}
.section-sub { color: var(--text-2); font-size: 18px; }

.land-footer {
  position: relative; z-index: 5;
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2rem; display: flex; align-items: center;
  gap: 1.5rem; flex-wrap: wrap;
}
.land-footer p { color: var(--text-3); font-size: 15px; flex: 1; }

/* ══════════════════════════════════════════
   COURSE CARDS
══════════════════════════════════════════ */
.course-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.course-cards.lg {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.course-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  border-radius: var(--r-xl); padding: 1.5rem;
  transition: var(--trans); cursor: pointer;
  display: flex; flex-direction: column; gap: .75rem;
}
.course-card:hover {
  border-color: var(--teal); transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.8);
}
.course-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-glow), rgba(239,68,68,0.05));
  border: 1px solid rgba(239,68,68,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: .5rem;
}
.course-card-name {
  font-family: var(--font-head); font-weight: 700; font-size: 19px;
}
.course-card-desc { font-size: 15px; color: var(--text-2); line-height: 1.6; flex: 1; }
.course-card-meta {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: .25rem;
}
.meta-tag {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 50px;
  font-size: 14px; color: var(--text-2);
}
.course-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .5rem; padding-top: .75rem; border-top: 1px solid var(--border);
}
.course-fee {
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  color: var(--teal);
}
.enrol-badge {
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25);
  color: var(--green); padding: 6px 14px; border-radius: 50px;
  font-size: 14px; font-weight: 500;
}

/* ══════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════ */
.auth-page {
  display: none; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 2rem;
  position: relative; overflow: hidden;
}
.auth-page.active { display: flex; }
.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.auth-card {
  position: relative; z-index: 5;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--r-xl); padding: 2.5rem;
  width: 100%; max-width: 420px;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  box-shadow: var(--shadow-lg);
  animation: fadeUp .5s ease;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 24px;
  margin: .75rem 0 .25rem;
}
.auth-logo p { color: var(--text-2); font-size: 16px; }
.auth-logo .nav-logo { margin: 0 auto; }
.auth-switch {
  text-align: center; font-size: 15px; color: var(--text-2); margin-top: 1rem;
}

/* ══════════════════════════════════════════
   INNER PAGES
══════════════════════════════════════════ */
.inner-page { display: none; }
.inner-page.active { display: block; }

.inner-hero {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 2rem;
}
.inner-hero h1 {
  font-family: var(--font-head); font-weight: 700; font-size: 28px;
  margin: .5rem 0 .25rem;
}
.inner-hero p { color: var(--text-2); }

.container { max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem; }
.container.narrow { max-width: 640px; }

.dash-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.dash-header h1 {
  font-family: var(--font-head); font-weight: 700; font-size: 26px;
}

/* ══════════════════════════════════════════
   STATS ROW
══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  border-radius: var(--r-lg); padding: 1.2rem;
  border: 1px solid var(--border);
  transition: var(--trans);
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.01); border-color: var(--teal);
  box-shadow: var(--shadow-lg);
}
.stat-card .stat-label { font-size: 14px; color: var(--text-2); margin-bottom: .4rem; }
.stat-card .stat-val {
  font-family: var(--font-head); font-weight: 700; font-size: 28px;
}
.stat-card .stat-val.teal { color: var(--teal); }
.stat-card .stat-val.amber { color: var(--amber); }
.stat-card .stat-val.red { color: var(--red); }
.stat-card .stat-val.blue { color: var(--blue); }

/* ══════════════════════════════════════════
   DASH GRID
══════════════════════════════════════════ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.dash-col { display: flex; flex-direction: column; gap: 1rem; }
.card-title {
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  color: var(--text-2); margin-bottom: .25rem;
}

/* ══════════════════════════════════════════
   LIST CARDS
══════════════════════════════════════════ */
.list-cards { display: flex; flex-direction: column; gap: .75rem; }
.list-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: var(--trans);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.list-card:hover {
  border-color: var(--teal); transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow); background: var(--bg2);
}
.list-card .lc-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg3); display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.list-card .lc-body { flex: 1; min-width: 0; }
.list-card .lc-name {
  font-weight: 500; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-card .lc-sub { font-size: 14px; color: var(--text-2); }
.list-card .lc-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.empty-state {
  text-align: center; padding: 2rem 1rem;
  color: var(--text-3); font-size: 16px;
}
.empty-state .es-icon { font-size: 32px; margin-bottom: .5rem; }

/* ══════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════ */
.badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 50px; font-size: 13px; font-weight: 600;
  letter-spacing: .3px;
}
.badge-pending  { background: rgba(240,165,0,.15); color: var(--amber); border: 1px solid rgba(240,165,0,.2); }
.badge-approved { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.badge-rejected { background: rgba(229,69,69,.12);  color: var(--red);   border: 1px solid rgba(229,69,69,.2); }
.badge-enrolled { background: rgba(59,139,212,.12); color: var(--blue);  border: 1px solid rgba(59,139,212,.2); }

/* ══════════════════════════════════════════
   TABS
══════════════════════════════════════════ */
.tab-bar {
  display: flex; gap: 4px; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
  overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  background: none; border: none; color: var(--text-2);
  padding: 12px 20px; font-size: 16px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: var(--trans); white-space: nowrap;
  margin-bottom: -1px;
  scroll-snap-align: start;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); text-shadow: 0 0 12px var(--teal-glow); }
.tab-panel { display: block; animation: fadeIn 0.4s ease; }
.tab-panel.hidden { display: none; }

/* ══════════════════════════════════════════
   ENROLMENT / PAYMENT FLOW
══════════════════════════════════════════ */
.enrol-steps {
  display: flex; gap: 8px; margin-bottom: 2rem;
  align-items: center;
}
.enrol-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; color: var(--text-3);
}
.enrol-step .step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.enrol-step.done .step-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.enrol-step.active .step-dot { border-color: var(--teal); color: var(--teal); }
.enrol-step.active { color: var(--text); }
.step-sep { width: 32px; height: 1px; background: var(--border); }

.payment-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 2rem; text-align: center;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.payment-card h3 {
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  margin-bottom: .5rem;
}
.payment-card p { color: var(--text-2); margin-bottom: 1.5rem; }

.qr-container {
  background: #fff; border-radius: var(--r-lg);
  padding: 1rem; display: inline-block; margin-bottom: 1.5rem;
}
.upi-amount {
  font-family: var(--font-head); font-weight: 800; font-size: 36px;
  color: var(--teal); margin-bottom: .5rem;
}
.upi-id {
  font-size: 15px; color: var(--text-2); margin-bottom: 1.5rem;
  font-family: monospace;
}

.screenshot-upload {
  background: var(--bg3); border: 2px dashed var(--border2);
  border-radius: var(--r-lg); padding: 2rem; text-align: center;
  margin-bottom: 1rem; cursor: pointer; transition: var(--trans);
}
.screenshot-upload:hover { border-color: var(--teal); }
.screenshot-upload input { display: none; }
.screenshot-preview {
  max-height: 280px; border-radius: var(--r-md);
  margin: 1rem auto 0; display: block;
}

.payment-status-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 2rem; text-align: center;
}
.status-icon { font-size: 48px; margin-bottom: 1rem; }

/* ══════════════════════════════════════════
   ATTENDANCE
══════════════════════════════════════════ */
.attendance-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.attendance-course-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.2rem;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.attendance-course-card h4 { font-weight: 600; margin-bottom: .75rem; font-size: 17px; }
.att-bar-bg {
  height: 6px; background: var(--bg3);
  border-radius: 3px; overflow: hidden; margin-bottom: .4rem;
}
.att-bar-fill { height: 100%; border-radius: 3px; transition: var(--trans); }
.att-pct { font-size: 16px; color: var(--text-2); }

.att-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.att-table th, .att-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 16px;
}
.att-table th { color: var(--text-2); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.att-present { color: var(--green); font-weight: 600; }
.att-absent { color: var(--red); font-weight: 600; }

/* ══════════════════════════════════════════
   CONTENT TREE (Teacher)
══════════════════════════════════════════ */
.content-tree { display: flex; flex-direction: column; gap: .75rem; }
.chapter-folder {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.chapter-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; cursor: pointer; transition: var(--trans);
  background: var(--bg3);
}
.chapter-header:hover { background: var(--card2); }
.chapter-icon { font-size: 18px; }
.chapter-name { font-weight: 600; font-size: 17px; flex: 1; }
.chapter-toggle { color: var(--text-3); font-size: 12px; transition: var(--trans); }
.chapter-folder.open .chapter-toggle { transform: rotate(180deg); }
.chapter-children {
  display: none; border-top: 1px solid var(--border);
  padding: 1.2rem; background: var(--bg2);
  flex-direction: column; gap: 0.75rem;
}
.chapter-folder.open .chapter-children { display: flex; }

/* Playlist Style Items */
.playlist-item {
  display: flex; gap: 1rem; align-items: stretch;
  padding: 1rem; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--border);
  transition: var(--trans); cursor: pointer;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.playlist-item:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.playlist-item.active-playing { 
  border-color: var(--teal); background: rgba(20,184,166,0.05); 
  box-shadow: 0 0 0 1px var(--teal);
}

.pl-thumb {
  width: 160px; flex-shrink: 0; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  border-radius: var(--r-sm); position: relative;
  overflow: hidden; background-color: var(--bg2);
  border: 1px solid var(--border);
}
.pl-thumb.fallback { background: linear-gradient(135deg, var(--card2), var(--bg3)); }
.pl-thumb.file-fallback { 
  background: rgba(59,130,246,0.1); display: flex; align-items: center; justify-content: center;
  color: var(--blue); border-color: rgba(59,130,246,0.2);
}
.pl-play {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: var(--trans);
}
.pl-play svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.playlist-item:hover .pl-play { background: rgba(0,0,0,0.5); transform: scale(1.05); }

.pl-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pl-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.pl-desc { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }

.pl-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.video-embed {
  background: #000; border-radius: var(--r-md);
  overflow: hidden; margin-top: .5rem;
  aspect-ratio: 16/9; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.video-embed iframe,
.video-embed video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none; outline: none; background: #000;
}

.notes-viewer-content {
  position: absolute; inset: 0; background: var(--bg2);
  padding: 2rem; overflow-y: auto; color: var(--text);
  font-size: 16px; line-height: 1.8; text-align: left;
  scrollbar-width: thin;
}

.drive-open-btn {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  background: rgba(0,0,0,0.6); color: #fff; padding: 6px 14px;
  border-radius: 6px; font-size: 13px; text-decoration: none;
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15);
  transition: var(--trans);
}
.drive-open-btn:hover { background: var(--teal); border-color: var(--teal); color: #fff; text-decoration: none; }

/* ══════════════════════════════════════════
   YOUTUBE STYLE COURSE PLAYER
══════════════════════════════════════════ */
.course-player-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 992px) {
  .course-player-layout { grid-template-columns: 1fr; }
}

.youtube-style-player {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--backdrop);
  margin-bottom: 1.5rem;
}
.youtube-style-player .video-embed {
  margin-top: 0; border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.youtube-style-player .player-meta { padding: 1.5rem; }
.youtube-style-player .player-title {
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  color: var(--text); margin-bottom: 6px; line-height: 1.3;
}
.youtube-style-player .player-desc { color: var(--text-2); font-size: 15px; line-height: 1.6; }

.player-placeholder {
  background: var(--card); border: 1px dashed var(--border2);
  border-radius: var(--r-xl); padding: 5rem 2rem;
  text-align: center; color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: var(--backdrop);
}
.player-placeholder .es-icon { font-size: 48px; margin-bottom: 1rem; opacity: 0.5; }

.course-player-sidebar {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 1.25rem;
  backdrop-filter: var(--backdrop);
  max-height: 800px; overflow-y: auto; scrollbar-width: thin;
}
@media (max-width: 992px) {
  .course-player-sidebar { max-height: none; overflow-y: visible; }
}
.sidebar-header-row { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.sidebar-header { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--text); }

/* Override playlist item specifically in the sidebar to be compact */
.course-player-sidebar .playlist-item, .premium-sidebar .playlist-item {
  padding: 10px; gap: 12px;
  border-radius: var(--r-md); background: var(--bg3);
}
.course-player-sidebar .pl-thumb, .premium-sidebar .pl-thumb { width: 110px; border-radius: var(--r-sm); }
.course-player-sidebar .pl-title, .premium-sidebar .pl-title { font-size: 14px; margin-bottom: 2px; }
.course-player-sidebar .pl-desc, .premium-sidebar .pl-desc {
  font-size: 12px;
  display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.course-player-sidebar .pl-actions .btn-ghost, .premium-sidebar .pl-actions .btn-ghost { padding: 4px 10px; font-size: 12px; }
.course-player-sidebar .pl-actions .btn-danger, .premium-sidebar .pl-actions .btn-danger { padding: 4px 8px; font-size: 12px; }

/* Theater Mode Styles */
.premium-course-layout.theater-mode {
  flex-direction: column;
  overflow-y: auto;
}
.premium-course-layout.theater-mode .premium-main {
  overflow-y: visible;
  flex: none;
  padding: 1.5rem 1.5rem 0;
}
.premium-course-layout.theater-mode .youtube-style-player {
  max-width: 1300px;
  margin: 0 auto 1.5rem;
}
.premium-course-layout.theater-mode .premium-tabs-container {
  max-width: 1300px;
  margin: 0 auto 2rem;
}
.premium-course-layout.theater-mode .premium-sidebar {
  width: 100%;
  height: auto;
  border-left: none;
  border-top: 1px solid var(--border);
  flex: none;
}

/* ══════════════════════════════════════════
   ADMIN TABLES
══════════════════════════════════════════ */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--card); border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--border);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.data-table th {
  background: var(--bg3); padding: 12px 16px;
  text-align: left; font-size: 13px; font-weight: 600;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px; font-size: 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0, 0, 0, 0.04); }

.search-bar { margin-bottom: 1rem; }
.search-bar input {
  background: var(--card); border: 1px solid var(--border2);
  color: var(--text); padding: 12px 18px;
  border-radius: var(--r-md); font-size: 16px; width: 100%; max-width: 360px;
}
.search-bar input:focus { outline: none; border-color: var(--teal); }

.filter-bar {
  display: flex; gap: 6px; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.filter-btn {
  background: var(--card); border: 1px solid var(--border2);
  color: var(--text-2); padding: 9px 20px; border-radius: 50px;
  font-size: 15px; cursor: pointer; transition: var(--trans);
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active { background: var(--teal-glow); border-color: var(--teal); color: var(--teal); }

/* ══════════════════════════════════════════
   MODERN LIST CARDS (Replaces Admin Tables)
══════════════════════════════════════════ */
.modern-list { display: flex; flex-direction: column; gap: 12px; }
.modern-list-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  transition: var(--trans); position: relative;
}
.modern-list-card:hover { border-color: var(--teal); box-shadow: var(--shadow-lg); transform: translateY(-3px) scale(1.01); z-index: 2; background: var(--bg2); }
.mlc-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.mlc-details { display: flex; flex-direction: column; min-width: 0; }
.mlc-title { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.mlc-subtitle { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlc-status { flex-shrink: 0; display: flex; align-items: center; }
.mlc-actions { flex-shrink: 0; }

/* Action Dropdown Menu */
.actions-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}
.actions-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-2);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
.actions-btn:hover {
  background: var(--card2);
  border-color: var(--border2);
  color: var(--text);
}
.actions-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  z-index: 10;
  min-width: 180px;
  overflow: hidden;
  padding: 6px 0;
  animation: fadeUp .2s ease;
}
.actions-dropdown.active { display: block; }
.actions-dropdown a { display: block; padding: 10px 16px; font-size: 15px; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.actions-dropdown a:hover { background-color: var(--card2); }
.actions-dropdown a.danger { color: var(--red); }
.actions-dropdown a.danger:hover { background-color: rgba(251, 113, 133, 0.1); }

/* ══════════════════════════════════════════
   PAYMENT CARD (Admin)
══════════════════════════════════════════ */
.payment-review-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: .75rem;
  transition: var(--trans);
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.payment-review-card:hover { border-color: var(--border2); }
.pay-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg3);
}
.pay-info { flex: 1; min-width: 160px; }
.pay-name { font-weight: 600; font-size: 17px; margin-bottom: 2px; }
.pay-meta { font-size: 14px; color: var(--text-2); }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   MODALS
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: var(--r-xl); width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  -webkit-overflow-scrolling: touch;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  animation: modalEnter .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal.active { display: block; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
}
.modal-header button {
  background: none; border: none; color: var(--text-2);
  font-size: 20px; cursor: pointer; line-height: 1;
  transition: var(--trans);
}
.modal-header button:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1rem; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--text); padding: 14px 28px;
  border-radius: 50px; font-size: 16px; font-weight: 500;
  z-index: 99999; box-shadow: var(--shadow);
  animation: toastEnter .4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
  white-space: nowrap;
}
.toast.success { border-color: var(--teal); color: var(--teal); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════════
   WA STICKY
══════════════════════════════════════════ */
.wa-sticky {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
}
.wa-sticky .wa-btn {
  box-shadow: 0 4px 20px rgba(37,211,102,0.2);
}

/* ══════════════════════════════════════════
   BATCHMATES
══════════════════════════════════════════ */
.batchmates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.batchmate-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.2rem; text-align: center;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal-glow); border: 2px solid rgba(20,184,166,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  color: var(--teal); margin: 0 auto .75rem;
}
.batchmate-name { font-weight: 600; font-size: 16px; margin-bottom: .2rem; }
.batchmate-meta { font-size: 14px; color: var(--text-2); word-break: break-all; }

/* ══════════════════════════════════════════
   MARK ATTENDANCE
══════════════════════════════════════════ */
.mark-att-row {
  display: flex; align-items: center;
  padding: .75rem 1rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: .5rem; gap: 1rem;
}
.mark-att-name { flex: 1; font-size: 16px; }
.att-toggle { display: flex; gap: 4px; }
.att-toggle button {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text-2); padding: 7px 16px;
  border-radius: var(--r-sm); font-size: 14px; cursor: pointer;
  font-weight: 500; transition: var(--trans);
}
.att-toggle button.p { background: rgba(34,197,94,.12); border-color: var(--green); color: var(--green); }
.att-toggle button.a { background: rgba(229,69,69,.12); border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════════
   ASSIGNMENT ITEMS
══════════════════════════════════════════ */
.assignment-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 1.5rem;
  margin-bottom: 1rem; transition: var(--trans);
  position: relative; overflow: hidden;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.assignment-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
}
.assignment-card.status-pending::before { background: var(--amber); }
.assignment-card.status-approved::before { background: var(--green); }

.assignment-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.assignment-title { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--text); margin-bottom: 4px; }
.assignment-due { font-size: 14px; color: var(--amber); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.assignment-desc { font-size: 15px; color: var(--text-2); margin-bottom: 1.25rem; line-height: 1.6; }

.resource-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); padding: 8px 16px; border-radius: 50px;
  font-size: 14px; color: var(--text); text-decoration: none;
  border: 1px solid var(--border2); transition: var(--trans);
  margin-bottom: 1.5rem;
}
.resource-link:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-glow); }

.assignment-footer { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1rem; }

.submission-receipt {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 1.25rem;
}
.receipt-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); font-weight: 700; margin-bottom: 8px; }
.receipt-text { font-size: 15px; color: var(--text); margin-bottom: 12px; line-height: 1.5; }
.receipt-links { display: flex; gap: 8px; flex-wrap: wrap; }
.receipt-links .btn-ghost { padding: 6px 14px; font-size: 13px; border-radius: 50px; }

.assignment-grade {
  margin-top: 1rem; padding: 1rem;
  background: rgba(20,184,166,0.1); border: 1px solid rgba(20,184,166,0.2);
  border-radius: var(--r-md);
}
.grade-score { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--teal); }
.grade-feedback { font-size: 14px; color: var(--text-2); margin-top: 4px; font-style: italic; }

/* ══════════════════════════════════════════
   CHAT / DISCUSSIONS
══════════════════════════════════════════ */
.chat-container {
  display: flex; flex-direction: column;
  height: 65vh; max-height: 600px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop);
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.chat-msg { max-width: 80%; display: flex; flex-direction: column; }
.chat-msg.self { align-self: flex-end; align-items: flex-end; }
.chat-msg-sender { font-size: 12px; color: var(--text-2); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.chat-msg-bubble {
  background: var(--bg3); padding: 10px 14px;
  border-radius: 12px 12px 12px 2px; font-size: 15px;
  color: var(--text); border: 1px solid var(--border2);
}
.chat-msg.self .chat-msg-bubble {
  background: var(--teal-d); color: #fff;
  border-radius: 12px 12px 2px 12px; border-color: var(--teal);
}
.chat-input-area { display: flex; gap: 8px; padding: 1rem; border-top: 1px solid var(--border); background: var(--bg2); }
.chat-input-area input { flex: 1; background: var(--bg3); border: 1px solid var(--border2); padding: 10px 16px; border-radius: 50px; color: var(--text); font-size: 15px; }
.chat-input-area input:focus { outline: none; border-color: var(--teal); }
.chat-input-area button { background: var(--teal); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--trans); font-size: 18px; }
.chat-input-area button:hover { background: var(--teal-d); transform: scale(1.05); }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastEnter {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}
@keyframes pulseGlow {
  0% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}
@keyframes skeletonPulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.skeleton-box {
  background: var(--bg3); border-radius: var(--r-sm);
  animation: skeletonPulse 1.5s infinite ease-in-out;
}

/* ══════════════════════════════════════════
   DRAG & DROP (SORTABLE JS)
══════════════════════════════════════════ */
.drag-handle {
  cursor: grab;
  padding: 0 8px;
  color: var(--text-3);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
  user-select: none;
}
.drag-handle:hover { color: var(--teal); }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; background: var(--card2); border: 1px dashed var(--teal); border-radius: var(--r-md); }

/* ══════════════════════════════════════════
   PREMIUM COURSE PLAYER
══════════════════════════════════════════ */
.premium-course-page {
  padding: 0;
  flex-direction: column;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.premium-course-page.active {
  display: flex;
}

.premium-course-header {
  height: 64px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  flex-shrink: 0;
}

.course-header-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.premium-course-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.premium-main {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg);
  scrollbar-width: thin;
}

.premium-sidebar {
  width: 380px;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.premium-sidebar .sidebar-header-row {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.premium-sidebar .content-tree {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}

.premium-tabs-container {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--backdrop);
}

.course-overview-text {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 992px) {
  .premium-course-page {
    height: auto;
    overflow: visible;
  }
  .premium-course-page.active {
    display: flex;
  }
  .premium-course-layout {
    flex-direction: column;
    overflow: visible;
  }
  .premium-main {
    overflow: visible;
    padding: 1rem;
  }
  .premium-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    height: auto;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
.mobile-icon { display: none; }