/* Тәрбие бөлімі (tarbie-stat.js) — в духе iOS: крупный заголовок,
   полупрозрачная полоса фильтров поверх контента, сегменты с едущей
   подложкой, белые карточки на сером, кольца как в «Активности».

   Цвет — по смыслу:
     · ұл / қыз — синий и оранжевый (проверены на дальтонизм, всегда с подписью);
     · кольца и дайындық — бирюзовый, фиолетовый, янтарный, тоже с подписями;
     · «сделано / норма» — светофор сайта: зелёный от 80, янтарный от 50, красный ниже;
     · тепловая таблица — один зелёный, от светлого к тёмному. */

/* Переменные — на весь документ: лист филиала и подсказка лежат вне .ts. */
:root {
  --ts-m: #2a78d6;
  --ts-f: #eb6834;
  --ts-bg: #f2f2f7;
  --ts-fill: rgba(118, 118, 128, .12);
  --ts-sep: rgba(60, 60, 67, .12);
  --ts-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(16, 22, 19, .10);
  --ts-spring: cubic-bezier(.32, .72, 0, 1);
}
/* На всю ширину экрана, как «Тақырыптық талдау»: таблицы широкие, и
   пустые поля по бокам на большом мониторе им только мешают. */
main.ts {
  max-width: none;
  padding-bottom: 32px;
}
body:has(.ts) .content { background: var(--ts-bg); }

/* ── заголовок ── */
.ts-title { padding: 6px 2px 10px; }
.ts-title h1 { margin: 0; font-size: clamp(28px, 4.2vw, 34px); line-height: 1.08; font-weight: 750; letter-spacing: -.025em; }
.ts-title p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }

/* ── полоса фильтров: материал поверх контента ── */
.ts-top {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -16px 14px; padding: 10px 16px 12px;
  background: rgba(242, 242, 247, .78);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--ts-sep);
}
.ts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ts-tabs { margin-top: 10px; }
.ts-tabs .ts-seg { display: flex; width: 100%; }
.ts-tabs .ts-seg button { flex: 1; }

.ts-seg {
  position: relative; display: inline-flex; padding: 2px; border-radius: 10px;
  background: var(--ts-fill); isolation: isolate;
}
.ts-seg button {
  position: relative; z-index: 1; min-height: 32px; padding: 0 14px; border: 0; background: none;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink); letter-spacing: -.005em;
  border-radius: 8px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .1s ease-out;
}
.ts-seg button[aria-selected="true"] { font-weight: 650; }
.ts-seg button:active { transform: scale(.96); }
.ts-seg-pill {
  position: absolute; z-index: 0; top: 2px; left: 2px; bottom: 2px; width: 0;
  border-radius: 8px; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .38s var(--ts-spring), width .38s var(--ts-spring);
}

.ts-month { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: var(--ts-fill); }
.ts-month b { min-width: 118px; text-align: center; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ts-month button {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 18px;
  color: var(--ink); cursor: pointer; transition: background .15s;
}
.ts-month button:hover:not(:disabled) { background: rgba(255, 255, 255, .7); }
.ts-month button:active:not(:disabled) { background: #fff; }
.ts-month button:disabled { opacity: .3; cursor: default; }

/* Выбор нескольких филиалов — простое белое меню: строки, галочка справа
   у выбранных, тонкие разделители, города мелкой серой подписью. */
.ts-multi { position: relative; margin-left: auto; }
.ts-multi-btn {
  position: relative; min-height: 36px; padding: 0 34px 0 14px; border: 0; border-radius: 10px; background: var(--ts-fill);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.ts-multi-btn::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s;
}
.ts-multi.open .ts-multi-btn::after { transform: rotate(-135deg); margin-top: -2px; }
.ts-multi-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; display: flex; flex-direction: column;
  max-height: min(480px, 70vh); border-radius: 14px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 28px -12px rgba(16, 22, 19, .22);
  animation: ts-pop .16s ease-out;
}
@keyframes ts-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ts-mi-head { display: none; }
.ts-mi-scroll { overflow-y: auto; padding: 4px 0 6px; }
.ts-mi {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px; padding: 0 14px;
  border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ts-mi:hover { background: var(--surface-2); }
.ts-mi > span { order: 1; }
.ts-mi.all { min-height: 42px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ts-tick { order: 2; flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; }
.ts-tick svg { width: 18px; height: 18px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.ts-mi.on .ts-tick svg { visibility: visible; }
.ts-mi.all.some .ts-tick svg { display: none; }
.ts-mi.all.some .ts-tick::after { content: ""; width: 10px; height: 2px; border-radius: 2px; background: var(--ink-3); }
.ts-mi-group + .ts-mi-group { margin-top: 2px; }
.ts-mi-city {
  display: block; width: 100%; padding: 8px 14px 2px; border: 0; background: none;
  font: inherit; font-size: 11.5px; font-weight: 500; color: var(--ink-3); text-align: left; cursor: pointer;
}
.ts-mi-city small { margin-left: 4px; font-size: inherit; }
.ts-mi-city:hover { color: var(--ink-2); }
.ts-multi-foot { display: flex; justify-content: flex-end; padding: 8px 10px; border-top: 1px solid var(--line); }
.ts-done {
  min-height: 34px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--green); color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.ts-done:disabled { opacity: .4; cursor: default; }
.ts-select { position: relative; margin-left: auto; }
.ts-select select {
  appearance: none; -webkit-appearance: none; min-height: 36px; padding: 0 34px 0 14px;
  border: 0; border-radius: 10px; background: var(--ts-fill); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.ts-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); pointer-events: none;
}

/* ── сетка и карточки ── */
.ts-cols { display: grid; gap: 14px; margin-bottom: 14px; }
.ts-cols.two { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.ts-card {
  min-width: 0; padding: 18px 20px; background: var(--surface); border-radius: 22px; box-shadow: var(--ts-shadow);
}
.ts-card > header { margin-bottom: 14px; }
.ts-card > header h2 { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.ts-card > header p { margin: 3px 0 0; font-size: 13px; color: var(--ink-3); }
.ts-card.ts-flat { padding: 0; background: none; box-shadow: none; }
.ts-wait, .ts-empty { margin: 0; padding: 28px 8px; text-align: center; color: var(--ink-3); font-size: 14px; }
.ts-note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }

#tsBoard.ts-in { animation: ts-in .42s var(--ts-spring); }
@keyframes ts-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── шапка «Шолу»: кольца + плитки ── */
.ts-hero-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 22px; align-items: center; }
@media (max-width: 1180px) { .ts-hero-grid { grid-template-columns: 1fr; } .ts-hero-grid .ts-kpis { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); } }
.ts-rings { display: flex; align-items: center; gap: 18px; }
.ts-rings svg { flex: 0 0 auto; width: 148px; height: 148px; }
.ts-ring-track { fill: none; opacity: .16; }
.ts-ring-arc { fill: none; stroke-linecap: round; stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.1s var(--ts-spring); }
.ts-ring-arc.go { stroke-dashoffset: var(--off); }
.ts-ring-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; flex: 1; }
.ts-ring-legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; }
.ts-ring-legend li > i { width: 10px; height: 10px; border-radius: 50%; }
.ts-ring-legend span { font-size: 14px; font-weight: 600; line-height: 1.25; min-width: 0; }
.ts-ring-legend small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.ts-ring-legend b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.ts-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ts-kpis.row { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.ts-kpi {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px 16px;
  background: var(--ts-bg); border-radius: 16px;
}
.ts-kpis.row .ts-kpi { background: var(--surface); box-shadow: var(--ts-shadow); border-radius: 20px; }
.ts-kpi > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ts-kpi > b { font-size: 28px; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ts-kpi > b small { margin-left: 4px; font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.ts-kpi > em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.ts-split { display: flex; gap: 2px; height: 6px; margin-top: 6px; border-radius: 6px; overflow: hidden; }
.ts-split i { display: block; border-radius: 6px; }
.ts-split .m { background: var(--ts-m); }
.ts-split .f { background: var(--ts-f); }
.ts-pill { font-style: normal; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.ts-pill.ok { color: var(--ok); background: var(--ok-bg); }
.ts-pill.mid { color: var(--mid); background: var(--mid-bg); }
.ts-pill.low { color: var(--low); background: var(--low-bg); }

/* ── легенда и линии ── */
.ts-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 0 8px; font-size: 12.5px; color: var(--ink-2); }
.ts-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ts-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ts-legend i.m { background: var(--ts-m); border-radius: 50%; }
.ts-legend i.f { background: var(--ts-f); border-radius: 50%; }
.ts-legend .goal i { width: 14px; height: 0; border-top: 2px dashed var(--ok); border-radius: 0; }
.ts-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ts-grid { stroke: var(--line); stroke-width: 1; }
.ts-grid.goal { stroke: var(--ok); stroke-dasharray: 4 4; opacity: .55; }
.ts-axis { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.ts-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ts-dot { stroke: var(--surface); stroke-width: 2; }
.ts-cross { stroke: var(--ink-3); stroke-width: 1; opacity: 0; transition: opacity .12s; }
.ts-col:hover .ts-cross { opacity: .5; }

/* ── рейтинг: список как в «Настройках» ── */
.ts-rank { list-style: none; margin: 0 -8px; padding: 0; }
.ts-rank li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(70px, 120px) 48px 12px; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 12px; position: relative;
}
.ts-rank.cur li { grid-template-columns: minmax(0, 1fr) minmax(70px, 120px) 48px; }
.ts-rank li + li::before { content: ""; position: absolute; top: 0; left: 40px; right: 8px; border-top: .5px solid var(--ts-sep); }
.ts-rank.cur li + li::before { left: 8px; }
.ts-rank li[data-branch] { cursor: pointer; transition: background .15s; }
.ts-rank li[data-branch]:hover { background: var(--ts-bg); }
.ts-rank li[data-branch]:active { background: var(--line); }
.ts-rank-n { font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.ts-rank-name { font-size: 14.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-rank-name small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.ts-rank-v { text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ts-chev { color: var(--ink-3); font-size: 18px; line-height: 1; }

.ts-meter { display: block; height: 8px; border-radius: 8px; background: var(--ts-fill); overflow: hidden; }
.ts-meter i { display: block; height: 100%; border-radius: 8px; background: var(--low); transition: width .6s var(--ts-spring); }
.ts-meter.ok i { background: var(--ok); }
.ts-meter.mid i { background: #d9a03a; }
b.ok, .ts-rank-v.ok { color: var(--ok); }
b.mid, .ts-rank-v.mid { color: var(--mid); }
b.low, .ts-rank-v.low { color: var(--low); }

/* ── тепловая таблица ── */
.ts-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; -webkit-overflow-scrolling: touch; }
/* Клетки — скруглённые плитки, заливка — процент выполнения (одна зелёная
   шкала, светлая: цифра на ней читается). Цвет цифры у месячных видов —
   темп месяца, у годовых — обычный. */
/* Ширина — по карточке, без прокрутки вбок: колонки делят место поровну,
   имя филиала — своя колонка. На телефоне таблица шире экрана и листается. */
.ts-heat { width: 100%; min-width: 860px; table-layout: fixed; border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
.ts-heat col.ts-namecol { width: 192px; }
.ts-heat th { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: left; white-space: nowrap; padding: 4px 6px; }
.ts-heat thead th { white-space: normal; line-height: 1.2; font-size: 11.5px; padding: 4px 2px; }
.ts-heat thead th { vertical-align: bottom; text-align: center; }
.ts-heat thead th:first-child { text-align: left; }
.ts-heat thead th span { display: block; }
.ts-heat thead th small { font-weight: 400; color: var(--ink-3); }
.ts-heat tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); padding: 2px 8px 2px 4px; font-size: 12.5px; line-height: 1.2; color: var(--ink); border-radius: 8px; overflow: hidden; text-overflow: ellipsis; }
.ts-heat tbody th small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.ts-heat td {
  height: 28px; padding: 0 2px; text-align: center; font-size: 12.5px; font-weight: 500; color: #26332f;
  background: color-mix(in srgb, var(--ts-heat) var(--t, 0%), #fff); border-radius: 6px; transition: box-shadow .15s, filter .15s;
}
/* Шкала — мягкий шалфейный зелёный (24.11.2026, вариант «B · шалфей»):
   спокойнее фирменного, цифра на любой заливке читается. */
:root { --ts-heat: #7fbf95; }
.ts-heat td.none, .ts-heat td.z { color: #b9c2bf; font-weight: 400; background: #fafafa; }
/* Темп месяца — маленькая точка перед цифрой. */
.ts-pd { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; vertical-align: 2px; background: #c8cfcc; }
.ts-heat td.z .ts-pd { display: none; }
.ts-heat td.pace.ok .ts-pd { background: #3f9e6a; }
.ts-heat td.pace.mid .ts-pd { background: #d9a441; }
.ts-heat td.pace.low .ts-pd { background: #d9776f; }
.ts-heat thead th { font-size: 11px; }
.ts-heat tr.total > * { font-weight: 700; }
.ts-heat tr.total td { box-shadow: inset 0 0 0 1px rgba(16, 22, 19, .12); }
.ts-heat tr[data-hm-b], .ts-heat tr[data-hm-c] { cursor: pointer; }
.ts-heat tr[data-hm-b]:hover th, .ts-heat tr[data-hm-c]:hover th { color: var(--green-dark); }
.ts-heat tr.on th { background: var(--green-soft); color: var(--green-dark); }
.ts-heat tr.on td { box-shadow: inset 0 0 0 1.5px #5fae7c; }
.ts-chev-l { display: inline-block; width: 12px; margin-right: 4px; color: var(--ink-3); font-weight: 400; transition: transform .25s var(--ts-spring); }
.ts-heat tr.on .ts-chev-l { transform: rotate(90deg); color: var(--green-dark); }
.ts-cols[id] { scroll-margin-top: 150px; }

/* ── гантели ұл / қыз ── */
.ts-dumb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ts-dumb li { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 150px; align-items: center; gap: 12px; min-height: 30px; }
.ts-dumb-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-dumb-track { position: relative; height: 20px; }
.ts-dumb-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.ts-dumb-track .seg { position: absolute; top: calc(50% - 2px); height: 4px; border-radius: 4px; background: var(--ink-3); opacity: .35; }
.ts-dumb-track .dot {
  position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface); transition: left .6s var(--ts-spring);
}
.ts-dumb-track .dot.m { background: var(--ts-m); }
.ts-dumb-track .dot.f { background: var(--ts-f); }
.ts-dumb-v { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ts-dumb-v b { font-weight: 700; color: var(--ink); min-width: 40px; white-space: nowrap; }
.ts-dumb-v b.m::before, .ts-dumb-v b.f::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; vertical-align: 1px; }
.ts-dumb-v b.m::before { background: var(--ts-m); }
.ts-dumb-v b.f::before { background: var(--ts-f); }
.ts-dumb-v small { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* ── горизонтальные полосы ── */
.ts-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-hbars li { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 48px; align-items: center; gap: 12px; }
.ts-hbars li > span:first-child { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-hbars li > span:first-child small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.ts-hbars li > b { text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ts-hbar { display: block; height: 10px; border-radius: 10px; background: var(--ts-fill); overflow: hidden; }
.ts-hbar i { display: block; height: 100%; border-radius: 10px; background: var(--green); }

/* ── гистограмма дарын ── */
.ts-histo { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 18px; }
.ts-hcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.ts-hcol b { font-size: 11.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ts-hcol i { display: block; width: 100%; max-width: 36px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, #eda100 55%, #fff); transition: height .6s var(--ts-spring); }
.ts-hcol.full i { background: #eda100; }
.ts-hcol span { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ts-axis-cap { margin: 6px 0 0; text-align: center; font-size: 11.5px; color: var(--ink-3); }

/* ── таблицы ── */
.ts-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ts-tbl th, .ts-tbl td { padding: 10px 10px; text-align: left; white-space: nowrap; font-size: 13px; }
.ts-tbl thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; border-bottom: .5px solid var(--ts-sep); }
.ts-tbl tbody th { font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.ts-tbl tbody tr + tr > * { border-top: .5px solid var(--ts-sep); }
.ts-tbl tbody tr[data-branch] { cursor: pointer; }
.ts-tbl tbody tr[data-branch]:hover > * { background: var(--ts-bg); }
.ts-cellbar { display: inline-grid; grid-template-columns: 56px auto; align-items: center; gap: 8px; }
.ts-cellbar .ts-meter { height: 6px; }
.ts-cellbar b small { font-weight: 400; color: var(--ink-3); }

.ts-plan th.on, .ts-plan td.on { background: var(--green-soft) !important; }
.ts-plan td { text-align: center; }
.ts-plan td.miss { color: var(--low); }
.ts-chip { display: inline-block; min-width: 38px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ts-chip.ok { color: var(--ok); background: var(--ok-bg); }
.ts-chip.mid { color: var(--mid); background: var(--mid-bg); }
.ts-chip.low { color: var(--low); background: var(--low-bg); }

/* ── дарын: люди ── */
.ts-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 4px 18px; }
.ts-people li { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: .5px solid var(--ts-sep); }
.ts-mini-ring {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#eda100 calc(var(--v) * 1%), var(--ts-fill) 0);
}
.ts-mini-ring b { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ts-person { font-size: 14px; font-weight: 600; min-width: 0; }
.ts-person small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.ts-person em { display: block; font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--low); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-star { font-style: normal; color: #eda100; }
.ts-of { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── жоспар ── */
/* Карточка месяца — в цветах его құндылық (--mc, --mc2 из tarbie-stat.js):
   градиент двух ценностей, крупный знак первой на фоне, ценности значками. */
.ts-theme {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 300px;
  /* Минимализм: один цвет ценности, едва заметный переход в тень того же тона. */
  background: linear-gradient(160deg, var(--mc, #2c9d62), color-mix(in srgb, var(--mc, #2c9d62) 82%, #000));
  color: #fff; transition: background .4s;
}
.ts-theme-art {
  position: absolute; z-index: -1; right: 22px; top: 22px; width: 72px; height: 72px;
  fill: none; stroke: #fff; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: .35;
}
.ts-theme-top > span { font-size: 13px; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.ts-theme h2 { margin: 6px 0 0; max-width: 85%; font-size: clamp(22px, 3vw, 30px); line-height: 1.12; font-weight: 750; letter-spacing: -.02em; }
.ts-values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ts-values span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); font-size: 12.5px; font-weight: 600;
}
.ts-values svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ts-theme p { margin: 0 0 8px; font-size: 14px; opacity: .92; }
.ts-theme-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.ts-theme-bar i { display: block; height: 100%; background: #fff; border-radius: 6px; }
.ts-agenda { list-style: none; margin: 0; padding: 0; }
.ts-agenda li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-bottom: .5px solid var(--ts-sep); }
.ts-agenda time { font-size: 13px; font-weight: 700; color: var(--green-dark); }
.ts-agenda span { font-size: 14px; font-weight: 500; }
.ts-agenda small { display: block; font-size: 12px; color: var(--ink-3); }

/* ── лист филиала: снизу на телефоне, по центру на большом экране ── */
.ts-sheet {
  width: min(640px, 100vw); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 24px;
  background: var(--ts-bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35);
}
.ts-sheet::backdrop { background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ts-sheet[open] { animation: ts-sheet .44s var(--ts-spring); }
@keyframes ts-sheet { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
#tsSheetBody { padding: 18px 20px 24px; display: grid; gap: 14px; }
#tsSheetBody > .ts-rings { padding: 16px; background: var(--surface); border-radius: 20px; }
#tsSheetBody > .ts-hbars { padding: 16px; background: var(--surface); border-radius: 20px; }
#tsSheetBody > .ts-card.ts-flat { padding: 16px; background: var(--surface); border-radius: 20px; }
.ts-sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ts-sheet-h span { font-size: 12.5px; color: var(--ink-3); }
.ts-sheet-h h2 { margin: 2px 0 0; font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.ts-x {
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--ts-fill); color: var(--ink-2);
  font-size: 20px; line-height: 1; cursor: pointer;
}
/* Окно «вид × филиал» */
.ts-cellsum { display: flex; align-items: center; gap: 18px; padding: 16px 18px; background: var(--surface); border-radius: 20px; }
.ts-cellsum > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 96px; }
.ts-cellsum b { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.ts-cellsum b.wait { color: var(--ink-3); }
.ts-cellsum span { margin-top: 4px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ts-cellsum p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.ts-plain { margin: 0; padding: 6px 16px; background: var(--surface); border-radius: 20px; }
.ts-rank.ts-plain li + li::before { left: 8px; }
.ts-count { font-style: normal; margin-left: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--ts-bg); border-radius: 6px; }
.ts-agenda .ts-more-li { display: block; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.ts-agenda.ts-plain li:last-child { border-bottom: 0; }
.ts-meter.wait i { background: var(--ink-3); }
.ts-rank-v.wait { color: var(--ink-3); }
.ts-heat td[data-hm-cell] { cursor: pointer; }
.ts-heat td[data-hm-cell]:hover { filter: brightness(.96); box-shadow: inset 0 0 0 1.5px rgba(16, 22, 19, .22); }
.ts-heat td[data-hm-cell]:active { transform: scale(.96); }
/* Все кураторы под таблицей іс-шара */
.ts-allcur { margin-top: 14px; border-top: .5px solid var(--ts-sep); padding-top: 10px; }
.ts-disclose {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: var(--ts-fill); font: inherit; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer;
}
.ts-disclose small { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ts-disclose:active { transform: scale(.97); }
.ts-allcur.open .ts-disclose .ts-chev-l { transform: rotate(90deg); color: var(--green-dark); }
.ts-allcur-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; font-size: 12.5px; color: var(--ink-3); }
.ts-heat col.ts-totcol { width: 64px; }
.ts-heat td.tot { font-weight: 650; box-shadow: inset 0 0 0 1px rgba(16, 22, 19, .12); }
.ts-heat tr[data-hm-k] { cursor: pointer; }
.ts-heat tr[data-hm-k]:hover th { color: var(--green-dark); }

/* Жоспар: месяцы, список планов, план по неделям */
.ts-months { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ts-months button {
  flex: 0 0 auto; min-width: 56px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--ts-shadow); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.ts-months button.now { color: var(--mc, var(--green-dark)); }
.ts-months button[aria-selected="true"] { background: var(--mc, var(--ink)); color: #fff; }
.ts-months button:not([aria-selected="true"]):hover { box-shadow: inset 0 0 0 1.5px var(--mc), var(--ts-shadow); }
.ts-theme-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ts-theme-list button {
  padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .18); color: #fff;
  font: inherit; font-size: 12.5px; font-weight: 650; text-align: left; cursor: pointer;
}
.ts-theme-list button:hover { background: rgba(255, 255, 255, .28); }
.ts-theme-list small { display: block; font-weight: 400; opacity: .85; }
.ts-agenda li.past { opacity: .55; }
.ts-plan th[data-plan-m] { cursor: pointer; }
.ts-plan button.ts-chip { border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ts-plan button.ts-chip:hover { filter: brightness(.95); }
.ts-week { padding: 14px 16px; background: var(--surface); border-radius: 20px; }
.ts-week h3 { margin: 0 0 8px; font-size: 15px; font-weight: 750; }
.ts-week-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; margin: 0 0 6px; font-size: 13.5px; }
.ts-week-row span { color: var(--ink-3); font-size: 12.5px; }
.ts-who { list-style: none; margin: 8px 0 0; padding: 0; }
.ts-who li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 7px 0; border-top: .5px solid var(--ts-sep); font-size: 13.5px; }
.ts-who b { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.ts-who small { display: block; font-size: 12px; color: var(--ink-3); }
@media (max-width: 600px) { .ts-week-row, .ts-who li { grid-template-columns: 1fr; gap: 2px; } }

.ts-sub { margin: 4px 0 -6px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

/* ── подсказка ── */
.ts-tip {
  position: fixed; left: 0; top: 0; z-index: 100; max-width: 280px; padding: 7px 10px; pointer-events: none;
  font-size: 12.5px; line-height: 1.35; color: #fff; background: rgba(28, 28, 30, .88); border-radius: 10px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

@media (max-width: 860px) {
  .ts-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ts-heat { width: 820px; min-width: 820px; }
  .ts-heat col.ts-namecol { width: 132px; }
  /* На телефоне шапка сайта и так прилипает сверху — вторая липкая полоса
     съела бы полэкрана. Фильтры остаются наверху страницы. */
  .ts-top { position: static; margin: 0 0 12px; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ts-bar { gap: 8px; }
  .ts-bar > .ts-seg[data-seg="pol"] { order: 1; flex: 1 1 100%; }
  .ts-bar > .ts-seg[data-seg="pol"] button { flex: 1; }
  .ts-month { order: 2; }
  .ts-bar > .ts-seg[data-seg="per"] { order: 3; }
  .ts-select, .ts-multi { order: 4; flex: 1 1 100%; margin-left: 0; }
  .ts-multi-btn { width: 100%; text-align: left; }
  .ts-multi-list { left: 0; right: 0; width: auto; }
  .ts-select select { width: 100%; }
  .ts-month b { min-width: 104px; }
  .ts-tabs .ts-seg { overflow-x: auto; scrollbar-width: none; }
  .ts-tabs .ts-seg button { padding: 0 6px; font-size: 12px; letter-spacing: -.01em; }
  .ts-card { padding: 16px; border-radius: 20px; }
  .ts-scroll { margin: 0 -16px; padding: 0 16px; }
  .ts-rings svg { width: 120px; height: 120px; }
  .ts-ring-legend b { font-size: 17px; }
  .ts-kpi > b { font-size: 24px; }
  .ts-rank li { grid-template-columns: 18px minmax(0, 1fr) 54px 42px 10px; gap: 8px; }
  .ts-rank.cur li { grid-template-columns: minmax(0, 1fr) 54px 42px; }
  .ts-dumb li { grid-template-columns: 92px 1fr; }
  .ts-dumb-v { grid-column: 2; margin-top: -6px; }
  .ts-hbars li { grid-template-columns: minmax(90px, 130px) 1fr 42px; gap: 8px; }
  .ts-sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92vh; }
  @keyframes ts-sheet { from { transform: translateY(100%); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .ts-seg-pill, .ts-ring-arc, .ts-meter i, .ts-dumb-track .dot, .ts-hcol i { transition: none; }
  #tsBoard.ts-in, .ts-sheet[open] { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .ts-top { background: var(--ts-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ts-tip { background: #1c1c1e; }
}

/* Годовой план месяца: даты — цветом құндылық, «Барлығын көру» внизу. */
.ts-plan-tab .ts-agenda time, .ts-sheet .ts-agenda[style] time { color: var(--mc, var(--green-dark)); }
.ts-yearplan { display: flex; flex-direction: column; }
.ts-yearplan .ts-agenda li:last-child { border-bottom: 0; }
.ts-more { margin-top: auto; align-self: flex-start; }
.ts-more .ts-chev-l { margin: 0 0 0 2px; }

/* ── Стандарттар: списки как в «Настройках» iOS, степпер и сегменты ── */
.ts-stack2 { display: grid; gap: 14px; align-content: start; }
.ts-norm-head h2 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.ts-norm-head p { margin: 6px 0 0; max-width: 760px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ts-norm-head small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.ts-norms { list-style: none; margin: 0 -4px; padding: 0; }
.ts-norm { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; border-radius: 12px; }
.ts-norm + .ts-norm, .ts-norm-from + .ts-norm { border-top: .5px solid var(--ts-sep); }
.ts-norm.dirty { background: color-mix(in srgb, var(--green) 7%, #fff); }
.ts-norm-name { min-width: 0; font-size: 14px; font-weight: 600; }
.ts-norm-name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.ts-norm-ctl { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ts-norm-n { font-size: 16px; font-weight: 700; }
.ts-norm-p { font-size: 12.5px; color: var(--ink-3); }
.ts-step { display: inline-flex; align-items: center; height: 32px; border-radius: 9px; background: var(--ts-fill); }
.ts-step button {
  width: 34px; height: 32px; border: 0; background: none; font: inherit; font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; border-radius: 9px;
}
.ts-step button:active:not(:disabled) { background: rgba(0, 0, 0, .08); }
.ts-step button:disabled { opacity: .3; cursor: default; }
.ts-step b { min-width: 26px; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ts-seg.ts-seg-sm button { min-height: 28px; padding: 0 9px; font-size: 12px; }
.ts-norm-from { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 4px 10px; font-size: 12.5px; color: var(--ink-3); }
.ts-norm-from select { min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--ts-fill); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ts-norm-switch { margin: -4px 0 8px; }
.ts-savebar {
  position: sticky; bottom: 16px; z-index: 6; display: flex; align-items: center; gap: 10px; width: fit-content; margin: 8px auto 0; padding: 8px 8px 8px 16px;
  border-radius: 16px; background: rgba(28, 28, 30, .9); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: ts-in .3s var(--ts-spring);
}
.ts-btn { min-height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ts-btn.ghost { background: rgba(255, 255, 255, .14); }
.ts-btn:disabled { opacity: .6; }
.ts-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px));
  padding: 10px 16px; border-radius: 14px; background: rgba(28, 28, 30, .92); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); animation: ts-in .3s var(--ts-spring); transition: opacity .4s;
}
.ts-toast.bad { background: #b3261e; }
.ts-toast.out { opacity: 0; }
@media (max-width: 600px) {
  .ts-norm { flex-wrap: wrap; }
  .ts-norm-ctl { width: 100%; justify-content: space-between; }
  .ts-savebar { bottom: calc(var(--tabbar) + 8px); }
}

/* Главная таблица по филиалам — крупнее вложенных (кураторы, ученики). */
.ts-heat.big col.ts-namecol { width: 220px; }
.ts-heat.big thead th { font-size: 12px; }
.ts-heat.big tbody th { padding: 2px 10px 2px 4px; font-size: 13px; }
.ts-heat.big tbody th small { font-size: 11px; }
.ts-heat.big td { height: 30px; font-size: 13px; }
@media (max-width: 600px) {
  .ts-heat.big col.ts-namecol { width: 140px; }
  .ts-heat.big td { height: 30px; font-size: 12.5px; }
}

/* ── Дарын: особый последний столбец — золото и звезда ── */
:root { --dz: #e3a008; --dz-ink: #7a4f00; --dz-soft: #fff8e6; }
.ts-heat col.ts-dzcol { width: 104px; }
.ts-heat thead th.ts-dz-h { color: var(--dz-ink); }
.ts-dz-h span { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 750; }
.ts-dz-h svg, .ts-dz-in svg, .ts-dz-kicker svg { width: 14px; height: 14px; fill: var(--dz); stroke: none; flex: 0 0 auto; }
.ts-heat td.ts-dz {
  position: relative; padding: 0 8px; text-align: left; color: var(--ink-2); cursor: pointer;
  background: none; box-shadow: none;
}
/* Без золотой плитки: число, процент и тонкая полоска. Звезда — в шапке. */
.ts-heat td.ts-dz .ts-dz-in svg { display: none; }
.ts-heat td.ts-dz .ts-dz-in b { color: var(--ink); font-weight: 650; }
.ts-heat td.ts-dz .ts-dz-in small { font-weight: 500; opacity: 1; color: var(--ink-2); }
.ts-heat td.ts-dz.none { background: none; color: #b9c2bf; text-align: center; cursor: default; box-shadow: none; }
.ts-heat td.ts-dz.has { box-shadow: inset 0 0 0 1px var(--dz); }
.ts-heat td.ts-dz:hover { background: #fafafa; }
.ts-dz-in { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.ts-dz-in svg { align-self: center; }
.ts-dz-in b { font-size: inherit; font-weight: 800; }
.ts-dz-in b i { font-style: normal; font-weight: 500; opacity: .6; font-size: .85em; }
.ts-dz-in small { margin-left: auto; font-size: 11px; font-weight: 700; opacity: .8; }
.ts-dz-bar { display: block; height: 3px; margin-top: 3px; border-radius: 3px; background: rgba(227, 160, 8, .18); overflow: hidden; }
.ts-dz-bar i { display: block; height: 100%; border-radius: 3px; background: var(--dz); }
.ts-dz-bar.big { height: 6px; margin-top: 8px; }
.ts-hbars .ts-dz-bar { height: 8px; margin: 0; }
.ts-dz-kicker { display: inline-flex; align-items: center; gap: 5px; color: var(--dz-ink); font-weight: 600; }
.ts-dz-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ts-dz-sum > div { padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, #fff8e6, #fff); box-shadow: inset 0 0 0 1px rgba(227, 160, 8, .3); }
.ts-dz-sum b { display: block; font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; color: var(--dz-ink); }
.ts-dz-sum b i { font-style: normal; font-size: 17px; font-weight: 600; opacity: .55; }
.ts-dz-sum span { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.ts-hbars b.ok { color: var(--ok); }
@media (max-width: 600px) { .ts-heat col.ts-dzcol { width: 92px; } }

/* ── Ввод данных (31.10.2026): олимпиада, встречи, дарын, план ценности ──
   Минимально: сплошные белые поверхности, серая заливка полей, без
   прозрачности; цвет — только у видов дайындық и у кнопки «Сақтау». */
.ts-kpis.row.five { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.ts-oly tbody tr[data-ol-open] { cursor: pointer; }
.ts-oly tbody tr[data-ol-open]:hover th { color: var(--green-dark); }
.ts-tbl td.num { font-weight: 650; font-variant-numeric: tabular-nums; }
.ts-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

.ts-oly-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ts-oly-top h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.ts-can { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--green-dark); background: var(--ok-bg); }
.ts-month-sm b { min-width: 110px; font-size: 13px; }
.ts-oms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin-bottom: 14px; }
.ts-om { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--ts-bg); }
.ts-om > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.ts-om b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ts-om b small { margin-left: 3px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ts-om-bar { height: 4px; border-radius: 4px; background: rgba(60, 60, 67, .12); overflow: hidden; }
.ts-om-bar i { display: block; height: 100%; border-radius: 4px; }

.ts-oly-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .ts-oly-grid { grid-template-columns: minmax(0, 1fr); } }
.ts-oly-sheet { padding: 16px; }
.ts-osec { padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ts-sep); }
.ts-osec + .ts-osec { margin-top: 14px; }
.ts-osec > header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.ts-osec > header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.ts-osec > header h3 small { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ts-osec > header > small { flex: 1 1 auto; font-size: 12.5px; color: var(--ink-3); }
.ts-osec > header .ts-link { margin-left: auto; }
.ts-osub { margin: 14px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ts-link { padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--green-dark); cursor: pointer; white-space: nowrap; }
.ts-link:hover { background: var(--ok-bg); }

/* Календарь дайындық */
.ts-oly-cal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* Окно с рабочим листом и редактором плана — шире обычного. */
.ts-sheet:has(.ts-oly-sheet), .ts-sheet:has(.ts-pe) { width: min(1040px, 100vw); }
@media (max-width: 600px) { .ts-sheet:has(.ts-oly-sheet), .ts-sheet:has(.ts-pe) { width: 100vw; } }
.ts-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ts-cal-h { padding-bottom: 2px; text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.ts-cal-d {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  aspect-ratio: 1 / .86; min-height: 38px; border: 0; border-radius: 10px; background: var(--ts-bg);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.ts-cal-d i { display: flex; gap: 2px; height: 5px; }
.ts-cal-d i b { width: 5px; height: 5px; border-radius: 50%; }
.ts-cal-d:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px rgba(16, 22, 19, .25); }
.ts-cal-d:disabled { background: none; color: var(--ink-3); opacity: .45; cursor: default; }
.ts-cal-d.today span { color: var(--green-dark); font-weight: 800; }
.ts-cal-d.on { background: var(--ink); color: #fff; }
.ts-cal-d.on.today span { color: #fff; }
.ts-cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.ts-cal-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.ts-day { padding: 12px; border-radius: 14px; background: var(--ts-bg); }
.ts-day h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.ts-day h4 small { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.ts-day .ts-note { margin: 4px 0 0; }
.ts-day-k { padding: 9px 10px; border-radius: 12px; background: var(--surface); }
.ts-day-k + .ts-day-k { margin-top: 6px; }
.ts-day-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ts-day-row b { flex: 1 1 auto; font-weight: 600; }
.ts-day-v { font-weight: 700; color: var(--ink-3); }
.ts-day-k.on .ts-day-v { color: var(--c); }
/* Тумблер как в iOS */
.ts-sw { position: relative; flex: 0 0 auto; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: rgba(120, 120, 128, .24); cursor: pointer; transition: background .2s; }
.ts-sw i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .25s var(--ts-spring); }
.ts-sw.on { background: var(--c); }
.ts-sw.on i { transform: translateX(18px); }
.ts-sw:disabled { opacity: .5; }
.ts-coaches { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ts-coaches small { font-size: 12px; color: var(--ink-3); }
.ts-coach {
  padding: 4px 10px; border: 0; border-radius: 999px; background: var(--ts-bg); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.ts-coach.on { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #111); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, #fff); }
.ts-coach:disabled { cursor: default; }

/* Тренеры — чипы */
.ts-pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-pchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 0; border-radius: 10px; background: var(--ts-bg); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ts-pchip small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.ts-pchip:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px rgba(16, 22, 19, .2); }
.ts-pchip:disabled { cursor: default; }

/* Формы: дата, тема, протокол, тренер */
.ts-oform { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 12px; border-radius: 14px; background: var(--ts-bg); }
.ts-oform label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-oform label > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ts-oform label > span small { font-weight: 500; color: var(--ink-3); }
.ts-oform label[hidden] { display: none; }
.ts-oform input, .ts-oform select, .ts-oform textarea,
.ts-pe input, .ts-pe textarea, .ts-search {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 0; border-radius: 10px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--ts-sep); font: inherit; font-size: 14px; color: var(--ink); resize: none;
}
.ts-oform textarea, .ts-pe textarea { line-height: 1.4; }
.ts-oform input:focus, .ts-oform select:focus, .ts-oform textarea:focus,
.ts-pe input:focus, .ts-pe textarea:focus, .ts-search:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green); }
.ts-orow { display: flex; gap: 10px; flex-wrap: wrap; }
.ts-orow label:first-child { flex: 0 0 150px; }
.ts-orow .grow { flex: 1 1 220px; }
.ts-osugg { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -4px; }
.ts-osugg button { max-width: 100%; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--ts-sep);
  font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-osugg button:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(16, 22, 19, .3); }
.ts-oacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-oacts .grow { flex: 1 1 auto; }
.ts-oform .ts-btn.ghost, .ts-pe .ts-btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ts-sep); }
.ts-btn.ghost.danger { color: #b3261e; }
.ts-btn:active:not(:disabled) { transform: scale(.97); }

/* Встречи с кураторами */
.ts-cms { list-style: none; margin: 0; padding: 0; }
.ts-cm { padding: 8px 0; border-top: .5px solid var(--ts-sep); }
.ts-cm:first-child { border-top: 0; }
.ts-cm-row { display: flex; align-items: center; gap: 10px; }
.ts-cm-st {
  flex: 0 0 auto; display: grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 8px;
  background: var(--low-bg); color: var(--low); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.ts-cm.ok .ts-cm-st { background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.ts-cm-name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.ts-cm-name small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-cm-list { list-style: none; margin: 6px 0 0 44px; padding: 0; }
.ts-cm-m button {
  display: flex; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left;
  font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
}
.ts-cm-m button:hover:not(:disabled) { background: var(--ts-bg); }
.ts-cm-m button:disabled { cursor: default; }
.ts-cm-m time { flex: 0 0 78px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ts-cm-m small { display: block; font-size: 12px; color: var(--ink-3); }
.ts-oform-li { margin: 6px 0; }
.ts-oform-li .ts-oform { margin: 0; }
@media (max-width: 600px) { .ts-cm-list { margin-left: 0; } .ts-orow label:first-child { flex: 1 1 100%; } }

/* Дарын тобы — отметка звёздочкой */
.ts-tl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ts-tl-bar .ts-search { flex: 1 1 240px; max-width: 360px; background: var(--ts-bg); box-shadow: none; }
.ts-tl li.in .ts-person { color: var(--ink); }
.ts-star-btn {
  display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px 0 9px; border: 0; border-radius: 999px;
  background: var(--ts-bg); font: inherit; font-size: 12.5px; font-weight: 650; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.ts-star-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ts-star-btn.on { background: #fdf3d7; color: #8a5a00; }
.ts-star-btn.on svg { fill: #e3a008; stroke: #e3a008; }
.ts-star-btn:hover:not(.on) { color: #8a5a00; }
.ts-star-btn:active { transform: scale(.95); }
.ts-star-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; color: #8a5a00; }
.ts-star-tag svg { width: 14px; height: 14px; fill: #e3a008; }
.ts-tl + .ts-more { margin-top: 10px; }
.ts-tl-bar + #tsTalentList .ts-empty { margin-top: 8px; }

/* Жоспар: «+» и «Жоспар құру» */
.ts-plan button.ts-chip.add { min-width: 30px; background: var(--ts-bg); color: var(--ink-3); font-size: 15px; line-height: 1; }
.ts-plan button.ts-chip.add:hover { background: var(--ok-bg); color: var(--green-dark); filter: none; }
.ts-theme-new { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ts-theme-new button {
  padding: 7px 12px; border: 0; border-radius: 10px; background: #fff; color: var(--mc, var(--ink));
  font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer;
}
.ts-theme-new small { display: block; font-weight: 500; color: var(--ink-3); }

/* Редактор плана ценности */
.ts-pe { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ts-pe-f { display: flex; flex-direction: column; gap: 4px; }
.ts-pe-f > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ts-pe-title input { min-height: 44px; font-size: 17px; font-weight: 650; }
.ts-pe-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.ts-pe-sugg button {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; border: 0; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vc) 45%, #fff); font: inherit; font-size: 12.5px; font-weight: 650; color: var(--vc); cursor: pointer;
}
.ts-pe-sugg svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ts-pe-weeks { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.ts-pe-weeks button { position: relative; }
.ts-pe-dot { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--mc, var(--green)); }
.ts-pe-body { display: flex; flex-direction: column; gap: 10px; }
.ts-pe-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .ts-pe-head { grid-template-columns: 1fr; } }
.ts-pe-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.ts-pe-p { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--ts-bg); }
.ts-pe-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ts-pe-ph b { font-size: 13.5px; font-weight: 700; }
.ts-pe-x { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; font-size: 18px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.ts-pe-x:hover { background: var(--surface); color: #b3261e; }
.ts-pe-adds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ts-pe-adds > span { width: 100%; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ts-pe-adds > button { padding: 5px 11px; border: 0; border-radius: 999px; background: var(--ts-bg); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ts-pe-adds > button:hover { background: var(--ok-bg); color: var(--green-dark); }
.ts-pe-newp { display: inline-flex; gap: 6px; }
.ts-pe-newp input { width: 180px; min-height: 32px; padding: 4px 10px; }
.ts-pe-newp .ts-btn { min-height: 32px; }
.ts-pe-foot {
  position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 -20px -24px; padding: 12px 20px; background: var(--surface); box-shadow: 0 -1px 0 var(--ts-sep);
}
.ts-pe-foot span { font-size: 13px; color: var(--ink-3); }
.ts-pe-foot span.dirty { color: #8a5a00; font-weight: 600; }
.ts-pe-foot .ts-btn { min-width: 120px; min-height: 38px; }

/* Бағалау: лист ученика — шире, вопросы переносятся. */
.ts-sheet:has(.ts-ev-sheet) { width: min(980px, 100vw); }
.ts-ev-sheet { padding: 12px; }
.ts-ev-q { padding: 12px 16px; }
.ts-ev-q li { grid-template-columns: minmax(0, 1fr) 140px 40px; }
.ts-ev-q li > span:first-child { white-space: normal; font-weight: 500; line-height: 1.35; }
.ts-heat tr[data-ev-b], .ts-heat tr[data-ev-s] { cursor: pointer; }
.ts-heat tr[data-ev-b]:hover th, .ts-heat tr[data-ev-s]:hover th { color: var(--green-dark); }
@media (max-width: 600px) { .ts-ev-q li { grid-template-columns: minmax(0, 1fr) 60px 34px; } }
/* Элементы листа не раздвигают его вбок: широкая таблица прокручивается сама. */
#tsSheetBody > * { min-width: 0; }

/* Выбывшие (04.11.2026): красным, с месяца выбытия; в нормы не входят. */
.ts-left-n { display: block; color: #c0392f !important; font-weight: 600; }
.ts-kpi .ts-left-n { display: inline; }
.ts-heat tr.left th { color: #c0392f; }
.ts-heat tr.left td { opacity: .45; }
.ts-heat td[data-st-cell] { cursor: pointer; }
.ts-heat td[data-st-cell]:hover { filter: brightness(.96); box-shadow: inset 0 0 0 1.5px rgba(16, 22, 19, .22); }
.ts-cellsum b small { font-size: 18px; font-weight: 700; color: var(--ink-3); }
.ts-agenda .ts-note-q { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--ts-bg); font-style: normal; font-size: 13px; line-height: 1.4; color: var(--ink); white-space: pre-wrap; }

/* Ученики куратора по группам: заголовок группы — отступ сверху и тонкая линия. */
.ts-heat tr.ts-grp-row th { padding: 16px 4px 4px; background: none; border-radius: 0; position: static; text-align: left; border-bottom: 1px solid var(--ts-sep); }
.ts-heat tr.ts-grp-row:first-child th { padding-top: 4px; }
.ts-heat tr.ts-grp-row th span { font-size: 13px; font-weight: 750; color: var(--ink); letter-spacing: .01em; }
.ts-heat tr.ts-grp-row th small { display: inline; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* Класс — галочки: обе отмечены = все классы. */
.ts-chk { display: inline-flex; gap: 6px; }
.ts-chk button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px 0 8px; border: 0; border-radius: 10px;
  background: var(--ts-fill); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.ts-chk button i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface); box-shadow: inset 0 0 0 1.5px rgba(60, 60, 67, .3); }
.ts-chk button i svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.ts-chk button.on { color: var(--ink); }
.ts-chk button.on i { background: #3a3f3d; box-shadow: none; }
.ts-chk button.on i svg { visibility: visible; }
.ts-chk button:active { transform: scale(.97); }
.ts-heat td.ts-dz .ts-dz-bar { background: #eeeeee; }
.ts-heat td.ts-dz .ts-dz-bar i { background: #d9a441; }

/* Штат кураторов на «Стандарттар» (28.11.2026): филиалы колонками,
   строка куратора в одну линию — имя, ученики, переключатель. */
.ts-staff-list { columns: 340px; column-gap: 28px; }
.ts-staff-br { break-inside: avoid; margin-bottom: 14px; }
.ts-staff-br h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; padding: 6px 0; border-bottom: .5px solid var(--ts-sep); font-size: 13.5px; font-weight: 700; }
.ts-staff-br h3 small { font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ts-staff-br ul { list-style: none; margin: 0; padding: 0; }
.ts-staff { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 0; }
.ts-staff + .ts-staff { border-top: .5px solid var(--ts-sep); }
.ts-staff-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.ts-staff-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-3); }
.ts-staff.off .ts-staff-name { color: var(--ink-3); font-weight: 500; }
.ts-sw-sm { width: 38px; height: 22px; }
.ts-sw-sm i { width: 18px; height: 18px; }
.ts-sw-sm.on i { transform: translateX(16px); }
