/* ===========================================================================
   desktop-s1-roles.css — ГЛАВНЫЕ ЭКРАНЫ РОЛЕЙ и частые внутренние страницы
   в стиле S1 «Система» (Apple/iOS inset grouped). Зона desk-roles.

   Эталон: scratchpad/out/style-s1.html (.r-style .s1 .dscreen — главная
   директора: сайдбар 260, колонка 900, large title 34, чипы статуса,
   4 KPI-плитки, «Сигналы» inset-группой строк, «Классы за 7 дней» чипами,
   секции ссылок — inset-группы строк с шевронами).

   ВСЁ строго внутри html[data-ui="v2"] и @media (min-width: 900px).
   Без флага ?ui=v2 прод не меняется.

   Палитра — ТОЛЬКО токены платформы (--surface, --ink, --line, --muted, …);
   светлая тема html[data-theme="light"] переопределяет их сама.

   РАЗДЕЛЕНИЕ ЗОН: общие компоненты (карточка .card, список .list/.list-item,
   кнопка .btn, чип .chip, сегмент .q-picker/.mode-seg/.td-seg/.daytabs,
   поля .input/.select, таблицы .table-scroll, KPI .stat-card/.stat-grid/
   .stat-cards, капс-подписи .sec-h/.card-title, сайдбар, компакт-шапка,
   ширина колонки .app-main) живут в desktop-s1.css (desk-core). Здесь —
   только страничная раскладка ролей и специфичные классы этих страниц.
   =========================================================================== */

@media (min-width: 900px) {

/* ---------- 0. Локальные метрики (не палитра, только размеры) ---------- */
html[data-ui="v2"] {
  --s1r-wrap: 900px;   /* ширина колонки — для собственных обёрток страниц */
  --s1r-row: 44px;     /* строка списка */
  --s1r-pad: 16px;     /* внутренний паддинг группы */
  --s1r-ind: 52px;     /* hairline со сдвигом под иконку 28 + gap 12 + 16 */
  --s1r-gap: 12px;
  --s1r-sec: 24px;
  --s1r-card: 20px;
  --s1r-ctl: 12px;
  --s1r-chev: 1.6px solid var(--muted);   /* толщина/цвет шеврона */
}

/* Шеврон 7×7 из бордеров — как в эталоне (.chev). */
html[data-ui="v2"] .s1r-chev-after::after,
html[data-ui="v2"] .dir-grid > .card::after,
html[data-ui="v2"] .rep-grid > .card::after,
html[data-ui="v2"] .gb-accordion > summary::after,
html[data-ui="v2"] .settings-acc > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: var(--s1r-chev);
  border-bottom: var(--s1r-chev);
  transform: rotate(-45deg);
  margin-left: 6px;
}


/* ===========================================================================
   1. КАТАЛОГИ РАЗДЕЛОВ РОЛЕЙ → inset-группы строк со шевронами
      .dir-grid (директор /school) и .rep-grid (завуч /reports): в разметке
      это сетка карточек-ссылок; в S1 каталог — это СПИСОК, а не плитки.
   =========================================================================== */

html[data-ui="v2"] .dir-grid,
html[data-ui="v2"] .rep-grid {
  display: block;
  background: var(--surface);
  border-radius: var(--s1r-card);
  overflow: hidden;
  margin-bottom: var(--s1r-gap);
}

/* карточка каталога → строка ≥44 */
html[data-ui="v2"] .dir-grid > .card,
html[data-ui="v2"] .rep-grid > .card {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  position: relative;
  min-height: var(--s1r-row);
  padding: 11px var(--s1r-pad);
  margin: 0;
  border-radius: 0;
  background: transparent;
}
/* hairline между соседями со сдвигом под иконку; у последней строки нет */
html[data-ui="v2"] .dir-grid > .card + .card::before,
html[data-ui="v2"] .rep-grid > .card + .card::before {
  content: "";
  position: absolute;
  left: var(--s1r-ind);
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}
html[data-ui="v2"] .dir-grid > .card:hover,
html[data-ui="v2"] .rep-grid > .card:hover { background: var(--surface-2); }

html[data-ui="v2"] .dir-grid .li-main,
html[data-ui="v2"] .rep-grid .li-main { flex: 1; min-width: 0; }
/* заголовок строки: эмодзи в квадрате 28, текст 15/500 */
html[data-ui="v2"] .dir-grid .li-title,
html[data-ui="v2"] .rep-grid .li-title {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  line-height: 1.3;
}
html[data-ui="v2"] .dir-grid .li-title .mv2-ic,
html[data-ui="v2"] .rep-grid .li-title .mv2-ic {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
/* подпись 13 muted, одна строка — каталог должен читаться списком */
html[data-ui="v2"] .dir-grid .li-sub,
html[data-ui="v2"] .rep-grid .li-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* у строк с иконкой подпись выравнивается под заголовок */
html[data-ui="v2"] .rep-grid .li-title:has(.mv2-ic) ~ .li-sub,
html[data-ui="v2"] .dir-grid .li-title:has(.mv2-ic) ~ .li-sub { padding-left: 40px; }

/* значение/чип справа — перед шевроном */
html[data-ui="v2"] .dir-grid > .card > .chip,
html[data-ui="v2"] .rep-grid > .card > .chip { flex: 0 0 auto; white-space: nowrap; }


/* ===========================================================================
   2. ДИРЕКТОР — /school (director/school.html)
   =========================================================================== */

/* --- шапка: large title, под ним чипы статуса ---------------------------- */
html[data-ui="v2"] body.role-director .app-main > .row.between.mb-3 {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 0;
}
html[data-ui="v2"] body.role-director .app-main > .row.between.mb-3 > h1 { flex: 1 0 100%; }
html[data-ui="v2"] body.role-director .app-main > .row.between.mb-3 > .row {
  margin-top: 10px;
  gap: 8px;
}

/* --- «Смотреть как…» (#gsw): аккуратной вторичной кнопкой в шапке справа,
       а не ярким плавающим пятном поверх контента ------------------------ */
html[data-ui="v2"] #gsw {
  position: fixed;
  top: 26px;
  right: 28px;
  left: auto;
  bottom: auto;
  z-index: 40;
}
html[data-ui="v2"] #gsw-open {
  font-family: var(--s1-fb, inherit);
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  box-shadow: none;
  cursor: pointer;
}
html[data-ui="v2"] #gsw-open:hover { background: var(--surface-3); color: var(--ink); }
html[data-ui="v2"] #gsw-panel {
  border-radius: var(--s1r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s1r-gap);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

/* --- KPI-полоса директора: ровно 4 колонки (авто-fit давал 3+1) --------- */
html[data-ui="v2"] body.role-director .app-main > .stat-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: var(--s1r-sec);
}

/* --- тепловая карта «Классы за 7 дней» ---------------------------------- */
html[data-ui="v2"] #pulse-classes > .row.between {
  align-items: baseline;
  margin-bottom: 10px;
}
html[data-ui="v2"] #pulse-classes .card-title { margin-bottom: 0; }
html[data-ui="v2"] #pulse-classes .hm-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}
html[data-ui="v2"] .hm-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
html[data-ui="v2"] .hm-dot.ok { background: var(--ok); }
html[data-ui="v2"] .hm-dot.part { background: var(--warn); }
html[data-ui="v2"] #pulse-classes > p.muted { font-size: 13px !important; }
html[data-ui="v2"] .hm-grid { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-ui="v2"] .hm-chip {
  min-width: 44px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  transition: background .12s ease;
}
html[data-ui="v2"] .hm-chip:hover { background: var(--surface-3); color: var(--ink); }
html[data-ui="v2"] .hm-chip.ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok);
}
html[data-ui="v2"] .hm-chip.part {
  background: color-mix(in srgb, var(--warn) 15%, transparent);
  color: var(--warn);
}

/* --- «Музыка за неделю»: числовая строка без вертикальных линеек -------- */
html[data-ui="v2"] .gap-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border: 0;
}
html[data-ui="v2"] .gap-cell {
  background: var(--surface-2);
  border: 0;
  border-radius: var(--s1r-ctl);
  padding: 12px 14px;
  text-decoration: none;
  display: block;
}
html[data-ui="v2"] .gap-cell b {
  display: block;
  font-family: var(--s1-fd, inherit);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
html[data-ui="v2"] .gap-cell span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* --- «Настройки школы» в конце: аккордеон-группа ------------------------ */
html[data-ui="v2"] .settings-acc {
  background: var(--surface);
  border: 0;
  border-radius: var(--s1r-card);
  overflow: hidden;
  margin-top: var(--s1r-sec);
  padding: 0;
}
html[data-ui="v2"] .settings-acc > summary {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  min-height: var(--s1r-row);
  padding: 11px var(--s1r-pad);
  cursor: pointer;
  list-style: none;
}
html[data-ui="v2"] .settings-acc > summary::-webkit-details-marker { display: none; }
html[data-ui="v2"] .settings-acc > summary::after { margin-left: 0; }
html[data-ui="v2"] .settings-acc[open] > summary {
  border-bottom: 1px solid var(--line);
}
html[data-ui="v2"] .settings-acc[open] > summary::after { transform: rotate(45deg); }
html[data-ui="v2"] .settings-acc > summary .li-main { flex: 1; min-width: 0; }
html[data-ui="v2"] .settings-acc > .card {
  background: var(--surface-2);
  border-radius: var(--s1r-ctl);
  margin: var(--s1r-gap);
}
html[data-ui="v2"] .settings-acc .card-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
  text-transform: none !important;
  color: var(--ink) !important;
  margin-bottom: 10px;
}
html[data-ui="v2"] .mode-cap { font-size: 13px; color: var(--muted); margin-top: 8px; }


/* ===========================================================================
   3. УЧЕНИК — /me (student/_dashboard.html)
   =========================================================================== */

/* --- «Материалы классов»: тонкая полоса чипов --------------------------- */
html[data-ui="v2"] .grade-strip {
  background: var(--surface);
  border: 0;
  border-radius: var(--s1r-card);
  padding: 14px var(--s1r-pad);
  box-shadow: none;
  margin-bottom: var(--s1r-gap);
}
html[data-ui="v2"] .grade-strip .gs-title { margin-bottom: 10px; }
html[data-ui="v2"] .grade-strip .gs-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- строка «Расписание» над приветствием ------------------------------- */
html[data-ui="v2"] body.role-student .app-main > a.card.link.row.between {
  min-height: var(--s1r-row);
  padding: 11px var(--s1r-pad);
  gap: var(--s1r-gap);
  margin-bottom: var(--s1r-sec) !important;
}

/* --- приветствие: large title + подзаголовок 15 muted ------------------- */
html[data-ui="v2"] .hero-greet { margin-bottom: var(--s1r-gap); }
html[data-ui="v2"] .hero-greet .sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

/* --- KPI ученика: ровно 3 колонки --------------------------------------- */
html[data-ui="v2"] body.role-student .app-main > .stat-cards {
  grid-template-columns: repeat(3, 1fr);
}
html[data-ui="v2"] .stat-cards .streak-flame { font-size: 24px; margin-left: 4px; }

/* --- сетка предметов: 4 в ряд, плитка-карточка S1 ----------------------- */
html[data-ui="v2"] .subj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s1r-gap);
  margin-bottom: var(--s1r-gap);
}
html[data-ui="v2"] .subj-grid > .subj-tile {
  display: flex;
  flex-direction: column;
  padding: var(--s1r-pad);
  margin: 0;
  gap: 0;
}
html[data-ui="v2"] .subj-grid .stl-top { display: block; }
html[data-ui="v2"] .subj-grid .stl-ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
html[data-ui="v2"] .subj-grid .stl-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 10px;
  min-height: 2.6em;   /* две строки: низ плиток выравнивается */
}
html[data-ui="v2"] .subj-grid .stl-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: auto;
}
html[data-ui="v2"] .subj-grid .stl-fill { display: block; height: 100%; background: var(--accent); }
html[data-ui="v2"] .subj-grid .stl-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
html[data-ui="v2"] .subj-grid .stl-pct {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink) !important;
}
html[data-ui="v2"] .subj-grid .stl-cnt { font-size: 13px; color: var(--muted); }

/* --- «Достижения» / «Предметы по выбору» — строки-группы ---------------- */
html[data-ui="v2"] .elective-note {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  min-height: var(--s1r-row);
  padding: 12px var(--s1r-pad);
  margin-bottom: var(--s1r-gap);
}
html[data-ui="v2"] .elective-note .en-ic {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
html[data-ui="v2"] .elective-note .en-main { flex: 1; min-width: 0; }
html[data-ui="v2"] .elective-note .en-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
html[data-ui="v2"] .elective-note .en-sub {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 1px;
}
html[data-ui="v2"] .elective-note .en-go {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* --- «Мои предметы» / «Отметки за четверть»: шапка секции --------------- */
html[data-ui="v2"] .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1r-gap);
  margin: var(--s1r-sec) 0 8px;
  padding: 0 var(--s1r-pad);
}
html[data-ui="v2"] .section-head > h2 { margin: 0; }
html[data-ui="v2"] .section-head > a { font-size: 13px; color: var(--muted); }


/* ===========================================================================
   4. УЧИТЕЛЬ — /teach/day: сетка расписания остаётся ТАБЛИЦЕЙ,
      но по S1 — hairline, строки 44, капс-шапка, чипы дней.
   =========================================================================== */

html[data-ui="v2"] .td-page { max-width: var(--s1r-wrap); margin: 0 auto; }
html[data-ui="v2"] .td-head { margin-bottom: var(--s1r-sec); }
html[data-ui="v2"] .td-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
html[data-ui="v2"] .td-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1r-gap);
  margin-top: 10px;
}
html[data-ui="v2"] .td-date {
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
html[data-ui="v2"] .td-progress { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* навигация по датам — чипы-пилюли 32 */
html[data-ui="v2"] .td-date-nav { display: flex; align-items: center; gap: 6px; }
html[data-ui="v2"] .td-date-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  border: 0;
}
html[data-ui="v2"] .td-date-nav a:hover { background: var(--surface-3); color: var(--ink); }

/* заголовки секций страницы — капс-подпись S1, а не h2 */
html[data-ui="v2"] .td-section-title {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  color: var(--muted) !important;
  margin: var(--s1r-sec) 0 8px;
  padding-left: var(--s1r-pad);
}
html[data-ui="v2"] .td-empty-tasks { font-size: 15px; color: var(--muted); }

/* --- сама сетка -------------------------------------------------------- */
html[data-ui="v2"] .td-grid-wrap {
  background: var(--surface);
  border: 0;
  border-radius: var(--s1r-card);
  overflow: auto;
  max-width: 100%;
}
html[data-ui="v2"] table.td-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: none;
}
html[data-ui="v2"] table.td-grid th,
html[data-ui="v2"] table.td-grid td { border: 0; background: none; }

/* шапка дней — капс 11 */
html[data-ui="v2"] .td-day-head {
  font-family: var(--s1-fb, inherit);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 8px 10px;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 1px solid var(--line);
}
html[data-ui="v2"] .td-day-head .td-day-head-main { display: block; }
html[data-ui="v2"] .td-day-head.today { color: var(--ink); }
html[data-ui="v2"] .td-day-off {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
  margin-top: 2px;
}

/* колонка «№/время» */
html[data-ui="v2"] table.td-grid th.sticky-col {
  background: var(--surface);
  text-align: left;
  padding: 6px 12px;
  border-right: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
/* номер и время урока — обычный текст, БЕЗ капса колонки-шапки */
html[data-ui="v2"] .td-grid-slot strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
html[data-ui="v2"] .td-grid-slot small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
/* колонка слотов узкая и фиксированная, дни делят остаток поровну */
html[data-ui="v2"] table.td-grid { table-layout: fixed; }
html[data-ui="v2"] table.td-grid col.td-slot-col { width: 96px; }
html[data-ui="v2"] table.td-grid col.td-day-col { width: auto; }

/* ячейки: строка 44, hairline сверху.
   В app.css у .td-grid-cell стоит border: none — перебиваем адресно. */
html[data-ui="v2"] table.td-grid tbody td.td-grid-cell,
html[data-ui="v2"] table.td-grid tbody th.sticky-col {
  height: var(--s1r-row);
  vertical-align: top;
  border-top: 1px solid var(--line) !important;
}
html[data-ui="v2"] table.td-grid tbody td.td-grid-cell { padding: 4px; }
html[data-ui="v2"] table.td-grid tbody tr:first-child > * { border-top: 0 !important; }
/* колонка «сегодня»: мягкая вторая поверхность, а не заливка --accent */
html[data-ui="v2"] table.td-grid td.td-grid-cell.today { background: var(--surface-2); }
html[data-ui="v2"] table.td-grid th.td-day-head.today {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}
/* S1: шапка «сегодня» на surface-2 — текст цветом темы, а не белым (light по умолчанию с 03.09) */
html[data-ui="v2"] table.td-grid th.td-day-head.today .td-day-head-main { color: var(--ink); }
html[data-ui="v2"] table.td-grid th.td-day-head.today .td-day-off { color: var(--muted); opacity: 1; }
html[data-ui="v2"] table.td-grid thead tr > *:first-child { border-top-left-radius: var(--s1r-card); }
html[data-ui="v2"] table.td-grid thead tr > *:last-child { border-top-right-radius: var(--s1r-card); }
html[data-ui="v2"] .td-grid-cell.off {
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
}
/* урок в ячейке — компактная плитка */
html[data-ui="v2"] .td-grid-lesson {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background .12s ease;
}
html[data-ui="v2"] .td-grid-lesson:hover { background: var(--line-strong); }
html[data-ui="v2"] .td-grid-lesson.past { opacity: .62; }
html[data-ui="v2"] .td-grid-subject {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-ui="v2"] .td-grid-class {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
html[data-ui="v2"] .td-grid-warning {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  margin-top: 3px;
}


/* ===========================================================================
   5. ЗАВУЧ — /reports (хаб): шапка с сегментом четверти
   =========================================================================== */

html[data-ui="v2"] body.role-zavuch .app-main > .row.between.mb-3 {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 0;
}
/* «Смотреть как…» висит фиксированно справа сверху — освобождаем под него
   место в шапке страницы, чтобы чипы года не уходили под кнопку */
html[data-ui="v2"] body.role-zavuch .app-main > .row.between.mb-3 > .row:last-child,
html[data-ui="v2"] body.role-director .app-main > .row.between.mb-3 > .row:last-child {
  padding-right: 170px;
}
html[data-ui="v2"] .rep-q {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 2px;
  border: 0;
}
html[data-ui="v2"] .rep-q > a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 7px 16px;
  border-radius: 8px;
  min-width: 44px;
  text-align: center;
  text-decoration: none;
  border: 0;
  background: none;
}
html[data-ui="v2"] .rep-q > a.on {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}


/* ===========================================================================
   6. РОДИТЕЛЬ — /parent (роль без сайдбара — своя обёртка по центру)
   =========================================================================== */

html[data-ui="v2"] .pv2-home { max-width: var(--s1r-wrap); margin: 0 auto; }
html[data-ui="v2"] .pv2-home .hero-greet { margin-bottom: var(--s1r-gap); }
html[data-ui="v2"] .pv2-consent {
  border: 0 !important;
  border-left: 3px solid var(--accent) !important;
  border-radius: var(--s1r-card) !important;
  padding: 14px var(--s1r-pad);
}
html[data-ui="v2"] .pv2-consent > div:first-child { font-size: 15px; font-weight: 600; }

html[data-ui="v2"] .pv2-kids { display: grid; gap: var(--s1r-gap); }
html[data-ui="v2"] .child-card { padding: var(--s1r-pad); margin: 0; }
html[data-ui="v2"] .child-ava {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--surface-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--s1-fd, inherit);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
html[data-ui="v2"] .child-name {
  font-family: var(--s1-fd, inherit);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.25;
}
/* текстовый «›» → шеврон 7×7 */
html[data-ui="v2"] .child-card .chev,
html[data-ui="v2"] .pv2-dev .chev {
  font-size: 0;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  align-self: center;
  border-right: var(--s1r-chev);
  border-bottom: var(--s1r-chev);
  transform: rotate(-45deg);
}
/* подпись карточки ребёнка выравнивается под имя, а не под аватар */
html[data-ui="v2"] .child-card > .muted { padding-left: 56px; font-size: 13px !important; }
html[data-ui="v2"] .pv2-dev,
html[data-ui="v2"] .pv2-digest { padding: 14px var(--s1r-pad); }
html[data-ui="v2"] .pv2-dev b,
html[data-ui="v2"] .pv2-digest b { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }


/* ===========================================================================
   7. АДМИН — /admin: плитки-счётчики .grid-auto
   =========================================================================== */

html[data-ui="v2"] body.role-admin .app-main > .grid-auto {
  grid-template-columns: repeat(3, 1fr);
}
html[data-ui="v2"] .grid-auto > .card { margin: 0; }
html[data-ui="v2"] .grid-auto > .card > .row.between { align-items: center; }
html[data-ui="v2"] .grid-auto > .card > .row.between > span:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  line-height: 1;
}
html[data-ui="v2"] .grid-auto > .card > .row.between > b {
  font-family: var(--s1-fd, inherit);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
html[data-ui="v2"] .grid-auto > .card h3 {
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
  color: var(--ink);
  margin: 12px 0 0;
}
html[data-ui="v2"] .grid-auto > .card p.muted { margin: 2px 0 0; }
html[data-ui="v2"] .grid-auto > .card p.muted small { font-size: 13px; color: var(--muted); }


/* ===========================================================================
   8. /assess — карточки СОР/СОЧ компактнее, поиск
   =========================================================================== */

html[data-ui="v2"] .assess-head { margin-bottom: var(--s1r-gap); }
html[data-ui="v2"] .assess-head p.muted { font-size: 15px; max-width: 640px; margin-top: 6px; }
html[data-ui="v2"] .assess-search-wrap { margin: var(--s1r-gap) 0; }
/* поле поиска 44 радиус 12 с иконкой-лупой (эталон S1 .fld).
   Фон поля даёт desk-core шорткатом background: — поэтому иконку кладём
   с !important, иначе шорткат её обнуляет. */
html[data-ui="v2"] .app-main input.assess-search {
  width: 100%;
  padding-left: 38px !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238E8E93' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.4 10.4 14 14' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 13px center !important;
  background-size: 16px 16px !important;
}

html[data-ui="v2"] .list2 { display: block; }
html[data-ui="v2"] .subj-block2 {
  background: var(--surface);
  border: 0;
  border-radius: var(--s1r-card);
  overflow: hidden;
  box-shadow: none;
  margin-bottom: var(--s1r-gap);
  padding: 0;
}
html[data-ui="v2"] .subj-head {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  padding: 12px var(--s1r-pad) 10px;
  border: 0;
  background: none;
}
html[data-ui="v2"] .subj-head .subj-ic {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
html[data-ui="v2"] .subj-head .subj-name {
  font-family: var(--s1-fd, inherit);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
html[data-ui="v2"] .subj-head .subj-hours { font-size: 12px; color: var(--muted); }
html[data-ui="v2"] .subj-head .year-chip {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

/* карточки работ — компактная сетка 4 в ряд */
html[data-ui="v2"] .work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 var(--s1r-pad) 12px;
}
html[data-ui="v2"] .work-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--s1r-ctl);
  padding: 10px 12px;
  box-shadow: none;
  min-height: 0;
  margin: 0;
}
html[data-ui="v2"] .work-card.soch { background: var(--surface-3); }
html[data-ui="v2"] .work-card .wc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[data-ui="v2"] .work-card .wc-sub {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
html[data-ui="v2"] .work-card .wc-foot { margin-top: 8px; }
html[data-ui="v2"] .work-card .wc-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border: 0;
  padding: 0;
  background: none;
}
/* полоса проекта четверти */
html[data-ui="v2"] .proj-strip {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  padding: 10px var(--s1r-pad);
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
html[data-ui="v2"] .proj-strip-main {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  flex: 1;
  min-width: 0;
}
html[data-ui="v2"] .proj-strip-ic {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
html[data-ui="v2"] .proj-strip-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
html[data-ui="v2"] .proj-strip-title { font-size: 15px; color: var(--ink); margin-top: 1px; }
html[data-ui="v2"] .proj-strip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}


/* ===========================================================================
   9. /gradebook — аккордеоны классов
   =========================================================================== */

html[data-ui="v2"] .gb-note { font-size: 15px; color: var(--muted); max-width: 640px; }
html[data-ui="v2"] .gb-accordion { overflow: hidden; padding: 0; }
html[data-ui="v2"] .gb-accordion > summary {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  min-height: var(--s1r-row);
  padding: 11px var(--s1r-pad);
  cursor: pointer;
  list-style: none;
}
html[data-ui="v2"] .gb-accordion > summary::-webkit-details-marker { display: none; }
html[data-ui="v2"] .gb-accordion > summary::after { margin-left: auto; }
html[data-ui="v2"] .gb-accordion[open] > summary {
  border-bottom: 1px solid var(--line);
}
html[data-ui="v2"] .gb-accordion[open] > summary::after { transform: rotate(45deg); }
html[data-ui="v2"] .gb-accordion-title {
  font-family: var(--s1-fd, inherit);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
html[data-ui="v2"] .gb-accordion-body { padding: var(--s1r-pad); }
html[data-ui="v2"] .gb-loading { font-size: 13px; color: var(--muted); padding: 8px 0; }
/* таблица журнала внутри аккордеона — hairline, 44, капс-шапка */
html[data-ui="v2"] .gb-accordion-body table { border-collapse: collapse; font-size: 13px; }
html[data-ui="v2"] .gb-accordion-body table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: none;
  text-align: left;
}
html[data-ui="v2"] .gb-accordion-body table td {
  border: 0;
  border-top: 1px solid var(--line);
  height: var(--s1r-row);
  padding: 6px 8px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
/* всплывашка выставления оценки */
html[data-ui="v2"] .gb-pop {
  border-radius: var(--s1r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
  padding: var(--s1r-pad);
}
html[data-ui="v2"] .gb-grades button,
html[data-ui="v2"] .gb-pop-att button {
  min-height: 36px;
  border-radius: 10px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
html[data-ui="v2"] .gb-pop-att button.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
}


/* ===========================================================================
   10. /me/schedule — расписание ученика
   =========================================================================== */

html[data-ui="v2"] .page-head { margin-bottom: var(--s1r-gap); }
html[data-ui="v2"] .now-block {
  background: var(--surface);
  border-radius: var(--s1r-card);
  padding: var(--s1r-pad);
  margin-bottom: var(--s1r-gap);
}
html[data-ui="v2"] .now-sub,
html[data-ui="v2"] .now-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
html[data-ui="v2"] .now-card {
  background: var(--surface-2);
  border: 0;
  border-radius: var(--s1r-ctl);
  padding: 12px 14px;
  margin-top: 8px;
}
html[data-ui="v2"] .now-name {
  font-family: var(--s1-fd, inherit);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}
html[data-ui="v2"] .now-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }

html[data-ui="v2"] .daytabs { margin-bottom: var(--s1r-gap); }
/* панель дня — inset-группа строк 44 с hairline под номером урока */
html[data-ui="v2"] .daypanel {
  background: var(--surface);
  border-radius: var(--s1r-card);
  overflow: hidden;
}
html[data-ui="v2"] .daypanel .mrow {
  display: flex;
  align-items: center;
  gap: var(--s1r-gap);
  position: relative;
  min-height: var(--s1r-row);
  padding: 9px var(--s1r-pad);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
html[data-ui="v2"] .daypanel .mrow + .mrow::before {
  content: "";
  position: absolute;
  left: var(--s1r-ind);
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}
html[data-ui="v2"] .daypanel .mrow-time {
  width: 28px;
  flex: 0 0 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
html[data-ui="v2"] .daypanel .mrow-time b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}
html[data-ui="v2"] .daypanel .mrow-time span { display: block; font-size: 11px; color: var(--muted); }
html[data-ui="v2"] .daypanel .mrow-body { flex: 1; min-width: 0; }
html[data-ui="v2"] .daypanel .mrow-subj,
html[data-ui="v2"] .daypanel .mrow-subj a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
html[data-ui="v2"] .daypanel .mrow-who { font-size: 13px; color: var(--muted); margin-top: 1px; }
html[data-ui="v2"] .daypanel .mlunch {
  font-size: 13px;
  color: var(--muted);
  padding: 10px var(--s1r-pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}


/* ===========================================================================
   11. /broadcast — форма рассылки
   =========================================================================== */

html[data-ui="v2"] .bc-wrap { max-width: var(--s1r-wrap); margin: 0 auto; }
html[data-ui="v2"] .bc-sec { padding: var(--s1r-pad); margin-bottom: var(--s1r-gap); }
/* подписи полей — капс 11/600 .12em, как капс-подпись секции в S1 */
html[data-ui="v2"] .bc-sec .field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
html[data-ui="v2"] .bc-sec .field { margin-top: var(--s1r-gap); }
html[data-ui="v2"] .bc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-ui="v2"] .bc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease;
}
html[data-ui="v2"] .bc-tag:hover { background: var(--surface-3); }
html[data-ui="v2"] .bc-tag.on {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  font-weight: 600;
}


/* ===========================================================================
   12. /school/base — вкладки, фильтры, длинный список детей
   =========================================================================== */

html[data-ui="v2"] .bz-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 2px;
  margin: var(--s1r-gap) 0;
  border: 0;
}
html[data-ui="v2"] .bz-tab {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  border: 0;
  background: none;
  white-space: nowrap;
}
html[data-ui="v2"] .bz-tab.on {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
html[data-ui="v2"] .bz-tb {
  background: var(--surface);
  border: 0;
  border-radius: var(--s1r-card);
  padding: var(--s1r-pad);
  margin-bottom: var(--s1r-gap);
}
html[data-ui="v2"] .bz-flt {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1r-gap);
  align-items: flex-end;
}
html[data-ui="v2"] .bz-sel { display: flex; flex-direction: column; gap: 6px; }
html[data-ui="v2"] .bz-sel-lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

} /* /@media (min-width: 900px) */
