/* ============================================================
   Beztest — Academic Atelier
   Тёплая редакционная система: бумага, чернила, латунь.
   ============================================================ */
:root {
  --v50:#f5f1e8; --v100:#ebe4d6; --v200:#d9ceba; --v300:#bdad91;
  --v400:#8b7657; --v500:#496b60; --v600:#285548; --v700:#1d463b; --v800:#15372f;
  --primary:#285548; --primary-600:#1d463b; --primary-700:#15372f;
  --accent:#c18a45; --accent-2:#9b642b; --accent-soft:#f3e5cd;
  --grad:linear-gradient(128deg,#2f6152 0%,#1d463b 58%,#173a32 100%);
  --grad-soft:linear-gradient(145deg,#f6f2e9,#e8e0d1);
  --sidebar-grad:linear-gradient(168deg,#18372f 0%,#102a24 62%,#0b211c 100%);

  --cream:#fffaf0;
  /* Поверхности кабинета выстроены в лестницу светлот: фон-парчемент заметно
     глубже белой карточки, панель — промежуточная ступень. Прежде фон #f2eee5 и
     карточка #fffdf8 различались на два процента светлоты и «плыли» в одно пятно;
     теперь между ними внятный шаг, а карточка стала чище и ярче. Тёмная тема ниже
     переопределяет весь набор. */
  --surface-2:#fffefb; --surface-3:#faf6ec; --panel:#f8f3e8; --hover:#f6f1e5;
  --hover-line:#b7aa93; --chip-bg:#f3efe6; --tabs-bg:#eee8dc;
  --disabled-bg:#f4f1e9; --disabled-line:#ddd7ca; --input-line:#948671;
  --on-primary:#fffdf7; --quote-bg:#fbf8f1; --skel-mid:#f6f2e9;
  --spin-track:#ddd5c6; --star-focus:#f4e7d1; --ndot-ring:#f8f5ed; --ndot-bg:#b63c42; --on-green:#fffaf0;
  --badge-bg:#eef0eb; --badge-ink:#355146; --badge-gray-bg:#eeece7;
  --badge-gray-ink:#5e6662; --badge-violet-bg:#ece8f5; --badge-violet-ink:#4d3f86;
  --topbar-bg:rgba(250,247,239,.88); --topbar-line:rgba(190,183,170,.7);
  --card-glass:rgba(255,254,251,.98); --stat-glass:rgba(255,254,251,.97);
  --paper-glow:rgba(255,255,255,.6); --paper-stripe:rgba(52,78,68,.02);
  --busy-bar:rgba(255,255,255,.75);
  --unread-bg:#f8f1e4; --unread-mark:#b67b38; --item-hover:#f7f2e8;
  --selection-bg:#e5c99c; --placeholder:#6f7873;
  --card-hover-line:#c4b497; --danger-line:#e4c2c0; --modal-line:#d9cdb9;
  --busy-bar-ghost:rgba(40,85,72,.5); --file-btn-bg:#e8eee9; --file-btn-ink:#15372f;
  --scroll-shadow:rgba(23,35,31,.14);
  /* --muted чуть темнее прежнего (#5f6a65): фон-парчемент углубили, и приглушённый
     текст прямо на нём (подзаголовки страниц) должен держать AA 4.5:1 — теперь 5:1. */
  --ink:#17231f; --ink-2:#3f4c47; --muted:#566159; --faint:#5c6661;
  --line:#ddd6c6; --line-2:#e9e3d6; --bg:#ece5d4; --surface:#fffefb;
  /* Каждое семейство даёт три роли: акцент (иконка, полоса), подложку и цвет
     текста на этой подложке. Раньше текстовый оттенок писали на месте — пять
     почти одинаковых красных (#8d2930, #902f35, #912e35, #962f36) на пять
     поверхностей с одним и тем же смыслом, и шестой добавлялся сам собой. */
  --green:#147348; --green-2:#0e603c; --green-bg:#e4f2e9; --green-ink:#0e603c; --green-line:#cae5d5;
  --red:#b63c42; --red-bg:#fae8e7; --red-ink:#8d2930; --red-line:#f1d1d0;
  --amber:#9b642b; --amber-bg:#f7ead6; --amber-ink:#78491c; --amber-line:#ecd6b4;
  --blue:#34657a; --blue-bg:#e6f0f3; --blue-ink:#28576c; --blue-line:#ccdee5;

  --r-xs:6px; --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:22px;
  /* Единая шкала отступов (4-8-12-16-24-32): раньше в компонентах жили частные
     значения 7/9/11/13/15/18/23 и ритм полей разъезжался. Новые правила тянут
     из шкалы, старые постепенно к ней подводятся. */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px; --s-6:32px;
  /* Тени двухслойные: узкий контактный слой сажает элемент на поверхность,
     широкий мягкий даёт объём. Реалистичнее одиночной размытой тени и заметнее
     прежней почти прозрачной (alpha .055). Три ступени глубины плюс латунная
     тень главной кнопки. */
  --sh-xs:0 1px 2px rgba(23,35,31,.07);
  --sh-sm:0 1px 2px rgba(24,40,33,.05),0 5px 16px rgba(28,46,39,.06);
  --sh-md:0 2px 6px rgba(24,40,33,.06),0 16px 36px rgba(22,44,36,.12);
  --sh-lg:0 6px 18px rgba(12,30,24,.12),0 30px 74px rgba(7,25,20,.24);
  --sh-primary:0 2px 6px rgba(21,70,58,.16),0 12px 26px rgba(21,70,58,.22);
  /* Кромка бумаги: светлый hairline по верхней грани — лист «ловит свет».
     Ямка: внутренняя тень для утопленных лотков (трек вкладок, ящик чекбоксов). */
  --paper-edge:inset 0 1px 0 rgba(255,255,255,.55);
  --well:inset 0 1px 4px rgba(23,35,31,.07);
  --sidebar-w:270px;

  /* Единая механика движения: раньше в файле встречалось семь разных длительностей
     и переходы разъезжались между соседними компонентами. */
  --dur-fast:.12s; --dur:.16s; --dur-slow:.24s;
  --ease:cubic-bezier(.2,.8,.2,1);

  --font:'Onest','Segoe UI',system-ui,sans-serif;
  --display:'Literata',Georgia,serif;
}

*,*::before,*::after { box-sizing:border-box; }
html { margin:0; padding:0; min-width:320px; scroll-behavior:smooth; overflow-x:hidden; }
.lsection,.hero,.lfooter,.auth-card { scroll-margin-top:24px; }
body {
  margin:0; padding:0; min-width:320px; min-height:100vh;
  font-family:var(--font); color:var(--ink); background-color:var(--bg);
  background-image:radial-gradient(circle at 16% 8%,var(--paper-glow),transparent 25%),repeating-linear-gradient(90deg,transparent 0,transparent 79px,var(--paper-stripe) 80px);
  font-size:15px; line-height:1.58; letter-spacing:-.008em;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
body.is-landing { background:#10201b; color-scheme:dark; }
[hidden] { display:none !important; }
a { color:var(--primary); text-decoration:none; }
a:hover { color:var(--primary-600); }
h1,h2,h3,h4 { margin:0 0 .55em; color:var(--ink); line-height:1.14; font-family:var(--display); font-weight:650; letter-spacing:-.025em; text-wrap:balance; }
/* Явная шкала заголовков: без неё размеры брались из умолчаний браузера в em и
   зависели от кегля родителя — иерархия плыла от страницы к странице. */
h1 { font-size:28px; }
h2 { font-size:21px; }
h3 { font-size:17px; }
h4 { font-size:15px; }
img { max-width:100%; }
button,input,select,textarea { font:inherit; }
button { touch-action:manipulation; }
/* Системная серая заливка при тапе спорит с собственными состояниями кнопок. */
a,button,input,select,textarea,[role='button'],[role='tab'] { -webkit-tap-highlight-color:rgba(40,85,72,.12); }
::selection { color:var(--ink); background:var(--selection-bg); }
:focus { outline:none; }
/* Кольцо фокуса — нетекстовый элемент интерфейса: WCAG требует контраст 3:1.
   Прежний #d6a35d давал 1.96 на фоне кабинета и 2.25 на поле ввода, то есть на
   светлых экранах фокус был почти неразличим. На тёмном сайдбаре он, наоборот,
   читался хорошо (6.71) — там прежний цвет и оставляем. */
:focus-visible { outline:3px solid #a8701f; outline-offset:3px; }
/* Светлое кольцо — только на тёмных поверхностях. Карточка входа светлая, и на
   ней латунный контур давал 2.2:1 вместо требуемых 3:1 для элементов управления. */
.sidebar :focus-visible, .lnav :focus-visible, .hero-left :focus-visible, .lfooter :focus-visible { outline-color:#d6a35d; }
/* Латунная плашка призыва и тёмный исходящий пузырь чата гасили стандартное
   кольцо: 1.81:1 и 2.10:1 к своим фонам. На латуни — тёмный контур, на тёмном
   пузыре — кремовый. */
.cta-inner :focus-visible { outline-color:#17382f; }
.msg.out :focus-visible { outline-color:var(--cream); }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.skip-link { position:fixed; z-index:2000; top:10px; left:12px; padding:10px 14px; border-radius:8px; background:var(--surface); color:var(--ink); box-shadow:var(--sh-lg); transform:translateY(-160%); transition:transform .16s; }
.skip-link:focus { transform:translateY(0); }
.noscript { margin:20px; padding:16px; border:1px solid var(--red); background:var(--red-bg); border-radius:var(--r); }

/* Ползунок — из тёплой шкалы, а не нейтрально-серый: единственный «чужой» цвет
   в гамме был именно тут. scrollbar-color покрывает Firefox. */
* { scrollbar-color:var(--v300) transparent; }
*::-webkit-scrollbar { width:10px; height:10px; }
*::-webkit-scrollbar-thumb { background:var(--v300); border:3px solid transparent; border-radius:99px; background-clip:padding-box; }
*::-webkit-scrollbar-thumb:hover { background:var(--v400); background-clip:padding-box; }
/* Лендинг тёмный по дизайну — ползунок приглушённо-зелёный. */
body.is-landing { --v300:#3a5248; --v400:#4e6a5d; }

/* ---------- Действия ---------- */
.btn {
  min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 19px; border:1px solid transparent; border-radius:10px;
  background:var(--grad); color:var(--on-primary); box-shadow:inset 0 1px 0 rgba(255,255,255,.14),var(--sh-primary);
  font-weight:650; font-size:14px; line-height:1.25; cursor:pointer; white-space:nowrap;
  transition:transform var(--dur) var(--ease),box-shadow var(--dur-slow) var(--ease),background var(--dur-slow) var(--ease),border-color var(--dur-slow) var(--ease);
}
.btn:hover { color:#fff; transform:translateY(-1px); box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 2px 6px rgba(21,70,58,.16),0 13px 28px rgba(21,70,58,.26); }
/* Нажатие меняет освещение, а не только позицию: блик гаснет, появляется
   внутренняя тень — кнопка «вдавливается». */
.btn:active { transform:translateY(1px); box-shadow:inset 0 2px 5px rgba(9,26,21,.32); }
.btn.ghost:active { box-shadow:var(--well); }
.btn:disabled { opacity:.54; cursor:not-allowed; transform:none; box-shadow:none; }
/* Кнопка, запертая до выполнения условия (импорт прайса ждёт предпросмотра),
   выглядит как отключённая, но остаётся в таб-порядке: у disabled нет фокуса,
   скринридер такую кнопку не встречает вовсе и объяснение «почему нельзя»
   (aria-describedby) до человека не доходит. */
.btn[aria-disabled="true"] { opacity:.54; cursor:not-allowed; transform:none; box-shadow:none; }
/* Две кнопки тёмного лендинга — латунная главная и контурная светлая. Раньше
   тот же латунный градиент жил в трёх контекстных правилах (hero, гостевая
   форма, навигация) и чуть-чуть расходился в каждом. */
.btn.brass { color:#162820; background:linear-gradient(165deg,#ddb168,#cf9c50); box-shadow:inset 0 1px 0 rgba(255,250,240,.35),0 12px 28px rgba(0,0,0,.22); }
.btn.brass:hover { color:#162820; background:linear-gradient(165deg,#e6bd76,#d9a85e); }
.btn.brass:active { box-shadow:inset 0 2px 5px rgba(0,0,0,.28); }
.btn.outline-light { background:transparent; color:var(--cream); border-color:rgba(255,250,240,.28); box-shadow:none; }
.btn.outline-light:hover { color:var(--cream); background:rgba(255,250,240,.08); box-shadow:none; }
/* Кнопка в работе: приглушена меньше, курсор «ожидание» и бегущая полоса —
   иначе «идёт запрос» неотличимо от «действие недоступно». */
.btn[aria-busy='true'] { position:relative; overflow:hidden; opacity:.82; cursor:progress; }
.btn[aria-busy='true']::after {
  content:''; position:absolute; left:0; bottom:0; height:2px; width:40%;
  background:var(--busy-bar); animation:btn-busy 1.1s var(--ease) infinite;
}
.btn.ghost[aria-busy='true']::after { background:var(--busy-bar-ghost); }
@keyframes btn-busy { from { transform:translateX(-100%); } to { transform:translateX(350%); } }
.btn svg { width:17px; height:17px; }
.btn.ghost { color:var(--ink); background:var(--surface); border-color:var(--line); box-shadow:var(--sh-xs); }
.btn.ghost:hover { background:var(--hover); border-color:var(--hover-line); box-shadow:var(--sh-sm); }
.btn.danger { background:#9e3038; box-shadow:0 9px 22px rgba(158,48,56,.2); }
.btn.success { background:#176b47; box-shadow:0 9px 22px rgba(23,107,71,.2); }
.btn.sm { min-height:38px; padding:7px 13px; border-radius:8px; font-size:13px; }
.btn.lg { min-height:50px; padding:13px 24px; font-size:15px; }
.btn.block { width:100%; }
.btn-link { min-height:36px; padding:5px 7px; border:0; background:transparent; color:var(--primary); font-size:13px; font-weight:650; cursor:pointer; }
.btn-link:hover { text-decoration:underline; }
/* Ссылка-кнопка внутри текста: без внутренних отступов, чтобы знаки препинания не отрывались. */
.btn-link.inline-link { min-height:0; padding:0; font-size:inherit; text-decoration:underline; text-underline-offset:2px; }

/* ---------- Формы ---------- */
.field { display:block; min-width:0; margin-bottom:15px; }
.field > span { display:block; margin-bottom:7px; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.input,.textarea,.select {
  width:100%; min-width:0; min-height:46px; padding:11px 13px;
  border:1px solid var(--input-line); border-radius:9px; background:var(--surface-2); color:var(--ink); box-shadow:inset 0 1px 2px rgba(23,35,31,.04);
  font-size:14px; transition:border-color .16s,box-shadow .16s,background .16s;
}
.input::placeholder,.textarea::placeholder { color:var(--placeholder); opacity:1; }
.input:hover,.textarea:hover,.select:hover { border-color:#6f6250; }
.input:focus,.textarea:focus,.select:focus { border-color:var(--primary); box-shadow:0 0 0 4px rgba(40,85,72,.12); }
/* У <input type=date> подсказки нет, :placeholder-shown для него не срабатывает — пустое
   обязательное поле краснело до первого касания. Для дат — только после взаимодействия. */
.input:not([type=date]):invalid:not(:placeholder-shown),.textarea:invalid:not(:placeholder-shown) { border-color:#bb666a; }
/* :user-invalid — отдельным правилом: Chrome до 119 и Safari до 16.5 его не знают
   и выбросили бы всё правило целиком, вместе с подсветкой обычных полей. */
.input[type=date]:user-invalid { border-color:#bb666a; }
/* Отключённое поле раньше выглядело как обычное: пользователь пытался в него
   писать и не понимал, почему ничего не происходит. */
.input:disabled,.textarea:disabled,.select:disabled {
  border-color:var(--disabled-line); background:var(--disabled-bg); color:var(--muted); cursor:not-allowed; box-shadow:none;
}
.input:disabled::placeholder,.textarea:disabled::placeholder { color:#a9b0ab; }
.textarea { min-height:104px; resize:vertical; }
.select { appearance:none; padding-right:38px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366716c' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
/* Поле выбора вуза с поиском (W2-12, public/js/uni-picker.js): список под
   полем поверх формы, «нет в списке» — последним пунктом; в регистрации поле
   делит строку с «Пропустить». */
.uni-picker { flex:1; min-width:0; }
.uni-combo { position:relative; }
.uni-options { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; max-height:280px; margin:0; padding:4px; overflow:auto; list-style:none; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--sh-md, 0 8px 24px rgba(0,0,0,.12)); }
.uni-option { display:flex; flex-direction:column; gap:1px; padding:8px 10px; border-radius:7px; cursor:pointer; overflow-wrap:anywhere; }
.uni-option.active, .uni-option:hover { background:var(--v100); }
.uni-option-other { border-top:1px solid var(--line); border-radius:0 0 7px 7px; color:var(--primary); font-weight:600; }
.uni-empty { padding:8px 10px; font-size:13px; }
.uni-other { margin-top:8px; }
.uni-other-label { display:block; margin-bottom:5px; color:var(--ink-2); font-size:12.5px; font-weight:650; }
input[type='checkbox'] { width:19px; height:19px; flex:none; accent-color:var(--primary); }
input[type='file'] { padding:8px; }
input[type='file']::file-selector-button { min-height:30px; margin-right:10px; padding:5px 10px; border:0; border-radius:6px; background:var(--file-btn-bg); color:var(--file-btn-ink); font-weight:650; cursor:pointer; }
/* Чем мельче кегль, тем свободнее должна быть строка: прежде подсказки и
   подписи получали более плотный интерлиньяж, чем основной текст. */
.hint { margin-top:5px; color:var(--muted); font-size:12.5px; line-height:1.6; }
/* Одна и та же ошибка встречается в четырёх местах: под формой, над полем ввода
   чата, в списке и всплывающей подсказкой. Рисунок общий — рамка, скруглeние и
   акцентная полоса слева; меняется только плотность. */
.form-error { margin:0 0 12px; padding:10px 12px; border:1px solid var(--red-line); border-left:3px solid var(--red); border-radius:8px; background:var(--red-bg); color:var(--red-ink); font-size:13px; }
.row { display:flex; flex-wrap:wrap; gap:14px; }
.row > * { flex:1; min-width:min(170px,100%); }
/* Кнопка «убрать строку» — вспомогательный контрол: без этого она подчинялась
   общему правилу строки и занимала треть ширины наравне с полями ввода. */
.row > .btn.sm { flex:none; min-width:0; align-self:center; }
.order-form,.profile-form,.settings-form { width:100%; }
/* Форма настроек шире одинокой колонки в 660px — правая половина экрана больше
   не пустует; текстовые поля не растягиваем до нечитаемой ширины. */
.settings-form { max-width:940px; }
/* Короткие числовые поля — в две колонки: пара «поле + подсказка» = ячейка.
   Прежде каждое число тянулось во всю колонку и казалось несоразмерно огромным. */
.settings-form .set-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2px 30px; align-items:start; }
.settings-form .set-item { min-width:0; }
.settings-form .set-item > .field { margin-bottom:6px; }
.settings-form .set-item > .hint { margin-top:0; margin-bottom:15px; }
/* Ширину самого числа ограничиваем: «15» в поле на 400px выглядело потерянным. */
.settings-form .set-item .input,
.settings-form .set-item input[type='number'] { max-width:200px; }
/* Настройки: секции с заголовком, редакторы списков (ступени, даты, шаблоны). */
.settings-section { padding-top:4px; margin-bottom:22px; }
.settings-section + .settings-section { padding-top:18px; border-top:1px dashed var(--line); }
.list-editor { display:grid; gap:10px; }
.settings-form .hint + .field { margin-top:12px; }
.list-editor-row { position:relative; display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; padding:10px 54px 10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.list-editor-row .field { flex:1 1 140px; }
.list-editor-row .field span { font-size:11.5px; }
.list-editor-row .list-editor-wide { flex:1 1 100%; display:grid; gap:8px; }
.list-editor-row .list-editor-wide .row .field { flex:1 1 160px; }
.list-editor-row .list-editor-wide .textarea { min-height:64px; }
.list-editor-row .list-editor-del { position:absolute; top:10px; right:10px; width:34px; height:34px; }
/* Высота шаблона по содержимому (скрипт) — без внутренней прокрутки поля. */
.textarea-auto { overflow:hidden; resize:vertical; }
/* Навигация по секциям настроек: чипы с иконкой, под заголовком страницы. */
.settings-tabs { max-width:660px; margin-bottom:14px; }
.settings-tabs .chip { display:inline-flex; align-items:center; gap:6px; }
.settings-tabs .chip svg { width:14px; height:14px; }
.settings-section:focus { outline:none; }
/* Шаблоны ответов — свёрнутая секция: заголовок-summary с счётчиком. */
.settings-templates > summary { cursor:pointer; list-style:none; }
.settings-templates > summary::-webkit-details-marker { display:none; }
.settings-templates > summary::after { content:'▸'; margin-left:auto; color:var(--muted); transition:transform .15s; }
.settings-templates[open] > summary::after { transform:rotate(90deg); }
.settings-templates > summary .badge { margin-left:2px; }
/* Волна «омни-2» (AD2-13): «Тексты писем», «Сроки и лимиты», «Подписи кнопок» —
   отдельные карточки со своим сохранением под формой настроек. */
.settings-extra { margin-top:16px; scroll-margin-top:calc(var(--settings-tabs-bottom, 116px) + 10px); } /* как у секций формы (W3-08) */
.settings-extra:focus { outline:none; }
.settings-extra .set-subtitle { font-size:14px; margin:14px 0 8px; }
/* Подраздел внутри секции формы (ИИ-помощник в «Реквизитах и контактах»). */
.settings-section .set-subtitle { font-size:15px; margin:16px 0 6px; padding-top:12px; border-top:1px dashed var(--line); }
.settings-extra-save { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px 16px; margin-top:14px; padding-top:12px; border-top:1px dashed var(--line); }
.mail-texts-item { border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin-bottom:8px; background:var(--surface-2); }
.mail-texts-item > summary { cursor:pointer; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.mail-texts-item > summary .badge { margin-left:auto; }
.mail-texts-fields { margin-top:10px; display:grid; gap:4px; }
.mail-texts-fields .textarea { min-height:56px; }
.mail-texts-vars { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:2px 0 6px; }
.mail-texts-vars .chip { font-family:ui-monospace,Consolas,monospace; font-size:12px; }
.mail-preview-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; margin:8px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); max-height:55vh; overflow:auto; font-family:inherit; }
.mail-preview-frame { display:block; width:100%; height:min(62vh,640px); margin:8px 0 0; border:1px solid var(--line); border-radius:8px; background:var(--v50); }
.limits-item .hint .badge { margin-right:4px; }
.limits-doc { display:flex; gap:4px; align-items:flex-start; color:var(--amber-ink); margin-bottom:8px; }
.limits-doc svg { width:14px; height:14px; flex:none; margin-top:2px; }
.settings-form .limits-item input[type='number']:disabled { background:var(--disabled-bg); }
/* Липкая панель «Сохранить»: форма в пять секций, кнопка всегда под рукой.
   Внутри карточки — sticky к низу окна; отрицательные поля растягивают её
   на всю ширину карточки. */
.settings-sticky { position:sticky; bottom:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px -23px -23px; padding:12px 23px; border-top:1px solid var(--line); border-radius:0 0 var(--r-lg) var(--r-lg); background:var(--surface); background:color-mix(in srgb,var(--surface) 94%,transparent); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.settings-sticky.is-dirty { border-top-color:var(--accent); box-shadow:0 -8px 24px rgba(12,30,25,.10); }
.settings-sticky.is-dirty .settings-sticky-status { color:var(--ink); font-weight:600; }
@media (max-width:760px) {
  .settings-sticky { margin:14px -15px -18px; padding:10px 15px max(10px,env(safe-area-inset-bottom)); }
  .settings-sticky .btn { min-height:44px; }
}
/* W3-08. Настройки: поиск по настройкам, закреплённая строка разделов,
   свёрнутые до первой фразы подсказки, окно «было → станет». */
.settings-search { max-width:940px; margin-bottom:12px; }
.settings-search .field > span { display:flex; align-items:center; gap:6px; }
.settings-search .field > span svg { width:15px; height:15px; color:var(--accent-2); }
.settings-search-input { max-width:460px; }
.settings-search-status { margin-top:6px; }
.settings-search-results { display:grid; gap:6px; margin-top:8px; }
.settings-search-results[hidden] { display:none; }
.settings-search-item { display:grid; gap:2px; width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.settings-search-item:hover, .settings-search-item.is-active { border-color:var(--v300); background:var(--hover); }
.settings-search-item:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; }
.settings-search-label { font-weight:600; }
.settings-search-place { color:var(--muted); font-size:12px; }
.settings-search-snip { color:var(--ink-2); font-size:12.5px; line-height:1.45; }
/* Строка разделов закреплена под шапкой кабинета (70px; 62px на узком экране).
   На узком экране — одна строка с прокруткой внутри себя: четырнадцать чипов
   в семь рядов съели бы треть телефона; что строка листается, видно по
   стрелке с затуханием у края, за которым есть ещё чипы (классы has-more-*
   ставит trackActiveSection). На широком (≥ 900px) чипы переносятся в ряды:
   это оглавление, и в одну строку на 940px было видно пять разделов из
   четырнадцати, остальные — за прокруткой без подсказки. Текущий раздел
   подсвечивается при прокрутке (settings-search.js, trackActiveSection). */
.filter-chips.settings-tabs { position:sticky; top:70px; z-index:6; max-width:940px; margin:0 0 14px; padding:8px 0; flex-wrap:nowrap; gap:8px; overflow-x:auto; scrollbar-width:thin; background:var(--bg); }
.filter-chips.settings-tabs .chip { flex:none; white-space:nowrap; }
.settings-tabs .chip:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; }
@media (min-width:900px) { .filter-chips.settings-tabs { flex-wrap:wrap; overflow:visible; } }
/* Стрелки прокрутки строки: липнут к краю видимой части строки, под ними —
   затухание к фону, чтобы обрезанный чип читался как «дальше есть ещё».
   Отрицательное поле = ширина стрелки + gap строки: стрелка лежит поверх
   крайнего чипа и места в строке не занимает — чипы не сдвигаются, когда она
   появляется. */
.settings-tabs-arrow { display:none; position:sticky; z-index:1; flex:none; align-items:center; width:44px; padding:0; border:0; background:linear-gradient(to right,transparent,var(--bg) 60%); color:var(--accent-2); cursor:pointer; }
.settings-tabs-arrow.is-right { right:0; margin-left:-52px; justify-content:flex-end; }
.settings-tabs-arrow.is-left { left:0; margin-right:-52px; justify-content:flex-start; background:linear-gradient(to left,transparent,var(--bg) 60%); }
.settings-tabs-arrow svg { width:18px; height:18px; }
.settings-tabs-arrow.is-left svg { transform:scaleX(-1); }
.settings-tabs-arrow:hover { color:var(--ink); }
.settings-tabs-arrow:focus-visible { outline:2px solid var(--accent-2); outline-offset:-2px; border-radius:6px; }
.settings-tabs.has-more-left .settings-tabs-arrow.is-left { display:flex; }
.settings-tabs.has-more-right .settings-tabs-arrow.is-right { display:flex; }
/* Секция, открытая чипом или ссылкой ?sec=, не прячется под закреплённую
   строку: отступ — от фактического низа строки (--settings-tabs-bottom
   ставит trackActiveSection; запасное значение — одна строка под шапкой), а
   не константа: на десктопе рядов три, на телефоне один. Зазор 10px — тот же,
   что ЗАЗОР_ПОД_СТРОКОЙ в settings-search.js. */
.settings-form .settings-section { scroll-margin-top:calc(var(--settings-tabs-bottom, 116px) + 10px); }
@media (max-width:520px) { .filter-chips.settings-tabs { top:62px; } }
/* Подсказка, свёрнутая до первой фразы: кнопка «подробнее» — ссылкой. Хвост
   спрятан классом sr-only (не display:none): читалка берёт описание поля по
   aria-describedby целиком. */
.hint-more { padding:0; border:0; background:none; color:var(--accent-2); font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.hint-more:hover { color:var(--ink); }
.hint-more:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; border-radius:3px; }
/* Настройка, к которой привёл поиск, — вспышка подсветки. */
.settings-form .is-found { animation:settings-found 2.4s ease-out; border-radius:10px; }
@keyframes settings-found { 0%,45% { box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 45%,transparent); background:color-mix(in srgb,var(--accent) 10%,transparent); } 100% { box-shadow:none; background:transparent; } }
/* Окно «Что изменится»: раздел, подпись, «было → станет», предупреждение. */
.settings-diff { margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.settings-diff-item { padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.settings-diff-item.is-danger { border-color:var(--amber-line); }
.settings-diff-place { margin-bottom:2px; }
.settings-diff-label { font-weight:600; }
.settings-diff-values { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; margin-top:4px; font-size:13.5px; }
.settings-diff-was { color:var(--muted); text-decoration:line-through; overflow-wrap:anywhere; }
.settings-diff-arrow { color:var(--muted); }
.settings-diff-will { overflow-wrap:anywhere; }
.settings-diff-rows { display:grid; gap:3px; margin-top:4px; font-size:13px; }
.settings-diff-row { display:flex; gap:6px; overflow-wrap:anywhere; }
.settings-diff-row.is-added .settings-diff-sign { color:var(--green-ink); }
.settings-diff-row.is-removed { color:var(--muted); }
.settings-diff-row.is-removed .settings-diff-sign { color:var(--red); }
.settings-diff-sign { flex:none; font-weight:700; }
.settings-diff-warn { margin:8px 0 0; }
/* Двухэтапный вход: QR, секрет крупно, резервные коды столбиком. */
.totp-steps { margin:0 0 14px; padding-left:20px; font-size:13.5px; line-height:1.55; color:var(--ink-2); }
.totp-secret { display:flex; gap:18px; align-items:flex-start; flex-wrap:wrap; margin-bottom:14px; }
.qr-canvas { flex:none; border:1px solid var(--line); border-radius:10px; background:#fff; image-rendering:pixelated; }
.totp-secret-text { flex:1 1 200px; min-width:0; }
/* Ссылка otpauth:// — для настройки с того же телефона: QR с его экрана не
   снять, поэтому на узком экране ссылка стоит первой, а QR спрятан. */
.totp-open { margin-bottom:12px; }
@media (max-width:560px) { .totp-secret .qr-canvas { display:none; } .totp-open { width:100%; justify-content:center; } }
.totp-secret-code { display:block; margin-top:4px; font-size:17px; letter-spacing:.06em; word-break:break-all; color:var(--ink); }
.code-input { font-size:22px; letter-spacing:.3em; text-align:center; max-width:220px; }
.backup-code-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 18px; margin:12px 0; padding:0; list-style:none; }
.backup-code-list code { font-size:16px; letter-spacing:.05em; }

/* ---------- Карточки и системные элементы ---------- */
.card { padding:23px; border:1px solid var(--line); border-radius:var(--r-lg); background:var(--card-glass); box-shadow:var(--paper-edge),var(--sh-sm); }
/* Мера чтения: сплошной текст в карточке не должен растягиваться на всю ширину
   широкого монитора — строка за сотню знаков читается заметно хуже. */
.card .prose { max-width:68ch; }
/* Любой текст, пришедший от пользователя, обязан переноситься. Замер: одна
   вставленная в описание заказа ссылка без пробелов растягивала документ до
   2504 пикселей при окне 890 — вбок ехала вся страница, а не только абзац.
   Именно anywhere, а не break-word: только он учитывается при расчёте
   минимальной ширины блока. */
.prose, .oc-desc, .bid .cmt, .notif-item, .policy-copy, .m-body,
.empty p, table.data td, .t-title, .t-sub { overflow-wrap:anywhere; }
.card + .card { margin-top:18px; }
/* Карточки настроек: форма читается по мере строки, а не во всю колонку. */
.card.narrow { max-width:660px; }
.card.wide { max-width:800px; }
.card-title { display:flex; align-items:center; gap:9px; margin-bottom:18px; color:var(--ink); font-family:var(--display); font-size:16px; font-weight:650; }
.card-title::after { content:''; height:1px; flex:1; margin-left:5px; background:linear-gradient(90deg,var(--line),transparent); background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 55%,transparent),var(--line) 42%,transparent); }
.card-title svg { width:19px; height:19px; color:var(--accent-2); }
/* Заголовок карточки с действием справа («Открыть очередь», «Журнал по заказу»):
   декоративная черта уступает место ссылке, иначе она прижималась к тексту. */
.card-title .ct-head { display:flex; flex:1; align-items:center; gap:10px; min-width:0; }
.card-title .ct-action { margin-left:auto; font-family:var(--font); font-weight:500; white-space:nowrap; }
.card-title:has(.ct-head)::after, .card-title:has(.ct-action)::after { display:none; }
.badge { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border:1px solid transparent; border-radius:999px; background:var(--badge-bg); color:var(--badge-ink); font-size:12px; line-height:1.3; font-weight:650; white-space:nowrap; }
.badge svg { width:13px; height:13px; }
.badge.gray { background:var(--badge-gray-bg); color:var(--badge-gray-ink); }
.badge.green { background:var(--green-bg); color:var(--green-ink); }
.badge.red { background:var(--red-bg); color:var(--red-ink); }
.badge.amber { background:var(--amber-bg); color:var(--amber-ink); }
.badge.blue { background:var(--blue-bg); color:var(--blue-ink); }
.badge.violet { background:var(--badge-violet-bg); color:var(--badge-violet-ink); }
.dot { width:6px; height:6px; border-radius:50%; background:currentColor; }
.alert { display:flex; align-items:flex-start; gap:11px; padding:13px 15px; border:1px solid transparent; border-radius:10px; font-size:13.5px; line-height:1.48; }
.alert svg { width:18px; height:18px; }
.alert.success { color:var(--green-ink); background:var(--green-bg); border-color:var(--green-line); }
.alert.error { color:var(--red-ink); background:var(--red-bg); border-color:var(--red-line); }
.alert.info { color:var(--blue-ink); background:var(--blue-bg); border-color:var(--blue-line); }
.alert.warn { color:var(--amber-ink); background:var(--amber-bg); border-color:var(--amber-line); }
/* Плотный вариант для шапки карточки: те же правила лежали инлайном в четырёх
   местах подряд. */
.alert.sm { margin-bottom:10px; padding:8px 12px; font-size:13px; }
.alert .a-ico { flex:none; margin-top:1px; }
.alert b { display:block; margin-bottom:2px; }
/* Раздел «Прайс-лист»: подсказка «Как обновлять прайс» под заголовком. */
.alert.price-howto { margin-bottom:14px; }
/* Плашка статуса у заказчика (W1-13): срок шага и отражённые главные кнопки
   «Действий» — первым экраном; на телефоне их заменяет нижняя полоса. */
.status-actions { display:flex; align-items:center; gap:8px 14px; flex-wrap:wrap; margin-top:8px; }
.status-actions[hidden] { display:none; }
.status-actions .status-deadline { display:inline-flex; align-items:center; gap:6px; font-weight:650; }
.status-actions .status-deadline svg { width:15px; height:15px; }
.status-actions .status-buttons { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }
.status-actions .status-buttons:empty { display:none; }
@media (max-width:760px) {
  .status-actions .status-buttons { display:none; }
}
/* Окно загрузки прайса: три шага над полем файла. */
.import-steps { margin:0 0 10px; padding-left:22px; font-size:13.5px; line-height:1.5; }
.import-steps li + li { margin-top:3px; }
.avatar { width:38px; height:38px; flex:none; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:#d4a45d; color:#142b24; box-shadow:inset 0 0 0 1px rgba(23,35,31,.12); font-family:var(--display); font-size:14px; font-weight:700; }
.avatar.sm { width:32px; height:32px; font-size:11px; }
.avatar.lg { width:48px; height:48px; font-size:16px; }
.avatar.xl { width:96px; height:96px; font-size:32px; }
/* Фото вместо инициалов: заполняет кружок целиком, кромка остаётся от .avatar. */
.avatar-img { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.avatar:has(.avatar-img) { background:none; }
/* Редактор фото профиля/преподавателя: превью слева, кнопки и подсказка справа. */
.avatar-editor { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.avatar-editor-side { flex:1; min-width:200px; }
.avatar-preview { flex:none; }

/* ============================================================
   ЛЕНДИНГ
   ============================================================ */
.landing { min-height:100vh; display:flex; flex-direction:column; overflow:clip; position:relative; background:#10201b; color:var(--cream); }
.landing:focus { outline:none; }
/* Тёплый радиальный блик из левого верха даёт левой половине первого экрана
   глубину и держит взгляд на заголовке — иначе фон за H1 плоский и тяжёлый
   рядом со светлой карточкой справа. */
.hero-bg { position:absolute; inset:0; z-index:0; overflow:hidden; background:radial-gradient(58% 52% at 6% 8%,rgba(214,170,97,.1),transparent 62%),linear-gradient(92deg,rgba(9,27,22,.97) 0%,rgba(12,33,27,.91) 47%,rgba(12,30,25,.82) 100%),url('/img/hero.webp') center/cover no-repeat #10251f; }
.hero-bg::before { content:''; position:absolute; width:620px; height:620px; right:-250px; top:-280px; border:1px solid rgba(214,170,97,.28); border-radius:50%; box-shadow:0 0 0 68px rgba(214,170,97,.045),0 0 0 138px rgba(214,170,97,.03); }
/* Водяной знак — обе буквы целиком: срезанная краем блока перекладина L
   превращала «DL» в «DI». Рамка псевдоэлемента меньше самих букв: при
   line-height:.8 низ букв на ~.035em ниже рамки, а пятка L из-за
   отрицательного letter-spacing выходит за правый край на ~.07em — отсюда
   bottom:.08em и лишние .1em в right. */
.hero-bg::after { content:'DL'; position:absolute; right:calc(2vw + .1em); bottom:.08em; color:rgba(255,250,240,.05); font-family:var(--display); font-size:min(46vw,640px); font-weight:700; line-height:.8; letter-spacing:-.1em; }
.grid-overlay { position:absolute; inset:0; z-index:0; opacity:.32; background-image:linear-gradient(rgba(236,222,194,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(236,222,194,.045) 1px,transparent 1px); background-size:64px 64px; -webkit-mask-image:linear-gradient(to bottom,#000,transparent 80%); mask-image:linear-gradient(to bottom,#000,transparent 80%); }
/* Линия под навигацией лежит на обёртке во всю ширину, а не на контейнере:
   иначе она обрывалась за 16px до краёв экрана. Один контейнер 1200px у шапки,
   первого экрана, секций, плашки и подвала — левые края совпадают. */
.lnav-bar { position:relative; z-index:5; border-bottom:1px solid rgba(255,250,240,.11); }
.lnav { position:relative; z-index:5; box-sizing:content-box; max-width:1200px; margin:0 auto; padding:22px 6vw; display:flex; align-items:center; gap:26px; }
.lnav .brand { display:flex; align-items:center; gap:10px; flex:none; color:var(--cream); font-family:var(--display); font-size:20px; font-weight:650; }
.lnav .brand:hover { color:#fff; }
.lnav .brand .logo { width:38px; height:38px; padding:7px; display:inline-flex; color:#ddb36d; border:1px solid rgba(221,179,109,.5); border-radius:50%; }
.lnav .brand .logo svg { width:100%; height:100%; }
/* Переносим, а не прячем в прокрутку: полосы не видно, и пункты, не влезшие в
   строку, просто переставали существовать. На широком экране переноса нет. */
.lnav .links { display:flex; flex-wrap:wrap; gap:2px; margin-left:8px; min-width:0; }
.lnav .links a { flex:none; }
.lnav .links a { padding:8px 11px; border-radius:7px; color:#c2cec8; font-size:13.5px; font-weight:500; transition:color .15s,background .15s; }
.lnav .links a:hover { color:var(--cream); background:rgba(255,255,255,.07); }
.lnav .spacer { flex:1; }
.lnav .btn { min-height:40px; }
/* Пункт только для телефона — «Создать аккаунт» (см. медиазапрос ниже). */
.lnav .links .lnav-phone { display:none; }
/* Кнопка меню — только на узких экранах (см. медиазапрос ниже). */
.lnav .menu-btn { display:none; align-items:center; gap:7px; min-height:40px; padding:0 12px; border:1px solid rgba(255,250,240,.18); border-radius:8px; background:transparent; color:var(--cream); font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }
.lnav .menu-btn svg { width:18px; height:18px; }
.lnav .menu-btn:hover, .lnav.open .menu-btn { background:rgba(255,255,255,.07); }
@media (max-width:900px) {
  .lnav { flex-wrap:nowrap; gap:10px; }
  .lnav .menu-btn { display:inline-flex; }
  /* Меню — оверлей поверх первого экрана, а не выпадашка, толкавшая контент вниз:
     раньше под ссылками сразу виднелись кнопки героя, и «Создать аккаунт»
     повторялся и в списке, и кнопкой ниже. Оверлей закрывает герой — CTA
     остаётся один, латунной кнопкой внизу панели. Шапка (марка, «Войти» и
     «Закрыть») поднята над оверлеем, чтобы меню было чем закрыть. */
  .lnav .links { display:none; }
  .lnav.open .links {
    display:flex; position:fixed; inset:0; z-index:20;
    flex-direction:column; gap:3px; margin:0; padding:96px 22px calc(28px + env(safe-area-inset-bottom));
    background:#10201b; border:0; box-shadow:none; overflow-y:auto;
    animation:veil-in var(--dur) var(--ease);
  }
  .lnav.open .brand, .lnav.open .spacer, .lnav.open > .btn, .lnav.open .menu-btn { position:relative; z-index:21; }
  .lnav .links a { position:relative; min-height:46px; padding:12px 16px; border-radius:9px; font-size:16px; }
  /* Латунный left-accent и сдвиг под курсором/касанием — тот же язык навигации,
     что в сайдбаре кабинета (.side-nav a): сайт и кабинет говорят одинаково. */
  .lnav.open .links a::before { content:''; position:absolute; left:2px; top:50%; width:3px; height:20px; border-radius:0 3px 3px 0; background:#d5a85c; box-shadow:0 0 10px rgba(213,168,92,.5); transform:translateY(-50%) scaleY(0); transition:transform var(--dur) var(--ease); }
  .lnav.open .links a:hover, .lnav.open .links a:active { background:rgba(255,255,255,.065); color:var(--cream); transform:translateX(3px); }
  .lnav.open .links a:hover::before, .lnav.open .links a:active::before { transform:translateY(-50%) scaleY(1); }
  /* Регистрация — только в раскрытом меню телефона: на десктопе для неё есть
     карточка в hero и кнопка «Войти». Прайс-лист виден на всех ширинах:
     студент приходит на сайт за ценой предмета. */
  .lnav .links .lnav-phone { display:block; }
  .lnav .links .lnav-cta { margin-top:auto; min-height:52px; display:flex; align-items:center; justify-content:center; border:0; border-radius:12px; padding:12px 16px; background:linear-gradient(155deg,#dcae63,#c89851); color:#152a23; font-weight:700; }
  .lnav .links .lnav-cta::before { display:none; }
  .lnav.open .links .lnav-cta:hover, .lnav.open .links .lnav-cta:active { transform:none; background:linear-gradient(155deg,#e6b972,#d1a058); color:#152a23; }
}
.hero { position:relative; z-index:2; box-sizing:content-box; max-width:1200px; margin:0 auto; padding:56px 6vw 96px; display:grid; grid-template-columns:minmax(0,1.22fr) minmax(340px,.7fr); align-items:start; gap:clamp(38px,6vw,92px); }
/* Форма перестала перетягивать первый экран: колонка карточки уже, сама карточка
   прижата к правому краю и ограничена по ширине — левая колонка с крупным
   заголовком ведёт взгляд, форма читается как спутник, а не как главный герой. */
.hero > .auth-card { justify-self:end; width:100%; max-width:404px; }
/* Левая колонка выровнена по верху карточки, а не по её середине: иначе на
   1366×768 заголовок и главная кнопка уезжали под сгиб. */
.hero-left { max-width:680px; padding-top:clamp(12px,5vh,64px); }
.hero-left .pill { display:inline-flex; align-items:center; gap:10px; margin-bottom:26px; padding:5px 13px 5px 5px; border:1px solid rgba(221,179,109,.24); border-radius:999px; background:rgba(8,24,20,.38); color:#cbd4cf; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); font-size:12.5px; }
.hero-left .pill .tag { flex:none; padding:4px 10px; border-radius:999px; background:#d5a85c; color:#152a23; font-size:10.5px; font-weight:700; letter-spacing:.09em; white-space:nowrap; }
/* Режим обслуживания и объявление администратора (волна «омни»): та же
   плашка первого экрана, метка светлее — это новость, а не обещание. */
.hero-left .pill.hero-notice { display:flex; width:fit-content; max-width:100%; color:#e6ece9; }
.hero-left .pill.hero-notice .tag { background:#f1e3c4; }
/* Полностью скруглённая капсула хороша, только пока текст в одну строку. На
   узком экране копия переносится на две строки, и radius:999px превращает
   пилюлю в кривую высокую лозенгу с тегом, прижатым к левому верху. Тогда —
   прямоугольник с мягким радиусом и тег, выровненный по первой строке текста. */
@media (max-width:640px) {
  .hero-left .pill { align-items:flex-start; gap:9px; border-radius:13px; padding:8px 13px 8px 8px; line-height:1.42; }
  .hero-left .pill .tag { margin-top:1px; }
}
/* «Главная — Войти в личный кабинет» над заголовком (макет ТЗ, CMR-62):
   мелкая строка-крошка, вторая часть — ссылка входа. */
.hero-crumb { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin:0 0 18px; color:#9eafa7; font-size:13px; letter-spacing:.01em; }
.hero-crumb-sep { color:rgba(221,179,109,.6); }
.hero-crumb a { color:#e6c78f; font-weight:600; text-decoration:underline; text-decoration-color:rgba(221,179,109,.45); text-underline-offset:3px; }
.hero-crumb a:hover { color:var(--cream); text-decoration-color:currentColor; }
.hero-left h1 { max-width:720px; margin:0 0 23px; color:var(--cream); font-size:clamp(45px,6.4vw,82px); line-height:.96; font-weight:600; letter-spacing:-.055em; text-wrap:balance; }
.hero-left h1 .accent { display:block; margin-left:clamp(0px,6vw,72px); color:#d8aa61; font-style:italic; font-weight:500; }
.hero-left p.lead { max-width:590px; margin:0 0 31px; color:#bdc9c3; font-size:17px; line-height:1.66; }
.hero-cta { display:flex; flex-wrap:wrap; gap:12px; }
.hero-cta .btn svg, .cta-inner .btn svg { transition:transform var(--dur) var(--ease); }
.hero-cta .btn.brass:hover svg, .cta-inner .btn:hover svg { transform:translateX(3px); }
/* Гибкая строка, а не жёсткие три колонки: показателей может быть два, и в сетке
   третья колонка оставалась зияющей пустотой справа. */
.hero-stats { display:grid; grid-template-columns:repeat(3,minmax(0,auto)); justify-content:start; gap:18px 44px; margin-top:43px; padding-top:27px; border-top:1px solid rgba(255,250,240,.13); }
.hero-stats .s { position:relative; min-width:0; max-width:210px; }
/* Тонкий латунный разделитель между ячейками (в середине зазора): три цифры без
   вертикальных линий стояли в пустом тёмном поле и почти не читались как блок. */
.hero-stats .s + .s::before { content:''; position:absolute; left:-22px; top:3px; bottom:3px; width:1px; background:linear-gradient(rgba(214,170,97,.4),rgba(214,170,97,.06)); }
.hero-stats .s .n { color:var(--cream); font-family:var(--display); font-size:34px; font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
/* Две строки под подпись всегда: живые счётчики подменяют цифры компании
   после загрузки, и первый экран не должен при этом дёргаться. */
.hero-stats .s .l { min-height:2.7em; margin-top:1px; color:#91a39b; font-size:12.5px; line-height:1.35; }
.auth-card { position:relative; padding:30px; color:var(--ink); background:var(--cream); border:1px solid rgba(216,170,97,.6); border-radius:4px 22px 4px 22px; box-shadow:18px 18px 0 rgba(6,20,16,.34),var(--sh-lg); }
.auth-card::before { content:'Кабинет DistLife'; position:absolute; top:-12px; right:22px; padding:3px 9px; background:#d5a85c; color:var(--ink); font-size:9.5px; font-weight:700; letter-spacing:.13em; }
.auth-card h3 { margin:0 0 12px; color:var(--muted); font-family:var(--font); font-size:12px; font-weight:650; letter-spacing:.03em; }
/* Плашка над формой входа: инцидент, истёкшая сессия. */
.auth-card .auth-notice { margin:0 0 14px; text-align:left; }
.auth-card .input,.auth-card .select { background:#fffdf7; }
.social-row { display:flex; gap:9px; margin-bottom:16px; }
.social-btn { min-height:44px; flex:1; display:flex; align-items:center; justify-content:center; gap:8px; padding:9px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink-2); font-size:12.5px; font-weight:650; cursor:pointer; transition:transform .15s,border-color .15s,background .15s; }
.social-btn:hover { transform:translateY(-1px); border-color:#a9987c; background:#f7f1e6; }
.social-btn:disabled { opacity:.55; cursor:wait; transform:none; }
.social-btn svg { width:20px; height:20px; }
.divider { display:flex; align-items:center; gap:11px; margin:5px 0 15px; color:var(--faint); font-size:11.5px; }
.divider::before,.divider::after { content:''; height:1px; flex:1; background:var(--line); }
.tabs { display:flex; margin-bottom:20px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--tabs-bg); box-shadow:var(--well); }
.tabs button { min-height:38px; flex:1; padding:8px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:13.5px; font-weight:650; cursor:pointer; transition:background var(--dur),color var(--dur),transform var(--dur-fast) var(--ease); }
.tabs button:active { transform:scale(.97); }
.tabs button.active { background:var(--surface); color:var(--primary); box-shadow:0 2px 8px rgba(23,35,31,.08); }
.auth-switch { margin-top:12px; color:var(--muted); text-align:center; font-size:12px; overflow-wrap:anywhere; }
.policy { margin-top:16px; padding-top:14px; border-top:1px solid var(--line-2); color:var(--muted); text-align:center; font-size:11.5px; }
.policy-copy { color:var(--ink-2); font-size:14px; line-height:1.62; }

/* Окно входа: поля с ошибкой у поля, роль карточками, пароль с «глазом». */
.auth-heading { margin:0 0 14px; color:var(--ink); font-family:var(--display); font-size:20px; font-weight:650; }
.auth-intro { margin:0 0 16px; color:var(--ink-2); font-size:14px; line-height:1.55; }
/* Код из письма (public/js/code-input.js): одно поле во всю ширину, цифры одной
   ширины и с разрядкой — шесть цифр читаются и сверяются с письмом глазами.
   Классы — свои (email-code-*): .code-input — поле кода из приложения на
   экране «Безопасность», узкое (max-width 220px); здесь его ширину снимаем.
   Селектор с .auth-card — сильнее правила «16px в полях» на телефоне. */
.input.email-code-input, .auth-card .input.email-code-input { font-size:24px; font-weight:650; letter-spacing:.35em; text-align:center; font-variant-numeric:tabular-nums; padding-left:.35em; width:100%; max-width:none; min-width:0; box-sizing:border-box; }
.email-code-input::placeholder { color:var(--faint); letter-spacing:.35em; font-weight:500; }
.input.email-code-input.email-code-input-compact { font-size:18px; max-width:180px; min-height:40px; height:40px; padding-top:6px; padding-bottom:6px; }
.code-intro b { word-break:break-all; }
.code-links { display:flex; flex-wrap:wrap; gap:8px 16px; justify-content:space-between; margin:12px 0 4px; }
.code-links .btn-link[disabled] { opacity:.7; cursor:default; text-decoration:none; }
.code-fix-box { margin-top:12px; }
.code-fix-actions { display:flex; flex-wrap:wrap; gap:8px; }
.code-fix-actions .btn { flex:1 1 auto; }
.code-status { margin:8px 0 0; }
.code-demo { margin:6px 0 0; font-variant-numeric:tabular-nums; }
.code-spam { margin:12px 0 0; }
.code-trust { margin:10px 0 4px; }
.code-trust[hidden] { display:none; }
/* Общий диалог кода подтверждения (dashboard/confirm-code.js): свой слой над
   обычными окнами — удаление аккаунта и реквизиты подтверждаются из окна. */
.modal-bg.confirm-code-bg { z-index:1050; padding:16px; box-sizing:border-box; }
.confirm-code-modal { max-width:440px; }
/* Подпись поля кода — как у полей карточки входа: мелкая, жирная, с отступом,
   чтобы выносные буквы не касались рамки фокуса. */
.confirm-code-modal .code-field > label { display:block; margin-bottom:7px; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.confirm-code-summary { margin:0 0 8px; font-weight:650; color:var(--ink); overflow-wrap:anywhere; }
.confirm-code-intro { margin:0 0 12px; overflow-wrap:anywhere; }
.verify-code { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.verify-code .field { margin:0; }
.verify-code .field-error { margin-top:2px; }
/* Причина, по которой человек видит форму входа («сессия завершена»): тост
   лендинг стирает при отрисовке, а эта строка стоит над полями. */
.auth-notice { margin:0 0 14px; padding:10px 12px; border:1px solid var(--blue-line); border-left:3px solid var(--blue); border-radius:8px; background:var(--blue-bg); color:var(--blue-ink); font-size:13px; line-height:1.5; }
.auth-notice.is-error { border-color:var(--red-line); border-left-color:var(--red); background:var(--red-bg); color:var(--red-ink); }
/* Гостевая корзина со страницы вуза ждёт входа (W1-08): строка над вкладками. */
.auth-notice.auth-cart-note { border-color:var(--green-line); border-left-color:var(--green); background:var(--green-bg); color:var(--green-ink); font-weight:600; }
.auth-card .field > label:not(.consent-row), .auth-card .field-label { display:block; margin-bottom:7px; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.field-row { display:flex; align-items:stretch; gap:6px; }
.field-row .input { flex:1; }
.field-error { margin-top:6px; color:var(--red-ink); font-size:12.5px; line-height:1.5; }
.field.has-error .input, .field.has-error .select { border-color:var(--red); box-shadow:0 0 0 3px rgba(182,60,66,.12); }
.pw-eye { width:46px; min-height:46px; flex:none; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--input-line); border-radius:9px; background:var(--surface-2); color:var(--muted); cursor:pointer; transition:border-color .16s,color .16s; }
.pw-eye:hover { border-color:#6f6250; color:var(--ink); }
.pw-eye.is-on { color:var(--primary); border-color:var(--primary); }
.pw-eye svg { width:19px; height:19px; }
.pw-meter { display:flex; align-items:center; gap:10px; margin-top:8px; min-height:16px; }
.pw-bars { display:flex; gap:4px; flex:none; }
.pw-bars span { width:34px; height:5px; border-radius:3px; background:var(--line); transition:background .2s; }
.pw-bars span.on.l1 { background:var(--amber); }
.pw-bars span.on.l2 { background:#3f8a5f; }
.pw-bars span.on.l3 { background:var(--green); }
.pw-meter-label { color:var(--muted); font-size:12px; }
.pw-meter[data-level="1"] .pw-meter-label { color:var(--amber-ink); }
.pw-meter[data-level="2"] .pw-meter-label, .pw-meter[data-level="3"] .pw-meter-label { color:var(--green-ink); }

.role-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.role-card { display:flex; flex-direction:column; gap:3px; min-height:44px; padding:10px 11px; border:1px solid var(--input-line); border-radius:10px; background:var(--surface-2); color:var(--ink-2); text-align:left; cursor:pointer; transition:border-color .16s,background .16s,box-shadow .16s; }
.role-card b { color:var(--ink); font-size:13.5px; }
.role-card span { color:var(--muted); font-size:11.5px; line-height:1.4; }
.role-card:hover { border-color:#6f6250; }
.role-card.is-on { border-color:var(--primary); background:#eef3f0; box-shadow:0 0 0 3px rgba(40,85,72,.12); }
.role-card.is-on b { color:var(--primary); }
/* Пояснение показывается одно — к выбранной роли: три подписи в карточках
   добавляли карточке регистрации лишние полсотни пикселей. */
.role-desc { min-height:1.4em; margin-top:6px; color:var(--muted); font-size:12px; line-height:1.4; }

.login-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-4px 0 14px; }
.check-row { display:inline-flex; align-items:center; gap:8px; color:var(--ink-2); font-size:13px; cursor:pointer; }
.check-row input { margin:0; }
.profile-form .check-row, .telegram-card .check-row { display:flex; align-items:flex-start; margin-top:6px; }
.profile-form .check-row input, .telegram-card .check-row input { margin-top:3px; flex:none; }
.profile-form .check-row .hint, .telegram-card .check-row .hint { display:block; margin-top:2px; }
.auth-link { color:var(--primary); font-size:13px; font-weight:600; }
.auth-switch a { color:var(--primary); font-weight:650; }
.auth-done { display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid var(--green-line); border-radius:10px; background:var(--green-bg); color:var(--green-ink); font-size:13.5px; line-height:1.55; }
.auth-done > span { width:22px; height:22px; flex:none; color:var(--green); }
.auth-done p { margin:6px 0 0; }
.btn.is-busy .btn-text::before { content:''; display:inline-block; width:12px; height:12px; margin-right:8px; vertical-align:-1px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .8s linear infinite; }
@media (prefers-reduced-motion:reduce) { .btn.is-busy .btn-text::before { animation:none; } }

/* Счётчик очереди на пункте меню сотрудника. */
.nav-badge { margin-left:auto; min-width:22px; padding:2px 7px; border-radius:11px; background:rgba(216,170,97,.22); color:#e9c98f; font-size:11.5px; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; }
.nav-badge.is-overdue { background:var(--red); color:#fff; }
/* W2-01: новые сообщения в заказах — синим, чтобы не путать с очередью. */
.nav-badge.is-chat { background:rgba(120,170,255,.24); color:#cfe0ff; }
.queue-tabs { display:inline-flex; margin:0; }
/* «Мои (0)» в одну строку: flex:1 с узкой обёрткой ломал подпись пополам. */
.queue-tabs button { white-space:nowrap; flex:0 0 auto; padding-inline:14px; }
.queue-anchors { margin-bottom:14px; }
/* Чип-навигатор очереди: счётчик — бейдж-кружком. Пустые чипы тихие (аутлайн),
   чипы со счётом > 0 выделены заливкой — зелёной для обычных секций, янтарной для
   срочных, чтобы ряд не читался как десяток одинаковых нулей. */
.queue-anchors .chip { display:inline-flex; align-items:center; gap:7px; }
.queue-anchors .chip .chip-num { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--v100); color:var(--muted); font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.queue-anchors .chip.chip-count { border-color:transparent; background:var(--green-bg); color:var(--green-ink); }
.queue-anchors .chip.chip-count:hover { border-color:var(--green-line); color:var(--green-ink); }
.queue-anchors .chip.chip-count .chip-num { background:var(--green); color:var(--on-green); }
.queue-anchors .chip.chip-alarm { border-color:transparent; background:var(--amber-bg); color:var(--amber-ink); }
.queue-anchors .chip.chip-alarm:hover { border-color:var(--amber-line); color:var(--amber-ink); }
.queue-anchors .chip.chip-alarm .chip-num { background:var(--amber-ink); color:#fff; }
/* Чипы очереди — вкладки (W2-08): выбранная — как активный чип фильтра, её
   счётчик — светлым кружком на заливке; остальные разделы спрятаны. */
.queue-anchors .chip.active, .queue-anchors .chip.active:hover { background:var(--grad); color:#fff; border-color:transparent; }
.queue-anchors .chip.active .chip-num { background:rgba(255,255,255,.22); color:#fff; }
.queue-anchors .chip:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
/* Компактная строка заказа в очереди (W2-08): название · заказчик (ссылка в
   досье) · тип · бюджет · «ждёт N ч» · отметки. Строка целиком открывает
   заказ, поэтому курсор — рука. На компьютере — сетка: название и под ним
   подписи слева, отметки — справа в одну колонку, поэтому подписи у всех
   строк начинаются с одного края; на телефоне всё — друг под другом. */
.queue-rows { display:flex; flex-direction:column; gap:6px; }
.queue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:'title badges' 'meta badges'; align-items:center; gap:2px 12px; min-width:0; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); cursor:pointer; transition:border-color .15s; }
.queue-row:hover { border-color:var(--hover-line); }
.queue-row.is-overdue { border-color:var(--red-line); background:var(--surface); }
.queue-row .qr-title { grid-area:title; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--ink); text-decoration:none; }
.queue-row .qr-title:hover { color:var(--primary); }
.queue-row .qr-meta { grid-area:meta; display:flex; flex-wrap:wrap; align-items:baseline; gap:0 4px; min-width:0; color:var(--muted); }
/* Точка-разделитель — inline-block: иначе она наследует подчёркивание ссылки
   на заказчика и читается как часть имени. */
.queue-row .qr-meta > *:not(:last-child)::after { content:'·'; display:inline-block; margin-left:4px; color:var(--muted); text-decoration:none; }
.queue-row .qr-client { color:var(--ink-2); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.queue-row a.qr-client:hover { color:var(--primary); }
.queue-row .qr-money { white-space:nowrap; font-variant-numeric:tabular-nums; }
.queue-row .qr-badges { grid-area:badges; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:4px; max-width:min(460px, 48vw); }
.queue-row .qr-badges:empty { display:none; }
@media (max-width:640px) {
  .queue-row { grid-template-columns:minmax(0,1fr); grid-template-areas:'title' 'meta' 'badges'; gap:4px; padding:9px 12px; }
  .queue-row .qr-title { white-space:normal; }
  .queue-row .qr-badges { justify-content:flex-start; max-width:none; }
}
.queue-empty { display:flex; align-items:center; gap:8px; padding:6px 0; font-size:13.5px; }
.queue-empty svg { width:16px; height:16px; color:var(--green); }
/* Пустая секция очереди: до восьми полновесных карточек «здесь ничего нет» шли
   подряд и съедали экран, хотя несли одно сообщение. Теперь такая секция —
   тихая плоская строка: заголовок и «всё чисто» в один ряд, без тени и
   декоративной черты; соседние пустые строки жмутся вплотную и читаются как
   единый спокойный блок «по этим порогам порядок». */
.card.queue-card-empty { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px var(--s-4); padding:var(--s-3) var(--s-4); background:var(--surface-3); box-shadow:var(--sh-xs); }
.card.queue-card-empty > .card-title { margin:0; font-size:14px; color:var(--ink-2); }
.card.queue-card-empty > .card-title::after { display:none; }
/* Часть секций (поддержка, SLA) заворачивают «всё чисто» во внутренние div —
   расплющиваем их, чтобы заметка была прямым участником flex и вставала так же
   у правого края, как в остальных строках. Свёрнутые подсекции (queue-sub) при
   этом остаются спрятанными правилом ниже. */
.card.queue-card-empty div:not(.queue-sub) { display:contents; }
.card.queue-card-empty .queue-empty { padding:0; margin-left:auto; color:var(--muted); font-size:13px; }
.card.queue-card-empty .queue-empty svg { width:14px; height:14px; }
.card.queue-card-empty .queue-sub { display:none; }
.card.queue-card-empty + .card.queue-card-empty { margin-top:var(--s-2); }
@media (max-width:560px) {
  .card.queue-card-empty { gap:2px var(--s-2); padding:11px 14px; }
  .card.queue-card-empty .queue-empty { margin-left:0; flex-basis:100%; }
}
.queue-sub + .queue-sub { margin-top:16px; }
.queue-sub-title { display:flex; align-items:center; gap:6px; margin:0 0 10px; font-family:var(--font); font-size:13px; font-weight:650; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
.queue-sub-title svg { width:14px; height:14px; color:var(--amber); }
/* Диалоги, ждущие ответа сотрудника: строка на канал. */
.awaiting-list { display:flex; flex-direction:column; gap:6px; }
.awaiting-row { display:flex; align-items:center; gap:10px; min-width:0; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--ink); text-decoration:none; transition:border-color .15s; }
.awaiting-row:hover { border-color:var(--hover-line); color:var(--ink); }
.awaiting-row .aw-title { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.awaiting-row .aw-meta { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.awaiting-row .badge { flex:none; }
/* Начало последней реплики участника (W1-06) — своей строкой, не длиннее двух. */
.awaiting-row.has-msg { flex-wrap:wrap; row-gap:4px; }
.awaiting-row .aw-msg { flex:1 0 100%; order:5; min-width:0; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.4; color:var(--ink-2); overflow-wrap:anywhere; }
.awaiting-row .aw-msg.text-muted { color:var(--muted); }
/* Полоса очереди модерации в шапке карточки заказа (W1-05). */
.queue-nav { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin:-10px 0 16px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.queue-nav[hidden] { display:none; }
.queue-nav-back { font-weight:600; }
.queue-nav-next { margin-left:auto; }
@media (max-width:560px) {
  .queue-nav-next { margin-left:0; flex:1 0 100%; justify-content:center; }
}
/* Обращения в поддержку: та же строка, но кнопка (открывает тред на месте),
   и активная подсвечена латунью. Двухколоночная раскладка — список слева,
   диалог справа; на узком экране колонки складываются. */
.support-row { width:100%; font:inherit; text-align:left; cursor:pointer; }
.support-row.active { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
/* В узкой колонке списка строка переносится: бейдж и начало вопроса (до двух
   строк), ниже — кто и по какому заказу. Иначе от вопроса оставалось три слова. */
.support-list .support-row { flex-wrap:wrap; row-gap:4px; }
.support-list .support-row .aw-title { flex:1 1 60%; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.35; }
.support-list .support-row .aw-meta { flex:1 0 100%; white-space:normal; }
.support-layout { display:grid; grid-template-columns:minmax(260px,2fr) minmax(0,3fr); gap:16px; align-items:start; }
.support-layout .support-list { min-width:0; }
.support-layout .support-detail { min-width:0; position:sticky; top:12px; }
.support-detail .chat { height:420px; }
.card-title .icon-btn.support-back { display:none; width:36px; height:36px; }
.support-back svg { transform:rotate(180deg); }
.support-actions { justify-content:flex-end; }
.support-meta { line-height:1.7; overflow-wrap:anywhere; }
.support-templates { margin:0 0 8px; }
.support-order-link { text-decoration:underline; text-underline-offset:2px; font-weight:600; }
.support-templates .chip { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.support-detail .card-title, .support-card .card-title { flex-wrap:wrap; row-gap:8px; }
/* «Вопросы» (волна 3): частые вопросы над формой — светлый вариант аккордеона
   сайта; «Помог ли ответ? Да / Нет» под ответом сотрудника. */
.support-faq-list { display:flex; flex-direction:column; }
/* Селекторы с .support-faq — чтобы перебить тёмный аккордеон лендинга
   (.faq-item summary { color:var(--cream) } стоит в файле ниже). */
.support-faq .support-faq-item { border-bottom:1px solid var(--line); }
.support-faq .support-faq-item:last-child { border-bottom:0; }
.support-faq .support-faq-item summary { min-height:48px; padding:12px 4px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; color:var(--ink); font-family:var(--display); font-size:15px; font-weight:600; cursor:pointer; border-radius:8px; }
.support-faq .support-faq-item summary::-webkit-details-marker { display:none; }
.support-faq .support-faq-item summary:hover { color:var(--primary); background:rgba(23,35,31,.03); }
.support-faq .support-faq-item summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.support-faq .support-faq-item .faq-x { width:18px; height:18px; flex:none; color:var(--accent-2); transition:transform .2s; }
.support-faq .support-faq-item[open] .faq-x { transform:rotate(180deg); }
.support-faq .support-faq-item p { margin:0; padding:0 4px 14px; color:var(--muted); font-size:14px; line-height:1.6; }
.support-thread-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:min(60vw,420px); }
.support-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.support-feedback-q { font-weight:600; margin-right:4px; }
.support-feedback-note { margin:0 0 12px; }
@media (max-width:1000px) {
  .support-layout { grid-template-columns:1fr; }
  .support-layout .support-detail { position:static; }
  /* Открытый тред занимает экран целиком, список прячется — назад ведёт стрелка. */
  .support-layout.has-detail .support-list { display:none; }
  .card-title .icon-btn.support-back { display:flex; }
  .support-detail .card-title .ct-action, .support-card .card-title .ct-action { flex:1 0 100%; margin-left:0; }
  .support-actions { justify-content:flex-start; }
  /* Шаблоны — одной прокручиваемой строкой: четыре ряда чипов съедали ленту. */
  .filter-chips.support-templates { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
  .filter-chips.support-templates .chip { flex:none; }
}
/* Обращения гостей и «Помощник» в очереди сотрудника и в «Вопросах» (ТЗ 28.10.2026). */
.msg.bot { background:var(--accent-soft); color:var(--ink); border-color:transparent; }
.msg.bot .m-who { color:var(--accent-2); }
.support-helper-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.support-helper-links a { display:block; margin-top:4px; font-weight:600; }
.support-guest-card { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); font-size:13px; line-height:1.45; }
.support-guest-card dt { color:var(--muted); }
.support-guest-card dd { margin:0; overflow-wrap:anywhere; }
/* Каналы обращений (ТЗ 28.10.2026, src/channels/): значок канала в очереди и
   фильтр по каналу. Цвета — из общих токенов, тёмная тема подхватывает сама. */
.badge.channel { border-color:currentColor; border-color:color-mix(in srgb,currentColor 25%,transparent); }
.badge.ch-telegram { background:var(--blue-bg); color:var(--blue-ink); }
.badge.ch-vk { background:var(--badge-violet-bg); color:var(--badge-violet-ink); }
.badge.ch-max { background:var(--green-bg); color:var(--green-ink); }
/* Шапка открытого обращения: имя и значки («ждёт ответа», «гость», канал)
   переносятся на узком экране — одной строкой они выталкивали страницу вбок. */
.support-detail .card-title .ct-head, .support-card .card-title .ct-head { flex-wrap:wrap; row-gap:6px; overflow-wrap:anywhere; }
.ch-dot { display:inline-block; width:8px; height:8px; margin-right:6px; border-radius:50%; background:var(--badge-gray-ink); vertical-align:1px; }
.ch-dot.ch-telegram { background:var(--blue); }
.ch-dot.ch-vk { background:var(--badge-violet-ink); }
.ch-dot.ch-max { background:var(--green); }
.support-channel-filter { margin-top:-4px; }
.support-delivery-error { margin-right:8px; overflow-wrap:anywhere; }
/* Инструменты сотрудника в обращении (ТЗ 28.10.2026, dashboard/support-tools.js):
   скидка, напоминание, итог, заказ за заказчика; «ведут сейчас»; отчёт. */
.support-tools-wrap { margin:0 0 12px; }
.support-new-hint { margin:0 0 10px; }
.support-tools { display:flex; flex-wrap:wrap; gap:6px; }
.support-tools-note { margin:6px 0 0; line-height:1.5; }
.support-load { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin:0 0 10px; font-size:13px; }
.support-load-title { font-weight:600; color:var(--ink-2); }
.support-load-item { display:inline-flex; align-items:center; gap:5px; }
.support-load-item .dot { width:7px; height:7px; border-radius:50%; background:var(--green); }
.support-load-item.is-away { color:var(--muted); }
.support-load-item.is-away .dot { background:var(--amber-ink); }
.support-outcome-options { display:flex; flex-direction:column; gap:6px; margin:0 0 10px; }
.support-outcome-item { align-items:flex-start; }
.support-stars { display:inline-flex; align-items:center; gap:2px; margin-left:auto; }
.support-stars-q { margin-right:4px; font-size:13px; }
.support-star { width:32px; height:32px; padding:0; border:0; border-radius:8px; background:transparent; color:#b3aa98; font-size:20px; line-height:1; cursor:pointer; }
.support-star.is-on { color:var(--accent-2); }
.support-star:hover { background:var(--surface-3); }
.support-star:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; }
.support-report-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin:0 0 14px; }
.support-report-tile { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.support-report-tile b { font:700 20px/1.2 var(--display); color:var(--ink); }
.support-report-tile span { color:var(--muted); font-size:12.5px; }
.support-report-table table.data td { white-space:nowrap; }
/* Имя сотрудника — заголовок строки (th scope=row), но выглядит как ячейка. */
.support-report-table table.data tbody th { padding:15px 17px; border-bottom:1px solid var(--line-2); background:transparent; color:var(--ink); font-size:13.5px; font-weight:600; letter-spacing:0; text-transform:none; white-space:nowrap; }
.support-report-table table.data tbody tr:last-child th { border-bottom:0; }
@media (max-width:640px) {
  .support-stars { margin-left:0; flex:1 0 100%; }
}

/* ── Окно «Задать вопрос» (public/js/contact-widget.js): кнопка внизу справа на
   публичных страницах и в кабинете. Ниже модалок (1000) и меню (50–70): окно не
   перекрывает диалоги и выезжающее меню кабинета. ── */
.cw-launcher { position:fixed; z-index:45; right:max(20px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:0 20px 0 16px; border:0; border-radius:999px; background:var(--primary); color:var(--on-primary); font:600 15px/1 var(--font); box-shadow:var(--sh-lg); cursor:pointer; transition:background var(--dur,.18s) ease, transform var(--dur,.18s) ease; }
.cw-launcher:hover { background:var(--primary-600); transform:translateY(-1px); }
.cw-launcher:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.cw-launcher[hidden] { display:none; }
/* На тёмных страницах витрины — латунью, как главная кнопка: тёмно-зелёная тонула в фоне. */
body.is-landing .cw-launcher { background:var(--accent); color:var(--ink); }
body.is-landing .cw-launcher:hover { background:#cf9853; }
body.is-landing .cw-launcher:focus-visible { outline-color:var(--cream); }
.cw-launcher-ico { display:inline-flex; width:20px; height:20px; }
.cw-badge { position:absolute; top:-6px; right:-4px; min-width:22px; height:22px; padding:0 6px; border:2px solid var(--surface); border-radius:11px; background:var(--red); color:#fff; font-size:12px; line-height:18px; text-align:center; }
.cw-badge[hidden] { display:none; }
.cw-panel { position:fixed; z-index:46; right:max(20px,env(safe-area-inset-right)); bottom:calc(max(20px,env(safe-area-inset-bottom)) + 60px); width:min(390px,calc(100vw - 40px)); height:min(620px,calc(100vh - 110px)); display:flex; flex-direction:column; border:1px solid var(--line); border-radius:4px 18px 18px 18px; background:var(--surface); color:var(--ink); box-shadow:var(--sh-lg); overflow:hidden; font-family:var(--font); }
/* Лендинг тёмный, а окно на нём — светлая карточка: поля формы тоже светлые. */
body.is-landing .cw-panel { color-scheme:light; }
.cw-panel[hidden] { display:none; }
.cw-head { display:flex; align-items:flex-start; gap:10px; padding:14px 12px 12px 16px; background:var(--grad); color:var(--on-primary); }
.cw-title { margin:0; font:700 18px/1.25 var(--display); color:inherit; }
.cw-sub { margin:4px 0 0; font-size:13px; line-height:1.4; opacity:.9; }
.cw-close { flex:none; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; margin-left:auto; padding:10px; border:0; border-radius:10px; background:transparent; color:inherit; cursor:pointer; }
.cw-close:hover { background:rgba(255,255,255,.14); }
.cw-close:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.cw-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:10px; padding:14px; background:var(--panel); }
.cw-msg { max-width:90%; padding:9px 12px; border-radius:14px; font-size:14px; line-height:1.45; overflow-wrap:anywhere; }
.cw-msg .cw-text { white-space:pre-wrap; }
.cw-msg.guest { align-self:flex-end; background:var(--primary); color:var(--on-primary); border-bottom-right-radius:4px; }
.cw-msg.staff { align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-bottom-left-radius:4px; }
.cw-msg.bot { align-self:flex-start; background:var(--accent-soft); color:var(--ink); border-bottom-left-radius:4px; }
.cw-who { display:block; margin-bottom:3px; font-size:12px; font-weight:600; opacity:.82; }
.cw-hidden { font-style:italic; opacity:.8; }
.cw-links a { display:block; margin-top:6px; color:var(--primary); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.cw-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.cw-chip { min-height:36px; padding:7px 12px; border:1px solid var(--primary); border-radius:999px; background:var(--surface); color:var(--primary); font:600 13px/1.2 var(--font); cursor:pointer; }
.cw-chip:hover { background:var(--primary); color:var(--on-primary); }
.cw-chip:focus-visible, .cw-send:focus-visible, .cw-link:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.cw-note { margin:0; color:var(--muted); font-size:12.5px; line-height:1.45; text-align:center; }
/* Оценка ответа сотрудника гостем (ТЗ 28.10.2026): звёзды под перепиской. */
.cw-rate { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:2px; margin:0; color:var(--muted); font-size:12.5px; }
.cw-rate-q { margin-right:4px; }
.cw-star { width:34px; height:34px; padding:0; border:0; border-radius:8px; background:transparent; color:#b3aa98; font-size:20px; line-height:1; cursor:pointer; }
.cw-star.is-on { color:var(--accent-2); }
.cw-star:hover { background:var(--surface-3); }
.cw-star:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; }
.cw-error { margin:0; padding:8px 14px; background:var(--red-bg); color:var(--red-ink); font-size:13px; line-height:1.4; }
.cw-error[hidden] { display:none; }
.cw-footer { flex:none; border-top:1px solid var(--line); background:var(--surface); }
.cw-form { display:flex; flex-direction:column; gap:6px; max-height:60vh; overflow-y:auto; padding:12px 14px 14px; }
.cw-label { font-size:12.5px; font-weight:600; color:var(--ink-2); }
.cw-input { width:100%; min-height:40px; padding:8px 10px; border:1px solid var(--input-line); border-radius:10px; background:var(--surface-2); color:var(--ink); font:14px/1.4 var(--font); }
.cw-input:focus { outline:2px solid var(--accent); outline-offset:0; border-color:transparent; }
.cw-textarea { resize:vertical; min-height:64px; max-height:200px; }
.cw-row { display:flex; gap:8px; }
.cw-col { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:4px; }
.cw-hint { margin:0; color:var(--muted); font-size:12px; line-height:1.4; }
.cw-consent { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; line-height:1.4; color:var(--ink-2); cursor:pointer; }
.cw-consent input { flex:none; width:18px; height:18px; margin:1px 0 0; accent-color:var(--primary); }
.cw-consent a { color:var(--primary); text-decoration:underline; }
.cw-captcha { min-height:102px; }
.cw-captcha[hidden] { display:none; }
.cw-form-end { display:flex; justify-content:flex-end; }
.cw-send { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:0 18px; border:0; border-radius:10px; background:var(--primary); color:var(--on-primary); font:600 14px/1 var(--font); cursor:pointer; }
.cw-send:hover { background:var(--primary-600); }
.cw-send[disabled] { opacity:.6; cursor:progress; }
.cw-send-icon { flex:none; width:44px; padding:0; }
.cw-send-icon svg { width:20px; height:20px; }
.cw-compose { display:flex; align-items:flex-end; gap:8px; }
.cw-compose .cw-input { flex:1 1 auto; }
.cw-compose .cw-textarea { min-height:44px; }
.cw-price { display:flex; flex-direction:column; gap:4px; padding-bottom:6px; border-bottom:1px dashed var(--line); margin-bottom:4px; }
.cw-link { align-self:center; padding:4px 6px; border:0; background:none; color:var(--muted); font:12.5px/1.3 var(--font); text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.cw-link:hover { color:var(--ink); }
.cw-form-closed { align-items:center; }
/* ИИ-помощник (этап 2): «Позвать сотрудника» рядом с «Вопрос решён», заметка
   о модели до первого вопроса и «Готовлю ответ…», пока ИИ думает. */
.cw-links-row { display:flex; flex-wrap:wrap; justify-content:center; gap:2px 10px; }
.cw-link-staff { color:var(--primary); font-weight:600; }
.cw-ai-note { text-align:left; }
.cw-typing { display:flex; flex-direction:column; }
.cw-typing-text { display:inline-flex; align-items:center; gap:6px; font-style:italic; opacity:.85; }
.cw-dots { display:inline-flex; gap:3px; }
.cw-dots i { width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.35; animation:cw-dot 1.2s infinite ease-in-out; }
.cw-dots i:nth-child(2) { animation-delay:.2s; }
.cw-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes cw-dot { 0%, 80%, 100% { opacity:.25; } 40% { opacity:.9; } }
.cw-hint-bubble { position:fixed; z-index:46; right:max(20px,env(safe-area-inset-right)); bottom:calc(max(20px,env(safe-area-inset-bottom)) + 60px); max-width:min(300px,calc(100vw - 40px)); padding:10px 14px; border-radius:12px; background:var(--ink); color:var(--surface); font-size:13.5px; line-height:1.4; box-shadow:var(--sh-lg); }
/* В кабинете у страницы бывает своя закреплённая внизу панель действий
   (корзина, итог оплаты, действие заказа на телефоне): кнопка «Задать вопрос»
   легла бы на её правую кнопку. Там она прячется — «Вопросы» есть в меню. */
body:has(.cart-bar, .cart-summary, .sticky-action:not([hidden]), .settings-sticky) .cw-launcher[data-mode="user"] { display:none; }
/* Телефон: кнопка компактнее, окно — нижним листом во всю ширину. */
@media (max-width:560px) {
  .cw-launcher { right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); min-height:46px; padding:0 16px 0 13px; font-size:14px; }
  .cw-panel { right:0; left:0; bottom:0; width:100%; height:min(92vh,100%); height:min(92dvh,100%); border-radius:18px 18px 0 0; border-width:1px 0 0; }
  .cw-row { flex-direction:column; }
  .cw-msg { max-width:94%; }
  .cw-hint-bubble { right:12px; bottom:70px; }
}
@media (prefers-reduced-motion:reduce) { .cw-launcher { transition:none; } .cw-launcher:hover { transform:none; } .cw-dots i { animation:none; opacity:.6; } }
/* На телефоне строка переносится: название — своей строкой, подписи — под ним. */
@media (max-width:640px) {
  .awaiting-row { flex-wrap:wrap; gap:6px 10px; }
  .awaiting-row .aw-title { flex-basis:100%; order:-1; white-space:normal; }
  .awaiting-row .aw-meta { flex:1 1 auto; }
}
/* Предупреждения о почте и диске на главной администратора. */
.home-warnings { display:flex; flex-direction:column; gap:8px; }
.home-warnings .alert { margin:0; }
/* «Дела на сегодня» сотрудника (W2-09): те же строки, что «Что сделать сейчас»
   у заказчика; заголовок строки («Споры (арбитраж) — 3») не режется. */
.staff-todo .att-body b { white-space:normal; }
.staff-todo .queue-empty { padding:0; }
/* На телефоне строка дела — без иконки, «Открыть» справа на той же строке:
   кнопка под текстом делала каждую строку в полтора раза выше. */
@media (max-width:560px) {
  .staff-todo .att-item { flex-wrap:nowrap; padding:10px 10px 10px 12px; }
  .staff-todo .att-ico { display:none; }
  .staff-todo .att-body { flex:1 1 auto; }
  .staff-todo .att-item .btn { margin-left:0; padding:8px 12px; }
}
/* Карточка «Прайс» на главной сотрудника (W1-03): строка на вуз. */
.home-price-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.home-price-row { line-height:1.5; overflow-wrap:anywhere; }
/* Отчёт «Авторы»: воронка горизонтальными полосами. */
.funnel { display:flex; flex-direction:column; gap:10px; }
.funnel-row { display:grid; grid-template-columns:minmax(150px,220px) minmax(0,1fr) minmax(110px,auto); align-items:center; gap:12px; }
.funnel-label { display:flex; flex-direction:column; gap:2px; min-width:0; }
.funnel-conv { color:var(--muted); font-size:12px; }
.funnel-conv.is-worst { color:var(--red-ink); font-weight:650; }
.funnel-bar-wrap { position:relative; display:flex; align-items:center; gap:10px; min-width:0; height:26px; }
.funnel-bar { height:100%; min-width:4px; border-radius:3px 8px 8px 3px; background:var(--grad); transition:width .3s; }
.funnel-n { font-family:var(--display); font-size:18px; font-weight:650; font-variant-numeric:tabular-nums; }
.funnel-stuck { font-size:13px; white-space:nowrap; text-align:right; }
.report-details > summary { cursor:pointer; list-style:none; }
.report-details > summary::-webkit-details-marker { display:none; }
.report-details > summary::before { content:'▸'; display:inline-block; width:14px; margin-right:4px; color:var(--muted); transition:transform .15s; }
.report-details[open] > summary::before { transform:rotate(90deg); }
.coverage-grid .st-n { font-size:24px; }
.coverage-authors { display:flex; flex-wrap:wrap; gap:4px; }
@media (max-width:640px) {
  .funnel-row { grid-template-columns:1fr; gap:4px; }
  .funnel-stuck { text-align:left; }
  .stat-grid.coverage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Расчёты посредника с клиентом. */
/* Две колонки в модальном окне: правило .stat-grid ниже по файлу перебивало
   бы одиночный класс, поэтому селектор — составной. */
.stat-grid.receipts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:12px; }
/* Третья плитка — удержанная до приёмки предоплата — появляется только при резерве. */
.stat-grid.receipts-grid.receipts-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.stat-grid.receipts-grid .stat { padding:12px 14px; }
.stat-grid.receipts-grid .st-n { font-size:20px; }
.stat-grid.receipts-grid .t-warn { color:var(--amber-ink); }
.receipt-list { display:flex; flex-direction:column; gap:6px; margin-top:12px; max-height:260px; overflow:auto; }
.receipt { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--line-2); border-radius:8px; font-size:13.5px; }
/* Волна 3 кабинетов (pay-many): строки «К оплате» с галочкой, панель
   «Оплатить выбранные · сумма» под списком и окно «Записать поступления от
   клиентов» со строкой на заказ. На телефоне сумма и кнопка уходят под
   название — строка не расползается за экран. */
.receipt.pay-select-row { align-items:flex-start; flex-wrap:wrap; }
.pay-select-main { display:flex; align-items:flex-start; gap:8px; min-width:0; flex:1 1 240px; }
.pay-select-text { min-width:0; }
.pay-select-main .pay-select { flex-shrink:0; margin-top:3px; width:18px; height:18px; accent-color:var(--primary); }
.pay-select-sum { flex-wrap:wrap; justify-content:flex-end; margin-left:auto; }
.pay-select-blocked { margin-top:2px; color:var(--amber-ink); }
.pay-select-bar { display:flex; align-items:center; justify-content:space-between; gap:10px 16px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px solid var(--line-2); }
.pay-select-note { min-width:0; flex:1 1 220px; }
.pay-group-lines .quote-line span { min-width:0; overflow-wrap:anywhere; }
.pay-group-lines .quote-line b { flex-shrink:0; white-space:nowrap; }
.receipt-batch { display:flex; flex-direction:column; gap:8px; margin-top:8px; max-height:50vh; overflow:auto; }
.receipt-batch-row { display:grid; grid-template-columns:auto minmax(0,1fr) 120px; align-items:center; gap:8px 10px; padding:8px 10px; border:1px solid var(--line-2); border-radius:8px; font-size:13.5px; cursor:pointer; }
.receipt-batch-row input[type="checkbox"] { width:18px; height:18px; accent-color:var(--primary); }
.receipt-batch-row .input { padding:5px 8px; font-size:13px; }
.receipt-batch-text { min-width:0; overflow-wrap:anywhere; }
.receipt-batch-row.is-skipped { opacity:.6; }
.receipt-batch-row.is-done { border-color:var(--green); opacity:.7; }
@media (max-width:560px) {
  .receipt-batch-row { grid-template-columns:auto minmax(0,1fr); }
  .receipt-batch-row .input { grid-column:2; width:140px; }
  .pay-select-bar > .flex { width:100%; justify-content:space-between; }
}
/* W1-17: «Оплаты». Четыре плитки (с «Возвращено всего») в ряд на широком
   экране и две колонки на телефоне; суммы не переносятся (класс stat-money,
   правило S16 ниже по файлу). */
.stat-grid.receipts-grid.receipts-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:560px) {
  .stat-grid.receipts-grid.receipts-grid-3, .stat-grid.receipts-grid.receipts-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stat-grid.receipts-grid .st-n { font-size:18px; }
}
/* Строка возврата под статусом: «Возвращено 800 ₽ · 2 окт». */
.pay-refund { margin-top:4px; color:var(--amber-ink); white-space:nowrap; }
/* Оплаты на телефоне — карточки вместо таблицы в семь колонок (W1-17):
   заказ, сумма, статус, дата, клиент, возврат и кнопка подтверждения. */
.pay-cards { display:flex; flex-direction:column; gap:10px; }
.pay-card { display:flex; flex-direction:column; gap:6px; min-width:0; padding:12px 14px; border:1px solid var(--line-2); border-radius:12px; background:var(--card-glass); }
.pay-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.pay-card-title { min-width:0; overflow-wrap:anywhere; }
.pay-card-head .money { flex-shrink:0; font-size:16px; }
.pay-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.pay-filters .row { margin-bottom:8px; }
/* «Мои клиенты»: отметка «у N заказов нет цены для клиента» (W1-18). */
.client-no-price { display:inline-flex; align-items:center; gap:4px; margin-top:4px; color:var(--amber-ink); }
.client-no-price svg { width:14px; height:14px; }
/* Цена сервиса → цена для клиента: по строке на заказ в «Расчётах». */
.order-money-list { display:flex; flex-direction:column; gap:6px; margin-top:12px; max-height:220px; overflow:auto; }
.order-money { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:6px 10px; border:1px solid var(--line-2); border-radius:8px; font-size:13px; }
.order-money .input { width:110px; padding:5px 8px; font-size:13px; }
/* Ссылка «Подборки для студента» (прайс сотрудника, W2-07) — мелким кеглем на
   компьютере; стоит выше правила 16px, чтобы на телефоне оно победило. */
.price-ids-link .input { font-size:13px; }
/* iOS Safari приближает страницу, когда фокус попадает в поле с кеглем мельче
   16px, и после ввода человек остаётся в увеличенном масштабе с горизонтальной
   прокруткой. На телефонах и планшетах (≤900px) все поля — не мельче 16px.
   Правило стоит после .order-money .input намеренно: при равной силе
   селекторов побеждает то, что ниже. Крупное поле кода (.code-input, 22px)
   не трогаем. */
@media (max-width:900px) {
  .input:not(.code-input), .textarea, .select { font-size:16px; }
}
.order-money .t-title { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Клиенты на телефоне — карточки вместо таблицы в семь колонок. */
.client-cards { display:flex; flex-direction:column; gap:10px; }
.client-card { display:flex; flex-direction:column; gap:4px; width:100%; padding:12px 14px; border:1px solid var(--line-2); border-radius:12px; background:var(--card-glass); color:inherit; text-align:left; font:inherit; cursor:pointer; }
.client-card:hover { border-color:var(--accent-2); }
.client-card.is-archived { opacity:.65; }
.client-card .client-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
/* Справочник клиентов: имя и вуз не сжимаются в столбик ради колонки действий. */
.clients-table td:first-child, .clients-table th:first-child { min-width:200px; }
.clients-table td:last-child > .flex { flex-wrap:nowrap; }
/* Меню «…» на <details>: второстепенные действия строки, без своего JS. */
.more-menu { position:relative; display:inline-block; }
.more-menu > summary { list-style:none; display:inline-flex; justify-content:center; min-width:36px; padding-inline:8px; letter-spacing:1px; cursor:pointer; }
.more-menu > summary::-webkit-details-marker { display:none; }
.more-menu[open] > summary { background:var(--item-hover); }
.more-menu-list { position:absolute; right:0; top:calc(100% + 4px); z-index:20; min-width:190px; padding:6px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.12); display:flex; flex-direction:column; }
.more-menu-item { display:block; width:100%; padding:8px 10px; border:0; border-radius:7px; background:none; color:inherit; font:inherit; font-size:13.5px; text-align:left; text-decoration:none; cursor:pointer; }
.more-menu-item:hover, .more-menu-item:focus-visible { background:var(--item-hover); outline:none; }
.more-menu-item.danger { color:var(--red-ink); }

/* Реквизиты выплат. На странице баланса — рядом с выводом средств, в две
   колонки; карточка реквизитов там теряет ограничение ширины профиля. */
.payout-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.payout-grid > .card { margin:0; max-width:none; }
@media (max-width:900px) { .payout-grid { grid-template-columns:1fr; } }
/* Заявки на выплату автора: сумма и статус, цепочка «подана → одобрена →
   перевод → выплачена», даты и чек. Отказ и сбой — красная точка на шаге. */
.card-subtitle { margin:0 0 8px; font-family:var(--display); font-size:15px; font-weight:600; color:var(--ink); }
.wd-list { display:flex; flex-direction:column; gap:10px; }
.wd-item { padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; }
.wd-chain { display:flex; margin:8px 0 6px; padding:0; list-style:none; }
.wd-step { position:relative; flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; }
.wd-step::before { content:''; position:absolute; top:9px; left:-50%; width:100%; height:2px; background:var(--line); }
.wd-step:first-child::before { display:none; }
.wd-step.done::before, .wd-step.current::before, .wd-step.bad::before { background:var(--green); }
.wd-dot { position:relative; z-index:1; width:18px; height:18px; display:inline-flex; align-items:center; justify-content:center; border:2px solid var(--line); border-radius:50%; background:var(--surface); font-size:10px; font-weight:700; line-height:1; color:transparent; }
.wd-step.done .wd-dot { border-color:var(--green); background:var(--green); color:var(--on-green); }
.wd-step.current .wd-dot { border-color:var(--green); box-shadow:0 0 0 3px var(--green-bg); }
.wd-step.bad .wd-dot { border-color:var(--red); background:var(--red); color:#fff; }
.wd-label { font-size:11.5px; color:var(--muted); text-align:center; }
.wd-step.current .wd-label, .wd-step.done .wd-label { color:var(--ink); }
.wd-step.bad .wd-label { color:var(--red); font-weight:600; }
.wd-receipt { color:var(--ink); }
.wd-receipt a { font-weight:600; }
/* «Когда освободится» (волна ТЗ от 18.09.2026): по какому заказу, сколько,
   когда и почему держим. На широком экране таблица, на телефоне — карточки:
   четыре колонки на 390 px обрезались бы после названия заказа, а главная
   цифра уезжала за край. Сумма списка сходится с «удерживается» — её считает
   сервер (src/protection/index.js), кабинет ничего не пересчитывает. */
.wd-release { margin-top:6px; }
.wd-release > summary { cursor:pointer; font-size:13px; color:var(--muted); }
/* Карточки на любой ширине (W1-07): таблица стояла в половине сетки «Вывод
   средств / Реквизиты», и на 1366 px даты резались до «16», «19». На широком
   экране карточки идут в две колонки, дата — всегда целиком. */
.wd-release-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; margin-top:8px; }
.wd-release-item { padding:8px 10px; border:1px solid var(--line-2); border-radius:10px; min-width:0; }
.wd-release-when { color:var(--ink); font-weight:600; font-size:13px; }
@media (max-width:560px) { .wd-release-list { grid-template-columns:1fr; } }
/* Строка-сверка под историей начислений: «Начислено − выплачено − штрафы = на балансе». */
.payouts-history .wd-sheet { margin-top:10px; overflow-wrap:anywhere; }
.payouts-history .wd-sheet b { color:var(--ink); }
/* «Прочие списания» — с подсказкой (title): пунктир говорит, что слово можно навести. */
.payouts-history .wd-sheet-other { text-decoration:underline dotted; text-underline-offset:2px; cursor:help; }
/* Ограничители вывода под кнопкой «Запросить выплату»: на 390 px строка
   переносится, а не прокручивается вбок. */
.wd-limits { overflow-wrap:anywhere; }
/* Волна 2 кабинетов (W2-06, W2-07). «Данные для чека» у одобренной заявки:
   поле — подпись, значение и «Скопировать»; на 390 px значение переносится,
   кнопка остаётся справа и не уезжает за край. */
.wd-receipt-data { margin:8px 0; padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); color:var(--ink); }
.wd-receipt-data-head { display:flex; flex-wrap:wrap; gap:6px 12px; justify-content:space-between; align-items:center; margin-bottom:6px; }
.wd-copy-list { margin:0; display:flex; flex-direction:column; gap:6px; }
.wd-copy-row { display:grid; grid-template-columns:minmax(120px,34%) minmax(0,1fr); gap:4px 12px; align-items:center; padding:4px 0; border-bottom:1px dashed var(--line-2); }
.wd-copy-row:last-child { border-bottom:0; }
.wd-copy-row dt { font-size:12.5px; color:var(--muted); }
.wd-copy-row dd { margin:0; display:flex; gap:8px; align-items:center; justify-content:space-between; min-width:0; }
.wd-copy-value { font-weight:600; overflow-wrap:anywhere; min-width:0; }
.wd-copy-btn { flex:none; }
.wd-copy-btn.is-done { color:var(--green); border-color:var(--green); }
@media (max-width:560px) { .wd-copy-row { grid-template-columns:1fr; } }
/* Строка «В работе: N ₽ — начислится после приёмки» под плитками. */
.wd-pipeline { margin:-4px 0 12px; overflow-wrap:anywhere; }
.wd-pipeline .mi { width:15px; height:15px; vertical-align:-2px; margin-right:4px; color:var(--accent-2); }
.wd-pipeline b { color:var(--ink); }
/* Старые заявки — свёрнутыми: видно пять последних. */
.wd-older > summary { cursor:pointer; font-size:13px; color:var(--muted); margin-top:10px; }
.wd-older > .wd-list { margin-top:10px; }
/* «Движение по балансу»: отбор, итоги периода и строки со знаком и остатком. */
.balance-tabs { margin-top:14px; }
.ledger-filters { display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; margin-bottom:12px; }
.ledger-filters .select { width:auto; min-width:140px; }
.ledger-actions { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
.ledger-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.ledger-summary > div { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border:1px solid var(--line-2); border-radius:10px; min-width:0; }
.ledger-plus { color:var(--green); }
.ledger-minus { color:var(--ink); }
.ledger-table .ta-right { text-align:right; }
.ledger-table td { vertical-align:top; }
.ledger-cards { display:flex; flex-direction:column; gap:8px; }
.ledger-card { padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; min-width:0; overflow-wrap:anywhere; }
@media (max-width:560px) {
  .ledger-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ledger-filters .select { flex:1 1 45%; min-width:0; }
  .ledger-actions { margin-left:0; width:100%; }
}
/* «О заказчике» у автора: цифры без имени, строки как в расчёте оплаты. */
.trust-block .quote-line { padding:5px 0; border-bottom:1px dashed var(--line-2); }
.trust-block .quote-line:last-child { border-bottom:0; }
.level-line { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0 0 14px; font-size:13.5px; color:var(--muted); }
.level-line .level-badge { margin-left:0; }
/* Разделитель «·» — только между элементами одной строки: в тексте он повисал
   в начале перенесённой строки на 390 px. */
.level-line > span + span:not(.level-badge)::before { content:'·'; margin-right:6px; color:var(--muted); }
@media (max-width:560px) { .level-line { flex-direction:column; align-items:flex-start; gap:4px; } .level-line > span + span::before { content:none; } }
.level-line-head { display:inline-flex; align-items:center; gap:6px; }
/* История начислений автора на телефоне — карточками (author.js) */
.payout-rows { display:flex; flex-direction:column; gap:8px; }
.payout-row { padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); display:flex; flex-direction:column; gap:4px; }
.payout-row .money { font-size:15px; }
/* «Что дальше» под формой ставки и «как начисляются деньги» в пустом балансе. */
.next-steps { margin:14px 0 0; padding:0; list-style:none; counter-reset:step; display:flex; flex-direction:column; gap:6px; font-size:13.5px; color:var(--muted); }
.next-steps li { display:flex; gap:8px; align-items:flex-start; }
.next-steps li::before { content:counter(step); counter-increment:step; flex:none; width:20px; height:20px; border-radius:50%; background:var(--green-bg); color:var(--green-ink); font-size:11.5px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.next-steps b { color:var(--ink); font-weight:600; }
.payout-now { padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-3); }
.payout-now b { font-variant-numeric:tabular-nums; }
.payout-full { padding:2px 8px; border-radius:6px; background:var(--chip-bg); font-variant-numeric:tabular-nums; letter-spacing:.04em; user-select:all; }
/* Налоговый статус, ИНН и ответ ФНС — одной строкой под маской реквизитов. */
.payout-tax { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:6px; font-size:13px; }
.payout-form .field-error a { color:inherit; text-decoration:underline; }
/* Telegram: ссылка на бота и код привязки рядом — код на случай, если
   ссылка не открылась, его вводят боту руками. */
.link-code-box { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:4px 0 8px; }
.link-code { padding:9px 14px; border:1px dashed var(--line); border-radius:9px; background:var(--chip-bg); font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:17px; font-weight:700; letter-spacing:.14em; user-select:all; }

/* Кабинет: полоска «подтвердите почту». */
.verify-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 16px; border-bottom:1px solid var(--amber-line); background:var(--amber-bg); color:var(--amber-ink); font-size:13.5px; }
.verify-bar > span:first-child { width:18px; height:18px; flex:none; color:var(--amber); }
.verify-bar b { font-weight:650; }
.verify-bar .spacer { flex:1; }
.verify-bar .btn-link { color:var(--amber-ink); text-decoration:underline; }
/* Плашка «Документы обновлены» — та же форма, что у «подтвердите почту»,
   но спокойнее: это не предупреждение, а просьба прочитать. */
.consent-bar { border-bottom-color:var(--blue-line); background:var(--blue-bg); color:var(--blue-ink); }
.consent-bar > span:first-child { color:var(--blue-ink); }
.consent-bar a { color:inherit; text-decoration:underline; }
.consent-bar .btn.sm { min-height:34px; }
.consent-actions { display:flex; gap:6px; flex:none; }
/* Режим обслуживания и объявление администратора (волна «омни», AD1-12):
   та же форма полоски, синяя — это сведения, а не предупреждение человеку. */
.site-notice-bar { border-bottom-color:var(--blue-line); background:var(--blue-bg); color:var(--blue-ink); }
.site-notice-bar > span:first-child { color:var(--blue-ink); }
.site-notice-bar .btn-link { color:inherit; }
/* «Смотреть как …» (волна «омни-2», AD2-09): чужой кабинет только для чтения —
   красная полоска, чтобы режим нельзя было принять за свой кабинет. */
.view-as-bar { flex-wrap:nowrap; border-bottom-color:var(--red-line); background:var(--red-bg); color:var(--red-ink); }
.view-as-bar > span:first-child { color:var(--red); }
/* Текст длинный: он занимает всю ширину, кнопка «Выйти» — справа в той же строке. */
.view-as-bar > span:nth-child(2) { flex:1 1 auto; min-width:0; }
.view-as-bar .spacer { display:none; }
.view-as-bar .btn { flex:none; }
/* На телефоне плашка занимала четверть экрана: иконка одна на строке, текст на
   трёх, кнопка на четвёртой. Иконку прячем, кнопки — в одну строку с текстом. */
@media (max-width:760px) {
  .verify-bar { padding:8px 12px; gap:8px; font-size:13px; }
  .verify-bar > span:first-child { display:none!important; /* inline-стиль иконки */ }
  .consent-bar .consent-actions { width:100%; }
  .consent-bar .consent-actions .btn { flex:1; justify-content:center; min-height:36px; }
  .verify-bar:not(.consent-bar) .btn-link { width:100%; }
}

@media (max-width:560px) {
  /* 16px в полях — порог, ниже которого iOS Safari приближает страницу при фокусе. */
  .auth-card .input, .auth-card .select { font-size:16px; }
  .role-grid { grid-template-columns:1fr; }
  .role-card { flex-direction:row; align-items:baseline; gap:8px; min-height:0; }
}
.policy-copy p:first-child { margin-top:0; }
.policy-copy p:last-child { margin-bottom:0; }

.lsection { position:relative; z-index:2; padding:86px 6vw; }
/* Слот карточки входа живёт только на узком экране; на широком он пуст и не
   должен оставлять полосу в 170px между «Возможностями» и «Авторам». */
.auth-slot { display:none; }
.lsection .wrap { max-width:1200px; margin:0 auto; }
.lsection.dark { background:#12231e; }
.lsection.darker { background:#0c1b17; }
.sec-label { margin-bottom:13px; color:#d3a55d; text-align:center; font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; }
.sec-label::before,.sec-label::after { content:'—'; margin:0 8px; opacity:.6; }
.lsection h2 { margin-bottom:10px; color:var(--cream); text-align:center; font-size:clamp(30px,4vw,45px); font-weight:600; }
/* text-wrap:pretty вместо balance: balance выравнивал длины строк, но рвал
   смысловые пары («держит не / на словах»); pretty бьётся с висячими словами и
   держит хвост фразы вместе. */
.lsection .sub { max-width:590px; margin:0 auto 46px; color:#9eafa7; text-align:center; font-size:15.5px; text-wrap:pretty; }
.steps { display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid rgba(222,187,128,.24); border-bottom:1px solid rgba(222,187,128,.18); }
.step { position:relative; min-height:226px; padding:27px 24px; border-right:1px solid rgba(222,187,128,.18); background:linear-gradient(to bottom,rgba(255,255,255,.025),transparent); }
.step:last-child { border-right:0; }
.step .num { width:40px; height:40px; margin-bottom:23px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(216,170,97,.6); border-radius:50%; color:#d8aa61; font-family:var(--display); font-size:17px; }
.step h3 { color:var(--cream); font-size:17px; font-weight:600; }
.step p { margin:0; color:#98aaa2; font-size:13.5px; }
.step .arrow-link { transition:color var(--dur) var(--ease),transform var(--dur) var(--ease); position:absolute; right:-12px; top:35px; z-index:2; width:24px; height:24px; display:flex; padding:4px; border-radius:50%; background:#12231e; color:#b88947; }
.step .arrow-link svg { width:16px; height:16px; }
.step:last-child .arrow-link { display:none!important; } /* icon() ставит inline display:inline-flex */
.feat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.feat { position:relative; min-height:230px; padding:27px; overflow:hidden; border:1px solid rgba(255,250,240,.1); border-radius:3px 18px 3px 18px; background:rgba(255,255,255,.035); transition:border-color .22s,background .22s,box-shadow .22s; }
.feat::after { content:''; position:absolute; width:110px; height:110px; right:-62px; bottom:-62px; border:1px solid rgba(216,170,97,.3); border-radius:50%; }
.feat:hover { border-color:rgba(216,170,97,.37); background:rgba(255,255,255,.055); }
.feat .fico { width:46px; height:46px; margin-bottom:24px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(216,170,97,.5); border-radius:50%; background:rgba(216,170,97,.12); color:#e0b874; }
/* Тёмные карточки — тёмное на тёмном: без рельефа они сливались в серое полотно
   рядом со светлыми «листами» гарантий. Латунная нить по верхней грани и мягкая
   внутренняя подсветка сверху дают им объём и рифму с бумажными карточками. */
.lsection.dark .feat { background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.022)); box-shadow:inset 0 1px 0 rgba(255,250,240,.06); }
.lsection.dark .feat::before { content:''; position:absolute; left:0; right:0; top:0; height:1px; background:linear-gradient(90deg,transparent,rgba(216,170,97,.4) 20%,rgba(216,170,97,.4) 80%,transparent); }
.lsection.dark .feat:hover { border-color:rgba(216,170,97,.42); box-shadow:inset 0 1px 0 rgba(216,170,97,.22),0 14px 32px rgba(0,0,0,.3); }
.feat .fico svg { width:21px; height:21px; }
.feat h3 { color:var(--cream); font-size:18px; font-weight:600; }
.feat p { margin:0; color:#98aaa2; font-size:14px; line-height:1.62; }
.faq-list { max-width:820px; margin:0 auto; border-top:1px solid rgba(255,250,240,.14); }
.faq-item { border-bottom:1px solid rgba(255,250,240,.14); }
.faq-item summary { min-height:64px; padding:17px 5px; display:flex; align-items:center; justify-content:space-between; gap:16px; list-style:none; color:var(--cream); font-family:var(--display); font-size:16px; font-weight:600; cursor:pointer; transition:color var(--dur) var(--ease); }
.faq-item summary:hover { color:#fff; }
.faq-item summary:hover .faq-x { color:#e6c078; }
.faq-item[open] > p { animation:faq-reveal var(--dur-slow) var(--ease) both; }
@keyframes faq-reveal { from { opacity:0; transform:translateY(-5px); } }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item .faq-x { width:22px; height:22px; flex:none; display:inline-flex; color:#d8aa61; transition:transform .2s; }
.faq-item .faq-x svg { width:100%; height:100%; }
.faq-item[open] .faq-x { transform:rotate(45deg); }
.faq-item p { margin:0; padding:0 46px 20px 5px; color:#9eafa7; font-size:14px; line-height:1.65; }
.cta-band { max-width:1200px; margin:0 auto; }
/* Сатиновая латунь: блик из верхнего угла и затемнение к низу — металл, а не
   «жёлтый прямоугольник». Оттенки те же. */
.cta-inner { position:relative; padding:58px max(24px,6vw); overflow:hidden; border-radius:3px 24px 3px 24px; background:radial-gradient(120% 140% at 18% 0%,rgba(255,244,222,.32),transparent 55%),linear-gradient(155deg,#dcae63 0%,#d3a258 48%,#c89851 100%); color:var(--ink); text-align:center; box-shadow:var(--sh-lg); }
.cta-inner::before { content:''; position:absolute; inset:11px; border:1px solid rgba(23,35,31,.25); border-radius:2px 17px 2px 17px; pointer-events:none; }
/* Созвездие ✦ разного размера по полю плашки — гравированный орнамент вместо
   одинокой звёздочки в углу. Все — в rgba(23,35,31,.1–.2), чтобы не спорить с
   заголовком. */
.cta-orn { position:absolute; inset:0; pointer-events:none; }
.cta-orn i { position:absolute; font-style:normal; line-height:1; }
.cta-orn .o1 { top:8%; right:3%; font-size:62px; color:rgba(23,35,31,.2); }
.cta-orn .o2 { top:31%; right:8.5%; font-size:24px; color:rgba(23,35,31,.15); }
.cta-orn .o3 { bottom:15%; left:4.5%; font-size:17px; color:rgba(23,35,31,.12); }
.cta-inner h2 { position:relative; margin-bottom:10px; color:var(--ink); font-size:clamp(29px,4vw,43px); }
/* 4.39:1 на латунном фоне — не дотягивало до нормы для основного текста. */
.cta-inner p { position:relative; max-width:560px; margin:0 auto 24px; color:#273631; font-size:16px; text-wrap:balance; }
.cta-inner .btn { position:relative; background:#17382f; color:var(--cream); border-color:#17382f; box-shadow:0 12px 26px rgba(23,35,31,.22); }
.cta-inner .btn:hover { background:#102c25; }
.cta-inner .btn.ghost { background:transparent; color:#17382f; border-color:rgba(23,35,31,.45); box-shadow:none; }
.cta-inner .btn.ghost:hover { background:rgba(23,35,31,.08); }
.lfooter { padding:34px 6vw 40px; border-top:1px solid rgba(255,250,240,.09); background:#091713; color:#81938b; text-align:center; font-size:12.5px; }
.lfooter-inner { max-width:1200px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:15px; }
.lfooter-brand { display:flex; align-items:center; gap:9px; color:#cfd8d3; font-family:var(--display); font-size:16px; font-weight:650; }
.lfooter-brand .logo { width:28px; height:28px; padding:5px; display:inline-flex; color:#d8aa61; border:1px solid rgba(216,170,97,.42); border-radius:50%; }
.lfooter-brand .logo svg { width:100%; height:100%; }
/* 4.9:1 к #091713 — ссылки в подвале раньше были того же тона, что и текст. */
.lfooter p { max-width:74ch; margin:0; line-height:1.6; }

/* Поэтапное появление главного экрана */
.hero-left .hero-crumb,.hero-left .pill,.hero-left h1,.hero-left .lead,.hero-cta,.hero-stats,.auth-card { animation:editorial-in .65s cubic-bezier(.2,.75,.25,1) both; }
.hero-left h1 { animation-delay:.06s; }
.hero-left .lead { animation-delay:.12s; }
.hero-cta { animation-delay:.18s; }
.hero-stats { animation-delay:.24s; }
.auth-card { animation-delay:.14s; }
@keyframes editorial-in { from { opacity:0; transform:translateY(18px); } }
/* Ответ на нажатие «Создать аккаунт»: карточка уже могла быть открыта на нужной
   вкладке, и без этой вспышки нажатие оставалось без единого видимого следа. */
.auth-card { outline:3px solid transparent; outline-offset:4px; }
.auth-card.is-called { animation:auth-called .95s var(--ease) 1; }
@keyframes auth-called { 0%,100% { outline-color:transparent; } 30%,55% { outline-color:rgba(216,170,97,.9); } }

/* ---------- Ритм лендинга: светлые секции на парчменте ----------
   Лендинг больше не одно тёмное полотно: часть секций (#how, #guarantees,
   #about, #faq) выстелена парчментом с тёмным текстом, тёмно-зелёные секции
   чередуются с ними. Порядок на десктопе: hero(тёмн.) → «Опишите задачу»(тёмн.)
   → «Как это работает»(светл.) → «Возможности»(тёмн.) → «Гарантии»(светл.) →
   «Авторам»(тёмн.) → «О нас»(светл.) → «Отзывы»(тёмн.) → FAQ(светл.) → латунный
   призыв → подвал. Класс каждой секции совпадает в landing.js и landing-static.js.
   Разделитель между тёмным и светлым — сам стык плюс латунная нить сверху и
   тёплая внутренняя кромка бумаги. Ни одного нового токена: цвета и тени взяты
   из системы (--surface, --line, --ink, --muted, --accent, --sh-sm/md). */
.lsection.light { background:linear-gradient(180deg,#f1ebdb 0%,#e9e1cf 100%); color:var(--ink); }
/* Латунная нить по верхней грани светлой секции — тонкий разделитель на стыке
   с тёмной соседкой; тёплое свечение под ней даёт секции воздух сверху. */
.lsection.light::before {
  content:''; position:absolute; z-index:1; left:0; right:0; top:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(193,138,69,.5) 22%,rgba(193,138,69,.5) 78%,transparent);
}
.lsection.light > .wrap { position:relative; }
.lsection.light .sec-label { color:#8a5620; }
.lsection.light h2 { color:var(--ink); }
.lsection.light .sub { color:var(--muted); }

/* «Как это работает» на светлом: карандаш номера латунный, разделители — линии
   бумаги, стрелка-связка сидит на цвете секции. */
.lsection.light .steps { border-top-color:var(--line); border-bottom-color:var(--line-2); }
.lsection.light .step { border-right-color:var(--line-2); background:linear-gradient(to bottom,rgba(255,255,255,.5),transparent); }
.lsection.light .step .num { border-color:var(--accent); color:var(--accent-2); background:var(--surface); box-shadow:var(--paper-edge); }
.lsection.light .step h3 { color:var(--ink); }
.lsection.light .step p { color:var(--muted); }
.lsection.light .step .arrow-link { background:#f0e9d8; color:var(--accent-2); }

/* Карточки «Возможностей»/«Гарантий» на светлом — настоящие листы бумаги:
   лестница светлот (лист #fffefb над парчментом), двухслойная тень, приподнимание
   на наведение. */
.lsection.light .feat {
  border:1px solid var(--line); background:var(--surface); box-shadow:var(--paper-edge),var(--sh-sm);
  transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease),border-color var(--dur) var(--ease),background var(--dur) var(--ease);
}
.lsection.light .feat::after { border-color:rgba(193,138,69,.22); }
.lsection.light .feat:hover { transform:translateY(-3px); border-color:var(--card-hover-line); background:var(--surface-2); box-shadow:var(--paper-edge),var(--sh-md); }
.lsection.light .feat h3 { color:var(--ink); }
.lsection.light .feat p { color:var(--muted); }
.lsection.light .feat .fico { border-color:rgba(193,138,69,.45); background:var(--accent-soft); color:var(--accent-2); }
.lsection.light .guarantee-note { color:var(--muted); }
.lsection.light .guarantee-note a { color:var(--accent-2); }

/* «О нас» на светлом: карточки команды — листы бумаги. */
.lsection.light .person { border:1px solid var(--line); background:var(--surface); box-shadow:var(--paper-edge),var(--sh-sm); }
.lsection.light .person-photo { border-color:rgba(193,138,69,.5); background:var(--surface-3); }
.lsection.light .person-name { color:var(--ink); }
.lsection.light .person-role { color:var(--accent-2); }
.lsection.light .person p { color:var(--muted); }

/* FAQ на светлом: тёмный текст, латунный «плюс». */
.lsection.light .faq-list { border-top-color:var(--line); }
.lsection.light .faq-item { border-bottom-color:var(--line); }
.lsection.light .faq-item summary { color:var(--ink); border-radius:8px; transition:color var(--dur) var(--ease),background var(--dur) var(--ease); }
/* На светлом FAQ до сих пор менялся только цвет — лёгкий фон строки под курсором
   даёт живость и подсказывает, что пункт кликабелен. */
.lsection.light .faq-item summary:hover { color:var(--primary); background:rgba(23,35,31,.03); }
.lsection.light .faq-item .faq-x { color:var(--accent-2); }
.lsection.light .faq-item summary:hover .faq-x { color:var(--accent); }
.lsection.light .faq-item p { color:var(--muted); }
/* Четырнадцать закрытых пунктов одной узкой колонкой — почти два экрана
   однообразной лестницы. На широком экране разводим FAQ в две колонки: длина
   вдвое короче, взгляду есть за что зацепиться. column-count течёт сверху вниз
   по колонке — порядок вопросов сохраняется; break-inside держит раскрытый
   пункт целиком в своей колонке. */
@media (min-width:900px) {
  .faq-list { max-width:1000px; column-count:2; column-gap:52px; }
  .faq-item { break-inside:avoid; }
}
/* Кольцо фокуса на светлой секции — тёмная охра из общего правила (#a8701f);
   светлое кольцо оставляем тёмным поверхностям (hero, подвал, сайдбар). */

/* ============================================================
   ПРИЛОЖЕНИЕ
   ============================================================ */
.shell { min-height:100vh; display:grid; grid-template-columns:var(--sidebar-w) minmax(0,1fr); }
/* dvh, а не vh: мобильные браузеры считают 100vh без адресной строки, и кнопка
   «Выйти» внизу панели оказывалась под панелью браузера. Строка с vh остаётся
   запасной для старых движков. */
.sidebar { position:sticky; top:0; height:100vh; height:100dvh; display:flex; flex-direction:column; overflow:hidden; background:var(--sidebar-grad); color:var(--cream); box-shadow:inset -1px 0 rgba(255,255,255,.07); }
.sidebar::after { content:''; position:absolute; z-index:0; width:270px; height:270px; left:-135px; bottom:8%; border:1px solid rgba(213,168,92,.15); border-radius:50%; box-shadow:0 0 0 56px rgba(213,168,92,.018),0 0 0 112px rgba(213,168,92,.012); pointer-events:none; }
.sidebar > * { position:relative; z-index:1; }
.sidebar .brand { display:flex; align-items:center; gap:10px; padding:24px 22px 3px; color:var(--cream); font-family:var(--display); font-size:20px; font-weight:650; }
.sidebar .brand:hover { color:#fff; }
.side-head { display:flex; align-items:center; justify-content:space-between; padding-right:14px; }
.sidebar .side-close { display:none; width:40px; height:40px; margin-top:20px; color:var(--cream); background:rgba(255,255,255,.06); border-color:rgba(255,250,240,.14); }
.side-close:hover { background:rgba(255,255,255,.12); }
.sidebar.open .side-close { display:inline-flex; }
.sidebar .brand .logo { width:36px; height:36px; padding:7px; display:inline-flex; border:1px solid rgba(213,168,92,.48); border-radius:50%; color:#d5a85c; }
.sidebar .brand .logo svg { width:100%; height:100%; }
.side-kicker { padding:0 22px 20px 68px; color:#9cb3a9; font-size:11px; font-weight:600; letter-spacing:.04em; }
.side-nav { flex:1; padding:11px 13px; overflow-y:auto; overscroll-behavior:contain; }
/* Список длиннее экрана: обрезанный край растворяется — видно, что дальше есть
   ещё. Без этого меню на высоте 768–900 обрезалось ровно под заголовком группы,
   и пункты «Поддержка», «Профиль» как будто отсутствовали. Классы ставит
   core.js по положению прокрутки: меню, которое влезает целиком, не тускнеет. */
.side-nav.fade-bottom { -webkit-mask-image:linear-gradient(#000 calc(100% - 28px), transparent); mask-image:linear-gradient(#000 calc(100% - 28px), transparent); }
.side-nav.fade-top { -webkit-mask-image:linear-gradient(transparent, #000 28px); mask-image:linear-gradient(transparent, #000 28px); }
.side-nav.fade-top.fade-bottom { -webkit-mask-image:linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image:linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.side-nav a { position:relative; min-height:40px; margin-bottom:2px; padding:9px 13px; display:flex; align-items:center; gap:12px; border-radius:8px; color:#bfcfc8; font-size:14px; font-weight:550; transition:color .15s,background .15s,transform .15s; }
/* На ноутбуке (до 920px по высоте) шаг ещё плотнее, чтобы меню заказчика (13 пунктов
   с заголовками групп) целиком влезало без прокрутки. */
@media (max-height:920px) {
  .side-nav a { min-height:36px; padding:7px 13px; margin-bottom:1px; font-size:13.5px; }
  .side-nav .side-group { margin-top:10px; }
  .side-kicker { padding-bottom:12px; }
}
.side-nav a svg { width:19px; height:19px; flex:none; }
.side-nav a:hover { transform:translateX(2px); background:rgba(255,255,255,.065); color:var(--cream); }
/* Активный пункт — латунная плашка с лёгким градиентом и брасовым значком:
   ориентир в меню читается с одного взгляда и вводит акцент бренда в сайдбар. */
.side-nav a.active { background:linear-gradient(90deg,rgba(213,168,92,.2),rgba(213,168,92,.08)); color:#fff; font-weight:650; }
.side-nav a.active svg { color:#e6bd7a; }
.side-nav a::before { content:''; position:absolute; width:3px; height:22px; left:-13px; top:50%; border-radius:0 3px 3px 0; background:#d5a85c; box-shadow:0 0 10px rgba(213,168,92,.5); transform:translateY(-50%) scaleY(0); transition:transform var(--dur) var(--ease); }
.side-nav a.active::before { transform:translateY(-50%) scaleY(1); }
/* Заголовки групп в длинном меню администратора: «Работа», «Каталог», «Система». */
.side-group { margin:14px 13px 6px; color:#8ea399; font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.side-group:first-child { margin-top:2px; }
.side-foot { padding:13px; border-top:1px solid rgba(255,255,255,.09); }
.side-user { min-width:0; padding:8px 8px 10px; display:flex; align-items:center; gap:10px; }
.side-user > div { min-width:0; }
.side-user .avatar { background:#d5a85c; }
.side-user b { display:block; overflow:hidden; color:var(--cream); font-size:13.5px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.side-user > div span { display:block; margin-top:2px; overflow:hidden; color:#91a79e; font-size:11.5px; text-overflow:ellipsis; white-space:nowrap; }
.side-foot .btn { width:100%; color:#e7eee9; background:rgba(255,255,255,.045); border-color:rgba(255,255,255,.12); box-shadow:none; }
.side-foot .btn:hover { background:rgba(255,255,255,.09); }
/* Волна 3 («меню короче»): имя в подвале — кнопка меню аккаунта (профиль,
   безопасность, выйти), то же меню, что под аватаром в шапке. */
.side-foot { position:relative; }
button.side-user { width:100%; border:0; border-radius:8px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; transition:background .15s; }
button.side-user:hover, button.side-user[aria-expanded="true"] { background:rgba(255,255,255,.065); }
button.side-user:focus-visible { outline:2px solid #d6a35d; outline-offset:-2px; }
.side-user-chevron { width:16px; height:16px; margin-left:auto; flex:none; color:#8ea399; transform:rotate(180deg); transition:transform .15s; }
button.side-user[aria-expanded="true"] .side-user-chevron { transform:rotate(0); }
/* Сворачиваемая группа («Ещё» у заказчика, «Система» у сотрудника): заголовок
   группы — кнопка с уголком; свёрнутая группа показывает сумму счётчиков. */
.side-fold-wrap { margin-top:6px; }
button.side-fold { width:calc(100% - 26px); min-height:30px; margin:8px 13px 2px; padding:0; display:flex; align-items:center; gap:8px; border:0; background:transparent; font:inherit; font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:#8ea399; text-align:left; cursor:pointer; border-radius:6px; transition:color .15s; }
button.side-fold:hover { color:var(--cream); }
button.side-fold:focus-visible { outline:2px solid #d6a35d; outline-offset:2px; }
.side-fold-title { flex:1; }
.side-fold-badge { margin-left:0; font-size:10.5px; letter-spacing:0; text-transform:none; }
.side-fold-chevron { width:14px; height:14px; flex:none; transition:transform .15s; }
.side-fold-wrap.is-open .side-fold-chevron { transform:rotate(180deg); }
.side-fold-body { padding-top:2px; }
@media (prefers-reduced-motion:reduce) { .side-fold-chevron, .side-user-chevron { transition:none; } }
/* Ноутбук 1366×768: меню сотрудника (15 пунктов и четыре группы) должно
   влезать целиком со свёрнутой «Системой» — шаг пунктов, заголовки групп,
   шапка и подвал панели ужимаются на невысоком экране. */
@media (max-height:800px) and (min-width:1001px) {
  .sidebar .brand { padding-top:14px; }
  .side-kicker { padding-bottom:8px; }
  .side-nav { padding:6px 13px; }
  /* Шаг 29 px: у администратора в «Деньгах» ещё и «Платежи» (волна «омни-2»),
     и с шагом 31 px меню на 768 px уже не влезало без прокрутки. */
  .side-nav a { min-height:29px; padding:3px 13px; margin-bottom:1px; }
  .side-nav .side-group { margin:5px 13px 1px; }
  .side-nav .side-group:first-child { margin-top:0; }
  .side-fold-wrap { margin-top:1px; }
  button.side-fold { min-height:24px; margin:5px 13px 1px; }
  .side-foot { padding:8px 13px; }
  .side-user { padding:4px 8px 6px; }
  /* Почта — в меню аккаунта, в подвале на невысоком экране только имя. */
  .side-user > div span { display:none; }
}
/* Нижний якорь для разрежённых страниц: очень слабый концентрический латунный
   мотив (эхо колец в подвале сайдбара) у нижнего края колонки. На плотных
   экранах его закрывают непрозрачные карточки; на короткой странице он мягко
   завершает «море кремового», чтобы экран не читался как недогруженный. */
.main { min-width:0; display:flex; flex-direction:column;
  background:repeating-radial-gradient(circle at 50% calc(100% - 46px),
    transparent 0 57px,
    color-mix(in srgb,var(--accent) 7%,transparent) 57px 58px,
    transparent 58px 59px) bottom center / 150% 360px no-repeat; }
.topbar { position:sticky; z-index:20; top:0; height:70px; padding:0 28px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--topbar-line); background:var(--topbar-bg); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
.topbar .crumb { min-width:0; display:flex; align-items:center; gap:8px; overflow:hidden; color:var(--muted); font-size:13px; }
.topbar .crumb svg { width:16px; height:16px; flex:none; }
.topbar .crumb .home { color:var(--accent-2); }
.topbar .crumb b { overflow:hidden; color:var(--ink); font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
/* Предки в крошках — ссылки: «Мои заказы» над карточкой заказа ведёт к списку. */
.topbar .crumb .crumb-link { display:inline-flex; align-items:center; gap:6px; flex:none; min-height:40px; padding:0 4px; color:var(--muted); white-space:nowrap; border-radius:6px; }
.topbar .crumb .crumb-link:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.topbar .crumb .crumb-link:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.top-avatar { border-radius:50%; }
.top-avatar:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.topbar .spacer { flex:1; }
.top-avatar { flex:none; display:flex; }
/* Волна 3: аватар в шапке — кнопка меню аккаунта (профиль, безопасность,
   выйти); значок «?» у колокольчика — ссылка на вопросы или справку. */
button.top-avatar { align-items:center; gap:4px; padding:2px; border:0; border-radius:999px; background:transparent; color:var(--ink-2); font:inherit; cursor:pointer; transition:background .15s; }
button.top-avatar:hover, button.top-avatar[aria-expanded="true"] { background:var(--surface-3); }
.top-avatar-chevron { width:14px; height:14px; flex:none; color:var(--muted); transition:transform .15s; }
button.top-avatar[aria-expanded="true"] .top-avatar-chevron { transform:rotate(180deg); }
a.icon-btn.help-btn { color:var(--ink-2); text-decoration:none; }
/* «На смене / Перерыв» в шапке сотрудника (ТЗ 28.10.2026, staff/support-live.js). */
.shift-toggle { flex:none; display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 10px 0 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink-2); font:600 13px/1 var(--font); cursor:pointer; white-space:nowrap; }
.shift-toggle .dot { width:8px; height:8px; border-radius:50%; background:var(--green); }
.shift-toggle.is-away { border-color:var(--amber-ink); color:var(--amber-ink); background:var(--amber-bg); }
.shift-toggle.is-away .dot { background:var(--amber-ink); }
.shift-toggle:hover { background:var(--surface-3); }
.shift-toggle:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.shift-toggle-chevron { width:14px; height:14px; color:var(--muted); }
.shift-menu { position:fixed; z-index:50; min-width:260px; max-width:calc(100vw - 16px); padding:6px; border:1px solid var(--line); border-radius:4px 14px 4px 14px; background:var(--surface); box-shadow:var(--sh-lg); animation:notif-pop .17s var(--ease); }
.shift-menu-head, .shift-menu-note { padding:8px 10px 6px; color:var(--muted); font-size:12px; line-height:1.4; }
.shift-menu-item { width:100%; min-height:40px; padding:8px 10px; display:flex; align-items:center; border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:14px; font-weight:550; text-align:left; cursor:pointer; }
.shift-menu-item:hover { background:var(--surface-3); color:var(--primary); }
.shift-menu-item:focus-visible { outline:2px solid var(--accent-2); outline-offset:-2px; }
.shift-menu-sep { height:1px; margin:6px 4px; background:var(--line); }
@media (max-width:640px) {
  /* На телефоне — только точка: подпись видна в меню. */
  .shift-toggle { padding:0 8px; }
  .shift-toggle .shift-toggle-text, .shift-toggle .shift-toggle-chevron { display:none; }
  .shift-toggle .dot { width:10px; height:10px; }
}
.account-menu { position:fixed; z-index:50; top:77px; right:max(20px,env(safe-area-inset-right)); min-width:240px; max-width:calc(100vw - 28px); padding:6px; border:1px solid var(--line); border-radius:4px 14px 4px 14px; background:var(--surface); box-shadow:var(--sh-lg); animation:notif-pop .17s var(--ease); transform-origin:100% 0; }
.account-menu.from-side { position:absolute; z-index:5; top:auto; bottom:calc(100% - 6px); left:13px; right:13px; min-width:0; transform-origin:0 100%; }
.account-head { display:flex; align-items:center; gap:10px; min-width:0; padding:8px 10px 10px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.account-head > div { min-width:0; }
.account-head b { display:block; overflow:hidden; color:var(--ink); font-size:13.5px; text-overflow:ellipsis; white-space:nowrap; }
.account-head span { display:block; margin-top:2px; overflow:hidden; color:var(--muted); font-size:11.5px; text-overflow:ellipsis; white-space:nowrap; }
.account-item { width:100%; min-height:40px; padding:8px 10px; display:flex; align-items:center; gap:10px; border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:14px; font-weight:550; text-align:left; cursor:pointer; text-decoration:none; transition:background .15s; }
.account-item:hover { background:var(--surface-3); color:var(--primary); }
.account-item:focus-visible { outline:2px solid var(--accent-2); outline-offset:-2px; }
.account-item svg { width:18px; height:18px; flex:none; }
.account-logout { margin-top:4px; border-top:1px solid var(--line); border-radius:0 0 8px 8px; }
@media (prefers-reduced-motion:reduce) { .account-menu { animation:none; } .top-avatar-chevron { transition:none; } }
.icon-btn { position:relative; width:42px; height:42px; flex:none; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:50%; background:var(--surface-3); color:var(--ink-2); cursor:pointer; transition:background .15s,color .15s,border-color .15s,transform .15s; }
.icon-btn svg { width:18px; height:18px; }
.icon-btn:hover { transform:translateY(-1px); border-color:#aaa08d; background:#f3ede1; color:var(--primary); }
.icon-btn:active { transform:translateY(0) scale(.95); }
.icon-btn.primary { border-color:transparent; background:var(--primary); color:#fff; box-shadow:var(--sh-primary); }
.icon-btn.primary:hover { background:var(--primary-600); }
.icon-btn .ndot { animation:ndot-pop .35s var(--ease); position:absolute; top:-2px; right:-2px; min-width:18px; height:18px; padding:0 4px; display:flex; align-items:center; justify-content:center; border:2px solid var(--ndot-ring); border-radius:999px; background:var(--ndot-bg); color:#fff; font-size:9px; font-weight:700; }
.topbar .burger { display:none; }
/* «+» в шапке — только в режиме шторки (≤1000px): на широком экране «Новый
   заказ» есть в меню, и вторая одинаковая кнопка рядом лишь сбивала с толку. */
.topbar .icon-btn.primary { display:none; }
/* Счётчик очереди на бургере: на телефоне сайдбар спрятан, и число на пункте
   «Модерация» никто не видит. Та же форма, что у точки на колокольчике. */
.topbar .burger .qdot { position:absolute; top:-2px; right:-2px; min-width:18px; height:18px; padding:0 4px; display:flex; align-items:center; justify-content:center; border:2px solid var(--ndot-ring); border-radius:999px; background:#d5a85c; color:#1f2a25; font-size:9px; font-weight:700; }
.topbar .burger .qdot.is-overdue { background:var(--red); color:#fff; }
/* Поиск по всему кабинету сотрудника (W3-03, dashboard/search.js): поле
   «Найти…» в верхней панели, панель результатов под ним; на телефоне поле
   прячется за лупой и раскрывается листом поверх шапки. */
.cab-search { position:relative; flex:0 1 300px; min-width:0; display:flex; align-items:center; }
.cab-search .cab-search-icon { position:absolute; left:12px; display:flex; color:var(--muted); pointer-events:none; }
.cab-search .cab-search-icon svg { width:16px; height:16px; }
.cab-search .cab-search-input { width:100%; min-height:40px; padding-left:36px; padding-right:60px; border-radius:999px; }
.cab-search .cab-search-kbd { position:absolute; right:12px; padding:2px 6px; border:1px solid var(--line); border-radius:6px; background:var(--surface-3); color:var(--muted); font-size:10.5px; font-weight:600; letter-spacing:.04em; white-space:nowrap; pointer-events:none; }
.cab-search .cab-search-input:focus ~ .cab-search-kbd { opacity:0; }
.cab-search .cab-search-close { display:none; }
.cab-search-panel { position:absolute; z-index:30; top:calc(100% + 8px); right:0; width:min(560px,calc(100vw - 24px)); max-height:min(70vh,560px); overflow-y:auto; overscroll-behavior:contain; padding:6px; border:1px solid var(--line); border-radius:4px 16px 4px 16px; background:var(--surface); box-shadow:var(--sh-lg); }
.cab-search-group + .cab-search-group { margin-top:6px; padding-top:6px; border-top:1px solid var(--line-2); }
.cab-search-group-title { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 10px 2px; color:var(--muted); font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.cab-search-more { font-size:12px; font-weight:600; letter-spacing:0; text-transform:none; }
.cab-search-item { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-radius:10px; color:var(--ink); text-decoration:none; cursor:pointer; }
.cab-search-item:hover, .cab-search-item.is-active { background:var(--surface-3); }
.cab-search-item.is-active { outline:2px solid var(--accent-2); outline-offset:-2px; }
.cab-search-main { display:flex; align-items:center; gap:8px; min-width:0; }
.cab-search-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.cab-search-tag { flex:none; }
.cab-search-meta { color:var(--muted); font-size:12.5px; }
.cab-search-empty { padding:14px 12px; color:var(--muted); font-size:13.5px; }
.topbar .search-btn { display:none; }
@media (max-width:760px) {
  .topbar .search-btn { display:flex; }
  .cab-search { display:none; }
  .cab-search.is-open { display:flex; position:fixed; z-index:80; top:0; left:0; right:0; flex:none; padding:10px 12px; padding-top:max(10px,env(safe-area-inset-top)); border-bottom:1px solid var(--line); background:var(--surface); box-shadow:var(--sh-lg); }
  .cab-search.is-open .cab-search-kbd { display:none; }
  .cab-search.is-open .cab-search-close { display:flex; flex:none; margin-left:8px; }
  .cab-search.is-open .cab-search-input { padding-right:12px; }
  .cab-search.is-open .cab-search-panel { top:100%; right:12px; left:12px; width:auto; max-height:calc(100vh - 80px); border-radius:0 0 16px 16px; }
}
.content { width:100%; max-width:1250px; margin:0 auto; padding:31px 29px 44px; }
.content:focus { outline:none; }
/* Подвал кабинета: документы под содержимым, на всех страницах. margin-top:auto
   прижимает его к низу, если страница короче экрана (.main — колонка). */
.cabinet-footer { width:100%; max-width:1250px; margin:auto auto 0; padding:14px 29px 22px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 18px; border-top:1px solid var(--line-2); color:var(--muted); font-size:12.5px; }
.cabinet-footer nav { display:flex; flex-wrap:wrap; gap:6px 18px; }
.cabinet-footer a { color:var(--muted); text-decoration:none; }
.cabinet-footer a:hover { color:var(--ink); text-decoration:underline; }
/* При длинном заголовке правый блок с кнопками перепрыгивал из правого верхнего
   угла в левый нижний: перенос ставил его первым элементом новой строки.
   Заголовок занимает всю доступную ширину, кнопки остаются справа. */
.page-head { margin-bottom:24px; display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:15px; }
.page-head > :first-child { flex:1 1 320px; min-width:0; }
.page-head > :last-child:not(:first-child) { flex:0 0 auto; margin-left:auto; }
.page-head::after { content:''; width:100%; height:1px; order:3; margin-top:2px; background:linear-gradient(90deg,#bcae96 0%,var(--line) 35%,transparent 100%); }
.page-head h1 { margin:0; font-size:28px; font-weight:650; }
.page-head .sub { margin-top:5px; color:var(--muted); font-size:13.5px; }

/* Ступени заданы явно: auto-fit на четырёх плитках давал 3 в ряд и одинокую
   четвёртую под ними — сетка читалась как ошибка вёрстки. */
.stat-grid { margin-bottom:22px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.stat-grid.stat-grid-5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
/* На двух колонках пятая плитка не остаётся сиротой — растягивается на ряд. */
@media (max-width:720px) { .stat-grid.stat-grid-5 > :nth-child(5):last-child { grid-column:1 / -1; } }
.h2-sm { margin:0 0 12px; font-size:17px; display:flex; align-items:center; }
/* Плитка-показатель собрана сеткой, а не колонкой: цифра — герой в левом верхнем
   углу, иконка-чип уходит в правый верхний, подпись и тренд лежат строками под
   ними во всю ширину. Прежде иконка занимала верх, а крупное число «висело» над
   пустотой — плитка казалась незаполненной. Плотнее по вертикали, ритм внятный. */
.stat { position:relative; min-width:0; padding:16px 17px; overflow:hidden;
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:12px;
  border:1px solid var(--line); border-radius:3px 15px 3px 15px; background:var(--stat-glass);
  box-shadow:var(--paper-edge),var(--sh-sm); transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease),border-color var(--dur) var(--ease); }
/* Латунная нить по верхней грани — тонкая, но постоянная марка бренда на каждой
   плитке; прежде латунь в кабинет почти не заходила. */
.stat::before { content:''; position:absolute; left:0; right:0; top:0; height:2px; border-radius:3px 15px 0 0;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 62%,transparent) 22%,color-mix(in srgb,var(--accent) 40%,transparent) 78%,transparent); }
.stat .st-ico { grid-column:2; grid-row:1; width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border-radius:11px; background:var(--green-bg); color:var(--primary); box-shadow:inset 0 0 0 1px rgba(23,35,31,.05); transition:transform var(--dur) var(--ease); }
/* Поднимаются при наведении только плитки-ссылки: статичная цифра, которая
   «просится» под курсор, обманывает. */
.stat.stat-link { color:inherit; text-decoration:none; cursor:pointer; }
/* Плитка-кнопка (включает отбор на той же странице): без выравнивания по центру, как у ссылки. */
button.stat { width:100%; text-align:left; }
.stat.stat-link:hover { transform:translateY(-3px); border-color:var(--card-hover-line); box-shadow:var(--paper-edge),var(--sh-md); }
.stat.stat-link:hover .st-ico { transform:scale(1.08); }
.stat .st-ico svg { width:19px; height:19px; }
.stat .st-n { grid-column:1; grid-row:1; overflow-wrap:anywhere; font-family:var(--display); font-size:29px; font-weight:650; font-variant-numeric:tabular-nums; line-height:1.04; letter-spacing:-.015em; }
/* Под подпись резервируем две строки: в ряду одинаковых плиток у одной подпись
   переносится, у соседей — нет, и базовые линии подписей/суб-строк разъезжались.
   min-height по двум строкам держит ряд на одной сетке независимо от длины. */
.stat .st-l { grid-column:1 / -1; grid-row:2; margin-top:9px; min-height:2.8em; color:var(--muted); font-size:12.5px; line-height:1.4; }
/* Тренд/уточнение под подписью (напр. «12 писем в очереди»): третья строка,
   поэтому не толкает иконку и не ломает выравнивание цифры. */
.stat .st-sub { grid-column:1 / -1; grid-row:3; margin-top:3px; }

/* Таблицы объявлены от 680px, то есть на телефоне прокручиваются вбок всегда, а
   обрезанный край выглядел как конец таблицы. Тени у краёв: слои local гаснут,
   когда докручено до края, слои scroll прибиты к контейнеру. */
/* position:relative — абсолютный .sr-only внутри таблицы остаётся в контейнере прокрутки, а не распирает страницу. */
.table-wrap { position:relative; width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-sm);
  background:
    linear-gradient(to right,var(--surface),transparent) 0 0/26px 100% no-repeat local,
    linear-gradient(to left,var(--surface),transparent) 100% 0/26px 100% no-repeat local,
    linear-gradient(to right,var(--scroll-shadow),transparent) 0 0/17px 100% no-repeat scroll,
    linear-gradient(to left,var(--scroll-shadow),transparent) 100% 0/17px 100% no-repeat scroll,
    var(--surface); }
.table-wrap:focus-visible { outline:3px solid #a8701f; outline-offset:2px; }
table.data { width:100%; min-width:680px; border-collapse:collapse; font-size:13.5px; }
table.data th { padding:13px 17px; border-bottom:1px solid var(--line); background:var(--v50); color:#5e6964; text-align:left; font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
table.data td { padding:15px 17px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
table.data tr:last-child td { border-bottom:0; }
table.data tbody tr { transition:background var(--dur-fast) var(--ease); }
/* Зебра: чётные строки на тон темнее — глаз держит строку в широкой таблице, не
   сбиваясь на соседнюю. Правило стоит до :hover (одинаковая специфичность), чтобы
   подсветка наведения перекрывала полосу. */
table.data tbody tr:nth-child(even) td { background:color-mix(in srgb,var(--v50) 55%,transparent); }
/* Подсветка строки — помощь при чтении широкой таблицы, а не обещание клика.
   Правила :focus у tr были мёртвыми: строки не получают фокус, прокрутка таблицы
   доступна с клавиатуры через .table-wrap[tabindex]. */
table.data tbody tr:hover td { background:var(--hover); }
table.data .t-title { color:var(--ink); font-weight:650; }
a.table-order-link:hover, a.table-order-link:focus-visible { color:var(--primary); text-decoration:underline; }
table.data .t-sub { margin-top:2px; color:var(--muted); font-size:12px; }
/* Финансы: числа вправо, стрелки изменения, превью письма. */
table.data .num, table.data th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
/* Код вуза короткий («ТГУ»), но overflow-wrap:anywhere на td рвал его посимвольно в узкой колонке. */
table.data .t-uni { white-space:nowrap; overflow-wrap:normal; }
/* На телефоне таблица всё равно шире экрана: ужимаем, чтобы в первый экран попадали дата, сумма и статус. */
@media (max-width:640px) {
  table.data { min-width:560px; }
  table.data th { padding:10px 12px; }
  table.data td { padding:11px 12px; }
}
.finance-table td:first-child { min-width:220px; }
/* Дельты — сигнал, а не тревога: за короткий период почти каждая метрика падает
   к нулю и столбец наливался сплошным алым «▼100%», читаясь как авария. Тон
   приглушён (смешан с чернилами/фоном) и вес чуть снижен — цвет остаётся, но
   перестаёт доминировать над цифрами. */
.delta { font-weight:600; white-space:nowrap; }
.delta-good { color:color-mix(in srgb,var(--green) 82%,var(--ink)); }
.delta-bad { color:color-mix(in srgb,var(--red) 68%,var(--muted)); }
/* Финансовые KPI-плитки: денежное число не переносим посреди разрядов
   («2 100 ₽» ломалось на «21/00/0 ₽»), а sub уходит третьей строкой (.st-sub). */
.finance-stats .st-n { white-space:nowrap; overflow-wrap:normal; font-size:25px; }
@media (max-width:1120px) { .finance-stats .st-n { font-size:22px; } }
/* Деньги авторов в «Финансах» (W3-07): три плитки под основными — «можно
   вывести сейчас», «освободится за 7 дней», «заявки ждут перевода». */
.stat-grid.finance-authors { grid-template-columns:repeat(3,minmax(0,1fr)); }
.finance-authors .st-n { white-space:nowrap; overflow-wrap:normal; font-size:25px; }
@media (max-width:1120px) { .finance-authors .st-n { font-size:22px; } }
.finance-controls { padding:16px 18px; margin-bottom:16px; }
.finance-controls .input[type=date] { max-width:170px; }
.weekly-preview { margin:0; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); font-size:12.5px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }

/* «Заработок по месяцам» у автора: единственная визуализация «Баланса». Полосы
   выше и скруглены, залиты градиентом латунь→зелёный, месяц-рекорд — насыщенным
   фирменным тоном. Нулевые месяцы не рисуют полноширинный трек (класс is-zero),
   только штрих на нуле, чтобы длина честно кодировала сумму. */
.earn-chart { display:flex; flex-direction:column; gap:13px; margin-top:2px; }
.earn-row { display:flex; flex-direction:column; gap:6px; }
.earn-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:12.5px; }
.earn-name { color:var(--muted); font-variant-numeric:tabular-nums; }
.earn-val { font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.earn-track { position:relative; height:12px; border-radius:999px; background:var(--v100); box-shadow:inset 0 0 0 1px rgba(23,35,31,.04); overflow:hidden; }
.earn-track.is-zero { background:transparent; box-shadow:none; }
.earn-track.is-zero::before { content:''; position:absolute; left:0; top:50%; width:16px; height:3px; transform:translateY(-50%); border-radius:999px; background:var(--v200); }
.earn-bar { height:100%; border-radius:999px; background:linear-gradient(90deg,var(--accent) 0%,var(--primary) 82%); box-shadow:inset 0 1px 0 rgba(255,255,255,.2); transition:width var(--dur) var(--ease); }
.earn-bar-record { background:linear-gradient(90deg,var(--accent-2) 0%,var(--primary-700) 88%); box-shadow:inset 0 1px 0 rgba(255,255,255,.24),var(--sh-primary); }
.earn-bar-neg { background:var(--red); }

.order-list { display:grid; gap:13px; }
.order-card { position:relative; min-width:0; padding:20px 22px; overflow:hidden; border:1px solid var(--line); border-radius:3px 15px 3px 15px; background:var(--surface); color:var(--ink); box-shadow:var(--sh-sm); cursor:pointer; transition:transform .16s,box-shadow .16s,border-color .16s; }
/* Полоса слева — цвет статуса (см. .st-* ниже); при наведении чуть шире. */
.order-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--line); transition:width .18s; }
.order-card:hover { transform:translateY(-2px); border-color:var(--card-hover-line); color:var(--ink); box-shadow:var(--sh-md); }
/* Тот же контейнер используется там, где нажимать не на что (письма демо-почты).
   Приподнимающаяся на наведении карточка обещала переход, которого нет. */
.order-card.static { cursor:default; }
.order-card.static:hover { transform:none; border-color:var(--line); box-shadow:var(--sh-sm); }
.order-card:hover::before,.order-card:focus-visible::before { width:6px; }
.order-card.static:hover::before { width:4px; }
/* Шапка, описание и мета — самостоятельный набор: их используют карточки заказа,
   прайса и преподавателя. Пока правила были привязаны к .order-card, две страницы
   из шести оставались вообще без раскладки. */
.oc-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.oc-head > :last-child { flex:none; text-align:right; }
.order-card h3 { margin:0 0 3px; font-size:17px; font-weight:650; }
.oc-desc { margin:9px 0 0; overflow:hidden; color:var(--ink-2); font-size:13.5px; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.oc-meta { margin-top:11px; display:flex; flex-wrap:wrap; gap:7px 15px; color:var(--muted); font-size:12.5px; }
.oc-meta span { display:inline-flex; align-items:center; gap:5px; }
.oc-meta svg { width:14px; height:14px; color:var(--accent-2); }
/* Сжатая карточка закрытого заказа у сотрудника: одна строка. */
.order-card.compact { padding:11px 16px 11px 18px; }
.order-card.compact .oc-line { display:flex; align-items:center; gap:10px; min-width:0; }
.order-card.compact h3 { flex:1 1 auto; min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14.5px; }
.order-card.compact .oc-price { flex:none; font-weight:650; font-size:13px; white-space:nowrap; }
.order-card.compact .oc-when { flex:none; white-space:nowrap; }
.order-card.compact .badge { flex:none; }
@media (max-width:640px) {
  .order-card.compact .oc-line { flex-wrap:wrap; gap:6px 10px; }
  .order-card.compact h3 { flex-basis:100%; }
}
/* Действия на модерации: строка решения, под ней — служебное. */
.actions-row + .actions-row { margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.actions-decision .ml-auto { margin-left:auto; }
/* Закрепление заказа за сотрудником — строкой над решением. */
.actions-claim { margin-bottom:10px; }
/* Второстепенные действия карточки заказа — под «Ещё». */
.actions-more > summary { cursor:pointer; list-style:none; font-size:13px; display:inline-block; }
.actions-more > summary::-webkit-details-marker { display:none; }
.actions-more > summary::after { content:' ▾'; }
.actions-more[open] > summary::after { content:' ▴'; }
/* Принятая ставка после аукциона: список свёрнут. */
.bids-archive > summary { cursor:pointer; font-size:13px; }
/* Волна 3 кабинетов (CAB-W3-03): «Коротко о заказе» автору в аукционе — над
   формой ставки; сводка о преподавателе в строке — обычным начертанием. */
.auction-brief .kv { grid-template-columns:118px minmax(0,1fr); }
.auction-brief .kv dd .teacher-summary { font-weight:400; }
/* Окно «Попросить перенос срока»: текущий срок над полем новой даты. */
.deadline-now { margin:0 0 10px; font-size:13.5px; }
/* Плашка «До срока N ч» назначенному автору — ссылка на условия тем же цветом. */
.deadline-soon a { color:inherit; text-decoration:underline; }
.bid.accepted { border-color:var(--green, #2f6b4f); }
/* Подсказка о контактах в чате — появляется под полем при наборе. */
.chat-contact-hint { margin:6px 0 0; color:var(--amber-ink, #7a4b00); }
@media (max-width:560px) {
  /* Кнопки решения по модерации столбиком: «Отклонить» с ml-auto уезжала
     в правый край отдельной строкой с пустотой слева. */
  .actions-decision { flex-direction:column; }
  .actions-decision .btn { width:100%; justify-content:center; }
  .actions-decision .ml-auto { margin-left:0; }
}

.detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,360px); gap:20px; align-items:start; }
.detail-grid > * { min-width:0; }
/* Боковая колонка следует за прокруткой: история и чат обычно короче основной
   части, и без этого внизу оставалась пустая полоса. Колонка выше окна
   (.side-tall ставит page.js) не липнет: залипнув, она прятала свой низ — поле
   ответа в чате — до самого конца левой колонки. */
@media (min-width:1121px) {
  .detail-grid > :last-child { position:sticky; top:86px; }
  .detail-grid > .side-tall:last-child { position:static; }
}
.kv { display:grid; grid-template-columns:125px minmax(0,1fr); gap:10px 15px; font-size:13.5px; }
.kv dt { color:var(--muted); }
.kv dd { min-width:0; margin:0; overflow-wrap:anywhere; color:var(--ink); font-weight:600; }
/* Карточка заказа: суммы и сроки в «О заказе» — моноширинными цифрами, чтобы
   бюджет, цена и выплата стояли ровным столбцом, а не плясали по ширине глифа. */
.detail-grid .kv dd { font-variant-numeric:tabular-nums; }
/* Состояние системы: сетка карточек, у каждой — цветная точка статуса. */
.sys-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:14px; align-items:stretch; }
.sys-card .card-title { margin-bottom:14px; }
.sys-card .kv { grid-template-columns:minmax(110px,38%) minmax(0,1fr); font-size:13px; }
.sys-card .alert.sm { margin-bottom:10px; }
/* Карточка «Каналы обращений»: состояние канала и под ним — последняя ошибка. */
.sys-channel-row { display:flex; flex-direction:column; gap:2px; }
.sys-channel-row .sys-channel-error { color:var(--red-ink); font-size:12px; overflow-wrap:anywhere; }
.sys-dot { display:inline-block; width:10px; height:10px; flex:none; border-radius:50%; background:var(--badge-gray-ink); box-shadow:0 0 0 3px color-mix(in srgb,currentColor 12%,transparent); }
.sys-ok .sys-dot, .sys-dot.sys-ok { background:var(--green); }
.sys-warn .sys-dot, .sys-dot.sys-warn { background:var(--amber); }
.sys-bad .sys-dot, .sys-dot.sys-bad { background:var(--red); }
.sys-off .sys-dot, .sys-dot.sys-off { background:var(--badge-gray-ink); opacity:.55; }
.sys-bad { border-color:var(--red-line); }
.sys-legend { display:flex; align-items:center; gap:6px 16px; flex-wrap:wrap; }
.sys-legend-item { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.sys-legend .sys-dot { box-shadow:none; }
/* Волна «омни-2» (AD2-12): фоновые задачи, ошибки сервера, история тревог,
   очередь Telegram и кэши. Место карточки — ячейка сетки; широкие — во всю
   строку; таблицы прокручиваются внутри своей обёртки. */
.sys-slot { display:flex; min-width:0; }
.sys-slot > .card { flex:1; min-width:0; }
.sys-wide { grid-column:1 / -1; min-width:0; }
.sys-card .ct-head .badge { margin-left:8px; font-size:11.5px; }
.sys-ops-table td { vertical-align:top; font-size:13px; }
/* Слова в ячейках не рвутся по буквам (общий table.data td — overflow-wrap:
   anywhere): на телефоне таблица шире экрана и прокручивается в обёртке. */
table.data.sys-ops-table { min-width:720px; }
table.sys-ops-table td { overflow-wrap:normal; }
table.sys-ops-table td.sys-ops-route { overflow-wrap:anywhere; min-width:12em; }
.sys-ops-table .nowrap { white-space:nowrap; }
.sys-ops-route { font-family:ui-monospace,Consolas,monospace; font-size:12px; overflow-wrap:anywhere; }
.sys-ops-action { text-align:right; white-space:nowrap; }
.sys-ops-list { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:8px; max-height:320px; overflow:auto; }
.sys-ops-list li { font-size:13px; }
.sys-ops-command { padding:1px 6px; border-radius:6px; background:var(--surface-2); border:1px solid var(--line); font-size:12px; }
.sys-ops-filter { gap:8px; }
.sys-ops-filter .input { flex:1 1 220px; }
.sys-ops-hooks > summary { cursor:pointer; font-size:13px; }
.sys-ops-caches { border:0; padding:0; margin:0 0 12px; display:grid; gap:6px; }
.sys-ops-caches legend { font-weight:600; margin-bottom:4px; }
.timeline { margin:0; padding:0; list-style:none; }
.timeline li { position:relative; padding:0 0 17px 23px; border-left:1px solid #d6ccbb; }
.timeline li:last-child { padding-bottom:0; border-left-color:transparent; }
.timeline li::before { content:''; position:absolute; width:10px; height:10px; left:-6px; top:4px; border:2px solid var(--surface); border-radius:50%; background:#b67b38; box-shadow:0 0 0 2px #e1d3ba; }
.timeline .tl-text { font-size:13.5px; font-weight:550; }
.timeline .tl-time { margin-top:2px; color:var(--muted); font-size:11.5px; }
/* История заказчика (W1-13): служебные строки сервиса показаны только в
   раскрытой истории и приглушены; «Показать всю (N)» — ссылкой под списком. */
.timeline li.tl-service .tl-text { color:var(--muted); font-weight:500; }
.timeline li.tl-service::before { background:#d6ccbb; }
.timeline-more { font-size:13px; }
.bid { margin-bottom:10px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); transition:border-color .15s; }
.bid:hover { border-color:var(--hover-line); }
.bid.best { border-color:#83b298; background:var(--green-bg); }
.bid .bid-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.bid .price { color:var(--primary); font-family:var(--display); font-size:20px; font-weight:650; }
.bid.best .price { color:var(--green-2); }
.bid .who { font-weight:650; }
.bid .cmt { margin-top:6px; color:var(--ink-2); font-size:13px; }
/* Очередь выплат: панель пакета и реестра, история под спойлером. */
.wd-toolbar { display:flex; flex-wrap:wrap; gap:10px 18px; justify-content:space-between; align-items:center; margin-bottom:12px; }
.wd-toolbar > :empty { display:none; }
.wd-registry .input[type=date] { width:auto; max-width:150px; }
.wd-registry .select { width:auto; min-width:170px; }
.wd-card .bid-top { align-items:flex-start; }
.wd-card .who a { color:inherit; }
.wd-history summary { cursor:pointer; font-weight:600; font-size:13.5px; color:var(--ink-2); }
/* Раздел «Выплаты» (W3-06): вкладки-чипы как в очереди, итог вкладки
   («3 заявки на 7 900 ₽»), панель вкладок одной карточкой, поиск истории. */
.wd-tabs { margin-bottom:14px; }
.wd-section > [role=tabpanel] { min-width:0; }
.wd-total { font-weight:650; color:var(--ink-2); font-size:14px; }
.wd-search .input[type=search] { flex:2 1 220px; }
.wd-search .input[type=date] { width:auto; max-width:150px; }
.wd-search .select { width:auto; min-width:150px; }
.wd-history-table td.money { white-space:nowrap; }
.wd-card .payout-full { user-select:all; }

.chat { height:470px; display:flex; flex-direction:column; }
/* Пустой чат не должен занимать полэкрана: хватит места под подсказку и поле. */
.chat.is-empty { height:auto; min-height:220px; }
/* Пустой чат: медальон с иконкой + подсказка по центру — единый язык с
   остальными пустыми состояниями кабинета, а не одинокая строка текста. */
.chat-empty { display:flex; flex-direction:column; align-items:center; gap:14px; padding:24px 16px; margin:auto 0; }
/* Медальон повторяет пустые состояния кабинета (.empty): тёплая заливка,
   волосяная кромка и латунное кольцо — уменьшенные под компактный чат. */
.chat-empty-ico { position:relative; display:flex; align-items:center; justify-content:center; width:52px; height:52px; padding:14px; border-radius:50%; background:var(--grad-soft); box-shadow:inset 0 0 0 1px var(--line-2); color:var(--accent-2); }
.chat-empty-ico::after { content:''; position:absolute; inset:-6px; border-radius:50%; border:1px solid color-mix(in srgb,var(--accent) 40%,transparent); }
.chat-empty-ico svg { width:100%; height:100%; }
.chat-empty-text { max-width:32ch; color:var(--muted); font-size:13.5px; line-height:1.5; text-align:center; text-wrap:balance; }
.chat-error { margin-bottom:6px; padding:7px 10px; border:1px solid var(--red-line); border-left:3px solid var(--red); border-radius:8px; background:var(--red-bg); color:var(--red-ink); font-size:12px; }
.chat-scroll { flex:1; padding:7px 3px; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:9px; }
.chat-scroll:focus-visible, .review-list:focus-visible, .m-body:focus-visible { outline:3px solid #a8701f; outline-offset:2px; }
.msg { max-width:84%; padding:10px 13px; border:1px solid var(--line); border-radius:13px; background:var(--bg); box-shadow:var(--sh-xs); font-size:13.5px; line-height:1.48; overflow-wrap:anywhere; }
.msg .m-who { margin-bottom:3px; font-size:10.5px; font-weight:700; opacity:.72; }
.msg .m-time { margin-top:5px; color:var(--muted); font-size:10.5px; }
.msg .m-time .btn-link + .btn-link { margin-left:8px; }
/* Текст сообщения: переносы строк — как их поставил человек; строки «> …»
   (цитата, которую модератор пересылает другой стороне) — отдельным блоком. */
.msg .m-text { white-space:pre-wrap; }
.msg .m-quote { margin:0 0 6px; padding:1px 0 1px 10px; border-left:3px solid var(--line); color:var(--muted); }
.msg .m-quote:last-child { margin-bottom:0; }
.msg.out .m-quote { border-left-color:rgba(255,250,240,.4); color:#dbeae2; }
/* Точка на вкладке канала, где реплика участника ждёт ответа. */
.chan-tabs button .chan-dot { display:inline-block; width:7px; height:7px; margin-left:6px; border-radius:50%; background:var(--amber); vertical-align:1px; }
.chan-tabs button.active .chan-dot { background:#f3d38a; }
.msg.in { align-self:flex-start; border-bottom-left-radius:3px; }
.msg.out { align-self:flex-end; border-color:#265247; border-bottom-right-radius:3px; background:#265247; color:var(--cream); }
.msg.out .m-time { color:#c7d5cf; }
.msg .m-file a { margin-top:5px; display:inline-flex; align-items:center; gap:5px; font-size:12px; }
/* Значок вложения: icon() ставит svg во весь блок (width/height 100%), и без
   своего размера он растягивался до ширины пузыря — в чате заказа и в поддержке. */
.msg .m-file svg { width:14px; height:14px; flex:none; }
.msg.out .m-file a { color:#fff; text-decoration:underline; }
.chat-input { margin-top:11px; display:flex; align-items:flex-end; gap:7px; }
.chat-input .textarea { height:46px; min-height:46px; padding:11px 13px; }
/* Сигнал сотруднику: сообщение похоже на обмен контактами в обход сервиса. */
.msg .m-contact-flag { margin:2px 0 5px; }
.msg .m-contact-flag .badge { white-space:normal; text-align:left; line-height:1.3; }
/* Чипы шаблонов ответов: над полем ввода чата и в модалках сотрудника. */
.reply-templates { margin:9px 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.reply-templates .chip.sm { padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink-2); font-size:12px; font-weight:600; cursor:pointer; transition:border-color .15s,background .15s; }
/* Пальцем по чипу в 29 px не попасть — на узком экране делаем его выше. */
@media (max-width:560px) { .reply-templates .chip.sm { min-height:36px; padding:8px 12px; } }
.reply-templates .chip.sm:hover { border-color:var(--v300); background:var(--v50); color:var(--ink); }
.reply-templates .chip.sm:focus-visible { outline:3px solid #a8701f; outline-offset:1px; }
.chat .reply-templates { margin:9px 0 -3px; }
.chan-tabs { margin-bottom:11px; display:flex; flex-wrap:wrap; gap:6px; }
/* Вне режима шторки скрим не нужен: без этого правила он проявился бы на широком
   экране неоформленной кнопкой во весь экран. Внутри медиазапроса правило ниже
   возвращает ему display, а закрытое состояние приходит атрибутом hidden. */
.scrim { display:none; }
.chan-tabs button { min-height:38px; padding:7px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--muted); font-size:12.5px; font-weight:650; cursor:pointer; transition:background var(--dur),color var(--dur),border-color var(--dur),transform var(--dur-fast) var(--ease); }
.chan-tabs button:active:not(:disabled) { transform:scale(.97); }
.chan-tabs button.active { border-color:var(--primary); background:var(--primary); color:#fff; }
.chan-tabs button:disabled { opacity:.5; cursor:not-allowed; background:var(--disabled-bg); }

.submission-report { margin:0 0 10px; padding:12px 14px; border:1px solid var(--line); border-left:3px solid var(--green); border-radius:8px; background:var(--surface-2); font-size:13.5px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.submission-report .text-meta { margin-bottom:4px; }
/* Результаты по сдачам (W2-14): последняя раскрыта и выделена, прежние
   свёрнуты под заголовком «Сдача 1 · 12 окт · 1,1 МБ». */
.submission-group { margin:0 0 8px; }
.submission-group.is-latest { padding:8px 10px; border:1px solid var(--line); border-left:3px solid var(--green); border-radius:8px; background:var(--surface-2); }
.submission-head { color:var(--ink-2); font-size:12.5px; font-weight:650; }
details.submission-group > summary { cursor:pointer; color:var(--muted); }
/* Сдача, файлы которой снял срок хранения (ТЗ 28.10.26, п. 4d): остаётся в
   списке свёрнутой, пометка — приглушённым текстом под заголовком. */
.submission-expired { margin:4px 0 0; color:var(--muted); }
details.submission-group.is-expired > summary { font-style:italic; }
.revision-files { margin-top:6px; }
.empty { padding:54px 18px; color:var(--muted); text-align:center; }
/* Медальон с иконкой: тёплая подложка, двухслойная тень в тон карточкам и два
   концентрических латунных кольца-ореола вокруг — тот же мотив, что в подвале
   сайдбара. Пустой экран получает характер марки ателье, а не серую заглушку. */
.empty > span:first-child { position:relative; width:66px; height:66px; margin:0 auto 20px; padding:18px; display:flex!important; border-radius:50%; background:var(--grad-soft); box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-md); color:var(--accent-2); }
.empty > span:first-child::after { content:''; position:absolute; inset:-7px; border-radius:50%; border:1px solid color-mix(in srgb,var(--accent) 40%,transparent); }
/* Второе, более слабое кольцо — концентрический ореол, как в сайдбаре. */
.empty > span:first-child::before { content:''; position:absolute; inset:-15px; border-radius:50%; border:1px solid color-mix(in srgb,var(--accent) 16%,transparent); }
/* Только иконка-марка: правило «svg во весь блок» раньше раздувало иконки
   кнопок в пустом состоянии до гигантского плюса. */
.empty > span:first-child svg { width:100%; height:100%; }
.empty .empty-actions .btn svg { width:16px; height:16px; }
.empty b { display:block; margin-bottom:5px; color:var(--ink); font-family:var(--display); font-size:18px; letter-spacing:-.01em; }
.empty p { max-width:44ch; margin:4px auto 15px; font-size:13.5px; line-height:1.55; }
/* Ореолы-кольца у ошибки — в тон её палитре, а не латунные. */
.error-state > span:first-child::after { border-color:color-mix(in srgb,var(--red) 42%,transparent); }
.error-state > span:first-child::before { border-color:color-mix(in srgb,var(--red) 16%,transparent); }
.empty .empty-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.error-state > span:first-child { background:var(--red-bg); box-shadow:inset 0 0 0 1px var(--red-line); color:var(--red); }
.file-chip { max-width:100%; margin:5px 5px 0 0; padding:7px 10px; display:inline-flex; align-items:center; gap:6px; overflow-wrap:anywhere; border:1px solid var(--line); border-radius:7px; background:var(--chip-bg); font-size:12.5px; }
.file-chip:hover { border-color:var(--hover-line); background:var(--v100); }
.file-chip svg { width:14px; height:14px; flex:none; color:var(--accent-2); }
.money { font-variant-numeric:tabular-nums; white-space:nowrap; }
.text-muted { color:var(--muted); }
.text-danger { color:var(--red); }
.text-center{text-align:center}
/* Черта над блоком: два места рисовали её вручную, с разным отступом сверху. */
.divided-top{padding-top:14px;border-top:1px solid var(--line)}
/* Шкала отступов утилит та же, что у --s-*: 0-8-16-24. Половина ряда раньше
   отсутствовала (.mb-0, .mb-1, .mt-3), и разметка, где их писали, молча
   получала нулевой отступ — класс есть, правила нет, ошибку не видно.
   Это сверяет тест: каждая утилита из разметки обязана быть здесь. */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.m-0{margin:0}
/* Приглушённая подпись существовала в трёх размерах сразу — 13, 12.5 и 12 — и
   размер задавался инлайном в JS, мимо стилей. Ролей две: подпись под строкой
   и совсем мелкая отметка вроде даты. */
.text-meta{font-size:13px}.text-micro{font-size:12px}
.flex{display:flex}.between{justify-content:space-between}.items-center{align-items:center}.gap-2{gap:12px}.wrap{flex-wrap:wrap}
/* Выбор клиента в форме заказа */
.client-pick { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.client-pick .select { flex:1 1 220px; min-width:0; }
.client-pick .hint { flex-basis:100%; margin:0; }
.client-line { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }
/* Совпадение с прайсом под полем «Предмет»: вторая дверь к заказу. */
.price-match { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:6px; }
.price-match .btn { max-width:100%; white-space:normal; text-align:left; }
tr.is-archived td { opacity:.62; }
.ml-1 { margin-left:8px; }

/* Лендинг: форма «Опишите задачу» */
.start-section .wrap { max-width:760px; }
.guest-form { margin-top:22px; display:flex; flex-direction:column; gap:12px; text-align:left; }
.guest-row { display:flex; gap:12px; flex-wrap:wrap; }
.guest-row > .guest-title { flex:2 1 240px; min-width:0; }
.guest-row > .guest-subject { flex:1 1 170px; min-width:0; }
.guest-row > .guest-type { flex:1 1 170px; min-width:0; }
.guest-row.bottom { align-items:flex-end; justify-content:space-between; }
/* Лендинг всегда тёмный, независимо от темы кабинета: цвета берём его
   собственные (как у .lsection .sub), а не токены светлой темы. Подписи у
   всех полей видимые: плейсхолдер исчезает, как только начали печатать. */
.guest-field { display:flex; flex-direction:column; gap:6px; color:var(--cream); font-size:13px; font-weight:600; }
.guest-days .input { width:120px; }
.guest-note { margin:0; color:#9eafa7; font-size:12.5px; }
.start-section .form-error { border-color:#7c3f42; background:#2a1a1b; color:#ffb3ae; }
.cta-buttons { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }
/* Строка для авторов под кнопками плашки: ссылка, а не третья кнопка —
   главный призыв остаётся заказчику. */
.cta-alt { position:relative; margin:18px 0 0; color:#273631; font-size:14px; }
.cta-alt a { color:#17382f; font-weight:650; text-decoration:underline; text-underline-offset:3px; }
.cta-alt a:hover { color:#102c25; }
.authors-cta { margin-top:30px; text-align:center; }
@media (max-width:560px) {
  /* Поле на три цифры не заслуживает целой строки: срок слева, кнопка
     занимает остаток — на одну строку короче. */
  .guest-row.bottom { flex-direction:row; align-items:flex-end; }
  .guest-days { flex:0 0 112px; }
  .guest-days .input { width:100%; }
  .guest-row.bottom .btn { flex:1; min-width:0; justify-content:center; padding-inline:12px; }
}
@media (max-width:420px) {
  /* На самом узком экране кнопка рядом с полем срока не умещалась: стрелка
     вылезала за край на пиксель. Кнопка — второй строкой во всю ширину. */
  .guest-row.bottom .btn { flex:1 1 100%; }
}

/* Лендинг: «О нас», отзывы и подвал с контактами.
   Ни одного нового цвета: все значения ниже уже стоят выше в этом же файле —
   #d3a55d у .sec-label, #bdc9c3 у .hero-left .lead, #9eafa7 у .lsection .sub,
   #98aaa2 у .feat p, #91a39b у .hero-stats .l, #dcb374 у .lfoot-link a:hover прежнего подвала. */

/* Цифры компании. Это её история, а не показания счётчиков сервиса, поэтому
   подпись говорит «за восемь лет», а не просто «студентов». */

/* Команда. Фотографии со старого сайта — 189×189, поэтому круг не больше 92px:
   выше начнётся мыло, а оригиналов крупнее нет. */
.team-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.person { padding:26px 24px; border:1px solid rgba(255,250,240,.1); border-radius:3px 18px 3px 18px; background:rgba(255,255,255,.035); text-align:center; }
.person-photo { width:92px; height:92px; margin:0 auto 16px; display:block; border-radius:50%; border:1px solid rgba(216,170,97,.45); background:rgba(255,255,255,.04); object-fit:cover; }
.person-name { margin:0; color:var(--cream); font-family:var(--display); font-size:19px; font-weight:650; }
.person-role { margin-top:3px; color:#d3a55d; font-size:11.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.person p { margin:12px 0 0; color:#98aaa2; font-size:14px; line-height:1.62; }


/* Отзывы. Карточка-цитата: латунная кавычка вместо иконки, имя и дата снизу. */
/* Высота карточки следует за текстом: короткий отзыв не растягивается до
   высоты ряда, иначе между цитатой и подписью зияла пустота. align-items:start
   на сетке снимает выравнивание колонок по самой высокой карточке. */
.reviews-grid { align-items:start; }
.review { position:relative; display:flex; flex-direction:column; margin:0; padding:26px 26px 22px; border:1px solid rgba(255,250,240,.1); border-radius:3px 18px 3px 18px; background:rgba(255,255,255,.035); }
.review::before { content:'«'; position:absolute; top:10px; left:20px; color:rgba(216,170,97,.4); font-family:var(--display); font-size:46px; line-height:1; }
.review blockquote { position:relative; margin:0; padding-top:30px; color:#bdc9c3; font-size:14.5px; line-height:1.68; }
.review figcaption { margin-top:16px; padding-top:13px; display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; border-top:1px solid rgba(255,250,240,.09); }
.review-name { color:var(--cream); font-family:var(--display); font-size:16px; font-weight:650; }
.review-date { color:#91a39b; font-size:12.5px; }
.review-cut { margin-left:auto; color:#91a39b; font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
/* Опубликованных отзывов нет (все скрыты сотрудником) — раздел остаётся целью
   пункта «Отзывы» меню, с одной строкой вместо пустой сетки. */
.reviews-empty { margin:4px 0 0; color:#bdc9c3; font-size:15px; }

/* Подвал стал местом, куда идут за адресом и телефоном, а не набором якорей
   на эту же страницу. Двойная линейка — та же, что отбивает «Итого» в расчёте
   заказа: подвал так же подводит черту под страницей. */
.lfooter { text-align:left; }
.lfooter .lfooter-inner { align-items:stretch; }
.lfoot-cols { display:grid; grid-template-columns:1.5fr 1.05fr 1.05fr .85fr .95fr 1fr; gap:30px 28px; width:100%; padding-bottom:26px; border-bottom:3px double rgba(216,170,97,.4); }
/* Вход и регистрация — кнопками у марки, а не в хвосте списка ссылок. */
.lfoot-auth { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.lfoot-auth .btn { min-height:36px; }
.lfooter .lfoot-auth a { text-decoration:none; }
.lfooter .lfoot-auth .btn.brass { color:#162820; }
.lfooter .lfoot-auth .btn.outline-light { color:var(--cream); }
.lfoot-col p { max-width:34ch; margin:0 0 7px; color:#a4b6ae; line-height:1.55; }
.lfoot-me .lfooter-brand { margin-bottom:12px; }
.lfoot-about { color:#81938b; }
.lfoot-h { margin-bottom:11px; color:#d3a55d; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.lfoot-hours { display:grid; grid-template-columns:auto 1fr; gap:3px 14px; margin:0; padding:0; list-style:none; }
.lfoot-hours li { display:contents; }
.lfoot-day { color:#81938b; }
.lfoot-hours li span:last-child { color:#a4b6ae; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lfoot-num { color:#a4b6ae; font-variant-numeric:tabular-nums; }
.lfoot-tz { display:block; color:#81938b; font-size:11.5px; }
.lfoot-social { display:flex; flex-direction:column; gap:2px; margin-top:7px; }
.lfoot-nav { display:flex; flex-direction:column; gap:2px; }
/* Цель касания не ниже 24px: ссылки в подвале стоят столбиком вплотную. */
.lfoot-social a, .lfoot-nav a { display:inline-block; padding:3px 0; }
.lfooter a { color:#a4b6ae; text-decoration:none; }
.lfooter a:hover { color:#dcb374; text-decoration:underline; }
.lfoot-cols + p { padding-top:22px; }
.lfooter-inner > p:last-child { color:#81938b; }

@media (max-width:1000px) {
  .lfoot-cols { grid-template-columns:1fr 1fr 1fr; }
}
@media (max-width:760px) {
  .lfoot-cols { grid-template-columns:1fr 1fr; }
}
@media (max-width:820px) {
  .team-grid { grid-template-columns:1fr; }
}
@media (max-width:560px) {
  .lfoot-cols { grid-template-columns:1fr; gap:24px; }
  /* Якоря на разделы дублируют меню в шапке — на телефоне их нет, остаются
     политика и вход. Ссылки подвала, «Уже есть аккаунт? Войти» и вкладки
     карточки — цели касания от 44px. */
  .lfoot-nav .lfoot-anchor, .lfoot-anchors { display:none; }
  .lfoot-social a, .lfoot-nav a, .lfooter p > a { display:inline-block; padding:12px 0; }
  .auth-switch a { display:inline-block; padding:10px 8px; margin:-10px -8px; }
  .tabs button { min-height:44px; }
}

/* Материалы и свои авторы */
.material-list, .author-list { display:flex; flex-direction:column; gap:10px; }
.material-row, .author-row { padding:14px 16px; }
.material-main { min-width:0; flex:1 1 260px; }
.material-main b { display:block; overflow-wrap:anywhere; }
.author-row .t-title { font-weight:650; }

/* Верификация автора */
.verified-mark { display:inline-flex; align-items:center; gap:4px; margin-left:6px; padding:1px 6px 1px 4px; border-radius:999px; background:var(--green-bg); color:var(--green-ink); font-size:11.5px; font-weight:650; vertical-align:middle; }
.verified-mark svg { width:12px; height:12px; }
.verify-form { display:flex; flex-direction:column; gap:12px; }
.verify-form .field { margin:0; }
.verify-list { display:flex; flex-direction:column; gap:12px; }
.verify-row { padding:14px 16px; }
.verify-card .card-title .badge { margin-left:auto; }

/* Таблица пользователей: колонок много, и без нижней границы имя рассыпалось
   по одной букве в строку. Таблица и так прокручивается внутри своей обёртки. */
.users-table td:first-child, .users-table th:first-child { min-width:210px; }
.users-table td:nth-child(2) { min-width:150px; }
/* Колонка действий прилипает к правому краю: при горизонтальной прокрутке
   кнопки оставались за кадром, и до «Заблокировать» ехали вслепую. */
.users-table td:last-child { white-space:nowrap; }
.users-table td:last-child, .users-table th:last-child { position:sticky; right:0; z-index:1; background:var(--surface); box-shadow:-8px 0 8px -8px rgba(23,35,31,.18); }
.users-table tbody tr:hover td:last-child { background:var(--surface-2); }
.users-table thead th:last-child { background:var(--surface-2); }
.user-actions { flex-wrap:nowrap; gap:8px; }
.user-card .user-actions { flex-wrap:wrap; }
.user-card { padding:14px 16px; }
.user-card-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
.user-card-controls .select { width:100%; }
/* Промокоды: код читается целиком — в узкой колонке таблицы он рассыпался по
   две буквы в строку («PR / OB / E-»). На телефоне строки — карточками. */
.promo-code { white-space:nowrap; }
.promo-card { padding:14px 16px; }
/* Список людей: имя не ломается посреди слова, а кнопка «Досье» прилипает к
   правому краю, как действия в таблице пользователей, — на телефоне она
   уезжала за кадр. */
.people-table { min-width:760px; }
.people-table td:first-child, .people-table th:first-child { min-width:200px; overflow-wrap:normal; word-break:normal; }
.people-table td:last-child { white-space:nowrap; }
.people-table td:last-child, .people-table th:last-child { position:sticky; right:0; z-index:1; background:var(--surface); box-shadow:-8px 0 8px -8px rgba(23,35,31,.18); }
.people-table tbody tr:hover td:last-child { background:var(--surface-2); }
.people-table thead th:last-child { background:var(--surface-2); }
/* На телефоне таблица не прокручивается вбок: закреплённая справа кнопка
   «Досье» перекрывала бейдж уровня («Спе…», «Новый кли…»). Уровень, доступ и
   сигналы встают строкой под имя, их колонки прячутся. */
.people-table .people-sub { display:none; }
@media (max-width:600px) {
  table.data.people-table { min-width:0; }
  .people-table th:nth-child(2), .people-table th:nth-child(3), .people-table th:nth-child(4),
  .people-table td:nth-child(2), .people-table td:nth-child(3), .people-table td:nth-child(4) { display:none; }
  .people-table td:first-child, .people-table th:first-child { min-width:0; }
  .people-table .people-sub { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:6px; }
  .people-table .people-sub .sig-badges { max-width:none; }
}
/* Список людей: сотрудники отдельной группой, подписью-разделителем. */
.people-table .group-row td { padding:14px 12px 6px; color:var(--muted); font-size:12px; font-weight:650; text-transform:uppercase; letter-spacing:.04em; background:transparent; }
/* Сигналы в списке людей: бейджи в ячейке и ряд чипов-переключателей. */
.people-table .sig-badges { display:flex; flex-wrap:wrap; gap:4px; max-width:260px; }
.people-table .sig-badge { white-space:nowrap; }
.people-signal-chips { align-items:center; margin-top:-6px; }
.people-signal-chips .chips-label { margin-right:2px; }
.people-signal-chips .chip[hidden] { display:none; }
/* Досье: включённый переключатель меры (обязательная модерация, постоплата). */
.btn.ghost.is-on { border-color:var(--primary); color:var(--primary); background:var(--green-bg); }
/* Досье: последние заказы человека. */
.recent-orders { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; font-size:13.5px; }
.recent-orders li { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
/* Журнал: колонка заказа не растягивает таблицу длинным названием. Ширина
   таблицы больше общей — иначе на телефоне «Подробности» сжимали «Кто» до
   двух букв в строке; прокрутка идёт внутри .table-wrap, не у страницы. */
.audit-table { min-width:860px; }
.audit-table td:first-child { white-space:nowrap; }
.audit-table td:nth-child(2), .audit-table th:nth-child(2) { min-width:160px; }
.audit-table td:nth-child(2) a { overflow-wrap:normal; word-break:normal; white-space:nowrap; }
.audit-table .audit-order { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.audit-controls { align-items:center; }
/* Предпросмотр импорта прайса: семи колонкам общих 680 px мало. Хуже того,
   общий overflow-wrap:anywhere позволяет табличной раскладке сжать колонку до
   ОДНОЙ буквы — «Практика с ручным составом» превращалась в столбик. Здесь
   переносим по словам и задаём нижнюю границу ширины самым длинным колонкам
   (название, состав), а поля ячеек ужимаем, чтобы таблица целиком помещалась
   в широкое окно на 1366 px — без прокрутки вбок. Селекторы — с тегом table:
   общий table.data td сильнее класса без тега, и правила без него молча не
   действовали. */
table.price-import-table { min-width:900px; }
table.price-import-table th, table.price-import-table td { padding-right:12px; padding-left:12px; }
table.price-import-table td { overflow-wrap:break-word; vertical-align:top; }
/* Колонки: строка, действие, название (под ним — ID и адрес страницы), форма
   контроля, цена, срок, состав. Номер строки и срок («10–20 дн.») не
   переносятся вовсе: по номеру владелец находит строку в своей таблице, а
   срок из четырёх знаков раскладывался в столбик из-за тире, по которому
   раскладка разрешала перенос. */
table.price-import-table td:first-child, table.price-import-table th:first-child,
table.price-import-table td:nth-child(6), table.price-import-table th:nth-child(6) { white-space:nowrap; }
table.price-import-table th:nth-child(2) { min-width:150px; }
table.price-import-table th:nth-child(3) { min-width:230px; }
table.price-import-table th:nth-child(4) { min-width:124px; }
table.price-import-table th:nth-child(6) { min-width:96px; }
table.price-import-table th:nth-child(7) { min-width:200px; }
table.price-import-table .import-keys { overflow-wrap:anywhere; }
/* Строка «цена для преподавателей»: под предметом — что станет с ценой
   («цена для: Зарубин, Ильинская — 1 020 ₽ (новая)»). Это главное в строке,
   поэтому не приглушено, как ID предмета над ним. */
table.price-import-table .import-teacher-price { margin-top:4px; color:var(--ink-2); font-size:12.5px; line-height:1.5; overflow-wrap:anywhere; }
/* Строка обновления: прежняя и новая цена («5 500 → 6 000 ₽») одной строкой
   и под бейджем — что строка меняет у позиции («Что изменится: цена, срок»). */
table.price-import-table .import-price-change { white-space:nowrap; font-weight:600; color:var(--ink); }
table.price-import-table .import-changes { color:var(--ink-2); }
/* Волна 2 «удобная админка»: под названием — что делает с закреплениями
   колонка «Автор» («Автор: Ковтун А. — найден, закрепляется, ставка …»);
   под замечаниями — строка «по прежнему решению» и кнопки «Открыть позицию»
   и «Снизить ставку до N % цены». */
table.price-import-table .import-author { margin-top:4px; color:var(--ink-2); font-size:12.5px; line-height:1.5; overflow-wrap:anywhere; }
.import-note.import-decided { color:var(--muted); }
.import-note.import-note-actions { gap:6px 8px; padding-top:2px; }
.import-note.import-note-actions > .btn { flex:none; }
/* Строка предпросмотра — свой <tbody>: строка значений и, если есть что
   сказать, строка замечаний под ней во всю ширину таблицы. Зебра и черта
   между строками считаются по <tbody>, а не по <tr>: иначе строка замечаний
   красилась бы как отдельная строка таблицы. */
table.price-import-table tbody.import-row tr td { background:transparent; border-bottom:0; }
table.price-import-table tbody.import-row:nth-of-type(even) tr td { background:color-mix(in srgb,var(--v50) 55%,transparent); }
table.price-import-table tbody.import-row:hover tr td { background:var(--hover); }
table.price-import-table tbody.import-row tr:last-child td { border-bottom:1px solid var(--line-2); }
table.price-import-table tbody.import-row:last-of-type tr:last-child td { border-bottom:0; }
table.price-import-table tbody.import-row tr.import-row-notes td { padding-top:0; }
table.price-import-table tbody.import-row tr:not(:last-child) td { padding-bottom:8px; }
.import-note { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; color:var(--ink-2); font-size:12.5px; line-height:1.5; }
.import-note + .import-note { margin-top:4px; }
.import-note > span:not(.badge) { flex:1 1 260px; min-width:0; overflow-wrap:anywhere; }
.import-note .badge { flex:none; }
.import-note.text-danger { color:var(--red-ink); font-size:13px; overflow-wrap:anywhere; }
@media (max-width:640px) {
  /* На телефоне строка предпросмотра — карточка: прокрутка таблицы вбок внутри
     окна читается как поломка, а замечание уезжало бы за край экрана. Подпись
     колонки стоит перед значением, пустые ячейки («—») не показываются. */
  table.price-import-table { min-width:0; }
  table.price-import-table, table.price-import-table tbody, table.price-import-table tr, table.price-import-table td { display:block; width:100%; box-sizing:border-box; }
  table.price-import-table thead { display:none; }
  table.price-import-table tbody.import-row { padding:12px 14px; border-bottom:1px solid var(--line-2); }
  table.price-import-table tbody.import-row:last-of-type { border-bottom:0; }
  table.price-import-table tbody.import-row:nth-of-type(even) { background:color-mix(in srgb,var(--v50) 55%,transparent); }
  table.price-import-table tbody.import-row tr td,
  table.price-import-table tbody.import-row:nth-of-type(even) tr td,
  table.price-import-table tbody.import-row:hover tr td,
  table.price-import-table tbody.import-row tr:last-child td,
  table.price-import-table tbody.import-row tr:not(:last-child) td { padding:2px 0; border-bottom:0; background:transparent; white-space:normal; text-align:left; }
  table.price-import-table td.is-empty { display:none; }
  table.price-import-table td[data-label]::before { content:attr(data-label) ": "; color:var(--muted); font-size:12px; }
  table.price-import-table td:first-child[data-label]::before { content:attr(data-label) " "; }
  table.price-import-table td:first-child { color:var(--muted); font-size:12px; }
  table.price-import-table td.t-title { padding-top:4px; font-size:14.5px; }
  table.price-import-table tbody.import-row tr.import-row-notes td { padding-top:8px; }
}
/* Журнал писем: текст письма с переносами строк, без прыжков по ширине. */
.mail-card .mail-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13.5px; }
/* Сводка доставки над журналом: поле адреса тестового письма не тянется на
   всю строку, значения DNS-записей (SPF, DKIM-ключ) переносятся по символам
   моноширинным шрифтом, а не растягивают таблицу. */
.mail-panel .card-title .badge { margin-left:auto; font-weight:600; white-space:normal; overflow-wrap:anywhere; }
.mail-panel .stat-grid { margin-bottom:14px; }
.mail-panel .stat .t-warn { color:var(--amber-ink); }
.mail-panel input[type='email'] { max-width:320px; }
.mail-panel .mail-test-status { min-width:0; overflow-wrap:anywhere; }
.mail-dns-table td { vertical-align:top; }
.mail-dns-table .mail-dns-value { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:12px; overflow-wrap:anywhere; max-width:320px; }

/* Уровень автора и статус заказчика. В профиле карточки уровня и верификации
   держат ширину формы — иначе колонка «прыгала» от 660px к полной. */
.progress-card, .verify-card { max-width:660px; }
/* Раздел «Скидки» (public/js/dashboard/discounts.js): карточки одной колонкой,
   как «Прогресс» в профиле; строки состава скидки — подпись слева, процент справа. */
.discounts-page { max-width:720px; }
.discount-card p { margin:0 0 12px; }
.discount-card p:last-child { margin-bottom:0; }
.discount-card .card-title .level-badge { margin-left:auto; }
.discount-now b { font-size:28px; }
.discount-parts { margin:0 0 12px; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; font-size:14px; }
.discount-parts li { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-bottom:6px; border-bottom:1px dashed var(--line); }
.discount-parts li span { min-width:0; color:var(--ink-2); }
.discount-parts li b { flex:none; font-variant-numeric:tabular-nums; }
.discount-ladder { margin:14px 0 12px; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px; font-size:13.5px; }
.discount-ladder li { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; padding:7px 10px; border-radius:8px; }
.discount-ladder .dl-name { font-weight:650; color:var(--ink); }
.discount-ladder .dl-when { grid-column:1; color:var(--muted); font-size:12.5px; }
.discount-ladder .dl-pct { grid-column:2; grid-row:1 / span 2; align-self:center; font-variant-numeric:tabular-nums; }
.discount-ladder li.is-current { background:var(--v100); box-shadow:inset 3px 0 0 var(--accent); }
.discount-actions { display:flex; flex-wrap:wrap; gap:8px; }
.progress-card .card-title .level-badge { margin-left:auto; }
.level-badge { margin-left:8px; vertical-align:middle; }
.prog-stats { display:flex; flex-wrap:wrap; gap:10px; margin:2px 0 14px; }
.prog-stat { flex:1 1 120px; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.prog-stat b { display:block; font-size:19px; line-height:1.15; }
.prog-stat span { color:var(--muted); font-size:12.5px; }
.prog-stat.warn { border-color:var(--red-line); background:var(--red-bg); }
.prog-stat.warn b { color:var(--red-ink); }
.progress-card .onb-bar { margin:2px 0 10px; }
.perk-list { margin:12px 0 10px; padding:0; list-style:none; display:flex; flex-direction:column; gap:7px; }
.perk-list li { display:flex; align-items:flex-start; gap:8px; font-size:13.5px; }
.perk-list svg { width:15px; height:15px; flex:none; margin-top:2px; color:var(--green); }
/* Штрафы за просрочку (src/penalties.js): список событий в профиле и досье. */
.penalty-list { margin:8px 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; font-size:13px; }
.penalty-list li { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }

/* Строка управления списком: поиск слева, порядок справа */
.list-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.list-controls > .input { flex:1 1 240px; min-width:0; }
.sort-row { display:flex; align-items:center; gap:8px; margin-left:auto; }
.sort-row > span { white-space:nowrap; }
/* «Ещё отборы» сотрудника в «Все заказы» (W3-04, dashboard/orders.js):
   свёрнутый блок под строкой поиска; в подписи — сколько отборов включено. */
.more-filters { margin:-6px 0 14px; }
.more-filters > summary { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:0 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface-3); color:var(--ink-2); font-size:13px; font-weight:600; cursor:pointer; list-style:none; }
.more-filters > summary::-webkit-details-marker { display:none; }
.more-filters > summary svg { width:15px; height:15px; }
.more-filters > summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.more-filters[open] > summary { border-bottom-left-radius:0; border-bottom-right-radius:0; }
.more-filters-body { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 14px; padding:12px 14px; border:1px solid var(--line); border-radius:0 14px 14px 14px; background:var(--surface); }
.more-filters .mf-field { display:flex; flex-direction:column; gap:4px; flex:1 1 160px; min-width:150px; }
.more-filters .mf-field > .select, .more-filters .mf-field > .input { width:100%; }
.more-filters .mf-check { display:flex; align-items:center; gap:8px; min-height:40px; cursor:pointer; }
.more-filters .more-filters-export { margin-left:auto; }
@media (max-width:560px) { .more-filters .more-filters-export { width:100%; margin-left:0; justify-content:center; } }
/* Короткий номер заказа (W3-04): в таблице списка сотрудника и в шапке
   карточки — рядом с «Скопировать ссылку на заказ». */
.order-no-sub { font-weight:600; letter-spacing:.04em; }
.order-no-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-top:8px; }
.order-no { font-size:13.5px; font-weight:700; letter-spacing:.06em; color:var(--ink-2); }
.promo-table tr.is-highlighted > td, .promo-card.is-highlighted { box-shadow:inset 0 0 0 2px var(--accent-2); }
.sort-select { width:auto; min-width:170px; }
@media (max-width:560px) { .sort-row { width:100%; margin-left:0; } .sort-select { flex:1; min-width:0; } }

/* Этапы заказа. Имена классов собственные: .step и .steps уже заняты
   карточками «Как это работает» на лендинге (min-height:226px и вертикальные
   разделители), и лента наследовала их вид. */
.order-steps { display:flex; margin:0 0 18px; padding:2px 0 0; list-style:none; overflow-x:auto; scrollbar-width:thin; }
.order-step { position:relative; flex:1 1 0; min-width:78px; display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; }
/* Соединитель тянется влево от точки: пройденный путь — зелёный. */
.order-step::before { content:''; position:absolute; top:10px; right:50%; width:100%; height:2px; background:var(--line); }
.order-step:first-child::before { display:none; }
.order-step.done::before, .order-step.current::before { background:var(--green); }
.ostep-dot { position:relative; z-index:1; width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; border:2px solid var(--line); border-radius:50%; background:var(--surface); color:transparent; font-size:11px; font-weight:700; line-height:1; }
.order-step.done .ostep-dot { border-color:var(--green); background:var(--green); color:var(--on-green); }
.order-step.current .ostep-dot { border-color:var(--green); background:var(--surface); box-shadow:0 0 0 4px var(--green-bg); }
/* Последний этап пройден — кружок закрашен и подсвечен: заказ завершён, а не «в процессе». */
.order-step.done.current .ostep-dot { background:var(--green); color:var(--on-green); box-shadow:0 0 0 4px var(--green-bg); }
.ostep-label { padding:0 4px; color:var(--muted); font-size:12px; line-height:1.25; }
.order-step.current .ostep-label { color:var(--ink); font-weight:650; }
.order-step.done .ostep-label { color:var(--ink); }
@media (max-width:560px) { .order-step { min-width:72px; } .ostep-label { font-size:11px; } }

/* «Что сделать сейчас» */
.attention .card-title::after { display:none; }
.att-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.att-item { display:flex; align-items:center; gap:12px; padding:10px 12px 10px 14px; border:1px solid var(--line); border-left-width:4px; border-radius:10px; background:var(--surface-2); }
.att-item.p1 { border-left-color:var(--red); }
.att-item.p2 { border-left-color:var(--amber); }
.att-item.p3 { border-left-color:var(--green); }
.att-ico { width:32px; height:32px; flex:none; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:var(--surface); box-shadow:inset 0 0 0 1px var(--line); color:var(--muted); }
.att-ico svg { width:16px; height:16px; }
.att-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; font-size:14px; }
.att-body b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.att-body span { color:var(--muted); font-size:13px; }
.att-item .btn { flex:none; }
/* На телефоне заголовок пункта не режется до «Репетитор по о…»: текст занимает
   всю ширину после иконки, а кнопка переезжает на вторую строку под него. */
@media (max-width:560px) {
  .att-item { flex-wrap:wrap; }
  .att-body { flex:1 1 calc(100% - 44px); }
  .att-body b { white-space:normal; }
  .att-item .btn { margin-left:44px; }
}
/* «Мой план»: те же строки, что в «Что сделать сейчас», плюс действия справа. */
.plan-list { display:flex; flex-direction:column; gap:8px; }
.plan-item .att-body b { white-space:normal; }
.plan-actions { display:flex; align-items:center; gap:12px; flex:none; flex-wrap:wrap; justify-content:flex-end; }
.plan-actions .btn-link { font-size:13px; }
.plan-closed summary, .plan-past summary { cursor:pointer; font-size:13.5px; }
/* Куратор семестра (dashboard/curator.js): список подопечных — те же строки
   внимания с аватаром; карточка «Ваш куратор» и блок в досье — две колонки. */
.curator-list { display:flex; flex-direction:column; gap:8px; }
.curator-row { background:var(--surface); }
.curator-row .att-body b { white-space:normal; }
.curator-row .att-body .badge { align-self:flex-start; margin-top:3px; }
.curator-name { color:var(--ink); text-decoration:none; }
.curator-name:hover { color:var(--primary); }
.curator-actions { flex:none; display:flex; align-items:center; gap:8px; }
.curator-who { display:flex; align-items:flex-start; gap:12px; }
.curator-who > div { min-width:0; }
.curator-dossier .select { max-width:420px; }
.curator-card .card-title { margin-bottom:12px; }
.curator-semester { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.curator-semester .att-item { padding:8px 10px 8px 12px; }
.h4-sm { margin:0 0 8px; font-size:14px; font-family:var(--display); font-weight:650; }
.quote-line.curator-fee b { color:var(--amber-ink); }
@media (max-width:760px) { .curator-semester { grid-template-columns:1fr; } }
@media (max-width:560px) {
  .curator-row { flex-wrap:wrap; }
  .curator-row .att-body { flex:1 1 calc(100% - 50px); }
  .curator-row .att-body .badge { white-space:normal; text-align:left; }
  .curator-row .curator-actions { flex:1 1 100%; margin-left:50px; }
  .curator-row .curator-actions .btn { margin-left:0; }
}
@media (max-width:560px) {
  .plan-actions { flex:1 1 100%; gap:4px 8px; margin-left:44px; justify-content:flex-start; }
  .plan-item .btn { margin-left:0; }
}
/* «Пригласить друга» (волна 3 — блок страницы «Скидки и бонусы»): кнопки
   «Поделиться», QR-код, список приглашённых и подзаголовки блока. */
.share-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.share-row .share-btn { flex:0 1 auto; }
.share-qr { margin-top:12px; display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.share-qr .qr-canvas { width:180px; height:180px; }
.referral-card h3 { margin:0 0 8px; font-size:15px; font-weight:650; }
.invitees-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.invitee { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); font-size:14px; }
.invitee-name { font-weight:600; }
.invitee .badge { margin-left:auto; flex:none; }
.invitee.is-paid { border-color:var(--green-line); }
@media (max-width:480px) { .share-row .share-btn { flex:1 1 calc(50% - 8px); justify-content:center; } }
/* «Пригласить друга»: ссылка + «Скопировать», три цифры под ней. */
.referral-row { display:flex; gap:8px; align-items:center; }
.referral-row .referral-link { flex:1; min-width:0; font-size:13.5px; font-variant-numeric:tabular-nums; }
.referral-row .btn { flex:none; }
.referral-code { margin-top:8px; }
.referral-code .mono { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing:.06em; color:var(--ink); }
.stat-grid.referral-stats { grid-template-columns:repeat(3,minmax(0,1fr)); margin:14px 0 10px; }
.stat-grid.referral-stats .stat { padding:12px 14px; }
.stat-grid.referral-stats .st-n { font-size:22px; }
.referral-card.is-compact .referral-stats { margin:10px 0 6px; }
.referral-card.is-compact .referral-code { display:none; }
.referral-card .card-title .ct-action { font-family:var(--font); }
@media (max-width:560px) {
  .referral-row { flex-wrap:wrap; }
  .referral-row .referral-link { flex-basis:100%; }
  .stat-grid.referral-stats { gap:8px; }
  .stat-grid.referral-stats .st-n { font-size:18px; }
}
.steps-list { margin:0 0 12px; padding-left:20px; display:flex; flex-direction:column; gap:6px; font-size:14px; }
/* Отчёт посредника за период: управление датами и плитки итогов. */
.report-controls .row { margin-bottom:10px; }
/* Шесть плиток отчёта: по ширине, на телефоне — по две. */
.stat-grid.report-stats { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.stat-grid.report-stats .stat { padding:14px 16px; }
.stat-grid.report-stats .st-n { font-size:22px; }
.stat-grid.report-stats .st-ico { display:none; }
table.data tfoot th, table.data tfoot td { font-weight:650; border-top:2px solid var(--line); }

/* Карточка заказа: полоса статуса слева и прогресс срока снизу */
/* Полоса слева — тем же цветом, что бейдж статуса (см. statusBadge в util.js):
   ожидание проверки — янтарь, аукцион — фиолетовый, работа — синий, готово —
   зелёный, спор — красный. Раньше полоса и бейдж спорили друг с другом. */
.order-card.st-moderation::before, .order-card.st-review::before, .order-card.st-revision::before { background:var(--amber); }
.order-card.st-auction::before { background:var(--badge-violet-ink); }
.order-card.st-assigned::before, .order-card.st-in_progress::before { background:var(--blue); }
.order-card.st-completed::before, .order-card.st-paid::before { background:var(--green); }
.order-card.st-arbitration::before { background:var(--red); }
.order-card.st-cancelled::before, .order-card.st-draft::before, .order-card.st-scheduled::before { background:var(--line); }
.order-card.invited { box-shadow:0 0 0 1px var(--amber-line), var(--shadow-1, 0 1px 2px rgba(0,0,0,.04)); }
.oc-badges { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.oc-progress { margin-top:10px; height:4px; border-radius:999px; background:var(--v100); overflow:hidden; }
.oc-progress-fill { height:100%; border-radius:999px; background:var(--green); }
.oc-progress.warm .oc-progress-fill { background:var(--amber); }
.oc-progress.over .oc-progress-fill { background:var(--red); }
/* W2-01: «Ваш ход: …» и W2-02 «Студенту работа нужна к …» — в карточке
   списка и в строке таблицы; бейдж «новое сообщение» не переносится. */
.next-step { margin-top:6px; font-size:13px; color:var(--ink-2); }
.next-step b { color:var(--primary); font-weight:650; }
.next-step.is-late b, .next-step.is-late { color:var(--red); }
.need-by { margin-top:4px; display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--muted); }
.need-by svg { width:14px; height:14px; flex:none; }
table.data .next-step { margin-top:4px; font-size:12.5px; }
table.data .deadline-cell-badge { margin-top:4px; }
.badge.chat-new { white-space:nowrap; }

/* Чип приглашения прежнего автора в форме заказа */
.invite-chip { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 14px; padding:10px 12px; border:1px solid var(--amber-line); border-radius:10px; background:var(--amber-bg); color:var(--amber-ink); font-size:14px; }
.invite-chip svg { width:16px; height:16px; flex:none; }
.invite-chip .btn { margin-left:auto; }

/* Чеклист первого входа */
.onboarding .card-title::after { display:none; }
.onb-bar { height:6px; margin:2px 0 14px; border-radius:999px; background:var(--v100); overflow:hidden; }
.onb-fill { height:100%; border-radius:999px; background:var(--grad); transition:width var(--dur-slow) var(--ease); }
.onb-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.onb-list li { display:flex; align-items:center; gap:10px; font-size:14px; }
.onb-list li.done { color:var(--muted); text-decoration:line-through; text-decoration-color:var(--line); }
.onb-mark { width:20px; height:20px; flex:none; display:inline-flex; align-items:center; justify-content:center; border:1.5px solid var(--line); border-radius:50%; font-size:12px; font-weight:700; color:var(--green-2); background:var(--surface-2); }
.onb-list li.done .onb-mark { border-color:var(--green); background:var(--green-bg); }
.onb-list a { font-weight:600; }
/* «Два способа заказать» на пустой главной студента (W2-12): два входа рядом, на
   телефоне — друг под другом. */
.student-start-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px; }
.student-start-choice { display:flex; flex-direction:column; gap:4px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); color:inherit; text-decoration:none; }
.student-start-choice:hover { border-color:var(--primary); }
.student-start-choice b { color:var(--primary); }
/* «Новый заказ» в плашке «Для вашего вуза готового прайса пока нет» — кнопка, а не ссылка текста. */
.no-own-price a.btn { text-decoration:none; }
/* Свёрнутый чек-лист после первого заказа: одна строка вместо карточки. */
.onb-compact { display:flex; align-items:center; gap:10px; padding:9px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--muted); font-size:13.5px; }
.onb-compact > span:first-child { display:inline-flex; color:var(--green-2); }
.onb-compact > span:first-child svg { width:16px; height:16px; }
.onb-compact .onb-text { flex:1; min-width:0; }
.onb-compact .onb-text a { font-weight:600; }
/* Inline-трек в компактной плашке: узкий, фиксированной ширины, тем же
   градиентом, что полная карточка — прогресс виден, плашка перестаёт быть плоской. */
.onb-compact .onb-bar-inline { flex:0 0 84px; height:5px; margin:0; }
.onb-compact .btn-link { flex:none; font-size:13px; }
@media (max-width:560px) { .onb-compact .onb-bar-inline { flex-basis:56px; } }
/* Мастер «Анкета автора» (author-onboarding.js): шапка шага с полосой того же
   градиента, что чек-лист; список шагов — чипами в строку, на телефоне они
   переносятся; вложенные блоки шага (условия, допуск) — без второй рамки. */
.onb-wizard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:8px; }
.onb-wizard-head h2 { font-size:20px; }
.onb-wizard-steps { display:flex; flex-wrap:wrap; gap:6px 14px; margin:0 0 16px; padding:0; list-style:none; font-size:13.5px; }
.onb-wizard-steps li .btn-link { color:var(--muted); text-decoration:none; }
.onb-wizard-steps li.done .btn-link { color:var(--green-2); }
.onb-wizard-steps li.current .btn-link { color:var(--ink); font-weight:700; }
.onb-wizard-body .field { margin-bottom:12px; }
.onb-wizard-body .input, .onb-wizard-body .select, .onb-wizard-body .textarea { width:100%; max-width:100%; }
.onb-wizard-body .checks-grid { max-height:240px; overflow:auto; }
.onb-wizard-sub { padding:14px 0 4px; border-top:1px solid var(--line); }
.onb-wizard-sub h3 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-size:16px; }
.onb-wizard-sub h3 svg { width:18px; height:18px; }
.onb-wizard-left { padding-left:18px; }
.onb-wizard-left li { margin:4px 0; }
.onb-wizard-foot { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.onb-wizard-foot .btn svg { width:16px; height:16px; }

/* Скелетоны первичной загрузки: серые контуры на месте будущих карточек.
   Мерцание отключается вместе с остальной анимацией. */
.skel-card { margin-bottom:14px; padding:20px 22px; border:1px solid var(--line-2); border-radius:3px 15px 3px 15px; background:var(--surface); }
.skel-line { height:12px; margin:9px 0; border-radius:6px; background:linear-gradient(90deg,var(--line-2) 25%,var(--skel-mid) 50%,var(--line-2) 75%); background-size:200% 100%; animation:skel-shimmer 1.4s ease-in-out infinite; }
.skel-line.w35 { width:35%; } .skel-line.w45 { width:45%; } .skel-line.w60 { width:60%; } .skel-line.w90 { width:90%; }
@keyframes skel-shimmer { to { background-position:-200% 0; } }
.spinner { width:34px; height:34px; margin:48px auto; border:3px solid var(--spin-track); border-top-color:var(--primary); border-radius:50%; animation:spin .72s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes ndot-pop { 0% { transform:scale(.3); } 65% { transform:scale(1.15); } 100% { transform:scale(1); } }
.content > * { animation:content-in .28s ease both; }
.content > *:nth-child(2) { animation-delay:.05s; }
.content > *:nth-child(3) { animation-delay:.09s; }
.content > *:nth-child(n+4) { animation-delay:.13s; }
@keyframes content-in { from { opacity:0; transform:translateY(6px); } }

.rating-stars { margin:7px 0 10px; display:flex; justify-content:center; gap:4px; }
/* Невыбранная звезда была 1.74:1 к фону — контур практически не читался. */
.rating-star { width:43px; height:43px; padding:0; border:0; border-radius:50%; background:transparent; color:#8e887d; font-size:29px; line-height:1; cursor:pointer; transition:color .12s,transform .12s,background .12s; }
.rating-star:hover,.rating-star.filled { color:#96591a; transform:translateY(-1px); }
.rating-star:focus-visible { background:var(--star-focus); }
.rating-star:active { transform:translateY(0) scale(.9); }
.payment-quote { padding:15px; border:1px solid var(--line); border-radius:10px; background:var(--quote-bg); }
.quote-line { padding:6px 0; display:flex; justify-content:space-between; gap:18px; color:var(--muted); font-size:13.5px; }
.quote-line b { color:var(--ink); font-variant-numeric:tabular-nums; text-align:right; }
/* Отрицательный итог должен перебивать общее правило цвета внутри строки расчёта. */
.quote-line b.text-danger { color:var(--red); }
.quote-line.discount b { color:var(--green-2); }
/* Двойная линия из бухгалтерской книги: итог выделен типографикой, а не цветом. */
.quote-line.total { margin:6px 0 3px; padding-top:12px; border-top:3px double var(--line); border-top-color:color-mix(in srgb,var(--accent) 45%,var(--line)); color:var(--ink); font-weight:650; }
.quote-line.total b { font-family:var(--display); font-size:20px; }
/* Блок оплаты в карточке заказа: предоплата после назначения автора. Латунная
   кромка слева — как у «сдачи» и отчёта, чтобы взгляд цеплялся за деньги. */
.pay-card { border-left:4px solid var(--accent); }
.pay-card.pay-pending { border-left-color:var(--amber); }
.pay-card .promo-row .input { flex:1; min-width:0; }
.pay-card .pay-actions .btn { min-width:200px; }
/* «Что вас защищает»: список с иконками, как лента этапов, — датами, а не правилами. */
.protect-card { border-color:var(--green-line); }
.protect-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:11px; }
.protect-row { display:flex; align-items:flex-start; gap:11px; font-size:13.5px; line-height:1.42; }
.protect-row b { display:block; font-weight:650; }
.protect-ico { flex:none; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--green-bg); color:var(--green-ink); }
.protect-ico svg { width:15px; height:15px; }
.protect-row.muted { color:var(--muted); }
.protect-row.muted .protect-ico { background:var(--badge-gray-bg); color:var(--badge-gray-ink); }
.protect-row.overdue b { color:var(--red-ink); }
.protect-row.overdue .protect-ico { background:var(--red-bg); color:var(--red-ink); }
/* Строка срочности в прайс-модалке — предупреждение, а не ошибка. */
.urgency-line { color:var(--amber-ink); }
/* Платёж в служебном блоке сотрудника. */
.staff-payment { padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.staff-payment .kv { grid-template-columns:80px minmax(0,1fr); gap:5px 12px; }
/* «Деньги по заказу» (волна «омни», AD1-08): итоги, все платежи и история. */
.staff-money { padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.staff-money > .flex svg { width:16px; height:16px; color:var(--muted); }
.staff-money .staff-money-totals { grid-template-columns:150px minmax(0,1fr); gap:4px 12px; margin-top:8px; }
.staff-money-fold summary { cursor:pointer; padding:6px 0; color:var(--ink); font-size:13.5px; font-weight:600; }
.staff-money-payments, .staff-money-rows { margin:4px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.staff-money-payment { padding:8px 10px; border:1px solid var(--line-2); border-radius:8px; }
.staff-money-rows li { font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.staff-money-rows li.is-info { color:var(--muted); }

/* ---------- Toast ---------- */
/* прайс-лист */
.price-card { margin-bottom:14px; }
.price-seo { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.price-seo a { overflow-wrap:anywhere; }
/* Счётчик знаков описания: до порога — приглушённый, после — зелёный. */
.char-count { margin-top:5px; color:var(--muted); font-size:12.5px; font-variant-numeric:tabular-nums; }
.char-count.ok { color:var(--green-ink); }
.price-seo-field > span:first-child { display:flex; align-items:center; gap:8px; }
.price-seo-field .badge { text-decoration:none; }
.price-card .price { font-family:var(--display); font-size:21px; font-weight:700; color:var(--primary); font-variant-numeric:tabular-nums; }
/* Прайс-карточка высокая: строка «статус + действия» отделена от состава
   волосяной линией и лёгким полем — статус слева читается зоной, кнопки справа
   не сливаются со списком компонентов. Кнопка справа прижата к краю. */
.price-card .price-actions { margin-top:16px; padding-top:14px; border-top:1px solid var(--line-2); row-gap:10px; }
.price-card .price-actions .badge { margin-right:2px; }
.price-components { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.component-chip { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border:1px solid var(--line); border-radius:999px; background:var(--v50); font-size:13px; }
.component-chip b { font-variant-numeric:tabular-nums; white-space:nowrap; flex:none; }
/* «Что входит» автору (W1-04): части без цен списком, исключённые — строкой «кроме: …». */
.composition-list { margin:0; padding:0 0 0 18px; font-size:13.5px; line-height:1.5; }
.composition-list li { margin:2px 0; overflow-wrap:anywhere; }
.composition-excluded { margin-top:6px; overflow-wrap:anywhere; }
/* Требования к работе: объём — свободный текст, переносится и не обрезается. */
.req-note { margin-top:8px; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
/* Абонемент на предмет (subscription.js): компоненты заказа со своей сдачей и
   приёмкой. Точка слева повторяет цвет статуса, полоса сверху — сколько принято. */
.comp-progress { height:6px; margin:4px 0 14px; border-radius:999px; background:var(--v100); overflow:hidden; }
.comp-progress-fill { height:100%; border-radius:999px; background:var(--green); transition:width .3s ease; }
.comp-list { list-style:none; margin:0; padding:0; }
.comp-row { padding:12px 0; border-top:1px solid var(--line-2); }
.comp-row:first-child { border-top:0; padding-top:0; }
.comp-head { display:grid; grid-template-columns:10px 1fr auto; align-items:flex-start; gap:4px 10px; }
.comp-dot { flex:none; width:10px; height:10px; margin-top:6px; border-radius:50%; background:var(--badge-gray-ink); }
.comp-row.submitted .comp-dot { background:var(--amber); }
.comp-row.accepted .comp-dot { background:var(--green); }
.comp-row.revision .comp-dot { background:var(--red); }
.comp-title { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.comp-title b { overflow-wrap:anywhere; }
.comp-head .badge { justify-self:end; }
.comp-reports { margin:10px 0 0 20px; }
.comp-reports .submission-report { margin-bottom:6px; }
.comp-files { margin-left:20px; }
.comp-actions { margin:10px 0 0 20px; }
.comp-money { margin-top:14px; padding-top:12px; border-top:1px solid var(--line-2); font-size:14px; }
.comp-money .hint { margin-top:4px; }
.comp-reorder:not(:empty) { margin-top:14px; }
/* «Мои предметы» автора (волна 2, W2-04): строка раскрывается — части без цен,
   требования, задания, «Ставка занижена» и пауза по предмету. Раздел
   «Предметы»: каталог с «Хочу брать» и свои заявки. */
.subject-row { border-top:1px solid var(--line-2); }
.subject-row:first-child { border-top:0; }
.subject-summary { display:flex; justify-content:space-between; align-items:center; gap:6px 12px; flex-wrap:wrap; padding:10px 0; cursor:pointer; list-style:none; }
.subject-summary::-webkit-details-marker { display:none; }
.subject-summary::before { content:'▸'; flex:none; color:var(--muted); transition:transform .15s ease; }
.subject-details[open] > .subject-summary::before { transform:rotate(90deg); }
.subject-head { flex:1 1 220px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.subject-head b { overflow-wrap:anywhere; }
.subject-body { padding:0 0 12px 18px; }
.subject-kv { grid-template-columns:130px minmax(0,1fr); }
.subject-kv dd { font-weight:500; }
.subject-reqs { margin:0; padding-left:18px; line-height:1.5; }
.subject-reqs .badge { margin-left:6px; }
.subject-file-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.subject-file-links { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:2px; font-size:13px; }
.subject-file-links a { display:inline-flex; align-items:center; gap:4px; overflow-wrap:anywhere; }
.subject-file-links svg { width:14px; height:14px; flex:none; }
.subject-actions { margin-top:4px; align-items:center; }
.subject-filters { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap:8px; margin-bottom:8px; }
.subject-catalog, .pin-request-list { list-style:none; margin:8px 0 0; padding:0; }
.subject-catalog-row, .pin-request-row { display:flex; justify-content:space-between; align-items:flex-start; gap:8px 12px; flex-wrap:wrap; padding:10px 0; border-top:1px solid var(--line-2); }
.subject-catalog-row:first-child, .pin-request-row:first-child { border-top:0; }
.pin-request-row > div:first-child { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
.subject-catalog-action { flex:none; }
@media (max-width:600px) {
  .subject-filters { grid-template-columns:1fr; }
  .subject-body { padding-left:0; }
  .subject-kv { grid-template-columns:1fr; gap:2px 0; }
  .subject-kv dd { margin-bottom:6px; }
  .subject-actions .btn, .subject-catalog-action, .subject-catalog-action .btn { width:100%; justify-content:center; }
}
@media (max-width:600px) {
  /* На телефоне бейдж статуса уходит под название — длинные названия
     компонентов иначе выталкивали точку на отдельную строку. */
  .comp-head { grid-template-columns:10px 1fr; }
  .comp-head .badge { grid-column:2; justify-self:start; }
}
/* Семестр пакетом: предмет в корзине помечен рамкой, кнопка «В пакете» — нажатой. */
.price-card.in-cart { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent), var(--sh-sm); }
/* Поиск прайса шире соседних списков: в него вставляют список номеров, и
   подсказка «несколько ID — через запятую» должна читаться целиком. Основа —
   260 px: на 1366 у администратора в ряд встают и поиск, и три списка, и
   «Сбросить фильтры» — кнопка не переносится и не сдвигает список вниз. */
.price-filters .price-search { flex:2 1 260px; }
@media (max-width:520px) { .price-filters .price-search { flex-basis:100%; } }
/* Поиск одним номером: позиция, чей ID предмета совпал целиком, — первой и
   с рамкой цвета акцента. */
.price-card.is-exact-match { border-color:var(--primary); box-shadow:0 0 0 1px var(--primary); }
/* Отбор «Состояние» и автор (W2-02): узкие списки в ряду фильтров; числа
   сводки вуза — кнопки с тем же отбором, на вид как чипы. */
.price-filters .price-state-filter { flex:0 1 240px; }
.price-filters .price-author-filter { flex:0 1 200px; }
button.price-state-chip { cursor:pointer; font:inherit; color:inherit; }
button.price-state-chip:hover { border-color:var(--primary); color:var(--primary); }
button.price-state-chip:focus-visible { outline:3px solid #a8701f; outline-offset:2px; }
/* Массовые действия (W2-01): панель над списком — счётчик выбранного,
   «Выбрать все найденные», действие и «Далее»; галочка — слева от названия
   карточки; список «было → стало» в окне прокручивается внутри себя. */
.price-bulk-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 14px; margin-bottom:12px; }
.price-bulk-bar .mi { width:16px; height:16px; color:var(--green); flex:none; }
.price-bulk-bar .spacer { flex:1 1 auto; }
.price-bulk-bar .price-bulk-count { font-size:13.5px; font-weight:650; white-space:nowrap; }
.price-bulk-bar .price-bulk-action { flex:0 1 240px; min-width:0; }
.price-head-pick { position:relative; padding-left:28px; }
.price-head-pick .price-pick { position:absolute; left:0; top:4px; width:18px; height:18px; margin:0; cursor:pointer; }
.bulk-preview-title { font-family:var(--display); font-size:18px; }
.bulk-rows { margin:8px 0 0; padding:0; list-style:none; max-height:48vh; overflow:auto; border-top:1px solid var(--line-2); }
.bulk-rows li { padding:6px 0; border-bottom:1px solid var(--line-2); font-size:13.5px; line-height:1.45; overflow-wrap:anywhere; }
.bulk-rows li.is-skipped { color:var(--muted); }
/* Цены частей у всех позиций (ТЗ «28.10.26», п. 6): кнопки «Цена части»,
   «Акция по части», «Акции по частям» под панелью массовых действий; подпись
   «Акция до …» у цены карточки, части и строки корзины; список акций;
   плашка «Задание изменилось» и «Беру за N ₽» в аукционе (ответ 14.10.26). */
.part-price-actions { margin:-4px 0 12px; }
.price-promo, .cart-promo { color:var(--green); font-weight:600; }
.part-promo-mark { color:var(--green); font-size:12px; font-weight:600; white-space:nowrap; }
.component-chip.is-promo { border-color:var(--green); }
.price-author-reward { white-space:nowrap; }
.part-promo-list { margin:0; padding:0; list-style:none; }
.part-promo-row { padding:10px 0; border-bottom:1px solid var(--line-2); overflow-wrap:anywhere; }
.part-promo-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.part-promo-stop { margin-top:6px; align-items:center; }
.task-change-form .field { min-width:0; }
.bid-fixed-reward { font-size:18px; margin:2px 0 4px; }
/* Массовые действия «Всех заказов» и «Пользователей» и выбор в «Семестре»
   досье (волна «омни-2», ops-tools): галочка — в первой ячейке строки или в
   углу карточки узкого списка; общий код таблиц колонок о ней не знает. */
table.data td.ops-pick-cell { position:relative; padding-left:38px; }
table.data td.ops-pick-cell > .ops-pick { position:absolute; left:12px; top:50%; transform:translateY(-50%); width:18px; height:18px; margin:0; cursor:pointer; }
.order-list > .ops-pick-cell { position:relative; padding-left:44px; }
.order-list > .ops-pick-cell > .ops-pick { position:absolute; left:14px; top:18px; width:18px; height:18px; margin:0; cursor:pointer; }
table.data .ops-pick-col { width:34px; padding-right:0; }
table.data .ops-pick-col .price-pick { width:18px; height:18px; margin:0; cursor:pointer; }
.ops-bulk-bar .btn-link[hidden] { display:none; }
.bulk-rows .ops-mark { width:14px; height:14px; margin-right:6px; vertical-align:-2px; color:var(--green); }
.bulk-rows li.is-skipped .ops-mark { color:var(--muted); }
.override-dialog .bulk-rows { margin-bottom:14px; }
.ops-bulk-bar.has-selection { position:sticky; top:78px; z-index:6; box-shadow:var(--paper-edge),var(--sh-md); }
/* На телефоне панель не липнет (заняла бы пол-экрана), кнопки — по две в ряд. */
@media (max-width:600px) {
  .ops-bulk-bar.has-selection { position:static; box-shadow:none; }
  .price-bulk-bar.ops-bulk-bar > .btn { flex:1 1 calc(50% - 6px); }
}
.coverage-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 14px; margin:12px 0 0; }
.coverage-tools .coverage-search { flex:1 1 220px; min-width:0; }
.coverage-tools .spacer { flex:1 1 auto; }
.coverage-table .coverage-pick { width:28px; padding-right:0; }
.coverage-table .coverage-pick .price-pick { width:18px; height:18px; margin:0; cursor:pointer; }
@media (max-width:600px) {
  .price-bulk-bar .spacer, .coverage-tools .spacer { display:none; }
  .price-bulk-bar .price-bulk-action, .price-bulk-bar > .btn, .coverage-tools > .btn { flex:1 1 100%; }
}
/* Прайс таблицей (волна 3, W3-01): переключатель «Карточки / Таблица» в конце
   ряда фильтров; строка на позицию, сто строк на страницу; цена — кнопка, по
   нажатию поле ввода (Enter сохраняет). Таблица прокручивается внутри
   .table-wrap, страница вбок не ездит. */
.price-filters .price-view-mode { display:inline-flex; flex:0 0 auto; min-width:0; margin-left:auto; padding:3px; border:1px solid var(--line); border-radius:9px; background:var(--tabs-bg); }
.price-view-mode-btn { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:4px 11px; border:0; border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:13px; font-weight:650; white-space:nowrap; cursor:pointer; }
.price-view-mode-btn svg { width:15px; height:15px; }
.price-view-mode-btn.active { background:var(--surface); color:var(--primary); box-shadow:0 2px 8px rgba(23,35,31,.08); }
.price-view-mode-btn:focus-visible { outline:3px solid #a8701f; outline-offset:2px; }
table.price-table { min-width:860px; }
table.price-table th { padding:10px 10px; }
table.price-table td { padding:8px 10px; }
table.price-table .price-table-pick { width:28px; padding-right:0; }
table.price-table .price-table-pick .price-pick { width:18px; height:18px; margin:0; cursor:pointer; }
table.price-table .price-row-id { white-space:nowrap; color:var(--muted); font-variant-numeric:tabular-nums; }
table.price-table .price-row-subject { min-width:220px; }
table.price-table .price-row-uni { overflow-wrap:normal; }
table.price-table .price-row-title { min-height:0; padding:0; text-align:left; font-size:13.5px; font-weight:650; overflow-wrap:anywhere; }
table.price-table .price-row-marks { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-top:4px; }
table.price-table tr.is-off-sale .t-title { color:var(--muted); }
table.price-table tr.is-exact-match td:first-child { box-shadow:inset 3px 0 0 var(--primary); }
table.price-table .price-row-days, table.price-table .price-row-authors-cell { overflow-wrap:normal; }
table.price-table .price-row-authors { min-height:0; padding:0; font-size:13.5px; white-space:nowrap; }
table.price-table .price-row-free { display:inline-flex; width:max-content; margin:4px 0 0; }
table.price-table .price-table-actions { width:44px; padding-left:4px; text-align:right; }
.price-cell-btn { display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:3px 8px; border:1px dashed transparent; border-radius:7px; background:transparent; color:var(--primary); font:inherit; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; cursor:text; }
.price-cell-btn svg { width:13px; height:13px; color:var(--muted); opacity:0; }
.price-cell-btn:hover, .price-cell-btn:focus-visible { border-color:var(--line); background:var(--surface); }
.price-cell-btn:hover svg, .price-cell-btn:focus-visible svg { opacity:1; }
.price-cell-input { width:120px; min-height:32px; padding:3px 8px; text-align:right; }
.price-cell-sub { white-space:nowrap; }
.price-table-hint { margin:8px 2px 0; }
.price-pager .pager-jump { display:inline-flex; align-items:center; gap:5px; color:var(--muted); white-space:nowrap; }
.price-pager .pager-page { width:64px; min-height:32px; padding:3px 6px; text-align:center; }
/* Телефон (W3-01): подсказка свёрнута до заголовка, карточка сотрудника
   короткая («Подробнее» раскрывает остальное), «⋯» в шапке. */
.price-howto-fold { min-width:0; }
.price-howto-fold > summary { list-style:none; cursor:pointer; }
.price-howto-fold > summary::-webkit-details-marker { display:none; }
.price-howto-fold:not([open]) > summary::after { content:' · подробнее'; color:var(--muted); font-weight:400; }
.price-howto-text { margin-top:2px; }
.price-card.is-compact .price-card-more { margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.staff-head-actions .more-menu > summary { min-height:44px; }
/* Окно позиции вкладками (W3-02): строка вкладок переносится на телефоне,
   счётчик «(N)» — где что заполнено. */
.price-edit-tabs { margin-bottom:14px; }
.price-edit-tab-count { opacity:.8; }
.price-edit-tabbed [role="tabpanel"] > :first-child { margin-top:0; }
@media (max-width:640px) {
  .price-filters .price-view-mode { flex:1 1 100%; margin-left:0; }
  .price-view-mode-btn { flex:1 1 0; justify-content:center; }
  .price-pager { flex-wrap:wrap; gap:8px 12px; }
  /* Таблица на телефоне: второстепенные колонки (Вуз, Контроль, Части)
     спрятаны, «Цена» — сразу за «Предметом» и в кадре без прокрутки таблицы:
     цену правят в ячейке и с телефона. Остальное — прокруткой внутри .table-wrap. */
  table.price-table { min-width:0; }
  table.price-table th { padding:8px 6px; }
  table.price-table td { padding:6px 6px; }
  table.price-table .price-row-uni, table.price-table .price-row-control, table.price-table .price-row-parts { display:none; }
  table.price-table .price-row-subject { min-width:120px; }
  .price-cell-sub { white-space:normal; }
}
.price-ids-note .btn.sm { flex:none; }
/* «Вставьте номера своих предметов» над прайсом заказчика (W1-09,
   public/js/dashboard/price-ids.js): свёрнутая карточка, поле столбиком,
   найденные предметы списком с номером и ценой, одна кнопка в корзину. */
.price-ids-paste { margin:0 0 14px; }
.price-ids-paste > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:14px; }
.price-ids-paste > summary::-webkit-details-marker { display:none; }
.price-ids-paste > summary .mi { width:16px; height:16px; color:var(--accent-2); }
.price-ids-paste > summary::before { content:'›'; display:inline-block; width:12px; color:var(--muted); transition:transform var(--dur) var(--ease); }
.price-ids-paste[open] > summary::before { transform:rotate(90deg); }
.price-ids-body { margin-top:12px; }
.price-ids-input { width:100%; resize:vertical; font-variant-numeric:tabular-nums; }
.price-ids-found { margin:10px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.price-ids-found li { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:8px 10px; border:1px solid var(--line-2); border-radius:10px; }
.price-ids-found-title { min-width:0; }
.price-ids-found-title b { display:block; overflow-wrap:anywhere; }
.price-ids-found-price { flex:none; font-variant-numeric:tabular-nums; white-space:nowrap; }
.price-ids-done { display:inline-flex; align-items:center; gap:6px; color:var(--green-ink); font-weight:600; }
.price-ids-done .mi { width:16px; height:16px; color:var(--green); }
.price-ids-missing, .price-ids-unavailable { font-size:13.5px; overflow-wrap:anywhere; }
/* Подпись «целиком» у цены предмета с составом (W1-10). */
.price-whole-note { margin-top:-2px; }
@media (max-width:520px) { .price-ids-found li { flex-wrap:wrap; } .price-ids-paste .btn { width:100%; justify-content:center; } }
/* Волна 2 «удобная админка» (W2-06, W2-07, W2-12): вкладки «Позиции /
   Загрузки» у сотрудника, таблица загрузок с раскрывающейся строкой «было →
   стало», подборка для студента со ссылкой, список просьб пересмотреть цену.
   На 390 px таблица прокручивается внутри своего контейнера, кнопки — во всю
   ширину. */
.price-tabs { max-width:420px; }
.price-uploads-wrap { margin-top:4px; }
.price-uploads-table .price-upload-file { overflow-wrap:anywhere; max-width:260px; }
/* «Кто» и «Вуз» — переносом по словам: общий overflow-wrap:anywhere у
   table.data td давал раскладке сжать колонку до буквы, и на 1366 px
   «Администратор» рвался на «Администрато / р». Селектор — с тегом table:
   общий table.data td сильнее класса без тега. */
table.price-uploads-table td.price-upload-who, table.price-uploads-table td.price-upload-uni { overflow-wrap:normal; }
table.price-uploads-table td.price-upload-who { min-width:9em; }
.price-upload-row[aria-expanded="true"] td { border-bottom-color:transparent; }
.price-upload-details > td { background:var(--surface-3); white-space:normal; }
.price-upload-items { margin:8px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.price-upload-items li { padding:8px 10px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); }
.price-upload-items .pu-title { font-weight:600; overflow-wrap:anywhere; }
.price-upload-items .pu-line { font-size:13px; color:var(--ink-2); overflow-wrap:anywhere; margin-top:2px; }
.price-upload-items .pu-price { font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
.price-upload-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.price-ids-uni .select { max-width:100%; }
.price-ids-link { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.price-ids-link .input { flex:1 1 260px; min-width:0; }
.price-reviews-item { padding:10px 12px; border:1px solid var(--line-2); border-radius:12px; margin-bottom:10px; }
.price-reviews-item .pr-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:baseline; }
.price-reviews-item .pr-review { margin-top:8px; padding-top:8px; border-top:1px dashed var(--line-2); font-size:13.5px; overflow-wrap:anywhere; }
.price-reviews-item .pr-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:6px; }
.price-reviews-item .pr-actions .input { flex:1 1 220px; min-width:0; }
/* Очередь «Авторы просятся на предметы» (волна 2, W2-04) — того же вида, что
   просьбы о цене: карточка заявки, автор, условия и «Закрепить / Отказать». */
.pin-request-card { padding:10px 12px; border:1px solid var(--line-2); border-radius:12px; margin-bottom:10px; }
.pin-request-card .pr-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:baseline; }
.pin-request-author { margin-top:8px; padding-top:8px; border-top:1px dashed var(--line-2); font-size:13.5px; overflow-wrap:anywhere; }
.pin-request-actions { margin-top:8px; display:flex; flex-direction:column; gap:8px; }
.pin-request-line { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end; }
.pin-request-line .field { flex:0 1 220px; margin:0; }
/* Очередь «Запросы цены» (ТЗ 28.10.26, п. 6) — карточки того же вида. */
.cost-request-card .input { flex:1 1 180px; min-width:0; }
.cost-request-card details > summary { cursor:pointer; list-style:none; display:inline; }
.pin-request-line .input[type='text'] { flex:1 1 220px; min-width:0; }
/* Окно загрузки после записи: ссылка во вкладку «Загрузки» и «Отменить эту
   загрузку» под сводкой. */
.import-done-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.import-done-actions .hint { flex:1 1 100%; }
@media (max-width:520px) {
  .price-tabs { max-width:none; }
  .price-upload-actions .btn, .price-ids-link .btn, .price-reviews-item .pr-actions .btn, .import-done-actions .btn { width:100%; justify-content:center; }
}
/* Библиотека готовых работ (W1-12): поиск с отбором над списком, строка
   «Показано N из M» и кнопка «Показать ещё» под ним. */
.ready-filters .select { flex:1 1 180px; min-width:0; }
/* Цена и кнопка карточки работы — в одну строку с отступом: без правила
   кнопка ложилась на цену. */
.ready-library .actions-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ready-library-foot { margin-top:10px; }
.ready-library-foot .btn.block { width:100%; justify-content:center; }
.cart-toggle[aria-pressed="true"] { border-color:var(--accent); background:var(--v50); color:var(--primary); }
/* Полоска корзины: прилипает к низу экрана, не перекрывая последнюю карточку
   (padding-bottom у .content даёт ей место). */
.cart-bar { position:sticky; bottom:12px; z-index:5; margin-top:18px; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:14px 18px; border:1px solid var(--accent); border-radius:4px 16px 4px 16px; background:var(--surface); box-shadow:var(--paper-edge),var(--sh-lg); }
.cart-bar-head { display:flex; align-items:center; gap:8px; font-size:15px; }
.cart-bar-head svg { width:18px; height:18px; color:var(--accent-2); }
.cart-bar-hint { margin-top:3px; color:var(--muted); font-size:12.5px; }
.cart-bar-actions { display:flex; gap:8px; flex-wrap:wrap; margin-left:auto; }
@media (max-width:600px) { .cart-bar { bottom:8px; padding:12px 14px; } .cart-bar-actions { width:100%; margin-left:0; } .cart-bar-actions .btn { flex:1; } }
/* Страница «Корзина» (#/cart): столбец карточек и липкий итог внизу. На 390 px
   карточка занимает всю ширину, цена уходит под название, а блок итога
   прилипает к низу экрана — главная кнопка видна без прокрутки. */
.cart-page { max-width:760px; }
.cart-list { display:flex; flex-direction:column; gap:12px; }
.cart-card { margin:0; }
.cart-card-off { border-color:var(--amber); }
.cart-card-head { display:flex; align-items:flex-start; gap:10px; }
.cart-card-title { flex:1 1 auto; min-width:0; }
.cart-card-title b { display:block; overflow-wrap:anywhere; }
.cart-card-price { flex:none; font-family:var(--display); font-size:17px; font-weight:650; color:var(--primary); font-variant-numeric:tabular-nums; }
.cart-card-head .icon-btn { width:34px; height:34px; }
.cart-card-head .icon-btn svg { width:15px; height:15px; }
.cart-chips { display:flex; flex-wrap:wrap; gap:6px; }
.cart-note { margin-top:10px; }
.cart-note summary { cursor:pointer; color:var(--muted); font-size:13px; }
.cart-note textarea { margin-top:8px; }
.cart-summary { position:sticky; bottom:12px; z-index:5; margin-top:16px; padding-bottom:max(14px, env(safe-area-inset-bottom)); }
.cart-pay { width:100%; margin-top:10px; }
/* W2-13: «Одна дата сдачи для всех предметов», свёрнутая заполненная строка
   («ID 9544 · целиком · 4 500 ₽ · сдать до 23 ноя — изменить»), галочка
   «Хочу выбрать автора сам» и «Что дальше» на экране оплаченной корзины. */
.cart-bulk-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.cart-bulk-row .input { flex:1 1 180px; max-width:240px; }
.cart-card-compact { padding-top:10px; padding-bottom:10px; }
.cart-compact-row { display:flex; align-items:center; gap:10px; }
.cart-compact-mark { flex:none; display:inline-flex; color:var(--green-2); }
.cart-compact-mark svg { width:16px; height:16px; }
.cart-compact-text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.cart-compact-text b { overflow-wrap:anywhere; }
.cart-compact-row .icon-btn { width:34px; height:34px; flex:none; }
.cart-compact-row .icon-btn svg { width:15px; height:15px; }
.cart-pay .pay-short { display:none; }
/* Вкладки «Корзина» и «Долги по курсам» (ТЗ «28.10.26», п. 6), поиск
   «Добавить предмет» с подсказками и карточка предмета с незаказанными
   частями. Число на вкладке — сколько предметов, где заказано не всё. */
.cart-tabs, .cart-agent-client { max-width:760px; }
.cart-tab-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; margin-left:6px; padding:0 6px; border-radius:999px; background:var(--amber-bg); color:var(--amber-ink); font-size:11.5px; font-weight:700; font-variant-numeric:tabular-nums; }
.cart-tab-count[hidden] { display:none; }
.cart-add-box { position:relative; margin-top:6px; }
.cart-add-search { width:100%; }
.cart-add-list { position:absolute; z-index:20; left:0; right:0; top:calc(100% + 4px); margin:0; padding:4px; list-style:none; max-height:320px; overflow-y:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--sh-lg); }
.cart-add-list[hidden] { display:none; }
.cart-add-option { padding:9px 10px; border-radius:7px; cursor:pointer; font-size:13.5px; overflow-wrap:anywhere; }
.cart-add-option:hover, .cart-add-option[aria-selected="true"] { background:var(--v50); color:var(--primary); }
.cart-add-status:empty { display:none; }
.cart-debts-intro { max-width:760px; font-size:13.5px; line-height:1.5; }
.debt-parts { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:13.5px; }
.debt-parts li { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.debt-parts .cart-part-name { min-width:0; overflow-wrap:anywhere; }
.debt-parts b { flex:none; font-variant-numeric:tabular-nums; white-space:nowrap; }
.debt-done li { color:var(--muted); }
.debt-left-title { margin-top:10px; font-size:13px; font-weight:650; }
.debt-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.debt-card { margin:0; }
.debt-card.is-hidden { opacity:.78; }
.checkout-todo-list { display:flex; flex-direction:column; gap:14px; }
.checkout-todo-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.checkout-todo-head b { overflow-wrap:anywhere; }
.checkout-todo-steps li.is-done { color:var(--muted); }
.checkout-todo-steps li.is-done .onb-mark { border-color:var(--green); background:var(--green-bg); }
@media (max-width:600px) {
  .cart-card-head { flex-wrap:wrap; }
  .cart-card-price { order:3; width:100%; }
  .cart-summary { bottom:0; border-radius:12px 12px 0 0; }
  /* Низкая полоса «Итого · Оплатить» (W2-13): итог и кнопка в одну строку,
     красные подсказки — строкой над ними. */
  .cart-summary { display:flex; flex-wrap:wrap; align-items:center; column-gap:12px; row-gap:4px; padding-top:10px; padding-bottom:max(10px, env(safe-area-inset-bottom)); }
  .cart-summary > * { flex:1 1 100%; }
  .cart-summary .quote-line.total { flex:1 1 auto; margin:0; }
  .cart-summary .cart-pay { flex:0 0 auto; width:auto; margin-top:0; }
  .cart-pay .pay-long { display:none; }
  .cart-pay .pay-short { display:inline; }
  .cart-bulk-row .input { max-width:none; }
  /* Липкая сводка на 390 px занимала ~290 px и закрывала поле даты первой
     позиции: на телефоне остаются итог, красные подсказки и кнопка, а строки
     подытога, скидки и куратора и подсказка об оплате уходят. */
  .cart-summary .quote-line:not(.total) { display:none; }
  .cart-summary .hint:not(.text-danger) { display:none; }
  .cart-page .input[type=date] { width:100%; }
}
/* Подбор предметов по номерам на публичной странице вуза (public/js/price-lookup.js).
   Страница вуза тёмная (src/seo-pages.js), поэтому и калькулятор — светлым
   текстом по тёмным карточкам, в том же языке, что .seo-card. */
.lookup { margin:18px 0 28px; padding:22px 24px; border:1px solid rgba(216,170,97,.34); border-radius:4px 18px 4px 18px; background:linear-gradient(158deg,rgba(216,170,97,.08),rgba(255,255,255,.025)); color:#cdd8d2; }
.lookup-title { margin:0 0 6px; color:var(--cream); font-size:22px; }
.lookup-lead, .lookup-status { margin:0 0 14px; }
.lookup-items { display:flex; flex-direction:column; gap:12px; }
.lookup-item { min-width:0; margin:0; padding:14px 16px 12px; border:1px solid rgba(255,250,240,.14); border-radius:12px; background:rgba(6,17,14,.35); }
.lookup-item.is-excluded > :not(legend) { opacity:.5; }
.lookup-item-head { float:left; width:100%; margin:0 0 6px; padding:0; }
.lookup-item-head + * { clear:both; }
.lookup-include { display:flex; align-items:flex-start; gap:10px; cursor:pointer; }
.lookup-include input { margin-top:3px; }
.lookup-item-title { color:var(--cream); font-size:16px; font-weight:650; line-height:1.35; overflow-wrap:anywhere; }
.lookup-days, .lookup-includes, .lookup-rule, .lookup-price { margin:0 0 6px; font-size:13.5px; }
.lookup-days { color:#9eafa7; }
.lookup-rule { color:#9eafa7; }
.lookup-notice { display:flex; flex-direction:column; gap:2px; margin:6px 0 8px; padding:8px 12px; border-left:3px solid #d5a85c; border-radius:6px; background:rgba(216,170,97,.1); font-size:13.5px; }
.lookup-notice b { color:#e6c78f; }
.lookup-parts { display:flex; flex-direction:column; gap:2px; margin:6px 0 4px; }
/* Строка части: отметка, название, цена справа; пометка — отдельной строкой
   под названием, чтобы на 390 px цена не уезжала за край. */
.lookup-part { display:grid; grid-template-columns:22px minmax(0,1fr) auto; align-items:start; column-gap:10px; padding:7px 4px; border-radius:8px; cursor:pointer; }
.lookup-part:hover { background:rgba(255,255,255,.04); }
.lookup-part input { margin:2px 0 0; }
.lookup-part-name { min-width:0; overflow-wrap:anywhere; }
.lookup-part-price { color:var(--cream); font-variant-numeric:tabular-nums; white-space:nowrap; }
.lookup-part-note { grid-column:2 / -1; color:#9eafa7; font-size:12.5px; }
.lookup-part-mark { color:#6f817a; text-align:center; }
.lookup-part.is-off, .lookup-part.is-fixed, .lookup-part.is-estimate { cursor:default; }
.lookup-part.is-off:hover, .lookup-part.is-fixed:hover, .lookup-part.is-estimate:hover { background:none; }
.lookup-part.is-off .lookup-part-name { color:#7f918a; text-decoration:line-through; text-decoration-color:rgba(127,145,138,.6); }
.lookup-whole .lookup-part-name { color:var(--cream); font-weight:600; }
.lookup-subtotal { margin:6px 0 0; padding-top:8px; border-top:1px dashed rgba(255,250,240,.14); color:var(--cream); font-size:14px; font-weight:600; }
.lookup-total { margin:16px 0 12px; color:var(--cream); font-size:16px; }
.lookup-total b { font-size:20px; font-variant-numeric:tabular-nums; }
.lookup-missing, .lookup-hint { color:#9eafa7; font-size:13px; }
/* «Цена по запросу» и «вместе с ВКР» на странице подбора (ТЗ 28.10.26, п. 6). */
.lookup-on-request, .lookup-ordered-with { overflow-wrap:anywhere; }
/* Поле «Вставьте номера своих предметов» на странице вуза (W1-09): под
   результатом подбора или одно, когда номеров в адресе нет. */
.lookup-paste { margin-top:14px; padding:12px 14px; border:1px solid rgba(255,250,240,.14); border-radius:12px; background:rgba(6,17,14,.35); }
.lookup-results:empty + .lookup-paste { margin-top:0; }
.lookup-paste-summary { cursor:pointer; color:var(--cream); font-family:var(--display); font-size:16px; font-weight:650; list-style:none; }
.lookup-paste-summary::-webkit-details-marker { display:none; }
.lookup-paste-summary::before { content:'› '; color:#d9ab63; }
.lookup-paste[open] .lookup-paste-summary::before { content:'˅ '; }
.lookup-paste .lookup-hint { margin:8px 0; }
.lookup-paste-input { display:block; width:100%; box-sizing:border-box; margin:0 0 10px; padding:10px 12px; border:1px solid rgba(255,250,240,.2); border-radius:10px; background:rgba(255,255,255,.04); color:var(--cream); font:inherit; font-variant-numeric:tabular-nums; resize:vertical; }
.lookup-paste-input:focus { outline:2px solid #d9ab63; outline-offset:1px; }
.lookup-paste-note { margin:8px 0 0; }
@media (max-width:560px) {
  .lookup { padding:16px 14px; }
  .lookup-item { padding:12px 12px 10px; }
  .lookup .btn { width:100%; justify-content:center; }
}
/* Окно пакета: строка на предмет — название, цена, крестик; ниже состав и дата. */
.batch-row { padding:14px 0; border-bottom:1px solid var(--line-2); }
.batch-row:first-child { padding-top:0; }
.batch-row .field { margin:10px 0 0; }
.batch-row-head { display:flex; align-items:flex-start; gap:10px; }
.batch-row-title { flex:1 1 auto; min-width:0; }
.batch-row-title b { display:block; overflow-wrap:anywhere; }
.batch-row-price { flex:none; font-family:var(--display); font-size:17px; font-weight:650; color:var(--primary); font-variant-numeric:tabular-nums; }
.batch-row-head .icon-btn { width:34px; height:34px; }
.batch-row-head .icon-btn svg { width:15px; height:15px; }
.batch-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.component-chip.pick { cursor:pointer; user-select:none; }
.component-chip.pick input { margin:0; accent-color:var(--primary); }
.component-chip.pick:has(input:checked) { border-color:var(--accent); background:var(--v100); }
/* Запасное правило для браузеров без :has() (Firefox ESR 115, Chrome до 105):
   класс is-checked ставит окно расчёта вместе с отметкой. Отдельным правилом —
   в одном списке с :has() его выбросили бы вместе. */
.component-chip.pick.is-checked { border-color:var(--accent); background:var(--v100); }

/* Росдистант: две «двери» на страницу семестра. Первая — ручной заказ:
   карточка-действие с иконочным чипом и латунной кнопкой. Вторая — внешний
   сервис: та же сетка (чип + текст), но на латунной подложке, с меткой
   «внешний сервис» и ссылкой-плашкой, на которой адрес набран крупно. */
.rd-card { max-width:720px; }
.rd-card + .rd-card { margin-top:14px; }
/* Латунная нить по верхней грани основной карточки — та же марка бренда, что на
   плитках-показателях. */
.rd-primary { position:relative; overflow:hidden; display:flex; gap:16px; align-items:flex-start; }
.rd-primary::before { content:''; position:absolute; left:0; right:0; top:0; height:2px;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 62%,transparent) 22%,color-mix(in srgb,var(--accent) 40%,transparent) 78%,transparent); }
.rd-ico { flex:none; width:48px; height:48px; display:flex; align-items:center; justify-content:center;
  border-radius:14px; background:var(--green-bg); color:var(--primary); box-shadow:inset 0 0 0 1px rgba(23,35,31,.05); }
.rd-ico svg { width:23px; height:23px; }
.rd-main { min-width:0; display:flex; flex-direction:column; align-items:flex-start; }
.rd-title { font-family:var(--display); font-size:18px; font-weight:650; color:var(--ink); letter-spacing:-.01em; }
.rd-text { margin:6px 0 0; max-width:52ch; color:var(--ink-2); font-size:14.5px; line-height:1.5; }
.rd-main .btn { margin-top:16px; }
/* Внешний сервис. Подложка — бумага с примесью латуни: карточка читается как
   равная первой, но другая. Кольца в правом верхнем углу расходятся «наружу» и
   гаснут к середине — единственное украшение, без градиентной заливки.
   Браузер без color-mix() получает ровную латунную подложку без колец: правило
   с переменными внутри @supports, иначе неразобранный фон стал бы прозрачным. */
.rd-out { display:flex; gap:16px; align-items:flex-start; border-color:var(--amber-line); background:var(--amber-bg); }
@supports (color:color-mix(in srgb,red 50%,blue)) {
  .rd-out {
    --rd-ring-1:color-mix(in srgb,var(--accent) 30%,transparent); --rd-ring-2:color-mix(in srgb,var(--accent) 21%,transparent);
    --rd-ring-3:color-mix(in srgb,var(--accent) 13%,transparent); --rd-ring-4:color-mix(in srgb,var(--accent) 7%,transparent);
    border-color:color-mix(in srgb,var(--accent) 36%,var(--line));
    background:
      radial-gradient(circle at 100% 0,
        transparent 47px,var(--rd-ring-1) 48px,var(--rd-ring-1) 49px,transparent 50px,
        transparent 83px,var(--rd-ring-2) 84px,var(--rd-ring-2) 85px,transparent 86px,
        transparent 119px,var(--rd-ring-3) 120px,var(--rd-ring-3) 121px,transparent 122px,
        transparent 155px,var(--rd-ring-4) 156px,var(--rd-ring-4) 157px,transparent 158px) no-repeat 100% 0 / 200px 200px,
      color-mix(in srgb,var(--accent-soft) 46%,var(--surface));
  }
}
.rd-out-ico { background:var(--surface-2); color:var(--accent-2); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 42%,transparent),var(--sh-xs); }
/* Абзац карточки начинается с хоста из настроек, а строка «Пароль» держит сам
   пароль: слово без точек и дефисов (метка хоста — до 63 знаков) иначе
   распирало бы карточку и давало горизонтальную прокрутку на телефоне. */
.rd-out .rd-text { overflow-wrap:anywhere; }
/* Метка «внешний сервис» — строка над заголовком с латунной чертой: мелкий
   текст на подложке набран --amber-ink (6.9:1), а не --accent-2 (4.48:1). */
.rd-out-tag { display:inline-flex; align-items:center; gap:7px; margin-bottom:5px; color:var(--amber-ink); font-size:11px; font-weight:700; letter-spacing:.09em; line-height:1.2; text-transform:uppercase; }
.rd-out-tag::before { content:''; flex:none; width:14px; height:2px; border-radius:1px; background:var(--accent); }
/* Пароль к внешнему сервису — латунной «плашкой»-кнопкой: нажатие копирует его в буфер. */
.rd-pass { margin-top:10px; }
.rd-pass-code { font:600 14px/1.2 ui-monospace, Consolas, monospace; text-align:left; color:var(--accent-2); background:var(--surface-2); border:1px solid color-mix(in srgb,var(--accent) 45%,transparent); padding:3px 8px; border-radius:6px; letter-spacing:.02em; cursor:pointer; overflow-wrap:anywhere; transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.rd-pass-code:hover { background:color-mix(in srgb,var(--accent-soft) 82%,var(--accent) 18%); border-color:var(--accent); }
.rd-pass-code:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.rd-pass-code:active { transform:translateY(1px); }
/* Ссылка на внешний сервис — плашка «как табличка у двери»: мелкая строка
   «Перейти на», под ней адрес крупным серифом, справа латунный квадрат со
   стрелкой «наружу». Стрелка уезжает при наведении и при фокусе с клавиатуры;
   кольцо фокуса — общее (:focus-visible). Длинный адрес переносится на вторую
   строку: подпись кнопки не обрезается и карточку не распирает. */
.rd-out-link { min-width:min(100%,256px); max-width:100%; min-height:58px; margin-top:16px; display:inline-flex; align-items:center; gap:18px;
  padding:8px 9px 8px 17px; border:1px solid var(--accent); border-radius:14px;
  border-color:color-mix(in srgb,var(--accent) 52%,transparent);
  background:var(--surface-2); color:var(--ink); box-shadow:var(--paper-edge),var(--sh-xs); text-decoration:none;
  transition:transform var(--dur) var(--ease),box-shadow var(--dur-slow) var(--ease),border-color var(--dur-slow) var(--ease); }
.rd-out-link:hover { border-color:var(--accent); box-shadow:var(--paper-edge),var(--sh-sm); transform:translateY(-1px); }
.rd-out-link:active { transform:translateY(1px); box-shadow:var(--well); }
.rd-out-label { min-width:0; display:flex; flex-direction:column; gap:1px; }
.rd-out-go { color:var(--amber-ink); font-size:11px; font-weight:700; letter-spacing:.09em; line-height:1.3; text-transform:uppercase; white-space:nowrap; }
.rd-out-host { color:var(--ink); font-family:var(--display); font-size:20px; font-weight:650; letter-spacing:-.01em; line-height:1.2; overflow-wrap:anywhere; }
.rd-out-arrow { flex:none; width:40px; height:40px; margin-left:auto; display:flex; align-items:center; justify-content:center;
  border-radius:10px; color:#162820; background:linear-gradient(165deg,#ddb168,#cf9c50); box-shadow:inset 0 1px 0 rgba(255,250,240,.35); }
.rd-out-arrow svg { width:19px; height:19px; transition:transform var(--dur) var(--ease); }
.rd-out-link:hover .rd-out-arrow { background:linear-gradient(165deg,#e6bd76,#d9a85e); }
.rd-out-link:hover .rd-out-arrow svg, .rd-out-link:focus-visible .rd-out-arrow svg { transform:translate(2px,-2px); }
/* Просили без движения — плашка и стрелка стоят на месте: общий сброс гасит
   только длительность перехода, а сам сдвиг остался бы скачком. */
@media (prefers-reduced-motion:reduce) {
  .rd-out-link:hover, .rd-out-link:active, .rd-pass-code:active { transform:none; }
  .rd-out-link:hover .rd-out-arrow svg, .rd-out-link:focus-visible .rd-out-arrow svg { transform:none; }
}
@media (max-width:560px) {
  .rd-primary, .rd-out { flex-direction:column; gap:12px; }
  .rd-main { align-self:stretch; }
  .rd-main .btn, .rd-out-link { width:100%; }
  /* На узком экране кольцам хватает двух внутренних: дальние легли бы под текст. */
  .rd-out { --rd-ring-3:transparent; --rd-ring-4:transparent; }
}
/* Экспресс-консультация (dashboard/availability.js): слоты по дням, правила расписания, витрина авторов. */
.slot-days { display:flex; flex-direction:column; gap:10px; }
.slot-day-title { margin-bottom:6px; color:var(--ink-2); font-size:12.5px; font-weight:650; }
.slot-chips { display:flex; flex-wrap:wrap; gap:8px; }
.slot-chip { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 13px; border:1.5px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font:inherit; font-size:13.5px; font-weight:600; font-variant-numeric:tabular-nums; cursor:pointer; text-decoration:none; transition:border-color .15s, background .15s, transform .1s; }
.slot-chip:hover { border-color:var(--accent); background:var(--v50); }
.slot-chip:active { transform:scale(.97); }
.slot-chip:focus-visible { outline:3px solid #a8701f; outline-offset:1px; }
.slot-chip.static { cursor:default; color:var(--ink-2); background:var(--v50); }
.slot-chip.static:hover { border-color:var(--line); }
.slot-chip.busy { border-style:dashed; color:var(--muted); }
.slot-chip.busy svg { width:14px; height:14px; color:var(--accent-2); }
.slot-chip.more { border-style:dashed; color:var(--primary); }
.rule-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:8px; }
.rule-row .select { flex:1 1 128px; min-width:0; padding-right:28px; }
.rule-row .input[type=date] { flex:1 1 128px; min-width:0; }
.rule-row .input[type=time] { flex:0 1 92px; min-width:84px; padding-inline:10px; }
.rule-row .rule-dash { color:var(--muted); font-size:13px; }
.rule-row .btn.sm { flex:none; min-width:38px; padding-inline:9px; }
/* auto-fit: единственный автор по направлению — во всю ширину, окна в строку, а не столбиком. */
.consult-authors { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:12px; }
.consult-author { padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.consult-author .avatar { flex:none; }
.consult-author a { color:var(--ink); font-weight:650; }
/* Консультации, волна 2 (W2-11, dashboard/consult.js и availability.js): своё время со временем
   сервиса в скобках, «Закрыть день/слот», закрытые даты, ближайшее окно, строка в прайсе, календарь. */
.slot-chip .slot-alt { color:var(--muted); font-size:11.5px; font-weight:500; }
.slot-legend { margin:0 0 10px; }
.slot-day-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.slot-day-head .slot-day-title { margin-bottom:0; }
.slot-day-head .btn.sm { min-height:30px; padding:4px 10px; font-size:12.5px; }
.slot-chip-closable { padding-right:5px; }
.slot-close { display:inline-grid; place-items:center; width:26px; height:26px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; }
.slot-close:hover { background:var(--surface); color:var(--ink); }
.slot-close:focus-visible { outline:3px solid #a8701f; outline-offset:1px; }
.slot-close svg { width:14px; height:14px; }
.closed-list { list-style:none; margin:0 0 12px; padding:0; }
.closed-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.closed-row:last-child { border-bottom:0; }
.closed-add { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.closed-add .input { flex:0 1 180px; min-width:0; }
.consult-tz { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:12px; }
.tz-select { max-width:340px; }
.consult-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; margin-bottom:12px; }
.consult-filters .select { min-width:220px; max-width:100%; }
.consult-nearest { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; padding:12px 16px; border:1.5px solid var(--accent); border-radius:12px; background:var(--v50); }
.consult-nearest-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.consult-dirs { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.consult-author-head { min-width:0; }
.consult-authors.is-compact { grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); }
.consult-mine { list-style:none; margin:0; padding:0; }
.consult-mine li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.consult-mine li:last-child { border-bottom:0; }
.consult-mine-main { min-width:0; }
.consult-line { display:flex; align-items:center; gap:8px; margin:-4px 0 12px; padding:9px 14px; border:1px dashed var(--line); border-radius:10px; color:var(--ink-2); font-size:14px; text-decoration:none; }
.consult-line:hover { border-color:var(--accent); background:var(--v50); }
.consult-line svg { width:18px; height:18px; flex:none; color:var(--accent-2); }
.consult-line-arrow { margin-left:auto; color:var(--primary); font-weight:700; }
.calendar-feed-url { width:100%; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12.5px; }
@media (max-width:640px) {
  .consult-authors { grid-template-columns:1fr; }
  .consult-authors.is-compact { grid-template-columns:1fr; }
  .consult-nearest { flex-direction:column; align-items:stretch; }
  .consult-filters .select, .tz-select { min-width:0; width:100%; max-width:none; }
  .closed-add .input { flex:1 1 100%; }
  /* Телефон: правило в две строки — «вид | день», затем «с … до … ×». */
  .rule-row { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; }
  .rule-row .select:first-child { grid-column:1 / 3; }
  .rule-row .select:not(:first-child), .rule-row .input[type=date] { grid-column:3 / 5; }
  .rule-row .rule-dash-from { display:none; }
  .rule-row .input[type=time] { min-width:0; }
}
.batch-summary { padding-top:4px; }
/* Экран «Мой семестр»: строка — дата сдачи слева, предмет, статус с ценой, действие. */
.semester-group { margin-top:22px; }
.semester-row { display:grid; grid-template-columns:88px minmax(0,1fr) auto auto; align-items:center; gap:10px 16px; padding:13px 16px; margin-bottom:8px; border:1px solid var(--line); border-left:4px solid var(--line); border-radius:3px 12px 3px 12px; background:var(--surface); box-shadow:var(--sh-sm); }
.semester-row.st-scheduled { border-left-color:var(--badge-gray-ink); }
.semester-row.st-awaiting_payment, .semester-row.st-review, .semester-row.st-moderation, .semester-row.st-revision { border-left-color:var(--amber); }
.semester-row.st-auction { border-left-color:var(--badge-violet-ink); }
.semester-row.st-assigned, .semester-row.st-in_progress { border-left-color:var(--blue); }
.semester-row.st-completed, .semester-row.st-paid { border-left-color:var(--green); }
.semester-date { display:flex; flex-direction:column; line-height:1.2; }
.semester-date b { font-family:var(--display); font-size:16px; white-space:nowrap; }
.semester-date span { color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; }
.semester-date.soon b { color:var(--amber-ink); }
.semester-main { min-width:0; }
.semester-title { display:block; color:var(--ink); font-weight:650; text-decoration:none; overflow-wrap:anywhere; }
.semester-title:hover { color:var(--primary); }
.semester-meta { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:3px; }
.semester-side { display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.semester-price { font-variant-numeric:tabular-nums; white-space:nowrap; }
.semester-action .btn { white-space:nowrap; }
.batch-table-wrap { overflow-x:auto; }
.batch-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.batch-table th { padding:6px 10px; text-align:left; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; border-bottom:1px solid var(--line); white-space:nowrap; }
.batch-table td { padding:9px 10px; border-bottom:1px solid var(--line-2); font-variant-numeric:tabular-nums; white-space:nowrap; }
.batch-table tr:last-child td { border-bottom:0; }
@media (max-width:640px) {
  /* Таблица «Корзины» на узком экране становится карточками: горизонтальная
     прокрутка внутри страницы на телефоне читается как поломка. */
  .batch-table, .batch-table tbody, .batch-table tr, .batch-table td { display:block; width:100%; }
  .batch-table thead { display:none; }
  .batch-table tr { margin-bottom:10px; padding:10px 12px; border:1px solid var(--line); border-radius:3px 12px 3px 12px; }
  .batch-table td { padding:3px 0; border-bottom:0; white-space:normal; }
  .batch-table td::before { content:attr(data-label) " "; color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; }
  .semester-row { grid-template-columns:minmax(0,1fr) auto; }
  .semester-date { grid-column:1; flex-direction:row; align-items:baseline; gap:6px; }
  .semester-side { grid-column:2; grid-row:1; }
  .semester-main { grid-column:1 / -1; }
  .semester-action { grid-column:1 / -1; }
  .semester-action .btn { width:100%; }
}

/* карточка преподавателя */
.teacher-card { margin-bottom:12px; cursor:pointer; transition:transform .15s, border-color .15s; }
.teacher-card:hover { transform:translateY(-2px); border-color:var(--v300); }
.teacher-card .teacher-card-side { display:flex; flex-direction:column; align-items:flex-end; flex:none; }
.teacher-card .teacher-card-side .btn { pointer-events:none; }

/* служебная панель сотрудника. Правила строки расчёта живут выше, в блоке оплаты:
   повторное объявление здесь молча перебивало их и сбивало «Итого» с крупного
   начертания на обычный текст. */
.staff-block { border-color:var(--v200); background:linear-gradient(180deg,var(--v50),var(--surface) 60px); }

/* наборы чекбоксов (направления, типы работ). Без внутренней прокрутки: она
   обрезала последние пункты, а на телефоне давала скролл внутри скролла. */
.checks-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:2px 14px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); box-shadow:var(--well); }
.checks-grid .consent-row { margin:0 0 4px; font-size:13.5px; color:var(--ink); }

/* пагинация списков */
.pager { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:18px; }
.pager-info { color:var(--muted); font-size:13.5px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pager .btn[disabled] { opacity:.45; cursor:default; pointer-events:none; }

/* фильтры-чипы списка заказов */
.filter-chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.chips-hint { flex-basis:100%; margin:0; }
.filter-chips .chip { padding:7px 14px; border-radius:999px; border:1.5px solid var(--line); background:var(--surface); color:var(--muted); font-size:13px; font-weight:600; cursor:pointer; transition:.15s; }
.filter-chips .chip:hover { border-color:var(--v300); color:var(--ink); }
.filter-chips .chip:active { transform:scale(.96); }
.filter-chips .chip.active { background:var(--grad); color:#fff; border-color:transparent; box-shadow:inset 0 1px 0 rgba(255,255,255,.14),var(--sh-primary); }

/* отзывы автора */
.review-list { display:flex; flex-direction:column; gap:10px; max-height:340px; overflow-y:auto; overscroll-behavior:contain; }
.review-item { border:1px solid var(--line); border-radius:12px; padding:12px 14px; font-size:14px; background:var(--surface); }
/* Отзыв без текста — только звёзды и дата: делаем его тише и площе, чтобы
   содержательные отзывы с комментарием выделялись, а не тонули в ряду
   одинаковых карточек. */
.review-item:not(:has(p)) { padding-block:9px; background:var(--surface-3); box-shadow:none; }
.review-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.review-stars { color:var(--accent); letter-spacing:2px; font-size:15px; }
/* Модерация отзывов (dashboard/reviews.js): карточка с текстом как есть — править нельзя, только скрыть. */
.review-mod-list { display:flex; flex-direction:column; gap:12px; }
.review-mod-text { margin:10px 0 0; padding:10px 14px; border-left:3px solid var(--accent); background:var(--surface-3); border-radius:0 10px 10px 0; font-size:14.5px; line-height:1.6; white-space:pre-line; }
/* Что с текстом отзыва сейчас — автору и сотруднику (ТЗ от 28.10.2026, п. 5):
   ждёт проверки, скрыт, где опубликован. Другим неопубликованный текст не отдаётся. */
.review-status { margin-top:6px; font-size:12.5px; line-height:1.45; color:var(--muted); }
.review-status.is-queue { color:var(--amber-ink); }
.review-status.is-hidden { font-style:italic; }
/* Ссылки на площадки отзывов о сервисе в окне оценки: отбивка от оценки — пунктиром. */
.review-sites { padding-top:10px; border-top:1px dashed var(--line); }

/* согласие на обработку персональных данных */
.consent-row { display:flex; gap:9px; align-items:flex-start; font-size:13px; line-height:1.5; color:var(--muted); margin:2px 0 14px; cursor:pointer; }
.consent-row input { margin-top:3px; flex:none; }
/* Ссылки на документы отличимы от текста и с тап-зоной около 24px; сам текст
   — цель для галочки, ссылка срабатывает только по слову. */
.consent-row a { color:var(--primary); font-weight:600; text-decoration:underline; text-underline-offset:2px; padding:4px 0; }
.check-row a, .alert a { text-decoration:underline; text-underline-offset:2px; }
/* Переход из чек-листа к секции профиля — заголовок не должен прятаться под липким топбаром */
[data-profile-section] { scroll-margin-top:84px; }
/* Редкие секции профиля свёрнуты: пароль, копия данных, удаление */
.profile-fold > summary { cursor:pointer; list-style:none; margin-bottom:0; }
.profile-fold > summary::-webkit-details-marker { display:none; }
.profile-fold > summary > .fold-mark { order:2; margin-left:8px; color:var(--muted); font-size:12px; transition:transform .15s; }
.profile-fold[open] > summary > .fold-mark { transform:rotate(180deg); }
.profile-fold[open] > summary { margin-bottom:14px; }
/* Профиль автора — вкладками (W2-10): строка вкладок переносится, а не
   уезжает вбок; на телефоне — в две-три строки без горизонтальной прокрутки. */
.profile-tabs { margin-bottom:14px; }
/* Вкладка открывается сразу: общая задержка появления блоков страницы
   (.content > *:nth-child) здесь превращала каждое переключение в паузу. */
.content > .profile-panel { animation-delay:0s; }
/* Профиль → «Уведомления» (W2-09): таблица «событие × почта / Telegram».
   На широком экране — столбцы с заголовками, на телефоне — событие строкой,
   под ним два переключателя с подписями «Почта» и «Telegram». */
.notif-matrix { display:flex; flex-direction:column; margin:4px 0 10px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); }
.notif-row { display:grid; grid-template-columns:minmax(0,1fr) 200px 96px; gap:6px 12px; align-items:center; padding:10px 12px; border-top:1px solid var(--line); }
.notif-no-tg .notif-row { grid-template-columns:minmax(0,1fr) 200px; }
.notif-row:first-child { border-top:0; }
.notif-head { padding-top:8px; padding-bottom:8px; background:var(--surface-2); color:var(--muted); font-size:12px; font-weight:650; border-radius:var(--r) var(--r) 0 0; }
.notif-event b { display:block; color:var(--ink); font-size:13.5px; font-weight:600; }
.notif-event .hint { display:block; margin-top:2px; }
.notif-check, .notif-select { display:inline-flex; align-items:center; gap:6px; min-height:36px; color:var(--ink-2); font-size:13px; cursor:pointer; }
.notif-check input { margin:0; width:18px; height:18px; }
.notif-select { width:100%; }
.notif-select .select { width:100%; min-width:0; }
.notif-cap { display:none; }
.notif-always { color:var(--muted); }
.notif-none { padding-left:4px; }
.notif-quiet { margin:0 0 4px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface-3); }
.notif-quiet .check-row { display:flex; }
.notif-quiet-times { display:flex; flex-wrap:wrap; gap:8px 12px; margin:6px 0; }
.notif-quiet-times .field { flex:1 1 120px; max-width:170px; margin:0; }
@media (max-width:640px) {
  .notif-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .notif-no-tg .notif-row { grid-template-columns:minmax(0,1fr); }
  .notif-event, .notif-cell-wide { grid-column:1 / -1; }
  .notif-head { display:none; }
  .notif-row:nth-child(2) { border-top:0; }
  .notif-cap { display:inline; }
}
/* Главная автора: «Принимаю заказы / Пауза до…» (W2-10) — та же пауза, что
   в профиле, в один клик. */
.pause-switch-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; margin-bottom:6px; }
.pause-segments { margin:0; }
.pause-options { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:10px 0 6px; }
.pause-date { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pause-date .input { width:auto; min-width:150px; }
@media (max-width:760px) {
  .checks-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 10px; padding:8px 10px; }
  .checks-grid .consent-row { font-size:12.5px; margin:0 0 2px; gap:6px; }
}

/* зона удаления аккаунта */
.danger-zone { border-color:var(--danger-line); }
.danger-zone .card-title svg { color:var(--red); }

#toast-root { position:fixed; z-index:1100; top:max(18px,env(safe-area-inset-top)); right:max(18px,env(safe-area-inset-right)); display:flex; flex-direction:column; gap:8px; pointer-events:none;
  max-height:calc(100vh - 36px); overflow-y:auto; overscroll-behavior:contain; }
/* В кабинете тосты стоят ниже шапки (70px): иначе «С возвращением» закрывал
   колокольчик и аватар на время показа. */
body:not(.is-landing) #toast-root { top:calc(70px + 10px + env(safe-area-inset-top, 0px)); max-height:calc(100vh - 100px); }
.toast { min-width:260px; max-width:370px; padding:13px 15px 13px 14px; display:flex; align-items:flex-start; gap:10px; border:1px solid var(--line); border-left:4px solid var(--blue); border-radius:9px; background:var(--surface); box-shadow:var(--sh-lg); color:var(--ink); font-size:13.5px; font-weight:550; pointer-events:auto; animation:toast-in .25s var(--ease); }
.toast > span:first-of-type, .toast .toast-text { flex:1; min-width:0; }
/* Раньше тип сообщения передавала только полоска слева, а success и info были
   почти одного цвета. Добавляем заливку и значок — тип виден с одного взгляда. */
.toast::before { content:'i'; flex:none; width:20px; height:20px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--blue-bg); color:var(--blue); font-family:var(--display); font-size:12px; font-weight:650; }
.toast.success { border-left-color:var(--green); background:linear-gradient(90deg,var(--green-bg),var(--surface) 42%); }
.toast.success::before { content:'✓'; background:var(--green-bg); color:var(--green-2); }
.toast.error::before { content:'!'; background:var(--red-bg); color:var(--red-ink); }
.toast.error { border-left-color:var(--red); background:linear-gradient(90deg,var(--red-bg),var(--surface) 42%); }
.toast-text { flex:1; min-width:0; }
.toast-close { flex:none; width:26px; height:26px; margin:-3px -4px 0 0; padding:0; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:19px; line-height:1; cursor:pointer; }
.toast-close:hover { background:var(--red-bg); color:var(--red-ink); }
@keyframes toast-in { from { opacity:0; transform:translateX(24px); } }

/* ---------- Диалоги ---------- */
#modal-root:empty { display:none; }
/* Прокрутка внутри наложений не утекает на страницу под ними: доскроллив модалку
   или список уведомлений до края, пользователь иначе начинал прокручивать фон. */
.modal-bg { position:fixed; z-index:1000; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(7,20,16,.72); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); animation:veil-in .16s ease; overscroll-behavior:contain;
  padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); }
.modal { width:100%; max-width:540px; max-height:min(90vh,760px); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--modal-line); border-radius:4px 20px 4px 20px; background:var(--surface); box-shadow:var(--paper-edge),var(--sh-lg); animation:dialog-in .22s cubic-bezier(.2,.82,.3,1); }
/* Окно с таблицей в теле (импорт прайса): восемь колонок в 540 px сминаются в
   столбики по одной букве, и предпросмотр, ради которого всё и затевалось,
   прочитать нельзя. На узком экране ширину ограничивает сам .modal-bg, а
   таблица, как и везде, прокручивается внутри .table-wrap. */
.modal.wide { max-width:1120px; }
.modal .m-head { flex:none; padding:19px 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); background:var(--panel); }
.modal .m-head h3 { margin:0; font-size:19px; }
.modal .m-body { min-height:0; padding:22px; overflow-y:auto; overscroll-behavior:contain; }
.modal .m-body > :first-child { margin-top:0; }
.modal .m-foot { flex:none; padding:15px 22px; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; border-top:1px solid var(--line); background:var(--panel); }
/* Итог заказа в подвале окна (прайс): сумма видна рядом с кнопкой, не за прокруткой тела. */
.modal .m-foot:has(.modal-total) { align-items:center; }
.modal .m-foot .modal-total { flex:1 1 0; display:flex; flex-direction:column; min-width:120px; align-self:center; margin-right:auto; }
.modal .m-foot .modal-total > b { font-size:20px; line-height:1.2; }
.modal .m-foot .modal-total .hint { margin-top:2px; line-height:1.4; }
/* Окно ручного действия администратора (staff/common.js, overrideDialog):
   «что изменится» списком, блок «будет обойдено» с галочками, поле причины. */
.override-what { margin:0 0 14px; }
.override-what-list { margin:6px 0 0; padding-left:20px; line-height:1.5; }
.override-what-list li + li { margin-top:3px; }
.override-rules { margin:0 0 14px; }
.override-rules-body { flex:1; min-width:0; }
.override-rules-list { margin-top:6px; }
.override-rules .override-rule { margin:4px 0 0; color:var(--amber-ink); font-size:13.5px; }
.override-rules .override-rule input { margin-top:3px; }
/* «несмотря на <правило>» одной строкой: общее .alert b делает жирное блоком. */
.override-rules .override-rule b { display:inline; margin:0; }
.override-fields .field { margin-bottom:6px; }
/* Окна ручных действий с автором заказа и сообщения от имени сервиса
   (order/author-manual.js, staff/broadcast.js): выбор режима и получателей
   строками с пояснением, предпросмотр числа получателей. */
.manual-choice { margin:0 0 14px; padding:0; border:0; min-width:0; }
.manual-choice legend { margin-bottom:6px; padding:0; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.manual-choice .check-row { display:flex; align-items:flex-start; margin:0 0 6px; font-size:13.5px; }
.manual-choice .check-row input { margin-top:3px; flex:none; }
.manual-choice .check-row .hint { display:block; margin-top:2px; }
.manual-choice .check-row.is-disabled { opacity:.65; cursor:not-allowed; }
.manual-choice .row { margin-top:4px; }
.broadcast-preview { margin:0 0 14px; }
.broadcast-preview .kv { margin:6px 0 0; }
.broadcast-people { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0; }
.broadcast-people .chip { cursor:default; }
.broadcast-people .chip button { margin-left:6px; border:0; background:none; color:var(--muted); cursor:pointer; font-size:14px; line-height:1; padding:0; }
/* Лента «Недавно» в карточке «Обслуживание и объявление»: строки журнала. */
.maintenance-history { margin:0; padding-left:18px; font-size:13px; line-height:1.5; }
/* Волна «омни», дорожка «мягкое удаление»: поля окна режима обслуживания и
   объявления (staff/maintenance-card.js), строка корзины в «Удалённых
   файлах» и таблица раздела «Корзина» (staff/trash.js). */
.maintenance-form .field { display:block; margin-bottom:10px; }
.maintenance-form .textarea, .maintenance-form .input { width:100%; max-width:100%; box-sizing:border-box; }
.maintenance-checks { display:grid; gap:4px; margin-top:4px; }
.maintenance-checks .consent-row { margin:0; font-size:13.5px; }
.removed-file-trash { margin-top:4px; }
.trash-table td { vertical-align:top; }
.trash-table td.num { text-align:right; white-space:nowrap; }
/* Волна «омни» 2 (AD2-01): скрытый отзыв о преподавателе во вкладке «Скрытые»
   и плашка досье «удаление запланировано» — во всю ширину ряда мер. */
.review-item.is-hidden { border-left:3px solid var(--line); padding-left:10px; }
.deletion-scheduled { flex-basis:100%; margin:6px 0 0; }
/* Волна «омни-2», AD2-02: объединение дублей (staff/merge-dupes.js) — выбор
   приёмника строками с переключателем, пара «дубль → приёмник», таблица
   «что будет перенесено» и вопросы «что оставить» у приёмника. */
.merge-pick-list { display:grid; gap:4px; max-height:min(46vh, 360px); overflow-y:auto; padding:2px; }
.merge-pick-row { display:flex; gap:10px; align-items:flex-start; padding:8px 10px; border:1px solid var(--line-2); border-radius:9px; background:var(--surface-2); cursor:pointer; }
.merge-pick-row:has(input:checked) { border-color:var(--primary); background:var(--hover); }
.merge-pick-row input { margin-top:3px; flex:none; }
.merge-pick-text { display:flex; flex-direction:column; min-width:0; overflow-wrap:anywhere; }
.merge-preview { margin:0 0 14px; }
.merge-pair { display:grid; grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr); gap:10px; align-items:center; margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); overflow-wrap:anywhere; }
.merge-pair .merge-arrow { width:22px; height:22px; color:var(--muted); }
.merge-what { margin:14px 0 0; }
.merged-from .mi, [data-dossier-duplicates] .mi { width:15px; height:15px; vertical-align:-2px; color:var(--accent-2); }
/* Служебная информация карточки заказа: «Источник: с сайта …», «Заказ оформил за заказчика». */
[data-order-source] .mi, [data-created-by-staff] .mi { width:14px; height:14px; vertical-align:-2px; color:var(--accent-2); }
.merge-sites-title { display:block; margin:0 0 6px; }
/* Таблица в окне: три колонки помещаются и без общего min-width таблиц данных. */
table.data.merge-sites-table { min-width:0; }
.merge-sites-table th, .merge-sites-table td { padding:9px 12px; }
.merge-sites-table td.num, .merge-sites-table th.num { text-align:right; white-space:nowrap; }
.merge-conflicts { margin-top:12px; }
.merge-conflict { margin:8px 0 0; padding:0; border:0; min-width:0; }
.merge-conflict legend { margin-bottom:4px; padding:0; font-size:13.5px; font-weight:600; color:var(--amber-ink); }
.merge-conflict .consent-row { margin:2px 0; color:var(--amber-ink); }
.merge-blockers ul { margin:0; padding-left:20px; line-height:1.5; }
.merge-blockers li + li { margin-top:4px; }
.merged-from { overflow-wrap:anywhere; }
@media (max-width: 560px) {
  .merge-pair { grid-template-columns:minmax(0, 1fr); }
  .merge-pair .merge-arrow { transform:rotate(90deg); justify-self:start; }
}
/* Строка «Ручные действия администратора» в досье: текст решения жирным, причина — следом. */
.note.manual-action .note-text b { color:var(--ink); }
/* Деньги вручную (волна «омни», money-ops): суммы с повтором в две колонки,
   способ возврата, живой расчёт «заказчику / с автора» и блок «Деньги заказа»
   в служебной панели карточки (order/money-ops.js, staff/balance-adjust.js). */
.money-ops-fields { display:grid; gap:10px; margin:0 0 14px; }
.money-ops-fields .field { margin-bottom:0; }
.money-ops-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px 12px; }
@media (max-width:560px) { .money-ops-grid { grid-template-columns:1fr; } }
.money-ops-via { margin:0; padding:8px 12px 10px; border:1px solid var(--line); border-radius:10px; min-width:0; }
.money-ops-via legend { padding:0 4px; font-size:13px; color:var(--muted); }
.money-ops-via .consent-row { margin:4px 0 0; }
.money-ops-preview { margin:0; line-height:1.55; }
/* Заголовок блока «Деньги заказа — действия администратора»: значок щита
   без ограничения размера растягивался на 300×300 px (order/money-ops.js). */
.money-ops-title svg { width:14px; height:14px; vertical-align:-2px; }
/* Сумма рядом с подписью: общее .alert b делает жирное блоком. */
.money-ops-preview b { display:inline; margin:0; }
.money-ops { padding-top:10px; border-top:1px dashed var(--line); }
.money-ops-row + .money-ops-payment, .money-ops-payment + .money-ops-payment { margin-top:8px; }
.money-ops-refunds { padding-left:18px; margin-top:4px; }
/* Вкладки досье «Досье · Деньги» (волна «омни», AD1-08) и лента денег:
   сумма «+» зелёным, «−» красным, строка-справка приглушена и в остаток не входит. */
.dossier-tabs { margin-bottom:16px; }
.dossier-tabs button svg { width:15px; height:15px; margin-right:6px; vertical-align:-3px; }
/* Панель вкладки показывается сразу: общая задержка появления детей .content
   (до .13 с) на каждом переключении читалась как подвисание. */
.content > [data-dossier-pane] { animation-delay:0s; }
/* Вкладка «Письма и уведомления» (волна «омни-2», AD2-12): две колонки на
   широком экране, одна — на телефоне; текст письма — с переносами строк. */
.comms-columns { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:14px; align-items:start; }
.comms-columns > .card { margin:0; }
.comms-list { list-style:none; margin:0; padding:0; display:grid; gap:10px; max-height:640px; overflow:auto; }
.comms-row { padding:8px 10px; border:1px solid var(--line); border-radius:8px; }
.comms-row.is-unread { border-color:var(--blue-line); background:var(--blue-bg); }
.comms-row .mail-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.comms-row details > summary { cursor:pointer; }
/* «Платежи» (волна «омни-2», AD2-12): отборы в ряд с переносом, номер у
   платёжного сервиса — моноширинным, длинный не растягивает таблицу. */
.payments-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.payments-filters > .input[type='search'] { flex:1 1 100%; }
.payments-filters .select { flex:1 1 180px; max-width:240px; }
.payments-period { display:flex; align-items:center; gap:6px; flex:1 1 360px; }
.payments-period .input { flex:1 1 140px; max-width:180px; min-width:0; }
table.data.payments-table { min-width:900px; }
.payments-table td { vertical-align:top; font-size:13px; }
table.payments-table td { overflow-wrap:normal; }
.payments-table .nowrap { white-space:nowrap; }
table.payments-table td.payments-provider-id { font-family:ui-monospace,Consolas,monospace; font-size:12px; overflow-wrap:anywhere; max-width:220px; }
@media (max-width:560px) {
  .comms-columns { grid-template-columns:1fr; }
  .payments-filters .select { flex:1 1 100%; max-width:none; }
  .payments-period .input { max-width:none; }
}
.money-period { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.money-period-dates { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-left:auto; }
.money-date { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; }
/* Кегль поля — общий: на телефоне правило 16px (CMR-08) не даёт браузеру увеличивать страницу. */
.money-date .input { width:160px; min-height:36px; padding:6px 10px; }
.money-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:12px; }
.money-summary-group { padding:12px 14px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); }
.money-summary-title { margin-bottom:8px; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.money-summary .kv { grid-template-columns:minmax(0,1fr) auto; gap:6px 14px; }
.money-summary .kv dd { text-align:right; font-variant-numeric:tabular-nums; }
.money-summary dd[data-money-total="balance"] { font-size:16px; }
.money-summary-hint { color:var(--muted); font-size:12px; font-weight:400; }
table.data.money-ledger td { padding:11px 14px; vertical-align:top; }
.money-amount.plus { color:var(--green-ink); }
.money-amount.minus { color:var(--red-ink); }
.money-amount.muted, .money-row.is-info td { color:var(--muted); }
.money-info-badge { margin-left:6px; vertical-align:1px; }
.money-note { font-style:italic; }
/* Окно удаления по запросу: обращения «Персональные данные» — чипами над основанием. */
.privacy-threads .btn { font-variant-numeric:tabular-nums; }
/* Ручные действия с заказом (staff/order-manual.js): заказ за заказчика,
   «было → станет» условий, список статусов и решение по деньгам при отмене. */
.manual-kind { display:flex; flex-wrap:wrap; gap:4px 18px; }
.manual-kind .consent-row, .manual-status-list .consent-row, .manual-money-choices .consent-row { margin:0 0 6px; color:var(--ink); }
.manual-client-list, .manual-price-found { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.manual-client-list .btn, .manual-price-found .btn { max-width:100%; white-space:normal; text-align:left; }
.manual-price-picked { display:grid; gap:6px; margin:4px 0 12px; }
.manual-price-picked:empty { display:none; }
.manual-price-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.manual-price-row > div { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
.manual-price-row select { flex:1 1 200px; min-width:0; }
.manual-diff li b { color:var(--ink); }
.manual-existing, .manual-blocked { margin:0 0 14px; font-size:13.5px; }
.manual-existing .btn { margin-left:4px; }
.manual-blocked summary { cursor:pointer; color:var(--muted); }
.manual-money { margin:0 0 14px; }
.manual-money-body { flex:1; min-width:0; }
.manual-money-choices { margin-top:6px; }
.actions-admin { align-items:center; }
/* Досье (волна «омни-2», staff/dossier-rights.js): окно блокировки с разбором
   заказов — заказ рамкой, решения строками, последствия выбранного и повтор
   суммы под ними; карточка «Рычаги досье» — блоки с подписью. */
.block-orders-wrap { margin:0 0 14px; }
.block-orders { display:grid; gap:10px; margin:8px 0 10px; }
.block-order { padding:10px 12px 8px; border:1px solid var(--line); border-radius:10px; }
.block-order legend { padding:0 4px; overflow-wrap:anywhere; }
.block-order .override-what-list:empty { display:none; }
.block-order-amount { margin:8px 0 0; }
.block-order-amount .input { max-width:220px; }
.lever-block { padding:10px 0; border-top:1px solid var(--line-2); }
.lever-block:first-of-type { border-top:0; padding-top:0; }
.lever-title { margin-bottom:2px; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.order-view-as .kv { margin:6px 0 0; }
.order-view-as-actions { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0; }
.order-view-as-history { max-height:220px; overflow-y:auto; margin:6px 0 0; padding-left:18px; font-size:13px; line-height:1.5; }
.modal .x { width:36px; height:36px; flex:none; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--muted); font-size:20px; line-height:1; cursor:pointer; transition:color .15s,background .15s,border-color .15s; }
.modal .x:hover { border-color:#d2a3a5; background:var(--red-bg); color:var(--red); }
@keyframes veil-in { from { opacity:0; } }
@keyframes veil-out { to { opacity:0; } }
@keyframes dialog-out { to { opacity:0; transform:translateY(6px) scale(.985); } }
/* Уход зеркалит появление: без этого модалка и панель исчезали рывком,
   и глаз терял место, к которому был привязан. */
.modal-bg.is-closing { animation:veil-out var(--dur-fast) ease forwards; }
.modal-bg.is-closing .modal { animation:dialog-out var(--dur-fast) ease forwards; }
.notif-panel.is-closing { animation:dialog-out var(--dur-fast) ease forwards; }
@keyframes dialog-in { from { opacity:0; transform:translateY(12px) scale(.985); } }

/* ---------- Уведомления ---------- */
/* Панель раскрывается из точки под колокольчиком: transform-origin в правом
   верхнем углу связывает появление с триггером — иначе прямоугольник «прилетал
   ниоткуда». Каретка — отдельный фиксированный слой (.notif-caret), потому что
   сама панель прокручивается (overflow-y) и «клюв» на её краю обрезался бы. */
.notif-panel { position:fixed; z-index:50; top:77px; right:max(20px,env(safe-area-inset-right)); width:380px; max-width:calc(100vw - 28px); max-height:min(480px,calc(100vh - 96px)); overflow-y:auto; overscroll-behavior:contain; border:1px solid var(--line); border-radius:4px 16px 4px 16px; background:var(--surface); box-shadow:var(--sh-lg); transform-origin:100% 0; animation:notif-pop .17s var(--ease); }
.notif-caret { position:fixed; z-index:51; width:13px; height:13px; background:var(--panel); border-left:1px solid var(--line); border-top:1px solid var(--line); border-radius:3px 0 0 0; transform:rotate(45deg); box-shadow:-2px -2px 4px rgba(12,30,25,.05); animation:notif-caret-in .17s var(--ease); pointer-events:none; }
@keyframes notif-pop { from { opacity:0; transform:translateY(-6px) scale(.96); } }
@keyframes notif-caret-in { from { opacity:0; } }
.notif-panel .nh { position:sticky; z-index:1; top:0; padding:14px 17px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); background:var(--panel); font-family:var(--display); font-weight:650; }
.notif-item { width:100%; min-height:50px; padding:12px 17px; display:flex; align-items:flex-start; gap:11px; border:0; border-bottom:1px solid var(--line-2); background:var(--surface); color:var(--ink); text-align:left; font-size:13.5px; }
.notif-ico { width:28px; height:28px; flex:none; margin-top:1px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; background:var(--surface-2); box-shadow:inset 0 0 0 1px var(--line); color:var(--muted); }
.notif-ico svg { width:14px; height:14px; }
.notif-body { flex:1; min-width:0; }
.notif-item.unread .notif-ico { color:var(--primary); }
button.notif-item { cursor:pointer; }
button.notif-item:hover { background:var(--item-hover); }
.notif-item.unread { box-shadow:inset 3px 0 var(--unread-mark); background:var(--unread-bg); }
.notif-item .nt { margin-top:2px; color:var(--muted); font-size:11.5px; }

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width:1080px) {
  .feat-grid { grid-template-columns:repeat(2,1fr); }
  .stat-grid, .stat-grid.stat-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Две колонки имеют смысл, только пока главная заметно шире боковой: при 320px
   боковой ей нужно от 450px, то есть окно от ~1120px. Ниже — одна колонка. */
@media (max-width:1120px) {
  .detail-grid { grid-template-columns:1fr; }
}

@media (max-width:960px) {
  .hero { grid-template-columns:1fr; padding-top:45px; gap:50px; }
  .hero-left { max-width:760px; }
  /* В одну колонку первый экран низкий: целый знак в прежнем кегле залез бы
     на абзац и кнопки. Кегль меньше — верх букв там же, где был. */
  .hero-bg::after { font-size:30vw; }
  .auth-card { width:100%; max-width:500px; margin:0 auto; box-shadow:12px 12px 0 rgba(6,20,16,.3),var(--sh-lg); }
  /* Карточка входа здесь живёт в своей секции после «Возможностей» (landing.js
     переносит её ниже 960px) — секция короче остальных: в ней один блок. */
  .auth-slot { display:block; padding-top:56px; padding-bottom:56px; }
  .auth-slot-head .sub { margin-bottom:26px; }
  .steps { grid-template-columns:repeat(2,1fr); }
  .step:nth-child(2) { border-right:0; }
  .step:nth-child(-n+2) { border-bottom:1px solid rgba(222,187,128,.18); }
  .step .arrow-link { display:none!important; }
}

/* Боковая панель уходит в шторку заметно раньше мобильной вёрстки: до 1000px
   постоянные 270px отнимают у контента больше трети окна, и на «ноутбуке в
   половину экрана» рабочая колонка оказывалась уже, чем на планшете. */
@media (max-width:1000px) {
  :root { --sidebar-w:0px; }
  .shell { grid-template-columns:minmax(0,1fr); }
  .sidebar { position:fixed; z-index:70; left:-286px; width:270px; transition:left var(--dur-slow) var(--ease); }
  .sidebar.open { left:0; box-shadow:var(--sh-lg); }
  .scrim { display:block; position:fixed; z-index:65; inset:0; width:100%; height:100%; padding:0; border:0; background:rgba(5,18,14,.65); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); cursor:pointer; animation:veil-in var(--dur) var(--ease); }
  .topbar .burger { display:flex; }
  .topbar .icon-btn.primary { display:flex; }
}

/* Закреплённое главное действие карточки заказа — только на телефоне; на
   широком экране блок «Действия» и так на виду. */
.sticky-action { display:none; }
@media (max-width:760px) {
  .sticky-action { position:fixed; z-index:60; left:0; right:0; bottom:0; display:flex; gap:8px; padding:10px max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); border-top:1px solid var(--line); background:var(--surface); background:color-mix(in srgb,var(--surface) 94%,transparent); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); box-shadow:0 -8px 24px rgba(12,30,25,.12); }
  /* Кнопки ужимаются (min-width:0, перенос текста): три кнопки — главная,
     вторая и «Чат» — на 360 px иначе вылезали за экран. */
  .sticky-action .btn { flex:1 1 auto; min-width:0; min-height:48px; padding-inline:12px; justify-content:center; white-space:normal; text-align:center; line-height:1.15; }
  .sticky-action .sticky-secondary { flex:0 1 auto; }
  /* Значок «Чат» со счётчиком новых сообщений (W1-13): рядом с главным
     действием узкой кнопкой, без него — во всю полосу. */
  .sticky-action .sticky-chat { position:relative; flex:0 0 auto; white-space:nowrap; }
  .sticky-action .sticky-chat:only-child { flex:1; }
  /* Рядом со второй кнопкой у «Чата» остаётся только значок со счётчиком. */
  .sticky-action .sticky-secondary ~ .sticky-chat .sticky-chat-label { display:none; }
  .sticky-action .sticky-chat-count { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 5px; display:flex; align-items:center; justify-content:center; border:2px solid var(--ndot-ring); border-radius:999px; background:var(--ndot-bg); color:#fff; font-size:10px; font-weight:700; line-height:1; }
  .content.has-sticky-action { padding-bottom:96px; }
  /* Пока список ставок на экране, полоса «К ставкам» прячется. */
  .sticky-action.is-hidden { display:none; }
  /* Подвал под полосой: иначе она накрывала последние строки. */
  .content.has-sticky-action ~ .cabinet-footer { padding-bottom:96px; }
}
@media (max-width:760px) {
  .content { padding:21px 16px 36px; }
  .cabinet-footer { padding:12px 16px 18px; }
  .stat-grid, .stat-grid.stat-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-head h1 { font-size:24px; }
  .feat-grid { grid-template-columns:1fr; }
  .lsection { padding:70px 5vw; }
  .cta-band { width:90vw; }
  /* На телефоне фото первого экрана почти целиком под градиентом и под
     карточкой входа — не видно ничего, кроме лишних килобайт в мобильной сети. */
  .hero-bg { background-image:radial-gradient(70% 40% at 8% 6%,rgba(214,170,97,.12),transparent 60%),linear-gradient(92deg,rgba(9,27,22,.97) 0%,rgba(12,33,27,.91) 47%,rgba(12,30,25,.82) 100%); }
  /* В одну колонку min-height:230px оставлял под каждой карточкой пустой
     низ — шесть карточек теряли по экрану на воздух. */
  .feat { min-height:0; padding:22px 20px; }
  .feat .fico { margin-bottom:14px; }
  .btn.ghost.reviews-more { display:flex; width:100%; min-height:46px; margin-top:14px; justify-content:center; color:var(--cream); border-color:rgba(221,179,109,.48); background:transparent; box-shadow:none; }
  .btn.ghost.reviews-more:hover { background:rgba(221,179,109,.12); }
}

@media (max-width:520px) {
  .lnav { padding:10px 16px; }
  .lnav .btn { margin-left:auto; }
  .lnav .menu-btn span { display:none; }
  /* Цели касания от 44px: бургер, «Войти» и пункты выпавшего меню. Шапка при
     этом не растёт — отступы панели ужаты ровно на эту разницу. */
  .lnav .menu-btn { width:44px; min-height:44px; padding:0; justify-content:center; }
  .lnav .brand { font-size:18px; }
  .lnav .brand .logo { width:34px; height:34px; }
  .lnav .btn { min-height:44px; padding:8px 14px; }
  .lnav .links a { min-height:44px; }
  .hero { padding:43px 16px 56px; }
  /* Из-под карточки на телефоне выглядывал обрезанный кусок «Z» — читался как
     дефект, а не как водяной знак. */
  .hero-bg::after { display:none; }
  .lsection { padding:52px 5vw; }
  .lsection .sub { margin-bottom:28px; }
  .hero-left h1 { font-size:clamp(39px,13vw,57px); }
  .hero-left h1 .accent { margin-left:0; }
  .hero-left p.lead { font-size:15.5px; }
  .hero-cta { display:grid; grid-template-columns:1fr; }
  .hero-cta .btn { width:100%; }
  /* Три цифры в ряд на 390px не помещаются без переноса слов в подписях —
     две колонки, и подпись остаётся целой. */
  .hero-stats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 12px; }
  .hero-stats .s { max-width:none; }
  /* Зазор между цифрами всего 12px — вертикальная нить в него не помещается. */
  .hero-stats .s + .s::before { display:none; }
  .hero-stats .s .n { font-size:23px; }
  .hero-stats .s .l { font-size:11.5px; min-height:0; }
  .auth-card { padding:25px 20px; border-radius:3px 17px 3px 17px; box-shadow:8px 8px 0 rgba(6,20,16,.3),var(--sh-lg); }
  .social-row { flex-direction:column; }
  .steps { grid-template-columns:1fr; }
  /* Номер слева от текста, а не над ним: шаг ужимается с ~200px до ~115px,
     и четыре шага видны за полтора экрана. Заголовок может быть h3 или h4. */
  .step { display:grid; grid-template-columns:40px 1fr; column-gap:14px; min-height:0; padding:18px 12px; border-right:0; border-bottom:1px solid rgba(222,187,128,.18); }
  .step .num { margin:0; grid-row:span 2; }
  .step h3, .step h4 { margin-bottom:4px; }
  .step:last-child { border-bottom:0; }
  .lsection h2 { font-size:30px; }
  .cta-inner { padding:36px 18px; }
  /* На узкой плашке созвездие налезает на текст — оставляем только чистое поле. */
  .cta-orn { display:none; }
  .cta-buttons { flex-direction:column; }
  .cta-buttons .btn { width:100%; }
  .faq-item p { padding-right:8px; }
  /* Команда — горизонтальными карточками: фото слева, имя и роль справа. */
  .person { display:grid; grid-template-columns:64px 1fr; gap:4px 14px; text-align:left; padding:16px; }
  .person-photo { width:64px; height:64px; grid-row:span 3; margin:0; }
  .person p { margin-top:6px; }
  .lfooter { text-align:left; }

  .topbar { height:62px; padding:0 11px; gap:7px; }
  /* Ссылка-домик в крошках: площадь касания 40×40 вместо голой иконки. */
  .topbar .crumb .crumb-link { min-width:40px; min-height:40px; justify-content:center; padding:0; }
  .icon-btn { width:38px; height:38px; }
  /* На телефоне — только ближайший родитель и текущая страница; дальние
     предки остаются в дереве для читалок. Подпись «Главная» у домика прячем —
     иконки достаточно. */
  .topbar .crumb > .crumb-far, .topbar .crumb .crumb-home-text { display:none!important; }
  .topbar .crumb { font-size:12px; }
  /* Вход в «Новый заказ» на экране один: на телефоне он уже есть в шапке («+»). */
  .page-head > .btn[href="#/new"] { display:none; }
  .top-avatar { display:none; }
  .content { padding:18px 12px 32px; }
  .page-head { align-items:stretch; }
  .page-head > .btn { width:100%; }
  .card { padding:18px 15px; border-radius:3px 13px 3px 13px; }
  .stat-grid, .stat-grid.stat-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .stat { padding:16px 14px; }
  .stat .st-n { font-size:23px; }
  .stat .st-l { font-size:11.5px; }
  .order-card { padding:17px 15px; }
  .oc-head { flex-direction:column; }
  .oc-head > :last-child { text-align:left; }
  /* Поля переходят в столбик, но интервал между ними обязан остаться:
     с gap:0 соседние поля и кнопки слипались в сплошную полосу. */
  .row { gap:10px; }
  .row > * { flex-basis:100%; min-width:0; }
  .kv { grid-template-columns:98px minmax(0,1fr); gap:9px 10px; }
  /* «Коротко о заказе» (CAB-W3-03): своё правило ширины подписей (118px) по
     специфичности перебивало общее выше — на телефоне подписи как у соседних
     карточек «О заказе». */
  .auction-brief .kv { grid-template-columns:98px minmax(0,1fr); }
  .sys-grid { grid-template-columns:1fr; }
  .sys-card .kv { grid-template-columns:1fr; gap:2px 0; }
  .sys-card .kv dt { margin-top:8px; }
  .wd-toolbar > * { flex-basis:100%; }
  .wd-card .bid-top { flex-direction:column; align-items:stretch; gap:6px; }
  .wd-card .bid-top > .flex:last-child { justify-content:space-between; }
  .wd-registry .input[type=date], .wd-registry .select { max-width:none; flex:1 1 45%; }
  .wd-search .input[type=date], .wd-search .select { max-width:none; }
  .stat-grid.finance-authors { grid-template-columns:1fr; }
  .finance-controls .input[type=date] { max-width:none; flex:1 1 40%; }
  .backup-code-list { grid-template-columns:1fr; }
  .totp-secret { justify-content:center; }
  .chat { height:420px; }
  .chat-input { gap:5px; }
  .chat-input .icon-btn { width:38px; }
  .chat-input .btn { width:42px; min-width:42px; padding:0; }
  .msg { max-width:92%; }
  .rating-star { width:40px; height:40px; font-size:26px; }

  /* max(), а не голое число: иначе значение затирало env() выше и уведомление
     уезжало под вырез камеры. То же ниже для панели и модального окна. */
  /* Ниже верхней панели кабинета (62px на телефоне): тост «Аккаунт создан»
     накрывал кнопку меню, и первый экран нового пользователя начинался с
     поиска, как его закрыть. */
  #toast-root { left:max(10px,env(safe-area-inset-left)); right:max(10px,env(safe-area-inset-right)); top:max(10px,env(safe-area-inset-top)); }
  body:not(.is-landing) #toast-root { top:calc(62px + 8px + env(safe-area-inset-top, 0px)); }
  .toast { width:100%; min-width:0; max-width:none; }
  .notif-panel { left:max(10px,env(safe-area-inset-left)); right:max(10px,env(safe-area-inset-right)); top:69px; width:auto; max-width:none; }
  .modal-bg { padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); align-items:flex-end; }
  .modal { max-height:calc(100vh - 16px); max-height:calc(100dvh - 16px); border-radius:12px 12px 3px 3px; }
  .modal .m-head { padding:16px; }
  .modal .m-body { padding:17px 16px; }
  .modal .m-foot { padding:13px 16px; display:grid; grid-template-columns:1fr; }
  .modal .m-foot .modal-total { align-items:flex-start; }
  .modal .m-foot .btn { width:100%; white-space:normal; }
  .quote-line { gap:10px; }
}

@media (max-width:350px) {
  .stat-grid { grid-template-columns:1fr; }
  .tabs button { padding-inline:5px; font-size:12.5px; }
  .rating-stars { gap:1px; }
  .rating-star { width:38px; height:38px; font-size:24px; }
}

/* Первый экран на невысоком окне (макет ТЗ, CMR-62). Кнопки первого экрана
   обязаны быть видны без прокрутки, а на 1366×768, 1280×720 и 360×740 они
   уходили под сгиб: над строкой входа стояли два запаса воздуха — отступ
   секции и отступ колонки, — а заголовок на широком окне занимает три
   строки по 80 px. Ужимаем только воздух и, на ноутбуке, кегль заголовка по
   высоте окна; порядок, тексты и высокие экраны — как были. */
@media (min-width:961px) and (max-height:820px) {
  .hero { padding-top:40px; }
  .hero-left { padding-top:12px; }
  .hero-left .pill { margin-bottom:20px; }
  .hero-left h1 { margin-bottom:18px; font-size:clamp(45px,min(6.4vw,9.4vh),82px); }
  .hero-left p.lead { margin-bottom:26px; }
}
@media (max-width:520px) and (max-height:900px) {
  .hero { padding-top:32px; }
  .hero-left { padding-top:8px; }
  .hero-crumb { margin-bottom:12px; }
  .hero-left .pill { margin-bottom:16px; }
  .hero-left h1 { margin-bottom:16px; }
  .hero-left p.lead { margin-bottom:22px; }
}


/* ============================================================
   ТЁМНАЯ ТЕМА
   Включается системной настройкой. Кабинет собран на токенах, поэтому тема —
   это их переопределение; лендинг тёмный по собственному дизайну и не трогается
   (иначе светлая карточка входа получила бы кремовый текст на кремовом фоне).
   Значения подобраны под те же нормы контраста, что и светлые: основной текст
   ≥4.5:1, приглушённый ≥4.5:1, крупные цифры ≥3:1 — проверено замером.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  body:not(.is-landing) {
    color-scheme: dark;

    --bg:#101915; --surface:#182420; --surface-2:#1c2924; --surface-3:#213029;
    --panel:#1c2823; --hover:#243430; --hover-line:#4c5c54; --chip-bg:#22322b;
    --tabs-bg:#131d19; --disabled-bg:#1b2621; --disabled-line:#2f3b35;
    --input-line:#47564e; --quote-bg:#1b2925; --skel-mid:#25352e;
    --spin-track:#2f3b35; --star-focus:#3b321f; --ndot-ring:#1c2823; --ndot-bg:#c4423d; --on-green:#10241b; /* темнее --red: белые цифры счётчика остаются читаемыми (5:1) */
    --topbar-bg:rgba(16,25,21,.85); --topbar-line:rgba(64,78,71,.6);
    --scroll-shadow:rgba(0,0,0,.55);
    --card-glass:rgba(24,36,32,.96); --stat-glass:rgba(24,36,32,.94);
    --paper-glow:rgba(217,171,99,.05); --paper-stripe:rgba(255,255,255,.012);
    --busy-bar:rgba(255,255,255,.25);
    --unread-bg:#243228; --unread-mark:#d9ab63; --item-hover:#22302a;
    --selection-bg:#5c4a22; --placeholder:#95a29a;
    --card-hover-line:#4c5c54; --danger-line:#5c3634; --modal-line:#2e3b34;
    --busy-bar-ghost:rgba(255,255,255,.22); --file-btn-bg:#243129; --file-btn-ink:#a9c6b5;
    /* Фирменный градиент кнопок на тёмных карточках давал 1.3–1.5:1 — кнопка
       читалась только по тексту. Светлее на два шага; тень остаётся чёрной. */
    --grad:linear-gradient(128deg,#3f7c67 0%,#2f604f 58%,#265042 100%);
    --primary:#3f7c67; --primary-600:#2f604f;

    --ink:#e9e6da; --ink-2:#c7cfc8; --muted:#9fada4; --faint:#9aa8a0;
    --line:#2e3b34; --line-2:#26322c;

    --v50:#1c2823; --v100:#243129; --v200:#2e3d34; --v300:#45564c;
    --v400:#93a396; --v500:#6f9c8c;
    --accent:#d9ab63; --accent-2:#caa05f; --accent-soft:#37311f;
    --grad-soft:linear-gradient(145deg,#1d2a24,#182420);

    --green:#4cb887; --green-2:#8fd8ae; --green-bg:#152e21; --green-ink:#8fd8ae; --green-line:#255239;
    --red:#e0736d; --red-bg:#361d1e; --red-ink:#ffa39e; --red-line:#5c3634;
    --amber:#d9a648; --amber-bg:#342a12; --amber-ink:#e6b873; --amber-line:#5c4a22;
    --blue:#66a9c4; --blue-bg:#132832; --blue-ink:#93c8de; --blue-line:#2a4c5c;

    --badge-bg:#233028; --badge-ink:#a9c6b5; --badge-gray-bg:#252d29; --badge-gray-ink:#aeb8b1;
    --badge-violet-bg:#2b2742; --badge-violet-ink:#c3b4ee;

    --sh-xs:0 1px 2px rgba(0,0,0,.34); --sh-sm:0 1px 2px rgba(0,0,0,.3),0 5px 16px rgba(0,0,0,.28);
    --sh-md:0 2px 6px rgba(0,0,0,.34),0 16px 36px rgba(0,0,0,.42); --sh-lg:0 6px 18px rgba(0,0,0,.4),0 30px 74px rgba(0,0,0,.56);
    /* Зелёный ореол возвращает кнопке цветную тень, а латунный оттенок в
       свечении фона — метафору настольной лампы ателье. */
    --sh-primary:0 10px 24px rgba(0,0,0,.4),0 0 22px rgba(63,124,103,.18);
    --paper-edge:inset 0 1px 0 rgba(255,255,255,.05);
    --well:inset 0 1px 4px rgba(0,0,0,.35);
  }
  /* Фирменный тёмно-зелёный как цвет ТЕКСТА на тёмных карточках нечитаем
     (1.89:1) — ценники и акценты переходят на светлую пару. Кнопки не трогаем:
     там он фон, а не текст — поэтому ссылка-кнопка (a.btn) исключена: правило
     оказывалось специфичнее .btn и красило подпись главной кнопки светло-зелёным
     по зелёному градиенту (2.94:1 на светлом крае). */
  body:not(.is-landing) a:not(.btn),
  body:not(.is-landing) .btn-link,
  body:not(.is-landing) .tabs button.active,
  body:not(.is-landing) a.table-order-link:hover,
  body:not(.is-landing) a.table-order-link:focus-visible,
  body:not(.is-landing) .stat .st-ico,
  body:not(.is-landing) .price-card .price,
  body:not(.is-landing) .bid .price,
  body:not(.is-landing) .quote-line.total b,
  body:not(.is-landing) .price-teachers > summary,
  body:not(.is-landing) .tp-copy > summary,
  body:not(.is-landing) .btn.outline { color:var(--green-2); }
  /* Марка в боковой панели остаётся кремовой, как в светлой теме: правило
     ссылок выше специфичнее .sidebar .brand и красило её светло-зелёным. */
  body:not(.is-landing) .sidebar .brand { color:var(--cream); }
  body:not(.is-landing) .sidebar .brand:hover { color:#fff; }
  /* Латунное кольцо фокуса читается на тёмном лучше светлым. */
  body:not(.is-landing) :focus-visible { outline-color:#d9ab63; }
  /* Значки статусов с точкой: точка наследует цвет — норм; заголовки таблиц
     на тёмной подложке нуждаются в светлой букве. */
  body:not(.is-landing) table.data th { background:var(--v50); color:#aab6ae; }
  /* Исходящий пузырь чата остаётся фирменным тёмно-зелёным — на тёмном фоне
     ему нужна рамка, чтобы не сливаться. */
  body:not(.is-landing) .msg.out { border-color:#3a5a4d; }
  body:not(.is-landing) .icon-btn:hover { border-color:var(--hover-line); background:var(--hover); color:var(--green-2); }
  body:not(.is-landing) .filter-chips .chip.active { border-color:#4a8a72; }
  /* Шеврон select зашит картинкой — тёмной теме нужна светлая обводка. */
  body:not(.is-landing) .select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aab6ae' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
  body:not(.is-landing) .stat .st-ico { background:var(--v100); }
  /* Приглушённые сплошные заливки, набранные в правилах литералами. */
  body:not(.is-landing) .toast.success { background:linear-gradient(90deg,var(--green-bg),var(--surface) 42%); }
}

@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
}

@media (prefers-contrast:more) and (prefers-color-scheme: dark) {
  body:not(.is-landing) { --line:#55655c; --muted:#c0cbc4; }
}
@media (prefers-contrast:more) {
  :root { --line:#9e988d; --muted:#4f5954; }
  .btn,.icon-btn,.input,.textarea,.select,.card,.order-card,.table-wrap,
  .att-item,.invite-chip { border-width:2px; }
}

/* Приглушённый список во время подгрузки следующей страницы или нового
   поискового запроса: содержимое остаётся на месте, но по нему нельзя
   промахнуться мышью, пока оно ещё старое. */
/* Переход объявлен на самом элементе, а не только в состоянии: иначе список
   гас плавно, а возвращался рывком — класс снимается вместе с переходом. */
.list-fade { transition:opacity var(--dur) var(--ease); }
.is-loading { opacity:.45; pointer-events:none; }
@media (prefers-reduced-motion: reduce) { .list-fade { transition:none; } }

/* Надзор: журнал, досье, скрытые сообщения. Ничего яркого — сотрудник смотрит
   сюда подолгу, и страница должна читаться, а не привлекать внимание. */
.back-link { margin-bottom:14px; display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:13.5px; font-weight:600; text-decoration:none; }
.back-link:hover { color:var(--ink); }
.back-link svg { width:15px; height:15px; }
.rot180 { transform:rotate(180deg); }
.nowrap { white-space:nowrap; }
.mb-3 { margin-bottom:24px; }
.gap-3 { gap:16px; }

.signal-list { display:flex; flex-direction:column; gap:9px; margin:0; padding:0; list-style:none; }
.signal { display:flex; align-items:flex-start; gap:10px; padding:11px 13px; border:1px solid var(--line); border-left-width:3px; border-radius:3px 10px 10px 3px; font-size:14px; }
.signal svg { width:17px; height:17px; flex:none; margin-top:1px; }
.signal.warn { color:var(--amber-ink); background:var(--amber-bg); border-color:var(--amber-line); }
.signal.danger { color:var(--red-ink); background:var(--red-bg); border-color:var(--red-line); }
/* Волна 3 (W3-09): меры досье по подписанным группам — «Заблокировать» отделена
   чертой и стоит последней; документы заявки на подтверждение личности — в
   окне из памяти, картинка не шире окна. */
.measure-groups { display:flex; flex-direction:column; gap:14px; }
.measure-group-title { margin:0 0 7px; color:var(--muted); font-size:12px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.measure-group[data-measure-group="block"] { padding-top:12px; border-top:1px dashed var(--line); }
.identity-docs { display:flex; flex-direction:column; gap:12px; }
.identity-doc-img { display:block; max-width:100%; max-height:70vh; border:1px solid var(--line); border-radius:8px; }

.note-list { display:flex; flex-direction:column; gap:10px; }
.note { padding:12px 14px; border:1px solid var(--line); border-radius:3px 12px 3px 12px; background:var(--stat-glass); }
.note-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.5; }
.note-meta { margin-top:7px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:12.5px; }

/* Скрытое сообщение: рамка остаётся, содержимое приглушено. Участник видит
   причину, сотрудник — ещё и сам текст, чтобы было что разбирать. */
.msg.hidden-msg { opacity:.85; border-style:dashed; }
.m-hidden-note { display:flex; align-items:center; gap:7px; margin-bottom:5px; color:var(--amber-ink); font-size:12.5px; font-weight:600; }
.m-hidden-note svg { width:15px; height:15px; flex:none; }
/* Текст скрытого сообщения видит только сотрудник — это улика в разборе,
   поэтому не приглушаем её: зачёркивания достаточно, чтобы отличить. */
.m-hidden-text { text-decoration:line-through; text-decoration-thickness:1px; text-decoration-color:var(--muted); }
.m-hide-btn { min-height:24px; margin-left:8px; padding:0 4px; font-size:12px; font-weight:600; }
/* Своё сообщение — тёмно-зелёный пузырь: и предупреждение, и кнопка на нём
   должны быть светлыми, иначе оба сливаются с фоном. Цвета те же, что уже
   используются для времени и ссылок внутри .msg.out. */
.msg.out .m-hidden-note { color:#f0cd97; }
.msg.out .m-hide-btn { color:#dbeae2; }
.msg.out .m-hidden-text { text-decoration-color:#c7d5cf; }

/* «Справка сотрудника» (#/handbook): текст разделов собирает сервер теми же
   помощниками, что документы /legal, но лежит он в СВЕТЛОЙ карточке кабинета.
   Поэтому свой класс и кабинетные токены, а не .legal-body: там цвета тёмных
   страниц вписаны литералами (#c9d6cf, --cream), и в теме по умолчанию тело
   регламента шло 1.5:1, а каждое ключевое слово в <strong> — белым по белому.
   Ссылки не переопределяем: кабинетный цвет ссылки уже задан правилом `a`
   и меняется вместе с темой. */
.handbook-body { color:var(--ink-2); font-size:15px; line-height:1.62; overflow-wrap:anywhere; }
.handbook-body p { margin:0 0 10px; }
.handbook-body p:last-child { margin-bottom:0; }
.handbook-body ul, .handbook-body ol { margin:0 0 12px; padding-left:22px; }
.handbook-body li { margin:4px 0; }
.handbook-body strong { color:var(--ink); font-weight:650; }
/* Команды сервера в «Рабочей почте» (абзац администратора): моноширинно и на
   плашке, чтобы команду было видно целиком и копировать без соседних слов. */
.handbook-body code { padding:1px 5px; border-radius:4px; background:var(--panel); color:var(--ink); font-size:13.5px; overflow-wrap:anywhere; }
/* Таблицу печатает общий помощник (src/legal/markup.js → .legal-table), поэтому
   её рамки и шапка тоже переводятся на кабинетные токены — иначе первая же
   таблица в справке приедет с латунной рамкой тёмных страниц. */
.handbook-body .legal-table th, .handbook-body .legal-table td { border-color:var(--line); }
.handbook-body .legal-table th { color:var(--ink); background:var(--panel); }

/* «Что вас защищает» на лендинге: те же карточки, что «Возможности», плюс
   сноска со ссылкой на оферту — обещание должно вести к пункту договора. */
.guarantee-note { margin:22px 0 0; color:#98aaa2; text-align:center; font-size:14px; }
.guarantee-note a { color:#dcb374; }

/* Юридические документы (/legal/…): серверные страницы без скрипта в стиле
   лендинга. Ширина колонки — под чтение длинного текста, не под сетку. */
.legal-page .lhead { position:relative; }
.legal-page .lnav .links a.is-current { color:#dcb374; }
.legal-wrap { max-width:820px; text-align:left; }
.legal-wrap .sec-label { text-align:left; }
.legal-title { margin:0 0 10px; color:var(--cream); font-family:var(--display); font-size:clamp(28px,4vw,40px); font-weight:650; line-height:1.15; }
.legal-meta { margin:0 0 18px; color:#81938b; font-size:13px; }
.legal-intro { margin:0 0 26px; color:#a4b6ae; font-size:16px; line-height:1.6; }
.legal-toc { margin:0 0 34px; padding:18px 22px; border:1px solid rgba(216,170,97,.35); border-radius:3px 18px 3px 18px; background:rgba(255,255,255,.035); }
.legal-toc-h { margin-bottom:8px; color:#d3a55d; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.legal-toc ol { margin:0; padding-left:20px; columns:2; column-gap:28px; }
.legal-toc li { margin:3px 0; break-inside:avoid; }
.legal-toc a, .legal-body a, .legal-docs a, .legal-list a { color:#dcb374; text-decoration:none; }
.legal-toc a:hover, .legal-body a:hover, .legal-docs a:hover, .legal-list a:hover { text-decoration:underline; }
.legal-body { color:#c9d6cf; font-size:15.5px; line-height:1.68; overflow-wrap:anywhere; }
.legal-body h2 { margin:34px 0 12px; text-align:left; padding-top:18px; border-top:1px solid rgba(222,187,128,.18); color:var(--cream); font-family:var(--display); font-size:21px; font-weight:650; }
.legal-section:first-child h2 { margin-top:0; padding-top:0; border-top:0; }
.legal-body p { margin:0 0 12px; }
.legal-body ul, .legal-body ol { margin:0 0 14px; padding-left:24px; }
.legal-body li { margin:4px 0; }
.legal-body strong { color:var(--cream); font-weight:650; }
.legal-table-wrap { margin:6px 0 16px; overflow-x:auto; }
.legal-table { width:100%; border-collapse:collapse; font-size:14px; }
.legal-table th, .legal-table td { padding:9px 12px; border:1px solid rgba(222,187,128,.22); text-align:left; vertical-align:top; }
.legal-table th { color:#d3a55d; font-weight:650; background:rgba(255,255,255,.04); }
.legal-docs { display:flex; flex-wrap:wrap; gap:8px 22px; margin-top:34px; padding-top:18px; border-top:3px double rgba(216,170,97,.4); font-size:14px; }
.legal-docs a.is-current { color:#81938b; pointer-events:none; }
.legal-list { margin:0; padding-left:22px; }
.legal-list li { margin:8px 0; }
/* Строка подвала — по левому краю текста документа: по центру колонки в 74ch
   она висела посередине (x≈260 при тексте с x≈77) и не совпадала ни с чем.
   Контейнер подвала — тот же, что у текста (до 1200px по центру, поля 6vw),
   поэтому края совпадают на любой ширине. Растянутый на всю ширину, он
   сходился с текстом только до 1280px, а на 1920 уезжал на 245px влево. */
.legal-page .lfooter .lfooter-inner > p { max-width:none; }
/* На телефоне у секции с текстом поля 5vw, у подвала — 6vw: строка стояла
   на 4px правее текста. */
@media (max-width:760px) {
  .legal-page .lfooter { padding-left:5vw; padding-right:5vw; }
}
@media (max-width:700px) {
  .legal-toc ol { columns:1; }
  .legal-page .lnav .links { display:none; }
}
/* ── пакет DICT: справочники, состав предмета, требования к работе ── */
/* Росдистант: плашка замка приёма над карточкой ручного заказа. */
.rd-gate { max-width:720px; margin-bottom:14px; }
/* Справочники: заметка части предмета — второй строкой, приглушённо. */
table.data .t-sub.dict-note { font-style:italic; }
/* Лишняя колонка («Оценивание», «Группа», «Пороги») на узком экране сжимала
   название до разрыва посреди слова: там она прячется, а её значение встаёт
   строкой под названием. */
table.data .t-sub.dict-extra-sub { display:none; }
table.data .t-sub.dict-status-sub { display:none; }
/* «Вписанные студентами» под справочником вузов (W2-12). */
.written-unis-list { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:4px; overflow-wrap:anywhere; }
/* С четвёртой колонкой кнопки «Изменить» и «Удалить» переставали помещаться и
   вставали друг под друга: колонка действий держит ширину по содержимому. На
   узком экране перенос не мешает — там лишняя колонка и так скрыта. */
@media (min-width:521px) {
  table.dict-table th:last-child, table.dict-table td:last-child { width:1%; white-space:nowrap; }
  table.dict-table td:last-child > .flex { flex-wrap:nowrap; }
}
/* Прайс: бейдж «только целиком» под ценой карточки. */
.whole-only-badge { margin-top:6px; }
/* Требования: строка «Направление · Профиль · Квалификация» над чипами. */
.req-note.req-profile { margin:0 0 8px; color:var(--ink-2); font-weight:600; }
/* Окно заказа: часть состава и подсказка «Открывается после». */
.order-part + .order-part { margin-top:2px; }
.part-requires { display:flex; gap:6px; align-items:flex-start; margin:-4px 0 8px 26px; font-size:12.5px; line-height:1.45; color:var(--muted); }
.part-requires svg { flex:none; width:14px; height:14px; margin-top:2px; }
.whole-only-list { margin:0; padding-left:20px; font-size:13.5px; line-height:1.5; }
.whole-only-list li + li { margin-top:4px; }
.whole-only-list .part-requires { margin-left:0; margin-top:2px; }
/* Редактор позиции: предупреждение про «Другой / не из списка», подсказка автоподстановки. */
.uni-any-warning { color:var(--amber-ink); }
.prefill-hint { margin:0 0 12px; color:var(--green-ink); }
.prefill-hint:empty { display:none; }
/* Редактор состава: строка части — тип и цена, под ними название экземпляра, вариант и условия допуска. */
.parts-editor { display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.part-row { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--v50); }
.part-row > .row { gap:8px; }
.part-row > .row + .row, .part-row .part-note + .row { margin-top:8px; }
.part-row .part-note { margin-top:6px; }
.part-requires-edit { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.part-requires-edit:empty { display:none; }
.part-requires-edit .component-chip { padding:4px 10px; font-size:12.5px; }
@media (max-width:520px) {
  .part-row { padding:10px; }
  .part-requires { margin-left:0; }
  table.data .dict-extra { display:none; }
  table.data .t-sub.dict-extra-sub { display:block; margin-top:6px; }
  /* Кнопки справочника — без горизонтальной прокрутки: статус переезжает под
     название, таблица перестаёт держать ширину 680 px, «Изменить» и «Удалить»
     встают столбиком в узкой колонке действий. */
  table.dict-table { min-width:0; }
  table.data .dict-status { display:none; }
  table.data .t-sub.dict-status-sub { display:block; margin-top:6px; }
  table.dict-table th, table.dict-table td { padding:12px; }
  table.dict-table td:last-child { width:1%; }
  table.dict-table td:last-child > .flex { flex-direction:column; align-items:stretch; gap:6px; }
}
/* ── конец пакета DICT ── */

/* ── пакет STUDY: учёба в вузе и предложение автору ── */
/* Учёба в вузе (order/study.js, order/study-tasks.js) и предложение автору
   (order/offer.js). Кабинет всегда светлый — только светлые токены. */
.study-card .study-section { padding:12px 0; border-top:1px solid var(--line-2); }
.study-card .study-section:first-of-type { border-top:0; padding-top:0; }
.study-section-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.study-topic { overflow-wrap:anywhere; }
.study-remarks { margin:8px 0 0 20px; font-size:13px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.study-remarks.clamped { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.study-more { margin-left:20px; font-size:12.5px; }
.comp-row.sent .comp-dot { background:var(--blue); }
.offer-card { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent), var(--sh-sm); }
/* Длинная подпись оценки или темы в бейдже переносится, а не вылезает за карточку. */
.study-card .badge, .offer-card .badge { white-space:normal; }
/* «Что исправить» автору на доработке (W1-05): под шапкой карточки и в окне сдачи. */
.revision-card { border-color:var(--amber); box-shadow:0 0 0 1px var(--amber), var(--sh-sm); }
/* W2-03: вопрос автора до ставки — через модератора. */
.aq-list { margin:0 0 10px; padding:0; list-style:none; display:flex; flex-direction:column; gap:10px; }
.aq-item { padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.aq-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
.aq-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; }
.aq-answer { margin-top:8px; padding:8px 10px; border-left:3px solid var(--green); background:var(--green-bg); border-radius:0 8px 8px 0; font-size:13.5px; }
.aq-answer.is-new { border-left-color:var(--primary); }
.aq-card .badge { white-space:normal; }
.revision-card .badge, .revision-notice .badge { white-space:normal; }
.revision-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.55; }
.revision-notice { margin:0 0 12px; padding:10px 12px; border:1px solid var(--amber); border-radius:10px; background:var(--amber-bg); }
.revision-notice .revision-text { margin-top:4px; }
/* Главная автора: «Ждут оплаты заказчика: N» строкой под «Что сделать сейчас» (W1-03). */
.awaiting-payment-line { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:0; }
.awaiting-payment-line svg { width:14px; height:14px; color:var(--accent-2); }
.awaiting-payment-line .btn-link { font-weight:600; }
.study-actions { margin-top:10px; }
.study-files { margin-top:6px; }
.study-feedback { padding:8px 0; border-top:1px dashed var(--line-2); }
.study-feedback:first-of-type { border-top:0; }
.study-feedback .study-remarks, .study-general .study-remarks { margin-left:0; }
.study-menu { display:inline-block; }
.study-menu > summary { min-height:30px; padding:4px 6px; }
.study-checks { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:13.5px; }
.study-checks li { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.offer-tried { margin:10px 0 0; padding-left:18px; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.offer-note { white-space:pre-wrap; font-weight:500; }
.study-presets { display:flex; flex-direction:column; gap:8px; }
.study-preset { display:flex; flex-direction:column; align-items:flex-start; gap:2px; height:auto; min-height:44px; padding:8px 14px; text-align:left; white-space:normal; }
/* Группы переключателей (решение преподавателя, оценка, «если никто не
   согласится»): вопрос — как подпись поля, варианты — строкой с переносом. */
.study-choice { margin:0 0 15px; padding:0; border:0; display:flex; flex-wrap:wrap; gap:8px 18px; min-width:0; }
.study-choice legend { width:100%; margin-bottom:7px; padding:0; color:var(--ink-2); font-size:12.5px; font-weight:650; letter-spacing:.015em; }
.study-scale { display:flex; flex-direction:column; }
.study-send { margin-bottom:12px; }
.study-send .check-row { display:flex; align-items:flex-start; }
.study-send .check-row input { margin-top:3px; }
.study-boundary { display:flex; align-items:flex-start; gap:6px; margin:4px 0 0; }
.study-boundary > span { flex:none; width:14px; height:14px; margin-top:3px; }
.study-originality-fields .alert { margin-top:4px; }
@media (max-width:600px) {
  .study-section-head { align-items:flex-start; }
  .study-section-head .btn { width:100%; justify-content:center; }
  .study-actions > .btn { flex:1 1 100%; justify-content:center; }
  .study-remarks, .study-more, .study-files { margin-left:0; }
}
/* Окно «Даты практики» (W1-16): где взять даты — подсказка вуза; строка про
   файл графика — под полями. */
.study-practice-hint { margin-bottom:12px; }
.study-practice-file { display:flex; align-items:flex-start; gap:6px; margin:4px 0 0; }
.study-practice-file svg { flex:none; width:14px; height:14px; margin-top:2px; }
/* ── конец пакета STUDY ── */

/* ── пакет AUTHORS: ступени в настройках, досье автора, штраф в решении арбитража, ставки, карточка автора ── */
/* «Уровни и штрафы авторов»: три ступени по шесть полей — сетка в две
   колонки даже на 390 px, короткие подписи полей влезают. */
.level-set { border:1px solid var(--line); border-radius:10px; padding:10px 12px 4px; margin:0 0 12px; min-width:0; }
.level-set legend { padding:0 6px; font-weight:650; }
.level-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:4px 16px; align-items:end; }
.settings-form .level-grid input[type='number'] { max-width:none; }
.level-grid .level-hold { min-height:40px; margin:0 0 12px; font-size:13.5px; }
.level-perk-line { margin:0 0 8px; }
/* Привилегии ступени (волна 2, W2-05): автопредложение и вознаграждение при
   сдаче с потолком — строкой под порогами. */
.level-perks { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:4px 16px; align-items:end; margin:0 0 4px; font-size:13.5px; }
.level-perks > label { min-height:40px; margin:0 0 12px; }
/* Штраф за качество в окне решения арбитража — отдельной рамкой. */
.fine-fieldset { border:1px dashed var(--line); border-radius:10px; padding:8px 12px; margin:10px 0 0; min-width:0; }
.fine-fieldset legend { padding:0 6px; font-weight:650; }
.fine-fieldset .hint { margin-top:4px; }
/* B-01: цена прижата вправо, бейдж «лучшая цена» — под ценой шрифтом интерфейса,
   «отзывы (N)» не переносится. */
.bid .bid-top > div:first-child { flex:1; min-width:0; }
.bid .bid-side { flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.bid .price { flex:none; text-align:right; white-space:nowrap; }
.bid .bid-badge { margin:0; font-family:var(--font); font-size:12px; font-weight:600; white-space:nowrap; }
.bid .bid-reviews { white-space:nowrap; }
/* S10: маркер свёрнутой секции «Шаблоны ответов сотрудников» — в строке
   заголовка. Общий .card-title::after — это линия высотой 1 px, и значок ▸
   поверх неё уезжал под заголовок. */
.settings-templates > summary::after { height:auto; flex:none; background:none; margin-left:auto; }
/* Досье автора → «Ступень и санкции». */
.author-standing .standing-basis { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.standing-history > summary { cursor:pointer; font-size:13px; color:var(--ink-2); }
.radj-preview { min-height:1.4em; margin-top:6px; }
.level-next-perks { margin-top:4px; }
/* ── конец пакета AUTHORS ── */

/* ── пакет ORDERCARD: карточка заказа, консультации и деньги ── */
/* Расписание консультаций: подписи вида правила короткие («Еженедельно» /
   «Разово») и на 390 px помещаются в половину строки; на самых узких экранах
   вид и день — каждый во всю ширину, иначе подписи обрезались бы. */
@media (max-width:360px) {
  .rule-row .select:first-child, .rule-row .select:not(:first-child), .rule-row .input[type=date] { grid-column:1 / -1; }
}
/* Блок «Спор» у сотрудника: причина — с переносами, просроченный срок — красным. */
.dispute-info .dispute-reason { white-space:pre-line; overflow-wrap:anywhere; }
.dispute-info .dispute-overdue { color:var(--red); font-weight:650; }
/* «Ваш спор» у заказчика (W1-14): файлы чипами, пояснения сторон списком. */
.my-dispute .dispute-files { display:flex; flex-wrap:wrap; gap:0 4px; font-weight:500; }
.my-dispute .dispute-files .file-chip { margin:0 4px 4px 0; }
.dispute-notes { border-top:1px solid var(--line); padding-top:8px; }
.dispute-note { padding:6px 0; border-bottom:1px dashed var(--line); font-size:13.5px; }
.dispute-note:last-child { border-bottom:0; }
.dispute-note .file-chip { margin:4px 4px 0 0; }
/* Отозванные споры у сотрудника (W1-14): свёрнутые записи списком. */
.dispute-past { padding:6px 0; border-bottom:1px dashed var(--line); font-size:13.5px; }
.dispute-past:last-child { border-bottom:0; }
.dispute-past > summary { cursor:pointer; font-weight:600; }
/* История начислений: исходная сумма возврата зачёркнута рядом с итогом. */
.payout-was { margin-left:6px; color:var(--muted); font-weight:400; }
/* ── конец пакета ORDERCARD ── */

/* ── пакет CABINET: тосты, шапка карточки заказа, вложение в чате, срок ставки ── */
/* TS-01. Тосты кабинета стоят под шапкой (70px) — и ровно поверх плашки
   «Подтвердите почту»: после регистрации тост на 7 секунд закрывал её правый
   край с кнопкой «Отправить ещё раз». Высоту плашки числом не угадать: она
   растёт с длиной адреса (57 px одной строкой, 142 px в три строки при почте
   в 55 знаков на 761–1100 px), и любой запас по диапазонам ширины однажды
   кончается. Поэтому от буквы поручения («сдвинуть #toast-root ниже плашки»)
   отказались осознанно: возвращать сдвиг числом не нужно — он снова разойдётся
   с высотой плашки. Пока плашка есть, тосты встают в правый нижний угол —
   там её нет при любой длине адреса и любой ширине (на телефоне они и так
   снизу, ниже). Открыто окно — плашка под затемнением, нажать её нельзя:
   тосты остаются на обычном месте, а не ложатся на кнопки окна. Внизу под
   тостом бывает кнопка страницы — тост пропускает касание к ней, как на
   телефоне; крестик ошибки нажимается. */
@media (min-width:521px) {
  body:not(.is-landing):has(.verify-bar):not(:has(.modal-bg:not(.is-closing))) #toast-root { top:auto; bottom:max(18px, env(safe-area-inset-bottom)); max-height:calc(100vh - 100px); max-height:calc(100dvh - 100px); }
  body:not(.is-landing):has(.verify-bar):not(:has(.modal-bg:not(.is-closing))) .toast { pointer-events:none; }
  body:not(.is-landing):has(.verify-bar):not(:has(.modal-bg:not(.is-closing))) .toast .toast-close { pointer-events:auto; }
}
/* До 760 px у карточки заказа снизу закреплённая полоса действия — тосты над ней. */
@media (min-width:521px) and (max-width:760px) {
  body:not(.is-landing):has(.verify-bar):has(.content.has-sticky-action):not(:has(.modal-bg:not(.is-closing))) #toast-root { bottom:calc(78px + env(safe-area-inset-bottom, 0px)); }
}
/* На телефоне тосты — снизу, над жестовой полосой: сверху они висели поверх
   заголовка открытого окна («Работа принята» над названием предмета) и
   кнопки меню. Стоит закреплённая полоса действия карточки заказа — тосты над
   ней. Окно на телефоне — нижний лист с кнопками внизу: пока оно открыто,
   тосты поднимаются над его подвалом (одна кнопка — 71 px, две — 124, три —
   177 по замеру, плюс отступ листа от края). Тосты при открытии окна не
   снимаются (на них опираются и люди, и проверки), а касаний не перехватывают
   — под тостом бывает поле или кнопка. Крестик ошибки остаётся нажимаемым. */
@media (max-width:520px) {
  body:not(.is-landing) #toast-root { top:auto; bottom:max(10px, env(safe-area-inset-bottom)); max-height:calc(100vh - 90px); max-height:calc(100dvh - 90px); }
  body:not(.is-landing):has(.content.has-sticky-action) #toast-root { bottom:calc(78px + env(safe-area-inset-bottom, 0px)); }
  body:not(.is-landing):has(.modal-bg:not(.is-closing) .m-foot) #toast-root { bottom:calc(max(8px, env(safe-area-inset-bottom, 0px)) + 77px); }
  body:not(.is-landing):has(.modal-bg:not(.is-closing) .m-foot > :nth-child(2)) #toast-root { bottom:calc(max(8px, env(safe-area-inset-bottom, 0px)) + 130px); }
  body:not(.is-landing):has(.modal-bg:not(.is-closing) .m-foot > :nth-child(3)) #toast-root { bottom:calc(max(8px, env(safe-area-inset-bottom, 0px)) + 183px); }
  body:not(.is-landing) .toast { pointer-events:none; }
  body:not(.is-landing) .toast .toast-close { pointer-events:auto; }
}

/* A6. Бейджи шапки карточки заказа («В работе · оплата зарезервирована ·
   штраф за просрочку», у сотрудника до пяти) не сжимались: общее правило
   `.page-head > :last-child:not(:first-child)` отдаёт последнему ребёнку
   flex:0 0 auto — для кнопок других страниц это верно, а контейнер бейджей
   на 390 px уезжал вправо до 461 px вместе с закреплённой кнопкой. Здесь
   контейнер может сжаться и перенести бейджи; общее правило не трогаем. */
.page-head > .head-badges:last-child { flex:0 1 auto; min-width:0; max-width:100%; }

/* CH-01. Строка «Прикреплено: …» с крестиком под полем чата заказа. */
.chat-file-note { display:flex; align-items:center; gap:6px; margin-top:6px; }
.chat-file-note > span:first-child { flex:none; color:var(--muted); }
.chat-file-note svg { width:15px; height:15px; }
.chat-file-names { flex:1; min-width:0; overflow-wrap:anywhere; }
.chat-file-clear { flex:none; width:36px; height:36px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:20px; line-height:1; cursor:pointer; }
.chat-file-clear:hover { background:var(--red-bg); color:var(--red-ink); }
.chat-file-clear:focus-visible { outline:2px solid var(--accent-2); outline-offset:1px; }

/* A20. Срок в ставке больше оставшегося — не ошибка: сервер урежет его до
   даты заказа. Подсказка выделяется, но не красным. */
.hint.text-warn { color:var(--amber-ink); font-weight:600; }
/* ── конец пакета CABINET ── */

/* ── пакет STAFF: сотрудники, готовность к запуску, импорт прайса, выплаты ── */
/* S9. Длинные текстовые поля настроек (наименование, юрадрес, ответственный за
   ПДн, адрес внешнего сервиса) — во всю ширину колонки: в 200 px значения
   обрезались, и юридически значимые реквизиты нельзя было перечитать перед
   сохранением. 200 px остаются только числам и датам. */
.settings-form .set-item .input { width:100%; max-width:none; }
.settings-form .set-item input[type='number'],
.settings-form .set-item input[type='date'] { max-width:200px; }
/* S7. Секция, открытая по #/settings?sec=, не прячет заголовок под липкой
   шапкой кабинета — тот же отступ, что у карточек профиля. */
.settings-section { scroll-margin-top:84px; }

/* S14. «Пользователи» на 1366: липкая колонка «Действия» ложилась поверх
   «Баланса» даже без прокрутки. Липкость — только при реальном переполнении
   (класс is-overflow ставит users.js по ширине обёртки), селекты роли и
   скидки уже (users.js), почта переносится. */
.users-table-wrap:not(.is-overflow) .users-table td:last-child,
.users-table-wrap:not(.is-overflow) .users-table th:last-child { position:static; box-shadow:none; }
.users-table td:first-child, .users-table th:first-child { min-width:200px; }
.users-table td:nth-child(2) { min-width:120px; }
/* Почта переносится (сначала после «@» — там <wbr>, users.js), и длинный
   адрес не распирает первую колонку; поля ячеек уже — таблица помещается
   в обёртку уже с 1280 px. */
.users-table .t-sub { overflow-wrap:anywhere; }
.users-table-wrap .users-table th, .users-table-wrap .users-table td { padding-left:12px; padding-right:12px; }
/* На экране меньше 1366 «Досье» и «Заблокировать» могут встать друг под
   другом — так таблица помещается и на 1280; на 1366 и шире — в одну строку. */
@media (max-width:1365px) { .users-table .user-actions { flex-wrap:wrap; } }

/* S15. «Готовность к запуску» на 390: бейджи «4 не готово / 10 предупреждений»
   сжимали заголовок в щель — теперь переносятся под него. */
.readiness-card .card-title { flex-wrap:wrap; row-gap:8px; }
@media (max-width:560px) { .readiness-card .readiness-badges { flex:1 0 100%; } }
/* S28. Предупреждения готовности на главной свёрнуты в одну строку. */
.readiness-fold { margin-top:6px; }
.readiness-fold > summary { cursor:pointer; padding:6px 0; font-weight:600; }
.readiness-fold > summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; border-radius:4px; }
.readiness-fold[open] > summary { margin-bottom:6px; }
/* W2-09. Готовность к запуску на главной — одной строкой: заголовок, бейджи и
   «подробности»; раскрытие показывает прежнюю карточку на месте. */
.readiness-line > summary { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:40px; padding:6px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); cursor:pointer; list-style:none; font-size:13.5px; }
.readiness-line > summary::-webkit-details-marker { display:none; }
.readiness-line > summary .mi { width:16px; height:16px; color:var(--accent-2); flex:none; }
.readiness-line > summary .readiness-line-text { font-weight:650; }
.readiness-line > summary .readiness-line-more { margin-left:auto; }
.readiness-line > summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.readiness-line[open] > summary { border-bottom-left-radius:0; border-bottom-right-radius:0; }
.readiness-line[open] > summary .readiness-line-more::after { content:' ▴'; }
.readiness-line:not([open]) > summary .readiness-line-more::after { content:' ▾'; }
.readiness-line > .readiness-card { margin-top:0; border-top-left-radius:0; border-top-right-radius:0; }
/* Значок «Готовность: N не готово» под приветствием главной (W2-09):
   кнопка-бейдж, раскрывает строку готовности. */
.readiness-pill { cursor:pointer; font-family:inherit; vertical-align:middle; margin-left:4px; }
.readiness-pill svg { width:13px; height:13px; }
.readiness-pill:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
.readiness-note { margin-top:2px; }
/* Технические подробности пункта «вне кабинета» (переменные, файлы, перезапуск):
   свёрнуты — владельцу хватает строки «что сделать», серверу — подсказки. */
.readiness-tech { margin-top:3px; }
.readiness-tech > summary { cursor:pointer; width:max-content; max-width:100%; }
.readiness-tech > summary:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; border-radius:4px; }
.readiness-tech > div { overflow-wrap:anywhere; }
/* Полный адрес вебхука и имена переменных — длинные слова: на 390 они
   вылезали за край плашки пункта. */
.readiness-card .alert > div { min-width:0; overflow-wrap:anywhere; }

/* S16. Денежные плитки: сумма не переносится посреди разрядов и не отрывает
   «₽» на свою строку; длинная сумма — шрифтом помельче (класс ставит home.js
   по длине строки), как у .finance-stats. */
.stat.stat-money .st-n { white-space:nowrap; overflow-wrap:normal; }
.stat.stat-money.stat-long .st-n { font-size:24px; }
.stat.stat-money.stat-xlong .st-n { font-size:20px; }
@media (max-width:1120px) {
  .stat.stat-money.stat-long .st-n { font-size:22px; }
  .stat.stat-money.stat-xlong .st-n { font-size:18px; }
}

/* S13. Воронка по источникам: заголовки переносятся, отступы уже — таблица
   помещается на 1366, «По приглашению» не уходит под прокрутку. */
.funnel-table th { white-space:normal; line-height:1.3; padding:10px 10px; letter-spacing:.03em; vertical-align:bottom; }
/* Числовые заголовки таблиц по умолчанию не переносятся (table.data th.num) —
   здесь переносятся: в них два-три слова. */
table.data.funnel-table th.num { white-space:normal; }
.funnel-table td { padding-left:10px; padding-right:10px; }
.funnel-table td:nth-child(2) { min-width:110px; }


/* S21. Журнал писем: поиск по адресу и теме — во всю строку на телефоне. */
.mailbox-controls .input[type='search'] { flex:2 1 260px; }

/* Кнопки в шапке «Пользователей» и «Прайс-листа» (ссылка для авторов, выгрузка
   CSV): на узком экране ряд кнопок переносится и не распирает страницу. */
/* Селектор сильнее общего «.page-head > :last-child:not(:first-child)» (flex:0 0 auto). */
.page-head > .staff-head-actions:last-child:not(:first-child) { flex:0 1 auto; min-width:0; justify-content:flex-end; }
.staff-head-actions .btn { white-space:normal; text-align:center; }
@media (max-width:560px) {
  .page-head > .staff-head-actions:last-child:not(:first-child) { flex:1 0 100%; }
  .staff-head-actions .btn { flex:1 1 auto; justify-content:center; }
}

/* S4. Временный пароль сотрудника: плашка над кабинетом и карточка смены. */
.verify-bar.password-bar b { font-weight:700; }
.temp-password-card .card-title { margin-bottom:12px; }

/* A10. Реквизиты: подсказка к банку и БИК не распирают узкую форму. */
.payout-form .field .hint { overflow-wrap:anywhere; }
/* ── конец пакета STAFF ── */

/* ── пакет PUBLIC: публичные страницы и юридические тексты ── */
/* Лендинг тёмный (body.is-landing задаёт color-scheme:dark), а карточка
   входа, поля гостевой формы и окна поверх лендинга — светлые. С тёмной
   схемой браузер рисовал пустые чекбоксы согласий («18 лет», согласие на
   обработку данных) сплошными тёмными квадратами — их легко принять за уже
   отмеченные и не заметить обязательную галочку. Светлым вставкам — светлая
   схема: нативные чекбоксы, списки и счётчики чисел рисуются под их фон. */
.auth-card,
body.is-landing #modal-root,
.guest-form .input, .guest-form .select, .guest-form .textarea { color-scheme:light; }
/* Оглавление документов: заголовки разделов уже с номерами («1. Общие
   положения»), и нумерация списка давала «1. 1. …», «10. 10. …». */
.legal-toc ol { list-style:none; padding-left:0; }
/* ── конец пакета PUBLIC ── */

/* ── пакет П3 (волна ТЗ от 18.09.2026): задания предмета, согласование цены,
   услуга «Комплект к сдаче» ── */
/* Строка задания: на телефоне в 390 px складывается в столбик, имя файла
   обрезается многоточием (перенос разъезжал бы строку), прежние версии
   закрыты. Кнопки на узком экране — не ниже 44 px, как во всём кабинете. */
.task-files .task-file-row { padding:12px 0; border-top:1px solid var(--line-2); }
.task-files .task-file-row:first-child { border-top:0; padding-top:0; }
.task-file-row .tf-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.task-file-row .tf-head b { overflow-wrap:anywhere; }
.task-file-row .file-chip-name { display:inline-block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; vertical-align:bottom; }
.task-file-row ul.tf-history { margin:6px 0 0; padding-left:18px; }
.task-file-row ul.tf-history li { margin-bottom:6px; font-size:13px; }
.task-file-row details > summary { cursor:pointer; font-size:13px; color:var(--ink-2); }
/* Чек-лист комплектности: пункт, кто проверил и когда — тремя строками. */
.kit-check { padding:6px 0; border-top:1px solid var(--line-2); }
.kit-check:first-child { border-top:0; }
.kit-check .text-meta { padding-left:26px; }
/* Поле замечания сотрудника — под пунктом, вровень с его подписью; на 390 px
   занимает всю ширину строки. */
.kit-check > .input { margin:4px 0 0 26px; width:calc(100% - 26px); }
/* Служебные строки карточки прайса: сигналы «цена занижена», история цены и
   задания предмета — мелким шрифтом под требованиями. */
.price-staff-lines { font-size:13px; }
.price-staff-lines > details > summary { cursor:pointer; list-style:none; }
/* Требования предмета в редакторе позиции: на узком экране поля в столбик,
   галочка и «×» — строкой под ними. */
.req-editor { margin-top:4px; }
.req-row { display:flex; gap:8px; align-items:flex-start; padding:8px 0; border-top:1px solid var(--line-2); flex-wrap:wrap; }
.req-row:first-child { border-top:0; padding-top:0; }
.req-row .input { flex:1 1 160px; min-width:0; }
.req-row .req-row-tail { display:flex; gap:8px; align-items:center; flex:0 0 auto; }
/* Карта колонок файла импорта: на телефоне таблица рисуется карточками. */
.import-map-row { padding:10px 0; border-top:1px solid var(--line-2); }
.import-map-row:first-child { border-top:0; padding-top:0; }
.import-map-row .select { width:100%; }
@media (max-width:430px) {
  .task-file-row .tf-head { align-items:flex-start; flex-direction:column; gap:4px; }
  .task-file-row .file-chip-name { max-width:230px; }
  .task-file-row .btn { min-height:44px; }
  .req-row { flex-direction:column; }
  .req-row .input { width:100%; flex:none; }
}
/* ── конец пакета П3 ── */

/* ── пакет П5: чек-лист сдачи и заявка «автор не справился» ── */
/* Окно сдачи: пункты чек-листа — один столбец, галочка прижата к левому краю и
   не съезжает от переноса текста; область нажатия не меньше 44 px, чтобы
   попадать пальцем. */
.submit-checklist { margin-top:10px; padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); }
.submit-checklist .check-row { display:flex; align-items:flex-start; gap:8px; width:100%; padding:6px 0; min-height:44px; }
.submit-checklist .check-row input { margin-top:3px; flex:none; }
.submit-checklist .check-row .hint { display:block; margin-top:2px; }
.submit-checklist .field { margin-top:6px; }
/* Карточка «Что подтвердил автор»: строка на пункт, дата — отдельной строкой. */
.submission-item { display:flex; align-items:flex-start; gap:8px; padding:4px 0; font-size:13px; color:var(--ink-2); }
.submission-item > span:first-child { width:16px; height:16px; flex:none; margin-top:2px; color:var(--muted); }
.submission-item.done > span:first-child { color:var(--green); }
.submission-attempt + .submission-attempt { margin-top:10px; padding-top:10px; border-top:1px solid var(--line-2); }
/* Заявка «автор не справился»: радиокнопки столбиком, кнопки решений — во всю
   ширину по одной в строке на узком экране. */
.failure-want { display:flex; flex-direction:column; gap:6px; margin-top:4px; }
.failure-want label { display:flex; align-items:center; gap:8px; min-height:44px; }
.failure-claim-text { white-space:pre-wrap; overflow-wrap:anywhere; }
/* Открытая заявка у заказчика (W1-15): текст и выбранный вариант свёрнуты
   под строку «Заявка у модератора с …». */
.failure-open { width:100%; }
.failure-open > summary { cursor:pointer; list-style:none; min-height:32px; display:flex; align-items:center; }
.failure-open > summary::-webkit-details-marker { display:none; }
.failure-open > summary::after { content:' ▾'; margin-left:4px; }
.failure-open[open] > summary::after { content:' ▴'; }
.failure-decisions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
@media (max-width:430px) {
  .failure-decisions { flex-direction:column; }
  .failure-decisions .btn { width:100%; }
}
/* Панель «Ждёт вашего решения» в карточке заказа у сотрудника (W2-10,
   order/decision-panel.js): янтарная рамка, как у «Что исправить» автора;
   строка — иконка и тело с кнопками, строки разделены линией. */
.decision-panel { border-color:var(--amber); box-shadow:0 0 0 1px var(--amber), var(--sh-sm); }
.decision-panel .card-title { margin-bottom:10px; }
.decision-row { display:flex; align-items:flex-start; gap:12px; padding:10px 0; border-top:1px solid var(--line); }
.decision-panel > .card-title + .decision-row { border-top:0; padding-top:0; }
.decision-row:last-child { padding-bottom:0; }
.decision-row .att-ico { margin-top:2px; }
.decision-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; font-size:14px; }
.decision-body > b { font-size:15px; }
.decision-body .text-meta { color:var(--ink-2); }
.decision-body .decision-overdue { color:var(--red); font-weight:650; }
.decision-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.decision-sub .card-title { margin-bottom:8px; font-size:15px; }
.decision-sub .card-title::after { display:none; }
.decision-sub .card-title svg { width:17px; height:17px; }
@media (max-width:560px) {
  .decision-row { flex-wrap:wrap; }
  .decision-body { flex:1 1 calc(100% - 44px); }
  .decision-actions .btn { min-height:40px; }
}
/* Окно «Решить спор» (W2-10): исходы — одинаковыми контурными кнопками с
   пояснением справа, ни один не выделен цветом; на телефоне пояснение под
   кнопкой. */
.resolve-choices { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.resolve-choice { display:flex; align-items:center; gap:12px; }
.resolve-choice .btn { flex:none; width:220px; justify-content:flex-start; }
.resolve-choice .text-meta { color:var(--ink-2); }
@media (max-width:560px) {
  .resolve-choice { flex-direction:column; align-items:stretch; gap:4px; }
  .resolve-choice .btn { width:100%; }
}

/* ── Д2: регистрация и профили ── */
/* Волна доводки по ТЗ, 25.09.2026. Шаг «Где вы учитесь?» в регистрации:
   список и «Пропустить» в одну строку, и на 390 px кнопка не переносится и
   не выталкивает список за край. */
.reg-uni .field-row { align-items:center; }
.reg-uni .select { flex:1; min-width:0; }
.reg-uni-skip { flex:none; white-space:nowrap; }
/* Капча Яндекса (только при заданных ключах): место под виджет заранее,
   чтобы кнопка «Создать аккаунт» не прыгала, когда он дорисуется. */
.reg-captcha { min-height:102px; margin:4px 0 12px; }
.reg-captcha[hidden] { display:none; }
/* Окно «Исправить данные» в досье: поля во всю ширину, флажки справочников
   тем же списком, что в профиле; на телефоне ничего не выходит за край. */
.profile-edit-form .field { margin-bottom:12px; }
.profile-edit-form .input, .profile-edit-form .select, .profile-edit-form .textarea { width:100%; max-width:100%; }
.profile-edit-form .checks-grid { max-height:240px; overflow:auto; }
/* Полоска «Анкета не заполнена» над формой профиля: к ней ведёт ссылка из
   аукциона, фокус ставится на саму полоску. */
.questionnaire-alert:focus { outline:2px solid var(--primary); outline-offset:2px; }

/* ── Д3: справочники и учёба ── */
/* Рабочие статусы: заголовок группы строкой таблицы, поиск по коду заказчика. */
table.data tr.dict-group-row th { padding:14px 12px 6px; background:var(--surface-2); color:var(--ink-2); font-size:12.5px; font-weight:700; letter-spacing:.02em; text-align:left; }
.dict-search { max-width:360px; }
.dict-search-empty { margin:0 0 10px; }
/* Шкала баллов формы контроля: порог — строка из «от», подписи и оценки;
   на узком экране поля переносятся, а не растягивают окно. */
.scale-rows { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.scale-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px 8px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:var(--v50); }
.scale-cell { display:flex; flex-direction:column; gap:3px; min-width:0; margin:0; }
.scale-cap { color:var(--ink-2); font-size:12px; font-weight:650; }
.scale-cell .input, .scale-cell .select { width:100%; min-width:0; }
.scale-cell-min { flex:0 0 96px; }
.scale-cell-label { flex:1 1 150px; }
/* «3 — удовлетворительно» не влезает в одну строку с подписью даже в окне на
   компьютере: оценка переносится на свою строку целиком, а не обрезается. */
.scale-cell-mark { flex:1 1 260px; }
.scale-cell-passed { flex:1 1 130px; }
.scale-row .scale-remove { flex:none; }
/* Структуры работ: группы по видам, карточка структуры, список этапов. */
.ss-group + .ss-group { margin-top:18px; }
.ss-group-title { margin:0 0 8px; font-size:15px; font-weight:700; }
.ss-card { margin-bottom:10px; }
.ss-head { display:flex; flex-direction:column; gap:3px; min-width:0; }
.ss-title { overflow-wrap:anywhere; }
.ss-details { margin-top:8px; }
.ss-details > summary { cursor:pointer; }
.ss-stages { margin:8px 0 0; padding-left:22px; display:flex; flex-direction:column; gap:8px; font-size:13.5px; }
.ss-stage-title { overflow-wrap:anywhere; }
.ss-stage-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-top:3px; }
.ss-stage-meta .badge, .ss-stages .badge { white-space:normal; }
.ss-note, .ss-stage .text-meta { overflow-wrap:anywhere; }
.ss-actions { margin-top:10px; }
.ss-edit-stages { display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.ss-edit-stage { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--v50); }
.ss-edit-stage-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.ss-edit-stage .field { margin-bottom:8px; }
.ss-edit-nums { gap:8px; }
.ss-edit-nums > * { min-width:min(120px,100%); }
/* Учёба в вузе: этап из структуры у задания, «подходит» у шаблона. */
.study-task-stage { display:flex; flex-direction:column; gap:3px; margin-top:3px; }
.study-task-marks { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.study-task-after, .study-task-note { overflow-wrap:anywhere; }
.study-fit { margin-left:6px; vertical-align:1px; }
.study-scale-hint:empty { display:none; }
/* «Снять отметку»: переключатель сам не снимается, а без отметки её подставит шкала. */
.study-scale-clear { align-self:flex-start; margin:-8px 0 12px; padding-left:0; padding-right:0; text-align:left; }
@media (max-width:520px) {
  .ss-edit-stage { padding:10px; }
  .ss-actions > .btn { flex:1 1 auto; justify-content:center; }
  .scale-cell-min { flex:1 1 88px; }
}

/* ── Д4: прайс ── */
/* Волна доводки по ТЗ (25.09.2026): особые условия частей, «В стоимость
   входит», статистика результатов и предупреждения у предмета. На 390 px
   ничего не шире экрана: чипы переносятся, длинные названия частей — тоже. */
/* Окно заказа: часть — строка-плашка во всю ширину (удобно попадать пальцем),
   выбранная — подсвечена. Класс is-checked ставит окно, стиль для браузеров
   без :has() пишет пакет витрины. */
.order-parts { display:flex; flex-direction:column; gap:6px; }
.order-part .component-chip.order-pick { display:flex; width:100%; min-height:44px; border-radius:12px; padding:8px 12px; align-items:center; }
.order-pick .op-name { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; line-height:1.4; }
.order-part .part-requires, .order-part .part-pair, .order-part .part-stats { margin:4px 0 2px 12px; }
.order-part.part-ref { padding:4px 2px; font-size:13.5px; color:var(--ink-2); }
.order-part.part-estimate, .order-part.part-off { padding:8px 12px; border:1px dashed var(--line); border-radius:12px; font-size:13.5px; }
.order-part .part-line { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.order-part .part-line > span { flex:1 1 180px; min-width:0; overflow-wrap:anywhere; }
.order-part.part-off { display:flex; flex-direction:column; gap:2px; color:var(--muted); background:var(--surface-3); }
/* Уже заказанная часть в окне заказа (ТЗ «28.10.26», п. 6): серая строка
   «✓ оплачено ДД.ММ» без выбора. */
.order-part.part-ordered { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; padding:8px 12px; border:1px dashed var(--line); border-radius:12px; font-size:13.5px; color:var(--muted); background:var(--surface-3); }
.order-part.part-ordered > span:first-child { flex:1 1 180px; min-width:0; overflow-wrap:anywhere; }
.part-ordered-mark { flex:none; color:var(--green-2); font-weight:650; white-space:nowrap; }
.part-off-reason { font-size:12.5px; }
.part-pair { color:var(--ink-2); }
.part-pair-mark { color:var(--muted); font-weight:700; }
/* Развилка «Целиком — X ₽» или части: радиокнопки столбиком. */
.price-mode { display:flex; flex-direction:column; gap:2px; margin:0 0 8px; }
.price-mode .price-mode-row { margin:0; min-height:40px; align-items:center; color:var(--ink); font-size:13.5px; }
.price-mode .price-mode-row input { margin-top:0; }
/* Чипы особых частей в карточке прайса, подборе и корзине. */
.component-chip.part-chip-estimate { border-style:dashed; }
.component-chip.part-chip-off { color:var(--muted); background:var(--surface-3); border-style:dashed; }
.component-chip.part-chip-off b, .component-chip.part-chip-estimate b { font-weight:600; font-size:12px; }
/* Часть «входит в …» (ТЗ 28.10.26, п. 6: НИР 4 во ВКР): своей цены нет. */
/* Название части длинное («НИР 4: консультации по третьей главе…»): чип
   переносится строками, подпись «входит в …» — отдельной строкой. */
.component-chip.part-chip-included { background:var(--surface-3); border-style:dotted; border-radius:12px; flex-wrap:wrap; row-gap:2px; max-width:100%; }
.component-chip.part-chip-included b { font-weight:600; font-size:12px; color:var(--ink-2); white-space:normal; flex:1 1 auto; }
/* «Заказывается вместе с …» и «Входит в заказ: …» у ВКР; окно запроса стоимости. */
.price-ordered-with { margin:10px 0 0; }
.price-ordered-with .btn { white-space:normal; text-align:left; }
.price-ordered-together { margin:8px 0 0; overflow-wrap:anywhere; }
.price-request-facts { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0 0 12px; font-size:13.5px; }
.price-request-facts dt { color:var(--muted); }
.price-request-facts dd { margin:0; overflow-wrap:anywhere; }
.cost-requests-list { margin:8px 0 0; padding-left:18px; display:flex; flex-direction:column; gap:8px; font-size:13.5px; overflow-wrap:anywhere; }
.ordered-with-field .ordered-with-current { margin-bottom:6px; }
.ordered-with-results { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ordered-with-option { max-width:100%; white-space:normal; text-align:left; }
/* «В стоимость входит», ссылка, статистика и предупреждения. */
.price-includes { margin:10px 0 0; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.modal .price-includes { margin:0 0 10px; }
.price-link { margin:8px 0 0; overflow-wrap:anywhere; }
.price-stats { display:flex; align-items:flex-start; gap:6px; margin:8px 0 0; }
.price-stats svg { flex:none; width:14px; height:14px; margin-top:3px; }
.modal .price-stats { margin:0 0 10px; }
.price-notice { margin:10px 0 0; }
.price-notice b { display:block; margin-bottom:2px; }
.price-notice-line { margin-top:8px; }
.price-notice-line > summary { cursor:pointer; list-style:none; }
.price-notice-line > summary::-webkit-details-marker { display:none; }
.price-notice-line[open] > summary { margin-bottom:4px; }
.price-notice-line .hint { overflow-wrap:anywhere; }
/* Сводка о преподавателе под выбором в окне заказа. */
.teacher-summary { overflow-wrap:anywhere; }
.teacher-summary:empty { display:none; }
/* Редактор позиции: особые условия части под спойлером. */
.part-flags { margin-top:8px; }
.part-flags > summary { cursor:pointer; color:var(--ink-2); font-size:12.5px; font-weight:650; min-height:32px; display:flex; align-items:center; flex-wrap:wrap; list-style:none; }
.part-flags > summary::-webkit-details-marker { display:none; }
/* Свой значок раскрытия: у summary с display:flex штатный треугольник пропадает. */
.part-flags > summary::before { content:'▸'; margin-right:6px; color:var(--muted); }
.part-flags[open] > summary::before { content:'▾'; }
.part-flags-summary { font-weight:500; margin-left:4px; }
.part-flags-body { display:flex; flex-direction:column; gap:4px; margin-top:6px; }
.part-flags-body .consent-row { margin:0; }
.part-flags-body .field { margin-bottom:6px; }
.price-days-hint { margin:-6px 0 12px; }
/* Редактор позиции: решения загрузки прайса, запомненные у позиции (волна 2,
   W2-05) — строка решения и кнопка «Спрашивать снова» справа; на телефоне
   кнопка уходит под текст. */
.price-import-decisions-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.price-import-decisions-list > li { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; }
.price-import-decisions-list > li > span { min-width:0; overflow-wrap:anywhere; }
.price-import-decisions-list > li > .btn { flex:none; }
.price-uni-unit { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
.price-uni-unit .select { width:auto; max-width:100%; }
/* Корзина: состав строки. */
.cart-parts { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.cart-parts .price-mode { margin:0; }
/* Состав строкой на часть, как в таблице заказчика (ТЗ «28.10.26», п. 6):
   «название — цена — Да/Нет»; первой — «Предмет целиком» (или «Оставшиеся
   части»); уже заказанная часть — серая, с «✓ оплачено ДД.ММ», без выбора. */
.cart-chips.cart-rows { flex-direction:column; flex-wrap:nowrap; gap:4px; }
.cart-part { display:flex; flex-direction:column; }
.cart-part-line { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:7px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:13.5px; }
.cart-rows .component-chip.cart-part-line { border-radius:8px; background:var(--surface); }
.cart-part-line .cart-part-name { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
.cart-part-line b, .cart-part-line .cart-part-price { flex:none; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cart-part-whole { cursor:pointer; user-select:none; font-weight:650; background:var(--v50); }
.cart-part-whole input { margin:0; accent-color:var(--primary); }
/* :has() — отдельным правилом: старый браузер, не зная :has(), выбросил бы весь список (CMR-05). */
.cart-part-whole.is-checked { border-color:var(--accent); background:var(--v100); }
.cart-part-whole:has(input:checked) { border-color:var(--accent); background:var(--v100); }
.cart-part-line.is-ordered { color:var(--muted); background:var(--surface-3); border-style:dashed; }
.cart-ordered-mark { flex:none; color:var(--green-2); font-weight:650; white-space:nowrap; }
.cart-part-line.is-off, .cart-part-line.is-ref { color:var(--muted); border-style:dashed; }
.yn { flex:none; display:inline-flex; border:1px solid var(--line); border-radius:7px; overflow:hidden; font-size:12px; font-weight:650; }
.yn span { padding:3px 9px; color:var(--muted); }
.cart-part-line .yn-no { background:var(--surface-3); color:var(--ink); }
.cart-part-line.is-checked .yn-yes { background:var(--primary); color:var(--on-primary); }
.cart-part-line:has(input:checked) .yn-yes { background:var(--primary); color:var(--on-primary); }
.cart-part-line.is-checked .yn-no { background:transparent; color:var(--muted); }
.cart-part-line:has(input:checked) .yn-no { background:transparent; color:var(--muted); }
.cart-part-line:has(input:not(:checked)) .yn-yes { background:transparent; color:var(--muted); }
.cart-part-line:has(input:not(:checked)) .yn-no { background:var(--surface-3); color:var(--ink); }
.cart-part .part-requires { margin:4px 0 2px 12px; }
@media (max-width:520px) {
  .cart-part-line { flex-wrap:wrap; row-gap:4px; padding:7px 10px; }
  .cart-part-line .cart-part-name { flex-basis:calc(100% - 40px); }
  .cart-part-line b, .cart-part-line .cart-part-price { margin-left:auto; }
}
@media (max-width:520px) {
  .order-part .part-requires, .order-part .part-pair, .order-part .part-stats { margin-left:4px; }
}

/* ── Д5: карточка заказа ── */
/* Карточка «как в журнале» в служебной панели: отметки этапов — строка на
   отметку, галочка с подписью слева, дата справа; на узком экране дата уходит
   под подпись, а не за край. Область нажатия галочки — не меньше 44 px. */
.staff-card { padding-top:14px; border-top:1px solid var(--line-2); }
.staff-card-title { display:flex; align-items:center; gap:8px; margin:0 0 10px; color:var(--ink); font-size:14px; font-weight:700; }
.staff-card-title svg { width:17px; height:17px; flex:none; color:var(--accent-2); }
.staff-card-flags { display:flex; flex-direction:column; gap:6px; }
.staff-card-flag { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; min-width:0; }
.staff-card-flag .check-row { min-height:44px; flex:1 1 140px; }
.staff-card-flag .input { flex:0 1 170px; width:auto; min-width:0; }
.staff-card-marks { font-size:13px; }
.staff-card-phones { display:flex; flex-direction:column; gap:4px; }
.staff-card-phone a { font-weight:650; }
.staff-price-from-order { padding-top:12px; border-top:1px solid var(--line-2); }
/* Пояснение под № по журналу у автора — обычным начертанием: значения в .kv жирные. */
.kv dd .journal-no-hint { font-weight:400; }
.staff-price-from-order .hint { margin-top:6px; }
/* Сводка о преподавателе: в карточке заказа — под именем, в форме заказа —
   под выбором преподавателя. Заметка переносится по словам и не раздвигает
   колонку на телефоне. */
.teacher-summary { margin-top:6px; font-weight:400; }
.teacher-summary-note { margin:0 0 6px; color:var(--ink-2); font-size:13px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.teacher-summary-badges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.teacher-notes:empty { display:none; }
.teacher-notes { margin:-4px 0 15px; padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface-3); }

/* ── Д6: файлы и таблицы ── */
/* Файл заказа со своей кнопкой «Удалить» (сотрудник) и предупреждением
   проверки содержимого. На 390 px чип файла и кнопка переносятся: длинное
   имя файла не должно выталкивать кнопку за край экрана. */
.file-row { display:block; max-width:100%; margin-top:5px; }
.file-row-main { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; }
.file-row-main .file-chip { margin:0; min-width:0; }
.file-remove-btn { display:inline-flex; align-items:center; gap:4px; min-height:32px; padding:0 6px; font-size:12.5px; font-weight:600; color:var(--red-ink); }
.file-remove-btn svg { width:13px; height:13px; flex:none; }
.msg.out .file-remove-btn { color:#fde2e0; }
.file-scan-warning { display:flex; align-items:flex-start; gap:6px; margin-top:4px; padding:6px 8px; border:1px solid var(--amber-line); border-radius:7px; background:var(--amber-bg); color:var(--amber-ink); font-size:12.5px; line-height:1.35; overflow-wrap:anywhere; }
.file-scan-warning svg { width:14px; height:14px; flex:none; margin-top:1px; }
/* Одни скрипты (работа по программированию) — памятка, а не тревога. */
.file-scan-warning.soft { border-color:var(--line); background:var(--chip-bg); color:var(--ink-2); }
.msg .m-file a { max-width:100%; overflow-wrap:anywhere; }
.m-file-removed { display:flex; align-items:center; gap:5px; margin-top:5px; font-size:12px; font-style:italic; opacity:.8; }
.m-file-removed svg { width:13px; height:13px; flex:none; }
.file-more { margin-top:6px; }
.file-more summary { cursor:pointer; }
/* Блок «Удалённые файлы»: дата, место, причина, размер — без имени файла. */
.removed-files { margin-top:10px; padding:8px 10px; border:1px dashed var(--line); border-radius:8px; font-size:13px; }
.removed-files summary { cursor:pointer; font-weight:600; }
.removed-files summary svg { width:14px; height:14px; vertical-align:-2px; }
.removed-files-list { margin:6px 0; padding-left:18px; }
.removed-files-list li { margin:4px 0; overflow-wrap:anywhere; }
.file-remove-form .field { display:block; margin-top:10px; }
.file-remove-form .select, .file-remove-form .textarea { width:100%; max-width:100%; box-sizing:border-box; }
.file-remove-name { overflow-wrap:anywhere; }
/* «Состояние системы»: итог сухого прогона срока хранения. */
.retention-preview:empty { display:none; }
/* Окно импорта: колонка, которая не импортируется («Отв.», «Ит.», «Автор»). */
.import-map-ignored .hint { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }

/* ---------- Импорт прайса: таблица заказчика как есть (04.10.2026) ---------- */
/* Перечень заголовков, которые импорт находит сам: слева заголовки таблицы,
   справа — во что они превращаются. На телефоне — в столбик. */
.import-guide, .import-paste, .import-advanced { margin:0 0 14px; padding:10px 14px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface-3); }
.import-guide > summary, .import-paste > summary, .import-advanced > summary { cursor:pointer; color:var(--ink); font-size:13.5px; font-weight:650; }
.import-advanced > summary { color:var(--ink-2); font-weight:500; }
.import-guide[open] > summary, .import-paste[open] > summary, .import-advanced[open] > summary { margin-bottom:8px; }
.import-headers { display:grid; grid-template-columns:minmax(170px,34%) minmax(0,1fr); gap:6px 16px; margin:0; font-size:13px; line-height:1.45; }
.import-headers dt { color:var(--ink); font-weight:650; overflow-wrap:anywhere; }
.import-headers dd { margin:0; color:var(--ink-2); overflow-wrap:anywhere; }
.import-source { margin:0 0 10px; color:var(--ink-2); font-size:13px; overflow-wrap:anywhere; }
.import-source:empty { display:none; }
.import-paste .textarea { width:100%; box-sizing:border-box; }
/* Поле вставки — с отступом от подсказки над ним: без него рамка фокуса
   (3 px на отступе 3 px) ложилась на последнюю строку подсказки. */
.import-paste .field { margin-top:10px; }
/* Карта колонок: заголовок с образцом значения слева, поле назначения справа. */
.import-map { margin-top:8px; }
.import-map .import-map-row { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:6px 16px; align-items:start; }
.import-map-head { min-width:0; overflow-wrap:anywhere; }
.import-map-head .text-meta { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:pre-line; }
/* Ход пачек проверки и загрузки. */
.import-progress { display:flex; flex-direction:column; gap:6px; margin:10px 0; color:var(--ink-2); font-size:13px; font-variant-numeric:tabular-nums; }
.import-progress-bar { width:100%; height:6px; accent-color:var(--primary); }
/* Сводка по видам исходов: числа и номера строк. Заголовок сводки — блочный
   <b> общих стилей .alert; внутри пунктов выделения строчные. */
.import-summary { min-width:0; flex:1 1 auto; }
.import-sum { margin:8px 0 0; padding-left:18px; }
.import-sum li { margin:4px 0; overflow-wrap:anywhere; }
.import-sum ul { margin:2px 0 4px; padding-left:18px; }
.import-rows { color:inherit; opacity:.86; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
/* Строки, которые не пишутся без подтверждения: галочка у каждого вида. */
.import-confirm { margin-top:10px; padding:10px 12px; border:1px solid var(--amber-line); border-radius:8px; background:var(--surface); color:var(--ink); }
.import-confirm-title { margin-bottom:6px; font-weight:650; }
.import-confirm-row { display:flex; align-items:flex-start; gap:8px; padding:4px 0; color:var(--ink); font-size:13px; line-height:1.45; }
.import-confirm-row input { flex:none; margin-top:3px; }
.import-confirm-row > span { min-width:0; overflow-wrap:anywhere; }
.import-confirm-label { font-weight:650; white-space:nowrap; }
/* Волна 2 (W2-05): у вопроса два решения — отметки стоят рядом, под текстом. */
.import-confirm-choices { flex-direction:column; gap:4px; }
.import-choices { display:flex; flex-wrap:wrap; gap:4px 18px; }
.import-choices .check-row { display:flex; align-items:flex-start; gap:8px; margin:0; }
.import-choices .check-row input { flex:none; margin-top:3px; }
.import-filters { margin:12px 0 10px; }
.price-import .check-row { display:flex; align-items:flex-start; margin-top:8px; }
.price-import .check-row input { flex:none; margin-top:3px; }
@media (max-width:640px) {
  .import-headers { grid-template-columns:minmax(0,1fr); gap:2px; }
  .import-headers dd { margin-bottom:8px; }
  .import-map .import-map-row { grid-template-columns:minmax(0,1fr); }
  .import-confirm-label { white-space:normal; }
  .import-filters .chip { min-height:40px; }
}
/* Подвал окна импорта на телефоне: «Проверить» и «Загрузить» — в один ряд,
   «Закрыть» остаётся крестиком в шапке. Три кнопки столбиком отнимали у
   сводки пятую часть экрана. Тосты поднимаются над подвалом в одну кнопку, а
   не в три (общее правило считает кнопки подвала). */
@media (max-width:520px) {
  .modal.price-import-dialog .m-foot { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .modal.price-import-dialog .m-foot .import-close { display:none; }
  body:not(.is-landing):has(.modal-bg:not(.is-closing) .price-import-dialog .m-foot) #toast-root { bottom:calc(max(8px, env(safe-area-inset-bottom, 0px)) + 77px); }
}
/* Примечание и гарантии позиции прайса: в таблице заказчика это несколько
   строк («Гарантии: …», «Состоит из: …») — переводы строк сохраняем в карточке
   прайса, корзине и окне заказа. */
.price-note { white-space:pre-line; overflow-wrap:anywhere; }
.price-card .price-note, .cart-card .price-note { margin:10px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
/* Длинное примечание в списке прайса свёрнуто до пяти строк: карточек на
   странице полсотни, и десять строк гарантий в каждой заслонили бы сам прайс. */
.price-note.is-clamped { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; overflow:hidden; }
.price-note-more { margin:2px 0 0; padding:0; border:0; background:none; color:var(--primary); font-size:12.5px; font-weight:650; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.price-note-more:focus-visible { outline:3px solid #a8701f; outline-offset:2px; }
/* Позиция, снятая с продажи: в списке сотрудника видна сразу, у заголовка. */
.price-card.is-off-sale { border-style:dashed; }
.price-card.is-off-sale .price { color:var(--muted); }
.price-sale-filter { flex:0 1 220px; }

/* ── Цена по преподавателю (src/teacher-price.js) ──
   Карточка прайса: подпись под ценой «цена зависит от проверяющего
   преподавателя» и свёрнутый список вариантов; корзина и окно заказа: поле
   «Преподаватель» с ценой в подписи пункта; редактор позиции: блок «Цена по
   преподавателям» — строки вариантов с чипами преподавателей. Всё на токенах
   темы, поэтому тёмная тема получает цвета сама. */
.price-card .price-by-teacher { max-width:180px; margin-top:2px; line-height:1.35; text-align:right; }
.price-teachers { margin-top:10px; }
.price-teachers > summary { cursor:pointer; color:var(--primary); font-weight:650; list-style:none; min-height:32px; display:inline-flex; align-items:center; }
.price-teachers > summary::-webkit-details-marker { display:none; }
.price-teachers > summary::before { content:'▸'; margin-right:6px; color:var(--muted); }
.price-teachers[open] > summary::before { content:'▾'; }
.price-teachers-list { margin:6px 0 0; padding-left:18px; line-height:1.55; }
.price-teachers-list li + li { margin-top:3px; }
.price-teachers-list .badge { margin-left:4px; vertical-align:middle; }
.tp-teacher.is-off { color:var(--muted); }
/* Корзина: поле преподавателя под составом, подсказка — красным, как у даты. */
.cart-teacher-field { margin-top:10px; margin-bottom:10px; }
.cart-teacher-field .field { margin-bottom:6px; }
.cart-teacher-field .hint { margin-top:0; }
.cart-teacher { width:100%; }
/* Окно заказа: строка о преподавателе под итогом. */
.teacher-price-line { margin-top:2px; }
.teacher-price-line.text-danger { font-weight:600; }
/* Карточка преподавателя у сотрудника: предметы с его ценой. */
.teacher-prices-list { margin:0; padding-left:18px; font-size:13.5px; line-height:1.55; }
.teacher-prices-list li + li { margin-top:4px; }
/* Редактор позиции: блок «Цена по преподавателям». */
.tp-editor { display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.tp-base { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:8px 12px; border:1px dashed var(--line); border-radius:12px; color:var(--ink-2); font-size:13.5px; }
.tp-base b { font-variant-numeric:tabular-nums; }
.tp-row { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--v50); }
.tp-row-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.tp-row-title { font-size:12.5px; font-weight:650; color:var(--ink-2); }
.tp-chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:8px; }
.tp-chips:empty { display:none; }
.tp-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:4px 6px 4px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); font-size:13px; }
.tp-chip > span { min-width:0; overflow-wrap:anywhere; }
.tp-chip.is-off { color:var(--muted); border-style:dashed; }
.tp-chip .badge { padding:2px 7px; font-size:11px; }
.tp-chip-x { width:26px; height:26px; min-height:0; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:16px; line-height:1; cursor:pointer; }
.tp-chip-x:hover { background:var(--hover); color:var(--ink); }
.tp-search { position:relative; margin-bottom:8px; }
.tp-search .field { margin:0; }
.tp-search-list { position:absolute; z-index:4; left:0; right:0; top:calc(100% + 4px); max-height:220px; overflow:auto; margin:0; padding:4px; list-style:none; border:1px solid var(--modal-line); border-radius:10px; background:var(--surface); box-shadow:var(--sh-md); }
.tp-search-list[hidden] { display:none; }
.tp-search-list li { padding:8px 10px; border-radius:8px; font-size:13.5px; cursor:pointer; display:flex; justify-content:space-between; gap:8px; align-items:center; }
.tp-search-list li:hover, .tp-search-list li[aria-selected="true"] { background:var(--hover); }
.tp-search-list li.is-empty { color:var(--muted); cursor:default; }
.tp-search-list li.tp-create { justify-content:flex-start; color:var(--ink); font-weight:600; }
.tp-search-list li.tp-create svg { flex:none; width:16px; height:16px; }
.tp-search-list li .text-muted { font-size:12px; white-space:nowrap; }
.tp-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:8px; }
.tp-fields .field { margin:0; }
.tp-parts { margin-top:8px; }
.tp-parts > summary { cursor:pointer; color:var(--ink-2); font-size:12.5px; font-weight:650; min-height:32px; display:flex; align-items:center; list-style:none; }
.tp-parts > summary::-webkit-details-marker { display:none; }
.tp-parts > summary::before { content:'▸'; margin-right:6px; color:var(--muted); }
.tp-parts[open] > summary::before { content:'▾'; }
.tp-parts-body { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:8px; margin-top:6px; }
.tp-parts-body .field { margin:0; }
.tp-parts-body .field > span { font-weight:600; }
.tp-parts-body .input::placeholder { color:var(--placeholder); font-style:italic; }
.tp-copy { margin-top:10px; }
.tp-copy > summary { cursor:pointer; color:var(--primary); font-weight:650; font-size:13px; min-height:32px; display:inline-flex; align-items:center; list-style:none; }
.tp-copy > summary::-webkit-details-marker { display:none; }
.tp-copy-list { max-height:240px; overflow:auto; margin:8px 0; padding:6px 8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.tp-copy-list .check-row { display:flex; align-items:flex-start; width:100%; padding:5px 0; font-size:13.5px; }
.tp-copy-list .check-row input { margin-top:3px; }
.tp-copy-list .check-row > span { min-width:0; overflow-wrap:anywhere; }
.tp-copy-result { margin:0; padding-left:18px; font-size:13px; line-height:1.5; }
@media (max-width:520px) {
  .price-card .price-by-teacher { max-width:none; text-align:left; }
  .tp-fields { grid-template-columns:minmax(0,1fr); }
  .tp-row { padding:10px; }
}
/* Подбор по номерам на странице вуза: подпись «цена зависит от проверяющего
   преподавателя» у предмета и под итогом. Страница тёмная (как весь лендинг). */
.lookup-by-teacher { margin:0 0 6px; color:#d9ab63; font-size:13.5px; }
.lookup-total-note { margin:-4px 0 12px; }
/* Сайты-партнёры: подпись строки корзины «С сайта «…»» и раздел
   «Интеграции (API)» администратора (staff/integrations.js). */
.cart-source { display:block; margin-top:2px; }
/* «Вернуться на сайт «…»»: значок на строке текста, подчёркнут только текст. */
.partner-return { display:inline-flex; align-items:center; gap:6px; text-decoration:none; }
.partner-return svg { width:16px; height:16px; flex:none; } /* и вне .alert: на карточке входа значок рос во всю высоту */
.partner-return > span { text-decoration:underline; text-underline-offset:2px; }
.partner-return:hover > span { text-decoration-thickness:2px; }
.partner-transfer-card .text-meta, .partner-request-card .text-meta { overflow-wrap:anywhere; }
/* Карточки ключей, журнала и передач на телефоне — в .order-list: расстояние
   между ними задаёт gap списка, а общее .card + .card добавляло ещё 18 px, и
   под каждой карточкой оставалась пустая полоса. */
.order-list > .partner-key-card, .order-list > .partner-request-card, .order-list > .partner-transfer-card { margin-top:0; }
/* Последняя строка карточки — мелкий текст с высокой строкой: снизу
   оставалось заметно больше воздуха, чем сверху над значком состояния. */
.order-list > .partner-request-card, .order-list > .partner-transfer-card { padding-bottom:14px; }
.partner-key-mask { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; overflow-wrap:anywhere; }
.partner-key-title { font-size:20px; overflow-wrap:anywhere; }
.partner-key-form .hint { margin:-6px 0 10px; }
.partner-secret-row { display:flex; gap:8px; flex-wrap:wrap; }
.partner-secret-row .input { flex:1 1 220px; min-width:0; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.partner-docs { line-height:1.6; overflow-wrap:anywhere; }
.partner-docs h2 { font-size:19px; margin:22px 0 8px; }
.partner-docs h2:first-of-type { margin-top:4px; }
.partner-docs h3 { font-size:16px; margin:18px 0 6px; }
.partner-docs p, .partner-docs ul, .partner-docs ol { margin:0 0 10px; }
.partner-docs .table-wrap { margin:0 0 12px; }
.partner-code { position:relative; margin:0 0 12px; }
.partner-code pre { margin:0; padding:12px 14px; padding-top:40px; border-radius:8px; background:var(--chip-bg); border:1px solid var(--line); overflow-x:auto; font-size:12.5px; line-height:1.5; max-width:100%; }
.partner-code .partner-code-copy { position:absolute; top:6px; right:6px; }
.partner-requests-table code, .partner-transfers-table code { font-size:12.5px; }
