/* =====================================================
   Deducate — full vanilla CSS
   ===================================================== */

:root {
  --radius: 0.875rem;

  --background: oklch(0.16 0.025 270);
  --foreground: oklch(0.97 0.01 250);
  --card: oklch(0.21 0.03 270);
  --muted: oklch(0.24 0.03 270);
  --muted-foreground: oklch(0.68 0.03 260);
  --primary: oklch(0.68 0.21 290);
  --primary-foreground: oklch(0.99 0.005 250);
  --success: oklch(0.72 0.18 155);
  --warning: oklch(0.78 0.15 75);
  --danger: oklch(0.65 0.22 25);
  --border: oklch(1 0 0 / 0.08);
  --input-bg: oklch(1 0 0 / 0.04);

  --gradient-primary: linear-gradient(135deg, oklch(0.68 0.21 290), oklch(0.72 0.18 220));
  --gradient-hero:
    radial-gradient(ellipse 80% 60% at 50% 0%, oklch(0.68 0.21 290 / 0.35), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 30%, oklch(0.72 0.18 220 / 0.25), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 70%, oklch(0.78 0.18 160 / 0.18), transparent 70%);
  --gradient-text: linear-gradient(135deg, oklch(0.97 0.01 250), oklch(0.78 0.19 295));

  --shadow-glow: 0 0 60px -10px oklch(0.68 0.21 290 / 0.5);
  --shadow-card: 0 20px 60px -20px oklch(0 0 0 / 0.5);

  --glass-bg: oklch(1 0 0 / 0.04);
  --glass-border: oklch(1 0 0 / 0.08);
  --glass-blur: blur(20px) saturate(180%);

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
}

html.light {
  --background: oklch(0.99 0.005 250);
  --foreground: oklch(0.18 0.03 270);
  --card: oklch(1 0 0);
  --muted: oklch(0.95 0.01 270);
  --muted-foreground: oklch(0.50 0.03 270);
  --primary: oklch(0.58 0.22 290);
  --border: oklch(0.18 0.03 270 / 0.10);
  --input-bg: oklch(0.18 0.03 270 / 0.04);
  --gradient-hero:
    radial-gradient(ellipse 80% 60% at 50% 0%, oklch(0.58 0.22 290 / 0.18), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 30%, oklch(0.72 0.18 220 / 0.12), transparent 70%);
  --gradient-text: linear-gradient(135deg, oklch(0.30 0.08 290), oklch(0.55 0.20 295));
  --shadow-glow: 0 0 60px -10px oklch(0.58 0.22 290 / 0.35);
  --shadow-card: 0 20px 60px -20px oklch(0.18 0.05 270 / 0.15);
  --glass-bg: oklch(1 0 0 / 0.6);
  --glass-border: oklch(0.18 0.03 270 / 0.08);
}

* { box-sizing: border-box; }
html { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); min-height: 100vh; line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: oklch(0.68 0.21 290 / 0.4); }
img { max-width: 100%; display: block; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border);
}
.glass-strong {
  background: oklch(1 0 0 / 0.08); backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%); border: 1px solid oklch(1 0 0 / 0.12);
}
html.light .glass-strong { background: oklch(1 0 0 / 0.7); border-color: oklch(0.18 0.03 270 / 0.08); }
.gradient-text { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gradient-primary { background: var(--gradient-primary); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 50; border-left: 0; border-right: 0; border-top: 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 0.6rem; background: var(--gradient-primary);
  color: var(--primary-foreground); display: grid; place-items: center;
}
.brand-name { font-family: var(--font-display); font-size: 1.05rem; }
.nav-links { display: none; gap: 1.8rem; font-size: 0.9rem; color: var(--muted-foreground); }
.nav-links a:hover { color: var(--foreground); }
.nav-cta { display: flex; align-items: center; gap: 0.5rem; position: relative; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-user { position: relative; }
.nav-avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  background: var(--gradient-primary); color: var(--primary-foreground);
  border: 1px solid var(--glass-border); display: grid; place-items: center;
  font-weight: 700; font-size: 0.8rem; cursor: pointer;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  min-width: 220px; border-radius: 1rem; padding: 0.5rem;
  display: none; flex-direction: column;
}
.nav-user.open .nav-menu { display: flex; }
.nav-menu a, .nav-menu button {
  background: none; border: 0; text-align: left; color: var(--foreground);
  padding: 0.6rem 0.8rem; border-radius: 0.6rem; font-size: 0.875rem; cursor: pointer;
}
.nav-menu a:hover, .nav-menu button:hover { background: oklch(1 0 0 / 0.06); }
.nav-menu-name { padding: 0.5rem 0.8rem 0; font-weight: 600; font-size: 0.875rem; }
.nav-menu-role { padding: 0 0.8rem 0.5rem; font-size: 0.7rem; color: var(--muted-foreground); text-transform: capitalize; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 9999px; font-weight: 600; font-size: 0.875rem;
  padding: 0 1.1rem; height: 40px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
  color: var(--foreground); background: transparent; font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gradient-primary); color: var(--primary-foreground); }
.btn-ghost { background: transparent; }
.btn-ghost.glass { border-color: var(--glass-border); }
.btn-outline { border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-lg { height: 48px; padding: 0 1.6rem; font-size: 0.95rem; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm { height: 32px; padding: 0 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ---------- FORMS ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.label { font-size: 0.8rem; font-weight: 600; color: var(--foreground); }
.input, .textarea, .select {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border);
  color: var(--foreground); border-radius: 0.7rem; padding: 0.65rem 0.9rem;
  font-family: inherit; font-size: 0.9rem; transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.68 0.21 290 / 0.2);
}
.textarea { resize: vertical; min-height: 100px; }
.checkbox { width: 1rem; height: 1rem; accent-color: var(--primary); }
.input-icon { position: relative; }
.input-icon .input { padding-left: 2.3rem; }
.input-icon svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--muted); color: var(--foreground);
}
.badge-primary { background: var(--gradient-primary); color: var(--primary-foreground); }
.badge-success { background: oklch(0.72 0.18 155 / 0.2); color: var(--success); }
.badge-warning { background: oklch(0.78 0.15 75 / 0.2); color: var(--warning); }
.badge.cursor { cursor: pointer; }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--gradient-hero); pointer-events: none; }
.hero-inner { position: relative; text-align: center; padding: 5rem 1.5rem 7rem; max-width: 56rem; }
@media (min-width: 1024px) { .hero-inner { padding: 7rem 1.5rem 9rem; } }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500;
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
}
.pill-icon { color: var(--primary); }
.display { margin-top: 1.5rem; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.05; }
.lead { margin: 1.5rem auto 0; max-width: 36rem; color: var(--muted-foreground); font-size: 1.05rem; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.hero-features { margin: 3.5rem auto 0; max-width: 40rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.feature-chip { border-radius: 1rem; padding: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.chip-icon { color: var(--primary); display: inline-block; margin-bottom: 0.4rem; }

/* page hero (small) */
.page-hero { position: relative; }
.page-hero-bg { position: absolute; inset: 0; background: var(--gradient-hero); opacity: 0.6; }
.page-hero-inner { position: relative; padding: 4rem 1.5rem 2.5rem; max-width: 80rem; margin: 0 auto; }

/* ---------- SECTIONS ---------- */
.section { padding: 5rem 1.5rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.5rem; gap: 1rem; flex-wrap: wrap; }
.eyebrow { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary); }
.h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-top: 0.5rem; }
.h2 { margin-top: 0.5rem; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
.h3 { font-size: 1.25rem; font-weight: 600; }
.muted { color: var(--muted-foreground); }
.see-all { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.875rem; color: var(--muted-foreground); }
.see-all:hover { color: var(--foreground); }

/* ---------- GRIDS ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- COURSE CARDS ---------- */
.course-card { border-radius: 1.5rem; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.course-thumb { position: relative; aspect-ratio: 16/10; background: var(--gradient-primary); overflow: hidden; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.25rem 0.6rem;
  border-radius: 9999px; background: oklch(0 0 0 / 0.5); color: #fff;
  font-size: 0.7rem; font-weight: 600; backdrop-filter: blur(8px);
}
.course-price {
  position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.25rem 0.6rem;
  border-radius: 9999px; background: oklch(0 0 0 / 0.55); color: #fff;
  font-size: 0.7rem; font-weight: 700; backdrop-filter: blur(8px);
}
.course-price.free { background: oklch(0.72 0.18 155 / 0.85); }
.course-body { padding: 1.25rem; }
.course-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-desc { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-teacher { margin-top: 1rem; display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: var(--muted-foreground); }
.course-avatar { width: 28px; height: 28px; border-radius: 9999px; background: var(--gradient-primary); display: grid; place-items: center; color: var(--primary-foreground); font-size: 0.7rem; font-weight: 700; overflow: hidden; }
.course-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* skeleton */
.skel { border-radius: 1.5rem; overflow: hidden; }
.skel-block {
  background: linear-gradient(90deg, oklch(1 0 0 / 0.04) 0%, oklch(1 0 0 / 0.10) 50%, oklch(1 0 0 / 0.04) 100%);
  background-size: 200% 100%; animation: shimmer 1.5s linear infinite;
}
.skel-thumb { aspect-ratio: 16/10; }
.skel-line { height: 12px; border-radius: 6px; margin: 0.5rem 1.25rem; }
.skel-line.w-2\/3 { width: 66%; }
.skel-line.w-full { width: calc(100% - 2.5rem); }
.skel-card { height: 180px; border-radius: 1.5rem; }

/* empty */
.empty { border-radius: 1.5rem; padding: 3rem 1.5rem; text-align: center; grid-column: 1 / -1; }
.empty h3 { font-family: var(--font-display); font-size: 1.25rem; margin-top: 1rem; }
.empty p { margin: 0.5rem auto 1.5rem; max-width: 32rem; color: var(--muted-foreground); font-size: 0.9rem; }
.empty-icon { color: color-mix(in oklab, var(--primary) 70%, transparent); }

/* ---------- CTA / TEACHER ---------- */
.cta { position: relative; overflow: hidden; border-radius: 1.75rem; padding: 2.5rem; }
@media (min-width: 1024px) { .cta { padding: 4rem; } }
.cta-glow { position: absolute; top: -80px; right: -80px; width: 18rem; height: 18rem; border-radius: 9999px; background: var(--gradient-primary); filter: blur(60px); opacity: 0.3; pointer-events: none; }
.cta-grid { position: relative; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .cta-grid { grid-template-columns: 1fr 1fr; } }
.cta-text { margin-top: 1rem; color: var(--muted-foreground); }
.cta-tiles { gap: 1rem; }
.tile { border-radius: 1rem; padding: 1.25rem; }
.tile-title { margin-top: 0.7rem; font-weight: 600; font-size: 0.875rem; }
.tile-sub { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* steps */
.steps { margin-top: 3rem; }
.step { position: relative; border-radius: 1rem; padding: 1.75rem; }
.step-num { position: absolute; top: 1rem; right: 1.25rem; font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; opacity: 0.1; }
.step-icon { color: var(--primary); }
.step-title { margin-top: 1rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.step-sub { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.875rem; }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-text { color: var(--muted-foreground); font-size: 0.8rem; }

/* ---------- AUTH PAGES ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-side { position: relative; display: none; padding: 3rem; }
@media (min-width: 1024px) { .auth-side { display: flex; flex-direction: column; } }
.auth-side-bg { position: absolute; inset: 0; background: var(--gradient-hero); }
.auth-side-content { position: relative; margin: auto 0; max-width: 28rem; }
.auth-side-title { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1.1; }
.auth-side-text { margin-top: 1.5rem; color: var(--muted-foreground); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-form { width: 100%; max-width: 26rem; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0; color: var(--muted-foreground); font-size: 0.75rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.role-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.5rem 0; }
.role-tile {
  text-align: left; background: var(--glass-bg); border: 1px solid var(--border);
  border-radius: 1rem; padding: 1rem; cursor: pointer; transition: all 0.15s;
  font-family: inherit; color: var(--foreground);
}
.role-tile.selected { border-color: var(--primary); background: oklch(0.68 0.21 290 / 0.1); box-shadow: var(--shadow-glow); }
.role-tile p { margin-top: 0.5rem; font-weight: 600; font-size: 0.875rem; }
.role-tile small { display: block; color: var(--muted-foreground); font-size: 0.75rem; margin-top: 0.2rem; }

/* ---------- TOAST ---------- */
#toast-root { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.85rem 1.1rem; border-radius: 0.7rem; font-size: 0.875rem;
  background: var(--card); color: var(--foreground); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); opacity: 0; transform: translateY(8px);
  transition: all 0.25s; min-width: 240px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); color: var(--danger); }

/* ---------- DASHBOARD ---------- */
.dash-hero { position: relative; border-radius: 1.75rem; padding: 2rem; overflow: hidden; }
@media (min-width: 640px) { .dash-hero { padding: 2.5rem; } }
.dash-hero-glow { position: absolute; top: -2.5rem; right: -2.5rem; height: 12rem; width: 12rem; border-radius: 9999px; background: var(--gradient-primary); filter: blur(60px); opacity: 0.3; }
.stat { border-radius: 1rem; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }
.stat-icon { height: 44px; width: 44px; border-radius: 0.75rem; background: var(--gradient-primary); display: grid; place-items: center; color: var(--primary-foreground); box-shadow: var(--shadow-glow); }
.stat-label { font-size: 0.75rem; color: var(--muted-foreground); }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.dash-section { margin-top: 2.5rem; }
.dash-section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.mini-course { border-radius: 1rem; overflow: hidden; transition: box-shadow 0.2s; }
.mini-course:hover { box-shadow: var(--shadow-glow); }
.mini-course-thumb { aspect-ratio: 16/10; position: relative; background: var(--gradient-primary); }
.mini-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-course-status { position: absolute; top: 0.6rem; right: 0.6rem; padding: 0.15rem 0.5rem; border-radius: 9999px; font-size: 0.65rem; font-weight: 600; }

/* ---------- COURSE DETAIL ---------- */
.detail-hero { position: relative; }
.detail-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 2fr 1fr; } }
.teacher-pill { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.25rem 1.25rem 0.25rem 0.25rem; border-radius: 9999px; margin-top: 1.5rem; transition: background 0.15s; }
.teacher-pill:hover { background: oklch(1 0 0 / 0.06); }
.teacher-pill img, .teacher-pill .teacher-pill-fb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.teacher-pill-fb { background: var(--gradient-primary); }
.enroll-card { border-radius: 1.5rem; overflow: hidden; box-shadow: var(--shadow-card); }
.enroll-thumb { aspect-ratio: 16/9; background: var(--muted); position: relative; }
.enroll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.enroll-body { padding: 1.5rem; }
.enroll-price { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; }
.enroll-features { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; color: var(--muted-foreground); }
.enroll-features li { display: flex; align-items: center; gap: 0.5rem; }
.curriculum { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.curr-item { border-radius: 1rem; overflow: hidden; }
.curr-item summary { padding: 1rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.curr-item summary::-webkit-details-marker { display: none; }
.curr-item[open] summary { border-bottom: 1px solid var(--border); }
.curr-body { padding: 1rem 1.25rem; }
.chap-block { padding: 0.5rem 0; }
.chap-title { font-weight: 600; font-size: 0.9rem; }
.lec-list { margin-top: 0.5rem; list-style: none; padding: 0; }
.lec-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; color: var(--muted-foreground); font-size: 0.875rem; }
.lec-row a { color: var(--muted-foreground); display: flex; align-items: center; gap: 0.5rem; flex: 1; }
.lec-row a:hover { color: var(--foreground); }

/* ---------- TEACHER PROFILE ---------- */
.teacher-banner { position: relative; height: 16rem; overflow: hidden; }
.teacher-banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.teacher-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--background)); }
.teacher-header { position: relative; margin-top: -5rem; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 640px) { .teacher-header { flex-direction: row; align-items: end; } }
.teacher-avatar-lg { height: 7rem; width: 7rem; border-radius: 1.5rem; padding: 0.25rem; background: var(--card); box-shadow: var(--shadow-glow); }
.teacher-avatar-lg img, .teacher-avatar-lg .ph { width: 100%; height: 100%; border-radius: 1.25rem; object-fit: cover; }
.teacher-avatar-lg .ph { background: var(--gradient-primary); display: grid; place-items: center; color: var(--primary-foreground); }

/* ---------- LECTURE PLAYER ---------- */
.player-wrap { display: grid; gap: 1.5rem; padding: 1.5rem; max-width: 80rem; margin: 0 auto; }
@media (min-width: 1024px) { .player-wrap { grid-template-columns: 2fr 1fr; } }
.video-box { aspect-ratio: 16/9; border-radius: 1rem; overflow: hidden; background: #000; }
.video-box iframe, .video-box video { width: 100%; height: 100%; border: 0; }
.lecture-sidebar { border-radius: 1rem; padding: 1rem; max-height: 75vh; overflow-y: auto; }
.lecture-sidebar h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.lec-sb-item { display: block; padding: 0.6rem 0.75rem; border-radius: 0.5rem; font-size: 0.85rem; color: var(--muted-foreground); }
.lec-sb-item:hover { background: oklch(1 0 0 / 0.06); color: var(--foreground); }
.lec-sb-item.active { background: oklch(0.68 0.21 290 / 0.15); color: var(--foreground); }

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: oklch(0 0 0 / 0.6);
  display: none; align-items: center; justify-content: center; z-index: 90; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 28rem; border-radius: 1rem; padding: 1.5rem;
  background: var(--card); border: 1px solid var(--border);
}
.modal h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }

.teacher-layout{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:1.5rem;
  align-items:start;
}

.teacher-sidebar{
  position:sticky;
  top:90px;
  display:grid;
  gap:1rem;
}

.teacher-box{
  padding:1.2rem;
  border-radius:1.5rem;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
}

.teacher-box h3{
  margin-bottom:.9rem;
  font-size:1rem;
}

.teacher-box form{
  display:grid;
  gap:.75rem;
}

.curr-item{
  border-radius:1.25rem;
  overflow:hidden;
}

.chap-block{
  padding:.8rem 1rem;
  border-top:1px solid rgba(255,255,255,.06);
}

.lec-row a{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.8rem 1rem;
  border-radius:1rem;
  transition:.2s;
}

.lec-row a:hover{
  background:rgba(255,255,255,.05);
}

@media(max-width:900px){
  .teacher-layout{
    grid-template-columns:1fr;
  }

  .teacher-sidebar{
    position:static;
  }
}

.curr-page-head{
  margin-top:1.2rem;
  padding:1.5rem;
  border-radius:1.6rem;
}

.curr-add-panel{
  margin-top:1.5rem;
  padding:1.3rem;
  border-radius:1.6rem;
  display:grid;
  gap:1rem;
}

.curr-form{
  padding:1rem;
  border-radius:1.2rem;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  display:grid;
  gap:.75rem;
}

.curr-tree{
  margin-top:2rem;
  display:grid;
  gap:1.5rem;
}

.subject-card{
  padding:1.3rem;
  border-radius:1.6rem;
}

.subject-top{
  display:flex;
  gap:1rem;
  align-items:center;
}

.chapter-list{
  margin-top:1.2rem;
  display:grid;
  gap:1rem;
}

.chapter-card{
  padding:1rem;
  border-radius:1.3rem;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
}

.chapter-top{
  display:flex;
  align-items:center;
  gap:.8rem;
}

.lecture-list{
  margin-top:.9rem;
  display:grid;
  gap:.7rem;
}

.lecture-card{
  padding:.75rem;
  border-radius:1rem;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
  display:flex;
  align-items:center;
  gap:.8rem;
  color:inherit;
  text-decoration:none;
  transition:.2s;
}

.lecture-card:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.075);
}

.curr-thumb{
  width:82px;
  height:62px;
  border-radius:1rem;
  overflow:hidden;
  flex-shrink:0;
  background:rgba(255,255,255,.08);
  display:grid;
  place-items:center;
}

.curr-thumb.small{
  width:58px;
  height:45px;
  border-radius:.8rem;
}

.curr-thumb.tiny{
  width:52px;
  height:40px;
  border-radius:.75rem;
}

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

.curr-thumb-fallback{
  font-size:1.5rem;
}

.curr-empty{
  padding:1.5rem;
  border-radius:1.4rem;
}

@media(max-width:700px){
  .subject-top{
    align-items:flex-start;
  }

  .curr-thumb{
    width:72px;
    height:56px;
  }
}

/* utility */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-6 { margin-bottom: 1.5rem; }
.text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }

/* ---------- ANIMATIONS ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.fade-up { animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
