:root {
  --bg: #f7f5f0;
  --panel: #fdfcfa;
  --surface: #ffffff;
  --card2: #fbfaf7;
  --tabsbg: #efede7;
  --ink: #16181d;
  --mut: #6e7480;
  --mut2: #9aa0ad;
  --brd: rgba(22, 24, 29, .09);
  --brd2: rgba(22, 24, 29, .16);
  --blue: #1450e6;
  --bluetx: #1450e6;
  --bluesoft: #e9efff;
  --orange: #ff7a1a;
  --orangetx: #c85a00;
  --orangesoft: #ffe8d6;
  --green: #2f855a;
  --greentx: #1e7a4d;
  --greensoft: #e2f6ec;
  --red: #c53030;
  --redsoft: #fff0f0;
  --herobg: #0f1420;
  --herotx: #e8ebf2;
  --heromut: #9aa3b8;
  --warnbg: #fff4ea;
  --track: #e6e3dc;
  --focus: #ffb020;
  --shadow: 0 18px 60px rgba(15, 20, 32, .10);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0e14;
  --panel: #0e1219;
  --surface: #10151f;
  --card2: #141a26;
  --tabsbg: #0e1219;
  --ink: #e8ebf2;
  --mut: #8b93a5;
  --mut2: #5f6b81;
  --brd: #1c2330;
  --brd2: #2a3446;
  --bluetx: #8fb0ff;
  --bluesoft: rgba(20, 80, 230, .18);
  --orangetx: #ffb066;
  --orangesoft: rgba(255, 122, 26, .16);
  --greentx: #3ddc97;
  --greensoft: rgba(61, 220, 151, .12);
  --redsoft: rgba(197, 48, 48, .16);
  --herobg: #121a2e;
  --heromut: #9aa3b8;
  --warnbg: rgba(255, 122, 26, .08);
  --track: #1c2330;
  --shadow: 0 18px 60px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Golos Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: .01ms !important;
  scroll-behavior: auto !important;
  transition-duration: .01ms !important;
}
button, input, textarea, select {
  font: inherit;
}
button, .clickable {
  min-height: 44px;
}
button, a, input, textarea, select, [tabindex]:not([tabindex="-1"]) {
  outline: none;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  box-shadow: 0 0 0 3px var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a { color: var(--bluetx); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace; }
.muted { color: var(--mut); }
.muted2 { color: var(--mut2); }
.ok { color: var(--greentx); }
.warn { color: var(--orangetx); }
.bad { color: var(--red); }
.nowrap { white-space: nowrap; }
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid var(--focus);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}
[aria-current="page"] {
  scroll-margin-top: 18px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 70% 20%, rgba(20, 80, 230, .24), transparent 34%),
    linear-gradient(90deg, rgba(3, 8, 22, .28) 0%, rgba(3, 8, 22, .18) 42%, rgba(3, 8, 22, .62) 100%),
    url("./assets/login-bg.png") center / cover no-repeat;
}
.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 10, 28, .08), rgba(4, 10, 28, .34)),
    radial-gradient(circle at 18% 18%, rgba(48, 196, 255, .16), transparent 30%);
  pointer-events: none;
}
.login-shell > * {
  position: relative;
  z-index: 1;
}
.login-shell .skip-link {
  grid-column: 1;
  grid-row: 1;
}
.login-hero {
  grid-column: 1;
  grid-row: 1;
  background: transparent;
  color: var(--herotx);
  padding: clamp(30px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font: 800 16px "JetBrains Mono", monospace;
  flex: 0 0 auto;
}
.brand-title { font-weight: 800; font-size: 16px; color: #fff; }
.brand-sub { font: 500 10px "JetBrains Mono", monospace; color: #9cb4da; margin-top: 3px; }
.login-claim {
  max-width: 650px;
  margin-top: auto;
  margin-bottom: min(7vh, 64px);
}
.eyebrow {
  color: #5c88ff;
  font: 600 11px "JetBrains Mono", monospace;
  text-transform: lowercase;
}
.login-claim h1 {
  margin: 12px 0;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
  max-width: 700px;
}
.login-lead {
  margin: 0 0 18px;
  color: #d5deef;
  line-height: 1.6;
  max-width: 600px;
  font-size: 15.5px;
}
.login-list {
  display: grid;
  gap: 10px;
  color: #9aa3b8;
  font: 500 12px "JetBrains Mono", monospace;
}
.login-main {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  padding: clamp(18px, 2.5vw, 36px) clamp(24px, 4vw, 56px);
  min-width: 0;
}
.login-card {
  width: min(540px, 100%);
  position: relative;
  overflow: visible;
  background: rgba(255, 255, 255, .92);
  color: #16181d;
  border: 1px solid rgba(255, 255, 255, .54);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0, 10, 40, .38);
  padding: clamp(18px, 2vw, 24px);
  backdrop-filter: blur(18px) saturate(1.08);
}
.login-card .eyebrow { color: #1450e6; }
.login-card .muted { color: #5f6673; }
.login-card .btn {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(22, 24, 29, .14);
  color: #16181d;
}
.login-card .btn.primary { background: #1450e6; border-color: #1450e6; color: #fff; }
.login-card .btn.ghost {
  background: rgba(20, 80, 230, .08);
  border-color: rgba(20, 80, 230, .18);
  color: #1450e6;
}
.login-card .page-title {
  font-size: 22px;
  line-height: 1.2;
}
.login-card > p.muted {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
}
.login-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin-top: 16px;
}
.login-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.welcome-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.welcome-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  white-space: normal;
  text-align: center;
}
.welcome-actions .btn.primary {
  grid-column: 1 / -1;
}
.welcome-actions .btn.ghost {
  justify-self: stretch;
}
.welcome-simple {
  grid-template-columns: minmax(0, 1fr);
}
.welcome-simple .skip-link,
.welcome-simple .login-main {
  grid-column: 1;
}
.welcome-simple .login-main {
  grid-row: 1;
  min-height: 100vh;
  padding: 24px;
}
.welcome-simple .login-card {
  width: min(520px, 100%);
  text-align: center;
}
.welcome-simple .welcome-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.welcome-simple .welcome-actions .btn.primary {
  grid-column: auto;
}
.login-step {
  border: 1px solid rgba(22, 24, 29, .09);
  border-radius: 12px;
  background: rgba(248, 250, 255, .74);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-height: 112px;
}
.login-step b {
  line-height: 1.25;
}
.login-step .muted {
  font-size: 11px;
  line-height: 1.35;
}
.login-contact {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(22, 24, 29, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
}
.contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(22, 24, 29, .08);
}
.contact-head b {
  display: block;
  margin-top: 3px;
  line-height: 1.35;
}
.contact-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 7px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid rgba(20, 80, 230, .14);
  border-radius: 10px;
  background: rgba(248, 250, 255, .78);
  color: #16181d;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.contact-link:hover {
  text-decoration: none;
  border-color: rgba(20, 80, 230, .34);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 28px rgba(20, 80, 230, .10);
}
.contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--bluesoft);
  color: #1450e6;
  font-weight: 800;
  line-height: 1;
}
.contact-kicker {
  display: block;
  color: #6e7480;
  font: 700 9px "JetBrains Mono", monospace;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-value {
  display: block;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact-link.phone .contact-value {
  white-space: nowrap;
}

.app-shell {
  height: 100vh;
  min-height: 720px;
  display: grid;
  grid-template-columns: 64px 248px minmax(0, 1fr);
  background: var(--bg);
  overflow: hidden;
}
.rail {
  background: #0f1420;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 8px;
}
.rail .brand-mark { width: 38px; height: 38px; font-size: 14px; margin-bottom: 8px; }
.rail-btn {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #5c6578;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.rail-btn.active {
  background: rgba(80, 120, 246, .22);
  border-color: rgba(91, 139, 255, .45);
  color: #8fb0ff;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 auto;
}
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--brd);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 12px 14px;
  overflow: auto;
}
.nav-heading {
  font: 700 10px "JetBrains Mono", monospace;
  color: var(--mut2);
  letter-spacing: .08em;
  padding: 12px 10px 8px;
}
.nav-item {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-size: 13.5px;
}
.nav-item.active {
  background: var(--bluesoft);
  color: var(--bluetx);
  font-weight: 700;
}
.nav-item .badge {
  margin-left: auto;
}
.mascot-card {
  border: 1px dashed var(--brd2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  margin-bottom: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.mascot-card:hover {
  background: var(--card2);
  border-style: solid;
}
.mascot-card img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--card2);
}
.profile-chip {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.profile-chip:hover { background: var(--card2); }
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  min-height: 54px;
  background: var(--tabsbg);
  border-bottom: 1px solid var(--brd);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}
.tabs {
  display: flex;
  align-items: end;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  align-self: stretch;
}
.tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--mut2);
  padding: 9px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  font: 700 11px "JetBrains Mono", monospace;
}
.tab.active {
  background: var(--bg);
  border-color: var(--brd);
  color: var(--ink);
}
.tab-close {
  border: 0;
  min-height: 22px;
  width: 22px;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--mut2);
  cursor: pointer;
}
.toolbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-switch {
  display: flex;
  border: 1px solid var(--brd2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  font: 700 10.5px "JetBrains Mono", monospace;
}
.role-switch button {
  border: 0;
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--mut);
  background: transparent;
  cursor: pointer;
}
.role-switch button.active { background: var(--blue); color: #fff; }
.search-btn {
  width: 260px;
  min-height: 36px;
  border: 1px solid var(--brd2);
  border-radius: 7px;
  background: var(--surface);
  color: var(--mut2);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
}
.icon-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--brd2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--mut);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  position: absolute;
  right: 8px;
  top: 8px;
}
.content {
  flex: 1;
  overflow: auto;
  padding: 24px 28px 34px;
}
.page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}
.breadcrumb {
  font: 600 11px "JetBrains Mono", monospace;
  color: var(--mut2);
  margin-top: 3px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > *,
.card {
  min-width: 0;
}
.grid > .wide {
  grid-column: 1 / -1;
}
.card {
  background: var(--surface);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 18px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.section-title span {
  display: block;
  color: var(--mut);
  font-size: 13px;
  margin-top: 4px;
}
.notification-settings {
  margin-top: 2px;
}
.notification-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.channel-card,
.delivery-panel {
  background: var(--surface);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.channel-card.enabled {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--brd));
}
.channel-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.channel-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bluesoft);
  color: var(--bluetx);
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}
.channel-head p {
  margin: 4px 0 0;
  font-size: 13px;
}
.channel-meta {
  display: grid;
  gap: 4px;
  color: var(--mut2);
  font-size: 12px;
  margin: 10px 0 12px;
}
.inline-alert {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--redsoft);
  color: var(--red);
  font-size: 13px;
}
.delivery-panel {
  margin-top: 14px;
}
.admin-tabs {
  margin: 2px 0 0;
}
.admin-manager {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.admin-list {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}
.admin-record-list {
  margin-top: 12px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}
.admin-editor {
  display: grid;
  gap: 16px;
}
.admin-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-form-grid .wide {
  grid-column: 1 / -1;
}
.admin-question-list {
  display: grid;
  gap: 12px;
}
.admin-question {
  display: grid;
  gap: 10px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--card2);
  padding: 12px;
}
.hero {
  background: var(--herobg);
  color: var(--herotx);
  border-radius: 14px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  overflow: hidden;
}
.hero h2 {
  margin: 8px 0 6px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}
.hero p { color: var(--heromut); margin: 0; line-height: 1.55; }
.hero img {
  width: 150px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  align-self: stretch;
  background: #151d2d;
}
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--brd2);
  border-radius: 9px;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 50px; padding: 0 20px; font-size: 14px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 7px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 4px 8px;
  font: 700 10.5px "JetBrains Mono", monospace;
  background: var(--card2);
  color: var(--mut);
  border: 1px solid var(--brd);
}
.pill.blue { background: var(--bluesoft); color: var(--bluetx); border-color: transparent; }
.pill.orange { background: var(--orangesoft); color: var(--orangetx); border-color: transparent; }
.pill.green { background: var(--greensoft); color: var(--greentx); border-color: transparent; }
.pill.red { background: var(--redsoft); color: var(--red); border-color: transparent; }
.stat {
  display: grid;
  gap: 5px;
}
.stat-label {
  font: 700 10px "JetBrains Mono", monospace;
  color: var(--mut2);
  text-transform: uppercase;
}
.stat-value {
  font: 800 24px "JetBrains Mono", monospace;
}
.progress-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--blue);
}
.row-list { display: grid; gap: 10px; }
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--surface);
}
.row.click { cursor: pointer; }
.row.click:hover { border-color: var(--brd2); background: var(--card2); }
.row.active { border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.support-ticket-list {
  align-items: stretch;
}
.support-ticket-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface);
}
.support-ticket-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.support-reply {
  display: grid;
  gap: 7px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: 10px;
  background: var(--card2);
}
.support-reply p {
  margin: 0;
  white-space: pre-wrap;
}
.support-reply-input {
  min-height: 82px;
}
.split {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.materials-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.materials-layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.materials-list-card {
  max-height: calc(100vh - 166px);
  overflow: auto;
  position: sticky;
  top: 12px;
}
.materials-list-head,
.material-detail-head,
.material-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.materials-read-progress {
  margin: 12px 0 14px;
}
.materials-read-progress > span {
  background: var(--green);
}
.materials-nav {
  gap: 14px;
}
.material-group {
  display: grid;
  gap: 8px;
}
.material-group .nav-heading {
  padding-left: 0;
}
.material-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(86px, max-content) minmax(0, 1fr) 28px;
  align-items: start;
  text-align: left;
  gap: 10px;
  min-height: 64px;
}
.material-row.read {
  background: var(--greensoft);
}
.material-kind {
  max-width: 138px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.material-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  line-height: 1.35;
}
.material-row-main b,
.material-row-main .muted {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.material-row-main .muted {
  font-size: 11px;
}
.material-read-state {
  width: 24px;
  height: 24px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--mut2);
  background: var(--surface);
  font-weight: 900;
  line-height: 1;
}
.material-read-state.done {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}
.material-detail {
  display: grid;
  gap: 14px;
}
.material-detail h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.material-tags {
  min-width: 0;
}
.material-read-badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--brd);
  background: var(--card2);
  color: var(--mut);
  font: 800 11px "JetBrains Mono", monospace;
  white-space: nowrap;
}
.material-read-badge.done {
  border-color: transparent;
  background: var(--greensoft);
  color: var(--greentx);
}
.material-actions {
  justify-content: flex-start;
}
.material-source-panel,
.material-info-panel,
.material-related-panel {
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--card2);
  padding: 14px;
}
.material-source-panel .mono {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
}
.materials-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.material-info-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}
.material-info-panel li {
  margin: 6px 0;
}
.materials-related-list {
  margin-top: 12px;
}
.tests-layout {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.tests-list-card {
  position: sticky;
  top: 12px;
}
.tests-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tests-list {
  gap: 10px;
}
.test-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
  align-items: start;
  text-align: left;
}
.test-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  line-height: 1.35;
}
.test-row-main b,
.test-row-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.test-detail {
  display: grid;
  gap: 14px;
}
.test-detail h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.test-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.test-meta,
.test-result-panel {
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--card2);
  padding: 12px;
}
.test-meta {
  display: grid;
  gap: 5px;
}
.test-meta b {
  overflow-wrap: anywhere;
}
.test-result-panel {
  background: var(--bluesoft);
  border-color: transparent;
}
.test-answer-summary {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.test-answer-summary p {
  margin: 0;
}
.test-answer-upload {
  border-color: rgba(20, 80, 230, .20);
  background: linear-gradient(180deg, var(--surface), var(--card2));
}
.rubric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.material-test-submit {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 122, 26, .24);
  border-radius: 10px;
  background: var(--warnbg);
}
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--brd);
  background: var(--surface);
}
.table th, .table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--brd);
  text-align: left;
  font-size: 12.5px;
  vertical-align: top;
}
.table th {
  background: var(--card2);
  color: var(--mut);
  font: 800 10px "JetBrains Mono", monospace;
  letter-spacing: .04em;
}
.table tr:last-child td { border-bottom: 0; }
.journal-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.journal-toolbar p {
  margin: 5px 0 0;
}
.journal-table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}
.journal-table {
  min-width: 980px;
}
.journal-student-col {
  width: 210px;
  min-width: 210px;
}
.journal-student-col span {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}
.journal-lesson-col {
  width: 245px;
  min-width: 245px;
}
.journal-lesson-col b,
.journal-lesson-col span,
.journal-lesson-col small {
  display: block;
  line-height: 1.35;
}
.journal-lesson-col small {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}
.journal-cell {
  display: grid;
  gap: 8px;
  min-width: 210px;
}
.journal-score-row {
  display: grid;
  grid-template-columns: minmax(58px, 1fr) auto 62px;
  align-items: center;
  gap: 6px;
}
.journal-table .journal-status-select,
.journal-table .journal-score-input,
.journal-table .journal-max-input,
.journal-table .journal-comment-input {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}
.rbac-table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}
.rbac-table {
  min-width: 1120px;
}
.rbac-table td {
  vertical-align: middle;
}
.rbac-sub {
  display: block;
  margin-top: 5px;
  color: var(--mut);
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.rbac-select,
.rbac-2fa-select,
.rbac-note-input {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}
.rbac-select {
  min-width: 170px;
}
.rbac-2fa-select {
  min-width: 130px;
}
.rbac-note-input {
  min-width: 210px;
}
.rbac-role-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.rbac-role-card {
  padding: 12px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--card2);
}
.rbac-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rbac-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.rbac-permissions span {
  padding: 5px 8px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  background: var(--surface);
  color: var(--mut);
  font-size: 11.5px;
}
.form-grid { display: grid; gap: 12px; }
.field label,
.field > span {
  display: block;
  font: 800 10.5px "JetBrains Mono", monospace;
  color: var(--mut);
  margin-bottom: 6px;
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--brd2);
  border-radius: 9px;
  background: var(--card2);
  color: var(--ink);
  min-height: 44px;
  padding: 11px 13px;
}
.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}
.review-session-note {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--brd);
  border-radius: 9px;
  background: var(--card2);
  line-height: 1.35;
}
.review-session-note .muted {
  font-size: 12.5px;
}
.code-editor {
  width: 100%;
  min-height: 280px;
  background: #0f1420;
  color: #e8ebf2;
  border: 1px solid #2a3446;
  border-radius: 12px;
  padding: 14px 16px;
  font: 13px/1.55 "JetBrains Mono", Consolas, monospace;
  resize: vertical;
}
.terminal {
  background: #0f1420;
  color: #e8ebf2;
  border: 1px solid #2a3446;
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 110px;
  white-space: pre-wrap;
  font: 13px/1.55 "JetBrains Mono", Consolas, monospace;
}
.sandbox-task-list {
  margin: 14px 0 12px;
}
.sandbox-task-list .row {
  width: 100%;
  text-align: left;
}
.sandbox-meta {
  margin-bottom: 12px;
}
.program-output {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--brd);
}
.program-terminal {
  min-height: 92px;
  max-height: 190px;
  overflow: auto;
  margin-top: 10px;
}
.sandbox-tests,
.sandbox-history {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--brd);
}
.robot-lab-devices {
  margin-top: 14px;
}
.robot-program {
  min-height: 250px;
}
.robot-grid {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--brd);
  border-radius: 12px;
  background: var(--card2);
}
.robot-cell {
  min-height: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--brd);
  border-radius: 7px;
  background: var(--surface);
  color: var(--mut);
  font: 900 18px "JetBrains Mono", monospace;
  position: relative;
}
.robot-cell.line {
  background: linear-gradient(135deg, rgba(20, 80, 230, .08), rgba(20, 80, 230, .18));
}
.robot-cell.obstacle {
  background: #141a26;
  border-color: #2a3446;
}
.robot-cell.obstacle::after {
  content: "";
  width: 46%;
  height: 46%;
  border-radius: 5px;
  background: #e8ebf2;
  opacity: .35;
}
.robot-cell.checkpoint {
  box-shadow: inset 0 0 0 2px var(--orange);
}
.robot-cell.target,
.robot-cell.drop-zone {
  box-shadow: inset 0 0 0 2px var(--green);
}
.robot-cell.robot {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 80, 230, .28);
}
.robot-cell.robot span,
.robot-cell span {
  position: relative;
  z-index: 1;
}
.robot-telemetry .stat {
  padding: 10px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--surface);
}
.robot-telemetry .stat-value {
  font-size: 18px;
}
.module-card {
  width: 100%;
  border: 1px solid var(--brd);
  text-align: left;
  display: grid;
  gap: 8px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.module-card:hover,
.module-card.active {
  border-color: var(--blue);
  box-shadow: 0 10px 26px rgba(20, 80, 230, .12);
  transform: translateY(-1px);
}
.module-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--mut);
}
.module-meta span {
  padding: 4px 7px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  background: var(--surface);
}
.course-map-full {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.module-detail {
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 14px;
  background: var(--card2);
}
.module-detail.active {
  border-color: var(--blue);
  background: var(--bluesoft);
}
.robot-step-log {
  max-height: 360px;
  overflow: auto;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.day {
  min-height: 82px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface);
}
.day.has { border-color: var(--blue); background: var(--bluesoft); }
.day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.day.empty { border: none; background: transparent; pointer-events: none; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  font-size: 10.5px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.day.miss { border-color: var(--orange); background: var(--warnbg); }
.heatmap {
  display: grid;
  grid-template-columns: 170px repeat(14, minmax(24px, 1fr));
  gap: 5px;
  align-items: center;
  overflow-x: auto;
}
.teacher-activity-heatmap {
  grid-template-columns: minmax(190px, 1.2fr) repeat(14, minmax(28px, .42fr)) minmax(150px, .8fr);
  min-width: 920px;
}
.heatmap-panel {
  overflow-x: auto;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.heat-cell {
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--track);
  border: 1px solid var(--brd);
}
.heatmap-legend .heat-cell {
  min-width: 18px;
  width: 18px;
  height: 18px;
}
.heat-cell.l0 { background: var(--track); }
.heat-cell.l1 { background: #d8ecff; }
.heat-cell.l2 { background: #8fb0ff; }
.heat-cell.l3 { background: #1450e6; }
.heat-cell.l4 { background: #ff7a1a; }
.heat-day {
  text-align: center;
  font-size: 10px;
}
.heat-student,
.heat-student-total {
  min-width: 0;
}
.heat-student {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heat-student-total {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.achievement-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
}
.achievement-card:not(.earned) {
  opacity: .74;
}
.achievement-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--card2);
  color: var(--blue);
  font-size: 24px;
  border: 1px solid var(--brd);
}
.achievement-card.earned .achievement-icon {
  background: var(--okbg);
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 45%, var(--brd));
}
.achievement-head,
.achievement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.achievement-meta {
  font-size: 12px;
  color: var(--muted);
}
.chat-box {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--card2);
  border-radius: 12px;
}
.message {
  max-width: min(620px, 78%);
  display: grid;
  gap: 4px;
}
.message.mine { align-self: flex-end; }
.bubble {
  padding: 10px 13px;
  border-radius: 5px 13px 13px 13px;
  background: var(--surface);
  border: 1px solid var(--brd);
  line-height: 1.5;
  font-size: 12.5px;
}
.message.mine .bubble {
  border-radius: 13px 5px 13px 13px;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.chat-tabs,
.chat-compose,
.selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chat-compose {
  margin-top: 12px;
}
.chat-compose .input {
  flex: 1 1 280px;
}
.attach-btn {
  position: relative;
  overflow: hidden;
}
.selected-file {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  background: var(--surface);
}
.chat-side {
  display: grid;
  gap: 12px;
}
.chat-participants {
  display: grid;
  gap: 8px;
}
.chat-participant {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  background: var(--surface);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mut2);
  flex: 0 0 auto;
}
.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--greensoft);
}
.status-dot.typing {
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--warnbg);
}
.status-dot.offline {
  background: #9aa4b2;
}
.chat-file {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  background: var(--card2);
  color: inherit;
  text-decoration: none;
}
.message.mine .chat-file {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
}
@media (max-width: 980px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
}
.webinar-room {
  background: #0b0e14;
  color: #e8ebf2;
  border-radius: 14px;
  overflow: hidden;
  min-height: 660px;
  display: flex;
  flex-direction: column;
}
.webinar-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  padding: 14px;
}
.video-plane {
  min-height: 340px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(20, 80, 230, .10), rgba(255, 122, 26, .06)),
    repeating-linear-gradient(45deg, #0e1219 0 10px, #141a26 10px 20px);
  position: relative;
  overflow: hidden;
}
.whiteboard {
  min-height: 230px;
  background: #fdfcfa;
  color: #16181d;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.board-line {
  height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
}
.webinar-topbar,
.webinar-controlbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #1c2330;
  background: #0e1219;
  flex-wrap: wrap;
}
.webinar-controlbar {
  background: #101722;
}
.webinar-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px;
  min-height: 0;
}
.webinar-main,
.webinar-sidebar {
  min-width: 0;
}
.webinar-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.webinar-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.webinar-room .card {
  background: #0e1219;
  border-color: #1c2330;
  color: #e8ebf2;
}
.webinar-room .muted {
  color: #9aa4b2;
}
.webinar-room-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.webinar-room-meta.inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 0;
}
.webinar-room-meta > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}
.webinar-room-meta span {
  display: block;
  margin-bottom: 5px;
  color: #9aa4b2;
  font-size: 11px;
  text-transform: uppercase;
}
.webinar-room-meta b {
  display: block;
  overflow-wrap: anywhere;
}
.webinar-join-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid #1c2330;
  background: #0b0f17;
}
.webinar-join-panel.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 16px;
}
.join-copy,
.join-form {
  min-width: 0;
  padding: 14px;
  border: 1px solid #1c2330;
  border-radius: 10px;
  background: #0e1219;
}
.join-copy h3 {
  margin: 10px 0 8px;
  font-size: 22px;
}
.join-form {
  display: grid;
  gap: 10px;
  align-content: start;
}
.join-form label {
  font-weight: 800;
  color: #e8ebf2;
}
.join-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.webinar-room .input,
.webinar-room .textarea {
  background: #101722;
  border-color: #263449;
  color: #e8ebf2;
}
.webinar-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #0e1219;
  border: 1px solid #1c2330;
  border-radius: 10px;
}
.webinar-source {
  min-height: 560px;
  background: #080b10;
  border: 1px solid #1c2330;
  border-radius: 12px;
  overflow: hidden;
}
.webinar-room.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 250;
  border-radius: 0;
}
.webinar-room.is-fullscreen .webinar-layout {
  grid-template-columns: 1fr;
}
.webinar-room.is-fullscreen .webinar-sidebar {
  display: none;
}
.webinar-room.is-fullscreen .webinar-source {
  min-height: calc(100vh - 154px);
}
.screen-share {
  min-height: 560px;
  padding: 20px;
  background:
    radial-gradient(circle at 80% 16%, rgba(20, 80, 230, .20), transparent 26%),
    linear-gradient(135deg, #121826, #090d14);
  display: grid;
  align-content: start;
  gap: 16px;
  position: relative;
}
.screen-share:not(.live)::after {
  content: "Демонстрация экрана не запущена";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 11, 16, .72);
  color: #e8ebf2;
  font-weight: 700;
}
.screen-topbar {
  height: 38px;
  border-radius: 8px 8px 0 0;
  background: #202938;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
}
.screen-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
}
.screen-topbar span:nth-child(2) { background: #ffbd4a; }
.screen-topbar span:nth-child(3) { background: #3ddc97; }
.screen-code {
  margin: 0;
  min-height: 320px;
  padding: 22px;
  border: 1px solid #263449;
  border-radius: 0 0 8px 8px;
  background: #0b0f17;
  color: #d8e4ff;
  font: 14px/1.8 "JetBrains Mono", monospace;
}
.screen-note {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(20, 80, 230, .22);
  border: 1px solid rgba(143, 176, 255, .32);
}
.live-captions {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: calc(100% - 36px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(0, 0, 0, .74);
  color: #fff;
  line-height: 1.45;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .24);
}
.live-captions .mono {
  color: #ffcf76;
  flex: 0 0 auto;
}
.camera-grid {
  min-height: 560px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  background: #080b10;
  position: relative;
}
.camera-tile {
  min-height: 190px;
  border: 1px solid #1c2330;
  border-radius: 10px;
  background:
    linear-gradient(rgba(20, 80, 230, .12), rgba(255, 122, 26, .08)),
    #101722;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.camera-tile.speaker {
  grid-row: span 2;
}
.camera-tile.speaking {
  border-color: rgba(61, 220, 151, .62);
  box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .22);
}
.camera-tile.camera-off {
  background:
    linear-gradient(rgba(20, 80, 230, .08), rgba(255, 122, 26, .04)),
    #0e1219;
}
.camera-tile video,
.screen-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-tile video {
  position: absolute;
  inset: 0;
}
.camera-tile span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, .42);
  border-radius: 6px;
  z-index: 2;
}
.camera-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.camera-status span,
.reaction-badge {
  position: static;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .52);
  color: #e8ebf2;
  font: 800 10px "JetBrains Mono", monospace;
}
.camera-status .hand,
.reaction-badge {
  background: rgba(255, 122, 26, .90);
  color: #fff;
}
.reaction-badge {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 3;
}
.avatar-orb {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}
.screen-preview {
  min-height: 380px;
  border: 1px solid #263449;
  border-radius: 0 0 8px 8px;
  background: #0b0f17;
}
.livekit-video-slot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0b0f17;
  overflow: hidden;
}
.livekit-video-slot video,
.livekit-screen-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.livekit-screen-slot {
  min-height: 380px;
  border: 1px solid #263449;
  border-radius: 0 0 8px 8px;
  background: #0b0f17;
  display: grid;
  place-items: center;
  color: #9aa7bd;
  overflow: hidden;
}
.livekit-screen-slot video {
  background: #05070b;
}
.conference-panel,
.participants-panel,
.webinar-panel,
.webinar-chat {
  min-height: 0;
}
.conference-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.conference-stats > div {
  border: 1px solid #1c2330;
  border-radius: 8px;
  padding: 9px;
  background: #101722;
}
.conference-stats b {
  display: block;
  margin-top: 4px;
  font: 850 20px "JetBrains Mono", monospace;
}
.conference-health {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.conference-health .row {
  background: #101722;
  border-color: #1c2330;
  color: #e8ebf2;
}
.conference-health .row b {
  margin-left: auto;
  text-align: right;
  max-width: 58%;
  overflow-wrap: anywhere;
}
.reaction-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.participant-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}
.participant-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #1c2330;
  border-radius: 8px;
  padding: 8px;
  background: #101722;
}
.participant-row.offline {
  opacity: .56;
}
.avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 10px;
}
.participant-row b,
.participant-row span {
  display: block;
}
.participant-icons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 120px;
}
.participant-icons span {
  border: 1px solid #263449;
  border-radius: 6px;
  padding: 3px 5px;
  color: #7f899b;
  background: #0b0e14;
  font: 800 9px "JetBrains Mono", monospace;
}
.participant-icons .on {
  color: #3ddc97;
  border-color: rgba(61, 220, 151, .36);
}
.participant-icons .hand,
.participant-icons .reaction {
  color: #ffb066;
  border-color: rgba(255, 122, 26, .42);
}
.poll-builder,
.poll-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.poll-card {
  border: 1px solid #1c2330;
  border-radius: 8px;
  padding: 10px;
  background: #101722;
}
.poll-option {
  margin-top: 8px;
  background: #141a26;
  border-color: #1c2330;
  color: #e8ebf2;
}
.poll-option.active {
  border-color: var(--blue);
}
.webinar-chat .messages {
  min-height: 210px;
  max-height: 300px;
  background: #0b0e14;
}
.webinar-chat .bubble {
  background: #141a26;
  border-color: #1c2330;
  color: #e8ebf2;
}
.webinar-chat .input,
.poll-builder .input,
.poll-builder .textarea,
.wb-properties .textarea {
  background: #0b0e14;
  color: #e8ebf2;
  border-color: #2a3446;
}
.textarea.compact {
  min-height: 72px;
}
.whiteboard-source {
  min-height: 560px;
  position: relative;
}
.transcript-panel {
  border: 1px solid #1c2330;
  border-radius: 10px;
  padding: 12px;
  background: #0e1219;
  color: #e8ebf2;
}
.transcript-panel.light {
  margin-top: 12px;
  background: var(--card2);
  color: var(--ink);
  border-color: var(--brd);
}
.transcript-list {
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
  margin-top: 10px;
  padding-right: 4px;
}
.transcript-list p {
  margin: 0;
  line-height: 1.45;
}
.transcript-list .mono {
  color: var(--orangetx);
  font-weight: 800;
}
.recording-player {
  min-height: 360px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 24%, rgba(20, 80, 230, .28), transparent 32%),
    linear-gradient(135deg, #0b0e14, #161d2a);
  color: #fff;
}
.captions-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  text-align: center;
  line-height: 1.45;
}
.whiteboard-app {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  background: #101722;
}
.whiteboard-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid #1c2330;
  background: #0e1219;
}
.toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: #263449;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .25);
  cursor: pointer;
}
.color-swatch.active {
  outline: 2px solid #fff;
}
.whiteboard-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
}
.whiteboard-canvas {
  position: relative;
  min-height: 510px;
  overflow: auto;
  background:
    linear-gradient(#e6edf7 1px, transparent 1px),
    linear-gradient(90deg, #e6edf7 1px, transparent 1px),
    #f8fafc;
  background-size: 24px 24px;
}
.wb-object {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid var(--wb-stroke);
  border-radius: 8px;
  background: var(--wb-color);
  color: #16181d;
  text-align: center;
  cursor: grab;
  font: inherit;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
}
.wb-object.selected {
  outline: 3px solid rgba(20, 80, 230, .35);
  outline-offset: 3px;
}
.wb-object.dragging {
  cursor: grabbing;
  opacity: .86;
}
.wb-object.text {
  background: transparent;
  border-color: transparent;
  color: var(--wb-color);
  font-weight: 700;
}
.wb-object.ellipse {
  border-radius: 999px;
}
.wb-object.frame {
  background: rgba(255, 255, 255, .62);
  border-style: dashed;
  place-items: start;
  text-align: left;
}
.wb-object.arrow {
  height: 24px !important;
  min-height: 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.wb-object.arrow::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 20px;
  top: 50%;
  height: 3px;
  background: var(--wb-color);
}
.wb-object.arrow::after {
  content: "";
  position: absolute;
  right: 8px;
  top: calc(50% - 7px);
  border-left: 14px solid var(--wb-color);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.whiteboard-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  border-left: 1px solid #1c2330;
  background: #0e1219;
}
.layer-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
}
.layer-list .row {
  background: #141a26;
  border-color: #1c2330;
  color: #e8ebf2;
}
.wb-properties {
  display: grid;
  gap: 10px;
}
.wb-cursor {
  position: absolute;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  transform: translate(4px, 4px);
  z-index: 1000;
}
.wb-cursor span {
  width: 0;
  height: 0;
  border-left: 9px solid #1450e6;
  border-top: 9px solid transparent;
}
.wb-cursor b {
  padding: 3px 5px;
  border-radius: 5px;
  background: #1450e6;
}
.wb-cursor.c1 span { border-left-color: #ff7a1a; }
.wb-cursor.c1 b { background: #ff7a1a; }
.wb-cursor.c2 span { border-left-color: #2f855a; }
.wb-cursor.c2 b { background: #2f855a; }
.wb-cursor.c3 span { border-left-color: #b83280; }
.wb-cursor.c3 b { background: #b83280; }
@media (max-width: 1100px) {
  .webinar-layout,
  .whiteboard-grid,
  .camera-grid {
    grid-template-columns: 1fr;
  }
  .webinar-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, .58);
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 110px 20px 20px;
}
.modal {
  width: min(620px, 100%);
  max-height: min(620px, calc(100vh - 140px));
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--brd2);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--brd);
}
.modal-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}
.modal-body {
  padding: 18px 20px 20px;
  max-height: calc(100vh - 260px);
  overflow: auto;
}
.assistant-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  width: min(460px, calc(100vw - 44px));
  max-height: min(720px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--brd2);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .26);
  overflow: hidden;
}
.assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--brd);
}
.assistant-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}
.assistant-context {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--brd);
  background: var(--card2);
}
.assistant-messages {
  flex: 1;
  min-height: 260px;
  max-height: 430px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
}
.assistant-message {
  display: flex;
  justify-content: flex-start;
}
.assistant-message.mine {
  justify-content: flex-end;
}
.assistant-bubble {
  max-width: 92%;
  border: 1px solid var(--brd);
  border-radius: 5px 12px 12px 12px;
  padding: 10px 12px;
  background: var(--card2);
  line-height: 1.5;
  font-size: 12.5px;
}
.assistant-message.mine .assistant-bubble {
  border-radius: 12px 5px 12px 12px;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.assistant-bubble p {
  margin: 5px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-message.mine .muted2 {
  color: rgba(255, 255, 255, .72);
}
.assistant-compose {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--brd);
  background: var(--surface);
}
.lead-note {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bluesoft);
  color: var(--ink);
  line-height: 1.6;
}
.staff-modal {
  width: min(560px, 100%);
}
.staff-login-grid {
  display: grid;
  gap: 12px;
}
.staff-account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--card2);
  line-height: 1.45;
}
.staff-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.staff-role-grid .row {
  align-items: flex-start;
  text-align: left;
  min-height: 96px;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--mut);
}

.crumb { color: var(--mut); }
.crumb.current { color: var(--ink); font-weight: 700; }

.crumb.link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--bluetx);
}

.crumb.link:hover { text-decoration: underline; }
.crumb-sep { color: var(--mut2); }

.toast-error {
  background: #3a1216 !important;
  color: #ffd9dc !important;
  border-color: #7c2b33 !important;
}

.loading-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--blue) 18%, transparent);
}

.loading-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 2px;
  background: var(--blue);
  animation: loading-slide 1.1s ease-in-out infinite;
}

.reduce-motion .loading-bar::after { animation: none; width: 100%; opacity: .5; }

@keyframes loading-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  background: #16181d;
  color: #e8ebf2;
  border: 1px solid #2a3446;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.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;
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 64px;
    top: 0;
    bottom: 0;
    width: 250px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .main { grid-column: 2; }
  .search-btn { width: 190px; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .materials-layout {
    grid-template-columns: 1fr;
  }
  .tests-layout {
    grid-template-columns: 1fr;
  }
  .materials-list-card {
    position: static;
    max-height: none;
  }
  .tests-list-card {
    position: static;
  }
  .test-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }
  .login-hero,
  .login-main {
    grid-column: 1;
  }
  .login-hero {
    grid-row: 1;
  }
  .login-main {
    grid-row: 2;
  }
  .login-hero {
    padding: 28px clamp(24px, 5vw, 44px) 22px;
    gap: 20px;
  }
  .login-claim {
    max-width: 720px;
    margin: 24px 0 0;
  }
  .login-claim h1 {
    font-size: clamp(32px, 7vw, 48px);
    line-height: 1.12;
  }
  .login-main {
    padding: 0 clamp(24px, 5vw, 44px) 34px;
    place-items: start center;
  }
  .login-card {
    width: min(620px, 100%);
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero {
    min-height: auto;
    padding: 26px 24px 22px;
    gap: 18px;
  }
  .login-claim {
    margin: 20px 0 0;
  }
  .login-claim h1 {
    font-size: clamp(30px, 10vw, 42px);
  }
  .login-lead {
    font-size: 14px;
  }
  .login-list {
    display: none;
  }
  .login-hero > .mono.muted2 {
    display: none;
  }
  .login-main {
    padding: 0 24px 30px;
    place-items: start center;
  }
  .login-card {
    width: 100%;
    padding: 20px;
    border-radius: 14px;
  }
  .login-grid, .login-grid.compact, .split, .webinar-stage, .hero, .staff-role-grid, .materials-info-grid, .test-meta-grid, .notification-channel-grid { grid-template-columns: 1fr; }
  .section-title {
    display: block;
  }
  .channel-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .channel-head .pill {
    grid-column: 1 / -1;
    width: max-content;
  }
  .admin-manager,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-list {
    position: static;
    max-height: none;
  }
  .admin-record-list {
    max-height: none;
  }
  .materials-head-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .materials-head-actions .btn {
    flex: 1 1 180px;
  }
  .material-row {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
  .material-kind {
    grid-column: 1 / -1;
    max-width: none;
  }
  .material-detail h2 {
    font-size: 20px;
  }
  .test-row {
    grid-template-columns: 1fr;
  }
  .test-detail h2 {
    font-size: 20px;
  }
  .contact-methods { grid-template-columns: 1fr; }
  .contact-link {
    gap: 8px;
    padding: 9px 10px;
  }
  .contact-icon {
    width: 28px;
    height: 28px;
  }
  .contact-value {
    font-size: 13px;
  }
  .login-step {
    min-height: auto;
    flex-direction: row;
    align-items: center;
  }
  .login-step .muted {
    display: none;
  }
  .welcome-actions { grid-template-columns: 1fr; }
  .welcome-actions .btn.ghost { justify-self: stretch; }
  .assistant-panel {
    inset: auto 10px 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .assistant-messages {
    max-height: 52vh;
  }
  .app-shell { grid-template-columns: 1fr; min-height: 100vh; }
  .rail { display: none; }
  .sidebar { left: 0; }
  .main { grid-column: 1; }
  .topbar { flex-wrap: wrap; padding: 8px; }
  .toolbar { width: 100%; justify-content: space-between; }
  .search-btn { width: min(100%, 220px); }
  .content { padding: 18px 14px 28px; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .hero img { width: 100%; height: 180px; }
}

@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  .login-shell {
    min-height: 100dvh;
    overflow: visible;
  }
  .login-main {
    padding: 0 12px 22px;
  }
  .login-hero {
    padding: 22px 14px 18px;
  }
  .login-claim h1 {
    font-size: 28px;
    line-height: 1.08;
  }
  .welcome-actions .btn,
  .btn.big {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }
  .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .main {
    overflow: visible;
  }
  .content {
    overflow: visible;
    padding: 14px 10px 22px;
  }
  .topbar,
  .toolbar,
  .webinar-topbar,
  .webinar-controlbar,
  .actions {
    align-items: stretch;
  }
  .topbar {
    overflow-x: hidden;
  }
  .tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .tab {
    flex: 0 0 auto;
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
  }
  .toolbar > *,
  .webinar-controlbar > *,
  .actions > .btn {
    flex: 1 1 100%;
  }
  .toolbar .icon-btn {
    width: 100%;
  }
  .tab { min-width: 180px; }
  .search-btn {
    width: 100%;
  }
  .sidebar {
    width: min(88vw, 300px);
  }
  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }
  .assistant-panel {
    inset: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .assistant-compose {
    grid-template-columns: 1fr;
  }
  .webinar-room {
    min-height: auto;
    border-radius: 0;
  }
}

@media (max-width: 780px) {
  .welcome-simple .login-main {
    grid-row: 1;
    padding: 18px;
  }
  .welcome-simple .welcome-actions {
    grid-template-columns: 1fr;
  }
}
