:root {
  --bg: #151515;
  --panel: #222;
  --panel-soft: #2a2a2a;
  --ink: #f8fafc;
  --muted: #9aa0aa;
  --line: #303238;
  --primary: #82ddff;
  --accent: #b38cff;
  --danger: #ff6b7a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 72% 8%, rgba(130,221,255,.14), transparent 30%),
    radial-gradient(circle at 18% 92%, rgba(179,140,255,.15), transparent 34%), var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,460px); }
.login-hero {
  padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(rgba(8,8,10,.38), rgba(8,8,10,.86)), url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.brand { display: flex; gap: 12px; align-items: center; font-weight: 900; font-size: 22px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--primary)); color: #111318; }
.hero-copy h1 { max-width: 760px; margin: 0 0 18px; font-size: clamp(42px, 7vw, 76px); line-height: .95; }
.hero-copy p { max-width: 560px; color: rgba(248,250,252,.84); font-size: 19px; line-height: 1.6; }
.login-panel { display: grid; place-items: center; padding: 34px; background: rgba(20,20,20,.82); }
.auth-card, .panel, .card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.auth-card { width: min(100%, 390px); padding: 30px; }
.field { display: grid; gap: 7px; margin-top: 16px; }
.field label { font-size: 13px; font-weight: 800; color: #d8dce5; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; background: #181818; color: var(--ink); outline: none; }
select[multiple] { min-height: 116px; }
.step-panel[hidden] { display: none; }
.step-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.course-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.course-choice { position: relative; display: block; cursor: pointer; }
.course-choice input { position: absolute; opacity: 0; pointer-events: none; }
.course-choice-card { min-height: 94px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #1a1a1d; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.course-choice:hover .course-choice-card { transform: translateY(-2px); border-color: var(--primary); }
.course-choice input:checked + .course-choice-card { border-color: var(--primary); background: rgba(130,221,255,.14); box-shadow: 0 0 0 2px rgba(130,221,255,.12); }
.course-choice-card strong { display: block; margin-bottom: 8px; }
.course-choice-card small { color: var(--muted); }
@media (max-width: 560px) { .course-selection-grid { grid-template-columns: 1fr; } }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(130,221,255,.13); }
.btn { min-height: 42px; border-radius: 7px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; color: #111318; background: linear-gradient(135deg, var(--accent), var(--primary)); }
.btn.secondary { color: var(--ink); background: #2d2d2d; }
.btn.danger { color: #fff; background: var(--danger); }
.full { width: 100%; margin-top: 20px; }
.demo-account { width: 100%; margin-top: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #242424; color: var(--ink); text-align: left; }
.muted { color: var(--muted); }
.error { margin-top: 14px; padding: 10px 12px; border-radius: 7px; color: #ffc9cf; background: rgba(255,107,122,.15); font-weight: 800; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); padding: 28px; background: #1f1f1f; }
.sidebar { padding: 28px 22px; border-right: 1px solid var(--line); border-radius: 20px 0 0 20px; background: #171717; }
.sidebar .brand { margin-bottom: 26px; }
.nav { display: grid; gap: 8px; }
.nav a { min-height: 42px; border-radius: 7px; padding: 10px 12px; display: flex; align-items: center; color: #b4b8c2; font-weight: 900; }
.nav a.active, .nav a:hover { color: #111318; background: linear-gradient(135deg, var(--accent), var(--primary)); }
.main { min-width: 0; padding: 28px; border-radius: 0 20px 20px 0; background: #1d1d1d; box-shadow: 0 28px 70px rgba(0,0,0,.36); }
.topbar, .toolbar, .actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar { margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 30px; }
.role-pill { padding: 7px 10px; border-radius: 999px; color: #111318; background: var(--primary); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.toolbar { margin-bottom: 16px; }
.stats, .course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.stat { padding: 18px; }
.stat strong { display: block; margin-top: 5px; font-size: 28px; }
.panel { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #979ca7; background: #1a1a1a; font-size: 12px; text-transform: uppercase; }
.card { overflow: hidden; }
.course-card { cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
.course-card:hover { transform: translateY(-3px); border-color: rgba(130,221,255,.55); }
.course-cover, .course-hero { background-position: center; background-size: cover; position: relative; overflow: hidden; }
.course-cover { min-height: 136px; padding: 18px; display: flex; align-items: end; font-weight: 900; font-size: 20px; background-image: linear-gradient(135deg, rgba(179,140,255,.92), rgba(130,221,255,.88)); }
.course-cover::before, .course-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.75)); }
.course-cover span, .course-hero h2 { position: relative; z-index: 1; }
.course-body { padding: 16px; display: grid; gap: 12px; }
.course-body h3 { margin: 0; }
.course-hero { min-height: 250px; margin-bottom: 22px; padding: 24px; display: flex; align-items: end; border-radius: 8px; background-image: linear-gradient(135deg, rgba(179,140,255,.92), rgba(130,221,255,.88)); }
.course-hero h2 { margin: 0; font-size: 34px; }
.module-list { display: grid; gap: 10px; }
.module-button { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #1a1a1a; color: var(--ink); text-align: left; }
.module-button:hover { border-color: rgba(130,221,255,.55); background: #252525; }
.video-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; background: #101010; }
.video-placeholder { min-height: 280px; display: grid; place-items: center; padding: 24px; border-radius: 8px; background: #151515; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; padding: 18px; background: rgba(0,0,0,.72); }
.modal-backdrop.open { display: grid; }
.modal { width: min(100%, 720px); max-height: 92vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 28px 70px rgba(0,0,0,.42); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.section-title { margin: 0 0 12px; padding: 16px 16px 0; font-size: 22px; }
.stepper { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.stepper span { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #1a1a1a; font-weight: 900; text-align: center; }
.stepper span.active { color: #111318; background: linear-gradient(135deg, var(--accent), var(--primary)); }

@media (max-width: 820px) {
  .login-shell, .app-shell { grid-template-columns: 1fr; }
  .app-shell { padding: 0; }
  .sidebar, .main { border-radius: 0; }
  .nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .nav a { justify-content: center; font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
}

