/* ==========================================================================
   Internal LMS Application — interface styles
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
}

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --bg: #070b12;
  --bg-soft: #0a0f19;
  --bg-deep: #05080e;
  --surface: #0d1420;
  --surface-2: #111a28;
  --surface-3: #162132;
  --surface-hover: #182337;
  --surface-raised: #101a2a;

  --border: rgba(151, 168, 193, 0.13);
  --border-strong: rgba(157, 179, 211, 0.24);
  --border-faint: rgba(151, 168, 193, 0.075);

  --text: #edf3fc;
  --text-soft: #c3cfdf;
  --muted: #8d9db4;
  --faint: #617187;
  --ink: #080c14;

  --accent: #6d8cff;
  --accent-2: #9a7bff;
  --accent-soft: rgba(109, 140, 255, 0.14);
  --accent-line: rgba(109, 140, 255, 0.34);
  --accent-glow: rgba(109, 140, 255, 0.3);

  --success: #43d9a3;
  --success-soft: rgba(67, 217, 163, 0.13);
  --warning: #f4b860;
  --warning-soft: rgba(244, 184, 96, 0.13);
  --danger: #ff7185;
  --danger-soft: rgba(255, 113, 133, 0.12);
  --info: #58c6ff;
  --info-soft: rgba(88, 198, 255, 0.13);

  --sidebar-width: 300px;
  --topbar-height: 74px;
  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 18px 54px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.52);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
}

body.app-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.modal-open,
body.sidebar-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button:disabled {
  cursor: not-allowed;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

::selection {
  background: rgba(109, 140, 255, 0.34);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 154, 184, 0.28) transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(133, 154, 184, 0.24);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(133, 154, 184, 0.4);
  background-clip: content-box;
}

/* --------------------------------------------------------------------------
   Icons, type and small primitives
   -------------------------------------------------------------------------- */

.icon {
  flex: 0 0 auto;
  vertical-align: middle;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.optional {
  color: var(--faint);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(67, 217, 163, 0.45);
  animation: livePulse 2.4s var(--ease-fast) infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(67, 217, 163, 0.4); }
  70% { box-shadow: 0 0 0 7px rgba(67, 217, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 217, 163, 0); }
}

.eyebrow,
.page-eyebrow,
.section-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.page-eyebrow {
  color: var(--accent);
  margin-bottom: 9px;
}

.gradient-text {
  background: linear-gradient(115deg, #9e8dff 8%, #65a4ff 52%, #68e1d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dot-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 9px;
  border-radius: 50%;
  background: var(--faint);
  vertical-align: middle;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 18% 10%, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(145deg, #7f7bff, #4b8cff 68%, #2cb8d6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 24px rgba(76, 108, 255, 0.28);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.brand-mark.large {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  margin: 0 auto 26px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--text);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(145deg, #293a58, #18243a);
  color: #dce7ff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.avatar.tiny {
  width: 26px;
  height: 26px;
  font-size: 9px;
}

.avatar.is-empty {
  color: var(--faint);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.avatar.is-more {
  background: var(--surface-3);
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform 180ms var(--ease),
    background 180ms var(--ease-fast),
    border-color 180ms var(--ease-fast),
    color 180ms var(--ease-fast),
    box-shadow 180ms var(--ease-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  transform: none;
}

.btn svg {
  flex: 0 0 auto;
}

.btn-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 62%),
    linear-gradient(120deg, #718cff, #5f7ef5 55%, #7d68e9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 22px rgba(78, 107, 245, 0.28);
}

.btn-primary:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 62%),
    linear-gradient(120deg, #7e97ff, #6b88fb 55%, #8a75f1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 28px rgba(78, 107, 245, 0.36);
}

.btn-ghost {
  color: var(--text-soft);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.btn-subtle {
  color: var(--text-soft);
  border-color: rgba(109, 140, 255, 0.18);
  background: rgba(109, 140, 255, 0.09);
}

.btn-subtle:hover {
  color: #fff;
  border-color: rgba(109, 140, 255, 0.3);
  background: rgba(109, 140, 255, 0.16);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, #ff8496, #e95870);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(218, 64, 89, 0.24);
}

.btn-danger:hover {
  background: linear-gradient(180deg, #ff92a2, #ef647b);
}

.btn-danger-ghost {
  color: #ff95a5;
  border-color: rgba(255, 113, 133, 0.2);
  background: rgba(255, 113, 133, 0.06);
}

.btn-danger-ghost:hover {
  color: #ffb3be;
  border-color: rgba(255, 113, 133, 0.32);
  background: rgba(255, 113, 133, 0.11);
}

.btn-success-soft {
  color: #70e5be;
  border-color: rgba(67, 217, 163, 0.24);
  background: rgba(67, 217, 163, 0.11);
}

.btn-success-soft:hover {
  color: #91f1d1;
  background: rgba(67, 217, 163, 0.16);
}

.btn-lg {
  min-height: 49px;
  padding: 0 23px;
  border-radius: 13px;
  font-size: 14.5px;
}

.btn-sm {
  min-height: 35px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn-complete {
  padding-inline: 15px;
}

.push-left {
  margin-right: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  transition:
    color 160ms var(--ease-fast),
    background 160ms var(--ease-fast),
    border-color 160ms var(--ease-fast);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.icon-btn.tiny {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

.icon-btn.danger:hover {
  color: #ff91a1;
  border-color: rgba(255, 113, 133, 0.2);
  background: rgba(255, 113, 133, 0.08);
}

.icon-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.field input,
.field textarea,
.field select,
.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: rgba(7, 12, 21, 0.62);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  transition:
    border-color 160ms var(--ease-fast),
    background 160ms var(--ease-fast),
    box-shadow 160ms var(--ease-fast);
}

.field textarea,
.stack-form textarea {
  min-height: 88px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.stack-form input::placeholder,
.stack-form textarea::placeholder {
  color: #53647b;
}

.field input:hover,
.field textarea:hover,
.stack-form input:hover,
.stack-form textarea:hover {
  border-color: rgba(157, 179, 211, 0.21);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.stack-form input:focus,
.stack-form textarea:focus {
  border-color: var(--accent);
  background: rgba(9, 15, 26, 0.92);
  box-shadow:
    0 0 0 3px rgba(109, 140, 255, 0.14),
    inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.field input:disabled,
.field textarea:disabled {
  opacity: 0.6;
}

.field-hint {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.field-group {
  padding-top: 4px;
}

.field-group legend {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 113, 133, 0.22);
  border-radius: 9px;
  background: rgba(255, 113, 133, 0.08);
  color: #ffacb8;
  font-size: 12.5px;
  line-height: 1.45;
}

.form-alert svg {
  margin-top: 1px;
}

.form-alert.is-shaking {
  animation: shake 380ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap input {
  padding-left: 44px;
  padding-right: 44px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.input-wrap:focus-within .input-icon {
  color: var(--accent);
}

.input-action {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  transform: translateY(-50%);
  color: var(--faint);
  transition: color 160ms ease, background 160ms ease;
}

.input-action:hover,
.input-action.is-active {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
}

.input-action .eye-closed {
  display: none;
}

.input-action.is-active .eye-open {
  display: none;
}

.input-action.is-active .eye-closed {
  display: block;
}

.input-with-actions {
  display: flex;
  gap: 7px;
}

.input-with-actions input {
  flex: 1;
  min-width: 0;
}

.input-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.input-action-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.switch-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.switch-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row strong {
  font-size: 12.5px;
  color: var(--text-soft);
}

.switch-row small {
  color: var(--faint);
  font-size: 11px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 11px;
  border: 1px solid var(--border-faint);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.check-row:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.check-row:has(input:checked) {
  border-color: rgba(109, 140, 255, 0.24);
  background: rgba(109, 140, 255, 0.07);
}

.check-row input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--accent);
}

.check-row-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--course-accent, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--course-accent, var(--accent)) 45%, transparent);
}

.check-row-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.check-row-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-row-copy span {
  color: var(--faint);
  font-size: 10.5px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 11, 19, 0.5);
  color: var(--faint);
}

.search-field:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.1);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-field input::placeholder {
  color: #596a82;
}

.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.accent-picker {
  display: flex;
  gap: 8px;
}

.accent-picker input[type='color'] {
  width: 44px;
  min-width: 44px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(7, 12, 21, 0.6);
  cursor: pointer;
}

.accent-picker input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.accent-picker input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.accent-picker input[type='text'] {
  min-height: 42px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accent-swatches {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.accent-swatch {
  width: 21px;
  height: 21px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.11);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.accent-swatch:hover {
  transform: scale(1.12);
}

.accent-swatch.is-active {
  border-color: var(--surface);
  box-shadow:
    0 0 0 2px var(--swatch),
    0 0 12px color-mix(in srgb, var(--swatch) 45%, transparent);
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */

.progress-bar {
  position: relative;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(157, 179, 211, 0.12);
}

.progress-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #80b9ff 55%, #62dfca);
  box-shadow: 0 0 14px rgba(109, 140, 255, 0.38);
  transition: width 500ms var(--ease);
}

.progress-ring {
  --pct: 0;
  --size: 56px;
  --stroke: 5px;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--pct) * 1%),
    rgba(157, 179, 211, 0.13) 0
  );
  box-shadow: 0 0 22px rgba(109, 140, 255, 0.12);
}

.progress-ring::before {
  content: '';
  position: absolute;
  inset: var(--stroke);
  border-radius: 50%;
  background: var(--surface);
}

.progress-ring > span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.205);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  border: 2px solid rgba(157, 179, 211, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.spinner-sm {
  width: 15px;
  height: 15px;
  border-width: 1.8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 34px clamp(34px, 5vw, 76px) 30px;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(90% 70% at 20% 2%, rgba(67, 89, 182, 0.22), transparent 58%),
    radial-gradient(70% 55% at 95% 100%, rgba(47, 144, 173, 0.15), transparent 60%),
    linear-gradient(145deg, #0b1220 0%, #080d16 55%, #060a11 100%);
  isolation: isolate;
}

.auth-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(129, 153, 192, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 153, 192, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 2%, transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, #000 2%, transparent 82%);
}

.auth-stars {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.58;
  background-image:
    radial-gradient(circle at 18% 21%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 12%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 64% 46%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.6px),
    radial-gradient(circle at 34% 72%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 78%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px);
  background-size: 530px 470px, 390px 420px, 610px 560px, 470px 390px, 350px 380px;
}

.auth-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.auth-glow-a {
  top: -220px;
  left: -140px;
  width: 600px;
  height: 540px;
  background: rgba(89, 83, 255, 0.16);
}

.auth-glow-b {
  right: -230px;
  bottom: -190px;
  width: 640px;
  height: 560px;
  background: rgba(34, 168, 187, 0.12);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  width: min(100%, 580px);
  margin: auto 0;
  padding: 54px 0 48px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(125, 151, 194, 0.17);
  border-radius: 99px;
  background: rgba(9, 16, 29, 0.58);
  color: #9eacc1;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.auth-visual h1 {
  margin: 22px 0 18px;
  font-size: clamp(48px, 5.8vw, 78px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.auth-visual h1.auth-title {
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-lead {
  max-width: 500px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.course-teaser {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: min(100%, 530px);
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(11, 19, 32, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 20px 55px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.teaser-cover {
  position: relative;
  flex: 0 0 146px;
  min-height: 148px;
  overflow: hidden;
  background:
    radial-gradient(100% 90% at 15% 0%, rgba(113, 156, 255, 0.5), transparent 60%),
    linear-gradient(150deg, #223d6c, #15233e 52%, #0e182b);
}

.teaser-cover-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(180, 207, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 207, 255, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  transform: perspective(300px) rotateY(-10deg) scale(1.12);
}

.teaser-cover-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  transform: translate(-50%, -50%);
  background: rgba(10, 18, 33, 0.38);
  color: #dce8ff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.teaser-cover-code {
  position: absolute;
  left: 13px;
  bottom: 11px;
  color: rgba(231, 241, 255, 0.9);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.teaser-cover-code sup {
  font-size: 6px;
  letter-spacing: 0;
}

.teaser-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 20px 22px;
}

.teaser-label {
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.teaser-body h2 {
  max-width: 340px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.teaser-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 10.5px;
}

.teaser-meta span {
  position: relative;
}

.teaser-meta span + span::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--faint);
}

.auth-proof {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 500px;
  margin-top: 28px;
}

.proof-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(109, 140, 255, 0.18);
  border-radius: 10px;
  background: rgba(109, 140, 255, 0.08);
  color: #9bb0ff;
}

.auth-proof p {
  padding-top: 6px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #586980;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 38px clamp(30px, 4vw, 66px) 24px;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(90, 69, 180, 0.09), transparent 65%),
    linear-gradient(180deg, #080d15, #070b12 50%, #060a10);
}

.auth-panel-inner {
  width: min(100%, 394px);
  margin: auto;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.auth-heading {
  margin-bottom: 29px;
}

.auth-heading h2 {
  margin: 9px 0 10px;
  font-size: clamp(27px, 3vw, 34px);
  letter-spacing: -0.045em;
}

.auth-heading p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .field input {
  min-height: 48px;
  border-radius: 11px;
  background: rgba(9, 15, 26, 0.72);
}

.auth-form .btn-block {
  margin-top: 3px;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid var(--border-faint);
}

.auth-note-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--faint);
}

.auth-note p {
  padding-top: 4px;
  color: var(--faint);
  font-size: 10.8px;
  line-height: 1.6;
}

.auth-security {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 14px;
  border: 1px solid rgba(232, 93, 117, 0.17);
  border-radius: 11px;
  background: rgba(232, 93, 117, 0.045);
}

.auth-security-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: rgba(232, 93, 117, 0.08);
  color: #e39aa7;
}

.auth-security p {
  padding-top: 2px;
  color: var(--faint);
  font-size: 10.8px;
  line-height: 1.6;
}

.auth-security strong {
  color: var(--text-soft);
  font-weight: 600;
}

.auth-support {
  margin-top: 13px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.auth-copyright {
  margin-top: auto;
  padding-top: 28px;
  color: #4e5e73;
  font-size: 10px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Course cover artwork
   -------------------------------------------------------------------------- */

.course-cover {
  --course-accent: #6d8cff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 16 / 10.2;
  min-height: 150px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid color-mix(in srgb, var(--course-accent) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 15px;
  background:
    radial-gradient(110% 100% at 13% 0%, color-mix(in srgb, var(--course-accent) 52%, transparent), transparent 58%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--course-accent) 20%, transparent), transparent 60%),
    linear-gradient(150deg, #17243d 0%, #0f1829 55%, #0b1321 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -30px 45px rgba(0, 0, 0, 0.18),
    0 15px 35px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.course-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 45%, rgba(3, 7, 14, 0.5));
}

.course-cover.is-compact {
  aspect-ratio: 1.36;
  min-height: 108px;
  padding: 13px;
  border-radius: 13px;
}

.cover-grid {
  position: absolute;
  inset: -15%;
  z-index: -2;
  opacity: 0.37;
  background-image:
    linear-gradient(rgba(213, 231, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(213, 231, 255, 0.16) 1px, transparent 1px);
  background-size: 31px 31px;
  transform: perspective(390px) rotateX(20deg) rotateZ(-7deg) scale(1.17);
  mask-image: radial-gradient(circle at 52% 48%, #000 8%, transparent 73%);
  -webkit-mask-image: radial-gradient(circle at 52% 48%, #000 8%, transparent 73%);
}

.cover-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.46;
  pointer-events: none;
}

.cover-orb-a {
  top: -34%;
  right: -10%;
  width: 62%;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--course-accent) 72%, #6cdbff);
}

.cover-orb-b {
  left: 8%;
  bottom: -52%;
  width: 70%;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--course-accent) 38%, #7549e8);
  opacity: 0.2;
}

.cover-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cover-kicker {
  overflow: hidden;
  color: rgba(236, 244, 255, 0.68);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cover-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.44);
}

.cover-art {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 18px;
  transform: translate(-50%, -50%);
  background: rgba(6, 12, 23, 0.24);
  color: rgba(245, 250, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 16px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(9px);
}

.course-cover.is-compact .cover-art {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.cover-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cover-code {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.17em;
  color: rgba(244, 249, 255, 0.94);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.course-cover.is-compact .cover-code {
  font-size: 10px;
}

.cover-meta {
  color: rgba(228, 240, 255, 0.52);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Modals and toasts
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 5, 11, 0.72);
  opacity: 0;
  backdrop-filter: blur(9px);
  transition: opacity 180ms var(--ease-fast);
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal-backdrop.is-closing {
  opacity: 0;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 580px);
  max-height: min(88vh, 900px);
  max-height: min(88dvh, 900px);
  overflow: hidden;
  border: 1px solid rgba(157, 179, 211, 0.17);
  border-radius: 20px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(95, 77, 190, 0.08), transparent 58%),
    linear-gradient(180deg, #0f1726, #0b121e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 32px 110px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity 200ms var(--ease-fast),
    transform 260ms var(--ease);
}

.modal-card.sm {
  width: min(100%, 460px);
}

.modal-card.md {
  width: min(100%, 640px);
}

.modal-card.lg {
  width: min(100%, 820px);
}

.modal-backdrop.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-backdrop.is-closing .modal-card {
  opacity: 0;
  transform: translateY(8px) scale(0.99);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex: none;
  padding: 23px 24px 18px;
  border-bottom: 1px solid var(--border-faint);
}

.modal-head h2 {
  font-size: 21px;
  letter-spacing: -0.035em;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.modal-head .modal-close {
  margin: -5px -7px 0 0;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: none;
  padding: 16px 24px;
  border-top: 1px solid var(--border-faint);
  background: rgba(5, 9, 16, 0.3);
}

.confirm-message {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.credentials-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(6, 11, 19, 0.55);
}

.credentials-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--border-faint);
  background: rgba(109, 140, 255, 0.05);
}

.credentials-head > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.credentials-head strong {
  font-family: var(--font-display);
  font-size: 14px;
}

.credentials-head div span {
  color: var(--faint);
  font-size: 10.5px;
}

.credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--border-faint);
}

.credential-row:last-child {
  border-bottom: 0;
}

.credential-row > span {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.credential-row code {
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  text-align: right;
}

.credentials-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  color: var(--warning);
  font-size: 10.5px;
  line-height: 1.55;
}

.credentials-warning svg {
  margin-top: 1px;
}

.modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 20px;
  color: var(--faint);
  text-align: center;
}

.modal-empty p {
  font-size: 12px;
}

.modal-search {
  margin-bottom: 13px;
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(15, 23, 37, 0.97);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition:
    opacity 220ms var(--ease-fast),
    transform 260ms var(--ease);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast svg {
  margin-top: 1px;
  color: var(--accent);
}

.toast-success {
  border-color: rgba(67, 217, 163, 0.2);
}

.toast-success svg {
  color: var(--success);
}

.toast-error {
  border-color: rgba(255, 113, 133, 0.24);
}

.toast-error svg {
  color: var(--danger);
}

.toast-info svg {
  color: var(--info);
}

/* --------------------------------------------------------------------------
   Not-found page
   -------------------------------------------------------------------------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(50% 50% at 50% 35%, rgba(84, 80, 200, 0.13), transparent 70%),
    var(--bg);
}

.notfound .eyebrow {
  margin: 24px 0 8px;
  color: var(--accent);
}

.notfound h1 {
  font-size: clamp(28px, 5vw, 42px);
}

.notfound p:not(.eyebrow) {
  max-width: 420px;
  margin: 12px 0 23px;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   Application shell
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(95% 45% at 35% 0%, rgba(73, 78, 155, 0.11), transparent 65%),
    linear-gradient(180deg, #0b111c 0%, #080d16 55%, #070b12 100%);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.1);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: none;
  min-height: var(--topbar-height);
  padding: 0 22px;
  border-bottom: 1px solid var(--border-faint);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-name-long {
  font-size: 16px;
  letter-spacing: -0.025em;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 1px;
  padding: 0 6px;
  border: 1px solid rgba(109, 140, 255, 0.22);
  border-radius: 5px;
  background: rgba(109, 140, 255, 0.08);
  color: #9cadff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-close {
  display: none;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  background: rgba(2, 5, 10, 0.68);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity 220ms ease;
}

.sidebar-scrim.is-visible {
  opacity: 1;
}

.sidebar-course {
  flex: none;
  padding: 18px 15px 10px;
}

.course-switch {
  position: relative;
}

.course-switch-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 57px;
  padding: 9px 10px;
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.course-switch-btn:hover,
.course-switch-btn.is-open {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.course-switch-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--course-accent, var(--accent)) 32%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--course-accent, var(--accent)) 15%, transparent);
  color: color-mix(in srgb, var(--course-accent, var(--accent)) 75%, #fff);
}

.course-switch-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.course-switch-copy > span {
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-switch-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-switch-chevron {
  display: grid;
  place-items: center;
  color: var(--faint);
  transition: transform 180ms ease;
}

.course-switch-btn.is-open .course-switch-chevron {
  transform: rotate(180deg);
}

.course-switch-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 10;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #111a29;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.46);
  animation: menuIn 160ms var(--ease);
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.course-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 8px 9px;
  border-radius: 8px;
  transition: background 150ms ease;
}

.course-option:hover,
.course-option.is-active {
  background: rgba(255, 255, 255, 0.05);
}

.course-option-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--course-accent, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--course-accent, var(--accent)) 48%, transparent);
}

.course-option-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.course-option-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-option-copy span {
  color: var(--faint);
  font-size: 9.5px;
}

.course-option > svg {
  color: var(--accent);
}

.sidebar-course-empty {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 11px;
  color: var(--faint);
}

.sidebar-course-empty-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-course-empty div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-course-empty strong {
  color: var(--muted);
  font-size: 10.5px;
}

.sidebar-course-empty span:not(.sidebar-course-empty-icon) {
  font-size: 9.5px;
  line-height: 1.4;
}

.sidebar-label {
  flex: none;
  padding: 13px 22px 7px;
}

.sidebar-label > span {
  color: #516178;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.module-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 11px 16px;
  scrollbar-gutter: stable;
}

.module-block {
  margin-bottom: 3px;
  border-radius: 9px;
}

.module-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border-radius: 8px;
  text-align: left;
  transition: background 160ms ease;
}

.module-toggle:hover {
  background: rgba(255, 255, 255, 0.035);
}

.module-index {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border: 1px solid var(--border-faint);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.024);
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.module-block.is-open .module-index {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: #aebeff;
}

.module-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.module-title {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 160ms ease;
}

.module-block.is-open .module-title,
.module-toggle:hover .module-title {
  color: var(--text);
}

.module-meta {
  color: #596a80;
  font-size: 8.5px;
  letter-spacing: 0.01em;
}

.module-chevron {
  display: grid;
  place-items: center;
  color: #56677d;
  transition: transform 180ms var(--ease);
}

.module-block.is-open .module-chevron,
.module-panel.is-open .module-chevron,
.editor-module.is-open .module-chevron {
  transform: rotate(180deg);
  color: var(--muted);
}

.module-rail {
  height: 2px;
  margin: 0 9px 2px 43px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(157, 179, 211, 0.07);
}

.module-rail > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #62dfca);
  transition: width 450ms var(--ease);
}

.module-lessons {
  display: none;
  padding: 3px 0 8px;
}

.module-block.is-open .module-lessons {
  display: block;
  animation: moduleOpen 220ms var(--ease);
}

@keyframes moduleOpen {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.lesson-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin: 1px 4px 1px 10px;
  padding: 6px 8px 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.lesson-link:hover {
  background: rgba(255, 255, 255, 0.035);
}

.lesson-link.is-active {
  border-color: rgba(109, 140, 255, 0.18);
  background: rgba(109, 140, 255, 0.1);
}

.lesson-status {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border-radius: 50%;
  color: var(--faint);
}

.lesson-status.is-todo {
  border: 1px solid rgba(157, 179, 211, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.lesson-status.is-done {
  border: 1px solid rgba(67, 217, 163, 0.28);
  background: var(--success-soft);
  color: var(--success);
}

.lesson-status.is-progress {
  position: relative;
  border: 1px solid transparent;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(157, 179, 211, 0.13) 0);
}

.lesson-status.is-progress::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #0b111c;
}

.lesson-status.is-progress span {
  position: relative;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.lesson-link.is-active .lesson-status.is-progress::before {
  background: #111b2d;
}

.lesson-link-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.lesson-link-title {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.2px;
  font-weight: 400;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease;
}

.lesson-link:hover .lesson-link-title,
.lesson-link.is-active .lesson-link-title {
  color: var(--text);
}

.lesson-link.is-complete .lesson-link-title {
  color: #8192a8;
}

.lesson-link.is-active.is-complete .lesson-link-title {
  color: var(--text-soft);
}

.lesson-link-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #516278;
  font-size: 8.5px;
  line-height: 1.35;
}

.note-dot {
  display: inline-flex;
  color: var(--warning);
}

.sidebar-footer {
  flex: none;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-faint);
  background: rgba(4, 8, 14, 0.18);
}

.sidebar-progress-card {
  padding: 12px;
  border: 1px solid var(--border-faint);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.sidebar-progress-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-progress-top > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-progress-top > div:last-child > span {
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-progress-top strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-progress-card .progress-bar {
  height: 3px;
  margin-top: 10px;
}

.sidebar-progress-card > p {
  margin-top: 7px;
  color: #526278;
  font-size: 8.7px;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  padding: 5px 4px 0;
}

.sidebar-account-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.sidebar-account-copy strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-copy span {
  color: #516177;
  font-size: 8.5px;
}

.sidebar-account .icon-btn {
  width: 29px;
  height: 29px;
}

.nav-skeleton {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 7px 4px;
}

.skeleton-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.skeleton-line span {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(157, 179, 211, 0.08), rgba(157, 179, 211, 0.15), rgba(157, 179, 211, 0.08));
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
}

.skeleton-line span:last-child {
  width: 53%;
  height: 6px;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.module-nav-empty {
  margin: 8px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--faint);
  font-size: 10px;
  text-align: center;
}

/* Main / topbar */

.main {
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-width));
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: none;
  min-height: var(--topbar-height);
  padding: 0 clamp(22px, 3.2vw, 42px);
  border-bottom: 1px solid var(--border-faint);
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.menu-btn {
  display: none;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-eyebrow {
  overflow: hidden;
  max-width: 480px;
  color: #596b83;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-heading {
  overflow: hidden;
  max-width: min(52vw, 720px);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.top-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 2px;
}

.top-progress-label {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}

.top-progress-track {
  width: 82px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(157, 179, 211, 0.12);
}

.top-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #6ee1cc);
  transition: width 450ms var(--ease);
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 0 10px;
  border: 1px solid var(--border-faint);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.topbar-link:hover {
  color: var(--text-soft);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.profile-wrap {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}

.profile-trigger:hover,
.profile-trigger.is-open {
  border-color: var(--border-faint);
  background: rgba(255, 255, 255, 0.035);
}

.profile-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 140px;
}

.profile-name {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role {
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.35;
}

.profile-chevron {
  color: var(--faint);
  transition: transform 180ms ease;
}

.profile-trigger.is-open .profile-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  width: 238px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #111a29;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.52);
  animation: menuIn 170ms var(--ease);
}

.dropdown-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 9px 10px;
}

.dropdown-user > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dropdown-user strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-user span:not(.avatar) {
  color: var(--faint);
  font-size: 9.5px;
}

.dropdown-sep {
  height: 1px;
  margin: 4px 5px;
  background: var(--border-faint);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 37px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10.8px;
  font-weight: 500;
  text-align: left;
  transition: color 150ms ease, background 150ms ease;
}

.dropdown-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-item.danger:hover {
  color: #ff9aa8;
  background: rgba(255, 113, 133, 0.08);
}

.main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background:
    radial-gradient(70% 45% at 90% 0%, rgba(61, 79, 150, 0.07), transparent 60%),
    radial-gradient(45% 35% at 8% 22%, rgba(51, 123, 148, 0.035), transparent 65%),
    var(--bg);
}

.view {
  width: 100%;
  min-height: 100%;
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: calc(100vh - var(--topbar-height));
  min-height: calc(100dvh - var(--topbar-height));
  color: var(--faint);
  font-size: 11.5px;
}

/* ==========================================================================
   Student dashboard
   ========================================================================== */

.dashboard-page,
.course-page,
.lesson-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(27px, 3.4vw, 48px) clamp(22px, 3.8vw, 54px) 70px;
  animation: pageIn 360ms var(--ease);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 29px;
}

.page-heading h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.05em;
}

.page-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-heading-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--border-faint);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  font-size: 9.5px;
}

.page-heading-badge svg {
  color: var(--warning);
}

.continue-card {
  --course-accent: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(235px, 0.58fr);
  min-height: 278px;
  overflow: hidden;
  margin-bottom: 23px;
  border: 1px solid color-mix(in srgb, var(--course-accent) 22%, var(--border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(85% 120% at 5% 0%, color-mix(in srgb, var(--course-accent) 24%, transparent), transparent 62%),
    radial-gradient(70% 100% at 100% 100%, rgba(47, 119, 148, 0.12), transparent 60%),
    linear-gradient(120deg, #111a2b, #0c1320 58%, #0a101a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 26px 70px rgba(0, 0, 0, 0.2);
  isolation: isolate;
}

.continue-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(189, 211, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 211, 247, 0.055) 1px, transparent 1px);
  background-size: 43px 43px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.continue-glow {
  position: absolute;
  top: -150px;
  left: 30%;
  z-index: -1;
  width: 330px;
  height: 300px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--course-accent) 28%, transparent);
  filter: blur(80px);
  opacity: 0.7;
  pointer-events: none;
}

.continue-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
}

.continue-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: color-mix(in srgb, var(--course-accent) 60%, #fff);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.continue-card h1 {
  max-width: 700px;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.continue-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.continue-sub span {
  color: var(--faint);
}

.continue-progress {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(100%, 355px);
  margin: 22px 0 18px;
}

.continue-progress .progress-bar {
  flex: 1;
  height: 4px;
}

.continue-progress > span {
  color: var(--faint);
  font-size: 9px;
  white-space: nowrap;
}

.continue-visual {
  position: relative;
  align-self: stretch;
  overflow: hidden;
  margin: 17px 17px 17px 0;
  border: 1px solid rgba(157, 179, 211, 0.12);
  border-radius: 20px;
  background:
    radial-gradient(90% 70% at 78% 12%, color-mix(in srgb, var(--course-accent) 36%, transparent), transparent 64%),
    linear-gradient(145deg, #16233b, #0c1524 68%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.continue-visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.37;
  background-image:
    linear-gradient(rgba(200, 222, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 222, 255, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: perspective(300px) rotateX(16deg) rotateZ(-5deg) scale(1.25);
  mask-image: radial-gradient(circle at 60% 50%, #000, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 60% 50%, #000, transparent 74%);
}

.continue-visual-top {
  position: absolute;
  top: 16px;
  left: 17px;
  right: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(229, 240, 255, 0.52);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.continue-visual-top svg {
  color: rgba(229, 240, 255, 0.7);
}

.continue-visual-title {
  position: absolute;
  top: 50%;
  left: 22px;
  right: 22px;
  transform: translateY(-50%);
  color: #f0f6ff;
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.03em;
}

.continue-visual-meta {
  position: absolute;
  top: calc(50% + 37px);
  left: 22px;
  color: rgba(208, 227, 255, 0.46);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.continue-visual-orbit {
  position: absolute;
  right: -45px;
  bottom: -55px;
  display: grid;
  place-items: center;
  width: 155px;
  height: 155px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(8, 15, 27, 0.22);
  box-shadow:
    0 0 0 18px rgba(255, 255, 255, 0.025),
    0 0 0 38px rgba(255, 255, 255, 0.016);
  color: rgba(234, 243, 255, 0.72);
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.05em;
  backdrop-filter: blur(6px);
}

.continue-visual-label {
  position: absolute;
  right: 20px;
  bottom: 17px;
  color: rgba(229, 240, 255, 0.4);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.continue-card.is-caught-up {
  display: block;
  min-height: 220px;
}

.continue-card.is-caught-up .continue-kicker {
  color: var(--success);
}

.continue-card.is-caught-up .button-row {
  margin-top: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 31px;
}

.stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 75%),
    rgba(13, 20, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 200ms ease, background 200ms ease, transform 200ms var(--ease);
}

.stat-card:hover {
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), transparent 75%),
    rgba(14, 22, 36, 0.8);
  transform: translateY(-1px);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 15px;
  border: 1px solid rgba(109, 140, 255, 0.18);
  border-radius: 10px;
  background: rgba(109, 140, 255, 0.09);
  color: #9db0ff;
}

.stat-icon.blue {
  border-color: rgba(88, 198, 255, 0.18);
  background: rgba(88, 198, 255, 0.08);
  color: #85d3ff;
}

.stat-icon.amber {
  border-color: rgba(244, 184, 96, 0.18);
  background: rgba(244, 184, 96, 0.08);
  color: #ffca7c;
}

.stat-icon.rose {
  border-color: rgba(255, 113, 133, 0.17);
  background: rgba(255, 113, 133, 0.08);
  color: #ff9cac;
}

.stat-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-copy > span {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stat-copy strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.stat-copy strong em {
  color: var(--faint);
  font-size: 0.52em;
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.stat-spark {
  position: absolute;
  right: 18px;
  top: 20px;
  width: 43px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(157, 179, 211, 0.1);
}

.stat-spark > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #63dfcd);
}

.stat-caption {
  margin-top: 9px;
  color: #526379;
  font-size: 8.7px;
  line-height: 1.4;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.dashboard-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 13px;
}

.section-heading.compact h2 {
  font-size: 16px;
}

.section-count {
  padding-bottom: 3px;
  color: var(--faint);
  font-size: 9.5px;
}

.muted-icon {
  color: #4f6077;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.course-card {
  --course-accent: var(--accent);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  background: rgba(12, 19, 31, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    transform 250ms var(--ease),
    border-color 200ms ease,
    box-shadow 250ms var(--ease);
}

.course-card:hover {
  border-color: color-mix(in srgb, var(--course-accent) 22%, var(--border));
  transform: translateY(-3px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.course-card-visual {
  position: relative;
  display: block;
  margin: 8px 8px 0;
}

.course-card-visual .course-cover {
  aspect-ratio: 16 / 8.6;
  min-height: 0;
  border-radius: 14px;
}

.course-card-progress {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border-radius: 50%;
  background: rgba(6, 12, 22, 0.68);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.course-card-progress .progress-ring {
  --size: 43px !important;
  --stroke: 4px !important;
  background: conic-gradient(var(--course-accent) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.16) 0);
  box-shadow: none;
}

.course-card-progress .progress-ring::before {
  background: #0b1321;
}

.course-card-progress .progress-ring > span {
  font-size: 9px;
}

.course-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 16px;
}

.course-instructor {
  overflow: hidden;
  color: color-mix(in srgb, var(--course-accent) 55%, #aab9ca);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.course-card h3 {
  margin: 4px 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.course-card h3 a:hover {
  color: #dce8ff;
}

.course-card-body > p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 32px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 11px;
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 8.5px;
}

.course-meta-row > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.course-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 8.5px;
}

.course-progress-row strong {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.course-card .progress-bar {
  height: 3px;
  margin-bottom: 13px;
}

.course-card .btn {
  min-height: 36px;
  margin-top: auto;
  border-radius: 9px;
  font-size: 10.5px;
}

.activity-card {
  position: sticky;
  top: 26px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.023), transparent 40%),
    rgba(11, 17, 27, 0.68);
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 51px;
  padding: 8px 1px;
  border-bottom: 1px solid var(--border-faint);
  transition: opacity 160ms ease;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item:hover {
  opacity: 0.8;
}

.activity-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--course-accent) 26%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--course-accent) 10%, transparent);
  color: color-mix(in srgb, var(--course-accent) 72%, #fff);
}

.activity-dot.is-done {
  border-color: rgba(67, 217, 163, 0.24);
  background: rgba(67, 217, 163, 0.08);
  color: var(--success);
}

.activity-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.activity-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy span {
  overflow: hidden;
  color: #56677d;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-state {
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 16px;
  color: var(--faint);
  text-align: center;
}

.activity-empty p {
  max-width: 210px;
  font-size: 10px;
  line-height: 1.55;
}

.activity-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 15px;
  padding: 11px;
  border: 1px solid rgba(109, 140, 255, 0.12);
  border-radius: 9px;
  background: rgba(109, 140, 255, 0.055);
}

.activity-tip-icon {
  color: #94a8ff;
}

.activity-tip p {
  color: #7789a2;
  font-size: 8.8px;
  line-height: 1.5;
}

/* Empty and error states */

.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 44px 28px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(109, 140, 255, 0.06), transparent 70%),
    rgba(11, 17, 27, 0.55);
  text-align: center;
}

.state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.state-icon.accent {
  border-color: rgba(109, 140, 255, 0.2);
  background: rgba(109, 140, 255, 0.09);
  color: #a4b4ff;
}

.state-card h1,
.state-card h2 {
  font-size: clamp(22px, 3vw, 29px);
  letter-spacing: -0.04em;
}

.state-card p {
  max-width: 470px;
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.state-card.state-error .state-icon {
  border-color: rgba(255, 113, 133, 0.22);
  background: rgba(255, 113, 133, 0.08);
  color: var(--danger);
}

.empty-state {
  min-height: 380px;
}

/* ==========================================================================
   Course overview
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 10px;
}

.breadcrumb a {
  overflow: hidden;
  max-width: 280px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb svg {
  flex: none;
  color: #48586d;
}

.breadcrumb span {
  overflow: hidden;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-hero {
  --course-accent: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  gap: clamp(28px, 4vw, 60px);
  overflow: hidden;
  min-height: 350px;
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid color-mix(in srgb, var(--course-accent) 20%, var(--border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(72% 110% at 0% 0%, color-mix(in srgb, var(--course-accent) 18%, transparent), transparent 62%),
    radial-gradient(60% 90% at 100% 100%, rgba(41, 116, 140, 0.12), transparent 62%),
    linear-gradient(125deg, #101a2b, #0b121e 55%, #09101a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 25px 75px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(196, 217, 250, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 217, 250, 0.055) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(100deg, #000, transparent 72%);
  -webkit-mask-image: linear-gradient(100deg, #000, transparent 72%);
}

.course-hero-glow {
  position: absolute;
  top: -220px;
  left: 8%;
  z-index: -1;
  width: 440px;
  height: 380px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--course-accent) 26%, transparent);
  filter: blur(100px);
  opacity: 0.55;
}

.course-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.course-hero-copy h1 {
  max-width: 810px;
  margin-bottom: 13px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.course-hero-copy > p {
  max-width: 690px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 21px;
}

.hero-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border-faint);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.023);
  color: #8293aa;
  font-size: 9px;
}

.hero-chips svg {
  color: var(--faint);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.hero-progress-copy {
  color: var(--faint);
  font-size: 9.5px;
}

.course-hero-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  min-width: 0;
}

.course-hero-side .course-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-radius: 17px;
}

.hero-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  background: rgba(6, 12, 21, 0.42);
  backdrop-filter: blur(10px);
}

.hero-progress > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero-progress > div:last-child span {
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-progress strong {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.course-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
  margin-top: 33px;
}

.curriculum-section {
  min-width: 0;
}

.curriculum-heading {
  margin-bottom: 13px;
}

.module-panel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-panel {
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background: rgba(11, 18, 29, 0.54);
  transition: border-color 180ms ease, background 180ms ease;
}

.module-panel:hover {
  border-color: var(--border);
}

.module-panel.is-open {
  border-color: rgba(157, 179, 211, 0.18);
  background: rgba(12, 20, 33, 0.68);
}

.module-panel-head {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 16px;
  text-align: left;
}

.curriculum-index {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  border: 1px solid var(--border-faint);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
}

.module-panel.is-open .curriculum-index {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: #aebeff;
}

.curriculum-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.curriculum-module-title {
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curriculum-summary {
  overflow: hidden;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curriculum-module-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--faint);
  font-size: 8.5px;
}

.curriculum-duration {
  color: #56677e;
}

.module-panel-head .module-rail {
  display: none;
}

.module-panel > .module-rail {
  height: 2px;
  margin: 0 16px 2px 62px;
}

.module-panel-lessons {
  display: none;
  padding: 3px 8px 9px;
  border-top: 1px solid var(--border-faint);
}

.module-panel.is-open .module-panel-lessons {
  display: block;
  animation: moduleOpen 220ms var(--ease);
}

.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  padding: 8px 9px;
  border-radius: 8px;
  transition: background 150ms ease;
}

.curriculum-lesson:hover {
  background: rgba(255, 255, 255, 0.032);
}

.curriculum-lesson-number {
  width: 23px;
  flex: none;
  color: #4f6078;
  font-family: var(--font-display);
  font-size: 8.5px;
  text-align: center;
}

.curriculum-lesson-status {
  display: flex;
  flex: none;
}

.curriculum-lesson-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.curriculum-lesson-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.8px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curriculum-lesson.is-complete .curriculum-lesson-title {
  color: #8292a8;
}

.curriculum-lesson.is-next .curriculum-lesson-title {
  color: var(--text);
  font-weight: 500;
}

.next-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(109, 140, 255, 0.22);
  border-radius: 4px;
  background: rgba(109, 140, 255, 0.09);
  color: #9fafff;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curriculum-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: #52647a;
  font-size: 8px;
}

.curriculum-lesson-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.curriculum-lesson-duration {
  flex: none;
  color: #5b6d84;
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.curriculum-lesson-play {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--faint);
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.curriculum-lesson:hover .curriculum-lesson-play,
.curriculum-lesson.is-next .curriculum-lesson-play {
  opacity: 1;
}

.curriculum-lesson:hover .curriculum-lesson-play {
  background: var(--accent-soft);
  color: #a8b8ff;
}

.empty-module {
  padding: 17px;
  color: var(--faint);
  font-size: 10px;
  text-align: center;
}

.course-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-card {
  padding: 19px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background: rgba(11, 18, 29, 0.58);
}

.aside-card h2 {
  margin-bottom: 10px;
  font-size: 15px;
  letter-spacing: -0.025em;
}

.course-description {
  color: var(--muted);
  font-size: 10.2px;
  line-height: 1.7;
}

.course-description p + p {
  margin-top: 10px;
}

.aside-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid var(--border-faint);
}

.aside-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 33px;
  border-bottom: 1px solid rgba(151, 168, 193, 0.055);
}

.aside-meta > div:last-child {
  border-bottom: 0;
}

.aside-meta span {
  color: var(--faint);
  font-size: 9px;
}

.aside-meta strong {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 500;
  text-align: right;
}

.progress-aside-top {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.progress-aside-top > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.progress-aside-top > div:last-child span {
  color: var(--faint);
  font-size: 8.5px;
}

.progress-aside-top strong {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.progress-aside-top small {
  color: var(--faint);
  font-size: 8px;
}

.progress-aside .progress-bar {
  height: 4px;
}

.progress-aside > p {
  margin-top: 10px;
  color: #596b81;
  font-size: 8.8px;
  line-height: 1.5;
}

/* ==========================================================================
   Lesson and video player
   ========================================================================== */

.lesson-page {
  width: min(100%, 1560px);
  padding-bottom: 52px;
}

.lesson-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.lesson-heading-copy {
  min-width: 0;
}

.lesson-module-label {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lesson-heading h1 {
  max-width: 930px;
  font-size: clamp(23px, 2.85vw, 35px);
  letter-spacing: -0.045em;
  line-height: 1.14;
}

.lesson-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9px;
}

.lesson-meta-row > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lesson-meta-row svg {
  color: #53657c;
}

.lesson-meta-row .meta-complete {
  color: var(--success);
}

.lesson-meta-row .meta-complete svg {
  color: var(--success);
}

.lesson-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-top: 13px;
}

.lesson-heading-actions .btn {
  min-height: 38px;
  font-size: 10.5px;
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 25px;
  align-items: start;
}

.lesson-main {
  min-width: 0;
}

.player-mount {
  min-width: 0;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(157, 179, 211, 0.12);
  border-radius: 18px;
  background: #020407;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  outline: 0;
  isolation: isolate;
}

.player:focus-visible {
  box-shadow:
    0 0 0 2px var(--accent),
    0 25px 70px rgba(0, 0, 0, 0.34);
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020407;
  cursor: pointer;
}

.player video::cue {
  background: rgba(3, 7, 13, 0.86);
  color: #f5f9ff;
  font-family: var(--font-sans);
  font-size: 88%;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.player-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 9, 0.3);
  pointer-events: none;
}

.player-bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 0 0 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(101, 128, 246, 0.92);
  color: #fff;
  box-shadow:
    0 8px 35px rgba(0, 0, 0, 0.35),
    0 0 0 9px rgba(109, 140, 255, 0.11);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition:
    opacity 180ms var(--ease-fast),
    transform 220ms var(--ease),
    background 160ms ease;
  pointer-events: none;
  backdrop-filter: blur(5px);
}

.player.is-paused:not(.is-ended) .player-bigplay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.player-bigplay:hover {
  background: #7d96ff;
  transform: translate(-50%, -50%) scale(1.05);
}

.player:not(.is-paused) .player-bigplay {
  opacity: 0;
}

.player-resume {
  position: absolute;
  left: 16px;
  bottom: 74px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 14, 24, 0.84);
  color: #c3cfe1;
  font-size: 9.5px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.player-resume button {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(109, 140, 255, 0.18);
  color: #b7c4ff;
  font-size: 8.5px;
  font-weight: 600;
}

.player-error {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px;
  background: #060a10;
  color: var(--muted);
  text-align: center;
}

.player-error > span {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  margin-bottom: 2px;
  border: 1px solid rgba(255, 113, 133, 0.2);
  border-radius: 14px;
  background: rgba(255, 113, 133, 0.07);
  color: var(--danger);
}

.player-error strong {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 15px;
}

.player-error p {
  max-width: 340px;
  color: var(--faint);
  font-size: 10px;
}

.player-end {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(65% 80% at 50% 30%, rgba(84, 91, 194, 0.24), transparent 66%),
    rgba(4, 8, 14, 0.89);
  text-align: center;
  backdrop-filter: blur(8px);
}

.player-end-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border: 1px solid rgba(67, 217, 163, 0.24);
  border-radius: 50%;
  background: rgba(67, 217, 163, 0.1);
  color: var(--success);
  box-shadow: 0 0 0 8px rgba(67, 217, 163, 0.035);
}

.player-end-kicker {
  color: var(--success);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-end h3 {
  max-width: 560px;
  margin: 6px 0 5px;
  font-size: clamp(19px, 2.2vw, 26px);
  letter-spacing: -0.035em;
}

.player-end p {
  color: var(--faint);
  font-size: 10px;
}

.player-end-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 42px 15px 11px;
  background: linear-gradient(180deg, transparent, rgba(2, 5, 9, 0.56) 35%, rgba(2, 5, 9, 0.94));
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms var(--ease);
}

.player.controls-hidden .player-controls {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.player.is-ended .player-controls {
  opacity: 0;
  pointer-events: none;
}

.seek {
  position: relative;
  display: flex;
  align-items: center;
  height: 18px;
  margin-bottom: 4px;
  cursor: pointer;
}

.seek-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.seek-buffer,
.seek-filled {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
}

.seek-buffer {
  background: rgba(255, 255, 255, 0.26);
}

.seek-filled {
  background: linear-gradient(90deg, #7892ff, #8ca7ff);
  box-shadow: 0 0 10px rgba(109, 140, 255, 0.4);
}

.seek input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seek:hover .seek-track {
  height: 5px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.player-btn {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  padding: 0;
  border-radius: 7px;
  color: rgba(240, 246, 255, 0.8);
  transition: color 150ms ease, background 150ms ease;
}

.player-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.player-btn:disabled {
  opacity: 0.3;
}

.player-time {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 5px;
  color: rgba(232, 241, 255, 0.75);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-sep {
  color: rgba(232, 241, 255, 0.34);
}

.control-spacer {
  flex: 1;
}

.player-cc {
  width: 32px;
  border: 1px solid transparent;
  color: rgba(240, 246, 255, 0.5);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.player-cc.is-on {
  border-color: rgba(144, 165, 255, 0.27);
  background: rgba(109, 140, 255, 0.15);
  color: #c0cdff;
}

.speed-wrap,
.volume-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.player-speed {
  width: 35px;
  color: rgba(240, 246, 255, 0.72);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.player-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 12;
  min-width: 92px;
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(157, 179, 211, 0.17);
  border-radius: 8px;
  background: rgba(16, 24, 38, 0.98);
  box-shadow: 0 13px 38px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(16px);
}

.player-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 29px;
  padding: 0 8px;
  border-radius: 5px;
  color: rgba(225, 236, 251, 0.74);
  font-size: 9.5px;
  text-align: left;
}

.player-menu button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.player-menu button.is-active {
  color: #afbeff;
  background: rgba(109, 140, 255, 0.12);
}

.volume-wrap {
  width: 72px;
  margin: 0 1px;
}

.volume-wrap .player-btn {
  width: 29px;
}

.volume-input {
  width: 35px;
  height: 3px;
  margin: 0 2px;
  padding: 0;
  accent-color: #8da3ff;
  cursor: pointer;
  appearance: none;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.volume-input::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: #dce5ff;
}

.volume-input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #dce5ff;
}

.player:fullscreen,
.player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.player:fullscreen video,
.player:-webkit-full-screen video {
  width: 100%;
  height: 100%;
}

.player:fullscreen .player-controls,
.player:-webkit-full-screen .player-controls {
  padding-inline: 24px;
}

.lesson-below {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 14px;
}

.lesson-info-card {
  padding: 19px 20px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background: rgba(11, 18, 29, 0.55);
}

.lesson-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
}

.lesson-info-head h2 {
  margin-top: 4px;
  font-size: 15px;
  letter-spacing: -0.025em;
}

.lesson-info-module {
  overflow: hidden;
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid var(--border-faint);
  border-radius: 5px;
  color: var(--faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-description {
  max-width: 900px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.68;
}

.lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.lesson-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(151, 168, 193, 0.09);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: #596b83;
  font-size: 8px;
}

.lesson-tags svg {
  color: #61748e;
}

.lesson-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-faint);
  border-radius: 11px;
  background: rgba(11, 18, 29, 0.5);
  transition: border-color 160ms ease, background 160ms ease;
}

.pager-link:hover {
  border-color: var(--border);
  background: rgba(16, 25, 40, 0.66);
}

.pager-link.next {
  text-align: right;
}

.pager-link > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pager-link.next > span {
  justify-content: flex-end;
}

.pager-link strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.notes-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 65% at 100% 0%, rgba(109, 140, 255, 0.06), transparent 65%),
    rgba(11, 18, 29, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
}

.notes-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.notes-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border: 1px solid rgba(244, 184, 96, 0.17);
  border-radius: 8px;
  background: rgba(244, 184, 96, 0.07);
  color: #e4b15f;
}

.notes-title h2 {
  font-size: 12.5px;
  letter-spacing: -0.02em;
}

.notes-title div > span {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-size: 8px;
}

.note-status {
  flex: none;
  padding-top: 3px;
  color: var(--faint);
  font-size: 8px;
  white-space: nowrap;
}

.note-status.is-dirty {
  color: var(--warning);
}

.note-status.is-saving {
  color: var(--info);
}

.note-status.is-saved {
  color: var(--success);
}

.note-status.is-error {
  color: var(--danger);
}

.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px 9px;
}

.notes-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--border-faint);
  border-radius: 5px;
  color: var(--faint);
  font-size: 8px;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.notes-tool:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
}

.notes-input {
  display: block;
  width: calc(100% - 20px);
  min-height: 235px;
  max-height: 380px;
  margin: 0 10px;
  padding: 11px;
  resize: vertical;
  border: 1px solid var(--border-faint);
  border-radius: 9px;
  outline: 0;
  background:
    linear-gradient(rgba(157, 179, 211, 0.045) 1px, transparent 1px),
    rgba(5, 10, 18, 0.58);
  background-size: 100% 25px;
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 25px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.notes-input::placeholder {
  color: #4f6077;
}

.notes-input:focus {
  border-color: rgba(109, 140, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.08);
}

.notes-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px 11px;
  color: #506178;
  font-size: 7.8px;
}

.side-outline {
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background: rgba(11, 18, 29, 0.5);
}

.side-outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-faint);
}

.side-outline-head > span {
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-outline-head strong {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
}

.side-outline-list {
  max-height: 216px;
  overflow-y: auto;
  padding: 4px;
}

.side-outline-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 6px;
  transition: background 150ms ease;
}

.side-outline-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.side-outline-item.is-active {
  background: rgba(109, 140, 255, 0.09);
}

.side-outline-number {
  width: 18px;
  flex: none;
  color: #4f6078;
  font-family: var(--font-display);
  font-size: 7.5px;
  text-align: center;
}

.side-outline-item.is-active .side-outline-number {
  color: #96aaff;
}

.side-outline-title {
  overflow: hidden;
  flex: 1;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-outline-item.is-active .side-outline-title {
  color: var(--text);
}

.side-outline-item.is-complete .side-outline-title {
  color: #75879d;
}

.side-outline-check {
  display: grid;
  place-items: center;
  width: 14px;
  flex: none;
  color: var(--success);
}

.side-progress {
  padding: 12px 13px;
  border: 1px solid var(--border-faint);
  border-radius: 11px;
  background: rgba(11, 18, 29, 0.4);
}

.side-progress-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-progress-top > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-progress-top > div:last-child span {
  color: var(--faint);
  font-size: 8px;
}

.side-progress-top strong {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.side-progress > p {
  margin-top: 7px;
  color: #4f6077;
  font-size: 8px;
}

/* ==========================================================================
   Administration
   ========================================================================== */

.admin-body {
  background: var(--bg);
}

.admin-sidebar {
  background:
    radial-gradient(95% 48% at 25% 0%, rgba(70, 92, 178, 0.13), transparent 63%),
    linear-gradient(180deg, #0c121d 0%, #080d16 58%, #070b12 100%);
}

.admin-workspace-card {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 15px 5px;
  padding: 10px;
  border: 1px solid var(--border-faint);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-workspace-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(109, 140, 255, 0.18);
  border-radius: 8px;
  background: var(--accent-soft);
  color: #a5b5ff;
}

.admin-workspace-card > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.admin-workspace-card > div span {
  color: var(--faint);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.admin-workspace-card > div strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-live-dot,
.admin-status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(67, 217, 163, 0.5);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
  padding: 2px 11px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 41px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.admin-nav-link svg {
  color: #657791;
  transition: color 160ms ease;
}

.admin-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.admin-nav-link.is-active {
  border-color: rgba(109, 140, 255, 0.15);
  background: rgba(109, 140, 255, 0.09);
  color: #d6dfff;
}

.admin-nav-link.is-active svg {
  color: #9bafff;
}

.admin-quick-label {
  padding-top: 21px;
}

.admin-side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  margin: 0 15px;
  padding: 0 10px;
  border: 1px solid var(--border-faint);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.admin-side-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.admin-side-link > span {
  flex: 1;
}

.admin-side-arrow {
  color: var(--faint);
}

.admin-sidebar .sidebar-footer {
  margin-top: auto;
}

.admin-library-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 10px;
}

.admin-library-icon {
  color: var(--accent);
  font-size: 7px;
  text-shadow: 0 0 8px var(--accent);
}

.admin-library-note > div {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.admin-library-note strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-library-note div span {
  color: #4e5e74;
  font-size: 7.5px;
}

.admin-status-dot {
  margin-left: auto;
}

.admin-page {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(27px, 3.4vw, 48px) clamp(22px, 3.8vw, 54px) 70px;
  animation: pageIn 360ms var(--ease);
}

.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.admin-page-head-copy {
  min-width: 0;
}

.admin-page-head h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.05em;
}

.admin-page-head p {
  max-width: 680px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: none;
}

.page-actions .btn {
  min-height: 39px;
  font-size: 10.5px;
}

.admin-stat-grid {
  margin-bottom: 22px;
}

.admin-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(109, 140, 255, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(109, 140, 255, 0.095), rgba(109, 140, 255, 0.025)),
    rgba(11, 18, 29, 0.6);
}

.admin-banner-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: none;
  border: 1px solid rgba(109, 140, 255, 0.2);
  border-radius: 9px;
  background: rgba(109, 140, 255, 0.1);
  color: #aab9ff;
}

.admin-banner > div {
  min-width: 0;
  flex: 1;
}

.admin-banner strong {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.admin-banner p {
  margin-top: 2px;
  color: #7588a2;
  font-size: 9.5px;
  line-height: 1.5;
}

.admin-banner .btn {
  flex: none;
  min-height: 32px;
  font-size: 9.5px;
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%),
    rgba(11, 18, 29, 0.58);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--border-faint);
}

.panel-head > div {
  min-width: 0;
}

.panel-head h2 {
  margin-top: 3px;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.panel-head > div > p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 8.5px;
}

.panel-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border-faint);
  border-radius: 99px;
  color: var(--muted);
  font-size: 9px;
}

.table-panel {
  overflow: visible;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-faint);
  color: #586a81;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  height: 63px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(151, 168, 193, 0.06);
  color: var(--text-soft);
  font-size: 10.5px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.table-course {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
}

.table-course-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--course-accent, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--course-accent, var(--accent)) 42%, transparent);
}

.table-course > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.table-course strong {
  overflow: hidden;
  max-width: 430px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-course small {
  color: var(--faint);
  font-size: 8px;
}

.table-number {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.table-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
}

.table-progress .progress-bar {
  width: 72px;
  height: 3px;
}

.table-progress > span {
  color: var(--faint);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.table-action {
  width: 47px;
  text-align: right;
}

.table-action .icon-btn {
  width: 30px;
  height: 30px;
  border-color: var(--border-faint);
}

.recent-student-list {
  padding: 5px 10px;
}

.recent-student {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border-faint);
  border-radius: 7px;
  transition: background 150ms ease;
}

.recent-student:last-child {
  border-bottom: 0;
}

.recent-student:hover {
  background: rgba(255, 255, 255, 0.03);
}

.recent-student-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.recent-student-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-student-copy span {
  overflow: hidden;
  color: var(--faint);
  font-size: 7.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-student-date {
  flex: none;
  color: #526278;
  font-size: 8px;
}

.recent-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 33px 24px 37px;
  color: var(--faint);
  text-align: center;
}

.recent-empty > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.recent-empty p {
  max-width: 230px;
  color: #5d6f86;
  font-size: 9.5px;
  line-height: 1.55;
}

/* Admin courses list */

.admin-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  background: rgba(11, 18, 29, 0.58);
  transition: transform 220ms var(--ease), border-color 200ms ease, box-shadow 220ms var(--ease);
}

.admin-course-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.admin-course-visual {
  position: relative;
  display: block;
  margin: 8px 8px 0;
}

.admin-course-visual .course-cover {
  min-height: 0;
  aspect-ratio: 16 / 8.8;
}

.admin-course-badge {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 2;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(6, 12, 22, 0.48);
  color: rgba(237, 245, 255, 0.78);
  font-size: 7.5px;
  backdrop-filter: blur(7px);
}

.admin-course-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 16px;
}

.admin-course-body h2 {
  margin: 4px 0 6px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.admin-course-body h2 a:hover {
  color: #dce8ff;
}

.admin-course-body > p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 31px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-course-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: auto;
  padding: 10px 0;
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
}

.admin-course-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--border-faint);
}

.admin-course-metrics > div:first-child {
  padding-left: 0;
}

.admin-course-metrics > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-course-metrics strong {
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-course-metrics span {
  color: var(--faint);
  font-size: 7.5px;
}

.admin-course-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.admin-course-actions .btn {
  flex: 1;
  min-height: 33px;
  font-size: 9.5px;
}

.admin-empty-state {
  grid-column: 1 / -1;
  min-height: 330px;
}

/* Course editor */

.course-editor-page {
  padding-top: 29px;
}

.editor-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 17px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 160% at 0% 0%, rgba(76, 94, 175, 0.1), transparent 55%),
    rgba(11, 18, 29, 0.52);
}

.editor-head-cover {
  width: 146px;
  flex: none;
}

.editor-head-cover .course-cover {
  width: 100%;
}

.editor-head-copy {
  min-width: 0;
  flex: 1;
}

.editor-head-copy h1 {
  overflow: hidden;
  margin-bottom: 5px;
  font-size: clamp(20px, 2.3vw, 28px);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-head-copy > p {
  overflow: hidden;
  max-width: 760px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-head-copy .hero-chips {
  margin-top: 10px;
}

.editor-head-copy .hero-chips > span {
  min-height: 23px;
  font-size: 8px;
}

.editor-head-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex: none;
}

.editor-head-actions .btn {
  min-height: 33px;
  font-size: 9.5px;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.builder-panel {
  overflow: visible;
}

.builder-head {
  align-items: center;
}

.builder-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.builder-actions .btn {
  min-height: 32px;
  font-size: 9.5px;
}

.editor-module-list {
  padding: 8px;
}

.editor-module {
  margin-bottom: 6px;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 170ms ease, background 170ms ease;
}

.editor-module:last-child {
  margin-bottom: 0;
}

.editor-module.is-open {
  border-color: rgba(157, 179, 211, 0.16);
  background: rgba(255, 255, 255, 0.022);
}

.editor-module-head {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 6px 4px 4px;
}

.editor-module-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  min-height: 53px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
}

.editor-module-toggle:hover {
  background: rgba(255, 255, 255, 0.025);
}

.editor-module-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--border-faint);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 9px;
}

.editor-module.is-open .editor-module-index {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: #a9b9ff;
}

.editor-module-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.editor-module-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-module-copy span {
  overflow: hidden;
  color: var(--faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-module-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--faint);
  font-size: 8px;
}

.editor-module-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
  padding-left: 5px;
  border-left: 1px solid var(--border-faint);
}

.editor-module-actions .icon-btn {
  width: 27px;
  height: 27px;
}

.editor-module-body {
  display: none;
  padding: 2px 8px 9px 11px;
}

.editor-module.is-open .editor-module-body {
  display: block;
  animation: moduleOpen 180ms var(--ease);
}

.editor-module-empty {
  margin: 2px 0 8px;
  padding: 14px;
  border: 1px dashed var(--border-faint);
  border-radius: 8px;
  color: var(--faint);
  font-size: 8.5px;
  text-align: center;
}

.admin-lesson-list {
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--border-faint);
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.27);
}

.admin-lesson-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-faint);
  transition: background 140ms ease;
}

.admin-lesson-row:last-child {
  border-bottom: 0;
}

.admin-lesson-row:hover {
  background: rgba(255, 255, 255, 0.023);
}

.admin-lesson-index {
  width: 20px;
  flex: none;
  color: #4f6078;
  font-family: var(--font-display);
  font-size: 7.5px;
  text-align: center;
}

.admin-lesson-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 6px;
  background: rgba(109, 140, 255, 0.06);
  color: #788cb6;
}

.admin-lesson-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.admin-lesson-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-lesson-copy span {
  color: var(--faint);
  font-size: 7.5px;
}

.admin-lesson-badges {
  flex: none;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 19px;
  padding: 0 5px;
  border: 1px solid var(--border-faint);
  border-radius: 4px;
  color: var(--faint);
  font-size: 7px;
  white-space: nowrap;
}

.mini-badge.is-ok {
  border-color: rgba(67, 217, 163, 0.16);
  background: rgba(67, 217, 163, 0.055);
  color: #61d2ac;
}

.mini-badge.is-muted {
  opacity: 0.65;
}

.admin-lesson-actions {
  display: flex;
  align-items: center;
  flex: none;
  opacity: 0.34;
  transition: opacity 150ms ease;
}

.admin-lesson-row:hover .admin-lesson-actions {
  opacity: 1;
}

.admin-lesson-actions .icon-btn {
  width: 25px;
  height: 25px;
}

.add-lesson-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 33px;
  border: 1px dashed rgba(157, 179, 211, 0.13);
  border-radius: 7px;
  color: #687b93;
  font-size: 8.5px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.add-lesson-dashed:hover {
  border-color: var(--accent-line);
  background: rgba(109, 140, 255, 0.055);
  color: #a2b3ff;
}

.editor-aside {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}

.editor-aside .panel-head {
  padding: 15px 16px 12px;
}

.editor-aside .panel-head h2 {
  font-size: 14px;
}

.editor-aside .stack-form {
  padding: 15px 16px 16px;
  gap: 13px;
}

.editor-aside .field input,
.editor-aside .field textarea {
  min-height: 38px;
  font-size: 10.5px;
}

.editor-aside .field textarea {
  min-height: 95px;
}

.editor-aside .field-label {
  font-size: 9.5px;
}

.editor-aside .field-hint {
  font-size: 8px;
}

.editor-aside .btn-block {
  min-height: 38px;
  margin-top: 2px;
  font-size: 10px;
}

.enrollment-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
}

.avatar-stack {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.avatar-stack .avatar {
  margin-left: -5px;
  border: 2px solid #0c1420;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.enrollment-summary > p {
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.editor-aside .panel > .btn-block {
  width: calc(100% - 32px);
  min-height: 34px;
  margin: 0 16px 15px;
  font-size: 9.5px;
}

.panel-quiet {
  padding: 12px 16px;
  background: rgba(9, 15, 25, 0.42);
}

.aside-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  border-bottom: 1px solid var(--border-faint);
}

.aside-stat-row:last-of-type {
  border-bottom: 0;
}

.aside-stat-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 8.5px;
}

.aside-stat-row > strong {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 500;
  text-align: right;
}

.panel-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: #4d5e74;
  font-size: 7.5px;
}

/* Students */

.students-panel {
  overflow: hidden;
}

.students-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-faint);
}

.students-toolbar .search-field {
  width: min(100%, 360px);
  min-height: 37px;
}

.toolbar-count {
  flex: none;
  color: var(--faint);
  font-size: 9px;
}

.students-table td {
  height: 67px;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
}

.student-cell > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.student-cell strong {
  overflow: hidden;
  max-width: 240px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-cell small {
  overflow: hidden;
  max-width: 240px;
  color: var(--faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.course-chip {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  max-width: 130px;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--course-accent, var(--accent)) 20%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--course-accent, var(--accent)) 8%, transparent);
  color: color-mix(in srgb, var(--course-accent, var(--accent)) 60%, #d5e0f2);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-chip.is-more {
  border-color: var(--border-faint);
  background: rgba(255, 255, 255, 0.025);
  color: var(--faint);
}

.student-progress {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 110px;
}

.student-progress strong {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 500;
}

.student-progress span {
  color: var(--faint);
  font-size: 7.8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(67, 217, 163, 0.16);
  border-radius: 99px;
  background: rgba(67, 217, 163, 0.055);
  color: #5fd0aa;
  font-size: 7.5px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill > span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-inactive {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--faint);
}

.table-empty-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--faint);
  font-size: 10px;
}

/* Uploads and media modals */

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  gap: 10px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 155px;
  padding: 19px;
  overflow: hidden;
  border: 1px dashed rgba(157, 179, 211, 0.2);
  border-radius: 12px;
  background: rgba(5, 10, 18, 0.4);
  color: var(--faint);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease);
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent-line);
  background: rgba(109, 140, 255, 0.055);
}

.dropzone.is-dragging {
  transform: scale(1.008);
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border: 1px solid rgba(109, 140, 255, 0.17);
  border-radius: 11px;
  background: rgba(109, 140, 255, 0.07);
  color: #91a7ff;
}

.dropzone strong {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.dropzone > span:not(.dropzone-icon):not(.file-chip) {
  color: var(--faint);
  font-size: 8.5px;
}

.dropzone-hint {
  margin-top: 2px;
  color: #506076 !important;
  font-size: 7.5px !important;
}

.dropzone-small {
  min-height: 155px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(67, 217, 163, 0.17);
  border-radius: 5px;
  background: rgba(67, 217, 163, 0.06);
  color: #75dabb !important;
  font-size: 7.5px !important;
}

.file-chip small {
  color: #629781;
  font-size: 7px;
}

.file-chip span {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status {
  padding: 12px 13px;
  border: 1px solid var(--border-faint);
  border-radius: 9px;
  background: rgba(5, 10, 18, 0.42);
}

.upload-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.upload-status-top strong {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
}

.upload-status .progress-bar {
  height: 4px;
}

.upload-status > p {
  margin-top: 7px;
  color: var(--faint);
  font-size: 8px;
}

.media-summary {
  overflow: hidden;
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  background: rgba(5, 10, 18, 0.35);
}

.media-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 37px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-faint);
}

.media-summary-row:last-child {
  border-bottom: 0;
}

.media-summary-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 8.5px;
}

.media-summary-row strong {
  overflow: hidden;
  max-width: 70%;
  color: var(--text-soft);
  font-size: 8.5px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.media-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--border-faint);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.017);
}

.media-action-card > div:first-child {
  min-width: 0;
}

.media-action-card strong {
  display: block;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
}

.media-action-card p {
  margin-top: 1px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.45;
}

.media-button-row {
  display: flex;
  gap: 5px;
  flex: none;
}

.media-action-card .btn {
  min-height: 31px;
  font-size: 8.5px;
}

.media-actions + .upload-status,
.upload-status + .form-alert {
  margin-top: 11px;
}

.media-actions + .form-alert {
  margin-top: 11px;
}

.form-alert + .upload-grid {
  margin-top: 13px;
}

/* ==========================================================================
   Small utility coverage
   ========================================================================== */

.logo-mark {
  display: block;
  flex: none;
}

.enrollment-list {
  max-height: 330px;
}

.recent-panel {
  align-self: start;
}

.pager-link.prev {
  text-align: left;
}

.admin-shell {
  background: var(--bg);
}

/* ==========================================================================
   Responsive layout
   ========================================================================== */

@media (max-width: 1320px) {
  .lesson-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .lesson-sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
    gap: 13px;
    align-items: start;
  }

  .notes-card {
    grid-row: span 2;
  }

  .lesson-heading h1 {
    max-width: none;
  }
}

@media (max-width: 1200px) {
  .dashboard-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .activity-card {
    position: static;
  }

  .course-body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .course-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .admin-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-panel {
    position: static;
  }

  .course-hero {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.52fr);
    gap: 30px;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    width: min(88vw, 320px);
    transform: translateX(-103%);
    box-shadow: none;
    transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 30px 0 90px rgba(0, 0, 0, 0.52);
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-scrim {
    display: block;
    pointer-events: none;
  }

  .sidebar-scrim.is-visible {
    pointer-events: auto;
  }

  .main {
    width: 100%;
    margin-left: 0;
  }

  .menu-btn {
    display: grid;
  }

  .topbar {
    padding-inline: clamp(16px, 3vw, 30px);
  }
}

@media (max-width: 960px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-progress {
    display: none;
  }

  .page-heading,
  .admin-page-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .course-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .course-hero-side {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .course-hero-side .course-cover {
    max-width: 280px;
  }

  .lesson-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .notes-card {
    grid-row: auto;
  }

  .course-aside,
  .editor-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-head {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .editor-head-cover {
    grid-row: span 2;
    width: 120px;
  }

  .editor-head-copy {
    grid-column: 2;
  }

  .editor-head-copy h1 {
    white-space: normal;
  }

  .editor-head-copy > p {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .editor-head-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .editor-head-actions .btn {
    flex: 1;
  }

  .lesson-heading {
    flex-wrap: wrap;
    gap: 14px;
  }

  .lesson-heading-actions {
    padding-top: 0;
  }

  .lesson-heading-actions .btn {
    min-height: 38px;
  }

  .admin-page-head {
    align-items: flex-start;
  }

  .data-table {
    min-width: 720px;
  }

  .students-toolbar .search-field {
    width: min(100%, 420px);
  }
}

@media (max-width: 820px) {
  .topbar-heading {
    max-width: 50vw;
  }

  .profile-copy {
    display: none;
  }

  .profile-trigger {
    padding-right: 5px;
  }

  .course-grid {
    gap: 14px;
  }

  .course-card-body {
    padding: 14px;
  }

  .admin-course-grid {
    gap: 14px;
  }

  .admin-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-banner .btn {
    margin-left: 48px;
  }

  .lesson-heading-actions {
    width: 100%;
  }

  .lesson-heading-actions .btn {
    flex: 1;
  }

  .modal-backdrop {
    padding: 18px;
  }
}

@media (max-width: 700px) {
  :root {
    --topbar-height: 64px;
  }

  .dashboard-page,
  .course-page,
  .lesson-page,
  .admin-page {
    padding: 23px 16px 54px;
  }

  .admin-page.course-editor-page {
    padding-top: 22px;
  }

  .topbar {
    min-height: var(--topbar-height);
    gap: 10px;
    padding-inline: 14px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-link {
    width: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
  }

  .topbar-link span {
    display: none;
  }

  .profile-trigger {
    min-height: 40px;
    padding: 3px;
  }

  .profile-trigger .avatar {
    width: 34px;
    height: 34px;
  }

  .profile-chevron {
    display: none;
  }

  .topbar-heading {
    max-width: 52vw;
    font-size: 14.5px;
  }

  .topbar-eyebrow {
    max-width: 52vw;
  }

  .page-heading,
  .admin-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px;
  }

  .page-heading h1,
  .admin-page-head h1 {
    font-size: clamp(25px, 7vw, 31px);
  }

  .page-heading p,
  .admin-page-head p {
    font-size: 11.5px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .page-heading-badge {
    display: none;
  }

  .course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-card h3 {
    font-size: 17px;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 11px;
  }

  .stat-copy strong {
    font-size: 24px;
  }

  .continue-card {
    display: block;
    min-height: 0;
    border-radius: 20px;
  }

  .continue-body {
    padding: 25px 21px;
  }

  .continue-card h1 {
    font-size: clamp(24px, 7.4vw, 32px);
  }

  .continue-progress {
    width: 100%;
  }

  .continue-visual {
    display: none;
  }

  .course-hero {
    min-height: 0;
    padding: 25px 20px;
    border-radius: 20px;
  }

  .course-hero-copy h1 {
    font-size: clamp(26px, 7vw, 34px);
  }

  .course-hero-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-hero-side .course-cover {
    max-width: none;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .curriculum-module-meta {
    gap: 7px;
  }

  .curriculum-summary {
    white-space: normal;
  }

  .curriculum-lesson-play {
    display: none;
  }

  .lesson-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-info-head {
    flex-direction: column;
    gap: 6px;
  }

  .lesson-info-module {
    max-width: 100%;
  }

  .notes-input {
    min-height: 190px;
  }

  .editor-head {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .editor-head-cover {
    grid-row: auto;
    width: 100%;
    max-width: 200px;
  }

  .editor-head-copy,
  .editor-head-actions {
    grid-column: auto;
  }

  .editor-head-actions {
    width: 100%;
  }

  .editor-head-actions .btn {
    flex: 1;
  }

  .builder-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .builder-actions {
    width: 100%;
  }

  .builder-actions .btn {
    flex: 1;
  }

  .editor-module-meta > span:first-child {
    display: none;
  }

  .editor-module-actions .icon-btn:nth-child(1),
  .editor-module-actions .icon-btn:nth-child(2) {
    display: none;
  }

  .admin-lesson-badges {
    display: none;
  }

  .admin-lesson-row {
    flex-wrap: wrap;
  }

  .admin-lesson-actions {
    margin-left: auto;
    opacity: 1;
  }

  .admin-course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .students-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .students-toolbar .search-field {
    width: 100%;
  }

  .toolbar-count {
    text-align: right;
  }

  .admin-banner {
    flex-direction: column;
  }

  .admin-banner .btn {
    width: 100%;
    margin-left: 0;
  }

  .upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dropzone {
    min-height: 130px;
  }

  .media-action-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-button-row {
    width: 100%;
  }

  .media-button-row .btn {
    flex: 1;
  }

  .hide-sm {
    display: none;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card,
  .modal-card.sm,
  .modal-card.md,
  .modal-card.lg {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }

  .modal-head {
    padding: 19px 18px 14px;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-footer {
    padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
  }

  .modal-footer .btn {
    flex: 1;
  }

  .toast-root {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .topbar-heading {
    max-width: 47vw;
  }

  .topbar-eyebrow {
    max-width: 47vw;
  }

  .breadcrumb {
    font-size: 9px;
  }

  .breadcrumb a {
    max-width: 180px;
  }

  .course-card-progress {
    width: 45px;
    height: 45px;
  }

  .course-card-progress .progress-ring {
    --size: 39px !important;
    --stroke: 3px !important;
  }

  .hero-chips > span {
    font-size: 8.5px;
  }

  .curriculum-module-meta .curriculum-duration {
    display: none;
  }

  .lesson-module-label {
    white-space: normal;
  }

  .lesson-heading h1 {
    font-size: clamp(22px, 7vw, 29px);
  }

  .lesson-meta-row {
    gap: 4px 10px;
    font-size: 8.5px;
  }

  .player {
    border-radius: 13px;
  }

  .player-controls {
    padding: 34px 8px 8px;
  }

  .player-bigplay {
    width: 56px;
    height: 56px;
  }

  .player-time {
    gap: 2px;
    margin-left: 2px;
    font-size: 8px;
  }

  .volume-wrap {
    display: none;
  }

  .player-cc {
    width: 28px;
  }

  .player-speed {
    width: 30px;
  }

  .player-resume {
    left: 10px;
    bottom: 63px;
    max-width: calc(100% - 20px);
    font-size: 8.5px;
  }

  .player-end {
    padding: 20px;
  }

  .player-end-icon {
    width: 41px;
    height: 41px;
    margin-bottom: 8px;
  }

  .player-end h3 {
    font-size: 18px;
  }

  .player-end-actions .btn {
    min-height: 34px;
    font-size: 9.5px;
  }

  .notes-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .data-table {
    min-width: 660px;
  }

  .table-course strong {
    max-width: 260px;
  }

  .editor-module-actions {
    padding-left: 2px;
  }

  .editor-module-meta {
    gap: 5px;
  }

  .editor-module-meta .module-chevron {
    display: none;
  }

  .admin-lesson-index {
    display: none;
  }

  .accent-picker input[type='text'] {
    min-width: 0;
  }

  .modal-head h2 {
    font-size: 19px;
  }

  .credentials-head {
    padding: 13px;
  }

  .credential-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 9px 13px;
  }

  .credential-row code {
    text-align: left;
  }

  .auth-panel {
    padding: 26px 20px 20px;
  }

  .auth-mobile-brand {
    margin-bottom: 32px;
  }

  .auth-heading h2 {
    font-size: 27px;
  }

  .notfound {
    padding: 24px 20px;
  }
}

@media (max-width: 430px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
  }

  .stat-icon {
    margin-bottom: 0;
  }

  .stat-spark {
    display: none;
  }

  .stat-caption {
    display: none;
  }

  .topbar-heading {
    max-width: 44vw;
  }

  .topbar-eyebrow {
    max-width: 44vw;
  }

  .sidebar {
    width: min(90vw, 310px);
  }

  .player-time .time-sep,
  .player-time #durationTime {
    display: none;
  }

  .player-end-actions {
    width: 100%;
  }

  .player-end-actions .btn {
    flex: 1;
  }

  .admin-page-head .page-actions,
  .page-heading .page-actions {
    flex-direction: column;
  }

  .admin-page-head .page-actions .btn,
  .page-heading .page-actions .btn {
    width: 100%;
  }

  .media-button-row {
    flex-direction: column;
  }

  .modal-head,
  .modal-body {
    padding-inline: 15px;
  }

  .modal-footer {
    padding-inline: 15px;
  }

  .auth-panel {
    padding: 22px 16px 16px;
  }
}

@media (max-width: 1000px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-panel-inner {
    width: min(100%, 410px);
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-copyright {
    padding-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

