/* Booster · Учёт — прототип.
   Стиль «рамка и белый лист» (tasteskill framed-sheet, seed 726796346). Лицо продукта: рамка тонирована
   от фиолетово-чернильного Booster (#200B3F) до едва заметного серо-сливового, единственный цвет данных —
   оранжевый лиса (#FF6600 затемнён до #E05A00, 3,7:1 на белом). Чёрная основная кнопка, без теней.

   Сетка при 1440: сайдбар 228 + лист (1440 − 228 − 8 отступ справа) = 1204; внутри 24 поля → 1156.
   Сводка: 1fr + 384 правая колонка + 24 зазор → 748 + 24 + 384 = 1156. */

:root {
  --ground: #f6f5f8;
  --surface: #ffffff;
  --raised: #f4f3f6;
  --active: #ebe9ef;
  --border: #e8e6ec;
  --rule: #f0eff3;
  --control: #cfcdd4;
  --text: #1a1523;
  --muted: #5e5a66;
  --faint: #6a6672;
  --primary: #1a1523;
  --primary-ink: #ffffff;
  --accent: #e05a00;
  --accent-soft: #fde9dc;
  --positive: #1e7b4f;
  --negative: #c4242a;
  --warning: #92400e;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb;  --pill-warning-ink: #92400e;
  --pill-neutral-bg: #ebe9ef;  --pill-neutral-ink: #35313b;
  --stage-open: #b9b5c0;
  --stage-closed: #dedbe3;
  --primary-hover: #2d2638;
  --cell-ink: #4a4552;
  --cell-neg: #9f1d22;
  --heat-1: #fff5ee; --heat-2: #ffe6d4; --heat-3: #ffd0ad;
  --accent-ink: #7a2f00;
  --notice-border: #fde68a;
  --avatar-bg: #e3eefc; --avatar-ink: #1d3f73;

  --radius-card: 8px;
  --radius-control: 6px;
  --radius-sheet: 16px;
  --sheet-inset: 8px;
  --sidebar-width: 228px;
  --gap: 24px;
  --pad: 24px;
  --card-pad: 20px;
  --control-height: 32px;
  --row-height: 48px;
  --nav-row: 32px;

  --font: "IBM Plex Sans", Inter, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fs-title: 22px; --fs-section: 16px; --fs-kpi: 28px; --fs-lead: 36px; --fs-body: 14px; --fs-small: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms; --t-hover: 150ms; --t-ui: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
h1, h2, h3 { text-wrap: balance; }
.avatar.me { background: var(--avatar-bg); color: var(--avatar-ink); }
body { margin: 0; background: var(--ground); color: var(--text); font: var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
svg { display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value, .lead-value { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- рамка: сайдбар и верхняя полоса на одном тоне, лист белый ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); min-height: 100svh; }
.sidebar { grid-row: 1 / 3; position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; padding: 12px 12px 16px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; margin-bottom: 8px; }
.brand svg { width: 24px; height: 24px; flex: none; }
.brand b { font-size: 15px; font-weight: 600; }
.brand span { color: var(--muted); font-weight: 400; }
.scope { display: flex; align-items: center; justify-content: space-between; height: 36px; margin: 0 0 12px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; }
.scope span { white-space: nowrap; }
.scope small { display: block; color: var(--muted); font-size: var(--fs-small); line-height: 14px; }
.group-label { margin: 20px 8px 8px; font-size: var(--fs-small); color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 12px; height: var(--nav-row); margin-bottom: 2px; padding: 0 8px; border-radius: 8px; color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.nav-item svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .count { margin-left: auto; font-size: var(--fs-small); color: var(--text); font-variant-numeric: tabular-nums; }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); }
.nav-item.soon { color: var(--faint); }
.sidebar .bottom { margin-top: auto; padding-top: 16px; }
.user { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 12px; font-weight: 600; flex: none; }
.user small { display: block; color: var(--muted); font-size: var(--fs-small); line-height: 14px; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 0 16px 0 8px; min-width: 0; }
.search { display: flex; align-items: center; gap: 8px; width: min(548px, 100%); height: 32px; margin: 0 auto; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--faint); }
.search svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search span { flex: 1; }
.search kbd { font: inherit; font-size: var(--fs-small); color: var(--muted); }
.proto-note { font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.menu-toggle { display: none; }

.sheet { margin: 0 var(--sheet-inset) var(--sheet-inset) 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); min-width: 0; }
.canvas { padding: var(--pad); }

/* ---------- заголовок экрана ---------- */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: var(--gap); }
.title-row h1 { font-size: var(--fs-title); line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.title-row .sub { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 22px; max-width: 72ch; }
.title-row .sub b { color: var(--text); font-weight: 500; }
.actions { display: flex; gap: 8px; flex: none; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; height: 36px; padding: 0 16px; }
.btn.primary:hover { background: var(--primary-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 1; background: var(--raised); color: var(--faint); border-color: var(--border); cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.select { height: var(--control-height); padding: 0 28px 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5l3-3' fill='none' stroke='%235e5a66' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center / 12px no-repeat; appearance: none; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: var(--control-height); padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.chip[aria-pressed="true"] { border-color: var(--text); color: var(--text); }

/* ---------- панели ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); min-width: 0; }
.panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel h2 { font-size: var(--fs-section); line-height: 22px; font-weight: 600; }
.panel .meta { color: var(--faint); font-size: 13px; }
.card-link { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; white-space: nowrap; }
.card-link::after { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--chevron) center / 12px no-repeat; mask: var(--chevron) center / 12px no-repeat; }
.card-link:hover { text-decoration: underline; }
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5 8 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: var(--gap); align-items: start; }
.stack { display: grid; gap: var(--gap); min-width: 0; }
.rail { display: grid; gap: var(--gap); min-width: 0; }
.rail h2.out { font-size: var(--fs-section); line-height: 22px; font-weight: 600; margin-bottom: 8px; }

/* ---------- главная цифра и разбивка ---------- */
.lead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 32px; align-items: end; }
.lead-label { color: var(--muted); }
.lead-value { font-size: var(--fs-lead); line-height: 40px; font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; }
.lead-value small { font-size: 15px; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 8px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--border); }
.fact { padding: 0 0 0 20px; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact .k { color: var(--muted); }
.fact .v { margin-top: 4px; font-size: 22px; line-height: 28px; font-weight: 500; }
.fact .c { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* полоса этапов: доли 4 010 карточек, оранжевым только «Занимается» */
.path { display: flex; height: 10px; gap: 2px; margin-top: 20px; }
.path i { display: block; height: 100%; background: var(--stage-closed); min-width: 3px; }
.path i.open { background: var(--stage-open); }
.path i.active { background: var(--accent); }
.path i.review { background: repeating-linear-gradient(135deg, var(--stage-closed) 0 2px, transparent 2px 5px); } /* taste-skill-ignore: штриховка как метка вида, не градиент */
.path-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.path-legend span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.path-legend b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.path-legend .sw { width: 10px; height: 10px; background: var(--stage-closed); }
.path-legend .sw.open { background: var(--stage-open); }
.path-legend .sw.active { background: var(--accent); }
.path-legend .sw.review { background: repeating-linear-gradient(135deg, var(--stage-closed) 0 2px, transparent 2px 5px); } /* taste-skill-ignore: штриховка как метка вида, не градиент */

/* ---------- шахматка свободных мест ---------- */
.seats { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.seats th { height: 28px; font-weight: 400; font-size: 13px; color: var(--muted); text-align: center; padding: 0 4px; }
.seats .sm { display: none; }
.sidebar-close { display: none; }
.seats thead tr:first-child th { color: var(--text); font-weight: 500; font-size: var(--fs-body); }
.seats th.row-h { text-align: left; color: var(--text); font-size: var(--fs-body); width: 92px; padding-left: 0; }
.seats td { height: 40px; padding: 0; text-align: center; }
.seats td button { width: 100%; height: 40px; border: 0; border-radius: 4px; background: var(--raised); cursor: pointer; font-variant-numeric: tabular-nums; outline: 1px solid transparent; }
.seats td button:hover { outline-color: var(--text); }
.seats td button[aria-pressed="true"] { outline: 2px solid var(--text); }
.seats td button b { font-weight: 500; }
.seats td button small { display: block; font-size: 12px; line-height: 14px; color: var(--cell-ink); }
.seats td button small .neg-text { color: var(--cell-neg); }
.seats td.none { color: var(--faint); font-size: var(--fs-small); }
.seats td button.lvl1 { background: var(--heat-1); }
.seats td button.lvl2 { background: var(--heat-2); }
.seats td button.lvl3 { background: var(--heat-3); }
.seats td button.full { background: var(--raised); color: var(--muted); }
.seats td button { position: relative; }
.seats td button.over::after, .seat-key i.dot { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--negative); }
.seat-key i.dot { position: static; }
.seats .gap-col { width: 10px; }
.seat-key { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.seat-key span { display: inline-flex; align-items: center; gap: 8px; }
.seat-key i { width: 14px; height: 10px; border-radius: 2px; background: var(--raised); }

/* выбранная ячейка: группы с местами */
.pick { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pick h3 { font-size: var(--fs-body); font-weight: 500; margin-bottom: 4px; }
.pick .sub { color: var(--muted); font-size: var(--fs-small); margin-bottom: 8px; }

/* ---------- строки и заполненность ---------- */
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; padding: 12px 0; }
.row + .row { border-top: 1px solid var(--rule); }
.row .t { min-width: 0; }
.row .t small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.row .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.row .n small { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-small); }
.row.link { cursor: pointer; }
.row.link:hover .t > span { text-decoration: underline; text-underline-offset: 3px; }

.occ { display: grid; grid-template-columns: minmax(0, 1fr) 96px 64px; align-items: center; gap: 12px; }
.bar { position: relative; height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.bar.grey i { background: var(--stage-open); }
.bar.over i { background: var(--negative); }

/* ---------- список учеников ---------- */
.stagebar { margin-bottom: 4px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: none; display: grid; gap: 2px; padding: 8px 0 12px; border: 0; background: none; color: var(--muted); text-align: left; cursor: pointer; transition: color var(--t-hover) ease; }
.tabs button b { font-weight: 500; color: var(--text); font-size: 16px; line-height: 20px; font-variant-numeric: tabular-nums; }
.tabs button span { font-size: var(--fs-small); line-height: 16px; }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -1px; height: 2px; background: var(--text); }
.tabs .divider { flex: none; width: 1px; margin: 12px 0; background: var(--border); }
.tabs .review b { color: var(--negative); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 8px; }
.toolbar .search-in { display: flex; align-items: center; gap: 8px; width: 280px; height: var(--control-height); padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); color: var(--faint); }
.toolbar .search-in svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.toolbar .search-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.toolbar .search-in input::placeholder { color: var(--faint); }
.toolbar .spacer { flex: 1; }
.toolbar .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .total { color: var(--muted); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { height: 36px; padding: 0 12px; text-align: left; font-weight: 400; font-size: var(--fs-small); color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--border); }
table.list td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list th:first-child, table.list td:first-child { padding-left: 0; }
table.list th:last-child, table.list td:last-child { padding-right: 0; }
table.list th.n, table.list td.n { text-align: right; }
table.list td .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 18px; }
table.list td .name { font-weight: 500; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td .name { text-decoration: underline; text-underline-offset: 3px; }
.code { font-family: var(--font-mono); font-size: 13px; }

.pill { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.pill.active { background: var(--accent-soft); color: var(--accent-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border: 1px solid var(--notice-border); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.neg-text { color: var(--negative); }

.fill { display: inline-flex; align-items: center; gap: 8px; }
.fill .bar { width: 44px; height: 4px; }
.fill .bar i { background: var(--stage-open); }
.fill.low .bar i { background: var(--negative); }

.more { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); }


/* ---------- карточка ученика ---------- */
.name.link { color: var(--text); }
.name.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.seats th.dept-h small { display: block; font-size: 12px; line-height: 14px; color: var(--faint); }
.crumbs { display: flex; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.card-title { margin-bottom: 16px; }
.h1-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.journey { padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--raised); }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.steps li { display: flex; align-items: baseline; gap: 8px; }
.steps li + li::before { content: ""; align-self: center; width: 32px; height: 1px; margin: 0 12px; background: var(--control); }
.steps i { align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--stage-open); flex: none; }
.steps .now i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } /* taste-skill-ignore: кольцо текущего этапа, не тень */
.steps .s-name { font-weight: 500; }
.steps .done .s-name { color: var(--muted); font-weight: 400; }
.steps .s-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.next .btn.on { border-color: var(--text); background: var(--surface); }
.act-box { margin-top: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.act-box p { color: var(--muted); line-height: 20px; max-width: 72ch; }
.act-form { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.act-form .field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.act-form .input { height: 36px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--text); }
.act-form select.input { padding-right: 28px; min-width: 200px; }
.act-buttons { display: flex; gap: 8px; margin-top: 12px; }
.finding { margin: 16px 0 4px; color: var(--muted); font-size: 15px; line-height: 22px; }
.finding b { color: var(--text); font-weight: 500; }
.tabs button.flat { display: block; padding: 12px 0; font-size: var(--fs-body); }
.tab-body { margin-top: var(--gap); }
.fact .v .yr { font-size: 15px; color: var(--muted); }
.plan { height: 8px; margin-top: 20px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.plan i { display: block; height: 100%; background: var(--accent); }
table.ledger { width: 100%; margin-top: 20px; border-collapse: collapse; }
table.ledger th { height: 32px; padding: 0 12px; text-align: left; font-weight: 400; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
table.ledger td { padding: 12px; border-bottom: 1px solid var(--rule); }
table.ledger th:first-child, table.ledger td:first-child { padding-left: 0; width: 104px; white-space: nowrap; }
table.ledger th:last-child, table.ledger td:last-child { padding-right: 0; }
table.ledger .n { text-align: right; white-space: nowrap; }
table.ledger tbody tr:last-child td { border-bottom: 0; }
table.ledger .pos-num { color: var(--positive); }
table.ledger .l-date { display: none; }
.note { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 20px; }
.attend-wrap { overflow-x: auto; }
table.attend { border-collapse: separate; border-spacing: 4px; margin-left: -4px; }
table.attend th { font-weight: 400; font-size: 12px; color: var(--muted); text-align: center; padding: 0; font-variant-numeric: tabular-nums; }
table.attend tbody th { text-align: left; padding-right: 8px; font-size: 13px; color: var(--text); }
table.attend td { padding: 0; }
table.attend i, .attend-key i { display: block; width: 40px; height: 24px; border-radius: 4px; }
.attend-key i { width: 16px; height: 12px; }
.a-present { background: var(--heat-3); }
.a-present.today { background: var(--accent); }
.a-absent { background: var(--surface); border: 1.5px solid var(--negative); }
.a-sick { background: repeating-linear-gradient(135deg, var(--stage-open) 0 2px, var(--raised) 2px 6px); } /* taste-skill-ignore: штриховка «не списан», метка вида */
.a-planned { border: 1px dashed var(--control); }
.a-none { background: transparent; }
.attend-key { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.attend-key span { display: inline-flex; align-items: center; gap: 8px; }
.report { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 12px 0; }
.report + .report { border-top: 1px solid var(--rule); }
.r-when { display: grid; font-variant-numeric: tabular-nums; }
.r-when b { font-weight: 500; }
.r-when span { color: var(--muted); font-size: 13px; }
.r-subj { font-weight: 500; }
.r-what small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 18px; }
.r-marks { display: flex; gap: 16px; text-align: right; }
.r-marks span { display: grid; min-width: 40px; }
.r-marks small { color: var(--muted); font-size: 12px; }
.r-marks b { font-weight: 500; font-size: 16px; }
dl.kv { display: grid; margin: 0; }
dl.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
dl.kv div + div { border-top: 1px solid var(--rule); }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; text-align: right; }
.contact .btn { height: 28px; padding: 0 8px; font-size: 13px; }
.fill-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.fill-line .bar i { background: var(--stage-open); }

/* ---------- раздел, которого нет в образце ---------- */
.later { max-width: 640px; }
.later p { color: var(--muted); margin-top: 8px; line-height: 22px; }
.later ul { margin-top: 16px; padding-left: 20px; line-height: 24px; }

/* ---------- телефон: рамка уходит, лист становится экраном ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .proto-note { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; background: var(--surface); transform: translateX(-100%); transition: transform var(--t-ui) var(--ease-out); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; width: 44px; height: 44px; margin-left: -8px; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer; }
  .menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar .search { display: none; }
  .topbar .here { font-weight: 600; flex: 1; }
  .sheet { margin: 0; border: 0; border-radius: 0; }
  .canvas { padding: 16px; }
  .title-row { flex-direction: column; align-items: stretch; }
  .title-row .actions .btn.primary { width: 100%; height: 44px; }
  .lead { grid-template-columns: minmax(0, 1fr); }
  .facts { border-left: 0; border-top: 1px solid var(--border); padding-top: 12px; }
  .fact { padding: 0 8px 0 0; }
  .fact + .fact { padding-left: 12px; }
  .panel { padding: 16px; }
  .panel > header { flex-wrap: wrap; }
  .panel > header .meta { flex-basis: 100%; }
  .seats { border-spacing: 2px; }
  .seats th.row-h { width: 52px; }
  .seats .lg { display: none; }
  .seats .sm { display: inline; }
  .seats td button { height: 44px; }
  .seats td button small { display: none; }
  .seats .gap-col { width: 4px; }
  .sidebar-close { display: inline-flex; position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer; }
  .sidebar-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .toolbar .search-in { width: 100%; }
  .card-title .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .card-title .actions .btn { height: 44px; }
  .journey { padding: 12px 16px; }
  .steps { flex-direction: column; align-items: flex-start; gap: 8px; }
  .steps li + li::before { display: none; }
  .next .btn { height: 40px; }
  .act-form select.input { min-width: 0; width: 100%; }
  .act-form .field { flex: 1 1 140px; }
  .report { grid-template-columns: 48px minmax(0, 1fr); }
  .r-marks { grid-column: 2; justify-content: flex-start; text-align: left; }
  .tabs button.flat { padding: 12px 0; }
  .facts { grid-template-columns: minmax(0, 1fr); padding-top: 4px; }
  .fact, .fact + .fact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--rule); }
  .fact .k { grid-column: 1; }
  .fact .c { grid-column: 1; margin-top: 0; }
  .fact .v { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: center; text-align: right; font-size: 20px; }
  table.ledger th:first-child, table.ledger td:first-child { display: none; }
  table.ledger td:nth-child(2) { padding-left: 0; }
  table.ledger th:nth-child(2) { padding-left: 0; }
  table.ledger .l-date { display: block; color: var(--muted); font-size: 13px; }
  table.attend i { width: 24px; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .stagebar .path-legend { display: none; }
  table.list.cards td.m3 .sub::before { content: " · "; }
  .toolbar .spacer { display: none; }
  /* таблица учеников становится списком двухстрочных строк */
  table.list.cards thead { display: none; }
  table.list.cards, table.list.cards tbody, table.list.cards tr { display: block; }
  table.list.cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  table.list.cards td { display: none; padding: 0; border: 0; }
  table.list.cards td[colspan] { display: block; grid-column: 1 / -1; }
  table.list.cards td.m1, table.list.cards td.m2 { display: block; }
  table.list.cards td.m3 { display: block; grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
  table.list.cards td.m3 .sub { display: inline; }
  table.list:not(.cards) { min-width: 640px; }
}
@media (min-width: 861px) { .topbar .here { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; } }

/* ======================= рабочая CRM ======================= */
.brand { gap: 8px; }
.brand b { font-size: 16px; letter-spacing: -0.01em; }
[hidden] { display: none !important; }

/* поля форм */
.input, .select { height: 36px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--text); min-width: 0; }
.select { padding-right: 28px; }
textarea.input { height: auto; min-height: 72px; padding: 8px 12px; resize: vertical; line-height: 20px; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.err { color: var(--negative); font-size: 13px; margin-top: 8px; }
.toolbar .select { height: var(--control-height); }

/* вход */
.auth { min-height: 100svh; display: grid; place-items: center; padding: 16px; background: var(--ground); }
.auth-card { width: min(400px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-sheet); background: var(--surface); }
.auth-card h1 { font-size: 22px; line-height: 28px; font-weight: 600; margin: 12px 0 4px; }
.auth-card p { color: var(--muted); margin-bottom: 20px; }
.auth-card .field + .field { margin-top: 12px; }
.auth-card .btn.primary { width: 100%; margin-top: 20px; height: 40px; }
.wordmark { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.wordmark span { color: var(--muted); font-weight: 400; }

/* панели с правкой */
.panel > header .edit-link { border: 0; background: none; padding: 0; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; }
.panel > header .edit-link:hover { text-decoration: underline; }
dl.kv dd.empty { color: var(--faint); }
dl.kv dd.missing { color: var(--negative); }

/* всплывающее сообщение */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 24px rgba(20, 16, 30, 0.18); }
.toast.bad { background: var(--negative); }

/* диалог */
dialog.sheet-dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sheet); background: var(--surface); color: var(--text); box-shadow: 0 16px 48px rgba(20, 16, 30, 0.2); }
dialog.sheet-dialog::backdrop { background: rgba(20, 16, 30, 0.32); }
dialog.sheet-dialog form { padding: 24px; }
dialog.sheet-dialog h2 { font-size: 18px; line-height: 24px; font-weight: 600; margin-bottom: 16px; }

/* таблицы рабочих экранов */
table.list td .code { white-space: nowrap; }
table.list td.n .num { font-weight: 500; }
table.list tr.clickable { cursor: pointer; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); }
.cap-input { width: 64px; height: 30px; padding: 0 8px; text-align: right; border: 1px solid var(--control); border-radius: var(--radius-control); font-variant-numeric: tabular-nums; }
.stage-select { height: 30px; }
.mini { font-size: 13px; color: var(--muted); }
.chip.on { border-color: var(--text); color: var(--text); background: var(--raised); }

/* урок: отметки */
.mark-row { display: grid; grid-template-columns: minmax(160px, 1.4fr) auto 160px 64px 64px 72px minmax(120px, 1fr); gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.mark-row.head { border-top: 0; font-size: 13px; color: var(--muted); }
.mark-row .input, .mark-row .select { height: 32px; }
.toggle { display: inline-flex; border: 1px solid var(--control); border-radius: var(--radius-control); overflow: hidden; }
.toggle button { height: 32px; padding: 0 12px; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.toggle button + button { border-left: 1px solid var(--control); }
.toggle button[aria-pressed="true"] { background: var(--text); color: var(--primary-ink); }
.toggle button.no[aria-pressed="true"] { background: var(--negative); }

/* настройки */
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 0; }
.matrix thead th { font-weight: 500; font-size: 13px; color: var(--muted); }
.matrix input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--text); }
.subtabs { margin-bottom: var(--gap); }
.import-log { font-size: 13px; color: var(--muted); }

/* разобрать */
.queue { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); }
.queue:first-child { border-top: 0; }
.queue b { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.queue small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

@media (max-width: 860px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .mark-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mark-row.head { display: none; }
  .mark-row > :nth-child(n + 3) { grid-column: 1 / -1; }
  .mark-row .grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .queue { grid-template-columns: minmax(0, 1fr) auto; }
  .queue .card-link { grid-column: 1 / -1; }
  .matrix { font-size: 13px; }
}

dl.kv div.block { display: block; }
dl.kv div.block dd { text-align: left; margin-top: 4px; white-space: pre-line; color: var(--muted); }

/* столбики по месяцам в отчётах */
.vbars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; height: 160px; align-items: end; }
.vbar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; font-size: 11px; color: var(--muted); }
.vbar i { align-self: end; display: block; background: var(--stage-open); min-height: 2px; }
.vbar.now i { background: var(--accent); }
.vbar .v { font-variant-numeric: tabular-nums; color: var(--text); font-size: 11px; white-space: nowrap; overflow: hidden; }
.vbar .l { margin-top: 4px; white-space: nowrap; }

/* фильтры: каждый элемент своей ширины, ряд прокручивается на телефоне */
.toolbar .chips > * { flex: none; }
.toolbar .chips .select { width: auto; max-width: 220px; }

/* шахматка кабинетов */
.rooms-day { margin-bottom: var(--gap); }
.rg { overflow-x: auto; }
.rg-head, .rg-row { display: grid; grid-template-columns: 56px minmax(720px, 1fr); align-items: center; }
.rg-time { position: relative; height: 20px; }
.rg-time span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rg-row { min-height: 40px; border-top: 1px solid var(--rule); }
.rg-room { font-size: 13px; color: var(--muted); }
.rg-line { position: relative; height: 40px; }
.rg-line > i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.rg-lesson { position: absolute; top: 4px; bottom: 4px; display: grid; align-content: center; padding: 0 6px; overflow: hidden; border-radius: 4px; background: var(--heat-2); color: var(--text); font-size: 12px; line-height: 14px; white-space: nowrap; }
.rg-lesson:hover { outline: 1px solid var(--text); }
.rg-lesson b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.rg-lesson small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* переключатель вида */
.segmented { display: inline-flex; width: max-content; padding: 2px; border-radius: 8px; background: var(--raised); }
.segmented button { height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); } /* taste-skill-ignore: рамка выбранного сегмента */
.title-row .actions { flex-wrap: wrap; justify-content: flex-end; }

/* отметка урока: три оценки одной группой, подписи видны на телефоне */
.mark-row { grid-template-columns: minmax(160px, 1.4fr) auto 180px 216px minmax(120px, 1fr); }
.mark-row .grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mark-row .grades label { display: grid; gap: 2px; }
.mark-row .m-lab { display: none; font-size: 12px; color: var(--muted); }
.mark-row.present .reason { visibility: hidden; }
@media (max-width: 860px) {
  .mark-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding: 12px 0; }
  .mark-row .m-lab { display: block; }
  .mark-row.present .reason { display: none; }
  .mark-row .input, .mark-row .select { height: 40px; }
}

/* правки по проверке */
td.hist { max-width: 360px; white-space: pre-line; word-break: break-word; color: var(--muted); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); align-items: start; }
.role-grid .panel > header { margin-bottom: 12px; }
.cap-row { min-height: 40px; cursor: pointer; }
.cap-row input { width: 18px; height: 18px; accent-color: var(--text); }
.mark-row .toggle { width: 104px; }
.mark-row .toggle button { flex: 1; }
:root { --heat-1: #fff3ea; --heat-2: #ffdcc2; --heat-3: #ffbb8a; }
@media (max-width: 860px) {
  .btn, .chip, .select, .input, .toolbar .search-in { min-height: 44px; }
  .toggle button { height: 44px; }
  .mark-row .toggle { width: 128px; }
  .edit-link, .card-link { min-height: 44px; display: inline-flex; align-items: center; }
  .pick .occ { grid-template-columns: minmax(0, 1fr) auto; }
  .pick .occ .bar { grid-column: 1 / -1; grid-row: 2; }
}

.m-only { display: none; }
@media (max-width: 860px) { .m-only { display: inline; } table.list.cards td.m3 .code { font-size: 12px; } }
@media (max-width: 860px) { table.list.cards td.m1 { order: 1; } table.list.cards td.m2 { order: 2; } table.list.cards td.m3 { order: 3; } }

/* сотрудники и приглашения */
.staff-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-sel .select { min-width: 0; max-width: 220px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 860px) { .staff-sel .select { flex: 1 1 140px; max-width: none; } table.list.cards td.m3 .staff-sel { margin-top: 6px; } }
.toolbar .staff-chips { flex-wrap: wrap; min-width: 0; }
@media (max-width: 860px) { .toolbar .staff-chips { width: 100%; } .toolbar .staff-chips .chip { min-height: 36px; } }

/* профиль педагога */
.teacher-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap); margin: 8px 0 16px; }
.notes-feed { display: grid; gap: 0; max-width: 860px; }
.note-item { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.note-item header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.note-item p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
tr.future td { color: var(--muted); }
table.list tr[data-tid] { cursor: pointer; }

/* задачи и примечания */
.nav-item .count.hot { color: var(--negative); font-weight: 600; }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-small); }
.link-btn { border: 0; background: none; padding: 0; margin-left: 8px; color: var(--faint); font-size: var(--fs-small); cursor: pointer; }
.link-btn:hover { color: var(--negative); text-decoration: underline; }
.feed { margin-top: var(--gap); }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.feed-head h2 { margin: 0; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.feed-item.is-task { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.feed-item .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--avatar-bg); color: var(--avatar-ink); font-size: 12px; font-weight: 600; }
.feed-body p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.feed-meta { font-size: var(--fs-small); color: var(--faint); }
.feed-empty { padding: 16px 0; }
/* Звонки Sipuni в ленте */
.call-ico { color: var(--muted); background: var(--raised); }
.call-ico.in { color: var(--positive); background: var(--pill-positive-bg); }
.call-ico.out { color: var(--avatar-ink); background: var(--avatar-bg); }
.call-ico.missed { color: var(--negative); background: var(--pill-negative-bg); }
.call-line { font-variant-numeric: tabular-nums; }
/* Роль «только просмотр»: кнопки изменений и выгрузки скрыты (запрет стоит на сервере). */
.is-readonly #export, .is-readonly #composer, .is-readonly #newTask, .is-readonly #respTask, .is-readonly #respMention, .is-readonly .task-actions, .is-readonly [data-del-note] { display: none !important; }
.feed-body a.link, .kv a.link { color: var(--avatar-ink); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.call-note { font-size: var(--fs-small); }
.call-player { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.call-player audio { height: 36px; width: min(100%, 380px); }
.mention { color: var(--accent-ink); font-weight: 500; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.composer { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; background: var(--raised); }
.composer textarea { width: 100%; min-height: 64px; resize: vertical; background: var(--surface); }
.composer-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.composer-tabs button { border: 0; background: none; padding: 6px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; }
.composer-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.composer-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.composer .chips.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.mention-wrap { position: relative; }
.mention-pop { position: absolute; z-index: 20; left: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; min-width: 260px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgb(26 21 35 / 0.12); }
.mention-pop li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.mention-pop li[aria-selected="true"], .mention-pop li:hover { background: var(--active); }
.task { padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--stage-open); border-radius: 8px; background: var(--surface); }
.task.overdue { border-left-color: var(--negative); }
.task.today { border-left-color: var(--accent); }
.task.done { border-left-color: var(--positive); opacity: .75; }
.task-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: var(--fs-small); }
.task-when { font-weight: 600; color: var(--text); }
.task-when.overdue { color: var(--negative); }
.task-when.done { color: var(--positive); }
.task-type { color: var(--text); }
.task-student { display: inline-block; margin-top: 6px; }
.task-text { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.task-result { margin: 6px 0 0; font-size: var(--fs-small); }
.task-actions, .task-done { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.task-done .input { flex: 1 1 220px; min-width: 0; }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--raised); border-radius: var(--radius-card); padding: 10px; min-height: 120px; }
.col header { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; }
.col header h2 { margin: 0; font-size: 14px; }
.col.overdue header h2, .col.overdue .count { color: var(--negative); }
.col .count { font-variant-numeric: tabular-nums; color: var(--muted); }
.col-body { display: grid; gap: 8px; }
.col-empty { padding: 8px 4px; font-size: var(--fs-small); }
.done-box { margin-top: var(--gap); }
.done-box summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.done-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mentions { margin-bottom: var(--gap); }
.mention-row { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mention-row p { margin: 4px 0 0; white-space: pre-line; }
@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; overflow: visible; }
  .col:has(.col-empty) { min-height: 0; }
  .composer-row { grid-template-columns: 1fr 1fr; }
  .composer-row .field:first-child { grid-column: 1 / -1; }
  .btn.sm { height: 40px; }
}
.composer textarea, .task-done .input, .sheet-dialog textarea { font: inherit; }

/* верх карточки: уроки и лента рядом, видны сразу */
.card-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--gap); align-items: start; margin: 4px 0 var(--gap); }
.card-top .feed { margin-top: 0; }
.card-top .composer { margin: 0 0 4px; }
.card-top .composer-row { grid-template-columns: 1fr 1fr; }
.card-top .composer-row .field:first-child { grid-column: 1 / -1; }
.recent .report { color: inherit; text-decoration: none; border-radius: 6px; }
.recent .report:hover { background: var(--raised); }
.r-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text) !important; }
.more-feed { width: 100%; margin-top: 8px; }
@media (max-width: 1100px) { .card-top { grid-template-columns: minmax(0, 1fr); } .card-top .feed { order: -1; } }
.recent .r-what small.r-note { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }

/* ответственный в карточке */
.resp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.resp-label { color: var(--muted); font-size: var(--fs-small); }
.resp .avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--avatar-bg); color: var(--avatar-ink); font-size: 11px; font-weight: 600; }
.resp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
@media (max-width: 860px) { .resp-actions { margin-left: 0; width: 100%; } }
/* окно выгрузки */
.export-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.export-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.export-groups fieldset { border: 0; padding: 0; margin: 0; }
.export-groups legend { font-weight: 600; margin-bottom: 4px; }
.export-groups label { display: flex; gap: 8px; align-items: center; min-height: 30px; cursor: pointer; }
.export-groups input { width: 16px; height: 16px; accent-color: var(--text); }
.sheet-dialog.wide { width: min(760px, calc(100vw - 32px)); max-width: none; }
