:root {
  --rice: #fbf7f4;
  --rice-deep: #f2eae4;
  --paper: #fffdfa;
  --white: #ffffff;
  --ink: #1a1620;
  --ink-soft: #3f3944;
  --muted: #756e78;
  --line: rgba(26, 22, 32, .105);
  --line-strong: rgba(26, 22, 32, .17);
  --jade: #0e9d6e;
  --jade-deep: #08734f;
  --jade-ink: #0c5b42;
  --jade-soft: #e5f4ee;
  --red: #e8442f;
  --red-deep: #bd2e20;
  --red-soft: #fbe9e5;
  --amber: #b77708;
  --amber-soft: #fff2d9;
  --violet-soft: #eeeafe;
  --shadow-sm: 0 1px 2px rgba(26, 22, 32, .03), 0 8px 30px rgba(26, 22, 32, .04);
  --shadow-md: 0 24px 70px rgba(37, 26, 22, .11);
  --radius: 22px;
  --radius-sm: 14px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 44px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-lg: 15px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 32px;
  --fs-h1: 28px;
  --fs-over: 10px;
  --dur-fast: .12s;
  --dur-base: .2s;
  --dur-slow: .32s;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-xs: 0 1px 2px rgba(26,22,32,.05);
  /* Cabinet scale — client, parent and teacher workspaces */
  --cab-fs-micro: 10px;
  --cab-fs-xs: 11px;
  --cab-fs-sm: 12px;
  --cab-fs-md: 13px;
  --cab-s-1: 4px;
  --cab-s-2: 8px;
  --cab-s-3: 12px;
  --cab-s-4: 16px;
  --cab-s-5: 20px;
  --cab-s-6: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  background: var(--rice);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
::selection { background: var(--jade); color: #fff; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 254px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  overflow: hidden;
  color: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 0 0, rgba(50, 179, 132, .26), transparent 36%),
    linear-gradient(165deg, #16352a 0%, #10251e 58%, #0b1a16 100%);
}
.sidebar::before {
  content: "学";
  position: absolute;
  right: -30px;
  top: 38%;
  color: #fff;
  font: 900 190px/1 "Noto Sans SC", sans-serif;
  opacity: .025;
  pointer-events: none;
}
.side-brand, .brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}
.brand-seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--red);
  border-radius: 12px 12px 12px 5px;
  box-shadow: 0 10px 24px rgba(232, 68, 47, .23);
  font: 900 20px/1 "Noto Sans SC", sans-serif;
  transform: rotate(-2deg);
}
.side-brand .side-brand-logo { width: 44px; height: 37px; padding: 2px; overflow: hidden; background: #fffaf4; border-radius: 8px; box-shadow: 0 6px 15px rgba(0,0,0,.18); transform: none; }
.side-brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.side-brand-mark {
  display: flex; width: 40px; height: 40px;
  justify-content: center; align-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #3db87a;
  box-shadow: 0 8px 18px rgba(61, 184, 122, .28);
}
.side-brand-mark img {
  width: 22px; height: 22px; display: block;
}
.side-brand .brand-copy b {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 15px;
}
.mobile-brand .side-brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
}
.mobile-brand .side-brand-mark img { width: 18px; height: 18px; }
.mobile-brand b {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 14px;
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy b { color: #fff; font-size: 18px; letter-spacing: -.35px; }
.brand-copy small { color: rgba(255,255,255,.43); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.side-nav { position: relative; display: grid; gap: 5px; margin-top: 45px; }
.nav-label { margin: 0 12px 8px; color: rgba(255,255,255,.31); font-size: 9px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 45px;
  padding: 9px 11px;
  color: rgba(255,255,255,.62);
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: .18s ease;
}
.nav-item > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font: 700 12px/1 "Noto Sans SC", sans-serif;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.095); border-color: rgba(255,255,255,.08); }
.nav-item.active > span { color: #fff; background: var(--jade); border-color: var(--jade); }
.side-note { position: relative; display: grid; gap: 5px; margin: auto 4px 18px; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 17px; background: rgba(255,255,255,.04); }
.side-note-cn { color: #65cfaa; font: 700 12px/1.2 "Noto Sans SC", sans-serif; letter-spacing: 2px; }
.side-note b { color: #fff; font-size: 12px; }
.side-note small { color: rgba(255,255,255,.41); font-size: 10px; line-height: 1.5; }
.side-user { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr) 27px; gap: 9px; align-items: center; padding: 13px 9px 3px; border-top: 1px solid rgba(255,255,255,.08); }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: rgba(14,157,110,.55); border-radius: 11px; font-size: 12px; font-weight: 800; }
.user-copy { min-width: 0; display: grid; }
.user-copy b { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: rgba(255,255,255,.4); font-size: 9px; }
.logout-icon { width: 27px; height: 27px; display: grid; place-items: center; color: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.13); border-radius: 8px; font-size: 16px; line-height: 1; text-align: center; text-decoration: none; }
.logout-icon:hover { color: #fff; background: rgba(232,68,47,.18); border-color: rgba(232,68,47,.48); }
.logout-form { display: contents; }
button.logout-icon, button.top-logout { background: none; border: 0; font: inherit; cursor: pointer; }

.app-main { min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 52px);
  background: rgba(251,247,244,.86);
  border-bottom: 1px solid rgba(26,22,32,.07);
  backdrop-filter: blur(18px);
}
.mobile-brand { display: none; }
.mobile-brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.top-context { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; }
.context-dot { width: 7px; height: 7px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 0 5px rgba(14,157,110,.09); }
.top-right { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.uname { max-width: 230px; overflow: hidden; color: var(--ink-soft); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-switch { display: inline-flex; align-items: center; margin: 0; }
.cabinet-switch select {
  max-width: 140px; min-height: 32px; padding: 4px 28px 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink); font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.cabinet-switch select:focus { outline: 2px solid var(--jade); outline-offset: 1px; }
.top-logout { min-height: 32px; display: inline-flex; align-items: center; color: var(--muted); font-weight: 700; text-decoration: none; }
.top-logout:hover { color: var(--red); }
.mobile-nav { display: none; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 38px clamp(22px, 4vw, 52px) 70px; }
h1 { margin-bottom: 5px; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.12; letter-spacing: -1.2px; }
h2 { margin: 34px 0 13px; font-size: 18px; font-weight: 800; letter-spacing: -.35px; }
h3 { line-height: 1.3; }
.sub { max-width: 680px; margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head .sub { margin: 8px 0 0; }
.page-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--jade-deep); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.page-kicker::before { content: ""; width: 16px; height: 2px; background: var(--red); border-radius: 3px; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 34px; }
.section-head h2 { margin: 0; }

/* Surfaces and metrics */
.grid { display: grid; gap: 15px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .stat {
  background: rgba(255,253,250,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card { padding: 22px; margin-bottom: 15px; }

/* Marketing workspace */
.marketing-kpis .stat .big { font-size: clamp(22px, 2.4vw, 32px); }
.marketing-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 8px; }
.marketing-add { margin: 0; }
.marketing-add summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.marketing-add summary::-webkit-details-marker { display: none; }
.marketing-add summary span { color: var(--muted); font-size: 10px; }
.marketing-form { display: grid; grid-template-columns: 1fr 1fr 120px auto; gap: 10px; align-items: end; margin-top: 18px; }
.marketing-form label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.marketing-form input,.marketing-form select { min-width: 0; }
.marketing-form .marketing-target { grid-column: span 2; }
.marketing-table th { white-space: nowrap; }
.track-url { display: inline-block; max-width: 260px; overflow: hidden; padding: 5px 7px; color: var(--jade-deep); background: var(--jade-soft); border-radius: 7px; font-size: 10px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.marketing-note { margin: 16px 3px 0; color: var(--muted); font-size: 11px; }
@media (max-width: 920px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .marketing-forms { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .marketing-form { grid-template-columns: 1fr; } .marketing-form .marketing-target { grid-column: auto; } }
.stat { position: relative; min-height: 132px; padding: 23px; overflow: hidden; }
.stat::after { content: attr(data-symbol); position: absolute; right: 12px; bottom: -24px; color: var(--ink); font: 900 94px/1 "Noto Sans SC", sans-serif; opacity: .025; }
.stat.primary { color: #fff; background: linear-gradient(145deg, #148c66, #096247); border-color: transparent; box-shadow: 0 18px 42px rgba(8,115,79,.18); }
.stat.primary::after { color: #fff; opacity: .065; }
.stat.primary .lbl, .stat.primary .big { color: #fff; }
.stat .big { position: relative; z-index: 1; font-size: clamp(27px, 3vw, 36px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.stat .big.jade { color: var(--jade-deep); }
.stat.primary .big.jade { color: #fff; }
.stat .big.red { color: var(--red); }
.stat .lbl { position: relative; z-index: 1; max-width: 90%; margin-top: 9px; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.5; }
.card-accent-jade { background: linear-gradient(135deg, rgba(229,244,238,.94), rgba(255,253,250,.98)); border-color: rgba(14,157,110,.22); }
.card-accent-red { background: linear-gradient(135deg, rgba(251,233,229,.95), rgba(255,253,250,.98)); border-color: rgba(232,68,47,.2); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; font-size: 13px; }
.notice::before { content: "!"; width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; font-weight: 800; }
.notice.danger { color: #8d271c; background: var(--red-soft); border: 1px solid rgba(232,68,47,.18); }
.notice.danger::before { color: #fff; background: var(--red); }

/* Tables */
.table-wrap { overflow-x: auto; margin: -4px; padding: 4px; -webkit-overflow-scrolling: touch; }
.table-wrap.wide table { min-width: 680px; }
.table-wrap::-webkit-scrollbar { height: 7px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(26,22,32,.13); border-radius: 99px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th, td { padding: 12px 11px; text-align: left; border-bottom: 1px solid rgba(26,22,32,.075); }
th { color: var(--muted); background: rgba(243,234,230,.48); font-size: 9px; font-weight: 800; letter-spacing: .75px; text-transform: uppercase; }
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
tr:last-child td { border-bottom: 0; }
tbody tr td, table > tr:not(:first-child) td { transition: background .15s ease; }
tbody tr:hover td, table > tr:not(:first-child):hover td { background: rgba(229,244,238,.42); }
table.kv th { width: 48%; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; vertical-align: top; }
table.kv td { text-align: right; }
table.kv tr:hover td, table.kv tr:hover th { background: transparent; }

/* Controls */
.pill, .role-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; font-size: 9px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; white-space: nowrap; }
.pill { padding: 5px 9px; }
.pill.active { color: var(--jade-ink); background: var(--jade-soft); }
.pill.rest { color: #6b656c; background: #eeece8; }
.pill.bonus { color: var(--amber); background: var(--amber-soft); }
.role-badge { padding: 6px 10px; color: var(--jade-ink); background: var(--jade-soft); }
.role-badge.teacher { color: var(--red-deep); background: var(--red-soft); }
.role-badge.admin { color: #5b4bc4; background: var(--violet-soft); }
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px var(--s-5);
  color: #fff;
  background: var(--red);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 9px 20px rgba(232,68,47,.13);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.btn:hover { background: var(--red-deep); box-shadow: 0 12px 26px rgba(232,68,47,.2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.j { background: var(--jade); box-shadow: 0 9px 20px rgba(14,157,110,.14); }
.btn.j:hover { background: var(--jade-deep); box-shadow: 0 12px 26px rgba(14,157,110,.2); }
.btn.ghost { color: var(--ink-soft); background: transparent; border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { color: var(--jade-deep); background: var(--jade-soft); border-color: rgba(14,157,110,.18); box-shadow: none; }
/* Второстепенное действие рядом с основным: класс давно использовался в шаблонах
   (Отмена, Назад, Вернуть на доработку), но без правила рисовался красной
   основной кнопкой — два «главных» действия в одной строке. */
.btn.secondary { color: var(--ink-soft); background: var(--rice-deep); border-color: var(--line-strong); box-shadow: none; }
.btn.secondary:hover { color: var(--ink); background: var(--rice); border-color: var(--line-strong); box-shadow: none; }
.btn.sm { min-height: 34px; padding: 7px var(--s-3); border-radius: 10px; font-size: var(--fs-xs); }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  font-size: var(--fs-md);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
input, select { min-height: 44px; padding: 10px var(--s-3); }
select { appearance: none; padding-right: 42px; background-image: linear-gradient(45deg, transparent 50%, var(--jade-deep) 50%), linear-gradient(135deg, var(--jade-deep) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #aaa2aa; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 4px rgba(14,157,110,.1); }
input[type="checkbox"] { width: 17px !important; min-height: 17px; accent-color: var(--jade); }
label { display: block; margin: var(--s-3) 0 var(--s-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1px; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); }
.row > * { flex: 1; min-width: 120px; }
.row.tight > * { flex: 0 0 auto; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); }
.actions > * { flex: 0 0 auto; }
.inline-form { display: inline; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 4px; }

/* Text, messages and content */
.link { color: var(--jade-deep); font-weight: 750; text-decoration: none; }
.link:hover { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-xs); }
.right { text-align: right; }
.center { text-align: center; }
.flash { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 13px 15px; border-radius: 14px; font-size: 12px; font-weight: 700; }
.flash-mark { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; }
.flash.ok { color: var(--jade-ink); background: var(--jade-soft); border: 1px solid rgba(14,157,110,.16); }
.flash.ok .flash-mark { color: #fff; background: var(--jade); }
.flash.err { color: #9d2c20; background: var(--red-soft); border: 1px solid rgba(232,68,47,.15); }
.flash.err .flash-mark { color: #fff; background: var(--red); }
.empty { padding: 32px 18px; color: var(--muted); text-align: center; font-size: 12px; }
.empty .ico { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 9px; color: var(--jade); background: var(--jade-soft); border-radius: 13px; font: 800 17px/1 "Noto Sans SC", sans-serif; }
.report-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.report-item:first-child { padding-top: 0; }
.report-item:last-child { padding-bottom: 0; border-bottom: 0; }
/* Раскладка задана в базовом правиле: раньше сетка жила только внутри
   .student-dashboard, и на других страницах заголовок слипался с текстом
   («Домашнее заданиеАудирование урок 4»). */
.hw-block { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline;
  margin-top: 5px; padding: 8px 10px; background: var(--jade-soft); border-radius: 10px; font-size: 11px; }
.hw-block b { color: var(--jade-deep); }
.next-lesson-hint { margin-bottom: 8px; color: var(--jade-deep); font-size: 9px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.next-lesson-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.next-lesson-dt { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.next-lesson-time { color: var(--jade-deep); font-size: 18px; font-weight: 800; }
.client-hero { position: relative; overflow: hidden; padding: 26px 28px; background: linear-gradient(105deg, rgba(229,244,238,.86), rgba(255,253,250,.9) 64%); border: 1px solid rgba(14,157,110,.16); border-radius: 22px; box-shadow: var(--shadow-sm); }
.client-hero .btn { position: relative; z-index: 1; }
.client-hero-mark { position: absolute; right: 145px; bottom: -35px; color: rgba(14,157,110,.07); font: 900 150px/1 "Noto Sans SC",sans-serif; }
.lesson-history { margin-top: 34px; }
.lesson-history-head { align-items: end; margin-bottom: 12px; }
.lesson-history-head h2 { margin: 4px 0 0; }
.lesson-list { overflow: hidden; background: rgba(255,253,250,.88); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); }
.lesson-card { display: grid; grid-template-columns: 115px 165px minmax(0,1fr); gap: 18px; padding: 20px 22px; border-top: 1px solid var(--line); }
.lesson-card:first-child { border-top: 0; }
.lesson-card:hover { background: rgba(229,244,238,.22); }
.lesson-date { display: grid; align-content: start; gap: 4px; color: var(--ink); font-size: var(--cab-fs-md); }
.lesson-date small,.lesson-meta { color: var(--muted); font-size: var(--cab-fs-xs); }
.lesson-meta { display: grid; align-content: start; gap: 8px; }
.lesson-group { color: var(--ink); font-size: var(--cab-fs-md); font-weight: 800; }
.lesson-meta .pill { width: fit-content; font-style: normal; }
.lesson-content { min-width: 0; }
.lesson-content p { margin: 0 0 8px; font-size: var(--cab-fs-sm); line-height: 1.5; }
.lesson-content .hw-block { margin: 0; }
.lesson-content .inline-form { margin-top: 8px; }
.progress-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.streak { font-size: 13px; }
.streak b { color: var(--red); font-size: 26px; }
.streak-mark { width: 28px; height: 28px; display: inline-grid; place-items: center; margin-right: 3px; color: var(--red-deep); background: var(--red-soft); border-radius: 9px; font: 800 13px/1 "Noto Sans SC", sans-serif; }
.hsk { flex: 1; min-width: 200px; }
.hsk-labels { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; font-weight: 700; }
.hsk-bar { height: 9px; overflow: hidden; background: var(--rice-deep); border-radius: 99px; }
.hsk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--jade), var(--red)); border-radius: inherit; }
.pending-req { margin-bottom: 10px; padding: 16px; background: rgba(255,255,255,.52); border: 1px solid var(--line); border-radius: 16px; }
.pending-req:last-child { margin-bottom: 0; }
.pending-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 14px; }
.reject-details summary { cursor: pointer; }

/* Authentication */
.auth-body { background: #faf9f6; }
.auth { width: 100%; min-height: 100vh; display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); }
.auth.wide { max-width: none; }
.auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(380px, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
  font-family: Inter, Manrope, sans-serif;
}
.auth-shell.auth-shell-wide { width: min(1120px, 100%); }
.auth-story {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  overflow: hidden;
  color: #0f172a;
  background: #eef6f0;
}
.auth-logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 8px 14px 8px 8px;
  color: #1b8756;
  text-decoration: none;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.auth-logo-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #3db87a;
  border-radius: 10px;
}
.auth-logo-icon img { width: 18px; height: 18px; display: block; object-fit: contain; }
.auth-logo-word {
  font-family: "Bricolage Grotesque", Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-seal-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.auth-story-visual { position: absolute; inset: 0; z-index: 0; }
.auth-story-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 42%; }
.auth-story-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.18) 0%, transparent 28%, rgba(15,23,42,.12) 100%);
}
.auth-story-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  max-width: 28ch;
  padding: 18px 16px;
  background: rgba(250, 249, 246, .9);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}
.auth-story h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-family: "Bricolage Grotesque", Manrope, sans-serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.8px;
}
.auth-story p { margin: 0; color: #475569; font-size: 14px; line-height: 1.45; }
.auth-panel { align-self: center; padding: 40px 40px 36px; }
.auth-panel-head { margin-bottom: 24px; }
.auth .page-kicker::before { display: none; }
.auth-panel-head .page-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #1b8756;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.auth-panel-head .role-badge { margin-bottom: 12px; }
.auth-panel-head h1 {
  font-family: "Bricolage Grotesque", Manrope, sans-serif;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -.8px;
}
.auth-panel-head p { margin-top: 10px; color: #475569; font-size: 14px; line-height: 1.5; }
.auth-panel .card { padding: 0; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.auth-panel .btn { width: 100%; margin-top: 20px; min-height: 48px; border-radius: 14px; background: #3db87a; box-shadow: none; font-size: 15px; }
.auth-panel .btn:hover { background: #2bb373; }
.auth-panel input[type="email"],
.auth-panel input[type="password"],
.auth-panel input[type="text"] { min-height: 48px; border-radius: 12px; border-color: #e5e7eb; }
.password-input-wrap { position: relative; }
.auth-panel .password-input-wrap input { width: 100%; padding-right: 92px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-height: 34px;
  padding: 6px 9px;
  color: #1b8756;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}
.password-toggle:hover { background: #e7f7eb; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.seg-btn {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: .16s ease;
}
.seg-btn.on { color: #1f4a24; background: #e7f7eb; border-color: #3db87a; }
.role-tile .ico { display: none; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 14px; }
.auth-links a { color: #1b8756; text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

.role-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-tile {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 20px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  text-align: left;
  text-decoration: none;
  transition: .18s ease;
}
.role-tile:hover { background: #e7f7eb; border-color: #3db87a; box-shadow: 0 10px 24px rgba(15, 23, 42, .06); transform: translateY(-2px); }
.role-tile .ttl { font-family: "Bricolage Grotesque", Manrope, sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.role-tile .desc { margin-top: 8px; color: #475569; font-size: 14px; line-height: 1.4; }

/* Product surfaces: account, calendar, assignments and notifications */
.skip-link { position: fixed; z-index: 1000; left: 14px; top: -80px; padding: 10px 14px; color: #fff; background: #10271f; border-radius: 10px; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.narrow { max-width: 860px; }
.compact-panel { max-width: 560px; margin: 8vh auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-md); }
.compact-panel .btn, .prose-card .btn { margin-top: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 16px 0; }
.settings-grid > .card { margin: 0; }
.form-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.form-row > div { flex: 1 1 180px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.check-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; line-height: 1.45; }
.check-line input { width: auto; margin-top: 3px; }
input[type="checkbox"] { width: 24px; height: 24px; min-width: 24px; }
.consent-form { margin: 20px 0; padding: 14px; background: var(--paper); border-radius: 14px; }
.code-input { max-width: 260px; font-size: 22px; font-weight: 800; letter-spacing: 5px; }
.secret-code { padding: 14px; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 18px; letter-spacing: 2px; overflow-wrap: anywhere; }
.break-all { overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
.recovery-codes li { padding: 12px; background: var(--paper); border-radius: 10px; text-align: center; }
.pre-line { white-space: pre-line; }
.legal-document { margin-top: 24px; }
.legal-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 16px 20px 28px; color: #49675d; font-size: 11px; }
.legal-footer a { color: inherit; }
.nav-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; margin-left: auto; color: #fff; background: var(--red); border-radius: 99px; font-size: 9px; }
.notification-shortcut { position: relative; width: 32px; height: 32px; display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; font: 700 18px/1 "Noto Sans SC",sans-serif; }
.notification-shortcut b { position: absolute; right: -9px; top: -8px; min-width: 16px; height: 16px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 99px; font: 800 8px/1 Manrope,sans-serif; }
.calendar-grid { display: grid; gap: 10px; margin: 16px 0 28px; }
.calendar-grid.week { grid-template-columns: repeat(7,minmax(0,1fr)); overflow-x: auto; padding-bottom: 8px; }
.calendar-grid.month { grid-template-columns: repeat(7,minmax(110px,1fr)); overflow-x: auto; }
.calendar-day { min-height: 180px; padding: 10px; background: rgba(255,255,255,.66); border: 1px solid var(--line); border-radius: 16px; }
.calendar-day.today { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.calendar-day > header { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); }
.calendar-day > header span { color: var(--ink); font-weight: 800; }
.calendar-event { display: grid; gap: 3px; margin-bottom: 8px; padding: 10px; background: #fff; border-left: 3px solid var(--jade); border-radius: 10px; box-shadow: var(--shadow-sm); }
.calendar-event.cancelled { opacity: .58; border-left-color: var(--red); }
.calendar-event time { color: var(--jade-deep); font-weight: 800; }
.calendar-event small { color: var(--muted); font-size: var(--cab-fs-xs); }
.calendar-event details { margin-top: 5px; font-size: var(--cab-fs-xs); }
.calendar-event details form { padding-top: 8px; }
.calendar-empty { color: var(--muted); text-align: center; }
.assignment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.assignment-grid.compact { grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); }
.assignment-card { min-height: 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 17px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); text-decoration: none; }
.assignment-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.assignment-card h2,.assignment-card h3 { margin: auto 0 0; font-size: 15px; }
.assignment-card p,.assignment-card small { color: var(--muted); }
.status-pill { display: inline-flex; padding: 5px 8px; color: #365349; background: #edf3f0; border-radius: 99px; font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }
.status-pill.submitted,.status-pill.in_review { color: #704d0b; background: #fff1c9; }
.status-pill.accepted { color: #07543b; background: #dff6ed; }
.status-pill.revision,.status-pill.overdue { color: #8d2d31; background: #fde6e6; }
.submission { padding: 16px 0; border-top: 1px solid var(--line); }
.submission:first-of-type { border-top: 0; }
.submission header { display: flex; justify-content: space-between; gap: 12px; }
.feedback { margin-top: 12px; padding: 12px; background: var(--paper); border-radius: 12px; }
.notification-list { display: grid; gap: 10px; }
.notification-card { display: grid; grid-template-columns: 2rem 1fr; gap: 14px; align-items: start; padding: 18px; background: rgba(255,255,255,.62); border: 1px solid var(--line); border-radius: 17px; }
.notification-card.unread { background: #fff; border-color: rgba(14,157,110,.35); box-shadow: var(--shadow-sm); }
.notification-icon { width: 2rem; height: 2rem; display: grid; place-items: start center; color: var(--jade-deep); background: none; border-radius: 0; padding-top: 2px; }
.notification-icon i { font-size: 1.75rem; line-height: 1; }
.notification-card h2 { margin: 3px 0; font-size: 15px; }
.notification-card small,.notification-card p { color: var(--muted); }
.empty-state { padding: 28px; color: var(--muted); background: rgba(255,255,255,.55); border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; }
.empty-state b { display: block; margin-bottom: var(--cab-s-2); color: var(--ink); font-size: var(--cab-fs-md); }
.empty-state p { margin: 0 auto; max-width: 46ch; font-size: var(--cab-fs-xs); line-height: 1.6; }
.student-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 12px; margin-bottom: 18px; }
.student-card { padding: 16px; background: var(--paper); border-radius: 16px; }
.student-card h3 { margin: 9px 0 3px; }

/* Student workspace — editorial, task-first dashboard */
.student-dashboard, .student-profile-page, .teacher-card-page { --student-navy: #112b25; --student-coral: #e84a35; --student-mint: #dff1e9; --student-cream: #fffaf4; }
.student-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 8px 0 30px; border-bottom: 1px solid var(--line-strong); }
.student-intro > div { max-width: 700px; }
.student-overline { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: var(--jade-deep); font: 800 var(--cab-fs-micro)/1.2 "Manrope",sans-serif; letter-spacing: 1.45px; text-transform: uppercase; }
.student-overline i { width: 22px; height: 1px; background: var(--red); }
.student-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.student-title-line h1 { margin: 0; font-size: clamp(34px,4vw,50px); font-weight: 800; letter-spacing: -2.1px; }
.student-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--jade-ink); background: var(--jade-soft); border-radius: 7px; font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.student-state i { width: 6px; height: 6px; background: var(--jade); border-radius: 50%; }
.student-state.rest { color: #6b656c; background: #eeece8; }
.student-state.rest i { background: #8e878e; }
.student-intro p { max-width: 640px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.student-profile-link { min-width: 134px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 0 9px; border-bottom: 1px solid var(--ink); font-size: var(--cab-fs-sm); font-weight: 800; text-decoration: none; }
.student-profile-link b { font-size: 17px; transition: transform .16s ease; }
.student-profile-link:hover b { transform: translateX(4px); }

.student-snapshot { display: grid; grid-template-columns: 1.15fr 1.6fr .7fr .7fr; gap: 12px; margin: 24px 0 40px; }
.student-snapshot article { min-height: 152px; }
.legacy-stat-contract { display: none; }
.snapshot-label { color: inherit; font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; opacity: .66; }
.snapshot-balance { position: relative; display: flex; flex-direction: column; align-items: flex-start; overflow: hidden; padding: 20px; color: #fff; background: var(--student-navy); }
.snapshot-balance strong { margin-top: 7px; font-size: 42px; line-height: 1; letter-spacing: -2px; }
.snapshot-balance > span:not(.snapshot-label) { margin-top: 3px; color: rgba(255,255,255,.67); font-size: var(--cab-fs-sm); }
.snapshot-balance a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: auto; color: #fff; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.snapshot-balance a b { color: #72d2ae; font-size: 15px; }
.snapshot-hanzi { position: absolute; right: -8px; bottom: -29px; color: #fff; font: 900 112px/1 "Noto Sans SC",sans-serif; opacity: .045; }
.snapshot-progress { display: flex; flex-direction: column; padding: 20px; background: var(--student-cream); border: 1px solid var(--line); }
.snapshot-progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.snapshot-progress-head > div:first-child { display: grid; }
.snapshot-progress-head strong { margin-top: 4px; font-size: 24px; letter-spacing: -.8px; }
.snapshot-goal { display: grid; justify-items: end; color: var(--muted); font-size: var(--cab-fs-micro); text-transform: uppercase; }
.snapshot-goal b { margin-top: 3px; color: var(--ink); font-size: var(--cab-fs-md); }
.student-progress-track { height: 5px; margin: 21px 0 13px; background: var(--rice-deep); }
.student-progress-track i { display: block; height: 100%; background: linear-gradient(90deg,var(--jade),var(--red)); }
.student-streak { display: flex; align-items: center; gap: 6px; margin-top: auto; color: var(--muted); font-size: var(--cab-fs-xs); }
.student-streak span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 6px; font: 800 12px/1 "Noto Sans SC",sans-serif; }
.student-streak b { color: var(--red); font-size: 15px; }
.snapshot-number { display: flex; flex-direction: column; padding: 19px 16px; background: transparent; border: 1px solid var(--line-strong); }
.snapshot-number strong { margin-top: auto; font-size: 34px; line-height: 1; letter-spacing: -1.5px; }
.snapshot-number small { margin-top: 6px; color: var(--muted); font-size: var(--cab-fs-xs); }

.student-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: -16px 0 32px; padding: 13px 15px; color: #7c2f25; background: #fff0ec; border-left: 3px solid var(--red); font-size: var(--cab-fs-sm); }
.student-alert a { color: #7c2f25; font-weight: 800; }
.student-layout { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(270px,.75fr); gap: clamp(24px,3vw,42px); align-items: start; }
.student-main-column,.student-side-column { min-width: 0; }
.student-section { margin-bottom: 44px; }
.student-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.student-section-head > div { display: flex; align-items: center; gap: 10px; }
.student-section-head > div > span { color: var(--red); font-size: var(--cab-fs-xs); font-weight: 800; letter-spacing: 1px; }
.student-section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.6px; }
.student-section-head > a { padding-bottom: 2px; color: var(--jade-deep); border-bottom: 1px solid rgba(8,115,79,.35); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.student-section-head > small { color: var(--muted); font-size: var(--cab-fs-xs); }

.next-session { position: relative; display: grid; grid-template-columns: 122px minmax(0,1fr) auto; align-items: center; gap: 22px; min-height: 156px; padding: 24px; overflow: hidden; color: #fff; background: var(--student-navy); }
.next-session::after { content: "课"; position: absolute; right: 20%; bottom: -42px; color: #fff; font: 900 145px/1 "Noto Sans SC",sans-serif; opacity: .025; }
.next-session-date { position: relative; z-index: 1; display: grid; gap: 8px; padding-right: 20px; border-right: 1px solid rgba(255,255,255,.16); }
.next-session-date span { color: rgba(255,255,255,.55); font-size: var(--cab-fs-xs); }
.next-session-date strong { font-size: 30px; letter-spacing: -1px; }
.next-session-info { position: relative; z-index: 1; min-width: 0; }
.next-session-hint { color: #70d4ae; font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.next-session-info h3 { margin-top: 7px; font-size: 19px; }
.next-session-info p { margin-top: 5px; color: rgba(255,255,255,.58); font-size: var(--cab-fs-xs); }
.next-session-action { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: var(--cab-s-3); color: var(--student-navy); background: #fff; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.next-session-action span { font-size: 15px; }
.next-session.empty { grid-template-columns: 52px minmax(0,1fr) auto; color: var(--ink); background: #f2eee9; border-left: 3px solid var(--jade); }
.next-session.empty::after { color: var(--ink); opacity: .025; }
.next-session.empty .next-session-info { color: var(--ink); }
.next-session.empty .next-session-info p { max-width: 470px; color: var(--muted); font-size: var(--cab-fs-sm); line-height: 1.55; }
.empty-session-mark { width: 48px; height: 48px; display: grid; place-items: center; color: var(--jade-deep); border: 1px solid rgba(8,115,79,.22); font: 800 19px/1 "Noto Sans SC",sans-serif; }
.next-session-action.secondary { color: #fff; background: var(--jade-deep); }

.student-assignment-list { border-top: 1px solid var(--line-strong); }
.student-assignment { display: grid; grid-template-columns: auto minmax(0,1fr) auto 22px; align-items: center; gap: 12px; min-height: 66px; padding: var(--cab-s-3) 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.student-assignment strong { font-size: var(--cab-fs-md); }
.student-assignment small { color: var(--muted); font-size: var(--cab-fs-xs); }
.student-assignment > b { color: var(--jade); font-size: 16px; }

.student-dashboard .lesson-history { margin-top: 0; }
.student-dashboard .lesson-list { border-radius: 0; box-shadow: none; }
.student-dashboard .lesson-card { grid-template-columns: 92px 128px minmax(0,1fr); padding: 18px; }
.student-dashboard .lesson-content p { font-size: var(--cab-fs-sm); }
.student-dashboard .hw-block { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px 12px; background: var(--student-mint); border-radius: 0; }
.student-dashboard .hw-block b { color: var(--jade-deep); font-size: var(--cab-fs-micro); letter-spacing: .5px; text-transform: uppercase; }
.student-dashboard .hw-block span { font-size: var(--cab-fs-xs); }
.student-empty-line { padding: 22px; color: var(--muted); border: 1px dashed var(--line-strong); font-size: var(--cab-fs-sm); }

.student-side-column { position: sticky; top: 92px; display: grid; gap: 15px; }
.side-section { padding: var(--cab-s-5); background: var(--student-cream); border-top: 2px solid var(--student-navy); }
.side-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.side-section-head > span { font-size: var(--cab-fs-md); font-weight: 800; }
.side-section-head > b { color: var(--jade); font: 800 15px/1 "Noto Sans SC",sans-serif; }
.side-section-head > a { color: var(--jade-deep); font-size: var(--cab-fs-xs); font-weight: 800; }
.student-groups { display: grid; gap: 12px; }
.student-groups article { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 11px; padding-top: var(--cab-s-3); border-top: 1px solid var(--line); }
.student-groups article:first-child { padding-top: 0; border-top: 0; }
.group-monogram { width: 36px; height: 36px; display: grid; place-items: center; color: var(--jade-deep); background: var(--student-mint); font: 800 14px/1 "Noto Sans SC",sans-serif; }
.student-groups article div { display: grid; }
.student-groups strong { font-size: var(--cab-fs-sm); }
.student-groups small { color: var(--muted); font-size: var(--cab-fs-xs); }
.student-groups p { margin-top: 5px; color: var(--ink-soft); font-size: var(--cab-fs-xs); }
.side-section.top-up { color: #fff; background: var(--student-navy); border-top-color: var(--red); }
.top-up .side-section-head > b { color: #6fd0ac; }
.top-up > p { margin-bottom: 14px; color: rgba(255,255,255,.55); font-size: var(--cab-fs-xs); line-height: 1.5; }
.top-up label { color: rgba(255,255,255,.6); }
.top-up select { min-height: 46px; color: var(--ink); background-color: #fff; border: 0; border-radius: 0; font-size: var(--cab-fs-sm); }
.student-buy-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: var(--cab-s-3); color: #fff; background: var(--student-coral); border: 0; font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }
.student-buy-button span { font-size: 16px; }
.side-empty { color: var(--muted); font-size: var(--cab-fs-xs); line-height: 1.55; }
.payment-list { display: grid; }
.payment-list > div { display: flex; justify-content: space-between; gap: 10px; padding: var(--cab-s-3) 0; border-top: 1px solid var(--line); }
.payment-list > div:first-child { border-top: 0; }
.payment-list span { display: grid; }
.payment-list b,.payment-list strong { font-size: var(--cab-fs-xs); }
.payment-list small { color: var(--muted); font-size: var(--cab-fs-xs); }

@media (max-width: 1120px) {
  .student-snapshot { grid-template-columns: 1fr 1.3fr .65fr .65fr; }
  .student-layout { grid-template-columns: minmax(0,1.5fr) minmax(250px,.75fr); gap: 24px; }
  .next-session { grid-template-columns: 95px minmax(0,1fr); }
  .next-session-action { grid-column: 2; width: fit-content; }
  .next-session.empty { grid-template-columns: 44px minmax(0,1fr); }
}

@media (max-width: 760px) {
  .student-intro { align-items: flex-start; flex-direction: column; padding-top: 0; }
  .student-title-line h1 { font-size: 36px; }
  .student-profile-link { min-width: 110px; }
  .student-snapshot { grid-template-columns: 1fr 1fr; }
  .snapshot-balance,.snapshot-progress { grid-column: span 2; }
  .student-layout { grid-template-columns: 1fr; }
  .student-side-column { position: static; grid-template-columns: 1fr 1fr; }
  .side-section.top-up { grid-column: span 2; }
  .student-dashboard .lesson-card { grid-template-columns: 82px minmax(0,1fr); }
  .student-dashboard .lesson-content { grid-column: 1 / -1; padding-top: 5px; }
}

@media (max-width: 520px) {
  .student-intro p { font-size: var(--cab-fs-md); }
  .student-snapshot { margin-bottom: 30px; }
  .student-snapshot article { min-height: 132px; }
  .snapshot-progress { padding: 17px; }
  .snapshot-number { min-height: 110px !important; }
  .student-alert { grid-template-columns: 1fr; }
  .student-section { margin-bottom: 36px; }
  .student-section-head { align-items: flex-start; }
  .student-section-head > small { display: none; }
  .next-session,.next-session.empty { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .next-session-date { grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 12px; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
  .next-session-action { grid-column: 1; }
  .empty-session-mark { display: none; }
  .student-assignment { grid-template-columns: auto minmax(0,1fr) 18px; }
  .student-assignment small { grid-column: 2; }
  .student-assignment > b { grid-column: 3; grid-row: 1 / span 2; }
  .student-side-column { grid-template-columns: 1fr; }
  .side-section.top-up { grid-column: 1; }
  .student-dashboard .lesson-card { grid-template-columns: 1fr; gap: 10px; }
  .student-dashboard .lesson-date { display: flex; gap: 8px; }
  .student-dashboard .lesson-content { grid-column: 1; }
}

/* Account settings — structured forms and device control */
.account-settings, .student-profile-page { --account-ink: #112b25; --account-paper: #fffaf4; --account-mint: #e2f2eb; }
.account-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 8px 0 28px; border-bottom: 1px solid var(--line-strong); }
.account-overline { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.account-overline::before { content: ""; width: 22px; height: 1px; background: var(--red); }
.account-intro h1 { margin: 0; font-size: clamp(32px,4vw,46px); letter-spacing: -1.8px; }
.account-intro p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.account-health { display: grid; gap: 7px; min-width: 175px; padding: 13px 0 3px 18px; border-left: 1px solid var(--line-strong); }
.account-health span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--cab-fs-xs); font-weight: 700; }
.account-health i { width: 7px; height: 7px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 4px rgba(183,119,8,.09); }
.account-health i.ok { background: var(--jade); box-shadow: 0 0 0 4px rgba(14,157,110,.09); }
.account-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: var(--cab-s-3) var(--cab-s-4); color: #742b22; background: #fff0ec; border-left: 3px solid var(--red); }
.account-notice div { display: grid; }
.account-notice b { font-size: var(--cab-fs-sm); }
.account-notice span { margin-top: 2px; color: #97645d; font-size: var(--cab-fs-xs); }
.account-notice button { min-height: 36px; padding: 7px 11px; color: #fff; background: var(--red); border: 0; font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }

.account-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: clamp(28px,4vw,54px); align-items: start; margin-top: 38px; }
.account-index { position: sticky; top: 96px; display: grid; }
.account-index > span { margin-bottom: 12px; color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.account-index a { display: grid; grid-template-columns: 28px 1fr; gap: 7px; padding: var(--cab-s-3) 0; color: var(--muted); border-top: 1px solid var(--line); font-size: var(--cab-fs-xs); font-weight: 700; text-decoration: none; }
.account-index a:last-child { border-bottom: 1px solid var(--line); }
.account-index a:hover { color: var(--jade-deep); }
.account-index a b { color: var(--red); font-size: var(--cab-fs-xs); letter-spacing: .7px; }
.account-content { min-width: 0; }
.account-section { padding: 0 0 52px; margin-bottom: 48px; border-bottom: 1px solid var(--line-strong); scroll-margin-top: 90px; }
.account-section:last-child { margin-bottom: 0; border-bottom: 0; }
.account-section > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.account-section > header div > span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.account-section > header h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.7px; }
.account-section > header p { max-width: 330px; color: var(--muted); font-size: var(--cab-fs-xs); text-align: right; }

.account-form-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(260px,.75fr); gap: 14px; align-items: stretch; }
.account-form { display: flex; flex-direction: column; padding: 22px; background: var(--account-paper); border-top: 2px solid var(--line-strong); }
.account-form-primary { border-top-color: var(--jade); }
.account-form-title { display: flex; align-items: center; gap: 11px; margin-bottom: 19px; }
.account-form-title > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--jade-deep); background: var(--account-mint); font: 800 14px/1 "Noto Sans SC",sans-serif; }
.account-form-title h3 { font-size: 13px; }
.account-form-title p { margin-top: 2px; color: var(--muted); font-size: var(--cab-fs-xs); }
.field { min-width: 0; }
.field + .field,.account-form > .field + .field { margin-top: 14px; }
.field label { margin: 0 0 6px; color: var(--ink-soft); font-size: var(--cab-fs-xs); }
.field input,.field select,.field textarea { min-height: 46px; border-radius: 8px; font-size: var(--cab-fs-sm); }
.field textarea { min-height: 92px; }
.field-grid { display: grid; gap: 12px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.account-form > .field-grid + .field,.account-form > .field + .field { margin-top: 14px; }
.form-actions { display: flex; justify-content: flex-start; margin-top: 20px; }
.account-form .form-actions { margin-top: auto; padding-top: 20px; }
.account-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--cab-s-3); color: var(--account-ink); background: transparent; border: 1px solid var(--line-strong); font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }
.account-button:hover { color: var(--jade-deep); border-color: var(--jade); }
.account-button.primary { color: #fff; background: var(--account-ink); border-color: var(--account-ink); }
.account-button.primary:hover { background: var(--jade-deep); border-color: var(--jade-deep); }
.account-button span { font-size: 15px; }

.password-panel { display: grid; grid-template-columns: 1.2fr repeat(3,minmax(115px,1fr)); gap: 12px; align-items: end; padding: 22px; background: var(--account-ink); }
.password-copy { align-self: stretch; padding-right: 14px; color: #fff; border-right: 1px solid rgba(255,255,255,.12); }
.password-copy > span { color: #72d2ae; font: 800 20px/1 "Noto Sans SC",sans-serif; }
.password-copy h3 { margin-top: 16px; font-size: 14px; }
.password-copy p { margin-top: 6px; color: rgba(255,255,255,.48); font-size: var(--cab-fs-xs); line-height: 1.5; }
.password-panel .field { align-self: center; }
.password-panel .field + .field { margin-top: 0; }
.password-panel label { color: rgba(255,255,255,.58); }
.password-panel input { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.17); }
.password-panel input:focus { background: rgba(255,255,255,.11); border-color: #72d2ae; }
.password-panel .account-button { grid-column: 4; color: var(--account-ink); background: #fff; border-color: #fff; }
.security-inline { display: grid; grid-template-columns: 1fr 180px 130px auto; gap: 12px; align-items: end; margin-top: 14px; padding: var(--cab-s-4); background: #f1eee9; }
.security-inline > div:first-child { display: grid; align-self: center; }
.security-inline strong { font-size: var(--cab-fs-sm); }
.security-inline small { color: var(--muted); font-size: var(--cab-fs-xs); }

.devices-panel { margin-top: 20px; border-top: 2px solid var(--account-ink); }
.devices-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 0 12px; }
.devices-head span { color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.devices-head h3 { margin-top: 3px; font-size: 15px; }
.text-danger { padding: 0 0 3px; color: var(--red-deep); background: none; border: 0; border-bottom: 1px solid rgba(189,46,32,.35); font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }
.device-list { border-bottom: 1px solid var(--line); }
.device-row { display: grid; grid-template-columns: 38px minmax(190px,1.5fr) minmax(92px,.45fr) minmax(136px,.8fr) auto; gap: 12px; align-items: center; padding: var(--cab-s-4) 0; border-top: 1px solid var(--line); }
.device-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--jade-deep); background: var(--account-mint); font: 800 13px/1 "Noto Sans SC",sans-serif; }
.device-name { min-width: 0; display: grid; }
.device-name strong { font-size: var(--cab-fs-xs); }
.device-name small { overflow: hidden; color: var(--muted); font-size: var(--cab-fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.device-meta { display: grid; }
.device-meta span { color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.device-meta b { margin-top: 2px; font-size: var(--cab-fs-xs); font-weight: 650; }
.session-state { padding: 5px 9px; color: var(--jade-ink); background: var(--jade-soft); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.session-state.off { color: var(--muted); background: #ece9e5; }
.login-history { margin-top: 18px; border-bottom: 1px solid var(--line); }
.login-history summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--cab-s-4) 0; cursor: pointer; }
.login-history summary > span { display: grid; }
.login-history summary b { font-size: var(--cab-fs-sm); }
.login-history summary small { color: var(--muted); font-size: var(--cab-fs-xs); }
.login-history summary i { font-style: normal; transition: transform .18s ease; }
.login-history[open] summary i { transform: rotate(45deg); }
.login-history table { min-width: 650px; }
.account-empty { padding: 18px 0; color: var(--muted); font-size: var(--cab-fs-xs); }

.notification-settings { border-top: 2px solid var(--account-ink); }
.notification-grid-head,.notification-grid-row { display: grid; grid-template-columns: minmax(200px,1fr) repeat(3,92px); gap: 10px; align-items: center; }
.notification-grid-head { min-height: 42px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.notification-grid-head span:not(:first-child) { text-align: center; }
.notification-grid-row { min-height: 54px; border-bottom: 1px solid var(--line); }
.notification-grid-row strong { font-size: var(--cab-fs-xs); }
.channel-check { display: grid; place-items: center; margin: 0; cursor: pointer; }
.channel-check input { position: absolute; width: 1px !important; height: 1px; min-height: 1px; opacity: 0; }
.channel-check span { position: relative; width: 34px; height: 20px; background: #dedad5; border-radius: 99px; transition: .16s ease; }
.channel-check span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .16s ease; }
.channel-check input:checked + span { background: var(--jade); }
.channel-check input:checked + span::after { transform: translateX(14px); }
.channel-check input:focus-visible + span { outline: 3px solid rgba(14,157,110,.35); outline-offset: 3px; }

.privacy-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.privacy-actions a { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; align-items: center; min-height: 78px; padding: 13px; background: var(--account-paper); border-top: 2px solid var(--line-strong); text-decoration: none; }
.privacy-actions a:hover { border-top-color: var(--jade); }
.privacy-actions a > span { width: 32px; height: 32px; display: grid; place-items: center; grid-row: 1 / span 2; color: var(--jade-deep); background: var(--account-mint); font: 800 12px/1 "Noto Sans SC",sans-serif; }
.privacy-actions b { font-size: var(--cab-fs-xs); }
.privacy-actions small { color: var(--muted); font-size: var(--cab-fs-xs); }
.consent-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: var(--cab-s-3) var(--cab-s-4); background: #f1eee9; }
.consent-panel .check-line { margin: 0; font-size: var(--cab-fs-xs); }
.data-request-form { display: grid; grid-template-columns: minmax(170px,.8fr) minmax(150px,.55fr) minmax(220px,1fr); gap: 14px; align-items: end; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.data-request-form > div:first-child { align-self: center; }
.data-request-form h3 { font-size: var(--cab-fs-md); }
.data-request-form p { margin-top: 4px; color: var(--muted); font-size: var(--cab-fs-xs); }
.data-request-form .field + .field { margin-top: 0; }
.data-request-form .account-button { grid-column: 3; justify-self: start; }

@media (max-width: 1080px) {
  .account-layout { grid-template-columns: 160px minmax(0,1fr); gap: 28px; }
  .account-form-grid { grid-template-columns: 1fr; }
  .password-panel { grid-template-columns: 1fr 1fr; }
  .password-copy { grid-column: 1 / -1; padding: 0 0 15px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .password-copy h3 { margin-top: 8px; }
  .password-panel .account-button { grid-column: 2; }
  .device-row { grid-template-columns: 38px minmax(180px,1fr) minmax(126px,.7fr) auto; }
  .device-meta:first-of-type { display: none; }
  .data-request-form { grid-template-columns: 1fr 1fr; }
  .data-request-form > div:first-child { grid-column: 1 / -1; }
  .data-request-form .account-button { grid-column: 2; }
}

@media (max-width: 760px) {
  .account-intro { align-items: flex-start; flex-direction: column; }
  .account-health { padding-left: 0; border-left: 0; }
  .account-layout { grid-template-columns: 1fr; margin-top: 24px; }
  .account-index { position: static; grid-template-columns: repeat(4,1fr); overflow-x: auto; }
  .account-index > span { display: none; }
  .account-index a { grid-template-columns: 1fr; min-width: 110px; padding: 10px; border: 1px solid var(--line); border-right: 0; }
  .account-index a:last-child { border-right: 1px solid var(--line); }
  .account-section > header { align-items: flex-start; flex-direction: column; }
  .account-section > header p { text-align: left; }
  .security-inline { grid-template-columns: 1fr 1fr; }
  .security-inline > div:first-child { grid-column: 1 / -1; }
  .device-row { grid-template-columns: 38px minmax(0,1fr) auto; }
  .device-meta { display: none; }
  .notification-grid-head,.notification-grid-row { grid-template-columns: minmax(130px,1fr) repeat(3,60px); }
  .privacy-actions { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .account-intro h1 { font-size: 34px; }
  .account-notice { align-items: flex-start; flex-direction: column; }
  .account-section { padding-bottom: 40px; margin-bottom: 38px; }
  .account-form { padding: 17px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .field-grid.two .field + .field { margin-top: 2px; }
  .password-panel { grid-template-columns: 1fr; padding: 18px; }
  .password-panel .field + .field { margin-top: 0; }
  .password-panel .account-button { grid-column: 1; }
  .security-inline { grid-template-columns: 1fr; }
  .notification-grid-head,.notification-grid-row { grid-template-columns: minmax(105px,1fr) repeat(3,56px); }
  .notification-grid-head { font-size: var(--cab-fs-xs); }
  .notification-grid-row strong { font-size: var(--cab-fs-xs); }
  .consent-panel { align-items: stretch; flex-direction: column; }
  .data-request-form { grid-template-columns: 1fr; }
  .data-request-form > div:first-child,.data-request-form .account-button { grid-column: 1; }
}

/* Focus and responsive states */
:is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid rgba(14,157,110,.45); outline-offset: 3px; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-brand { display: flex; color: var(--ink); }
  .mobile-brand .brand-seal { width: 40px; height: 30px; padding: 2px; background: #fffaf4; border-radius: 7px; box-shadow: none; transform: none; }
  .mobile-brand b { font-size: 14px; }
  .top-context { display: none; }
  /* Колонки считаются по числу пунктов: у ученика их шесть, у остальных ролей — три.
     Жёсткие repeat(3,1fr) ломали панель ученика, поэтому раскладка авто-колоночная,
     а на совсем узких экранах панель прокручивается вбок вместо наезда пунктов. */
  .mobile-nav { position: fixed; inset: auto 12px 10px; z-index: 40; height: 62px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(52px, 1fr); justify-content: stretch; padding: 5px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -ms-overflow-style: none; background: rgba(16,39,31,.96); border: 1px solid rgba(255,255,255,.09); border-radius: 19px; box-shadow: 0 18px 45px rgba(16,39,31,.28); backdrop-filter: blur(16px); }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 3px; color: rgba(255,255,255,.5); border-radius: 14px; font-size: var(--cab-fs-micro); font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; }
  .mobile-nav a span { font: 700 13px/1.2 "Noto Sans SC", sans-serif; }
  .mobile-nav a.active { color: #fff; background: rgba(255,255,255,.085); }
  .wrap { padding-bottom: 100px; }
  .auth-shell, .auth-shell.auth-shell-wide { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); }
}
@media (max-width: 760px) {
  .grid-3, .grid-2, .settings-grid, .assignment-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .auth { padding: 0; place-items: stretch; }
  .auth-shell, .auth-shell.auth-shell-wide { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .auth-story { min-height: auto; padding: 26px 24px; }
  .auth-story { min-height: 220px; }
  .auth-panel { width: 100%; max-width: 520px; margin: auto; padding: 34px 24px 50px; }
  .calendar-grid.week { grid-template-columns: repeat(7,minmax(140px,1fr)); }
}
@media (max-width: 560px) {
  .top { height: 62px; padding: 0 15px; }
  .top-right { gap: 8px; }
  .top-right .uname, .top-right .role-badge { display: none; }
  .cabinet-switch select { max-width: 112px; font-size: 10px; }
  .wrap { padding: 27px 15px 54px; }
  h1 { font-size: 27px; }
  h2 { margin-top: 28px; }
  .card { padding: 17px; border-radius: 18px; }
  .stat { min-height: 112px; padding: 19px; border-radius: 18px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .next-lesson-dt { font-size: 19px; }
  .next-lesson-time { font-size: 16px; }
  .role-tiles { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; }
  .seg-btn { min-height: 56px; }
  .form-row { align-items: stretch; flex-direction: column; }
  .recovery-codes { grid-template-columns: 1fr; }
  .action-notice { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; }
  .action-notice::before { grid-column: 1; }
  .action-notice > div { grid-column: 2; grid-row: 1; }
  .action-notice > form { grid-column: 2; grid-row: 2; margin: 0; }
  .action-notice > form .btn { width: 100%; }
  .role-tile { min-height: 135px; }
  .row:not(.tight) { flex-direction: column; align-items: stretch; }
  .row:not(.tight) > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.workspace-role {
  --student-radius-xl: 26px;
  --student-radius-lg: 22px;
  --student-radius-md: 16px;
  --student-radius-sm: 13px;
}

/* Student workspace — softer contemporary geometry */
.role-client :is(.btn,.account-button,.student-buy-button,.next-session-action,.account-notice button) {
  border-radius: var(--student-radius-sm);
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.role-client :is(.btn,.account-button,.student-buy-button,.next-session-action,.account-notice button):hover {
  transform: translateY(-2px);
}
.role-client :is(.btn,.account-button,.student-buy-button,.next-session-action,.account-notice button):active {
  transform: translateY(0) scale(.985);
}
.role-client .btn:not(.ghost),
.role-client .account-button.primary,
.role-client .student-buy-button {
  box-shadow: 0 10px 24px rgba(17,43,37,.13);
}
.role-client .btn.sm { border-radius: 11px; }
.role-client :is(input,select,textarea),
.role-client .field :is(input,select,textarea) { border-radius: var(--student-radius-sm); }

/* Student overview */
.role-client .student-profile-link {
  padding: 10px 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(26,22,32,.035);
}
.role-client .student-profile-link:hover { border-color: rgba(14,157,110,.3); box-shadow: 0 11px 26px rgba(14,157,110,.08); }
.role-client :is(.snapshot-balance,.snapshot-progress,.snapshot-number) {
  border-radius: var(--student-radius-lg);
  box-shadow: 0 12px 32px rgba(26,22,32,.055);
}
.role-client .snapshot-balance { background: linear-gradient(145deg,#163a31,#0d2922); }
.role-client .snapshot-progress { border-color: rgba(26,22,32,.08); }
.role-client .snapshot-number { background: rgba(255,253,250,.72); border-color: rgba(26,22,32,.1); }
.role-client .student-progress-track { overflow: hidden; border-radius: 99px; }
.role-client .student-alert {
  border: 1px solid rgba(232,68,47,.14);
  border-radius: var(--student-radius-md);
  box-shadow: 0 8px 24px rgba(232,68,47,.055);
}
.role-client .next-session {
  border-radius: var(--student-radius-xl);
  box-shadow: 0 18px 42px rgba(17,43,37,.16);
}
.role-client .next-session.empty { border: 1px solid rgba(14,157,110,.16); box-shadow: 0 12px 34px rgba(17,43,37,.07); }
.role-client .next-session-action { padding-inline: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.role-client .empty-session-mark { border-radius: var(--student-radius-md); }
.role-client .student-dashboard .lesson-list {
  border-radius: var(--student-radius-lg);
  box-shadow: 0 12px 34px rgba(26,22,32,.05);
}
.role-client .student-dashboard .hw-block { border-radius: var(--student-radius-sm); }
.role-client .student-empty-line { border-radius: var(--student-radius-md); }
.role-client .side-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--student-radius-lg);
  box-shadow: 0 12px 34px rgba(26,22,32,.05);
}
.role-client .side-section.top-up { border-color: rgba(255,255,255,.06); box-shadow: 0 18px 38px rgba(17,43,37,.16); }
.role-client .group-monogram { border-radius: 12px; }
.role-client .top-up select { border-radius: var(--student-radius-sm); }

/* Account page */
.workspace-role .account-health {
  padding: 11px 14px;
  background: rgba(255,253,250,.72);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-sm);
}
.workspace-role .account-notice {
  border: 1px solid rgba(232,68,47,.14);
  border-radius: var(--student-radius-md);
  box-shadow: 0 10px 28px rgba(232,68,47,.05);
}
.workspace-role .account-notice button { box-shadow: 0 7px 18px rgba(232,68,47,.18); }
.workspace-role .account-index {
  padding: 8px;
  background: rgba(255,253,250,.72);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-md);
  box-shadow: 0 12px 30px rgba(26,22,32,.04);
}
.workspace-role .account-index > span { padding: 5px 8px 7px; margin: 0; }
.workspace-role .account-index a,
.workspace-role .account-index a:last-child {
  padding: 11px 9px;
  border: 0;
  border-radius: 11px;
}
.workspace-role .account-index a:hover { background: var(--jade-soft); transform: translateX(2px); }
.workspace-role .account-form {
  background: rgba(255,250,244,.82);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-lg);
  box-shadow: 0 14px 36px rgba(26,22,32,.05);
}
.workspace-role .account-form-primary { border-color: rgba(14,157,110,.2); box-shadow: inset 0 3px 0 var(--jade),0 14px 36px rgba(26,22,32,.05); }
.workspace-role .account-form-title > span { border-radius: 11px; }
.workspace-role .account-button { padding-inline: 16px; }
.workspace-role .account-button.primary { background: linear-gradient(135deg,#173c32,#0d2b24); }
.workspace-role .password-panel {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--student-radius-xl);
  box-shadow: 0 18px 42px rgba(17,43,37,.16);
}
.workspace-role .password-panel .account-button.primary {
  color: var(--account-ink);
  background: #fff;
  border-color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.workspace-role .password-panel .account-button.primary:hover { color: var(--jade-deep); background: #f6fffb; border-color: #f6fffb; }
.workspace-role .security-inline { border-radius: var(--student-radius-md); }
.workspace-role .devices-panel {
  padding: 0 18px;
  background: rgba(255,253,250,.68);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-lg);
  box-shadow: 0 12px 32px rgba(26,22,32,.045);
}
.workspace-role .device-icon { border-radius: 11px; }
.workspace-role .session-state { border-radius: 99px; }
.workspace-role .text-danger {
  padding: 7px 10px;
  background: var(--red-soft);
  border: 0;
  border-radius: 99px;
}
.workspace-role .login-history {
  padding: 0 16px;
  background: rgba(255,253,250,.54);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-md);
}
.workspace-role .notification-settings {
  overflow: hidden;
  padding: 0 18px 18px;
  background: rgba(255,253,250,.68);
  border: 1px solid var(--line);
  border-radius: var(--student-radius-lg);
  box-shadow: 0 12px 32px rgba(26,22,32,.045);
}
.workspace-role .privacy-actions a {
  border: 1px solid var(--line);
  border-radius: var(--student-radius-md);
  box-shadow: 0 8px 24px rgba(26,22,32,.035);
}
.workspace-role .privacy-actions a:hover { border-color: rgba(14,157,110,.3); transform: translateY(-2px); }
.workspace-role .privacy-actions a > span { border-radius: 11px; }
.workspace-role .consent-panel { border-radius: var(--student-radius-md); }
:is(.workspace-role,.role-admin) .data-request-form {
  padding: 20px;
  background: rgba(255,253,250,.68);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.account-settings .timeline { display: grid; gap: var(--cab-s-2); margin: var(--cab-s-4) 0 0; padding: 0; list-style: none; }
.account-settings .timeline li { display: grid; gap: 2px; padding: var(--cab-s-3) 0; border-top: 1px solid var(--line); }
.account-settings .timeline li:first-child { border-top: 0; }
.account-settings .timeline b { font-size: var(--cab-fs-sm); }
.account-settings .timeline small { color: var(--muted); font-size: var(--cab-fs-xs); }

@media (max-width: 760px) {
  .workspace-role .account-index {
    padding: 6px;
    border-radius: 15px;
  }
  .workspace-role .account-index a,
  .workspace-role .account-index a:last-child { border: 0; border-radius: 10px; }
  .role-client .devices-panel { padding-inline: 13px; }
  .role-client .notification-settings { padding-inline: 12px; }
}

/* Student refinements — privacy, lesson history and calendar */
.workspace-role .account-form-primary {
  border-color: var(--line);
  box-shadow: 0 14px 36px rgba(26,22,32,.05);
}
.workspace-role .consent-panel .check-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  margin: 0;
  text-align: center;
}
.workspace-role .consent-panel .check-line input { flex: 0 0 auto; margin: 0; }

:is(.workspace-role,.role-admin) .data-request-form { display: block; margin-top: 18px; }
:is(.workspace-role,.role-admin) .data-request-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
:is(.workspace-role,.role-admin) .data-request-copy > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--jade-deep);
  background: var(--jade-soft);
  border-radius: 12px;
  font: 800 14px/1 "Noto Sans SC",sans-serif;
}
:is(.workspace-role,.role-admin) .data-request-copy h3 { font-size: 13px; }
:is(.workspace-role,.role-admin) .data-request-copy p { margin-top: 2px; color: var(--muted); font-size: var(--cab-fs-xs); }
:is(.workspace-role,.role-admin) .data-request-fields {
  display: grid;
  grid-template-columns: minmax(155px,.55fr) minmax(250px,1.45fr);
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}
:is(.workspace-role,.role-admin) .data-request-fields .field + .field { margin-top: 0; }
:is(.workspace-role,.role-admin) .data-request-fields .account-button { grid-column: 2; justify-self: end; }

.role-client .student-dashboard .lesson-list {
  display: grid;
  gap: 11px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.role-client .student-dashboard .lesson-history { scroll-margin-top: 88px; }
.role-client .student-dashboard .lesson-card,
.role-client .student-dashboard .lesson-card:first-child {
  display: grid;
  grid-template-columns: 104px minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 10px 16px;
  padding: 16px;
  background: rgba(255,253,250,.84);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 9px 26px rgba(26,22,32,.035);
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.role-client .student-dashboard .lesson-card:hover {
  background: rgba(255,253,250,.96);
  border-color: rgba(14,157,110,.2);
  box-shadow: 0 13px 32px rgba(26,22,32,.06);
  transform: translateY(-1px);
}
.role-client .student-dashboard .lesson-date {
  grid-row: 1 / span 2;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 11px;
  background: #f3efea;
  border-radius: 13px;
}
.role-client .student-dashboard .lesson-date b { font-size: var(--cab-fs-sm); }
.role-client .student-dashboard .lesson-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
}
.role-client .student-dashboard .lesson-meta .lesson-group { color: var(--ink); font-size: var(--cab-fs-sm); font-weight: 800; }
.role-client .student-dashboard .lesson-content { grid-column: 2; min-width: 0; }
.role-client .student-dashboard .lesson-content p { margin-bottom: 9px; }
.role-client .student-dashboard .hw-block {
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(14,157,110,.1);
}
.role-client .student-dashboard .lesson-content .inline-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

:is(.workspace-role,.role-admin) .student-calendar .calendar-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 0 26px;
  border-bottom: 1px solid var(--line-strong);
}
:is(.workspace-role,.role-admin) .calendar-overline {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--jade-deep);
  font-size: var(--cab-fs-micro);
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
:is(.workspace-role,.role-admin) .student-calendar h1 { margin: 0; font-size: clamp(32px,4vw,46px); letter-spacing: -1.7px; }
:is(.workspace-role,.role-admin) .calendar-period { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: var(--muted); font-size: var(--cab-fs-md); }
:is(.workspace-role,.role-admin) .calendar-period i { color: var(--red); font-style: normal; }
:is(.workspace-role,.role-admin) .calendar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255,253,250,.76);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(26,22,32,.045);
}
:is(.workspace-role,.role-admin) .calendar-controls a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  color: var(--ink-soft);
  border-radius: 12px;
  font-size: var(--cab-fs-xs);
  font-weight: 800;
  text-decoration: none;
  transition: .16s ease;
}
:is(.workspace-role,.role-admin) .calendar-controls a:hover { color: var(--jade-deep); background: var(--jade-soft); }
:is(.workspace-role,.role-admin) .calendar-controls .calendar-view-switch { color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(232,68,47,.16); }
:is(.workspace-role,.role-admin) .calendar-controls .calendar-view-switch:hover { color: #fff; background: var(--red-deep); }
:is(.workspace-role,.role-admin) .calendar-grid {
  gap: 10px;
  margin: 22px 0 32px;
  padding: 12px;
  background: rgba(255,253,250,.58);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 16px 42px rgba(26,22,32,.045);
}
:is(.workspace-role,.role-admin) .calendar-grid.week { grid-template-columns: repeat(7,minmax(0,1fr)); overflow-x: hidden; }
:is(.workspace-role,.role-admin) .calendar-grid.month { grid-template-columns: repeat(7,minmax(145px,1fr)); }
:is(.workspace-role,.role-admin) .calendar-day {
  min-height: 250px;
  padding: 13px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(26,22,32,.08);
  border-radius: 18px;
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
:is(.workspace-role,.role-admin) .calendar-day.weekend { background: rgba(248,244,240,.78); }
:is(.workspace-role,.role-admin) .calendar-day.today {
  background: linear-gradient(180deg,#f1fbf7,#fffdfa 54%);
  border-color: rgba(14,157,110,.42);
  box-shadow: 0 12px 30px rgba(14,157,110,.09);
}
:is(.workspace-role,.role-admin) .calendar-day > header { align-items: flex-start; margin-bottom: 16px; }
:is(.workspace-role,.role-admin) .calendar-date { display: flex; align-items: baseline; }
:is(.workspace-role,.role-admin) .calendar-date strong { color: var(--ink); font-size: 23px; line-height: 1; letter-spacing: -1px; }
:is(.workspace-role,.role-admin) .calendar-date span { color: var(--muted); font-size: var(--cab-fs-sm); font-weight: 700; }
:is(.workspace-role,.role-admin) .calendar-weekday { display: grid; justify-items: end; gap: 3px; }
:is(.workspace-role,.role-admin) .calendar-weekday b { color: var(--muted); font-size: var(--cab-fs-micro); text-transform: uppercase; }
:is(.workspace-role,.role-admin) .calendar-weekday small { padding: 3px 7px; color: var(--jade-ink); background: var(--jade-soft); border-radius: 99px; font-size: var(--cab-fs-xs); font-weight: 800; }
:is(.workspace-role,.role-admin) .calendar-events { display: grid; gap: 8px; }
:is(.workspace-role,.role-admin) .calendar-event {
  gap: 5px;
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(14,157,110,.13);
  border-left: 0;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(26,22,32,.045);
}
:is(.workspace-role,.role-admin) .calendar-event-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
:is(.workspace-role,.role-admin) .calendar-event-top time { color: var(--jade-deep); font-size: var(--cab-fs-md); font-weight: 800; }
:is(.workspace-role,.role-admin) .calendar-event-top span { color: var(--muted); font-size: var(--cab-fs-xs); }
:is(.workspace-role,.role-admin) .calendar-join { display: flex; justify-content: space-between; margin-top: 5px; padding-top: 7px; color: var(--jade-deep); border-top: 1px solid var(--line); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
:is(.workspace-role,.role-admin) .calendar-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}
:is(.workspace-role,.role-admin) .calendar-empty > span { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 7px; color: var(--jade-deep); background: var(--jade-soft); border-radius: 12px; font: 800 13px/1 "Noto Sans SC",sans-serif; }
:is(.workspace-role,.role-admin) .calendar-empty b { color: var(--ink-soft); font-size: var(--cab-fs-xs); }
:is(.workspace-role,.role-admin) .calendar-empty small { font-size: var(--cab-fs-xs); }

@media (max-width: 920px) {
  :is(.workspace-role,.role-admin) .student-calendar .calendar-hero { align-items: flex-start; flex-direction: column; }
  :is(.workspace-role,.role-admin) .calendar-grid.week { grid-template-columns: repeat(7,minmax(170px,1fr)); overflow-x: auto; }
}
@media (max-width: 760px) {
  :is(.workspace-role,.role-admin) .data-request-fields { grid-template-columns: 1fr; }
  :is(.workspace-role,.role-admin) .data-request-fields .account-button { grid-column: 1; justify-self: stretch; }
  :is(.workspace-role,.role-admin) .calendar-controls { width: 100%; }
  :is(.workspace-role,.role-admin) .calendar-controls a { flex: 1; }
}
@media (max-width: 560px) {
  .role-client .student-dashboard .lesson-card,
  .role-client .student-dashboard .lesson-card:first-child { grid-template-columns: 1fr; }
  .role-client .student-dashboard .lesson-date { grid-row: auto; display: flex; justify-content: space-between; }
  .role-client .student-dashboard .lesson-meta,
  .role-client .student-dashboard .lesson-content { grid-column: 1; }
  .role-client .student-dashboard .lesson-content .inline-form { justify-content: flex-start; }
  :is(.workspace-role,.role-admin) .student-calendar h1 { font-size: 34px; }
  :is(.workspace-role,.role-admin) .calendar-controls a b { display: none; }
}

/* Parent and teacher workspaces */
:is(.role-parent,.role-teacher) {
  --workspace-ink: #112f27;
  --workspace-mint: #e2f3ec;
  --workspace-cream: #fffaf4;
  --workspace-radius-xl: 26px;
  --workspace-radius-lg: 21px;
  --workspace-radius-md: 15px;
}
:is(.role-parent,.role-teacher) :is(.btn,.account-button,.account-notice button,.family-primary-button,.family-secondary-button,.teacher-action,.teacher-primary-button) {
  border-radius: 13px;
  transition: transform .16s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease;
}
:is(.role-parent,.role-teacher) :is(.btn,.family-primary-button,.family-secondary-button,.teacher-action,.teacher-primary-button):hover { transform: translateY(-2px); }
:is(.role-parent,.role-teacher) :is(input,select,textarea) { border-radius: 13px; }
.workspace-link {
  min-width: 146px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  background: rgba(255,255,255,.68);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26,22,32,.04);
  font-size: var(--cab-fs-xs);
  font-weight: 800;
  text-decoration: none;
}
.workspace-link b { font-size: 16px; }
.workspace-link:hover { color: var(--jade-deep); border-color: rgba(14,157,110,.25); transform: translateY(-2px); }
.workspace-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.workspace-section-head > div { display: flex; align-items: center; gap: 10px; }
.workspace-section-head > div > span { color: var(--red); font-size: var(--cab-fs-xs); font-weight: 800; letter-spacing: 1px; }
.workspace-section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.6px; }
.workspace-section-head > small { color: var(--muted); font-size: var(--cab-fs-xs); }
.workspace-section-head > a { padding-bottom: 2px; color: var(--jade-deep); border-bottom: 1px solid rgba(8,115,79,.3); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }

/* Family workspace */
.family-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 8px 0 29px; border-bottom: 1px solid var(--line-strong); }
.family-overline,.teacher-overline { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.35px; text-transform: uppercase; }
.family-overline i,.teacher-overline i { width: 22px; height: 1px; background: var(--red); }
.family-intro h1,.teacher-intro h1 { margin: 0; font-size: clamp(34px,4vw,49px); letter-spacing: -2px; }
.family-intro p,.teacher-intro p { max-width: 650px; margin-top: 9px; color: var(--muted); font-size: 13px; }
.family-snapshot { display: grid; grid-template-columns: 1.35fr repeat(3,1fr); gap: 12px; margin: 24px 0 42px; }
.family-stat { position: relative; min-height: 142px; display: flex; flex-direction: column; overflow: hidden; padding: 19px; background: rgba(255,253,250,.78); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 12px 32px rgba(26,22,32,.045); }
.family-stat > span { color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.family-stat strong { margin-top: auto; font-size: 34px; line-height: 1; letter-spacing: -1.5px; }
.family-stat small { margin-top: 6px; color: var(--muted); font-size: var(--cab-fs-xs); }
.family-stat.primary { color: #fff; background: linear-gradient(145deg,#183f34,#0d2a23); border-color: transparent; box-shadow: 0 18px 42px rgba(17,43,37,.15); }
.family-stat.primary > span,.family-stat.primary small { color: rgba(255,255,255,.58); }
.family-stat.primary > i { position: absolute; right: -7px; bottom: -29px; color: #fff; font: 900 100px/1 "Noto Sans SC",sans-serif; opacity: .045; }
.family-section { margin-bottom: 42px; }
.family-children { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.family-child-card { display: grid; grid-template-columns: 46px minmax(0,1fr) 84px; gap: 13px; align-items: center; padding: 17px; background: rgba(255,253,250,.82); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 11px 30px rgba(26,22,32,.04); }
.family-child-avatar { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; background: var(--jade); border-radius: 15px; font-size: 15px; font-weight: 800; }
.family-child-main { min-width: 0; display: grid; }
.family-child-main > span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }
.family-child-main h3 { margin-top: 3px; font-size: 13px; }
.family-child-main small { overflow: hidden; color: var(--muted); font-size: var(--cab-fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.family-child-balance { display: grid; justify-items: center; padding-left: 12px; border-left: 1px solid var(--line); }
.family-child-balance span,.family-child-balance small { color: var(--muted); font-size: var(--cab-fs-xs); }
.family-child-balance strong { font-size: 23px; }
.family-child-card > a { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; color: var(--jade-deep); border-top: 1px solid var(--line); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.family-empty { min-height: 170px; display: grid; place-content: center; justify-items: center; padding: 25px; color: var(--muted); background: rgba(255,253,250,.58); border: 1px dashed var(--line-strong); border-radius: var(--workspace-radius-lg); text-align: center; }
.family-empty > span { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 9px; color: var(--jade-deep); background: var(--workspace-mint); border-radius: 14px; font: 800 16px/1 "Noto Sans SC",sans-serif; }
.family-empty b { color: var(--ink); font-size: var(--cab-fs-md); }
.family-empty p { max-width: 390px; margin-top: 5px; font-size: var(--cab-fs-xs); }
.family-empty.compact { min-height: 132px; }
.family-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(270px,.72fr); gap: clamp(24px,3vw,40px); align-items: start; }
.family-main-column { min-width: 0; }
.family-side-column { position: sticky; top: 92px; display: grid; gap: 14px; }
.family-activity-list,.family-payment-list { display: grid; gap: 9px; }
.family-activity-list > article { display: grid; grid-template-columns: 106px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: var(--cab-s-4); background: rgba(255,253,250,.8); border: 1px solid var(--line); border-radius: 17px; }
.family-activity-date { display: grid; padding-right: 12px; border-right: 1px solid var(--line); }
.family-activity-date b { font-size: var(--cab-fs-xs); }.family-activity-date span { color: var(--muted); font-size: var(--cab-fs-xs); }
.family-activity-list h3 { font-size: var(--cab-fs-sm); }.family-activity-list p { color: var(--muted); font-size: var(--cab-fs-xs); }
.family-activity-list article > a { padding: var(--cab-s-2) var(--cab-s-3); color: var(--jade-deep); background: var(--workspace-mint); border-radius: 11px; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.family-payment-list article { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: var(--cab-s-4) 0; border-bottom: 1px solid var(--line); }
.family-payment-list article > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--jade-deep); background: var(--workspace-mint); border-radius: 11px; font-weight: 800; }
.family-payment-list h3,.family-payment-list strong { font-size: var(--cab-fs-xs); }.family-payment-list small { color: var(--muted); font-size: var(--cab-fs-xs); }
.family-link-panel,.child-payment-panel { padding: 20px; color: #fff; background: linear-gradient(150deg,#173d32,#0d2922); border-radius: var(--workspace-radius-lg); box-shadow: 0 18px 42px rgba(17,43,37,.15); }
.family-panel-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #79d8b5; background: rgba(255,255,255,.07); border-radius: 12px; font: 800 15px/1 "Noto Sans SC",sans-serif; }
.family-link-panel h2,.child-payment-panel h2 { margin: 17px 0 4px; font-size: 16px; }
.family-link-panel > p,.child-payment-panel > p { color: rgba(255,255,255,.52); font-size: var(--cab-fs-xs); }
.family-link-panel label,.child-payment-panel label { color: rgba(255,255,255,.58); }
.family-link-panel input,.child-payment-panel select { background-color: #fff; border-color: transparent; }
.family-primary-button,.family-secondary-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding: var(--cab-s-3); border: 0; font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }
.family-primary-button { color: #fff; background: var(--red); box-shadow: 0 10px 24px rgba(232,68,47,.16); }
.family-secondary-button { color: var(--workspace-ink); background: #fff; border: 1px solid var(--line); }
.family-pending { padding: 17px; background: rgba(255,253,250,.75); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); }
.family-pending > header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: var(--cab-fs-xs); font-weight: 800; }
.family-pending > header b { color: var(--jade); }.family-pending article { display: flex; justify-content: space-between; gap: 9px; padding: var(--cab-s-3) 0; border-top: 1px solid var(--line); }
.family-pending article div { display: grid; }.family-pending article b { font-size: var(--cab-fs-xs); }.family-pending article small,.family-pending article > span { color: var(--muted); font-size: var(--cab-fs-xs); }

/* Child detail for parent */
.family-child-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; padding: 5px 0 27px; border-bottom: 1px solid var(--line-strong); }
.family-child-intro > div:first-child { display: grid; }
.family-child-intro a { margin-bottom: 16px; color: var(--jade-deep); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.family-child-intro > div > span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.family-child-intro h1 { margin: 5px 0 0; font-size: clamp(34px,4vw,48px); letter-spacing: -1.8px; }
.family-child-intro p { color: var(--muted); font-size: var(--cab-fs-md); }
.child-balance-card { min-width: 144px; display: grid; padding: 16px; color: #fff; background: var(--workspace-ink); border-radius: 18px; box-shadow: 0 14px 34px rgba(17,43,37,.14); }
.child-balance-card span,.child-balance-card small { color: rgba(255,255,255,.58); font-size: var(--cab-fs-xs); }.child-balance-card strong { font-size: 31px; }
.child-snapshot { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin: 22px 0 39px; }
.child-snapshot article { min-height: 112px; display: flex; flex-direction: column; padding: 17px; background: rgba(255,253,250,.78); border: 1px solid var(--line); border-radius: 18px; }
.child-snapshot span { color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }.child-snapshot strong { margin-top: auto; font-size: 27px; }.child-snapshot small { color: var(--muted); font-size: var(--cab-fs-xs); }
.child-page-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(270px,.72fr); gap: clamp(24px,3vw,40px); align-items: start; }
.child-learning-column { min-width: 0; }
.child-section { margin-bottom: 39px; }
.child-schedule-list,.child-homework-list,.child-report-list { display: grid; gap: 10px; }
.child-schedule-list article { display: grid; grid-template-columns: 102px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: var(--cab-s-4); background: rgba(255,253,250,.8); border: 1px solid var(--line); border-radius: 17px; }
.child-schedule-list time { display: grid; }.child-schedule-list time b { font-size: var(--cab-fs-xs); }.child-schedule-list time span { color: var(--muted); font-size: var(--cab-fs-xs); }.child-schedule-list h3 { font-size: var(--cab-fs-sm); }.child-schedule-list p { color: var(--muted); font-size: var(--cab-fs-xs); }
.child-schedule-list article > a { color: var(--jade-deep); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.child-homework-list > a { display: grid; grid-template-columns: auto minmax(0,1fr) 18px; gap: 11px; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }.child-homework-list h3 { font-size: var(--cab-fs-sm); }.child-homework-list small { color: var(--muted); font-size: var(--cab-fs-xs); }.child-homework-list > a > b { color: var(--jade); }
.child-report-list article { padding: 16px; background: rgba(255,253,250,.8); border: 1px solid var(--line); border-radius: 17px; }.child-report-list time { color: var(--muted); font-size: var(--cab-fs-xs); }.child-report-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; }.child-report-head small { color: var(--muted); font-size: var(--cab-fs-xs); }.child-report-list p { font-size: var(--cab-fs-xs); }.child-report-list article > div:last-child { display: grid; gap: 3px; margin-top: 9px; padding: var(--cab-s-3) var(--cab-s-4); background: var(--workspace-mint); border-radius: 12px; }.child-report-list article > div:last-child b { color: var(--jade-deep); font-size: var(--cab-fs-micro); text-transform: uppercase; }.child-report-list article > div:last-child span { font-size: var(--cab-fs-xs); }
.child-action-column { position: sticky; top: 92px; display: grid; gap: 14px; }
.guardian-panel { padding: 20px; background: rgba(255,253,250,.78); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 12px 32px rgba(26,22,32,.045); }.guardian-panel .family-panel-mark { color: var(--jade-deep); background: var(--workspace-mint); }.guardian-panel h2 { margin: 15px 0 4px; font-size: 15px; }.guardian-panel > p { color: var(--muted); font-size: var(--cab-fs-xs); }.guardian-panel .check-line { display: flex; align-items: center; gap: 9px; font-size: var(--cab-fs-xs); }.guardian-panel .check-line input { margin: 0; flex: 0 0 auto; }

/* Teacher workspace */
.teacher-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 8px 0 29px; border-bottom: 1px solid var(--line-strong); }
.teacher-snapshot { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 12px; margin: 24px 0 43px; }
.teacher-stat { position: relative; min-height: 142px; display: flex; flex-direction: column; overflow: hidden; padding: 19px; background: rgba(255,253,250,.78); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 12px 32px rgba(26,22,32,.045); }
.teacher-stat > span { color: var(--muted); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }.teacher-stat strong { margin-top: auto; font-size: 31px; line-height: 1; letter-spacing: -1.3px; }.teacher-stat small { margin-top: 6px; color: var(--muted); font-size: var(--cab-fs-xs); }
.teacher-stat.agenda > span { order: 1; }.teacher-stat.agenda > strong { order: 2; }.teacher-stat.agenda > small { order: 3; }
.teacher-stat.primary { color: #fff; background: linear-gradient(145deg,#173d32,#0d2922); border-color: transparent; box-shadow: 0 18px 42px rgba(17,43,37,.16); }.teacher-stat.primary > span,.teacher-stat.primary small { color: rgba(255,255,255,.55); }.teacher-stat.primary > i { position: absolute; right: -3px; bottom: -26px; color: #fff; font: 900 98px/1 "Noto Sans SC",sans-serif; opacity: .045; }
.teacher-section { margin-bottom: 43px; scroll-margin-top: 88px; }
.teacher-agenda { display: grid; gap: 10px; }
.teacher-session-card { display: grid; grid-template-columns: 102px minmax(170px,1fr) auto; gap: 15px; align-items: center; padding: var(--cab-s-4); background: rgba(255,253,250,.82); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 28px rgba(26,22,32,.04); }
.teacher-session-card > time { display: grid; padding-right: 13px; border-right: 1px solid var(--line); }.teacher-session-card > time b { font-size: var(--cab-fs-xs); }.teacher-session-card > time strong { margin-top: 2px; font-size: 22px; }
.teacher-session-main { display: grid; }.teacher-session-main > span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }.teacher-session-main h3 { margin-top: 3px; font-size: 13px; }.teacher-session-main h3 a { text-decoration: none; }.teacher-session-main small { color: var(--muted); font-size: var(--cab-fs-xs); }
.teacher-session-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }.teacher-session-actions form { display: inline-flex; }
.teacher-action { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: var(--cab-s-2) var(--cab-s-3); color: var(--ink-soft); background: #fff; border: 1px solid var(--line-strong); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; cursor: pointer; }.teacher-action.done { color: #fff; background: var(--jade); border-color: var(--jade); }.teacher-action.lesson { color: var(--jade-deep); background: var(--workspace-mint); border-color: transparent; }
.teacher-more { position: relative; }.teacher-more summary { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); background: #f3efea; border-radius: 11px; cursor: pointer; }.teacher-more > div { position: absolute; z-index: 5; right: 0; top: 40px; width: 168px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 16px 38px rgba(26,22,32,.14); }.teacher-more button { width: 100%; padding: var(--cab-s-3); color: var(--ink-soft); background: transparent; border: 0; border-radius: 9px; font-size: var(--cab-fs-xs); text-align: left; cursor: pointer; }.teacher-more button:hover { background: var(--red-soft); color: var(--red-deep); }
.teacher-empty { min-height: 170px; display: grid; place-content: center; justify-items: center; padding: 25px; color: var(--muted); background: rgba(255,253,250,.58); border: 1px dashed var(--line-strong); border-radius: var(--workspace-radius-lg); text-align: center; }.teacher-empty > span { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 9px; color: var(--jade-deep); background: var(--workspace-mint); border-radius: 14px; font: 800 16px/1 "Noto Sans SC",sans-serif; }.teacher-empty b { color: var(--ink); font-size: var(--cab-fs-md); }.teacher-empty p { margin-top: 5px; font-size: var(--cab-fs-xs); }.teacher-empty.compact { min-height: 90px; }
.teacher-review-panel { margin-bottom: 43px; padding: 20px; background: linear-gradient(135deg,#fff2ed,#fffaf4); border: 1px solid rgba(232,68,47,.13); border-radius: var(--workspace-radius-lg); }.teacher-review-panel > header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }.teacher-review-panel header span { color: var(--red-deep); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }.teacher-review-panel h2 { margin: 3px 0 0; font-size: 17px; }.teacher-review-panel header > b { color: var(--red); font-size: 25px; }.teacher-review-panel > div { display: grid; }.teacher-review-panel > div > a { display: grid; grid-template-columns: auto minmax(0,1fr) 18px; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid rgba(232,68,47,.1); text-decoration: none; }.teacher-review-panel > div > a div { display: grid; }.teacher-review-panel > div > a strong { font-size: var(--cab-fs-xs); }.teacher-review-panel > div > a small { color: var(--muted); font-size: var(--cab-fs-xs); }.teacher-panel-link { color: var(--red-deep); font-size: var(--cab-fs-xs); font-weight: 800; }
.teacher-groups { display: grid; gap: 14px; }.teacher-group-card { overflow: hidden; background: rgba(255,253,250,.82); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 12px 32px rgba(26,22,32,.045); }.teacher-group-card > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px; }.teacher-group-card > header > div { display: grid; }.teacher-group-card > header span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }.teacher-group-card > header h3 { margin-top: 3px; font-size: 16px; }.teacher-group-card > header small { color: var(--muted); font-size: var(--cab-fs-xs); }.teacher-group-card > header > a { display: flex; gap: 11px; padding: var(--cab-s-2) var(--cab-s-3); color: var(--jade-deep); background: var(--workspace-mint); border-radius: 11px; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.teacher-meet { margin: 0 18px 12px; background: #f3efea; border-radius: 13px; }.teacher-meet summary { display: flex; align-items: center; justify-content: space-between; padding: var(--cab-s-3) var(--cab-s-4); font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }.teacher-meet summary b { color: var(--jade-deep); }.teacher-meet form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 0 10px 10px; }.teacher-meet input { min-height: 38px; }
.teacher-students { border-top: 1px solid var(--line); }.teacher-students > article { display: grid; grid-template-columns: 36px minmax(150px,1fr) minmax(130px,.8fr) 70px auto; gap: 11px; align-items: center; padding: var(--cab-s-4) var(--cab-s-5); border-top: 1px solid var(--line); }.teacher-students > article:first-child { border-top: 0; }.teacher-student-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--jade-deep); background: var(--workspace-mint); border-radius: 11px; font-size: var(--cab-fs-sm); font-weight: 800; }.teacher-student-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }.teacher-student-name > a { font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }.teacher-student-meta { display: grid; }.teacher-student-meta span { color: var(--muted); font-size: var(--cab-fs-micro); text-transform: uppercase; }.teacher-student-meta b { margin-top: 2px; font-size: var(--cab-fs-xs); }.teacher-student-actions { display: flex; gap: 5px; }.teacher-student-actions a { padding: var(--cab-s-2) var(--cab-s-3); color: var(--jade-deep); background: var(--workspace-mint); border-radius: 10px; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }
.teacher-bottom-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(250px,.6fr); gap: 14px; align-items: start; }.teacher-ledger,.teacher-drafts { overflow: hidden; background: rgba(255,253,250,.76); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); }.teacher-ledger > summary { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; cursor: pointer; }.teacher-ledger summary span { display: grid; }.teacher-ledger summary small { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; text-transform: uppercase; }.teacher-ledger summary b { font-size: 14px; }.teacher-ledger summary i { font-style: normal; }.teacher-ledger[open] summary i { transform: rotate(45deg); }.teacher-ledger table { min-width: 600px; }.teacher-drafts { padding: 16px; }.teacher-drafts > header { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: var(--cab-fs-xs); font-weight: 800; }.teacher-drafts > header b { color: var(--red); }.teacher-drafts > a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }.teacher-drafts > a div { display: grid; }.teacher-drafts strong { font-size: var(--cab-fs-xs); }.teacher-drafts small,.teacher-drafts a > span { color: var(--muted); font-size: var(--cab-fs-xs); }
.hw-pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: .45px;
  color: #6b656c; background: #eeece8; text-transform: uppercase; white-space: nowrap; }
.hw-pill.in_review { color: #704d0b; background: #fff1c9; }
.hw-pill.checked { color: #07543b; background: #dff6ed; }
.hw-pill.not_submitted { color: #8d2d31; background: #fde6e6; }
.hw-pill.none { color: var(--muted); background: var(--rice-deep); }

/* Teacher profile */
.teacher-profile-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; padding: 5px 0 27px; border-bottom: 1px solid var(--line-strong); }.teacher-profile-intro > div:first-child { display: grid; }.teacher-profile-intro a { margin-bottom: 16px; color: var(--jade-deep); font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }.teacher-profile-intro > div > span { color: var(--jade-deep); font-size: var(--cab-fs-micro); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }.teacher-profile-intro h1 { margin: 5px 0 0; font-size: clamp(34px,4vw,48px); }.teacher-profile-intro p { color: var(--muted); font-size: var(--cab-fs-sm); }.teacher-profile-balance { min-width: 170px; display: grid; padding: 15px; color: #fff; background: var(--workspace-ink); border-radius: 18px; }.teacher-profile-balance span { color: rgba(255,255,255,.55); font-size: var(--cab-fs-micro); text-transform: uppercase; }.teacher-profile-balance strong { font-size: 24px; }
.teacher-profile-grid { display: grid; grid-template-columns: minmax(230px,.55fr) minmax(0,1.45fr); gap: 14px; margin-top: 22px; }.teacher-identity-card,.teacher-password-card { padding: 21px; background: rgba(255,253,250,.8); border: 1px solid var(--line); border-radius: var(--workspace-radius-lg); box-shadow: 0 12px 32px rgba(26,22,32,.045); }.teacher-profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 15px; color: #fff; background: var(--red); border-radius: 17px; font-size: 18px; font-weight: 800; }.teacher-identity-card h2 { margin: 17px 0 2px; font-size: 18px; }.teacher-identity-card > a { color: var(--jade-deep); font-size: var(--cab-fs-xs); }.teacher-identity-card p { margin-top: 21px; color: var(--muted); font-size: var(--cab-fs-xs); }.teacher-password-card > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--jade-deep); background: var(--workspace-mint); border-radius: 12px; font: 800 14px/1 "Noto Sans SC",sans-serif; }.teacher-password-card > div { margin: 13px 0 17px; }.teacher-password-card h2 { margin: 0; font-size: 17px; }.teacher-password-card p { color: var(--muted); font-size: var(--cab-fs-xs); }.teacher-password-card .field-grid { margin-top: 12px; }.teacher-primary-button { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; padding: var(--cab-s-3); color: #fff; background: var(--workspace-ink); border: 0; font-size: var(--cab-fs-xs); font-weight: 800; cursor: pointer; }.teacher-telegram { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; margin-top: 14px; padding: 17px; background: var(--workspace-mint); border: 1px solid rgba(14,157,110,.13); border-radius: var(--workspace-radius-lg); }.teacher-telegram > span { width: 40px; height: 40px; display: grid; place-items: center; color: var(--jade-deep); background: #fff; border-radius: 13px; font: 800 14px/1 "Noto Sans SC",sans-serif; }.teacher-telegram h2 { margin: 0; font-size: 13px; }.teacher-telegram p { color: var(--muted); font-size: var(--cab-fs-xs); }.teacher-telegram > a { padding: var(--cab-s-2) var(--cab-s-3); color: var(--jade-deep); background: #fff; border-radius: 11px; font-size: var(--cab-fs-xs); font-weight: 800; text-decoration: none; }

@media (max-width: 1080px) {
  .family-snapshot,.teacher-snapshot { grid-template-columns: repeat(2,1fr); }
  .family-layout,.child-page-layout { grid-template-columns: minmax(0,1.35fr) minmax(250px,.72fr); gap: 22px; }
  .family-children { grid-template-columns: 1fr; }
  .teacher-session-card { grid-template-columns: 90px minmax(150px,1fr); }.teacher-session-actions { grid-column: 2; justify-content: flex-start; }
  .teacher-students > article { grid-template-columns: 36px minmax(150px,1fr) minmax(110px,.8fr) auto; }.teacher-student-meta:nth-of-type(2) { display: none; }
}
@media (max-width: 820px) {
  .family-intro,.teacher-intro,.family-child-intro,.teacher-profile-intro { align-items: flex-start; flex-direction: column; }
  .family-layout,.child-page-layout,.teacher-bottom-grid,.teacher-profile-grid { grid-template-columns: 1fr; }
  .family-side-column,.child-action-column { position: static; }
  .family-side-column,.child-action-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.family-side-column > :only-child,.child-action-column > :only-child { grid-column: 1 / -1; }
  .teacher-students > article { grid-template-columns: 36px minmax(0,1fr) auto; }.teacher-student-meta { display: none; }.teacher-student-actions { grid-column: 2 / -1; }
}
@media (max-width: 560px) {
  .family-snapshot,.teacher-snapshot { grid-template-columns: 1fr 1fr; }.family-stat,.teacher-stat { min-height: 118px; padding: 16px; }.family-stat.primary,.teacher-stat.primary { grid-column: 1 / -1; }.family-stat strong,.teacher-stat strong { font-size: 27px; }
  :is(.family-snapshot,.teacher-snapshot) > article:last-child { grid-column: 1 / -1; min-height: 100px; }
  .workspace-section-head { align-items: flex-start; flex-direction: column; }
  .family-child-card { grid-template-columns: 42px minmax(0,1fr); }.family-child-balance { grid-column: 1; grid-row: 2; padding: 8px 0 0; border: 0; }.family-child-card > a { grid-column: 2; }
  .family-activity-list > article,.child-schedule-list article { grid-template-columns: 1fr; }.family-activity-date { display: flex; justify-content: space-between; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .family-side-column,.child-action-column { grid-template-columns: 1fr; }
  .child-snapshot { grid-template-columns: 1fr; }.child-snapshot article { min-height: 96px; }
  .teacher-session-card { grid-template-columns: 1fr; }.teacher-session-card > time { display: flex; justify-content: space-between; padding: 0 0 9px; border-right: 0; border-bottom: 1px solid var(--line); }.teacher-session-actions { grid-column: 1; }
  .teacher-group-card > header { align-items: flex-start; flex-direction: column; }.teacher-meet form { grid-template-columns: 1fr; }
  .teacher-students > article { grid-template-columns: 36px minmax(0,1fr); }.teacher-student-actions { grid-column: 1 / -1; }
  .teacher-password-card .field-grid.two { grid-template-columns: 1fr; }
  .teacher-telegram { grid-template-columns: 40px minmax(0,1fr); }.teacher-telegram > a { grid-column: 2; }
}

/* Единый календарь расписания /schedule/calendar */
.scal-overline,
.ds-overline { color: var(--red); font-size: var(--fs-over); font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.scal-title { margin: 0 0 16px; font-size: 28px; letter-spacing: -.8px; }
.k-trial  { color: #704d0b; background: #fff4d3; border-color: #e8d191; }
.k-solo   { color: #07543b; background: #e2f6ee; border-color: #a5d9c5; }
.k-mini   { color: #17427c; background: #e4eefc; border-color: #a9c4e9; }
.k-group  { color: #6a2077; background: #f6e6f9; border-color: #d5aede; }
.k-native { color: #8d2d31; background: #fde8e6; border-color: #eeb3ad; }
.k-duo    { color: #0d4f66; background: #e2f2f8; border-color: #a6cfe0; }
.scal-person { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 10px 16px; background: var(--jade-soft); border-radius: 14px; font-size: 12px; font-weight: 700; }
.scal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-3); padding: 14px 16px; background: var(--rice-deep); border-radius: 16px; }
.scal-month-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 var(--s-5); padding: 10px 4px 0;
  font-size: 11px;
}
.scal-month-nav b { color: var(--ink); font-size: 13px; }
.scal-filters-pop { position: relative; }
.scal-filters-pop > summary { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.scal-filters-pop > summary::-webkit-details-marker { display: none; }
.scal-filters-pop[open] .scal-filterbar { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  display: flex; flex-direction: column; gap: 10px; min-width: 280px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.scal-day-actions { margin: 10px 0 14px; }
.scal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; }
.scal-nav b { color: var(--ink); }
.scal-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.scal-modes.scal-mine { margin: 0 0 var(--s-3); }
.scal-modes a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 11px; font-weight: 800; }
.scal-modes a.on { border-color: var(--jade); background: var(--jade); color: #fff; }
.scal-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px;
  padding: 14px 16px; background: rgba(255,253,250,.72); border: 1px solid var(--line); border-radius: 16px; }
.scal-filters label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; }
.scal-filters select { min-width: 170px; }
.scal-month-wrap { overflow-x: auto; }
.scal-month { width: 100%; border-collapse: collapse; table-layout: fixed; }
.scal-month th { padding: 6px 4px; color: var(--muted); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; text-align: left; }
.scal-month td { width: 14.28%; height: 120px; padding: var(--s-2); border: 1px solid var(--line);
  vertical-align: top; background: var(--paper); }
.scal-month td.outside { background: var(--rice); color: var(--muted); }
.scal-month td.today { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.scal-month td.scal-free-yes { box-shadow: inset 0 0 0 2px var(--jade); }
.scal-month td.scal-free-no { box-shadow: inset 0 0 0 2px var(--red); }
.scal-daynum { display: block; margin-bottom: 4px; font-size: var(--fs-md); font-weight: 800; font-variant-numeric: tabular-nums; }
.scal-month td.outside .scal-daynum { color: var(--muted); font-weight: 600; }
.scal-cell-link { display: block; height: 100%; border-radius: 10px; padding: var(--s-1); text-decoration: none; color: inherit; transition: background var(--dur-fast) var(--ease); }
.scal-cell-link:hover { background: var(--rice-deep); text-decoration: none; }
.scal-tag { display: inline-block; margin-top: var(--s-1); padding: 2px 6px; border-radius: 6px;
  font-size: var(--fs-over); font-weight: 800; background: var(--jade-soft); color: var(--jade-ink); }
.scal-tag.booked { background: #fff2d9; color: #7a5a12; border: 1px solid #ecd7a2; }
.scal-tag.done { background: #e8eaed; color: #5c6570; border: 1px solid #d0d4d8; }
.scal-tag.free-yes { background: var(--jade-soft); color: var(--jade-ink); }
.scal-tag.free-no { background: var(--red-soft); color: var(--red-deep); }
.scal-banner { margin-bottom: 16px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 14px;
  background: var(--rice-deep); font-size: 12px; }
.scal-day { margin-top: 20px; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,253,250,.72); }
.scal-day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }
.scal-day h2 { margin: 0 0 4px; font-size: var(--fs-xl); letter-spacing: -.4px; }
.scal-tabs { display: flex; gap: var(--s-2); margin: 0 0 var(--s-4); }
.scal-tabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 800;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.scal-tabs a.on { border-color: var(--jade); background: var(--jade); color: #fff; }
.scal-day-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin: 0 0 var(--s-4);
}
.scal-day-toolbar-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scal-free-toggle { margin-left: auto; }
.scal-pill-btn,
.scal-free-toggle {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; font-weight: 700; color: var(--muted); background: #fff;
  text-decoration: none;
}
.scal-pill-btn:hover,
.scal-free-toggle:hover { border-color: rgba(14,157,110,.35); color: var(--ink); }
.scal-free-toggle.on {
  border-color: var(--jade); background: var(--jade); color: #fff;
}
.scal-teacher { margin-bottom: 12px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 14px; }
.scal-teacher summary { font-weight: 800; font-size: var(--fs-md); cursor: pointer; padding: var(--s-1) 0; }
.scal-card { margin-top: var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; background: #fff;
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease); }
.scal-card:hover { box-shadow: var(--shadow-sm); }
.scal-card.k-line-trial  { border-left-color: #d79a10; }
.scal-card.k-line-solo   { border-left-color: #12855f; }
.scal-card.k-line-mini   { border-left-color: #2a63b4; }
.scal-card.k-line-group  { border-left-color: #8b3199; }
.scal-card.k-line-native { border-left-color: #c2413c; }
.scal-card.k-line-duo    { border-left-color: #1c7ea3; }
.scal-card.is-archive {
  background: #f3f4f5;
  border-color: #c5c9cc;
  border-left-color: #9aa3a8;
}
.scal-card.is-archive .btn,
.scal-card.is-archive .btn.j,
.scal-card.is-archive .btn-primary,
.scal-card.is-archive .btn-outline-secondary {
  color: #5b6368;
  background: #e8eaec;
  border-color: #c5c9cc;
}
.scal-lesson-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; justify-content: flex-end; }
.scal-archive-list { margin-top: 4px; }
.scal-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scal-when b { font-size: 13px; font-variant-numeric: tabular-nums; }
.scal-who { margin-top: 5px; font-size: 12px; }
.scal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sbf-student-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 12px 0 10px;
}
.sbf-student-tab {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 11px; font-weight: 700;
  color: var(--muted); background: #fff; cursor: pointer;
}
.sbf-student-tab:hover { border-color: rgba(14,157,110,.35); color: var(--ink); }
.sbf-student-tab.on {
  border-color: var(--jade); background: var(--jade); color: #fff;
}
.sbf-tab-panel { margin: 0 0 12px; }
.sbf-tab-panel[hidden] { display: none !important; }
.sbf-type-lock { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.sbf-type-lock legend { padding: 0 4px; color: var(--muted); font-size: 10px; font-weight: 800; }
.sbf-type-options { display: flex; flex-wrap: wrap; gap: 6px; }
.sbf-type-opt { display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s-2) var(--s-3); min-height: 32px; border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--fs-sm); font-weight: 700; background: #fff; color: var(--ink); cursor: default;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.sbf-type-opt.on { border-color: #3db87a; background: #3db87a; color: #fff; }
.sbf-type-opt[disabled]:not(.on) { color: var(--muted); background: var(--rice); opacity: .7; }
.scal-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scal-slot { display: inline-flex; align-items: center; gap: 6px; padding: var(--s-1) var(--s-3); min-height: 30px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.scal-slot:hover { background: var(--jade-soft); border-color: var(--jade); }
.scal-slot.unset { color: var(--muted); }
.scal-drop { margin-top: 6px; }
.scal-drop summary { color: var(--jade-deep); font-size: 11px; font-weight: 700; cursor: pointer; }
.scal-people { display: grid; gap: 6px; margin-top: 10px; }
.scal-people a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }

/* Продажный рабочий стол `/schedule/calendar`: цветовая перекодировка внутри
   страницы (Step 3) — глобальная палитра .k-* и её копия в admin_calendar.html
   не трогаются, переопределение живёт только под .schedule-calendar-page. */
.schedule-calendar-page .k-solo   { color: #0d3f66; background: #e3eefc; border-color: #a9c8e9; }
.schedule-calendar-page .k-line-solo { border-left-color: #1c62a3; }
.schedule-calendar-page .k-group  { color: #7a3d05; background: #fdead1; border-color: #eec48f; }
.schedule-calendar-page .k-line-group { border-left-color: #c2760f; }
.schedule-calendar-page .k-duo    { color: #0d4f66; background: #e2f2f8; border-color: #a6cfe0; }
.schedule-calendar-page .k-line-duo { border-left-color: #1c7ea3; }
.schedule-calendar-page .k-free   { color: #07543b; background: var(--jade-soft, #e2f6ee); border-color: #a5d9c5; }
.schedule-calendar-page .k-cancelled { color: var(--red-deep, #8d2d31); background: var(--red-soft, #fde8e6); border-color: #eeb3ad; }
.schedule-calendar-page .k-unavailable { color: var(--muted); background: var(--rice, #f4f0ea); border-color: var(--line); }
.schedule-calendar-page .k-video,
.scal-legend .k-video,
.scal-tag.k-video { color: #2a63b4; background: #e8f0fb; border-color: #a9c4e9; }
.kine-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sbf-done { display: grid; gap: 14px; padding-bottom: 8px; }
.sbf-done-meta { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.sbf-done-card {
  padding: 16px 16px 18px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #f7faf8;
}
.sbf-done-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--jade-ink, #0c5b42);
}
.sbf-done-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.sbf-done-actions, .sbf-done-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px;
}
.sbf-done-room { padding-top: 2px; }
.sbf-copy-hint { margin: 6px 0 0; font-size: 12px; color: var(--jade-ink, #0c5b42); font-weight: 700; }
.sbf-share-label { display: block; margin: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sbf-share-row { display: flex; gap: 8px; align-items: stretch; }
.sbf-share-input { flex: 1; min-width: 0; font-size: 13px; }
.sbf-share-text { width: 100%; font-size: 13px; line-height: 1.4; resize: vertical; }
.sbf-share-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px;
}
.kine-join-gate {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 20px;
  text-align: center;
}
.kine-mock-room-card {
  max-width: 28rem;
  width: 100%;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
  text-align: left;
}
.kine-mock-room-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jade, #1cb87a);
}
.kine-mock-room-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}
.kine-mock-room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.scal-legend { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.scal-legend li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 700; }

.scal-timegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: var(--s-2, 8px); margin: 10px 0 16px; }
.scal-tcell { display: flex; flex-direction: column; gap: 2px; padding: var(--s-2, 8px) var(--s-3, 10px);
  border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; text-decoration: none; color: inherit; }
.scal-tcell-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.scal-tcell.is-free { border-color: #a5d9c5; background: var(--jade-soft, #e2f6ee); }
.scal-tcell.is-mixed { border-color: #a9c8e9; background: #e3eefc; }
.scal-tcell.is-busy { border-color: var(--line); background: var(--rice, #f4f0ea); }
.scal-tcell.is-empty { color: var(--muted); opacity: .6; }

.scal-filterbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.scal-filterbar select, .scal-filterbar input[type="text"], .scal-filterbar input[type="number"] {
  min-width: 150px;
}
.scal-views { display: flex; gap: 6px; }
.scal-views a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; }
.scal-views a.on { border-color: var(--jade); background: var(--jade); color: #fff; }

/* Календарь · UX как панель ботов / материалы */
.scal-hub .page-head { margin-bottom: 18px; }
.scal-hub .page-head h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  letter-spacing: -.03em;
  color: var(--jade-ink, #0c5b42);
}
.scal-hub .page-head p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.scal-hub-card {
  margin: 0 0 24px;
  padding: 18px 18px 20px;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .12);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04), 0 18px 48px rgba(26, 22, 32, .06);
}
.scal-hub-card.scal-hub--move-pick,
.app-body .scal-hub-card.scal-hub--move-pick {
  border: 2px solid #2f6fed !important;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .28), 0 1px 2px rgba(26, 22, 32, .04), 0 18px 48px rgba(26, 22, 32, .06) !important;
}
.scal-move-pick-exit {
  white-space: nowrap;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: #2f6fed !important;
  border-color: #2f6fed !important;
  box-shadow: 0 6px 16px rgba(47, 111, 237, .22);
}
.scal-move-pick-exit:hover,
.scal-move-pick-exit:focus-visible {
  color: #fff !important;
  background: #1f5ad6 !important;
  border-color: #1f5ad6 !important;
}

.resch-slot-card {
  margin: 0;
}
.scal-modal .scal-reschedule .tcab-filters {
  display: block !important;
  margin: 0 0 1rem;
}
.scal-modal .scal-reschedule .tcab-filters > .tcab-people,
.scal-modal .scal-reschedule .tcab-filters > .scal-filter-acc.tcab-people {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  box-sizing: border-box;
}
.scal-modal .scal-reschedule .resch-from {
  display: grid;
  gap: 4px;
  margin: 0 0 1.1rem;
  padding: 12px 14px;
  border: 1px solid #d7ebe0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4fbf7 0%, #eef8f2 100%);
}
.scal-modal .scal-reschedule .resch-from-kicker {
  color: #2f6f52;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.scal-modal .scal-reschedule .resch-from-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 0;
  color: #1a1620;
  font-size: .9875rem;
  font-weight: 650;
  line-height: 1.35;
}
.scal-modal .scal-reschedule .resch-from-when {
  font-weight: 750;
}
.scal-modal .scal-reschedule .resch-from-sep {
  color: #8aa297;
}
.scal-modal .scal-reschedule .resch-from-teacher {
  color: #3d4a44;
  font-weight: 600;
}
.scal-modal .scal-reschedule .resch-fields {
  margin: 0;
  padding: 0;
  border: 0;
}
.scal-modal .scal-reschedule .resch-legend {
  display: block;
  width: 100%;
  margin: 0 0 .85rem;
  padding: 0;
  color: var(--jade-ink, #0c5b42);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.scal-modal .scal-reschedule .resch-when-block,
.scal-modal .scal-reschedule .ds-field {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  box-sizing: border-box;
}
.scal-modal .scal-reschedule .resch-when-block {
  margin: 0 0 1rem;
}
.scal-modal .scal-reschedule .resch-reason {
  margin: 0;
}
.scal-modal .scal-reschedule .form-label-optional {
  margin-left: .35rem;
  color: #8a8490;
  font-size: .78em;
  font-weight: 600;
}
.scal-modal .scal-reschedule .resch-to-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 2.75rem;
  height: auto;
  padding: .7rem 1rem;
  font-size: .9375rem;
  font-weight: 650;
  border-radius: 10px;
  border-style: dashed;
  line-height: 1.35;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.scal-modal .scal-reschedule .resch-to-calendar .ti {
  font-size: 1.1rem;
  line-height: 1;
}
.scal-modal .scal-reschedule .resch-to-calendar[hidden] {
  display: none !important;
}
.scal-modal .scal-reschedule .resch-slot-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cfe4d8;
  border-radius: 12px;
  background: #f7fbf8;
  box-sizing: border-box;
}
.scal-modal .scal-reschedule .resch-slot-card[hidden] {
  display: none !important;
}
.scal-modal .scal-reschedule .resch-slot-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e5f6ec;
  color: #2f6f52;
  font-size: 1.2rem;
}
.scal-modal .scal-reschedule .resch-slot-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.scal-modal .scal-reschedule .resch-slot-kicker {
  color: #5f7269;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.scal-modal .scal-reschedule .resch-slot-when {
  margin: 0;
  color: #1a1620;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.scal-modal .scal-reschedule .resch-slot-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.scal-modal .scal-reschedule .resch-slot-actions .lnf-card-btn-edit:hover,
.scal-modal .scal-reschedule .resch-slot-actions .lnf-card-btn-edit:focus-visible {
  color: #fff !important;
  background: #2f6fed !important;
  border-color: #2f6fed !important;
}
.scal-modal .scal-reschedule .resch-slot-actions .lnf-card-btn-remove:hover,
.scal-modal .scal-reschedule .resch-slot-actions .lnf-card-btn-remove:focus-visible {
  color: #fff !important;
  background: #e24b4b !important;
  border-color: #e24b4b !important;
}
.scal-modal .scal-reschedule .resch-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 22, 32, .08);
}
.scal-modal .scal-reschedule .resch-toolbar .lnf-form-error {
  width: 100%;
  text-align: left;
}
.scal-modal .scal-reschedule .resch-toolbar .lnf-submit,
.scal-modal .scal-reschedule .resch-toolbar #resch-submit {
  width: auto !important;
  min-width: 12.5rem;
  max-width: 100% !important;
  margin-left: 0;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.scal-modal .scal-reschedule .form-control,
.scal-modal .scal-reschedule .tcab-people .form-control {
  width: 100% !important;
  min-height: 2.75rem !important;
  height: auto !important;
  max-height: none !important;
  padding: .7rem .9rem !important;
  font-size: .9375rem !important;
  border-radius: 10px !important;
  line-height: 1.35 !important;
}

.scal-hub-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(26, 22, 32, .1);
}
.scal-hub .scal-views a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .14);
  text-decoration: none;
}
.scal-hub .scal-views a:hover { color: var(--ink); border-color: rgba(61,184,122,.4); }
.scal-hub .scal-views a.on {
  color: #fff; background: #3db87a; border-color: #3db87a;
}
.scal-hub .scal-filters-pop > summary {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff;
}
.scal-hub .scal-month-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 0;
}
.scal-hub .scal-month-label {
  min-width: 11rem;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--jade-ink, #0c5b42);
}
.scal-hub .scal-nav-btn-ph {
  visibility: hidden;
  pointer-events: none;
}
.scal-hub .scal-nav-btn {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft, #3f3944);
  font-size: 12px; font-weight: 700;
  text-decoration: none;
}
.scal-hub .scal-nav-btn:hover {
  border-color: rgba(61,184,122,.45);
  color: var(--jade-deep);
  background: var(--jade-soft, #e8f7ef);
}
.scal-hub .scal-legend {
  gap: 8px; margin: 0 0 16px;
}
.scal-hub .scal-legend li {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26,22,32,.04);
}
.scal-hub .scal-month {
  border-collapse: separate;
  border-spacing: 6px;
}
.scal-hub .scal-month th {
  padding: 8px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  border: 0;
}
.scal-hub .scal-month td {
  height: 112px;
  padding: 0;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fafafa;
  overflow: hidden;
}
.scal-hub .scal-month td.outside.scal-free-yes,
.scal-hub .scal-month td.outside.scal-has-lessons {
  box-shadow: inset 0 0 0 2px #3db87a;
  background: #fff;
  border-color: #3db87a;
}
.scal-hub .scal-month td.outside.scal-free-no {
  box-shadow: inset 0 0 0 2px var(--red);
  background: #fff;
}
.scal-hub .scal-month td.outside .scal-daynum { color: #8b9690; }
.scal-hub .scal-month td.scal-has-lessons {
  box-shadow: inset 0 0 0 2px #3db87a;
  background: #fff;
}
.scal-hub .scal-month td.today {
  border-color: #3db87a;
  box-shadow: inset 0 0 0 1px rgba(61,184,122,.35);
  background: #fff;
}
.scal-hub .scal-month td.scal-free-yes {
  box-shadow: inset 0 0 0 2px #3db87a;
  background: #fff;
}
.scal-hub .scal-month td.scal-free-no {
  box-shadow: inset 0 0 0 2px var(--red);
  background: #fff;
}
.scal-hub .scal-month td.past,
.scal-hub .scal-month td.past.scal-free-yes,
.scal-hub .scal-month td.past.scal-free-no,
.scal-hub .scal-month td.past.scal-has-lessons {
  background: #eef0f2;
  border-color: #d5d9dc;
  box-shadow: inset 0 0 0 1px #d5d9dc;
}
.scal-hub .scal-cell-link {
  padding: 10px 10px 8px;
  border-radius: 15px;
}
.scal-hub .scal-cell-link:hover { background: var(--jade-soft, #e8f7ef); }
.scal-hub .scal-daynum {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink);
}
.scal-hub .scal-tag {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
}
.scal-hub .scal-filters-pop {
  position: relative;
}
.scal-hub .scal-filters-pop > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(26, 22, 32, .14);
  font-weight: 700;
  color: var(--muted);
}
.scal-hub .scal-filters-pop > summary::-webkit-details-marker { display: none; }
.scal-hub .scal-filters-pop[open] > summary {
  color: #fff;
  background: #3db87a;
  border-color: #3db87a;
}
.scal-hub .scal-filters-pop[open] .scal-filterbar {
  min-width: min(420px, 86vw);
  border-radius: 18px;
  border-color: rgba(26, 22, 32, .12);
  box-shadow: 0 18px 48px rgba(26, 22, 32, .12);
}
.scal-hub .scal-modes {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 12px 0;
}
.scal-hub .scal-modes a {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 22, 32, .14);
  font-size: 12px; font-weight: 700;
  color: var(--muted); background: #fff;
  text-decoration: none;
}
.scal-hub .scal-modes a.on {
  color: #fff; background: #3db87a; border-color: #3db87a;
}
.scal-hub .scal-day {
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.scal-hub .scal-day h2 {
  color: var(--jade-ink, #0c5b42);
  letter-spacing: -.02em;
}
.scal-hub .scal-tabs a {
  padding: 8px 16px;
  font-size: 12px;
}
.scal-hub .scal-teacher {
  border-radius: 16px;
  background: #fff;
  border-color: rgba(26, 22, 32, .1);
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-hub .scal-card {
  border-radius: 14px;
  border-color: rgba(26, 22, 32, .1);
}
.scal-hub .scal-banner {
  border-radius: 14px;
  border-color: rgba(26, 22, 32, .1);
  background: #f7faf8;
}
.scal-hub .scal-pill-btn,
.scal-hub .scal-free-toggle {
  padding: 8px 16px;
  font-size: 12px;
}
@media (max-width: 720px) {
  .scal-hub-card { padding: 14px 12px 16px; border-radius: 18px; }
  .scal-hub .scal-month { border-spacing: 4px; }
  .scal-hub .scal-month td { height: 88px; border-radius: 12px; }
  .scal-book-teacher-list { grid-template-columns: 1fr; max-height: 200px; }
  .scal-hold-banner { align-items: stretch; }
  .scal-hold-btn { width: 100%; }
}

.scal-week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px;
  overflow-x: auto; }
.scal-week-day { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,250,.72); }
.scal-week-day.today { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.scal-week-day h3 { margin: 0 0 8px; font-size: 12px; }
.scal-week-day h3 a { color: var(--jade-deep); text-decoration: none; }
.scal-cell-link,
.scal-cell-link:hover,
.scal-cell-link:focus,
.scal-tcell,
.scal-tcell:hover {
  text-decoration: none;
}
.scal-cell-link:hover { color: var(--jade-deep); }
.scal-week-teacher { margin-bottom: 8px; }
.scal-week-free { margin-top: 8px; }
.scal-week-free.is-collapsed, .scal-day-free.is-collapsed { display: none; }
body.scal-drag-active .scal-week-free.is-collapsed,
body.scal-drag-active .scal-day-free.is-collapsed { display: block; }
.scal-free-count { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700;
  color: var(--muted); }

.scal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(26, 22, 32, .52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.scal-overlay[hidden] { display: none; }
.scal-modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(92vh, 860px);
  display: flex; flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .12);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04), 0 24px 64px rgba(26, 22, 32, .16);
  padding: 0;
}
.scal-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(26, 22, 32, .1);
  background: linear-gradient(180deg, #f7faf8 0%, #fff 100%);
  flex: 0 0 auto;
}
.scal-modal-head h3 {
  margin: 0;
  flex: 0 1 auto;
}
#scal-modal-aside {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-right: auto;
}
.lnf-head-when {
  margin: 0;
  color: var(--jade-ink, #0c5b42);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.scal-modal-kicker,
.scal-sheet-kicker,
.scal-modal .scal-overline,
.scal-sheet-head .scal-overline {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0;
  color: var(--jade-deep, #0e7a55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.scal-modal-kicker::before,
.scal-sheet-kicker::before,
.scal-modal .scal-overline::before,
.scal-sheet-head .scal-overline::before {
  content: "";
  width: 16px; height: 2px;
  background: var(--red, #e8442f);
  border-radius: 3px;
}
.scal-modal-head h3 {
  margin: 0;
  color: var(--jade-ink, #0c5b42);
  font-size: 1.25rem;
  letter-spacing: -.03em;
  font-weight: 800;
}
.scal-modal-close {
  appearance: none;
  border: 0;
  background: rgba(20, 24, 28, .08);
  color: var(--ink, #1a1620);
  width: 36px; height: 36px;
  border-radius: 12px;
  font-size: 1.2rem; font-weight: 700; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.scal-modal-close:hover { background: rgba(20, 24, 28, .14); }
.scal-modal-body {
  padding: 16px 18px 20px;
  overflow: auto;
  flex: 1 1 auto;
  background: #fafbfa;
}
.scal-modal:has(.tcab-people) {
  overflow: hidden;
}
.scal-modal:has(.tcab-people) .scal-modal-body {
  overflow: auto;
}
.scal-modal .tcab-people {
  position: relative;
  z-index: 1;
}
.scal-modal .sbf-form .tcab-people-list {
  position: absolute;
  top: calc(100% + 4px);
  bottom: auto;
  left: 0;
  right: 0;
  max-height: 12rem;
  margin-top: 0;
  z-index: 40;
}
body > .tcab-people-list {
  position: fixed;
  z-index: 80;
}
.scal-panel { display: block; }
[data-panel-back] { display: inline-block; margin-bottom: 12px; }
.scal-sheet-back { margin-bottom: 10px; }
.scal-sheet-head { margin: 0 0 16px; }
.scal-sheet-head h2 {
  margin: 4px 0 6px;
  font-size: 1.3rem;
  letter-spacing: -.03em;
  color: var(--jade-ink, #0c5b42);
  font-weight: 800;
}
.scal-sheet-head .muted { margin: 0 0 8px; }
.scal-sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.scal-sheet-sub {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
}
.scal-sheet-card {
  margin: 0 0 12px;
  padding: 14px 16px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-sheet-actions { margin-top: 4px; }
.scal-panel-status { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.scal-panel-status dt { color: var(--muted); font-weight: 700; }
.scal-panel-status dd { margin: 0; color: var(--ink); font-weight: 600; }

/* Модалки календаря · hub / боты */
.scal-modal [data-panel-back],
.scal-modal .scal-sheet-back.btn,
.scal-modal .btn.ghost.sm[data-panel-back] {
  display: inline-flex; align-items: center;
  margin: 0 0 14px;
  padding: 7px 14px;
  min-height: 34px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft, #3f3944);
  font-size: 12px; font-weight: 700;
  box-shadow: none;
  text-decoration: none;
}
.scal-modal [data-panel-back]:hover,
.scal-modal .scal-sheet-back.btn:hover {
  border-color: rgba(61,184,122,.45);
  color: var(--jade-deep);
  background: var(--jade-soft, #e8f7ef);
}
.scal-modal .scal-day {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
}
.scal-modal .scal-day-head {
  display: block;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-modal .scal-day-head h2 { margin: 4px 0 6px; }
.scal-modal .scal-day-toolbar,
.scal-modal .scal-day-actions,
.scal-modal .scal-actions {
  gap: 8px;
}
.scal-modal .scal-pill-btn,
.scal-modal .scal-free-toggle,
.scal-modal .scal-modes a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .14);
}
.scal-modal .scal-free-toggle.on,
.scal-modal .scal-modes a.on {
  background: #3db87a;
  border-color: #3db87a;
  color: #fff;
}
.scal-modal .scal-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 14px; padding: 4px;
  border-radius: 12px;
  background: var(--jade-soft, #e8f7ef);
  border: 0;
}
.scal-modal .scal-tabs a {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px; font-weight: 700;
}
.scal-modal .scal-tabs a.on {
  background: #fff;
  color: var(--jade-ink, #0c5b42);
  box-shadow: 0 1px 3px rgba(26, 22, 32, .08);
}
.scal-modal .scal-timegrid {
  gap: 8px;
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
}
.scal-modal .scal-tcell {
  border-radius: 14px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.scal-modal .scal-tcell:hover {
  border-color: rgba(61,184,122,.45);
  box-shadow: 0 4px 12px rgba(26, 22, 32, .06);
  transform: translateY(-1px);
}
.scal-modal .scal-teacher {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-modal .scal-teacher summary {
  font-size: 14px;
  color: var(--jade-ink, #0c5b42);
}
.scal-modal .scal-card {
  border-radius: 14px;
  border-color: rgba(26, 22, 32, .1);
  box-shadow: none;
}
.scal-modal .scal-card:hover {
  box-shadow: 0 4px 14px rgba(26, 22, 32, .06);
}
.scal-modal .btn.j.sm {
  border-radius: 999px;
  background: #3db87a;
  border-color: #3db87a;
}
.scal-modal .btn.ghost.sm {
  border-radius: 999px;
  border-color: rgba(26, 22, 32, .14);
  background: #fff;
}
.scal-modal .sbf-form.card,
.scal-modal form.card,
.scal-modal .card.sbf-form {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
  overflow: visible;
}
.scal-modal .lnf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 0;
}
.scal-modal .sbf-form .ds-grid {
  align-items: start;
}
.scal-modal .sbf-form .ds-field > label {
  display: flex;
  align-items: flex-end;
  min-height: 2.5em;
  line-height: 1.25;
}
.scal-modal .lnf-toolbar .lnf-submit,
.scal-modal #lnf-submit {
  width: calc((100% - 10px) / 2);
  max-width: 100%;
  margin-left: 0;
  justify-content: center;
}
.scal-modal .lnf-when {
  margin: 0;
  color: var(--jade-ink, #0c5b42);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.scal-modal .sbf-form.tcab-page .tcab-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  overflow: visible;
}
.scal-modal .lnf-person-row {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  align-items: end;
}
.scal-modal .lnf-person-row > .tcab-people {
  min-width: 0 !important;
  max-width: none !important;
  width: 100%;
  flex: none !important;
}
.scal-modal .lnf-person-row > .lnf-new-toggle {
  justify-self: start;
  align-self: end;
  width: auto;
}
.scal-modal .sbf-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.scal-modal .sbf-type-opt {
  width: 100%;
  min-height: 72px;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.scal-modal .sbf-type-opt .sbf-type-ico {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
  pointer-events: none;
}
.scal-modal .sbf-type-opt span {
  line-height: 1.2;
}
.scal-modal .sbf-type-opt:hover:not(.on),
.scal-modal .sbf-type-opt:focus-visible:not(.on) {
  border-color: #3db87a;
  background: #f3faf6;
  box-shadow: 0 0 0 3px rgba(61, 184, 122, .18);
  outline: none;
}
.scal-modal .sbf-type-opt.on {
  border-color: #3db87a;
  background: #3db87a;
  color: #fff;
}
.scal-modal .sbf-type-opt.on:hover,
.scal-modal .sbf-type-opt.on:focus-visible {
  border-color: #2fa66b;
  background: #2fa66b;
  box-shadow: 0 0 0 3px rgba(61, 184, 122, .22);
  outline: none;
}
.scal-modal .lnf-pair-row {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  align-items: start;
}
.scal-modal .lnf-pair-row > .scal-filter-acc {
  min-width: 0 !important;
  max-width: none !important;
  width: 100%;
  flex: none !important;
  overflow: hidden;
}
.scal-modal .lnf-pair-row details {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.scal-modal .lnf-pair-row .scal-filter-acc-val {
  flex: 1 1 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.scal-modal .lnf-pair-row details > summary {
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.scal-modal .lnf-pair-row details > summary .ti {
  flex: 0 0 auto;
}
.scal-modal .lnf-create-group,
.app-body .scal-modal .lnf-create-group,
body > .scal-filter-checks.is-portal .lnf-create-group,
.app-body body > .scal-filter-checks.is-portal .lnf-create-group,
.app-body > .scal-filter-checks.is-portal .lnf-create-group {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  width: calc(100% - 16px) !important;
  height: auto !important;
  margin: 8px !important;
  padding: 9px 12px !important;
  overflow: visible !important;
  border: 1px solid #3db87a !important;
  border-radius: 10px !important;
  background: #3db87a !important;
  color: #fff !important;
  font: inherit;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
.scal-modal .lnf-create-group:hover,
.scal-modal .lnf-create-group:focus-visible,
body > .scal-filter-checks.is-portal .lnf-create-group:hover,
body > .scal-filter-checks.is-portal .lnf-create-group:focus-visible,
.app-body > .scal-filter-checks.is-portal .lnf-create-group:hover,
.app-body > .scal-filter-checks.is-portal .lnf-create-group:focus-visible {
  background: #2fa66b !important;
  border-color: #2fa66b !important;
  color: #fff !important;
  outline: none;
}
.scal-modal .lnf-form-error {
  flex: 1 1 100%;
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
}
.scal-modal .lnf-form-error[hidden] { display: none !important; }
.scal-modal .lnf-pair-row.is-invalid details,
.scal-modal .tcab-people.is-invalid .form-control,
.scal-modal .tcab-people.is-invalid .tcab-people-shell .form-control,
.scal-modal #lnf-type-group.is-invalid .sbf-type-opt:not(.on),
.scal-modal #lnf-at.is-invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}
.scal-modal #lnf-type-group.is-invalid {
  outline: 2px solid rgba(192, 57, 43, .35);
  outline-offset: 4px;
  border-radius: 10px;
}
.scal-modal .lnf-new-toggle {
  height: 38px;
  min-height: 38px;
  align-self: end;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.scal-modal .lnf-new-toggle .ti {
  font-size: 16px;
  line-height: 1;
}
.scal-modal .lnf-student-card,
.scal-modal .lnf-person-card {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  background: #f7fbf8;
}
.scal-modal .lnf-student-card[hidden],
.scal-modal .lnf-person-card[hidden] { display: none !important; }
.scal-modal .lnf-student-card-body,
.scal-modal .lnf-person-card-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.scal-modal .lnf-person-card-row {
  margin: 0;
  color: var(--ink, #1a1620);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
.scal-modal .lnf-person-card-label {
  color: var(--muted, #6b6470);
  font-weight: 600;
}
.scal-modal .lnf-student-card-name,
.scal-modal .lnf-person-card-name {
  margin: 0;
  color: var(--ink, #1a1620);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.scal-modal .lnf-student-card-meta,
.scal-modal .lnf-person-card-meta {
  margin: 0;
  color: var(--muted, #6b6470);
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}
.scal-modal .lnf-student-card-actions,
.scal-modal .lnf-person-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.scal-modal .lnf-student-card-actions .btn-icon,
.scal-modal .lnf-person-card-actions .btn-icon {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}
.scal-modal .lnf-new-student-fields {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.scal-modal .lnf-new-student-fields .form-label {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scal-modal .lnf-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f6fed;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
}
.scal-modal .lnf-more-toggle:hover,
.scal-modal .lnf-more-toggle:focus-visible {
  color: #1f54c4;
  outline: none;
}
.scal-modal .lnf-more-toggle .ti {
  font-size: 16px;
  line-height: 1;
}
.scal-modal .lnf-more-fields {
  display: grid;
  gap: 12px;
}
.scal-modal .lnf-more-fields[hidden] {
  display: none !important;
}
.scal-modal .lnf-autopw {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1a1620);
  cursor: pointer;
}
.scal-modal .lnf-autopw input {
  margin: 0;
}
.scal-modal .lnf-teacher-hint {
  margin: 0;
}
.lnf-confirm {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 39, 31, 0.45);
}
.lnf-confirm[hidden] {
  display: none !important;
}
.lnf-confirm-card {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 39, 31, 0.22);
}
.lnf-confirm-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.lnf-confirm-text {
  margin: 0 0 16px;
  color: var(--muted, #6b6470);
  font-size: 14px;
  line-height: 1.45;
}
.lnf-confirm-text[hidden] {
  display: none !important;
}
.lnf-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
}
.lnf-creds-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7fbf8;
  font-size: 14px;
}
.lnf-creds-row span {
  color: var(--muted, #6b6470);
}
.lnf-creds-row b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.scal-modal .lnf-new-student-fields .form-control.is-invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12) !important;
}
.scal-modal .lnf-field-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.scal-modal .lnf-field-error[hidden] { display: none !important; }
.scal-modal .lnf-phone-field {
  position: relative;
  width: 100%;
  z-index: 2;
}
.scal-modal .lnf-phone-field.is-open { z-index: 30; }
.scal-modal .lnf-phone-shell { position: relative; width: 100%; }
.scal-modal .lnf-phone-prefix {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.scal-modal .lnf-phone-prefix:hover { background: rgba(20, 40, 30, .06); }
.scal-modal .lnf-phone-flag {
  display: block;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 40, 30, .12);
  background: #eee;
}
.scal-modal .lnf-phone-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8a968e;
  margin-top: 1px;
  transition: transform .18s ease;
}
.scal-modal .lnf-phone-field.is-open .lnf-phone-caret { transform: rotate(180deg); }
.app-body .scal-modal .lnf-phone-input,
.app-body .scal-book-body .lnf-phone-input,
.scal-modal .lnf-phone-input {
  padding-left: 3.75rem !important;
}
.scal-modal .lnf-phone-input::placeholder {
  color: #9aa59e;
  opacity: 1;
}
/* Prevent ghost placeholder overlapping typed digits (seen when formatter failed to bind). */
.scal-modal .lnf-phone-input:not(:placeholder-shown)::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}
.scal-modal .lnf-phone-field.is-invalid .lnf-phone-input,
.scal-modal .lnf-new-student-fields .form-control.is-invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12) !important;
}
.scal-modal .lnf-phone-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(240px, 40vh);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d5ddd8;
  box-shadow: 0 12px 28px rgba(20, 40, 30, .16);
}
.scal-modal .lnf-phone-dropdown[hidden] { display: none !important; }
.scal-modal .lnf-phone-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #e6ebe8;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.scal-modal .lnf-phone-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow: auto;
  max-height: 180px;
}
.scal-modal .lnf-phone-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: #1a1620;
}
.scal-modal .lnf-phone-option:hover,
.scal-modal .lnf-phone-option.is-active { background: #e8f7ef; }
.scal-modal .lnf-phone-option-name span {
  color: #6b6470;
  font-weight: 500;
}
.scal-modal .lnf-phone-option-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3d4a44;
  white-space: nowrap;
}
.scal-modal .lnf-phone-empty {
  padding: 12px;
  color: #6b6470;
  font-size: 13px;
  text-align: center;
}
.scal-modal .lnf-new-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.scal-modal .lnf-student-toolbar {
  margin-bottom: 8px;
}
.tcab-people-list .sbf-person.tcab-people-create,
.tcab-people-list .sbf-person.tcab-people-clear {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 9px 12px;
  border: 1px solid #3db87a;
  border-radius: 10px;
  background: #3db87a;
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.tcab-people-list .sbf-person.tcab-people-create:hover,
.tcab-people-list .sbf-person.tcab-people-create:focus-visible,
.tcab-people-list .sbf-person.tcab-people-clear:hover,
.tcab-people-list .sbf-person.tcab-people-clear:focus-visible {
  background: #2fa66b;
  border-color: #2fa66b;
  color: #fff;
}
.tcab-people-list .sbf-person.tcab-people-create .sbf-person-name,
.tcab-people-list .sbf-person.tcab-people-clear .sbf-person-name {
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.tcab-people-list .sbf-person.tcab-people-clear.is-on {
  background: #2fa66b;
  border-color: #2fa66b;
}
.scal-modal .sbf-when {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-modal .sbf-when b {
  display: block;
  color: var(--jade-ink, #0c5b42);
  font-size: 1.1rem;
  letter-spacing: -.02em;
}
.scal-modal .sbf-timer {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--jade-soft, #e8f7ef);
  color: var(--jade-ink, #0c5b42);
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}
.scal-modal .sbf-student-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 14px; padding: 4px;
  border-radius: 12px;
  background: var(--jade-soft, #e8f7ef);
}
.scal-modal .sbf-student-tab {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
}
.scal-modal .sbf-student-tab.on {
  background: #fff;
  color: var(--jade-ink, #0c5b42);
  box-shadow: 0 1px 3px rgba(26, 22, 32, .08);
}
.scal-modal label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.scal-modal input[type="text"],
.scal-modal input[type="number"],
.scal-modal input[type="email"],
.scal-modal input[type="tel"],
.scal-modal input[type="datetime-local"],
.scal-modal input[type="date"],
.scal-modal input[type="time"],
.scal-modal select,
.scal-modal textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  box-sizing: border-box;
}
.scal-modal input:focus,
.scal-modal select:focus,
.scal-modal textarea:focus {
  outline: none;
  border-color: rgba(61,184,122,.55);
  box-shadow: 0 0 0 3px rgba(61,184,122,.15);
}
.scal-modal .sbf-type-lock,
.scal-modal fieldset {
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fafbfa;
}
.scal-modal .scal-people a,
.scal-modal .scal-slot {
  border-radius: 12px;
  border-color: rgba(26, 22, 32, .12);
  background: #fff;
}
.scal-modal .scal-people a:hover,
.scal-modal .scal-slot:hover {
  border-color: rgba(61,184,122,.45);
  background: var(--jade-soft, #e8f7ef);
}
.scal-modal .scal-sheet-card {
  background: #fff;
}
.scal-modal .sbf-share-input,
.scal-modal .sbf-share-text {
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 12px;
  background: #fafbfa;
}
.scal-modal .ds-tag {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.scal-time-head { margin: 0 0 14px; padding-left: 17px; }
.scal-time-when {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  margin: 0;
  color: var(--jade-ink, #0c5b42);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.scal-time-date {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}
.scal-time-bookings,
.scal-time-free { margin-bottom: 12px; }
.scal-time-empty { margin: 0; }
.scal-time-cta { margin-top: 4px; }
.scal-time-cta-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}
.scal-modal .scal-time-cta-btn {
  background: #3db87a;
  border-color: #3db87a;
}
.scal-book-type-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 10px;
}
.scal-book-type-grid .sbf-type-opt,
.scal-book-type-grid a.sbf-type-opt {
  text-decoration: none;
  cursor: pointer;
}
.scal-book-type-grid a.sbf-type-opt:hover {
  border-color: rgba(61,184,122,.45);
  background: var(--jade-soft, #e8f7ef);
  color: var(--jade-ink, #0c5b42);
}
.scal-book-teachers-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 4px;
}
.scal-book-teachers-head .scal-sheet-sub { margin: 0; }
.scal-book-teachers-count {
  color: var(--jade-ink, #0c5b42);
  font-size: 12px;
  font-weight: 800;
}
.scal-book-teachers-hint { margin: 0 0 12px; }
.scal-book-teacher-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 2px;
  margin: 0 0 14px;
}
.scal-book-teacher-item { margin: 0; }
.scal-book-teacher-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.scal-book-teacher-btn:hover {
  border-color: rgba(61,184,122,.5);
  background: var(--jade-soft, #e8f7ef);
  box-shadow: 0 4px 12px rgba(26, 22, 32, .06);
}
.scal-book-teacher-name {
  color: var(--ink, #1a1620);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}
.scal-book-teacher-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.scal-book-unassigned {
  padding-top: 12px;
  border-top: 1px dashed rgba(26, 22, 32, .14);
}
.scal-book-unassigned-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.scal-book-unassigned-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px dashed rgba(61,184,122,.45);
  border-radius: 14px;
  background: var(--jade-soft, #e8f7ef);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.scal-book-unassigned-btn:hover {
  border-color: #3db87a;
  border-style: solid;
  box-shadow: 0 4px 12px rgba(61, 184, 122, .12);
}
.scal-book-unassigned-title {
  color: var(--jade-ink, #0c5b42);
  font-size: 14px;
  font-weight: 800;
}
.scal-book-unassigned-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.scal-hold-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(61,184,122,.28);
  border-radius: 16px;
  background: linear-gradient(180deg, #eef9f3 0%, #fff 100%);
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.scal-hold-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 4px;
  color: var(--jade-deep, #0e7a55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.scal-hold-kicker::before {
  content: "";
  width: 14px; height: 2px;
  background: var(--red, #e8442f);
  border-radius: 3px;
}
.scal-hold-text {
  margin: 0;
  color: var(--ink, #1a1620);
  font-size: 14px;
  line-height: 1.35;
}
.scal-hold-text b {
  color: var(--jade-ink, #0c5b42);
  font-variant-numeric: tabular-nums;
}
.scal-hold-sep { color: var(--muted); margin: 0 4px; }
.scal-hold-form { margin: 0; }
.scal-hold-btn {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #3db87a;
  border-color: #3db87a;
}
.lnf-draft-calendar-banner[hidden] { display: none !important; }
.lnf-draft-calendar-banner.scal-hold-banner {
  align-items: flex-start;
  gap: 14px 20px;
  padding: 16px 18px;
  border: 1px solid #d7e3dc;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7faf8 0%, #eef3f0 48%, #fbfcfa 100%);
  box-shadow: none;
}
.lnf-draft-copy { min-width: 0; flex: 1 1 240px; }
.lnf-draft-kicker {
  display: inline-block;
  margin: 0 0 6px;
  color: #3d4a44;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lnf-draft-kicker::before { content: none !important; display: none !important; }
.lnf-draft-lead {
  margin: 0 0 8px;
  color: #1d2730;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.lnf-draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.lnf-draft-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #e1e8e3;
  border-radius: 8px;
  background: #fff;
  color: #1d2730;
  font-size: 12.5px;
  line-height: 1.3;
}
.lnf-draft-chip-label {
  color: #6b7c74;
  font-weight: 600;
}
.lnf-draft-chip b {
  color: #1d2730;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lnf-draft-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-top: 2px;
}
.lnf-draft-calendar-banner [data-lnf-draft-dismiss]:hover,
.lnf-draft-calendar-banner [data-lnf-draft-dismiss]:focus-visible,
.lnf-draft-return [data-lnf-draft-dismiss]:hover,
.lnf-draft-return [data-lnf-draft-dismiss]:focus-visible {
  background: #e24b4b !important;
  border-color: #e24b4b !important;
  color: #fff !important;
}
.lnf-draft-calendar-banner .scal-hold-btn {
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 16px;
}
.lnf-draft-return {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d7e3dc;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7faf8 0%, #eef3f0 48%, #fbfcfa 100%);
  box-shadow: none;
}
.lnf-draft-return[hidden] { display: none !important; }
.lnf-draft-return-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.lnf-draft-return-copy .ti {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #3d4a44;
  font-size: 1.25rem;
}
.lnf-draft-return-copy strong {
  display: block;
  color: #1d2730;
  font-size: 14px;
}
.lnf-draft-return-sum {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.lnf-draft-return-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scal-modal .scal-book-types .scal-sheet-card p.muted {
  margin: 0;
  line-height: 1.4;
}
.sbf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.sbf-actions .btn {
  margin: 0;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}
.sbf-cancel-form { margin: 0; }
.scal-modal .sbf-actions .btn.ghost {
  border: 1px solid rgba(26, 22, 32, .14);
  background: #fff;
  color: var(--ink-soft, #3f3944);
}
.scal-modal .sbf-actions .btn.ghost:hover {
  border-color: rgba(61,184,122,.45);
  color: var(--jade-deep);
  background: var(--jade-soft, #e8f7ef);
}
.scal-modal .sbf-actions .btn.j {
  background: #3db87a;
  border-color: #3db87a;
}
@media (max-width: 720px) {
  .scal-overlay { align-items: flex-end; padding: 0; }
  .scal-modal {
    width: 100%; max-width: none;
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
  }
  .scal-modal-body { padding: 14px 14px 18px; }
}

.scal-quick { opacity: 0; transition: opacity .15s ease; }
.scal-card:hover .scal-quick, .scal-card:focus-within .scal-quick { opacity: 1; }
@media (max-width: 720px) { .scal-quick { opacity: 1; } }

.kine-preview-page .kine-role-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px;
}
.kine-preview-page .kine-role-tabs a {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.kine-preview-page .kine-role-tabs a.on {
  border-color: var(--jade); background: var(--jade); color: #fff;
}
.kine-dash {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin: 0 0 18px;
}
.kine-stat {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.kine-stat b { display: block; font-size: 22px; letter-spacing: -.4px; }
.kine-stat span { color: var(--muted); font-size: 11px; font-weight: 700; }
.kine-sales-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin: 0 0 10px;
}
.kine-filter {
  display: grid; gap: 2px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  text-decoration: none; color: inherit;
}
.kine-filter:hover { border-color: rgba(14,157,110,.35); }
.kine-filter.on {
  border-color: var(--jade); background: var(--jade-soft);
  box-shadow: inset 0 0 0 1px rgba(14,157,110,.2);
}
.kine-filter b { font-size: 20px; letter-spacing: -.4px; }
.kine-filter span { color: var(--muted); font-size: 11px; font-weight: 700; }
.kine-filter-hint { margin: 0 0 16px; }
.kine-chip-waiting { background: #fff2d9; color: #7a5a12; border-color: #ecd7a2; }
.kine-chip-cancelled { background: var(--red-soft); color: var(--red-deep); }
.kine-chip-replacing { background: #e8f0ff; color: #2a63b4; border-color: #b7c9ef; }
.kine-chip-live { background: var(--jade-soft); color: var(--jade-ink); }
.kine-chip-done { background: var(--rice-deep); color: var(--ink-soft); }
.kine-room { margin-top: 8px; }
.kine-status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
}
.kine-status-actions {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
}
.kine-renew,
.kine-rec-mark {
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.kine-status > .kine-renew { margin-left: auto; }
.kine-renew .ti,
.kine-rec-mark .ti { font-size: 16px; line-height: 1; }
.kine-rec-mark.is-preliminary {
  color: #9a6b12; border-color: #ecd7a2; background: #fff8e8;
}
.kine-rec-mark.is-done {
  color: #0c5b42; border-color: #a5d9c5; background: #e7f6ef;
}
.kine-rec-card { position: relative; }
.kine-rec-delete {
  position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0;
}
.kine-rec-delete .btn { background: #fff; }
.kine-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto;
}
.kine-dot-scheduled { background: var(--muted); }
.kine-dot-waiting { background: #d79a10; }
.kine-dot-live { background: var(--jade); }
.kine-dot-ended { background: var(--red-deep); }
.kine-dot-recorded { background: #2a63b4; }
.kine-rec {
  padding: 1px 7px; border-radius: 999px; background: var(--red-soft);
  color: var(--red-deep); font-size: 10px;
}
.kine-chip {
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 10px; background: var(--rice);
}
.kine-chip-ok { background: var(--jade-soft); color: var(--jade-ink); border-color: #a5d9c5; }
.kine-chip-bad { background: var(--red-soft); color: var(--red-deep); }
.kine-chip-live { background: var(--jade-soft); color: var(--jade-ink); }
.kine-wait { margin: 6px 0 0; font-size: 12px; }
.kine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.kine-observer-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
}
.scal-video-block {
  margin-top: 12px;
}
.kine-share-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.kine-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.kine-share-row .form-control {
  min-width: 0;
  font-size: 12.5px;
}
.kine-actions .tsched-drop { position: relative; }
.kine-actions .tsched-drop-body,
.kine-actions .tsched-drop > form {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 2rem));
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #e6ebe8;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(16, 39, 31, .16);
}
.kine-actions .kine-attach-rec .tsched-drop-body {
  width: min(360px, calc(100vw - 2rem));
}
.kine-actions .kine-attach-rec .form-label {
  margin: 0;
  font-size: .75rem;
}
.kine-actions .kine-attach-rec .form-control {
  font-size: .8125rem;
}
.kine-actions .tsched-drop:not([open]) > .tsched-drop-body,
.kine-actions .tsched-drop:not([open]) > form { display: none; }
.kine-actions .tsched-drop-body .scal-status-edit { display: grid; gap: 6px; margin: 0; }
.scal-card-student {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
}
.scal-card-student .scal-card-main {
  flex: 1 1 auto;
  min-width: 0;
}
.scal-card-student .scal-card-join {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.scal-card-student .scal-card-join .btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.scal-card-student .kine-status {
  margin-top: 6px;
}

/* Кабинет ученика · Мои уроки (список) */
.stu-lessons-page { max-width: 860px; }
.stu-lessons-section { margin-bottom: 18px; }
.stu-lessons-title {
  margin: 0 0 14px;
  color: var(--jade-ink, #0c5b42);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.stu-lesson-list { display: grid; gap: 10px; }
.stu-lesson-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 14px 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
}
.stu-lesson-card.is-history { opacity: .92; }
.tsched-page .stu-lesson-card.is-history { opacity: 1; }
.tsched-page .stu-lesson-card.is-history .stu-lesson-when,
.tsched-page .stu-lesson-card.is-history .stu-lesson-who,
.tsched-page .stu-lesson-card.is-history .stu-lesson-status,
.tsched-page .stu-lesson-card.is-history .tsched-sales {
  opacity: .92;
}
.stu-lesson-main { flex: 1 1 auto; min-width: 0; }
.stu-lesson-when {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  margin-bottom: 4px;
}
.stu-lesson-when b {
  color: var(--jade-ink, #0c5b42);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.stu-lesson-time {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stu-lesson-who {
  margin: 0 0 6px;
  color: var(--ink-soft, #3f3944);
  font-size: 14px;
  font-weight: 600;
}
.stu-lesson-join {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.stu-lesson-join .btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.tcab-month-block { margin-bottom: 18px; }
.tcab-month-block .stu-lessons-title { margin-bottom: 10px; }
.tcab-month-lede { margin: -4px 0 14px; }
.tcab-format-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 14px; padding: 0;
}
.tcab-format-chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef7f2;
  color: var(--jade-ink, #0c5b42);
  font-size: 13px; font-weight: 700;
}
.tcab-format-chips li b { font-weight: 800; margin-right: 4px; }
.tcab-bucket-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .tcab-bucket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .tcab-bucket-grid { grid-template-columns: 1fr; }
}
.tcab-bucket {
  display: grid;
  gap: 4px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(26, 22, 32, .08);
  border-radius: 16px;
  background: #fafbfa;
  position: relative;
}
.tcab-bucket-dot,
.tcab-type-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bucket, #1cb87a);
  display: inline-block;
}
.tcab-bucket-dot { margin-bottom: 2px; }
.tcab-type-dot { margin-right: 8px; vertical-align: middle; }
.tcab-bucket-label {
  font-size: 12px; font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted);
}
.tcab-bucket-count {
  font-size: 28px; line-height: 1.1; letter-spacing: -.02em;
  color: var(--jade-ink, #0c5b42);
}
.tcab-bucket-earn {
  font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft, #3f3944);
}
.tcab-bucket-bar {
  height: 6px; border-radius: 999px;
  background: rgba(26, 22, 32, .06);
  overflow: hidden; margin-top: 4px;
}
.tcab-bucket-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: var(--bucket, #1cb87a);
}
.tcab-bucket small { color: var(--muted); font-size: 12px; }
.tcab-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
@media (max-width: 720px) {
  .tcab-charts { grid-template-columns: 1fr; }
}
.tcab-chart-card {
  padding: 12px 14px 10px;
  border: 1px solid rgba(26, 22, 32, .08);
  border-radius: 16px;
  background: #fff;
}
.tcab-chart-card h3 {
  margin: 0 0 8px;
  font-size: 13px; font-weight: 800;
  color: var(--ink-soft, #3f3944);
}
.tcab-chart-canvas { position: relative; height: 220px; }
.tcab-subhead {
  margin: 18px 0 10px;
  font-size: 15px; font-weight: 800;
  color: var(--jade-ink, #0c5b42);
}
.tcab-student-stats {
  display: grid; gap: 8px;
}
.tcab-student-stat {
  display: grid; gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 22, 32, .08);
  border-radius: 14px;
  background: #fafbfa;
  color: inherit; text-decoration: none;
}
.tcab-student-stat:hover { border-color: rgba(61, 184, 122, .4); background: #f7fbf8; }
.tcab-student-stat strong { color: var(--jade-ink, #0c5b42); font-size: 15px; }
.tcab-student-stat span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.tcab-earn-head { margin-bottom: 8px; }
.tcab-earn-head .stu-lessons-title { margin-bottom: 4px; }
.tcab-earn-table-wrap { overflow-x: auto; }
.tcab-earn-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.tcab-earn-table th,
.tcab-earn-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(26, 22, 32, .08);
  text-align: left; vertical-align: top;
}
.tcab-earn-table th {
  color: var(--muted);
  font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.tcab-earn-table .tcab-earn-sum {
  text-align: right; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tcab-earn-table tfoot td {
  border-bottom: 0; padding-top: 8px; color: var(--ink-soft, #3f3944);
}
.tcab-earn-table tfoot tr.tcab-earn-total td {
  padding-top: 12px;
  color: var(--jade-ink, #0c5b42);
  font-weight: 800; font-size: 15px;
}
.tcab-bucket-table { margin-top: 4px; }
.stu-lesson-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--ink-soft, #3f3944);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.stu-lesson-status .kine-dot {
  margin-top: 0;
  flex: 0 0 auto;
  align-self: center;
}

.tsched-page .page-head { align-items: flex-start; }
.tsched-head-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tsched-toolbar { display: grid; gap: 14px; margin-bottom: 18px; }
.tsched-page .stu-media-tabs { margin: 0; }
.tsched-page .tsched-rec-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.tsched-page .kine-rec-card {
  background: #fff;
  border: 1px solid var(--tblr-border-color, #e6e8eb);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(12, 91, 66, .06);
}
.tsched-page .kine-rec-link {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none;
}
.tsched-page .kine-rec-cover {
  position: relative; aspect-ratio: 16 / 9;
  background: #f4eee3;
}
.tsched-page .kine-rec-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tsched-page .kine-rec-play {
  position: absolute; right: 14px; bottom: 14px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0c5b42; color: #fff; font-size: 15px;
  box-shadow: 0 8px 18px rgba(12, 91, 66, .28);
}
.tsched-page .kine-rec-body {
  display: grid; gap: 6px; padding: 16px 16px 18px;
}
.tsched-page .kine-rec-kicker {
  margin: 0; font-size: 13px; color: #0c5b42; font-weight: 600;
}
.tsched-page .kine-rec-body h3 {
  margin: 0; font-size: 18px; letter-spacing: -.3px; color: #163028;
}
.tsched-page .kine-rec-meta {
  margin: 0; color: var(--tblr-secondary, #667); font-size: 13px;
}
.tsched-page .kine-rec-btn {
  margin-top: 8px; width: 100%; justify-content: center; pointer-events: none;
}
@media (max-width: 860px) {
  .tsched-page .tsched-rec-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .tsched-page .tsched-rec-grid { grid-template-columns: 1fr; }
}
.tsched-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 14px;
}
.tsched-nav b { color: var(--jade-ink, #0c5b42); }
.tsched-nav-arrow {
  min-width: 32px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  justify-content: center;
}
.tsched-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
}
.tsched-page .tsched-toolbar { overflow: visible; }
.tsched-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  overflow: visible;
}
.tsched-filters label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tsched-filters--compact {
  margin-left: auto;
  align-items: flex-end;
  gap: 8px;
}
.tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc {
  /* «Отменена преподавателем» / «Пропущена учеником» — без обрезки */
  min-width: 14.5rem;
  width: max-content;
  max-width: none;
  flex: 0 0 auto;
}
.tsched-page .tsched-filters--compact .form-label {
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.2;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc details {
  min-height: 32px;
  height: 32px;
  width: 100%;
  min-width: 14.5rem;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc details > summary {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
  width: 100%;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc .scal-filter-acc-val {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc .scal-filter-checks {
  width: max-content;
  min-width: calc(100% + 2px);
  right: auto;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-opt {
  overflow: visible;
}
.app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-opt span {
  overflow: visible;
  text-overflow: clip;
}
.tsched-page .tsched-filters.tsched-filters--compact .tsched-filter-go {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
@media (max-width: 720px) {
  .tsched-toolbar-row { align-items: stretch; }
  .tsched-filters--compact {
    margin-left: 0;
    width: 100%;
  }
  .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc {
    max-width: none;
    width: auto;
    flex: 1 1 auto;
  }
  .app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc details,
  .app-body .tsched-page .tsched-filters.tsched-filters--compact .scal-filter-acc details > summary {
    width: 100%;
  }
}
.tsched-page .tsched-date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.tsched-page .tsched-date-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  min-width: 168px;
}
.tsched-page .tsched-date-field span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 15px;
  color: var(--muted);
}
.app-body .tsched-page .tsched-date-field .form-control {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  width: 168px;
  margin: 0;
}
.tcab-page .tcab-filters,
.tsched-page .tsched-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  overflow: visible;
}
.tcab-page .tsched-toolbar { overflow: visible; }
.tcab-page .tcab-filters .scal-filter-acc,
.tsched-page .tsched-filters .scal-filter-acc {
  margin: 0;
  min-width: 220px;
  flex: 1 1 200px;
  max-width: 280px;
  position: relative;
  z-index: 1;
}
.tcab-page .scal-filter-acc:has(details[open]),
.tsched-page .tsched-filters .scal-filter-acc:has(details[open]) { z-index: 8; }
.app-body .tcab-page .scal-filter-acc details,
.app-body .tsched-page .tsched-filters .scal-filter-acc details {
  position: relative;
  box-sizing: border-box;
  height: 38px;
  overflow: visible;
  background: #fff;
  border: 1px solid #c5d0cb;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.app-body .tcab-page .scal-filter-acc details:hover,
.app-body .tsched-page .tsched-filters .scal-filter-acc details:hover {
  border-color: #3db87a;
}
.app-body .tcab-page .scal-filter-acc details[open],
.app-body .tsched-page .tsched-filters .scal-filter-acc details[open] {
  z-index: 12;
  border-color: #8fd4b0;
  border-radius: 8px;
}
.app-body .tcab-page .scal-filter-acc details[open]:hover,
.app-body .tsched-page .tsched-filters .scal-filter-acc details[open]:hover {
  border-color: #3db87a;
}
.app-body .tcab-page .scal-filter-acc details > summary,
.app-body .tsched-page .tsched-filters .scal-filter-acc details > summary {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  padding: 0 .75rem;
  background: transparent;
}
.app-body .tcab-page .scal-filter-acc details[open] > summary,
.app-body .tsched-page .tsched-filters .scal-filter-acc details[open] > summary {
  border-bottom: 0;
}
.app-body .tcab-page .scal-filter-acc .scal-filter-checks,
.app-body .tsched-page .tsched-filters .scal-filter-acc .scal-filter-checks {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  z-index: 13;
  max-height: 12rem;
  margin-top: 0;
  overflow-y: auto;
  border: 1px solid #8fd4b0;
  border-top: 1px solid #e4ece7;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 28px rgba(26, 22, 32, .12);
  background: #fff;
}
body > .scal-filter-checks.is-portal {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: 0;
  padding: .35rem;
  overflow-y: auto;
  border: 1px solid #8fd4b0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(26, 22, 32, .18);
}
.tcab-page .tcab-filters .tsched-filter-go,
.tsched-page .tsched-filters .tsched-filter-go {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 1rem !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  line-height: 1;
  box-sizing: border-box;
}
.tcab-page .tcab-filters > label,
.tcab-page .tcab-filters .scal-filter-acc {
  display: grid;
  align-content: end;
  gap: 4px;
}
.tcab-page .tcab-filters .form-label {
  margin: 0;
  line-height: 1.2;
  min-height: 15px;
}
.app-body .tcab-page .tcab-filters .form-control,
.app-body .tcab-page .tcab-filters input[type="search"],
.app-body .tcab-page .tcab-filters input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px;
  padding: 0 .75rem !important;
  line-height: 36px;
  border: 1px solid #c5d0cb;
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.tsched-filter-go {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  line-height: 1;
  box-sizing: border-box;
  border-radius: 8px !important;
}
.tsched-card { align-items: flex-start; overflow: visible; }
.tsched-card.is-focus {
  border-color: var(--jade, #1f8a65);
  box-shadow: 0 0 0 3px rgba(31, 138, 101, 0.18);
}
.tsched-card .stu-lesson-main { display: grid; gap: 2px; overflow: visible; width: 100%; }
.tsched-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 2px;
}
.tsched-card-head .stu-lesson-when { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
.tsched-card-corner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
.tsched-corner-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tsched-corner-btn .ti { font-size: 18px; }
.tsched-card-corner .btn.j.sm {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.tsched-renew {
  display: inline-flex;
  margin: 0 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
}
.tsched-renew-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--jade-deep, #0f6b4c);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.tsched-renew-btn .ti {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  color: var(--ink-soft, #3f3944);
}
.tsched-renew-btn:hover { color: var(--jade-ink, #0c5b42); }
.tsched-renew-btn:hover .ti {
  border-color: #8fd4b0;
  background: #e8f6ee;
  color: var(--jade-ink, #0c5b42);
}
.tsched-ops-modal {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(15, 40, 30, .22);
  background: #fff;
  color: var(--ink);
}
.tsched-ops-modal::backdrop {
  background: rgba(18, 28, 24, .42);
}
.tsched-ops-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}
.tsched-ops-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.tsched-ops-close {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
}
.tsched-ops-meta {
  margin: 6px 16px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tsched-ops-sections {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}
.tsched-ops-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 12px;
  background: #fafbfa;
  color: var(--jade-deep, #0f6b4c);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.tsched-ops-link::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex: 0 0 auto;
}
.tsched-ops-link:hover { background: #e8f6ee; }
.tsched-info-modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
.tsched-info-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft, #3f3944);
  cursor: pointer;
}
.tsched-info-back:hover { background: #e8f6ee; color: var(--jade-ink, #0c5b42); }
.tsched-info-body {
  display: grid;
  gap: 12px;
  padding: 8px 16px 16px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}
.tsched-info-card {
  padding: 14px 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
}
.tsched-info-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}
.tsched-info-dl {
  display: grid;
  gap: 10px;
  margin: 0;
}
.tsched-info-dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 10px 14px;
  align-items: baseline;
}
.tsched-info-dl dt {
  margin: 0;
  color: var(--muted, #6b756f);
  font-size: 13px;
  font-weight: 600;
}
.tsched-info-dl dd {
  margin: 0;
  color: var(--ink, #1a1620);
  font-size: 14px;
  font-weight: 700;
}
.tsched-file-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f6ee;
  color: var(--jade-deep, #0f6b4c);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.tsched-info-upload {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.tsched-info-upload label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tsched-info-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tsched-info-upload-row input[type="file"] {
  flex: 1 1 180px;
  min-height: 38px;
}
.tsched-ops-block {
  position: relative;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 12px;
  background: #fafbfa;
  overflow: hidden;
}
.tsched-ops-block > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--jade-deep, #0f6b4c);
  user-select: none;
}
.tsched-ops-block > summary::-webkit-details-marker { display: none; }
.tsched-ops-block > summary::marker { content: ""; }
.tsched-ops-block > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
  flex: 0 0 auto;
}
.tsched-ops-block[open] > summary {
  background: #e8f6ee;
}
.tsched-ops-block[open] > summary::after {
  transform: rotate(-135deg);
}
.tsched-ops-block > form {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.tsched-ops-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.tsched-ops-body .tsched-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.tsched-ops-body .tsched-file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tsched-ops-body form {
  display: grid;
  gap: 8px;
}
.tsched-ops-block label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tsched-ops-block input,
.tsched-ops-block textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.tsched-ops-block textarea { min-height: 72px; resize: vertical; }
.tsched-hw-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.tsched-hw-btn.is-empty {
  background: #eef1f0;
  border-color: #d5dbd8;
  color: #6b756f;
}
.tsched-hw-btn.is-empty:hover {
  background: #e4e8e6;
  color: #4f5853;
}
.tsched-hw-btn.is-set {
  background: var(--jade, #1f8a65);
  border-color: var(--jade, #1f8a65);
  color: #fff;
}
.tsched-hw-btn.is-set:hover {
  background: var(--jade-ink, #0c5b42);
  border-color: var(--jade-ink, #0c5b42);
  color: #fff;
}
.tsched-hw-modal {
  width: min(480px, calc(100vw - 32px));
}
.tsched-hw-body,
.tsched-hw-form {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}
.tsched-hw-title { margin: 0; font-size: 16px; }
.tsched-hw-text {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink-soft, #3f3944);
  font-size: 14px;
  line-height: 1.45;
}
.tsched-hw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.tsched-hw-form label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tsched-hw-form input,
.tsched-hw-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.tsched-hw-form textarea { min-height: 96px; resize: vertical; }
.tsched-hw-form .hw-mat-attach { margin-top: 4px; }
.tsched-hw-form .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tsched-hw-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tsched-hw-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f7fbf8;
  border: 1px solid #d7e6dc;
  border-radius: 12px;
}
.tsched-hw-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
}
.tsched-hw-thumb img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
}
.tsched-hw-modal .hw-mat-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tsched-hw-modal .hw-mat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .12);
  border-radius: 12px;
}
.tsched-hw-modal .hw-mat-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}
.tsched-hw-modal .hw-mat-doc,
.tsched-hw-file .hw-mat-doc {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--jade-soft, #e8f6ee);
  color: var(--jade-deep, #0f6b4c);
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 auto;
}
.tsched-hw-modal .hw-mat-meta,
.tsched-hw-file .hw-mat-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.tsched-hw-modal .hw-mat-meta strong,
.tsched-hw-file .hw-mat-meta strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tsched-hw-modal .hw-mat-meta small { color: var(--muted); font-size: 12px; }
.tsched-hw-modal .hw-mat-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.tsched-hw-modal .hw-mat-remove:hover { color: #b42318; }
.tsched-hw-lightbox {
  border: 0;
  padding: 0;
  max-width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  background: transparent;
  overflow: visible;
}
.tsched-hw-lightbox::backdrop { background: rgba(10, 18, 16, .72); }
.tsched-hw-lightbox img {
  display: block;
  max-width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 72px);
  margin: 0 auto;
  border-radius: 12px;
  background: #111;
}
.tsched-hw-lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.tsched-sales { font-weight: 500; color: var(--muted); font-size: 13px; }
.tsched-page .stu-lesson-list { isolation: isolate; overflow: visible; }
.tsched-page .stu-lesson-card {
  position: relative;
  z-index: 1;
  overflow: visible;
}
.tsched-page .stu-lesson-card:has(.tsched-drop[open]),
.tsched-page .stu-lesson-card.is-drop-open {
  z-index: 40;
}
.tsched-card-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px;
  position: relative;
  overflow: visible;
}
.scal-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
}
.scal-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.scal-status-row .scal-status-edit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.scal-status-hint {
  margin: 0;
  max-width: none;
  color: var(--muted, #6b756f);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.scal-status-done,
.scal-status-noshow {
  transition: opacity .15s ease, filter .15s ease, box-shadow .15s ease;
}
.scal-status-done {
  color: #fff !important;
  background: #3db87a !important;
  border-color: #3db87a !important;
}
.scal-status-done:hover,
.scal-status-done:focus {
  color: #fff !important;
  background: #2fa66b !important;
  border-color: #2fa66b !important;
}
.scal-status-noshow {
  color: #fff !important;
  background: #e8442f !important;
  border-color: #e8442f !important;
}
.scal-status-noshow:hover,
.scal-status-noshow:focus {
  color: #fff !important;
  background: #bd2e20 !important;
  border-color: #bd2e20 !important;
}
.scal-status-done.is-active,
.scal-status-noshow.is-active {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px rgba(15, 40, 30, .08), 0 4px 12px rgba(15, 40, 30, .12);
}
.scal-status-done.is-dim,
.scal-status-noshow.is-dim {
  opacity: .38;
  filter: saturate(.55);
  box-shadow: none;
}
.scal-status-done.is-dim:hover,
.scal-status-noshow.is-dim:hover {
  opacity: .72;
  filter: saturate(.85);
}
.tsched-card-ops { margin-top: 8px; }
.tsched-drop {
  position: relative;
  flex: 0 0 auto;
  width: max-content;
  height: 32px;
  margin: 0;
  overflow: visible;
  z-index: 1;
}
.tsched-drop[open] { z-index: 50; }
.tsched-drop > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--jade-deep);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.tsched-drop > summary::-webkit-details-marker { display: none; }
.tsched-drop > summary::marker { content: ""; }
.tsched-drop > summary::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-bottom: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease, margin .15s ease;
}
.tsched-drop[open] > summary::after {
  margin-bottom: -2px;
  transform: rotate(-135deg);
}
.tsched-drop > summary:hover,
.tsched-drop[open] > summary {
  background: #e8f6ee;
  color: var(--jade-ink, #0c5b42);
}
.tsched-card-actions .btn.ghost:hover,
.tsched-card-actions .btn-outline-secondary:hover {
  background: #e8f6ee !important;
  border-color: #8fd4b0 !important;
  color: var(--jade-ink, #0c5b42) !important;
}
.app-body .tsched-page .tsched-drop > form {
  position: absolute !important;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  width: min(320px, 78vw);
  margin: 0;
  padding: 12px;
  background: #fff !important;
  opacity: 1 !important;
  isolation: isolate;
  border: 1px solid rgba(26, 22, 32, .16);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 39, 31, .22);
}
.app-body .tsched-page .tsched-drop > form label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.app-body .tsched-page .tsched-drop > form textarea,
.app-body .tsched-page .tsched-drop > form input[type="datetime-local"],
.app-body .tsched-page .tsched-drop > form input[type="text"],
.app-body .tsched-page .tsched-drop > form input[type="file"] {
  width: 100%;
  min-height: 2.25rem;
  padding: .4rem .55rem;
  border: 1px solid #d7e6dc;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.app-body .tsched-page .tsched-drop > form p {
  margin: 0;
}
.tsched-note { margin: 6px 0 0; }
.tsched-follow {
  flex: 0 0 auto;
  width: max-content;
  margin: 0;
  position: relative;
}
.tsched-follow[open] {
  flex: 1 0 100%;
  width: 100%;
}
.tsched-follow > summary {
  list-style: none;
  width: max-content;
}
.tsched-follow > summary::-webkit-details-marker { display: none; }
.tsched-follow > summary::marker { content: ""; }
.tsched-follow > summary::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 2px 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.tsched-follow[open] > summary::after {
  margin-bottom: -2px;
  transform: rotate(-135deg);
}
.tsched-follow-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  background: #f7fbf8;
  border: 1px solid #d7e6dc;
  border-radius: 12px;
}
.tsched-follow-body p { margin: 0; }
.tsched-follow-body label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.tsched-follow-body input[type="text"],
.tsched-follow-body input[type="datetime-local"],
.tsched-follow-body input:not([type]),
.tsched-follow-body textarea {
  width: 100%;
  min-height: 2.25rem;
  padding: .4rem .55rem;
  border: 1px solid #d7e6dc;
  border-radius: 8px;
  background: #fff;
}
.tsched-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.tsched-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tsched-file-list form { margin: 0; }
@media (max-width: 700px) {
  .tsched-filters select { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .stu-lesson-card {
    flex-direction: column;
    align-items: stretch;
  }
  .stu-lesson-join .btn { width: 100%; }
}
.kine-join.is-off, .btn.sm.is-off {
  opacity: .45; cursor: not-allowed; background: var(--rice); color: var(--muted);
  border-color: var(--line); box-shadow: none; transform: none;
}
.scal-card.kine-card-live { box-shadow: inset 0 0 0 1px var(--jade); }
.scal-card.kine-card-ended { opacity: .78; }
.kine-note { margin-top: 16px; }
.kine-stage { max-width: 720px; }
.kine-fake-player {
  min-height: 220px; margin-top: 12px; padding: 24px;
  border: 1px dashed var(--line); border-radius: 14px;
  background: var(--rice-deep); text-align: center;
}

.scal-dragging { opacity: .5; cursor: grabbing; }
.scal-drop-ok { box-shadow: inset 0 0 0 2px var(--jade); }
.scal-drop-blocked { opacity: .4; }

@media (max-width: 700px) {
  .scal-bar { flex-direction: column; align-items: stretch; }
  .scal-filters select { min-width: 0; width: 100%; }
  .scal-month td { height: 76px; }
  .scal-week-grid { grid-template-columns: 1fr; }
}

/* === Design system v2 === */
.ds-stack { display: grid; gap: var(--s-4); }
.ds-stack.tight { gap: var(--s-2); }
.ds-fieldset {
  margin: 0 0 var(--s-5);
  padding: var(--s-4) var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,253,250,.62);
}
.ds-fieldset > legend {
  padding: 0 var(--s-2);
  color: var(--muted);
  font-size: var(--fs-over);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.ds-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ds-field { display: grid; gap: var(--s-1); }
.ds-field > label { margin: 0; }
.ds-field > .ds-help { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.ds-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }
.ds-toolbar > .ds-toolbar-end { margin-left: auto; }
.ds-empty {
  display: grid;
  justify-items: start;
  gap: var(--s-3);
  padding: var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--rice);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.ds-empty b { display: block; color: var(--ink); font-size: var(--fs-md); }
.ds-empty.warn { border-color: rgba(232,68,47,.3); background: var(--red-soft); }
.ds-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  background: var(--jade-soft);
  color: var(--jade-ink);
  font-size: var(--fs-sm);
}
.ds-callout.warn { background: var(--amber-soft); color: var(--amber); }
.ds-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px var(--s-2);
  border-radius: 999px;
  background: var(--rice-deep);
  color: var(--ink-soft);
  font-size: var(--fs-over);
  font-weight: 700;
  white-space: nowrap;
}
.ds-tag.ok { background: var(--jade-soft); color: var(--jade-ink); }
.ds-tag.warn { background: var(--red-soft); color: var(--red-deep); }

/* === Design system v2 · phase 2 === */
.ds-page-intro { margin: 0 0 var(--s-6); }
.ds-page-intro h1 { margin: var(--s-2) 0 var(--s-2); font-size: var(--fs-h1); letter-spacing: -.8px; }
.ds-page-intro p { max-width: 68ch; margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.ds-filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4); background: rgba(255,253,250,.72); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ds-filterbar label { display: block; margin-bottom: var(--s-1); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.ds-filterbar > .ds-toolbar-end { margin-left: auto; color: var(--muted); font-size: var(--fs-over); }
.ds-datatable { overflow-x: auto; }
.ds-datatable table { width: 100%; border-collapse: collapse; }
.ds-datatable th, .ds-datatable td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); text-align: left; vertical-align: top; }
.ds-datatable th { color: var(--muted); font-size: var(--fs-over); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.ds-datatable th.num, .ds-datatable td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-datatable .ds-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: var(--s-3); }
.ds-tile { padding: var(--s-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ds-tile > span { display: block; color: var(--muted); font-size: var(--fs-over); font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.ds-tile > b, .ds-tile > strong { display: block; margin-top: var(--s-1); font-size: var(--fs-2xl); line-height: 1.1; }
.ds-tile > small { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--fs-over); }
.ds-tile.total { border-color: var(--jade); }
.ds-section { margin-top: var(--s-7); }
.ds-section > h2 { margin: 0 0 var(--s-1); font-size: var(--fs-lg); }
.ds-section > .ds-sub { margin: 0 0 var(--s-3); max-width: 70ch; color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: .001s;
    --dur-base: .001s;
    --dur-slow: .001s;
  }
  * {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

.auth-panel .mock-logins {
  margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line);
  border-radius: 12px; background: var(--rice-deep); font-size: 12px;
}
.auth-panel .mock-logins ul { margin: 8px 0 0; padding: 0; list-style: none; }
.auth-panel .mock-logins li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 4px;
}
.auth-panel .mock-logins code { font-size: 11px; }

/* Вкладки Мои уроки / Записи / Вебинары */
.stu-media-tabs {
  display: flex; gap: 4px; margin: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}
.stu-media-tabs a {
  padding: 10px 14px 12px; color: var(--muted); font-size: 15px; font-weight: 700;
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.stu-media-tabs a:hover { color: var(--ink); }
.stu-media-tabs a.active { color: var(--jade-deep); border-bottom-color: var(--jade); }
@media (max-width: 560px) {
  .stu-media-tabs { overflow-x: auto; }
}

.avail-page { max-width: 980px; }
.avail-editor { margin-bottom: 18px; }
.avail-form { display: grid; gap: 18px; }
.avail-fieldset { margin: 0; padding: 0; border: 0; }
.avail-fieldset legend {
  margin-bottom: 8px;
  color: var(--jade-ink, #0c5b42);
  font-size: 15px;
  font-weight: 800;
}
.avail-hint { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.avail-days, .avail-hours {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.avail-chip {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}
.avail-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.avail-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(26, 22, 32, .14);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.avail-chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(61,184,122,.25);
}
.avail-chip input:checked + span {
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
}
.avail-chip.is-ok span {
  border-color: rgba(14, 157, 110, .55);
  background: var(--jade-soft, #e8f7ef);
}
.avail-chip.is-ok input:checked + span {
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
}
.avail-chip.is-off {
  pointer-events: none;
}
.avail-chip.is-off span {
  opacity: .32;
  background: var(--rice, #f4f0ea);
  color: var(--muted);
  border-color: transparent;
}
.avail-day-shortcuts, .avail-presets, .avail-form-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px;
}
.avail-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.avail-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.avail-week-day {
  padding: 12px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
  min-height: 120px;
}
.avail-week-day h3 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--jade-ink, #0c5b42);
}
.avail-week-day h3 span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.avail-week-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.avail-week-day li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.avail-suggest-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
}
.avail-suggest-list li {
  display: grid; gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
}
.avail-suggest-list span { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .avail-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avail-time-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .avail-week { grid-template-columns: 1fr; }
}

.tcab-page { max-width: 960px; }
.astu-page.tcab-page { max-width: none; width: 100%; }
.tcab-page .teacher-empty {
  background: #fff;
  border: 1px dashed rgba(26, 22, 32, .14);
}
.tcab-home-head { margin-bottom: 10px; }
.tcab-home-head h1 { margin-bottom: 0; }
.tcab-next-lesson { margin-bottom: 16px; }
.tcab-home-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.tcab-home-earn { margin: 0; }
.tcab-home-spark { width: 96px; height: 96px; }
.tcab-home-spark canvas { width: 100% !important; height: 100% !important; }
@media (max-width: 560px) {
  .tcab-home-summary { grid-template-columns: 1fr; }
  .tcab-home-spark { display: none; }
}
.tcab-acc { display: grid; gap: 8px; margin: 8px 0 14px; }
.tcab-acc-item {
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  border-left: 4px solid var(--bucket, #1cb87a);
}
.tcab-acc-sum {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none;
}
.tcab-acc-sum::-webkit-details-marker { display: none; }
.tcab-acc-type { display: inline-flex; align-items: center; gap: 8px; }
.tcab-acc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bucket, #1cb87a);
}
.tcab-acc-metrics {
  display: inline-grid;
  grid-template-columns: 40px minmax(70px, auto) 40px;
  gap: 10px; align-items: center; justify-items: end;
  font-variant-numeric: tabular-nums; font-weight: 700;
}
.tcab-acc-panel {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(26, 22, 32, .08);
  background: #fafbfa;
}
.tcab-acc-lessons { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tcab-acc-lessons a {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: inherit; background: #fff;
  border: 1px solid rgba(26, 22, 32, .06);
}
.tcab-acc-lessons a:hover { border-color: rgba(61, 184, 122, .4); }
.tcab-acc-total {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: #eef7f2; color: var(--jade-ink, #0c5b42); font-weight: 800;
}
.ats-table { font-variant-numeric: tabular-nums; }
.ats-table thead th {
  white-space: nowrap;
  vertical-align: bottom;
}
.ats-table thead tr:first-child th[colspan] {
  text-align: center;
  border-bottom-width: 0;
  font-size: 13px;
  color: var(--jade-ink, #0c5b42);
}
.ats-table tbody td:first-child,
.ats-table tfoot th:first-child {
  font-weight: 700;
  color: var(--jade-ink, #0c5b42);
}
.ats-table tfoot th {
  font-variant-numeric: tabular-nums;
  background: #f3f7f5;
}
.ats-table th,
.ats-table td {
  border: 1px solid rgba(26, 22, 32, .12);
}
.ats-table thead th {
  background: #f7f8f7;
}
.ats-table thead tr:first-child th {
  border-bottom-color: transparent;
}
.tcab-month-tabs {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin: 0 0 14px;
  border-bottom: 1px solid rgba(26, 22, 32, .08);
}
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 14px;
  border-bottom: 1px solid rgba(26, 22, 32, .08);
}
.report-toolbar .tcab-month-tabs {
  margin: 0;
  border-bottom: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.report-toolbar .report-period {
  margin: 0 0 8px;
  flex: 0 1 auto;
}
.report-toolbar .report-period-row {
  flex-wrap: nowrap;
  gap: .65rem;
}
.report-toolbar .report-period-field { min-width: 9.5rem; }
.report-toolbar .report-period-field--action { min-width: auto; }
@media (max-width: 720px) {
  .report-toolbar .report-period-row { flex-wrap: wrap; }
  .report-toolbar .report-period-field { min-width: 0; flex: 1 1 8rem; }
}
.tcab-month-tabs a {
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.tcab-month-tabs a:hover { color: var(--ink); }
.tcab-month-tabs a.active {
  color: var(--jade-deep, #0c5b42);
  border-bottom-color: var(--jade-deep, #0c5b42);
  font-weight: 800;
}
.tcab-home-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: -6px 0 18px;
}
.tcab-home-meta a { color: var(--jade-deep, #0c5b42); font-weight: 700; text-decoration: none; }
.tcab-home-meta a:hover { text-decoration: underline; }
.tcab-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.tcab-stats--types {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 1100px) {
  .tcab-stats--types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tcab-stats--types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .tcab-stats--types { grid-template-columns: 1fr; }
}
.tcab-stat {
  display: grid;
  gap: 4px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 32, .04);
  color: inherit;
  text-decoration: none;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tcab-stat--type {
  position: relative;
  padding-left: 18px;
  overflow: hidden;
}
.tcab-stat--type::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--bucket, var(--jade, #1cb87a));
}
a.tcab-stat { cursor: pointer; }
.app-body a.tcab-stat,
.app-body a.tcab-stat:visited,
.app-body a.tcab-stat:hover,
.app-body a.tcab-stat:focus,
.app-body a.tcab-stat:active {
  color: inherit;
  text-decoration: none !important;
  outline: none;
}
.tcab-stat *,
.tcab-stat *::selection { user-select: none; background: transparent; }
a.tcab-stat:hover { border-color: rgba(61, 184, 122, .45); background: #f7fbf8; }
.app-body a.tcab-stat:hover span { color: var(--muted); }
.app-body a.tcab-stat:hover b { color: var(--jade-ink, #0c5b42); }
a.tcab-stat.is-accent:hover { background: var(--jade-deep, #0c5b42); border-color: var(--jade-deep, #0c5b42); }
.app-body a.tcab-stat.is-accent:hover,
.app-body a.tcab-stat.is-accent:hover b { color: #fff; }
.app-body a.tcab-stat.is-accent:hover span,
.app-body a.tcab-stat.is-accent:hover small { color: rgba(255,255,255,.72); }
.tcab-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tcab-crumbs a {
  color: var(--jade-deep);
  text-decoration: none;
}
.tcab-crumbs a:hover { text-decoration: underline; }
.tcab-crumbs-sep { color: #b7c2bc; }
.tcab-crumbs-now { color: var(--ink-soft, #3f3944); }
.teacher-profile-intro .tcab-crumbs { margin-bottom: 4px; }
.teacher-profile-intro .tcab-crumbs a {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.tcab-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tcab-stat b {
  color: var(--jade-ink, #0c5b42);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tcab-stat b.compact { font-size: 17px; letter-spacing: -.02em; }
.tcab-stat small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.tcab-stat.is-accent {
  background: var(--jade-deep, #0c5b42);
  border-color: var(--jade-deep, #0c5b42);
  color: #fff;
}
.tcab-stat.is-accent span,
.tcab-stat.is-accent small { color: rgba(255,255,255,.72); }
.tcab-stat.is-accent b { color: #fff; }
.tcab-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.tcab-filters label {
  display: grid; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.tcab-filters input, .tcab-filters select { min-width: 180px; }
.tcab-filters .muted { margin-left: auto; font-size: 12px; align-self: center; }
.tcab-page .scal-filter-acc { position: relative; z-index: 1; }
.tcab-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin: 0 0 12px;
}
.tcab-form-row .scal-filter-acc,
.tcab-page .mat-add .scal-filter-acc,
.tcab-page .note-form .scal-filter-acc {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
  margin: 0;
}
.tcab-file { position: relative; }
.tcab-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.tcab-file-name { color: var(--muted); font-size: 13px; }
.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.mat-add .field { margin: 0 0 12px; }
.mat-add .tcab-people {
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
}
.mat-add-go { margin-top: 20px; }
@media (max-width: 720px) {
  .tcab-form-row { grid-template-columns: 1fr; }
}
.tcab-people-list .sbf-person {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: .55rem .75rem;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #1d2730;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.tcab-people-list .sbf-person-name,
.tcab-people-list .sbf-person-phone {
  display: block;
  width: 100%;
  margin: 0;
}
.tcab-people-list .sbf-person-name {
  font-weight: 700;
}
.tcab-people-list .sbf-person-phone {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.tcab-people-list .sbf-person:hover,
.tcab-people-list .sbf-person:focus-visible {
  background: #e8f6ee;
}
.tcab-people > .form-label { display: block; margin-bottom: 4px; }
.tcab-people-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}
.tcab-people .form-control {
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  padding-right: 2.25rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.scal-modal .tcab-people .form-control:hover,
.scal-modal .tcab-people .form-control:focus {
  border-color: #3db87a;
}
.scal-modal .tcab-people .form-control:focus {
  box-shadow: 0 0 0 3px rgba(61, 184, 122, .18);
  outline: none;
}
.tcab-people-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1;
}
.tcab-people-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: .35rem;
  border: 1px solid #8fd4b0;
  border-radius: 10px;
  background: #f7fbf8;
  box-shadow: 0 10px 28px rgba(26, 22, 32, .12);
}
.tcab-people-list .sbf-person mark {
  background: #c8f0d8;
  color: inherit;
  font-weight: 800;
  padding: 0;
  border-radius: 2px;
}
.tcab-people-list .sbf-person.is-on { background: #d9f3e4; }
.tcab-people-empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.tsal-page .tsal-hero {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}
.tsal-page .tsal-hero .tcab-stat small { color: inherit; opacity: .78; }
.tsal-page .tsal-calc {
  display: grid;
  gap: 8px;
}
.tsal-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tsal-line:last-child { border-bottom: 0; }
.tsal-line.is-sum {
  border-top: 2px solid var(--workspace-ink, #10271f);
  border-bottom: 0;
  padding-top: 14px;
  font-weight: 800;
}
.tsal-line.is-minus b { color: var(--red-deep, #b42318); }
.tsal-line span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.tsal-line span b { display: block; color: var(--ink); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tsal-line > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tsal-payouts { display: grid; gap: 8px; }
.tsal-pay {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
}
.tsal-pay b.is-minus { color: var(--red-deep, #b42318); }
.tsal-lesson {
  display: grid;
  gap: 6px;
}
.tsal-k { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; }
.tsal-formula { margin-top: 0; padding: 16px 18px; }
.tsal-formula > summary {
  cursor: pointer;
  color: var(--jade-deep);
  font-size: 15px;
  font-weight: 800;
}
.tsal-formula-body code {
  display: block;
  margin: 10px 0 16px;
  padding: 12px 14px;
  background: #f6f4ef;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.tcab-student { align-items: flex-start; }
.tcab-student .stu-lesson-main { display: grid; gap: 4px; }
.tcab-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  color: var(--muted); font-size: 13px;
}
.tcab-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tcab-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.tcab-group {
  display: grid; gap: 8px;
  padding: 16px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 16px;
  background: #fff;
}
.tcab-group h3 { margin: 0; font-size: 16px; color: var(--jade-ink, #0c5b42); }
.tcab-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.tcab-group a { color: var(--jade-deep); font-weight: 700; text-decoration: none; }
.tcab-profile {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, .85fr) minmax(280px, 1.15fr);
  align-items: start;
}
.tcab-stack { display: grid; gap: 16px; }
.tcab-page .field + .field { margin-top: 12px; }
.tcab-page .tcab-form-row .field { margin: 0; display: grid; align-content: end; gap: 6px; }
.tcab-page .tcab-form-row .field + .field { margin-top: 0; }
.tcab-page .field label {
  margin: 0;
  min-height: 1.2em;
  line-height: 1.2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tcab-page .field .form-control,
.tcab-page .field input:not([type=checkbox]):not([type=radio]):not([type=file]) {
  box-sizing: border-box;
  width: 100%;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px;
  padding: 0 .75rem !important;
  line-height: 36px;
  border: 1px solid #c5d0cb;
  border-radius: 8px;
}
.tcab-page .field textarea.form-control {
  height: auto !important;
  min-height: 92px !important;
  max-height: none;
  padding: .7rem .75rem !important;
  line-height: 1.45;
}
.tcab-avatar {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.tcab-avatar-hit {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}
.tcab-avatar-hit:focus-visible {
  outline: 2px solid #3db87a;
  outline-offset: 3px;
}
.app-body .tcab-page .avatar.tcab-avatar-face,
.tcab-avatar-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  background-color: var(--jade-deep, #0c5b42);
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(12, 91, 66, .18);
}
.tcab-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 39, 31, .55);
  opacity: 0;
  transition: opacity .15s ease;
  font-size: 12px;
  font-weight: 700;
}
.tcab-avatar-overlay .ti { font-size: 22px; }
.tcab-avatar-hit:hover .tcab-avatar-overlay,
.tcab-avatar-hit:focus-visible .tcab-avatar-overlay { opacity: 1; }
.tcab-avatar-hint {
  margin: 0;
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.tcab-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.tcab-avatar-remove { margin-top: 2px; }
.tcab-identity { text-align: center; }
.tcab-identity h2 { margin: 6px 0 4px; font-size: 20px; }
.tcab-identity a { color: var(--jade-deep); font-weight: 700; }
.tcab-id {
  color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.tcab-rating { margin-top: 8px; color: var(--jade-deep); font-weight: 800; font-size: 13px; }
.tcab-photo { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.tcab-facts { margin: 14px 0 0; display: grid; gap: 10px; }
.tcab-facts > div {
  display: flex; justify-content: space-between; gap: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.tcab-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.tcab-facts .k { color: var(--muted); font-size: 13px; }
.tcab-facts .v { font-size: 13px; font-weight: 700; text-align: right; }
.tcab-note {
  margin-top: 12px; padding: 10px 12px;
  background: #fff8e8; border: 1px solid #ecd7a2; border-radius: 12px;
  color: #7a5a1c; font-size: 13px; line-height: 1.5;
}
.tcab-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tcab-chips a {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
}
.tcab-chips a.on { color: #fff; background: var(--jade-deep); border-color: var(--jade-deep); }
.tcab-mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.tcab-facts-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 14px 0 0;
}
.tcab-facts-grid > div {
  padding: 12px 14px;
  border: 1px solid rgba(26, 22, 32, .1);
  border-radius: 14px;
  background: #fff;
}
.tcab-facts-grid span {
  display: block; color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.tcab-facts-grid b { display: block; margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tcab-contacts {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-top: 12px; color: var(--muted); font-size: 13px;
}
.tcab-contacts a { color: var(--jade-deep); font-weight: 700; }
.note-form { display: grid; gap: 8px; max-width: 520px; margin-top: 14px; }
.note-form label { color: var(--muted); font-size: 12px; font-weight: 700; }
.note-form textarea { min-height: 84px; }
.note-form button { justify-self: start; }
.tcab-notes { margin-top: 14px; }
@media (max-width: 860px) {
  .tcab-profile { grid-template-columns: 1fr; }
  .tcab-filters input, .tcab-filters select { min-width: 0; width: 100%; }
}

/* Админ · список учеников: карточка вместо широкой таблицы, всё внутри поля. */
.astu-page .astu-count {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--cab-fs-sm, 13px);
}
.astu-page .tcab-filters > label,
.astu-page .tcab-filters .tcab-people {
  min-width: 220px;
  flex: 1 1 200px;
  max-width: 320px;
  position: relative;
  z-index: 2;
}
.astu-page .card,
.astu-page .card-body.tsched-toolbar {
  overflow: visible;
}
.astu-fold {
  padding: 0;
}
.astu-fold-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  user-select: none;
}
.astu-fold-toggle::-webkit-details-marker { display: none; }
.astu-fold-toggle::marker { content: ""; }
.astu-fold-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--jade-ink, #0c5b42);
}
.astu-fold-toggle .ti {
  margin-left: auto;
  font-size: 18px;
  color: var(--muted);
  transition: transform .15s ease;
}
.astu-fold[open] .astu-fold-toggle .ti { transform: rotate(180deg); }
.astu-fold .astu-list,
.astu-fold .empty-state { padding: 0 18px 18px; }
.astu-list {
  display: grid;
  gap: 16px;
  isolation: isolate;
}
.astu-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.astu-item-num {
  width: 36px;
  height: 36px;
  margin-top: 18px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8fbf1;
  border: 2px solid #1cb87a;
  color: #0f8f5c;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.astu-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 184, 122, 0.08), 0 8px 24px rgba(60, 60, 60, 0.05);
  overflow: visible;
}
.astu-card:has(.stu-mini[open]) { z-index: 6; }
.astu-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
  padding: 14px;
  background: linear-gradient(145deg, #fff 0%, #e8fbf1 100%);
  border: 2px solid #e5e5e5;
  border-radius: 14px;
}
.astu-who {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 220px;
}
.astu-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ddf4ff;
  border: 2px solid #b8e6fa;
  color: #1cb0f6;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.astu-who-copy { min-width: 0; flex: 1 1 auto; }
.astu-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  color: #777;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.astu-kicker .ti { font-size: 0.95rem; color: #0f8f5c; }
.astu-id {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.astu-name {
  display: block;
  overflow-wrap: anywhere;
  color: #0f8f5c;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.astu-name:hover { color: #0a7a4d; }
.astu-email {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow-wrap: anywhere;
}
.astu-email .ti { color: #0f8f5c; }
.astu-who .astu-kicker { font-size: 12px; }
.astu-who .astu-name { font-size: 1.2rem; }
.astu-who .astu-email { font-size: 12.5px; }
.astu-head-side {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  flex: 0 1 auto;
}
.astu-status,
.astu-open {
  display: grid;
  gap: 6px;
  justify-items: stretch;
  min-width: 120px;
  align-content: start;
}
.astu-open .astu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.astu-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
.astu-fact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 6px;
}
.astu-fact-top > span { margin-bottom: 0; }
.astu-block {
  min-width: 0;
}
.astu-block-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #0f8f5c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.astu-block-title .ti { font-size: 1.1rem; }
.astu-fact span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  color: #777;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.astu-fact span .ti { color: #0f8f5c; font-size: 0.95rem; }
.astu-fact .stu-mini { margin: 0; width: auto; }
.astu-facts {
  display: grid;
  gap: 8px;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.astu-facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.astu-facts--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.astu-fact {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  background: #f7f7f7;
}
.astu-fact b {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: #3c3c3c;
  background: #fff;
  border: 1px solid #e4eee8;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.astu-fact--wide { grid-column: 1 / -1; }
.astu-block--pay {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .08);
  border-radius: 12px;
}
.astu-topup {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 220px) max-content;
  grid-template-rows: 15px 36px;
  column-gap: 12px;
  row-gap: 4px;
  align-items: stretch;
  min-width: 0;
}
.astu-topup > input[type="hidden"] { display: none; }
.astu-topup--rate {
  grid-template-columns: minmax(0, 220px) max-content;
}
.astu-card.is-archived { opacity: .78; }
.astu-reject {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.astu-reject .form-control {
  width: 220px;
  max-width: 100%;
  height: 36px !important;
  min-height: 36px !important;
}
.astu-topup-field,
.astu-topup-spacer {
  grid-row: 1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 15px;
}
.astu-topup-spacer { visibility: hidden; }
.astu-topup .form-control,
.astu-topup-go {
  grid-row: 2;
  box-sizing: border-box;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  margin: 0 !important;
}
.astu-topup .form-control {
  width: 100%;
  min-width: 0;
  padding: 0 .65rem !important;
  line-height: 34px;
  background: #fff;
  border-color: #e4eee8;
}
.app-body .astu-page .form-control,
.app-body .astu-page .form-select {
  background: #fff;
  border-color: #e4eee8;
}
.app-body .astu-page .astu-btn {
  box-sizing: border-box;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 0;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border-radius: 8px !important;
}
.app-body .astu-page .astu-icon-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  color: #3d4a44 !important;
}
.app-body .astu-page .astu-icon-btn .ti {
  font-size: 16px;
  line-height: 1;
  color: inherit;
}
.app-body .astu-page .btn:hover,
.app-body .astu-page .btn:focus-visible,
.app-body .astu-page .btn:hover .ti,
.app-body .astu-page .btn:focus-visible .ti,
.app-body .astu-page .astu-icon-btn:hover,
.app-body .astu-page .astu-icon-btn:hover .ti,
.app-body .astu-page .astu-icon-btn:focus-visible,
.app-body .astu-page .astu-icon-btn:focus-visible .ti {
  color: #fff !important;
}
.app-body .astu-page .astu-fact .astu-btn,
.app-body .astu-page .astu-status .astu-btn {
  width: auto;
  white-space: nowrap;
}
.app-body .astu-page .astu-topup-go {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 14px !important;
}
.astu-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.astu-actions .astu-btn {
  width: auto;
  white-space: nowrap;
}
.astu-page .stu-mini { position: relative; margin: 0; }
.astu-page .stu-mini > summary { list-style: none; }
.astu-page .stu-mini > summary::-webkit-details-marker { display: none; }
.astu-page .stu-mini > summary::marker { content: ""; }
.astu-fact,
.astu-inline-actions { overflow: visible; }
.astu-page .stu-mini[open] { z-index: 40; }
.astu-page .stu-cell-form,
.astu-page .stu-mini-body {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  width: 280px;
  max-width: min(280px, calc(100vw - 32px));
  margin: 0;
  padding: 12px;
  background: #fff !important;
  border: 1px solid rgba(26, 22, 32, .16);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 39, 31, .18);
}
.astu-actions .stu-mini:nth-last-child(-n+2) .stu-cell-form,
.astu-actions .stu-mini:nth-last-child(-n+2) .stu-mini-body,
.astu-fact:last-child .stu-cell-form,
.astu-fact:last-child .stu-mini-body,
.astu-status .stu-cell-form {
  left: auto;
  right: 0;
}
.astu-page .stu-cell-form .form-select,
.astu-page .stu-cell-form .form-control,
.astu-page .stu-mini-body .form-control,
.astu-page .stu-mini-body .form-select {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 36px !important;
  min-height: 36px !important;
  background: #fff !important;
  border-color: #d5ddd8 !important;
  color: #1d2730;
}
.astu-page .stu-mini-body .muted,
.astu-page .stu-mini-body .muted.small {
  display: block;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.astu-page .mark-ok { color: var(--jade-deep); font-weight: 800; }
.astu-page .mark-no { color: var(--red, #c0392b); font-weight: 800; }

/* Legacy card add-forms (teachers / managers / leads / settings) */
.astu-page .astu-add.card {
  border: 3px solid #1d2730 !important;
  border-radius: 16px;
  overflow: visible;
}
.astu-page .astu-add .astu-add-account {
  min-inline-size: 0;
  margin: 0 0 18px;
  padding: 0;
  padding-inline: 0 !important;
  background: transparent;
  border: 0 !important;
  border-radius: 0;
}
.astu-page .astu-add .astu-add-account > legend {
  display: block;
  float: none;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  padding-inline: 0;
}
.astu-add-pass {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px 16px;
  align-items: end;
  margin-top: 12px;
}
.astu-add-autopw {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  min-height: 36px;
  color: #1d2730;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.astu-add-autopw input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  flex: 0 0 auto;
}
.astu-add-account .ds-help { margin: 8px 0 0; }

/* Redesigned student add form */
section.astu-add {
  margin-top: 24px;
  padding: 0;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 184, 122, 0.08), 0 8px 24px rgba(60, 60, 60, 0.05);
  overflow: hidden;
}
section.astu-add .astu-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(145deg, #fff 0%, #e8fbf1 100%);
  border-bottom: 2px solid #e5e5e5;
}
section.astu-add .astu-add-head-copy { min-width: 0; }
section.astu-add .astu-add-overline {
  display: inline-block;
  margin: 0 0 4px;
  color: #0f8f5c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
section.astu-add .astu-add-head h2 {
  margin: 0 0 6px;
  color: #3c3c3c;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
section.astu-add .astu-add-head p {
  margin: 0;
  max-width: 52ch;
  color: #777;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}
section.astu-add .astu-add-head-ico {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #ddf4ff;
  border: 2px solid #b8e6fa;
  color: #1cb0f6;
  font-size: 1.6rem;
}
section.astu-add .astu-add-form {
  display: grid;
  gap: 18px;
  padding: 20px 22px 22px;
}
section.astu-add .astu-add-block {
  margin: 0;
  padding: 16px;
  min-inline-size: 0;
  background: #f7f7f7;
  border: 2px solid #e5e5e5;
  border-radius: 14px;
}
section.astu-add .astu-add-block > legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  float: none;
  width: auto;
  margin: 0 0 12px;
  padding: 0 4px;
  color: #0f8f5c;
  font-size: 0.92rem;
  font-weight: 800;
}
section.astu-add .astu-add-block > legend .ti { font-size: 1.1rem; }
section.astu-add .astu-add-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
section.astu-add .astu-add-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
section.astu-add .astu-add-field label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #777;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
section.astu-add .astu-add-field label .ti { color: #0f8f5c; font-size: 0.95rem; }
section.astu-add .astu-add-field .form-control,
section.astu-add .astu-add-field .form-select {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
  border-color: #e4eee8 !important;
  background: #fff !important;
}
section.astu-add .astu-add-pass {
  gap: 10px 16px;
}
section.astu-add .astu-add-autopw {
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  color: #3c3c3c;
  font-weight: 700;
}
section.astu-add .astu-add-autopw input { accent-color: #1cb87a; }
section.astu-add .astu-add-help {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  color: #777;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}
section.astu-add .astu-add-help .ti {
  margin-top: 1px;
  color: #1cb0f6;
  font-size: 1rem;
}
section.astu-add .astu-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
section.astu-add .astu-add-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
}
@media (max-width: 960px) {
  .astu-facts--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  section.astu-add .astu-add-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .astu-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }
  .astu-item-num {
    width: 30px;
    height: 30px;
    margin-top: 14px;
    border-radius: 10px;
    font-size: 0.85rem;
  }
  .astu-facts--3,
  .astu-facts--5 { grid-template-columns: 1fr; }
  .astu-head-side { width: 100%; }
  .astu-head-side .astu-btn { width: 100%; }
  .astu-add-pass { grid-template-columns: 1fr; }
  .astu-add-autopw { white-space: normal; }
  section.astu-add .astu-add-head { flex-direction: column; align-items: flex-start; }
  section.astu-add .astu-add-head-ico { display: none; }
  section.astu-add .astu-add-grid { grid-template-columns: 1fr; }
  section.astu-add .astu-add-submit { width: 100%; }
}

.leads-page .astu-who { flex: 1 1 0; min-width: 0; max-width: 100%; }
.leads-page .leads-who-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.leads-page .leads-who-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.leads-page .astu-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leads-page .leads-who-name .astu-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.leads-page .leads-meta {
  margin-top: 6px;
  color: #3d4a44;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.leads-page .leads-origin {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.leads-page .astu-facts {
  grid-template-columns: minmax(380px, 2fr) repeat(3, minmax(150px, 1fr));
}
.leads-page .leads-contacts { min-width: 0; }
.leads-page .leads-contacts b {
  overflow-wrap: break-word;
  word-break: normal;
}
.leads-page .leads-contacts b div { white-space: nowrap; }
.leads-page .leads-trace-body {
  display: block;
  box-sizing: border-box;
  max-height: 240px;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid rgba(26, 22, 32, .08);
  border-radius: 12px;
  color: #1d2730;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}
.leads-page .astu-open .leads-open-btn,
.app-body .leads-page .astu-open .astu-btn {
  height: 41px !important;
  min-height: 41px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
}
.leads-page .leads-create-hint {
  margin-top: 6px;
  max-width: 28ch;
  line-height: 1.35;
}
.leads-page .leads-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.leads-page .leads-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 10px;
}
.leads-page .leads-toolbar-meta .astu-count { margin: 0; }
.leads-page .leads-read-all { margin: 0; }
.leads-page .leads-read-all .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.leads-page .leads-status a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfe4d8;
  border-radius: 8px;
  color: #2f6f52;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.leads-page .leads-status a.is-on {
  color: #fff;
  background: #3db87a;
  border-color: #3db87a;
}
.leads-page .lead-pill.new,
.leads-page .lead-pill.scheduled { color: #1b8756; background: #e8f7ef; }
.leads-page .lead-pill.converted { color: #1b4d8a; background: #e8f1fb; }
.leads-page .lead-pill.rejected,
.leads-page .lead-pill.archived { color: #6b7280; background: #eef1ef; }
.leads-page .leads-trial {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(200px, 1.1fr) auto;
  gap: 10px 12px;
  align-items: end;
}
.leads-page .leads-trial > input[type="hidden"] { display: none; }
.leads-page .leads-trial.has-format {
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1fr) minmax(140px, .9fr) auto;
}
.leads-page .leads-trial .form-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.leads-page .leads-trial .form-select,
.leads-page .leads-trial .form-control,
.leads-page .leads-trial .btn {
  height: 38px;
  min-height: 38px;
}
.leads-page .leads-trial-go {
  display: grid;
  align-content: end;
}
.leads-page .leads-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.leads-page .leads-next .btn,
.leads-page .leads-next .form-control {
  height: 32px;
  min-height: 32px;
}
.leads-page .leads-reject {
  display: flex;
  flex: 1 1 240px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.leads-page .leads-reject .form-control { flex: 1 1 auto; min-width: 0; }
.leads-page .leads-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 18px;
}
@media (max-width: 720px) {
  .leads-page .leads-trial,
  .leads-page .leads-trial.has-format { grid-template-columns: 1fr; }
  .leads-page .leads-trial-go .btn { width: 100%; }
  .leads-page .astu-facts { grid-template-columns: 1fr; }
  .leads-page .leads-contacts b div { white-space: normal; }
}

.orders-page .lead-pill.new { color: #1b4d8a; background: #e8f1fb; }
.orders-page .lead-pill.pending { color: #9a6700; background: #fff6e5; }
.orders-page .lead-pill.paid { color: #1b8756; background: #e8f7ef; }
.orders-page .lead-pill.failed { color: #b42318; background: #fdecea; }
.orders-page .lead-pill.cancelled { color: #6b7280; background: #eef1ef; }
.orders-page .astu-facts {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.settings-page .settings-fold-lead { padding: 0 18px 12px; margin: 0; }
.settings-page .settings-audit { padding: 0 18px 18px; }
.settings-page .leads-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.settings-page .leads-next .btn,
.settings-page .leads-next .form-control,
.settings-page .leads-reject .btn,
.settings-page .leads-reject .form-control {
  height: 32px;
  min-height: 32px;
}
.settings-page .leads-reject {
  display: flex;
  flex: 1 1 240px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.settings-page .leads-reject .form-control { flex: 1 1 auto; min-width: 0; }

.chat-page { min-width: 0; padding-bottom: 24px; }
.chat-page-head { margin-bottom: 18px; }
.chat-page-head p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.chat-layout {
  display: grid;
  grid-template-columns: minmax(245px, 310px) minmax(0, 1fr);
  min-height: min(720px, calc(100vh - 190px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.chat-sidebar { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; }
.chat-search-block, .chat-thread-block { padding: 17px; }
.chat-search-block { border-bottom: 1px solid var(--line); }
.chat-search-block > label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
.chat-search-help, .chat-search-status, .chat-empty-list { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.chat-search-results, .chat-thread-list { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.chat-search-results form { margin: 0; }
.chat-search-result {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); background: var(--paper); font-size: 12px; font-weight: 700;
  text-align: left; cursor: pointer;
}
.chat-search-result:hover, .chat-search-result:focus-visible { border-color: var(--jade); background: var(--jade-soft); }
.chat-thread-block h2 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.chat-thread-link {
  position: relative; display: grid; gap: 3px; min-width: 0; padding: 10px 11px;
  border: 1px solid transparent; border-radius: 11px; color: inherit; text-decoration: none;
}
.chat-thread-link:hover { background: #f8f7f4; }
.chat-thread-link.is-active { border-color: rgba(14,157,110,.22); background: var(--jade-soft); }
.chat-thread-name { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-preview { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-time { color: var(--muted); font-size: 10px; }
.chat-conversation { display: grid; grid-template-rows: auto minmax(240px, 1fr) auto; min-width: 0; min-height: 0; }
.chat-conversation-head { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-person-avatar { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 13px; color: #fff; background: var(--jade-deep); font-size: 15px; font-weight: 800; }
.chat-conversation-head h2 { margin: 0; font-size: 15px; font-weight: 800; }
.chat-conversation-head p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.chat-messages { display: flex; flex-direction: column; gap: 9px; min-height: 0; max-height: 64vh; overflow-y: auto; padding: 18px; scroll-behavior: smooth; }
.chat-message { display: flex; align-items: flex-start; }
.chat-message.is-mine { justify-content: flex-end; }
.chat-message-card { max-width: min(80%, 560px); padding: 10px 12px 7px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: var(--shadow-xs); }
.chat-message.is-mine .chat-message-card { border-color: rgba(14,157,110,.2); border-radius: 14px 14px 4px 14px; background: var(--jade-soft); }
.chat-message-body { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message-body + .chat-file-link, .chat-message-body + .chat-image-link { margin-top: 8px; }
.chat-image-link { display: block; max-width: min(100%, 420px); overflow: hidden; border-radius: 10px; }
.chat-image { display: block; max-width: 100%; max-height: 360px; object-fit: contain; }
.chat-file-link { display: inline-block; color: var(--jade-ink); font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.chat-message-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 10px; margin-top: 5px; color: var(--muted); font-size: 9px; }
.chat-no-messages { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
.chat-compose { padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.chat-compose textarea { min-height: 72px; resize: vertical; }
.chat-compose-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.chat-compose-actions .btn { min-height: 36px; }
.chat-file-picker { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.chat-file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.chat-file-picker:focus-within { outline: 2px solid var(--jade); outline-offset: 2px; }
.chat-file-name { min-width: 0; flex: 1 1 120px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.chat-compose-status { min-height: 16px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.chat-empty-conversation { display: grid; align-content: center; justify-items: center; min-height: 440px; padding: 30px; color: var(--muted); text-align: center; }
.chat-empty-conversation h2 { margin: 14px 0 2px; color: var(--ink); font-size: 17px; }
.chat-empty-conversation p { max-width: 320px; margin: 0; font-size: 12px; }
.chat-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: var(--jade-deep); background: var(--jade-soft); font-size: 25px; }
@media (max-width: 800px) {
  .chat-layout { grid-template-columns: 1fr; min-height: 0; }
  .chat-sidebar { max-height: 390px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-thread-block { max-height: 210px; overflow-y: auto; }
  .chat-conversation { min-height: 520px; }
  .chat-messages { max-height: 52vh; }
}
@media (max-width: 520px) {
  .chat-page-head { align-items: flex-start; }
  .chat-layout { margin-right: -7px; margin-left: -7px; border-radius: 13px; }
  .chat-search-block, .chat-thread-block { padding: 13px; }
  .chat-conversation { min-height: 480px; }
  .chat-messages { padding: 12px; }
  .chat-message-card { max-width: 90%; }
  .chat-compose { padding: 10px; }
  .chat-compose-actions { align-items: stretch; }
  .chat-compose-actions .btn-primary { margin-left: auto; }
}

.po-order-details {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: start;
  column-gap: 16px;
  row-gap: 10px;
}
.po-order-details dt { margin: 0; color: var(--muted); font-weight: 600; }
.po-order-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .po-order-details { grid-template-columns: minmax(90px, 30%) minmax(0, 1fr); column-gap: 12px; row-gap: 8px; }
}

.po-crm-card .po-order-details { row-gap: 14px; }
.po-crm-card .po-order-details dt { padding-top: 4px; font-size: 13px; }
.po-crm-card .po-order-details dd { line-height: 1.5; }
.po-crm-card .po-crm-deal-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.po-crm-card a.po-crm-deal-link:hover { color: var(--jade-deep); text-decoration: underline; }
.po-crm-card .po-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}
.po-crm-card .po-status--success { color: #176b42; background: #e8f6ed; border-color: #cdebd7; }
.po-crm-card .po-status--pending { color: #805b0b; background: #fff5d9; border-color: #f3e3ad; }
.po-crm-card .po-status--working { color: #205c91; background: #eaf3fc; border-color: #d2e5f8; }
.po-crm-card .po-status--failed { color: #9a2929; background: #fbe9e7; border-color: #f2d0cc; }
.po-crm-card .po-status--neutral { color: #56616f; background: #f1f3f5; border-color: #e1e5e9; }
.po-crm-card .po-crm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; width: 100%; color: var(--muted); font-size: 13px; }
.po-crm-card .po-crm-meta span { font-size: 12px; }

@media (max-width: 600px) {
  .po-crm-card .card-body { padding: 16px; }
  .po-crm-card .po-order-details { grid-template-columns: minmax(76px, 27%) minmax(0, 1fr); column-gap: 10px; row-gap: 12px; }
  .po-crm-card .po-status { padding-inline: 7px; font-size: 11px; }
}
