:root {
  --navy-950: #030919;
  --navy-900: #06132d;
  --navy-850: #091a3c;
  --navy-800: #0c2451;
  --blue: #176cff;
  --blue-600: #0d5ce9;
  --blue-soft: #e9f2ff;
  --violet: #735cf2;
  --violet-soft: #efecff;
  --mint: #19b981;
  --mint-soft: #e5faf2;
  --orange: #f28b2c;
  --orange-soft: #fff2e4;
  --ink: #0a1730;
  --muted: #65738b;
  --line: #e4eaf2;
  --surface: #f5f7fb;
  --white: #fff;
  --danger: #d43e56;
  --shadow-sm: 0 8px 28px rgba(8, 27, 64, .08);
  --shadow-md: 0 18px 54px rgba(8, 27, 64, .12);
  --shadow-lg: 0 30px 90px rgba(3, 15, 42, .2);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Segoe UI Variable", "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: inherit;
  transition: transform .22s var(--ease), filter .22s ease;
}
.auth-story > .brand,
.sidebar > .brand {
  width: fit-content;
  padding: 8px 13px 8px 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 19px;
  color: white;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  box-shadow: 0 18px 45px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}
.brand:hover { transform: translateY(-1px); }
.brand-logo-badge {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 18%, rgba(31,116,255,.20), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(222,235,255,.88));
  box-shadow: 0 13px 30px rgba(23,108,255,.18), inset 0 1px 0 rgba(255,255,255,.92);
}
.brand-logo-badge::after {
  content: "";
  position: absolute;
  inset: -45% 55% -45% -40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: rotate(18deg) translateX(-42%);
  transition: transform .65s var(--ease);
}
.brand:hover .brand-logo-badge::after { transform: rotate(18deg) translateX(185%); }
.brand-logo-badge img {
  position: relative;
  z-index: 1;
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(9,32,76,.16));
}
.brand-wordmark {
  display: grid;
  line-height: .93;
}
.brand-wordmark strong {
  display: block;
  color: currentColor;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.055em;
}
.brand-wordmark small {
  display: block;
  margin-top: 6px;
  color: #8fb4f4;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .27em;
  text-transform: uppercase;
}
.brand-logo-image {
  width: 166px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(23,108,255,.12));
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy small {
  margin-top: 5px;
  color: #8da2c3;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s ease, background .22s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), #5159ee);
  box-shadow: 0 12px 28px rgba(23, 108, 255, .28);
}
.button-primary:hover { box-shadow: 0 16px 35px rgba(23, 108, 255, .37); }
.button-secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button-soft { color: var(--blue-600); background: var(--blue-soft); }
.button-danger { color: var(--danger); background: #fff0f3; }
.button-block { width: 100%; }
.button-icon { width: 42px; min-height: 42px; padding: 0; border-radius: 12px; }
.button svg { width: 18px; height: 18px; }

/* Registration */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, .82fr) minmax(580px, 1.18fr);
  background: white;
}
.auth-story {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 38px clamp(34px, 5vw, 76px) 46px;
  color: white;
  background:
    radial-gradient(circle at 78% 12%, rgba(92, 98, 242, .42), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(23, 108, 255, .28), transparent 35%),
    var(--navy-950);
}
.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(111, 153, 221, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 153, 221, .11) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}
.auth-story > * { position: relative; z-index: 1; }
.auth-story .brand { color: white; }
.auth-story-content { max-width: 560px; margin: auto 0; padding: 72px 0 50px; }
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #9ec9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.auth-kicker::before { content: ""; width: 25px; height: 2px; border-radius: 5px; background: currentColor; }
.auth-story h1 {
  max-width: 620px;
  margin: 20px 0 21px;
  font-size: clamp(46px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -.06em;
}
.auth-story h1 span { color: #88c5ff; }
.auth-story-lead { max-width: 510px; margin: 0; color: #b9cae4; font-size: 17px; line-height: 1.7; }
.story-points { display: grid; gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.story-points li { display: flex; align-items: center; gap: 12px; color: #e7f0ff; font-size: 14px; font-weight: 650; }
.story-points span {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(123, 180, 255, .28);
  border-radius: 9px;
  color: #8fc7ff;
  background: rgba(34, 112, 229, .13);
}
.story-quote {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #9fb0cc;
  font-size: 12px;
  line-height: 1.55;
}
.quote-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #176cff, #8a6ef2);
  font-weight: 800;
}
.auth-workspace {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px clamp(24px, 6vw, 90px);
  background:
    radial-gradient(circle at 100% 0, rgba(23, 108, 255, .07), transparent 25%),
    white;
}
.auth-topline { width: min(100%, 620px); display: flex; justify-content: flex-end; margin-bottom: 22px; }
.auth-topline p { margin: 0; color: var(--muted); font-size: 13px; }
.text-link { color: var(--blue); font-weight: 750; cursor: pointer; background: none; padding: 0; }
.auth-card { width: min(100%, 620px); }
.auth-heading { margin-bottom: 30px; }
.auth-heading h2 { margin: 0 0 9px; font-size: clamp(31px, 4vw, 42px); letter-spacing: -.045em; }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.step-track { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.step-track span { height: 4px; flex: 1; border-radius: 99px; background: #e8edf5; transition: background .3s ease; }
.step-track span.active { background: linear-gradient(90deg, var(--blue), #615bea); }
.step-label { min-width: 82px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-card {
  position: relative;
  min-height: 218px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1.5px solid var(--line);
  border-radius: 21px;
  color: var(--ink);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: border-color .22s ease, transform .22s var(--ease), box-shadow .22s ease;
}
.role-card:hover { transform: translateY(-3px); border-color: #b7cffa; box-shadow: var(--shadow-sm); }
.role-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 108, 255, .09), var(--shadow-sm); }
.role-card.selected::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.role-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: var(--blue-soft);
}
.role-card.teacher .role-icon { color: var(--violet); background: var(--violet-soft); }
.role-icon svg { width: 26px; height: 26px; }
.role-card h3 { margin: 19px 0 7px; font-size: 19px; letter-spacing: -.02em; }
.role-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 25px; }
.auth-actions .button-primary { min-width: 175px; }
.auth-note { color: var(--muted); font-size: 11px; line-height: 1.5; }

.form-step[hidden] { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { display: grid; gap: 7px; }
.optional-label { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.field-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 750; }
.field input, .field select {
  width: 100%;
  height: 51px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 108, 255, .1); }
.field input.invalid, .field select.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(212, 62, 86, .08); }
.field-error { min-height: 14px; color: var(--danger); font-size: 10px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.input-action {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.input-action svg { width: 17px; height: 17px; }
.role-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 23px;
  padding: 12px 14px;
  border: 1px solid #dce8fb;
  border-radius: 13px;
  background: #f6f9ff;
}
.role-summary-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: white; }
.role-summary-icon svg { width: 19px; }
.role-summary div { display: grid; gap: 2px; }
.role-summary strong { font-size: 13px; }
.role-summary span { color: var(--muted); font-size: 11px; }
.change-role { margin-left: auto; color: var(--blue); background: none; cursor: pointer; font-size: 11px; font-weight: 750; }
.terms { display: flex; align-items: flex-start; gap: 10px; margin-top: 5px; }
.terms input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--blue); }
.terms label { color: var(--muted); font-size: 11px; line-height: 1.5; }
.terms a { color: var(--blue); font-weight: 700; }
.form-message { display: none; margin: 0 0 16px; padding: 11px 13px; border-radius: 11px; color: var(--danger); background: #fff1f3; font-size: 12px; }
.form-message.show { display: block; }
.existing-account {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid #cfeedd;
  border-radius: 13px;
  color: #146847;
  background: #f0fbf6;
  font-size: 12px;
}
.existing-account.show { display: flex; }
.existing-account .button { min-height: 36px; margin-left: auto; padding-inline: 12px; font-size: 11px; }

/* Dashboard shell */
.dashboard-body { min-height: 100vh; background: #f4f6fa; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 17px 19px;
  color: white;
  background:
    radial-gradient(circle at 30% 0, rgba(63, 101, 220, .24), transparent 26%),
    var(--navy-950);
}
.sidebar .brand { margin: 0 6px 22px; }
.sidebar .brand-wordmark small { color: #7fa6e8; }
.side-label { margin: 16px 13px 8px; color: #607493; font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-link {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 12px;
  color: #94a8c6;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.side-link:hover { color: white; background: rgba(255, 255, 255, .055); }
.side-link.active { color: white; background: linear-gradient(90deg, rgba(23, 108, 255, .25), rgba(23, 108, 255, .08)); }
.side-link.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 23px; border-radius: 0 4px 4px 0; background: #4b9cff; }
.side-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side-link .nav-badge { margin-left: auto; min-width: 20px; padding: 3px 6px; border-radius: 20px; color: white; background: var(--blue); font-size: 9px; text-align: center; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 13px; }
.academy-status { padding: 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 15px; background: rgba(255, 255, 255, .04); }
.academy-status-top { display: flex; justify-content: space-between; color: #bac9df; font-size: 10px; }
.academy-status-bar { height: 5px; margin: 10px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .09); }
.academy-status-bar span { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f85ff, #8c6cf2); }
.academy-status small { color: #6f83a2; font-size: 9px; }
.side-profile { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 13px; background: rgba(255,255,255,.045); }
.avatar {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #268cff, #7e68ee);
  font-size: 12px;
  font-weight: 850;
}
.avatar.teacher { background: linear-gradient(145deg, #735cf2, #b068d1); }
.side-profile-copy { min-width: 0; display: grid; gap: 3px; }
.side-profile-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.side-profile-copy span { color: #778dac; font-size: 9px; }
.logout-button { margin-left: auto; padding: 6px; color: #7890b2; background: transparent; cursor: pointer; }
.logout-button:hover { color: white; }
.logout-button svg { width: 16px; height: 16px; }

.app-main { grid-column: 2; min-width: 0; }
.topbar {
  height: 74px;
  position: sticky;
  z-index: 35;
  top: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(22px, 4vw, 50px);
  border-bottom: 1px solid rgba(220, 227, 238, .8);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
}
.menu-toggle { display: none; color: var(--ink); background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 23px; height: 23px; }
.searchbox { width: min(38vw, 360px); position: relative; }
.searchbox svg { position: absolute; top: 50%; left: 13px; width: 16px; color: #8390a4; transform: translateY(-50%); }
.searchbox input { width: 100%; height: 41px; border: 1px solid transparent; border-radius: 11px; outline: none; padding: 0 14px 0 40px; color: var(--ink); background: #f3f5f9; font-size: 12px; }
.searchbox input:focus { border-color: #c9daf7; background: white; box-shadow: 0 0 0 3px rgba(23,108,255,.07); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.top-icon { width: 40px; height: 40px; position: relative; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #596980; background: white; cursor: pointer; }
.top-icon svg { width: 17px; height: 17px; }
.notification-dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border: 2px solid white; border-radius: 50%; background: #f15d70; }
.today-chip { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: white; font-size: 11px; font-weight: 700; }
.app-content { padding: 32px clamp(22px, 4vw, 50px) 54px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-intro h1 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 37px); line-height: 1.1; letter-spacing: -.045em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 99px; color: #14704d; background: var(--mint-soft); font-size: 10px; font-weight: 800; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(25,185,129,.12); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.metric-card { min-width: 0; padding: 19px; border: 1px solid #e6ebf2; border-radius: var(--radius); background: white; box-shadow: 0 6px 23px rgba(8,27,64,.035); }
.metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.metric-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.metric-icon.violet { color: var(--violet); background: var(--violet-soft); }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.mint { color: var(--mint); background: var(--mint-soft); }
.metric-icon svg { width: 18px; height: 18px; }
.metric-change { color: #169469; font-size: 9px; font-weight: 800; }
.metric-card strong { display: block; overflow: hidden; font-size: 23px; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.metric-card > span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.progress-mini { height: 4px; margin-top: 12px; overflow: hidden; border-radius: 9px; background: #edf0f5; }
.progress-mini span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #675be9); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 19px; }
.dashboard-column { min-width: 0; display: grid; align-content: start; gap: 19px; }
.panel { min-width: 0; border: 1px solid #e4e9f1; border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(8,27,64,.04); }
.panel-head { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 20px; border-bottom: 1px solid #edf0f5; }
.panel-head h2 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.panel-link { color: var(--blue); background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.panel-body { padding: 19px 20px; }
.lesson-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 17px;
  padding: 20px;
  border-radius: 16px;
  color: white;
  background:
    radial-gradient(circle at 85% 0, rgba(137, 111, 255, .4), transparent 34%),
    linear-gradient(135deg, #0a45ae, #11346f);
}
.lesson-card::after { content: "∑"; position: absolute; right: 22px; bottom: -30px; color: rgba(255,255,255,.055); font: 110px/1 Georgia, serif; }
.lesson-date { width: 54px; height: 61px; display: grid; place-items: center; align-content: center; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.09); }
.lesson-date b { font-size: 20px; line-height: 1; }
.lesson-date span { margin-top: 4px; color: #b8d4ff; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.lesson-info { min-width: 0; position: relative; z-index: 1; }
.lesson-info small { color: #a9c7f1; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.lesson-info h3 { margin: 6px 0 5px; overflow: hidden; font-size: 18px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.lesson-info p { margin: 0; color: #bcd0ed; font-size: 10px; }
.lesson-action { position: relative; z-index: 1; min-height: 40px; padding-inline: 14px; color: #0d4ca9; background: white; box-shadow: none; }
.lesson-action.done { color: #17714f; background: #e6faef; }
.schedule-list { display: grid; }
.schedule-item { display: grid; grid-template-columns: 62px 5px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; }
.schedule-item + .schedule-item { border-top: 1px solid #edf0f5; }
.schedule-time { color: var(--muted); font-size: 10px; font-weight: 750; }
.schedule-color { width: 4px; height: 36px; border-radius: 8px; background: var(--blue); }
.schedule-color.violet { background: var(--violet); }
.schedule-color.orange { background: var(--orange); }
.schedule-copy { min-width: 0; display: grid; gap: 4px; }
.schedule-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-copy span { color: var(--muted); font-size: 9px; }
.schedule-tag { padding: 5px 8px; border-radius: 7px; color: #52647b; background: #f1f4f8; font-size: 8px; font-weight: 800; }

.xp-card { padding: 20px; }
.level-row { display: flex; align-items: center; gap: 13px; }
.level-badge {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: linear-gradient(145deg, #176cff, #7b5ce9);
  box-shadow: 0 10px 25px rgba(69, 82, 231, .23);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}
.level-copy { flex: 1; }
.level-copy strong { display: block; font-size: 14px; }
.level-copy span { color: var(--muted); font-size: 9px; }
.xp-number { color: var(--blue); font-size: 11px; font-weight: 850; }
.xp-progress { height: 8px; margin: 17px 0 8px; overflow: hidden; border-radius: 99px; background: #ebeff5; }
.xp-progress span { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #176cff, #8b67ec); }
.xp-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.badge-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; }
.achievement { flex: 1; display: grid; justify-items: center; gap: 7px; text-align: center; }
.achievement-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--orange); background: var(--orange-soft); }
.achievement:nth-child(2) .achievement-icon { color: var(--blue); background: var(--blue-soft); }
.achievement:nth-child(3) .achievement-icon { color: var(--violet); background: var(--violet-soft); }
.achievement-icon svg { width: 18px; }
.achievement span { color: var(--muted); font-size: 8px; line-height: 1.3; }
.goal-list { display: grid; gap: 15px; }
.goal-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.goal-check { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--mint); background: var(--mint-soft); }
.goal-check.pending { color: #8290a5; background: #f0f3f7; }
.goal-check svg { width: 15px; }
.goal-copy { min-width: 0; display: grid; gap: 3px; }
.goal-copy strong { font-size: 10px; }
.goal-copy span { color: var(--muted); font-size: 8px; }
.goal-score { color: var(--blue); font-size: 9px; font-weight: 850; }

.teacher-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 143px;
  padding: 24px 26px;
  border-radius: var(--radius);
  color: white;
  background:
    radial-gradient(circle at 86% 12%, rgba(143, 111, 239, .45), transparent 32%),
    linear-gradient(125deg, #0b2451, #143a7b);
  box-shadow: var(--shadow-sm);
}
.teacher-banner::after { content: "π"; position: absolute; right: 32px; bottom: -62px; color: rgba(255,255,255,.06); font: 165px Georgia, serif; }
.teacher-banner-copy { position: relative; z-index: 1; flex: 1; }
.teacher-banner small { color: #9dbce6; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.teacher-banner h2 { margin: 7px 0 7px; font-size: 22px; letter-spacing: -.03em; }
.teacher-banner p { margin: 0; color: #b6cae6; font-size: 10px; }
.teacher-banner .button { position: relative; z-index: 1; color: #123e83; background: white; box-shadow: none; }
.student-list { display: grid; }
.student-row { display: grid; grid-template-columns: auto 1fr 90px 58px; align-items: center; gap: 12px; padding: 12px 0; }
.student-row + .student-row { border-top: 1px solid #edf0f5; }
.student-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 850; }
.student-row:nth-child(2) .student-avatar { color: var(--violet); background: var(--violet-soft); }
.student-row:nth-child(3) .student-avatar { color: var(--orange); background: var(--orange-soft); }
.student-copy { min-width: 0; display: grid; gap: 3px; }
.student-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.student-copy span { color: var(--muted); font-size: 8px; }
.student-progress { height: 5px; border-radius: 9px; background: #ecf0f5; overflow: hidden; }
.student-progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.student-score { color: var(--muted); font-size: 9px; font-weight: 800; text-align: right; }
.revenue-card { padding: 20px; }
.revenue-top { display: flex; align-items: flex-start; justify-content: space-between; }
.revenue-top span { color: var(--muted); font-size: 9px; }
.revenue-top strong { display: block; margin-top: 4px; font-size: 25px; letter-spacing: -.04em; }
.revenue-change { padding: 5px 8px; border-radius: 8px; color: #16855f; background: var(--mint-soft); font-size: 8px; font-weight: 850; }
.bar-chart { height: 102px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 20px; }
.bar { flex: 1; position: relative; border-radius: 5px 5px 2px 2px; background: #e7effe; }
.bar.active { background: linear-gradient(to top, #176cff, #6883f6); }
.bar span { position: absolute; left: 50%; bottom: -17px; color: #8a96a8; font-size: 7px; transform: translateX(-50%); }
.task-list { display: grid; gap: 3px; }
.task-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 0; }
.task-box { width: 17px; height: 17px; border: 1.5px solid #d4dce8; border-radius: 6px; cursor: pointer; background: white; }
.task-box.checked { display: grid; place-items: center; color: white; border-color: var(--mint); background: var(--mint); font-size: 10px; }
.task-copy { min-width: 0; display: grid; gap: 3px; }
.task-copy strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.task-copy span { color: var(--muted); font-size: 8px; }
.task-priority { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.task-priority.blue { background: var(--blue); }
.task-priority.mint { background: var(--mint); }

.toast {
  position: fixed;
  z-index: 100;
  right: 25px;
  bottom: 25px;
  max-width: min(380px, calc(100vw - 30px));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid #d7e4f8;
  border-radius: 13px;
  opacity: 0;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity .25s ease, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--mint); background: var(--mint-soft); }
.toast-icon svg { width: 15px; }
.sidebar-overlay { display: none; }

@media (max-width: 1080px) {
  .auth-page { grid-template-columns: minmax(330px, .72fr) minmax(530px, 1.28fr); }
  .auth-story { padding-inline: 36px; }
  .auth-story h1 { font-size: 48px; }
  .app-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { width: 215px; padding-inline: 12px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-column:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-column:last-child > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .auth-page { display: block; background: white; }
  .auth-story { min-height: auto; padding: 24px 22px 27px; }
  .auth-story-content { padding: 60px 0 18px; }
  .auth-story h1 { max-width: 570px; font-size: clamp(40px, 9vw, 58px); }
  .auth-story-lead { font-size: 15px; }
  .story-points, .story-quote { display: none; }
  .auth-workspace { min-height: auto; padding: 39px 22px 55px; }
  .app-shell { display: block; }
  .sidebar { width: 250px; transform: translateX(-105%); transition: transform .28s var(--ease); box-shadow: 20px 0 55px rgba(3,9,25,.25); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 45; inset: 0; display: block; opacity: 0; background: rgba(3,9,25,.45); pointer-events: none; transition: opacity .25s; }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .app-main { min-width: 0; }
  .menu-toggle { display: block; }
  .topbar { padding-inline: 17px; }
  .app-content { padding-inline: 17px; }
}

@media (max-width: 590px) {
  .auth-story { padding-inline: 18px; }
  .auth-story-content { padding-top: 48px; }
  .auth-workspace { padding-inline: 18px; }
  .auth-topline { justify-content: flex-start; }
  .role-grid, .form-grid { grid-template-columns: 1fr; }
  .role-card { min-height: 168px; }
  .field-full { grid-column: auto; }
  .auth-actions { align-items: stretch; flex-direction: column-reverse; }
  .auth-actions .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-card strong { font-size: 19px; }
  .dashboard-column:last-child { grid-template-columns: 1fr; }
  .dashboard-column:last-child > :last-child:nth-child(odd) { grid-column: auto; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .today-chip { display: none; }
  .searchbox { flex: 1; width: auto; }
  .searchbox input::placeholder { color: transparent; }
  .lesson-card { grid-template-columns: auto 1fr; }
  .lesson-action { grid-column: 1 / -1; width: 100%; }
  .teacher-banner { align-items: flex-start; flex-direction: column; }
  .teacher-banner .button { width: 100%; }
  .student-row { grid-template-columns: auto 1fr 48px; }
  .student-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
