:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-muted: #eef4ff;
  --text: #14213d;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --green: #14b8a6;
  --amber: #f59e0b;
  --red: #ef4444;
  --ink: #0f172a;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.2), transparent 22%),
    linear-gradient(135deg, #f7f9ff 0%, #eef4ff 45%, #f6f8ff 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
}

body::before {
  top: -100px;
  left: -90px;
  background: rgba(37, 99, 235, 0.22);
}

body::after {
  right: -100px;
  bottom: -80px;
  background: rgba(20, 184, 166, 0.22);
}

body.auth-mode {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}


button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 36px);
  max-width: 1500px;
  margin: 18px auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #102033 0%, #1f3654 100%);
  color: #e7eef8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: #f9b115;
  color: #14213d;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #a9b8cc;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item svg,
.icon-button svg,
.action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.role-panel {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.role-panel .eyebrow {
  color: #a9b8cc;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.45);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  background: #ffffff;
  color: #102033;
}

.main {
  min-width: 0;
  padding: 26px 28px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
}

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

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: #e6f0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.profile strong,
.profile small {
  display: block;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile small {
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.view-root {
  display: grid;
  gap: 18px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.panel,
.metric,
.course-card,
.assignment-row,
.discussion,
.session-panel,
.admin-row {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel,
.metric,
.course-card,
.assignment-row,
.discussion,
.session-panel,
.admin-row {
  transform: translateY(0);
}

.panel:hover,
.metric:hover,
.course-card:hover,
.assignment-row:hover,
.discussion:hover,
.session-panel:hover,
.admin-row:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12);
}

.panel {
  padding: 18px;
}

.classroom-visual {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(16, 32, 51, 0.92), rgba(37, 99, 235, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 520'%3E%3Crect width='900' height='520' fill='%23eaf2ff'/%3E%3Cg fill='%23ffffff'%3E%3Crect x='70' y='74' width='760' height='130' rx='12'/%3E%3Crect x='70' y='236' width='210' height='180' rx='12'/%3E%3Crect x='320' y='236' width='210' height='180' rx='12'/%3E%3Crect x='570' y='236' width='260' height='180' rx='12'/%3E%3C/g%3E%3Cg fill='%232563eb' opacity='.28'%3E%3Ccircle cx='142' cy='137' r='34'/%3E%3Ccircle cx='392' cy='302' r='42'/%3E%3Ccircle cx='675' cy='312' r='54'/%3E%3C/g%3E%3Cg fill='%23102033' opacity='.32'%3E%3Crect x='206' y='118' width='520' height='16' rx='8'/%3E%3Crect x='206' y='150' width='330' height='14' rx='7'/%3E%3Crect x='104' y='360' width='140' height='14' rx='7'/%3E%3Crect x='356' y='360' width='130' height='14' rx='7'/%3E%3Crect x='620' y='360' width='160' height='14' rx='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.classroom-copy {
  position: absolute;
  inset: auto 18px 18px 18px;
  max-width: 650px;
}

.classroom-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
}

.classroom-copy p {
  margin: 0;
  max-width: 58ch;
  color: #dbeafe;
}

.grid {
  display: grid;
  gap: 14px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 28px;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2,
.panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--course-color, var(--blue));
}

.course-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.meta-row,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-row {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--course-color, var(--blue));
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 244, 255, 0.95));
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

.action.primary {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-strong) 100%);
  color: #ffffff;
}

.action.success {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.action.warning {
  border-color: #f3d38a;
  background: #fff8e6;
  color: #8a4b08;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.session-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.live-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e9f8f1;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.draft {
  background: #fff7ed;
  color: #9a3412;
}

.video-board {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  min-height: 230px;
}

.video-tile {
  display: grid;
  place-items: center;
  min-height: 110px;
  border-radius: var(--radius);
  background: #13263d;
  color: #dbeafe;
  text-align: center;
}

.video-tile.primary-tile {
  grid-row: span 2;
  background: #183b66;
}

.video-tile strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
}

.assignment-list,
.discussion-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.assignment-row,
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.assignment-row h3,
.discussion h3,
.admin-row h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 15px;
}

.assignment-row p,
.discussion p,
.admin-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.discussion {
  padding: 14px;
}

.reply {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.reply strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.compose {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.compose textarea,
.course-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
}

.compose textarea {
  min-height: 82px;
  padding: 10px;
  resize: vertical;
}

.course-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.course-form input {
  min-height: 40px;
  padding: 0 10px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 180px;
  padding-top: 10px;
}

.bar {
  flex: 1;
  min-width: 22px;
  border-radius: 7px 7px 0 0;
  background: #2563eb;
}

.bar:nth-child(2n) {
  background: #059669;
}

.bar:nth-child(3n) {
  background: #d97706;
}

.notification-popover {
  position: absolute;
  top: 74px;
  right: 26px;
  z-index: 10;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.notification-item {
  padding: 10px;
  border-radius: var(--radius);
}

.notification-item + .notification-item {
  border-top: 1px solid var(--line);
}

.notification-item strong {
  display: block;
  color: var(--ink);
}

body.auth-mode .app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  overflow: visible;
}

body.auth-mode .sidebar {
  display: none;
}

body.auth-mode .main {
  display: flex;
  width: 100%;
  padding: 0;
  background: transparent;
}

body.auth-mode .topbar {
  display: none;
}

#viewRoot {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.auth-mode #viewRoot {
  display: flex;
}

.view-root {
  display: grid;
  gap: 18px;
}


.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1240px;
  gap: 40px;
  margin: 0 auto;
  padding: 24px;
}

.auth-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.auth-visual .brand-mark {
  width: 64px;
  height: 64px;
  font-size: 34px;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 0;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.18);
}

.auth-visual h1 {
  margin: 0;
  color: #ffffff;
  font-size: 40px;
  line-height: 1.15;
}

.auth-visual p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.6;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.auth-feature-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.94);
}

.auth-feature-grid svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}

.auth-tabs button {
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tabs button:hover {
  color: #ffffff;
}

.auth-tabs button.active {
  background: rgba(255, 255, 255, 0.95);
  color: #4f46e5;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.auth-form > div {
  margin-bottom: 4px;
}

.auth-form h2 {
  margin: 0;
  color: #102033;
  font-size: 22px;
  line-height: 1.3;
}

.auth-form p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #18202f;
}

.auth-form input,
.auth-form select {
  padding: 10px 12px;
  border: 1.5px solid #d9e2ec;
  border-radius: 10px;
  background: #ffffff;
  color: #18202f;
  font-size: 14px;
  transition: all 0.2s;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: 0;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field-grid label {
  display: flex;
  flex-direction: column;
}

.auth-form .action {
  margin-top: 8px;
  padding: 11px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.auth-form .action:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3);
}

.auth-form .action:active {
  transform: translateY(0);
}

.auth-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0f4ff;
  color: #4338ca;
  font-size: 12px;
  line-height: 1.5;
}

.auth-form .action svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.session-hint {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 0;
}

.session-card-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.session-card-mini strong {
  display: block;
  font-size: 13px;
}

.session-card-mini small {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.session-logout {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.session-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }

  .auth-visual {
    text-align: center;
    display: none;
  }

  .auth-visual .brand-mark {
    margin: 0 auto;
  }

  .auth-visual h1 {
    font-size: 32px;
  }

  .auth-feature-grid {
    justify-items: center;
  }

  .auth-feature-grid span {
    justify-content: center;
  }

  .auth-panel {
    max-width: 100%;
  }

  .auth-form {
    max-width: 100%;
  }

  .auth-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-tabs button {
    font-size: 12px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-layout {
    gap: 20px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-form {
    padding: 20px;
  }

  .auth-visual h1 {
    font-size: 24px;
  }
}


.notification-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notice-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(20, 34, 61, 0.15);
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
}

.toast.success {
  border-left-color: #059669;
  background: #f0fdf4;
  color: #166534;
}

.toast.error {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.toast.warning {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.empty-visual {
  width: 90px;
  height: 70px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #2563eb, #059669, #d97706) border-box;
  border: 3px solid transparent;
}

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

@keyframes sheen {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(140%);
  }
}

.hero-band .classroom-visual {
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.hero-band .classroom-visual::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  filter: blur(6px);
  animation: floatIn 0.8s ease-out;
}

.hero-band .classroom-visual::after {
  content: "";
  position: absolute;
  inset: auto -5% -20% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.16);
  filter: blur(8px);
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.metric .metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(20, 184, 166, 0.16));
  color: var(--blue);
}

.panel::before,
.course-card::before,
.assignment-row::before,
.discussion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.66) 32%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 7.2s infinite;
  pointer-events: none;
}

.course-card,
.assignment-row,
.discussion {
  position: relative;
  overflow: hidden;
}

.auth-layout {
  animation: floatIn 0.45s ease-out;
}

.auth-visual {
  position: relative;
  overflow: hidden;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.35;
}

.auth-visual::before {
  top: -60px;
  right: -30px;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.28);
}

.auth-visual::after {
  bottom: -70px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: rgba(125, 211, 252, 0.22);
}

.auth-form {
  position: relative;
  overflow: hidden;
}

.auth-form::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(37, 99, 235, 0.12));
}

.auth-tabs button.active {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  color: #4f46e5;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-panel {
    margin-top: 0;
  }

  .hero-band,
  .two-column,
  .metrics-grid,
  .course-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .assignment-row,
  .admin-row,
  .course-form {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .search {
    min-width: 0;
  }

  .profile {
    width: 100%;
  }

  .nav-list,
  .hero-band,
  .two-column,
  .metrics-grid,
  .course-grid,
  .video-board {
    grid-template-columns: 1fr;
  }

  .video-tile.primary-tile {
    grid-row: auto;
  }
}
