body.trener { background: var(--bg, #faf8f4); min-height: 100vh; }
[hidden] { display: none !important; }

.t-head { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.t-head-row { display: flex; align-items: center; gap: var(--s3); min-height: 60px; }
.t-who { margin-left: auto; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-tabs { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--s2); }
.t-tabs::-webkit-scrollbar { display: none; }
.t-tab {
  flex: 0 0 auto; min-height: 44px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.t-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.t-tab:focus-visible, .t-chip:focus-visible, .t-mark:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.t-main { padding-top: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
/* Только панели вкладок. Ночная проверка 17.10.2026: правило для всех
   section перебивало отступы вложенных блоков Lichess (.cw-attn, .cw-box в
   classwork.css) — заголовок и кнопки стояли вплотную к рамке. */
.t-main > section { display: flex; flex-direction: column; gap: var(--s3); padding: 0; margin: 0; }
.t-empty { padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }

.t-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.t-chip {
  min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.t-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.t-bar { display: flex; align-items: center; gap: var(--s2); }
.t-bar .btn { min-width: 44px; min-height: 44px; }
.t-lesson { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.t-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.t-actions .btn { min-height: 44px; }

.t-marks, .t-students, .t-roster, .t-reqs { list-style: none; margin: 0; padding: 0; }
/* Ночная проверка 17.10.2026: li до 68ch (style.css, для текста) обрезал
   строки журнала и карточки учеников на компьютере — фон «был/пропустил»
   обрывался на 2/3 рамки списка. Строки — во всю ширину списка. */
.t-marks > li, .t-students > li, .t-roster > li, .t-reqs > li { max-width: none; }
.t-marks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.t-mark-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.t-mark-row:last-child { border-bottom: 0; }
.t-mark-row.is-present { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.t-mark-row.is-absent { background: color-mix(in srgb, var(--danger) 7%, transparent); }
/* Пропуск по уважительной причине (абонементы): с абонемента не списывается. */
.t-mark-row.is-excused { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.t-mark-name { flex: 1; min-width: 0; overflow-wrap: break-word; }
@media (max-width: 520px) {
  .t-mark-row { display: grid; grid-template-columns: 36px 1fr; grid-template-areas: "ava name" "ava btns"; column-gap: var(--s3); row-gap: var(--s1); align-items: center; }
  .t-mark-row > .t-ava { grid-area: ava; align-self: start; margin-top: 2px; }
  .t-mark-row > .t-mark-name { grid-area: name; }
  .t-mark-row > .t-mark-btns { grid-area: btns; }
  .t-mark-btns .t-mark { flex: 1 1 0; }
}
.t-mark-btns { display: flex; gap: var(--s1); flex: 0 0 auto; }
.t-mark {
  min-height: 44px; min-width: 44px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
}
.t-mark-present[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.t-mark-absent[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.t-mark-excused[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }

.t-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.t-ava-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-weight: 700; }

.t-students { display: flex; flex-direction: column; gap: var(--s2); }
.t-student { display: flex; gap: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.t-student .t-ava { width: 44px; height: 44px; }
.t-student-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-student-ratings { font-size: .9375rem; }
.t-contact { font-size: .9375rem; }
.t-contact a { display: inline-flex; align-items: center; min-height: 44px; }

.t-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.t-card-title { margin: var(--s3) 0 0; font-size: 1.125rem; }
.t-card .t-card-title { margin: 0; }
.t-card-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.t-sessions { display: flex; flex-direction: column; gap: var(--s2); }
/* Проверка 17.10.2026 (F11): колонки 1fr не уже min-content поля времени
   (≈117 px), и на 390 px «конец занятия» вылезал за карточку. */
.t-session { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s2); align-items: center; }
.t-session input[type=time] { min-width: 0; width: 100%; box-sizing: border-box; padding-left: 8px; padding-right: 8px; }
.t-session .s-venue { grid-column: 1 / 4; }
.t-session .btn { grid-column: 4; justify-self: end; min-height: 44px; min-width: 44px; }
@media (min-width: 720px) {
  .t-session { grid-template-columns: 90px 120px auto 120px 1fr auto; }
  .t-session .s-venue { grid-column: auto; }
  .t-session .btn { grid-column: auto; }
}
.t-roster { display: flex; flex-direction: column; gap: 2px; }
.t-reqs { display: flex; flex-direction: column; gap: var(--s1); }

/* Начисления (зарплата тренеров): итог крупно, части — сумма справа, списки
   занятий и выплат без таблиц, чтобы на 375 px ничего не уезжало вбок. */
.t-sal-total { margin: 0; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Ширина — как у строк занятий ниже (li до 68ch, style.css): на компьютере
   сумма иначе уезжала на тысячу пикселей от своей подписи. */
.t-sal-parts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); max-width: 68ch; margin: 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.t-sal-parts:empty { display: none; }
.t-sal-parts dt { min-width: 0; overflow-wrap: anywhere; }
.t-sal-parts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-sal-head { margin: 0; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.t-sal-skipped:empty { display: none; }
.t-sal-skip { margin: var(--s1) 0 0; padding-left: 1.2em; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.t-sal-lines { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.t-sal-lines:empty { display: none; }
.t-sal-lines li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.t-sal-lines li:last-child { border-bottom: 0; }
.t-sal-lines li.t-sal-head { padding-bottom: 2px; border-bottom: 0; }
.t-sal-balance { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Остаток за месяц и общий долг — две строки (у школ с зарплатой тренеров). */
.t-sal-line { display: block; }
.t-sal-owed { margin-top: 2px; color: var(--muted); }

/* Три отметки («Уважит.» есть только у школ с абонементами): на узком
   телефоне «Пропустил» обрезалась. Ряд кнопок — во всю ширину строки под
   именем, кнопки уже. */
@media (max-width: 520px) {
  .t-mark-row:has(.t-mark-excused) > .t-ava { grid-row: 1; }
  .t-mark-row:has(.t-mark-excused) > .t-mark-btns { grid-column: 1 / -1; grid-row: 2; }
  .t-mark-btns:has(.t-mark-excused) .t-mark { min-width: 0; padding: 0 var(--s2); font-size: .875rem; }
}

/* Пробные (воронка школы, trener.js): в неделе — строка «пробное: Маша,
   7 лет» под занятием; в журнале — гости отдельным списком, рамка
   пунктиром: это не ученики группы. */
.t-trial { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 600; color: var(--focus); }
.t-guests { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.t-guests[hidden] { display: none; }
.t-guests-title { margin: 0; font-size: 1rem; }
.t-guests .sub { margin: 0; }
.t-guest { border-bottom-style: dashed; }

/* «Не придём» из кабинета семьи (absence.go, NEMZO). */
.t-told { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.6; background: #fbe9e7; color: #8a1f12; }

/* Отзыв за месяц (coach_report.go, NEMZO). */
.t-report { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.t-report-head { font-weight: 700; font-size: .875rem; }
.t-report-text { margin: 0; font-size: .9375rem; white-space: pre-line; }
.t-report .field { width: 100%; }
.t-report-area { width: 100%; min-height: 72px; resize: vertical; }
.t-report-acts { display: flex; flex-wrap: wrap; gap: 8px; }
