/* Знаки UI-кита (docs/UI_KIT.md §2–3). Оформление «Пастель» (13.10.2026, владелец): почти белый фон, тёмно-синие чернила,
   линии с лёгким сиреневым оттенком, один уверенный индиго — кнопки, выбранное, где вы, ссылки; мягкие пастельные заливки —
   только у главных карточек и меток списков. Цвет по смыслу: зелёный — «сделано», янтарь — «ждёт», красный — беда. Тема одна — светлая. */
@font-face{ font-family:"Golos Text"; font-style:normal; font-weight:400 700; font-display:swap; src:url("/assets/build/golos-cyrillic-v7.woff2") format("woff2");
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face{ font-family:"Golos Text"; font-style:normal; font-weight:400 700; font-display:swap; src:url("/assets/build/golos-latin-v7.woff2") format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root{
  --ui: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --head: var(--ui);
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  --bg:#f8f8fb; --card:#ffffff; --ink:#1d2140; --mute:#555a75; --line:#ebebf2; --line-strong:#cfd0de;
  --acc:#4f46e5; --acc-soft:#eceafe; --acc-hover:#4338ca;   /* индиго: где вы, ссылки */
  --primary:#4f46e5; --primary-hover:#4338ca; --on-primary:#ffffff;   /* главное действие и выбранное */
  --ok:#1f7a55; --ok-soft:#ddf5ea;                    /* сделано, выдано, сходится */
  --warn:#8f5f00; --warn-soft:#fff6df; --warn-fill:#e0a13a;   /* ждёт; warn-fill — только полосы и точки, не под текст */
  --bad:#c0103f; --bad-soft:#fde9ee;
  --bot:#0b62c4; --bot-soft:#e7f1ff;                  /* справка, подсказка, место */
  --mark:#fff0b3; --sel:#f2f1fb; --out-bg:#262a4a; --out-ink:#ffffff;
  --shadow:0 1px 2px rgba(29,33,64,.05), 0 2px 8px rgba(29,33,64,.05);
  --shadow-pop:0 2px 4px rgba(29,33,64,.05), 0 8px 24px rgba(29,33,64,.12);
  --shadow-btn:0 2px 8px rgba(79,70,229,.25);
  --pad:20px; --rowh:44px; --radius:12px;
  --pastel-1:#e6efff; --pastel-2:#fff0e4; --pastel-3:#efeafe;   /* небо, персик, сирень — заливки главных карточек */
  --f:var(--mute); --f-soft:var(--sel);            /* цвет списка: пока класс .f-* не задан — спокойный */
  /* цветные метки адресов (30.09): точка и мягкая подкраска строки */
  --mk-yellow:#e7b400; --mk-yellow-soft:#fff6d1; --mk-orange:#ef7d1a; --mk-orange-soft:#fdecdc; --mk-red:#d93a3a; --mk-red-soft:#fce5e5; --mk-pink:#dd4f98; --mk-pink-soft:#fce6f1; --mk-purple:#8a4fd1; --mk-purple-soft:#efe6fb;
  --mk-blue:#2f6fd6; --mk-blue-soft:#e4edfb; --mk-teal:#139a98; --mk-teal-soft:#dcf3f2; --mk-green:#2e9d4f; --mk-green-soft:#e3f4e8; --mk-brown:#8b5a2b; --mk-brown-soft:#f1e7dc; --mk-black:#262626; --mk-black-soft:#e9e9e6;
  color-scheme:light;
}
[data-density=roomy]{ --rowh:46px; --pad:24px; }

/* Основа: сетка 4 px, отступы 8 / 12 / 20, радиус 8, теней нет — только линии. Раскладки desk и bare. */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{ margin:0; background:var(--bg); color:var(--ink); font:400 15px/22px var(--ui); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; -webkit-font-smoothing:antialiased; }
[data-density=roomy] body{ font-size:15px; line-height:24px; }
h1{ font:700 24px/30px var(--ui); letter-spacing:-.01em; margin:0 0 12px; }
h2{ font:600 17px/24px var(--ui); margin:24px 0 8px; }
h3{ font:600 15px/22px var(--ui); margin:16px 0 4px; }
p{ margin:0 0 12px; }
ul,ol{ margin:0 0 12px; padding-left:20px; }
a{ color:var(--acc); }
button,input,select,textarea{ font:inherit; color:inherit; }
:focus-visible{ outline:2px solid var(--acc); outline-offset:2px; }
mark{ background:var(--mark); color:var(--ink); border-radius:2px; padding:0 1px; }
.mute{ color:var(--mute); } .small{ font-size:12px; line-height:16px; } .mono,.code{ font-family:var(--mono); }
.num{ white-space:nowrap; font-variant-numeric:tabular-nums; } .nowrap{ white-space:nowrap; } .right{ text-align:right; }
.quiet{ color:var(--mute); text-decoration:none; } .quiet:hover{ color:var(--ink); text-decoration:underline; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip{ position:absolute; left:8px; top:-60px; z-index:50; background:var(--ink); color:var(--bg); padding:8px 12px; border-radius:6px; }
.skip:focus{ top:8px; }
[hidden]{ display:none !important; }
.inline{ display:inline; margin:0; }
.below{ margin-top:12px; }
.stack > * + *{ margin-top:16px; }


/* ── Содержимое и место под боковую карточку ── */
.frame{ max-width:1640px; margin:0 auto; padding:var(--pad); display:grid; grid-template-columns:minmax(0,1180px); gap:var(--pad); align-items:start; }
.content{ min-width:0; }
/* панель семьи (app.js embedCard): выезжает справа поверх таблицы — таблица не сжимается и не прыгает; на широком экране — своя колонка */
.side-card{ position:fixed; top:var(--top-h,0px); right:0; bottom:0; z-index:40; width:min(560px, calc(100vw - 56px)); overflow:auto; overscroll-behavior:contain;
  padding:12px 14px 28px; background:var(--bg); border-left:1px solid var(--line); box-shadow:-10px 0 36px rgba(0,0,0,.10); }
.side-card:empty{ display:none; }
@media (min-width:1500px){
  .frame.has-card.is-open{ grid-template-columns:minmax(0,1fr) 560px; }
  .side-card{ position:sticky; top:calc(var(--top-h,0px) + var(--pad)); right:auto; bottom:auto; width:auto; max-height:calc(100vh - var(--top-h,0px) - var(--pad) * 2); padding:0; background:transparent; border:0; box-shadow:none; }
}

/* раскладка bare: вход, ожидание, замок, ошибки */
.bare{ min-height:100vh; display:flex; align-items:flex-start; justify-content:center; }
.bare-box{ width:100%; max-width:460px; padding:12vh 20px 40px; }
.bare-box.is-wide{ max-width:640px; padding-top:6vh; }

.banner-strip{ padding:8px var(--pad); text-align:center; border-bottom:1px solid var(--warn); background:var(--warn-soft); color:var(--ink); font-weight:600; text-wrap:balance; }
.banner-strip .banner-part + .banner-part::before{ content:" · "; }
@media (max-width:900px){ .banner-strip{ padding:7px 12px; font-size:13px; line-height:18px; font-weight:500; } .banner-strip .banner-part{ display:block; } .banner-strip .banner-part + .banner-part::before{ content:none; } }
.banner-strip.is-bad{ border-color:var(--bad); background:var(--bad-soft); color:var(--bad); }

@media (max-width:900px){
  .side-card{ position:static; width:auto; max-height:none; padding:0; background:transparent; border:0; box-shadow:none; }
}
@media (max-width:900px){
  body{ font-size:16px; line-height:24px; }
  .frame{ padding:12px; gap:12px; }
  .bare-box{ padding:6vh 12px 32px; }
  .hide-narrow{ display:none !important; }
}

/* подсказки только для узкого экрана (телефон) */
.only-phone{ display:none; }
@media (max-width:900px){ .only-phone{ display:inline; } }
.cell-link{ margin-left:8px; font-size:12px; font-weight:600; color:var(--acc); text-decoration:none; white-space:nowrap; padding:1px 8px; border:1px solid var(--acc-soft); background:var(--acc-soft); border-radius:999px; }
.cell-link:hover{ text-decoration:underline; }

/* карточка, встроенная в панель (app.js embedCard): те же блоки и формы, что на странице карточки, в один столбец и компактнее */
.card-embed{ position:relative; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px 16px 18px; box-shadow:0 6px 24px rgba(0,0,0,.05); }
.card-embed.is-loading{ min-height:80px; color:var(--mute); }
.card-embed .card-embed-close{ position:absolute; right:8px; top:8px; width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:8px; font-size:22px; line-height:1; color:var(--mute); text-decoration:none; }
.card-embed .card-embed-close:hover{ background:var(--bg); color:var(--ink); }
.card-embed .page-head{ margin:0 36px 12px 0; }
.card-embed .page-head h1{ font-size:20px; line-height:26px; }
.card-embed .page-head .row-actions{ margin-top:6px; }
/* три класса: правило страницы карточки (.m-people .people-grid, два столбца от 1100px) идёт в сборке позже и иначе побеждает */
.side-card .card-embed .people-grid{ display:block; }
.side-card .card-embed .people-side{ position:static; max-height:none; overflow:visible; }
.side-card .card-embed .people-side [data-block="card"]{ display:none; }   /* сводка-дубль: имя, списки и номер уже в шапке и в «Телефонах» */
.side-card .card-embed .people-side [data-block="issues"] .card{ margin:0 0 10px; }
.side-card .card-embed .people-main{ display:flex; flex-direction:column; gap:0; }
.side-card .card-embed .people-sheet{ border:0; padding:0; box-shadow:none; background:transparent; }   /* лист карточки в панели — без второй рамки */
.side-card .card-embed [data-block="edit"] form.card,.side-card .card-embed [data-block="issues"] .card{ margin-bottom:10px; }
.side-card .card-embed .people-main > *{ margin:0; }
.side-card .card-embed .people-main > [data-block]:not(:has(*)){ display:none; }
.side-card .card-embed .people-main > [data-block="edit"]:has(form){ order:-1; }   /* открытая форма — первой, без прокрутки */
.card-embed .card{ padding:12px 14px; border-radius:8px; }
.card-embed .card + .card{ margin-top:10px; }
.card-embed .cols,.card-embed .field-row{ grid-template-columns:1fr; gap:10px; }
.card-embed h2{ font-size:15px; margin:0 0 6px; }
.card-embed .card-head{ margin-bottom:8px; }
.card-embed .table td{ height:auto; }
.card-embed .people-phone-num{ flex-basis:200px; }
.card-embed .people-phone-meta{ flex-basis:140px; }
/* окно действий на телефоне */
.sheet-back{ position:fixed; inset:0; z-index:60; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; }
.sheet{ width:100%; max-height:88vh; overflow:auto; background:var(--card); border-radius:16px 16px 0 0; padding:16px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,.2); }
.sheet-head h2{ margin:6px 0 2px; font-size:20px; line-height:26px; }
.sheet-head p{ margin:0 0 4px; }
.sheet-note{ color:var(--ink); font-size:14px; white-space:pre-line; }
.sheet-alert{ margin:8px 0 4px; padding:8px 10px; border-radius:8px; background:var(--warn-soft); color:var(--warn); font-weight:600; font-size:15px; line-height:20px; }
.chip.is-busy{ opacity:.55; }
.sheet-num{ font-size:22px; font-weight:700; letter-spacing:.01em; margin:10px 0 12px; }
.sheet-actions{ display:grid; gap:8px; }
.sheet-call-title{ margin:10px 0 6px; font-weight:600; white-space:pre-line; }   /* 3.11: «Точно сделано?» и строкой ниже — что именно */
.sheet-call-sum{ margin:0 0 10px; white-space:pre-line; }
.sheet-call-warn{ margin:0 0 10px; padding:8px 10px; border-radius:8px; background:var(--warn-soft); font-size:14px; }
.sheet-call .field{ margin:0 0 10px; }
.sheet-call textarea{ width:100%; min-height:84px; padding:8px 12px; border:1px solid var(--line-strong); border-radius:var(--radius); font:inherit; }
@media (min-width:901px){                                   /* компьютер: то же окно, но по центру и уже */
  .sheet-back{ align-items:center; justify-content:center; }
  .sheet{ width:min(520px, calc(100vw - 32px)); max-height:86vh; border-radius:14px; padding:18px 20px 20px; }
}
body.has-sheet{ overflow:hidden; }
/* 17.11 (владелец: «как родное приложение»): окно-лист выезжает снизу и уезжает вниз, фон темнеет плавно; на телефоне лист можно смахнуть
   вниз за верх (app.js). Появление — класс .is-in (ставит app.js: замена одного окна другим — без повторного въезда), уход — .sheet-out.
   На компьютере окно по центру — проявляется на месте. «Меньше движения» — без анимаций. */
.sheet{ overscroll-behavior:contain; }
.sheet-back.is-in{ animation:sheet-dim .2s ease-out both; }
.sheet-back.is-in .sheet{ animation:sheet-up .28s cubic-bezier(.2,.85,.25,1) both; }
.sheet-out{ position:fixed; inset:0; z-index:60; display:flex; align-items:flex-end; background:rgba(0,0,0,.45); pointer-events:none; animation:sheet-dim .2s ease-in reverse both; }
.sheet-out .sheet{ animation:sheet-down .2s ease-in both; }
.sheet.is-settle{ transition:transform .2s ease-out; }
@keyframes sheet-dim{ from{ background-color:rgba(0,0,0,0); } }
@keyframes sheet-up{ from{ transform:translateY(100%); } }
@keyframes sheet-down{ from{ transform:translateY(var(--sheet-drag, 0px)); } to{ transform:translateY(100%); } }
@keyframes sheet-pop{ from{ opacity:0; transform:translateY(10px) scale(.98); } }
@keyframes sheet-unpop{ to{ opacity:0; transform:translateY(10px) scale(.98); } }
@media (max-width:900px){
  .sheet-back > .sheet::before,.sheet-out > .sheet::before{ content:""; display:block; width:36px; height:4px; margin:-6px auto 6px; border-radius:2px; background:var(--line-strong); }   /* «ручка»: за верх листа можно смахнуть вниз */
}
@media (min-width:901px){
  .sheet-out{ align-items:center; justify-content:center; }
  .sheet-back.is-in .sheet{ animation:sheet-pop .18s ease-out both; }
  .sheet-out .sheet{ animation:sheet-unpop .14s ease-in both; }
}
@media (prefers-reduced-motion:reduce){ .sheet-back.is-in,.sheet-back.is-in .sheet,.sheet-out,.sheet-out .sheet{ animation:none; } .sheet.is-settle{ transition:none; } }
/* отклик на нажатие везде: кнопки, чипы, строки-визитки на телефоне */
.btn,.chip{ transition:transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color:transparent; }
.btn:active,.chip:active{ transform:scale(.97); }
.sheet .btn:active{ transform:scale(.98); filter:brightness(.95); }
@media (prefers-reduced-motion:reduce){ .btn,.chip{ transition:none; } .btn:active,.chip:active,.sheet .btn:active{ transform:none; } }
/* мгновенный поиск: подсветка и счётчик у поля в шапке */
mark{ background:var(--warn-soft); color:inherit; border-radius:3px; padding:0 1px; }

/* учётка «только с компьютера» на телефоне (app.js) */
.desktop-only-wall{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; text-align:center; font-size:18px; line-height:26px; }
.give-confirm-warn{ margin:0 0 14px; padding:8px 10px; border-radius:8px; background:var(--warn-soft); color:var(--warn); font-size:14px; line-height:20px; }
.give-confirm-warn.is-off{ background:var(--bad-soft); color:var(--bad); }
.btn-danger,.sheet .btn.btn-danger{ background:var(--card); border-color:var(--bad); color:var(--bad); font-weight:600; }
.stop-reasons{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.stop-reasons .chip.is-on{ background:var(--bad-soft); border-color:var(--bad); color:var(--bad); font-weight:600; }
.stop-comment{ width:100%; min-height:56px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:var(--radius); font:inherit; margin:0 0 10px; }
/* 10.10: «Перевести в другой список» в окне «×» (Имам) */
.stop-move-open{ margin:0 0 12px; white-space:normal; }
.stop-move{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.stop-move .chip.is-on{ background:var(--acc-soft); border-color:var(--acc); color:var(--acc); font-weight:600; }
.move-comment{ width:100%; min-height:72px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:var(--radius); font:inherit; margin:0 0 10px; }
.qedit{ display:grid; gap:12px; }
.qedit-head{ display:flex; align-items:center; gap:8px; }
.qedit-head h2{ margin:0; flex:1; }
.qedit-x{ width:34px; height:34px; border:0; border-radius:8px; background:none; font-size:24px; line-height:1; color:var(--mute); cursor:pointer; }
.qedit-x:hover{ background:var(--bg); color:var(--ink); }
.qedit-f{ display:grid; gap:4px; }
.qedit-f span{ font-size:13px; color:var(--mute); }
.qedit-f input,.qedit-f textarea{ width:100%; padding:9px 12px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); font:inherit; }
.qedit-f input{ height:42px; font-size:16px; }
.qedit-f input:focus,.qedit-f textarea:focus{ outline:2px solid var(--acc); outline-offset:0; border-color:var(--acc); }
.qedit-f small{ color:var(--mute); font-size:12px; }
.qedit-err{ margin:0; padding:8px 10px; border-radius:8px; background:var(--bad-soft); color:var(--bad); font-weight:600; font-size:14px; }
.qedit-actions{ grid-template-columns:1fr auto; }
.qedit-units summary{ cursor:pointer; color:var(--mute); font-size:13px; }
.qedit-units summary:hover{ color:var(--ink); }
.qedit-check{ display:flex; gap:8px; align-items:center; margin-top:8px; font-size:14px; }
/* обзвон сирот: карточка ребёнка — имя, дата, возраст, три кнопки; отмеченная — цветной край */
.call-kids{ display:grid; gap:8px; margin:4px 0 8px; }
.call-kid{ padding:10px 12px; border:1px solid var(--line); border-left:4px solid var(--line-strong); border-radius:10px; background:var(--card); }
.call-kid.is-ok{ border-left-color:var(--ok); background:var(--ok-soft); }
.call-kid.is-date{ border-left-color:var(--warn); background:var(--warn-soft); }
.call-kid.is-absent{ border-left-color:var(--bad); background:var(--bad-soft); }
.call-kid-head{ font-size:15px; line-height:21px; margin-bottom:8px; }
.call-kid-old{ display:inline-block; padding:0 8px; border-radius:999px; background:var(--bad); color:#fff; font-size:12px; font-weight:600; }
.call-kid-btns{ display:flex; flex-wrap:wrap; gap:6px; }
.call-kid-btns .chip{ min-height:36px; }
.call-kid-btns .chip.is-on{ background:var(--ink); color:var(--card); border-color:var(--ink); font-weight:600; }
.call-kid-date{ display:grid; gap:4px; margin-top:8px; font-size:13px; color:var(--mute); }
.call-kid-date input{ height:40px; padding:0 10px; border:1px solid var(--line-strong); border-radius:var(--radius); font:inherit; font-size:16px; }
.qedit-kids{ display:grid; gap:6px; justify-items:start; }
.qedit-kids-t{ font-size:13px; color:var(--mute); }
.qedit-kid{ display:grid; grid-template-columns:minmax(0,1fr) 150px 36px; gap:6px; width:100%; }
.qedit-kid input{ height:40px; padding:0 10px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); font:inherit; font-size:15px; min-width:0; }
.qk-x{ width:36px; height:40px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); color:var(--mute); font-size:20px; cursor:pointer; }
.qk-x:hover{ color:var(--bad); border-color:var(--bad); }
.qedit-kid.is-removed input{ text-decoration:line-through; opacity:.45; }
@media (max-width:600px){ .qedit-kid{ grid-template-columns:minmax(0,1fr) 36px; } .qedit-kid .qk-birth{ grid-column:1; } .qedit-kid .qk-x{ grid-row:1; grid-column:2; } }
.call-kid.is-new{ border-left-color:var(--acc); display:grid; gap:6px; }
.call-kid.is-new input.call-new-name{ height:40px; padding:0 10px; border:1px solid var(--line-strong); border-radius:var(--radius); font:inherit; font-size:16px; }
.call-kid-drop{ margin-left:8px; border:0; background:none; color:var(--bad); font-size:13px; cursor:pointer; text-decoration:underline; }
.call-kid-note{ margin:6px 0 0; color:var(--bad); font-size:13px; }
/* 03.10: кто сирота — правило над детьми; «Не сироты — это вдова» — спокойной кнопкой */
.call-kid-rule{ margin:0 0 8px; padding:8px 10px; border-radius:8px; background:var(--warn-soft); font-size:13px; line-height:1.35; }
.call-kind{ margin:0 0 10px; } .call-kind-btns{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0 0 6px; }
.call-kind-btns .chip{ justify-content:center; min-height:50px; font-size:17px; font-weight:700; }   /* 03.10: главный выбор окна — крупно, пополам */
.call-kid-more{ justify-self:start; }
.sheet{ position:relative; }
.sheet-x{ position:absolute; top:10px; right:10px; width:38px; height:38px; border:0; border-radius:10px; background:var(--bg); color:var(--mute); font-size:26px; line-height:1; cursor:pointer; z-index:1; }
.sheet-x:hover{ color:var(--ink); }
.sheet-call .sheet-head{ padding-right:44px; }
.sheet-call-save{ margin:2px 0 8px; font-size:13px; color:var(--mute); text-align:center; }

/* «Устройства» по людям (26.09): строка — человек и последний заход; внутри — его устройства и «Отозвать» */
.dev-list{ display:grid; gap:0; }
.dev-person{ border-top:1px solid var(--line); }
.dev-person:first-child{ border-top:0; }
.dev-person > summary{ display:grid; grid-template-columns:minmax(140px, 220px) 1fr auto; gap:12px; align-items:center; padding:12px 4px; cursor:pointer; list-style:none; }
.dev-person > summary::-webkit-details-marker{ display:none; }
.dev-person > summary:hover{ background:rgba(128,128,128,.06); }
.dev-person[open] > summary .dev-count{ color:var(--ink); }
.dev-who{ font-weight:700; }
.dev-last{ display:flex; flex-direction:column; gap:2px; }
.dev-last > time{ font-weight:600; }
.dev-exact{ color:var(--mute); font-size:12px; line-height:16px; }
.dev-items{ list-style:none; margin:0 0 10px; padding:0 4px; display:grid; gap:6px; }
.dev-items li{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; background:var(--bg); }
.dev-item-sub{ display:block; margin-top:2px; }
.dev-cleanup{ margin:0 4px 12px; padding:10px; border:1px dashed var(--line-strong); border-radius:8px; }
.dev-cleanup p{ margin:0 0 8px; }
@media (max-width:600px){ .dev-person > summary{ grid-template-columns:1fr auto; } .dev-last{ grid-column:1 / -1; grid-row:2; } .dev-items li{ flex-direction:column; align-items:flex-start; } }
.dev-last .pill{ align-self:flex-start; }
.dev-never .dev-row{ display:grid; grid-template-columns:minmax(140px, 220px) 1fr auto; gap:12px; align-items:center; padding:12px 4px; }
@media (max-width:600px){ .dev-never .dev-row{ grid-template-columns:1fr; gap:2px; } }
.dev-never .dev-last{ font-size:14px; }
.banner-strip.self-device{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; background:var(--warn-soft); border-color:var(--warn); }
.banner-strip.self-device form{ margin:0; }
/* долгая отправка (30.09): затемнение с ожиданием — form[data-busy] (app.js) */
.busy-back{ position:fixed; inset:0; z-index:70; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; padding:16px; }
.busy-card{ background:var(--card); color:var(--ink); border-radius:var(--radius); padding:20px; max-width:420px; width:100%; display:flex; flex-direction:column; gap:12px; box-shadow:0 10px 40px rgba(0,0,0,.25); }
.busy-text{ margin:0; font-weight:600; }
.busy-sec{ margin:0; color:var(--mute); font-size:13px; }
.busy-bar{ display:block; height:6px; border-radius:3px; background:var(--line); overflow:hidden; position:relative; }
.busy-bar i{ position:absolute; top:0; bottom:0; width:35%; background:var(--acc); border-radius:3px; animation:busy-move 1.2s ease-in-out infinite; }
@keyframes busy-move{ 0%{ left:-35%; } 100%{ left:100%; } }
@media (prefers-reduced-motion: reduce){ .busy-bar i{ animation:none; left:0; width:100%; opacity:.5; } }

/* 03.10: окно «места и сумма» с «Главной» — поля с воздухом, подпись над полем */
.sheet-qterms .field{ display:block; margin:0 0 14px; }
.sheet-qterms .field .label{ display:block; margin:0 0 6px; font-weight:700; }
.sheet-qterms .field input{ width:100%; height:48px; padding:0 12px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); font:inherit; font-size:18px; }
.sheet-qterms .sheet-head{ margin-bottom:16px; }
.sheet-qterms .sheet-actions{ margin-top:6px; }
/* сумма «своя каждому» в окне правки (10.10): перенос от другой семьи, почему */
.qedit-amountbox{ display:grid; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg); }
.qedit-from summary{ cursor:pointer; font-size:14px; color:var(--acc); }
.qedit-from .qedit-f{ margin-top:8px; }
.qedit-f select{ width:100%; height:42px; padding:0 10px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); font:inherit; font-size:16px; }
.qedit-from-note.is-bad{ color:var(--bad); }
/* 10.10 (аудит Имама): заявка уже ждёт Распорядителя — жёлтой строкой над суммой; перенос не сходится — весь блок в красной рамке */
.qedit-wait{ margin:0; color:var(--warn); font-weight:600; font-size:13px; line-height:1.35; }
.qedit-amountbox.is-bad{ border-color:var(--bad); box-shadow:0 0 0 2px var(--bad-soft); }
/* 10.10 (аудит Гули): не вписали ребёнка — его блок обводится красным, ошибка под детьми */
.sheet .call-kid.is-invalid{ outline:2px solid var(--bad); outline-offset:3px; border-radius:10px; }
.sheet .call-kids-err{ margin:4px 0 0; }
/* окно «Убрать из раздачи» (10.10): справка — серая, ошибка — красная, незаполненное — в рамке */
.give-confirm-warn.is-off{ background:var(--bg); color:var(--mute); }
.sheet .stop-err{ color:var(--bad); font-weight:600; }
.sheet .stop-reasons.is-invalid,.sheet .stop-comment.is-invalid,.sheet .stop-move.is-invalid,.sheet .move-comment.is-invalid{ outline:2px solid var(--bad); outline-offset:3px; border-radius:10px; }
/* окна на телефоне (10.10, аудит): кнопки не шире экрана, длинная подпись переносится, ошибки красным, кнопки действия не прячутся под клавиатурой */
.sheet .btn,.sheet .chip{ box-sizing:border-box; max-width:100%; }
.sheet-actions .btn.call-lost-btn{ white-space:normal; line-height:1.25; padding-top:8px; padding-bottom:8px; }
/* 17.11: длинная подпись («Убрать и поставить „Абуева Забуд магомедовна“») растягивала ряд кнопок шире окна — все три кнопки уезжали за экран.
   Колонка кнопок — не шире окна, длинная подпись переносится */
.sheet-actions{ grid-template-columns:minmax(0,1fr); }
.sheet-actions .btn{ white-space:normal; line-height:1.25; }
.sheet .field-error{ color:var(--bad); font-weight:600; }
@media (max-width:900px){ .sheet .sheet-actions{ position:sticky; bottom:calc(-16px - env(safe-area-inset-bottom)); margin:0 -16px -16px; padding:10px 16px calc(12px + env(safe-area-inset-bottom)); background:var(--card); box-shadow:0 -6px 16px rgba(0,0,0,.06); } }
/* 10.10 (аудит): подсказки в полях — не как готовые суммы; сумма в окне выдачи крупно; описание у связной на телефоне — две строки */
input::placeholder,textarea::placeholder{ color:var(--mute); opacity:.65; font-weight:400; }
.sheet .give-sum{ display:flex; align-items:baseline; gap:10px; margin:0 0 10px; font-size:15px; color:var(--mute); } .sheet .give-sum b{ font-size:24px; color:var(--ink); }

/* Части UI-кита (docs/UI_KIT.md §5). Витрина: /_ui (только dev). Модуль берёт готовые классы и части, своих не изобретает. */

/* ── Карточки ── */
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:var(--pad); box-shadow:var(--shadow); }
.card + .card{ margin-top:16px; }
.cols{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; align-items:start; }
.cols > .card + .card,.cols > * + *{ margin-top:0; }
.card-narrow{ max-width:420px; margin-left:auto; margin-right:auto; }
.card-f{ border-left:4px solid var(--f); }
.card > h1:first-child,.card > h2:first-child{ margin-top:0; }
.card-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 12px; }
/* 17.11 (скорость): свёрнутое <details> новые браузеры (Chrome 131+) держат «невидимым, но посчитанным» — стили считаются для всего скрытого.
   «Разовая помощь» с 5 500 элементами закрытых дел открывалась на среднем телефоне 750 мс; с явным display:none (как было в браузерах всегда) — 180.
   Раскрыли — правило перестаёт действовать, содержимое считается как обычно. */
@media (max-width:900px), (hover:none){ details:not([open]) > :not(summary){ display:none !important; } }
/* 17.11: раскрыли нажатием — содержимое проявляется, а не возникает рывком (класс ставит app.js на время раскрытия). Только прозрачность:
   сдвиг оторвал бы приклеенные панели внутри. */
details.is-opening[open] > :not(summary){ animation:det-in .18s ease-out; }
@keyframes det-in{ from{ opacity:0; } }
@media (prefers-reduced-motion:reduce){ details.is-opening[open] > :not(summary){ animation:none; } }
.card-head h1,.card-head h2{ margin:0; }
.h-f{ color:var(--f); }
.page-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 16px; }
.page-head h1{ margin:0; }
.page-head .row-actions{ margin:0; }

/* ── Кнопки: одно главное действие на экран ── */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:6px 14px; border:1px solid var(--line);
  border-radius:999px; background:var(--card); color:var(--ink); font:600 14px/20px var(--ui); text-decoration:none; cursor:pointer; white-space:nowrap; }
.btn:hover{ background:var(--sel); }
.btn:active{ transform:scale(.97); filter:brightness(.96); }   /* 17.11: «нажато» видно сразу (раньше — сдвиг на 1 px, на телефоне незаметно) */
.btn-main{ background:var(--primary); border-color:var(--primary); color:var(--on-primary); box-shadow:var(--shadow-btn); }   /* главное действие — индиго */
.btn-main:hover{ background:var(--primary-hover); border-color:var(--primary-hover); }
.btn-bad{ border-color:var(--bad); color:var(--bad); }
.btn-bad:hover{ background:var(--bad-soft); }
.btn-bad.btn-main{ background:var(--bad); color:var(--card); }
.btn-ghost{ border-color:transparent; background:transparent; color:var(--mute); font-weight:400; }
.btn-ghost:hover{ color:var(--ink); }
.btn-small{ min-height:28px; padding:2px 10px; font-size:13px; }
.btn-wide{ width:100%; min-height:42px; }
.btn[disabled],.btn.is-off{ opacity:.5; cursor:not-allowed; pointer-events:none; }
.btn.is-busy{ opacity:.7; pointer-events:none; }
/* 17.11: отправили форму — кнопка сразу показывает «занято»: кружок на месте подписи, размер кнопки не меняется (.is-busy ставит frag.js
   кнопкам data-frag-once, .is-sent — app.js любой кнопке отправки, пока не пришёл ответ) */
.btn.is-busy,.btn.is-sent{ position:relative; color:transparent !important; }
.btn.is-busy > *,.btn.is-sent > *{ visibility:hidden; }
.btn.is-busy::after,.btn.is-sent::after{ content:""; position:absolute; top:50%; left:50%; width:16px; height:16px; margin:-8px 0 0 -8px; border:2px solid var(--mute); border-right-color:transparent;
  border-radius:50%; animation:spin .7s linear infinite; }
.btn-main.is-busy::after,.btn-main.is-sent::after{ border-color:var(--on-primary); border-right-color:transparent; }
.btn-bad.is-busy::after,.btn-bad.is-sent::after{ border-color:var(--bad); border-right-color:transparent; }
.btn-bad.btn-main.is-busy::after,.btn-bad.btn-main.is-sent::after{ border-color:var(--card); border-right-color:transparent; }
@media (prefers-reduced-motion:reduce){ .btn.is-busy::after,.btn.is-sent::after{ animation-duration:1.6s; } }
.btn-link{ border:0; background:none; padding:0; color:var(--acc); text-decoration:underline; cursor:pointer; font:inherit; }
.row-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:16px 0 8px; }

/* ── Поля ── */
.field{ margin:0 0 16px; }
.field > label,.field > .label{ display:block; margin:0 0 4px; font-weight:600; }
fieldset.field{ border:0; padding:0; min-width:0; }
.field > label.check{ font-weight:400; margin:0 0 8px; display:flex; }
fieldset.field > .label{ padding:0; margin-bottom:8px; }
.field .opt{ color:var(--mute); font-weight:400; font-size:12px; }
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{ width:100%; min-height:42px; padding:8px 12px; border:1px solid var(--line-strong);
  border-radius:var(--radius); background:var(--card); color:var(--ink); font:400 16px/24px var(--ui); }
.field textarea{ min-height:96px; resize:vertical; }
.field input::placeholder,.field textarea::placeholder{ color:var(--mute); opacity:.8; }
.field.has-error input,.field.has-error select,.field.has-error textarea{ border-color:var(--bad); }
.field-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:0 16px; }
.check{ display:flex; align-items:flex-start; gap:8px; margin:0 0 8px; cursor:pointer; }
.check input{ width:18px; height:18px; margin:1px 0 0; accent-color:var(--acc); flex:none; }
.hint{ margin:4px 0 0; color:var(--mute); font-size:12px; line-height:16px; }
.error{ margin:4px 0 0; color:var(--bad); }
.warn-text{ margin:4px 0 0; color:var(--warn); }
.echo{ margin:4px 0 0; font-size:12px; line-height:16px; color:var(--acc); min-height:16px; }

/* ── Плашки и сообщения об ошибках ── */
.banner{ padding:10px 12px; border-radius:var(--radius); margin:0 0 16px; border:1px solid var(--line); background:var(--card); }
.banner-ok{ background:var(--ok-soft); border-color:var(--ok); }
.banner-warn{ background:var(--warn-soft); border-color:var(--warn); }
.banner-bad{ background:var(--bad-soft); border-color:var(--bad); color:var(--bad); }
.banner-info{ background:var(--bot-soft); border-color:var(--bot); }
.banner a{ color:inherit; font-weight:600; }
.banner p:last-child{ margin:0; }

/* ── Вкладки разделов со счётчиками ── */
.tabs{ display:flex; gap:2px; overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
.tabs::-webkit-scrollbar{ height:4px; } .tabs::-webkit-scrollbar-thumb{ background:var(--line-strong); border-radius:2px; }
.tab{ display:flex; align-items:baseline; gap:7px; padding:8px 12px 9px; color:var(--mute); font-weight:500; font-size:15px; line-height:20px; white-space:nowrap;
  border-bottom:3px solid transparent; text-decoration:none; border-radius:6px 6px 0 0; outline-offset:-2px; }
.tab:hover{ color:var(--ink); background:var(--bg); }
.tab.is-on{ color:var(--ink); font-weight:700; border-bottom-color:var(--acc); }
.count{ font:600 12px/18px var(--ui); color:var(--mute); background:var(--bg); border-radius:999px; padding:0 7px; font-variant-numeric:tabular-nums; }
.tab.is-on .count{ background:var(--acc); color:var(--card); }
.count-warn{ background:var(--warn-soft); color:var(--warn); }
.tab.is-on .count-warn{ background:var(--warn); color:var(--card); }
.count-bad{ background:var(--bad-soft); color:var(--bad); }
/* «Ещё ▾»: вкладки сверх полосы — по группам, раскрывается без скрипта (<details>); активная вкладка внутри подсвечивает саму кнопку.
   Стоит рядом с прокручиваемой полосой, а не в ней: выпадающий список не режется overflow полосы */
.tabs-row:has(.tabs-more){ display:flex; align-items:stretch; }
.tabs-row:has(.tabs-more) > .tabs{ flex:1 1 auto; min-width:0; }
.tabs-more{ position:relative; flex:none; }
.tabs-more > summary{ list-style:none; cursor:pointer; height:100%; box-sizing:border-box; }
.tabs-more > summary::-webkit-details-marker{ display:none; }
.tabs-more > summary::after{ content:"▾"; font-size:11px; color:var(--mute); margin-left:2px; }
.tabs-more[open] > summary{ color:var(--ink); background:var(--card); }
.tabs-more-box{ position:absolute; right:0; top:100%; z-index:30; display:grid; grid-template-columns:repeat(4, minmax(150px, max-content)); gap:6px 18px; padding:10px 12px 12px;
  background:var(--card); border:1px solid var(--line-strong); border-radius:var(--radius); box-shadow:0 8px 24px rgba(0,0,0,.12); }
.tabs-group{ min-width:0; }
.tabs-more-box.is-single{ left:0; right:auto; grid-template-columns:minmax(200px, max-content); }   /* 10.10: одна группа (сотрудник) — узким списком под «Ещё», не за левым краем */
.tabs-group .menu-cap{ padding:2px 8px 4px; margin:0; color:var(--mute); font-size:12px; line-height:16px; }
.tabs-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:32px; padding:4px 8px; border-radius:6px; color:var(--ink); text-decoration:none; font-size:14px; white-space:nowrap; }
.tabs-item:hover{ background:var(--sel); }
.tabs-item.is-on{ font-weight:700; color:var(--acc); }
@media (max-width:1100px){ .tabs-more-box{ grid-template-columns:repeat(2, minmax(150px, max-content)); } }

/* ── Второй фактор, черновики, 409 по полям ── */
.totp-setup{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:16px 28px; margin:12px 0 4px; }
.totp-setup .qr{ flex:none; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.totp-key{ font-size:18px; letter-spacing:.06em; margin:2px 0 8px; user-select:all; }
.recovery-codes{ columns:2; column-gap:32px; font-size:17px; line-height:32px; margin:8px 0 12px; padding-left:24px; }
.conflict-table{ margin:8px 0 12px; } .conflict-table td:nth-child(3){ font-weight:600; }
.draft-banner{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
@media (max-width:600px){ .tabs-more{ position:static; } .tabs-more-box{ left:4px; right:4px; grid-template-columns:1fr; max-height:70vh; overflow:auto; } }

/* ── Фильтры-кнопки со счётчиками ── */
.filters{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 12px; }
.filters-label{ color:var(--mute); font-size:12px; margin-right:2px; }
.chip{ display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 12px; border:1px solid var(--line); border-radius:999px; background:var(--card);
  color:var(--ink); font:500 14px/20px var(--ui); text-decoration:none; cursor:pointer; white-space:nowrap; }
.chip:hover{ border-color:var(--line-strong); }
.chip.is-on{ background:var(--primary); border-color:var(--primary); color:var(--on-primary); font-weight:600; }   /* выбранное — индиго */
.chip.is-on .count{ background:rgba(255,255,255,.18); color:var(--on-primary); }
.chip.is-empty{ opacity:.55; }
.filters-search{ flex:1 1 200px; max-width:320px; height:34px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:var(--card); font-size:14px; }
.filters-search:focus{ outline:none; border-color:var(--acc); box-shadow:0 0 0 3px var(--acc-soft); }

/* ── Пилюли состояния и метки списков ── */
.pill{ display:inline-block; padding:0 8px; border-radius:10px; font-size:12px; line-height:20px; background:var(--line); color:var(--mute); white-space:nowrap; }
.pill-ok{ background:var(--ok-soft); color:var(--ok); } .pill-warn{ background:var(--warn-soft); color:var(--warn); }
.pill-bad{ background:var(--bad-soft); color:var(--bad); } .pill-info{ background:var(--bot-soft); color:var(--bot); }
.pill-out{ background:var(--out-bg); color:var(--out-ink); } .pill-line{ background:none; border:1px dashed var(--line-strong); line-height:18px; }
.f-pill{ display:inline-block; padding:0 8px; border-radius:6px; font:700 12px/20px var(--ui); letter-spacing:.01em; background:var(--f-soft); color:var(--f); white-space:nowrap; }

/* ── Таблица ── */
.table-wrap{ border:1px solid var(--line); border-radius:10px; background:var(--card); overflow:hidden; }
.table{ width:100%; border-collapse:collapse; }
.table th{ text-align:left; font:600 12px/16px var(--ui); color:var(--mute); padding:10px 10px; border-bottom:1px solid var(--line); background:var(--sel); white-space:nowrap; }
.table th a{ color:inherit; text-decoration:none; } .table th a:hover{ color:var(--ink); }
.table th[aria-sort=ascending] a::after{ content:" ▲"; font-size:8px; } .table th[aria-sort=descending] a::after{ content:" ▼"; font-size:8px; }
.table th[aria-sort] a{ color:var(--ink); }
.table td{ height:var(--rowh); padding:6px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
.table tbody tr:last-child td{ border-bottom:0; }
.table tbody tr:hover{ background:var(--sel); }
.table th:first-child,.table td:first-child{ padding-left:14px; } .table th:last-child,.table td:last-child{ padding-right:14px; }
.table tr.row-f td:first-child{ box-shadow:inset 4px 0 0 var(--f); }
.table tr.is-sel{ background:var(--sel); } .table tr.is-sel td:first-child{ box-shadow:inset 4px 0 0 var(--acc); }
.table tr.is-out td{ color:var(--mute); }
.table tr.is-unsent td{ color:var(--mute); }
.table .th-r,.table .td-r{ text-align:right; }
.cell-actions{ text-align:right; white-space:nowrap; }
.cell-main{ font-weight:600; font-size:15px; } .cell-main a{ color:inherit; text-decoration:none; } .cell-main a:hover{ text-decoration:underline; }
.cell-sub{ display:block; color:var(--mute); font-size:12px; line-height:16px; font-weight:400; }
.tail{ color:var(--mute); font-weight:400; }
.table-foot{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 14px; border-top:1px solid var(--line); color:var(--mute); font-size:12px; }

/* ── Плитки и строки-факты ── */
.tiles{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; margin:0 0 16px; }
.tile{ display:block; padding:12px 14px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); color:var(--ink); text-decoration:none; border-left:4px solid var(--f-soft); }
a.tile:hover{ border-color:var(--line-strong); border-left-color:var(--f); }
.tile-num{ font:700 26px/30px var(--ui); font-variant-numeric:tabular-nums; white-space:nowrap; }
.tile-num .tile-unit{ margin:0 2px; }
.tile-unit{ font:400 12px/16px var(--ui); color:var(--mute); margin-left:4px; }
.tile-cap{ display:block; margin-top:2px; color:var(--mute); font-size:12px; line-height:16px; }
.tile.is-warn{ border-left-color:var(--warn); } .tile.is-warn .tile-num{ color:var(--warn); }
.tile.is-bad{ border-left-color:var(--bad); } .tile.is-bad .tile-num{ color:var(--bad); }
.fact{ display:flex; align-items:baseline; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); }
.fact:last-child{ border-bottom:0; }
.fact-k{ color:var(--mute); flex:0 0 38%; max-width:220px; } .fact-v{ font-weight:600; min-width:0; }
.places{ display:inline-flex; align-items:center; gap:6px; color:var(--mute); font-size:13px; }
.places b{ color:var(--ink); } .places.is-full b{ color:var(--warn); }

/* ── Индикатор прогресса: без процентов, только «N из M» ── */
.progress{ display:flex; align-items:center; gap:10px; margin:0 0 12px; }
.progress progress{ flex:1 1 auto; min-width:80px; height:8px; appearance:none; -webkit-appearance:none; border:0; border-radius:999px; background:var(--line); overflow:hidden; }
.progress progress::-webkit-progress-bar{ background:var(--line); border-radius:999px; }
.progress progress::-webkit-progress-value{ background:var(--acc); border-radius:999px; }
.progress progress::-moz-progress-bar{ background:var(--acc); border-radius:999px; }
.progress.is-mute progress::-webkit-progress-value{ background:var(--line-strong); } .progress.is-mute progress::-moz-progress-bar{ background:var(--line-strong); }
.progress-text{ flex:none; white-space:nowrap; font-size:13px; } .progress-text b{ font-weight:600; }
.spinner{ display:inline-block; width:14px; height:14px; border:2px solid var(--line-strong); border-top-color:var(--acc); border-radius:50%; animation:spin .9s linear infinite; vertical-align:-2px; }
/* свежие данные в приложении «Офис» (28.09): «потянуть вниз — обновить», плашка «Есть новое» (↻ в шапке — header.css) */
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .spinner{ animation-duration:3s; } }

/* ── Пустое состояние ── */
.empty{ padding:20px 16px; border:1px dashed var(--line-strong); border-radius:var(--radius); color:var(--mute); text-align:center; }
.empty p{ margin:0; } .empty .empty-title{ color:var(--ink); font-weight:600; margin-bottom:4px; } .empty .row-actions{ justify-content:center; margin:12px 0 0; }

/* ── Подтверждение (только для необратимого) ── */
.confirm{ max-width:520px; border:1px solid var(--warn); border-left-width:4px; border-radius:var(--radius); background:var(--card); padding:16px var(--pad); }
.confirm.is-bad{ border-color:var(--bad); }
.confirm h2{ margin:0 0 8px; } .confirm .row-actions{ margin-bottom:0; }

/* ── Строка «Решений» ── */
.queue-row{ display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:12px; margin:0 0 8px;
  border:1px solid var(--line); border-left:4px solid var(--warn); border-radius:var(--radius); background:var(--card); }
.queue-row.is-bad{ border-left-color:var(--bad); } .queue-row.is-info{ border-left-color:var(--bot); }
.queue-what{ flex:1 1 420px; min-width:0; } .queue-what p{ margin:4px 0 0; }
.queue-actions{ display:flex; gap:8px; flex-wrap:wrap; margin:0; }
.code{ font-weight:600; letter-spacing:.04em; white-space:nowrap; }
.code-big{ font:600 40px/48px var(--mono); letter-spacing:.08em; margin:8px 0 16px; font-variant-numeric:tabular-nums; }

/* ── Было → станет ── */
.diff-old{ color:var(--mute); text-decoration:line-through; text-decoration-thickness:1px; } .diff-new{ font-weight:600; background:var(--mark); border-radius:2px; padding:0 2px; }

/* ── Номер телефона ── */
.phone-num{ display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }
.phone-num .num{ font-weight:600; letter-spacing:.01em; white-space:nowrap; }   /* маска номера не рвётся посередине */
.phone-num{ white-space:nowrap; } .table td.money,.table td .money,.money{ white-space:nowrap; font-variant-numeric:tabular-nums; } .phone-num.is-masked .num{ font-weight:400; color:var(--mute); }
.phone-actions{ display:inline-flex; gap:6px; flex-wrap:wrap; }

/* ── Боковая карточка ── */
.panel{ background:var(--card); border:1px solid var(--line); border-top:4px solid var(--f); border-radius:10px; box-shadow:0 6px 24px rgba(0,0,0,.06); }
.panel-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:12px 16px 8px; border-bottom:1px solid var(--line); }
.panel-head h2{ margin:0; font:700 18px/24px var(--ui); } .panel-sub{ margin:2px 0 0; color:var(--mute); font-size:12px; line-height:16px; }
.panel-close{ flex:none; width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; color:var(--mute); text-decoration:none; font-size:20px; line-height:1; }
.panel-close:hover{ background:var(--sel); color:var(--ink); }
.panel-sec{ padding:8px 16px 12px; border-bottom:1px solid var(--line); } .panel-sec:last-child{ border-bottom:0; }
.panel-sec h3{ margin:4px 0; font:600 12px/16px var(--ui); color:var(--mute); }

/* ── Страницы, месяц, мастер ── */
.pager{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:12px 0 0; }
.pager a,.pager span{ min-width:32px; height:32px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; text-decoration:none; color:var(--ink); border:1px solid transparent; }
.pager a:hover{ border-color:var(--line-strong); } .pager .is-on{ background:var(--ink); color:var(--bg); font-weight:600; } .pager .gap{ color:var(--mute); }
.month{ display:inline-flex; align-items:center; gap:2px; height:34px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); white-space:nowrap; }
.month a{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:100%; color:var(--mute); text-decoration:none; } .month a:hover{ color:var(--ink); background:var(--sel); }
.month b{ padding:0 6px; font-weight:600; } .month .month-now{ width:auto; padding:0 10px; border-left:1px solid var(--line); font-size:12px; }
.steps{ display:flex; gap:4px; list-style:none; margin:0 0 20px; padding:0; counter-reset:step; }
.steps li{ flex:1 1 0; min-width:0; padding:8px 0 0; border-top:3px solid var(--line); color:var(--mute); font-size:12px; line-height:16px; counter-increment:step; }
.steps li::before{ content:counter(step) ". "; }
.steps li.is-done{ border-top-color:var(--ok); color:var(--ok); } .steps li.is-done::before{ content:"✓ "; }
.steps li.is-now{ border-top-color:var(--ink); color:var(--ink); font-weight:600; }
.todo{ list-style:none; margin:0; padding:0; }
.todo > li{ display:flex; gap:12px; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--line); } .todo > li:last-child{ border-bottom:0; }
.todo-mark{ flex:none; width:26px; height:26px; border-radius:50%; border:2px solid var(--line-strong); display:inline-flex; align-items:center; justify-content:center; font:600 13px/1 var(--ui); color:var(--mute); }
.is-done > .todo-mark{ background:var(--ok); border-color:var(--ok); color:var(--card); } .is-later > .todo-mark{ border-style:dashed; }
.todo-body{ flex:1 1 auto; min-width:0; } .todo-body h2{ margin:2px 0 4px; } .todo-body p{ margin:0 0 8px; } .todo-body .row-actions{ margin:8px 0 0; }
.todo-body form{ margin-top:8px; max-width:420px; }

/* ── Тост, «Не отправлено», «Не получается» ── */
.toast{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:40; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 24px);
  background:var(--out-bg); color:var(--out-ink); padding:10px 16px; border-radius:var(--radius); }
.toast form{ margin:0; } .toast button,.toast a{ border:0; background:none; color:inherit; font-weight:600; text-decoration:underline; cursor:pointer; padding:0; }
.toast-static{ position:static; transform:none; display:inline-flex; }
.toast{ animation:toast-in .22s cubic-bezier(.2,.8,.2,1); }             /* 17.11: сообщение всплывает, а не возникает рывком (каждый показ: hidden → виден) */
.toast-static{ animation:none; }
@keyframes toast-in{ from{ opacity:0; translate:0 12px; } }
@media (prefers-reduced-motion:reduce){ .toast{ animation:none; } }
.offline-bar{ padding:8px var(--pad); background:var(--out-bg); color:var(--out-ink); text-align:center; font-weight:600; }
.stuck{ color:var(--mute); }

/* ── Витрина /_ui ── */
.ui-sec{ scroll-margin-top:130px; } .ui-sec > h2{ margin-top:32px; padding-bottom:4px; border-bottom:1px solid var(--line-strong); }
.ui-how{ margin:8px 0 0; padding:8px 10px; background:var(--bg); border:1px solid var(--line); border-radius:6px; font:400 12px/18px var(--mono); white-space:pre-wrap; color:var(--mute); }
.ui-swatches{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
.ui-swatch{ border:1px solid var(--line-strong); border-radius:var(--radius); padding:8px 10px; background:var(--card); border-left:12px solid var(--f); }
.ui-toc{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.sw-bg{ border-left-color:var(--bg); } .sw-card{ border-left-color:var(--card); } .sw-ink{ border-left-color:var(--ink); } .sw-mute{ border-left-color:var(--mute); }
.sw-line{ border-left-color:var(--line); } .sw-line-strong{ border-left-color:var(--line-strong); } .sw-acc{ border-left-color:var(--acc); } .sw-primary{ border-left-color:var(--primary); } .sw-ok{ border-left-color:var(--ok); } .sw-warn{ border-left-color:var(--warn); }
.sw-bad{ border-left-color:var(--bad); } .sw-bot{ border-left-color:var(--bot); } .sw-mark{ border-left-color:var(--mark); } .sw-sel{ border-left-color:var(--sel); }

/* 17.11 (компьютер): планшет лёжа и ноутбук с сенсорным экраном — ПК-раскладка под палец. Цели нажатия не мельче ~36 px, вид тот же;
   поле поиска по списку 16 px — планшет не приближает экран при вводе. Мышь это не затрагивает. */
@media (min-width:901px) and (hover:none) and (pointer:coarse){
  .btn{ min-height:40px; } .btn-small{ min-height:36px; font-size:14px; }
  .chip{ min-height:36px; } .filters-search{ font-size:16px; }
  button.clamp-more{ padding:9px 0; margin:-7px 0 1px; }
}
.sheet:focus{ outline:none; }   /* 17.11: окно берёт фокус клавиатуры (app.js sheetFocus) — без рамки вокруг всего окна */
@media (max-width:900px){
  .btn{ min-height:44px; font-size:16px; } .btn-small{ min-height:36px; font-size:14px; }
  .chip{ min-height:36px; font-size:14px; } .filters-search{ height:36px; font-size:16px; max-width:none; flex-basis:100%; }
  .queue-actions .btn{ flex:1 1 40%; }
  .table-wrap{ border:0; background:none; border-radius:0; overflow:visible; }
  .table thead{ display:none; }
  .table tr{ display:block; padding:12px 14px; margin:0 0 8px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
  .table tr.row-f{ border-left:4px solid var(--f); } .table tr.is-sel{ border-left:4px solid var(--acc); }
  .table tr.row-f td:first-child,.table tr.is-sel td:first-child{ box-shadow:none; }
  .table td,.table td:first-child,.table td:last-child{ display:block; height:auto; border:0; padding:2px 0; }
  /* 17.11: строка-карточка не шире экрана. Ячейка «без переноса» растягивала всю таблицу (Главная на 320–399 px была шире экрана —
     страница ездила вбок, нижняя панель уезжала); номера и суммы не рвутся сами (.phone-num, .money) */
  .table td.nowrap{ white-space:normal; }
  .table td[data-th]:not(:empty)::before{ content:attr(data-th) ": "; color:var(--mute); font-size:12px; }
  .table .td-r,.cell-actions{ text-align:left; } .cell-actions{ padding-top:8px !important; white-space:normal; }
  .table-foot{ padding:8px 0; border:0; }
  .fact{ flex-direction:column; gap:0; } .fact-k{ flex:none; max-width:none; font-size:12px; }
  .steps li{ font-size:0; } .steps li.is-now{ font-size:12px; flex:4 1 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .code-big{ font-size:34px; }
  .toast{ left:12px; right:12px; bottom:12px; transform:none; max-width:none; justify-content:space-between; }
}


/* проверка выдачи (27.09): сумма крупно, «Нет» — красной рамкой */
.sheet .field input.check-amount{ width:100%; height:auto; min-height:56px; font-size:28px; font-weight:600; padding:10px 44px 10px 14px; font-variant-numeric:tabular-nums; }
.sheet .field{ position:relative; }
.check-rub{ position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:22px; color:var(--mute); pointer-events:none; }
.check-choice .check-no{ border-color:var(--bad); color:var(--bad); }
.cell-sub.is-warn{ color:var(--warn); font-weight:600; }
.cell-sub.is-bad{ color:var(--bad); font-weight:600; }
.cell-sub.is-warn,.cell-sub.is-bad,.cell-sub.is-plain{ display:block; white-space:nowrap; margin-top:4px; font-size:13px; }
.cell-pills{ display:inline-flex; flex-wrap:wrap; gap:4px 6px; }
/* Telegram — фирменный синий (28.09: владелец попросил отметить синим, чтобы не путать с WhatsApp) */
.btn.btn-tg{ background:#0b6fa0; border-color:#0b6fa0; color:#fff; }
.btn.btn-tg:hover{ background:#095c85; border-color:#095c85; color:#fff; }
/* окно проверки выдачи (28.09): что передано и кодовое слово — две плашки сверху, кнопки связи под ними */
.sheet .check-what{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.sheet .check-what > div{ flex:1 1 120px; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.sheet .check-what span{ display:block; margin:0 0 4px; font-size:12px; color:var(--mute); }
.sheet .check-what b{ display:block; font-size:18px; line-height:24px; }
.sheet .check-what b.f-pill{ display:inline-block; font-size:16px; line-height:22px; padding:1px 10px; }
.sheet .check-links{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.sheet .check-links .btn{ flex:1 1 auto; }
.sheet .sheet-call-sum.is-bad b{ color:var(--bad); }
/* уведомления (28.09): заметная карточка сверху — «Поставьте «Офис» на экран» / «Включите уведомления» (владелец: «на видимом месте») */
.push-bar{ position:relative; display:flex; align-items:flex-start; gap:12px; margin:0 0 14px; padding:14px 44px 14px 14px; border:0; border-radius:14px; background:var(--pastel-3); }
/* 17.11: первое появление (.is-new, push.js) — плавно раздвигает страницу, а не толкает рывком; на следующих страницах плашка уже стоит на месте */
.push-bar.is-new{ overflow:hidden; animation:push-bar-in .3s ease-out; }
@keyframes push-bar-in{ from{ max-height:0; padding-top:0; padding-bottom:0; margin-bottom:0; opacity:0; } to{ max-height:260px; } }
@media (prefers-reduced-motion:reduce){ .push-bar.is-new{ animation:none; } }
.push-bar-ico{ flex:0 0 auto; width:36px; height:36px; border-radius:10px; background:var(--acc); position:relative; }
.push-bar-ico::after{ content:""; position:absolute; inset:8px; background:#fff; -webkit-mask:url("/assets/icons/bell.svg") center/contain no-repeat; mask:url("/assets/icons/bell.svg") center/contain no-repeat; }
.push-bar-main{ flex:1 1 auto; min-width:0; }
.push-bar-title{ margin:0 0 4px; font-size:16px; font-weight:700; line-height:22px; }
.push-bar-text{ margin:0; font-size:14px; line-height:20px; }
.push-bar-steps{ margin:8px 0 0; padding-left:20px; font-size:14px; line-height:21px; }
.push-bar-steps li{ margin:2px 0; }
.push-bar-go{ margin-top:10px; min-height:44px; padding:0 18px; font-size:15px; }
.push-bar-x{ position:absolute; top:2px; right:2px; width:44px; height:44px; border:0; border-radius:50%; background:none; color:var(--mute); font-size:22px; line-height:1; cursor:pointer; }
.push-bar-x:hover{ background:var(--card); }
@media (max-width:900px){ .push-bar-go{ width:100%; } }
.push-team .pill{ white-space:nowrap; }
@keyframes spin{ to{ transform:rotate(360deg); } }
/* «потянуть вниз — обновить» (17.11): круглый значок едет за пальцем и проворачивается; дотянули — загорается; отпустили — крутится */
.pull-refresh{ position:fixed; top:calc(env(safe-area-inset-top, 0px) + 6px); left:50%; z-index:60; display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; margin-left:-19px; margin-top:-46px; border-radius:50%; background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow-pop);
  color:var(--mute); opacity:0; pointer-events:none; transition:opacity .15s ease, color .12s ease, border-color .12s ease; }
.pull-refresh::before{ content:""; width:18px; height:18px; background:currentColor; transform:rotate(var(--pull-r, 0deg));
  -webkit-mask:url("/assets/icons/refresh.svg") center/contain no-repeat; mask:url("/assets/icons/refresh.svg") center/contain no-repeat; }
.pull-refresh.is-on{ opacity:1; }
.pull-refresh.is-ready{ color:var(--acc); border-color:var(--acc); }
.pull-refresh.is-busy{ transition:transform .18s ease, opacity .15s ease; }
.pull-refresh.is-busy::before{ animation:spin .7s linear infinite; }
html.ptr,html.ptr body{ overscroll-behavior-y:contain; }
.fresh-bar{ position:fixed; left:50%; bottom:calc(env(safe-area-inset-bottom, 0px) + 16px); z-index:60; transform:translateX(-50%); max-width:calc(100% - 32px); padding:12px 18px;
  border:0; border-radius:999px; background:var(--primary); color:var(--on-primary); font:inherit; font-size:15px; font-weight:600; white-space:nowrap; box-shadow:0 6px 18px rgba(0,0,0,.18); cursor:pointer; }
/* 04.10 (Имам: «обновить стоит на кнопке Сохранить»): пока открыто окно — плашку не показываем, обновление посреди правки сотрёт введённое; закрыл — снова видна */
body.has-sheet .fresh-bar{ display:none; }
/* проверка выдачи (28.09): «Не поднял трубку» / «Просил перезвонить» — отметка для себя одним нажатием */
.sheet .check-try-title{ margin:14px 0 6px; font-size:14px; color:var(--mute); font-weight:600; }
.sheet .check-try{ display:flex; gap:8px; }
.sheet .check-try .btn{ flex:1 1 auto; min-width:0; min-height:46px; white-space:normal; }
/* «✓ Обновлено · 18:42» — видно, что страница свежая (28.09) */
.refresh-done{ position:fixed; top:calc(env(safe-area-inset-top, 0px) + 10px); left:50%; z-index:70; transform:translateX(-50%); padding:9px 16px; border-radius:999px;
  background:var(--out-bg); color:var(--out-ink); font-size:14px; font-weight:700; white-space:nowrap; box-shadow:0 6px 18px rgba(0,0,0,.18); animation:refresh-in .25s ease-out; transition:opacity .4s, transform .4s; }
.refresh-done.is-gone{ opacity:0; transform:translate(-50%, -12px); }
@keyframes refresh-in{ from{ opacity:0; transform:translate(-50%, -12px); } to{ opacity:1; transform:translateX(-50%); } }
/* «Обновляем сайт» / «Идут работы» (29.09): полоска хода и таймер */
.wait-box{ margin:14px 0 4px; }
.wait-bar{ position:relative; height:8px; border-radius:999px; background:var(--line); overflow:hidden; }
.wait-bar span{ display:block; height:100%; width:4%; border-radius:999px; background:var(--acc); transition:width .9s linear; }
.wait-bar.is-endless span{ width:35%; animation:wait-slide 1.4s ease-in-out infinite; }
@keyframes wait-slide{ 0%{ transform:translateX(-100%); } 100%{ transform:translateX(300%); } }
.wait-time{ margin:10px 0 4px; font-size:17px; font-weight:700; font-variant-numeric:tabular-nums; }
/* резерв (29.09): в окне «Убрать» — кого поставить вместо; подсказка над списком резерва */
.sheet .stop-res{ display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 2px; max-height:180px; overflow:auto; }
.sheet .stop-res button.chip{ background:var(--card); color:var(--ink); }
.sheet .stop-res button.chip.is-on,.sheet .stop-res button.chip.is-on:hover{ background:var(--acc-soft); border:2px solid var(--acc); color:var(--acc); font-weight:700; }
.sheet .stop-res button.chip.is-on::before{ content:"✓ "; }
.sheet .stop-res-title{ margin-top:12px; }
.sheet .stop-res .stop-res-ok{ color:var(--ok); font-weight:700; }   /* 31.10: проверена звонком связной */
.people-reserve-tip{ margin:0 0 10px; }

/* «×»: куда убрать — в архив или в резерв (29.09) */
.sheet .stop-where{ display:flex; gap:8px; margin:4px 0 12px; }
.sheet .stop-where .chip{ flex:1 1 0; justify-content:center; min-height:44px; font-weight:600; background:var(--card); color:var(--ink); }
.sheet .stop-where .chip.is-on{ background:var(--acc-soft); border:2px solid var(--acc); color:var(--acc); }
/* полоса в ячейке таблицы (29.09, «Главная»: выдано / проверено по списку) */
.cell-bar{ display:block; width:100%; min-width:120px; height:7px; margin:5px 0 3px; border-radius:999px; background:var(--line); overflow:hidden; }
.cell-bar .is-ok{ fill:var(--ok); } .cell-bar .is-acc-soft{ fill:var(--ok); fill-opacity:.4; } .cell-bar .is-warn{ fill:var(--warn-fill); }
.cell-bar .is-bad{ fill:var(--bad); } .cell-bar .is-mute{ fill:var(--line-strong); }
/* «Никак не выходит на связь» (29.09) — отдельный итог проверки, не «не сходится» */
.sheet .check-try{ flex-wrap:wrap; }
.sheet .check-try .check-lost{ border-color:var(--bot); color:var(--bot); }
/* «×»: «Убрать в резерв» — жёлтая над красной «Убрать в архив» (29.09, владелец) */
.sheet .btn-reserve{ background:var(--card); border-color:var(--warn); color:var(--warn); font-weight:700; }
.sheet .btn-reserve:hover{ background:var(--warn-soft); border-color:var(--warn); }
/* цветные метки адресов (30.09): точка цвета, выбор в окне (окно — вне модуля, поэтому здесь) */
.mark-c-yellow{ --mk:var(--mk-yellow); --mk-soft:var(--mk-yellow-soft); }
.mark-c-orange{ --mk:var(--mk-orange); --mk-soft:var(--mk-orange-soft); }
.mark-c-red{ --mk:var(--mk-red); --mk-soft:var(--mk-red-soft); }
.mark-c-pink{ --mk:var(--mk-pink); --mk-soft:var(--mk-pink-soft); }
.mark-c-purple{ --mk:var(--mk-purple); --mk-soft:var(--mk-purple-soft); }
.mark-c-blue{ --mk:var(--mk-blue); --mk-soft:var(--mk-blue-soft); }
.mark-c-teal{ --mk:var(--mk-teal); --mk-soft:var(--mk-teal-soft); }
.mark-c-green{ --mk:var(--mk-green); --mk-soft:var(--mk-green-soft); }
.mark-c-brown{ --mk:var(--mk-brown); --mk-soft:var(--mk-brown-soft); }
.mark-c-black{ --mk:var(--mk-black); --mk-soft:var(--mk-black-soft); }
.mark-dot{ display:inline-block; flex:none; width:14px; height:14px; border-radius:50%; background:var(--mk, transparent); box-shadow:inset 0 0 0 1px rgba(0,0,0,.15); }
/* 26.10 (идеи №16–18): окно «Где живёт» — город и район или село (people, app.js placeSheet) */
.sheet-place .place-kind{ display:flex; margin:10px 0 12px; }
.sheet-place .place-kind{ padding:3px; border-radius:12px; background:var(--bg); border:1px solid var(--line); }
.sheet-place .place-kind .seg-item{ flex:1 1 0; min-height:40px; border:0; border-radius:9px; background:none; color:var(--mute); font:inherit; font-weight:600; cursor:pointer; }
.sheet-place .place-kind .seg-item.is-on{ background:var(--card); color:var(--acc); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.sheet-place .place-city{ display:flex; align-items:center; gap:8px; margin:0 0 8px; }
.sheet-place .place-city select{ min-height:38px; padding:0 10px; border:1px solid var(--line); border-radius:10px; background:var(--card); font:inherit; }
.sheet-place .place-pick{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; max-height:46vh; overflow-y:auto; }
.sheet-place .place-opt{ min-height:42px; padding:0 14px; border:1px solid var(--line-strong); border-radius:12px; background:var(--card); color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
.sheet-place .place-opt.is-on{ border-color:var(--acc); background:var(--acc-soft); color:var(--acc); }
.sheet-place .place-opt-none{ border-style:dashed; color:var(--mute); font-weight:500; }
.sheet-place .place-new{ display:flex; gap:8px; }
.sheet-place .place-new input, .sheet-place .place-q{ flex:1 1 auto; min-height:42px; padding:0 12px; border:1px solid var(--line); border-radius:12px; font:inherit; width:100%; box-sizing:border-box; }
.sheet-place .place-new .btn{ width:auto; }
.mark-pick{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0 4px; }
.mark-opt{ display:flex; align-items:center; gap:10px; min-height:52px; padding:0 14px; border:2px solid var(--line); border-radius:12px; background:var(--mk-soft, var(--card)); color:var(--ink);
  font:inherit; font-size:16px; font-weight:600; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.mark-opt .mark-dot{ width:22px; height:22px; }
.mark-opt.is-on{ border-color:var(--mk, var(--ink)); box-shadow:0 0 0 1px var(--mk, var(--ink)); }
.mark-opt-none{ grid-column:1 / -1; justify-content:center; min-height:46px; background:var(--card); color:var(--mute); font-weight:500; border-style:dashed; }
.mark-opt-none.is-on{ border-color:var(--line-strong); box-shadow:none; }
.mark-names{ display:grid; gap:8px; margin:10px 0 12px; }
.mark-names label{ display:flex; align-items:center; gap:10px; }
.mark-names input{ flex:1; min-height:44px; font-size:16px; }
.mark-names .mark-dot{ width:22px; height:22px; }
/* окно проверки (30.09): «Дозвонились по другому номеру?» — свёрнуто, по нажатию поле */
.sheet-check .check-newphone{ margin:0 0 10px; }
.sheet-check .check-newphone > summary{ cursor:pointer; color:var(--acc); font-weight:600; font-size:14px; padding:4px 0; }
.sheet-check .check-newphone-in{ width:100%; min-height:44px; font-size:16px; margin-top:6px; }
.sheet-check .check-newphone p{ margin:4px 0 0; }
/* 11.11 (владелец: «звонки и раздача — источник заявок на разовую помощь»): «Есть срочная нужда» в окнах «Выдано» и итога звонка; поле — только при галочке */
.need-box{ margin:0 0 12px; padding:6px 10px; border:1px solid var(--line-strong); border-radius:8px; }
.need-box.is-on{ border-color:var(--warn-fill); background:var(--warn-soft); }
.need-check{ display:flex; align-items:center; gap:10px; min-height:44px; font-weight:600; cursor:pointer; }
.need-check input{ width:22px; height:22px; margin:0; }
.need-more[hidden]{ display:none; }
.need-more .need-words{ width:100%; font-size:16px; }
.need-hint{ margin:4px 0 6px; }
.give-note{ margin:0 0 10px; }
.give-note textarea{ width:100%; font-size:16px; }
/* «Разобраться» по «не сходится» (01.10): окно в строке у ведущего */
.case-sheet-words{ margin:0; padding:10px 12px; border-left:4px solid var(--bad); background:var(--bad-soft); border-radius:6px; }
.case-sheet-f{ display:flex; flex-direction:column; gap:4px; margin:10px 0 6px; } .case-sheet-f textarea, .case-sheet-f input{ width:100%; font:inherit; font-size:16px; }
.case-sheet-f textarea, .case-sheet-f input{ box-sizing:border-box; max-width:100%; } .case-sheet-f input{ min-height:44px; padding:0 12px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); }
.case-sheet .sheet-actions .btn{ white-space:normal; height:auto; min-height:44px; text-align:center; }
.case-sheet .sheet-actions + .mute{ margin:8px 0 0; }
.sheet-actions .btn.call-lost-btn{ color:var(--bad); font-weight:600; }

/* «Как связываться» (01.10): галочки «Звонок / WhatsApp / Telegram» — окно правки и форма добавления */
.via-box{ border:0; margin:6px 0 8px; padding:0; display:flex; flex-direction:column; gap:6px; }
.via-box legend{ padding:0; margin-bottom:6px; font-size:14px; font-weight:600; }
.via-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.via-chip{ position:relative; }
.via-chip input{ position:absolute; opacity:0; pointer-events:none; }
.via-chip span{ display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:6px 14px; border:1px solid var(--line-strong); border-radius:999px; background:var(--card); cursor:pointer; font-weight:600; }
.via-chip input:checked + span{ border-color:var(--acc); background:var(--acc-soft); color:var(--acc); }
.via-chip input:checked + span::before{ content:"✓"; }
.via-chip input:disabled + span{ opacity:.45; cursor:not-allowed; text-decoration:line-through; }
.via-chip input:focus-visible + span{ outline:2px solid var(--acc); outline-offset:2px; }
.via-foreign{ color:var(--bad); font-weight:600; }
.via-tg{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; padding:8px 10px; border-radius:10px; background:var(--sel); }
.via-tg[hidden]{ display:none; }
.via-tg-mode{ display:inline-flex; align-items:center; gap:6px; font-size:15px; cursor:pointer; }
.via-tg-nick{ flex:1 1 100%; min-height:42px; padding:0 12px; font-size:16px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); }
.via-tg-nick[hidden]{ display:none; }

/* 01.10 (владелец): «Как связываться» свёрнуто одной строкой — по умолчанию «Звонок»; раскрыл — кнопки */
.via-fold{ margin:2px 0 6px; }
.via-fold > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:40px; padding:6px 12px; border:1px solid var(--line-strong); border-radius:10px; background:var(--card); }
.via-fold > summary::-webkit-details-marker{ display:none; }
.via-fold .via-fold-ch{ margin-left:auto; color:var(--acc); font-size:14px; font-weight:600; }
.via-fold[open] > summary{ border-bottom-left-radius:0; border-bottom-right-radius:0; }
.via-fold[open] .via-fold-ch{ visibility:hidden; }
.via-fold > .via-box{ margin:0; padding:10px 12px; border:1px solid var(--line-strong); border-top:0; border-radius:0 0 10px 10px; }
/* Своё поле выбора села (01.10): кнопка как поле, под ней — поиск и список; частые сверху, «＋ Добавить село», если нет */
.vpick{ position:relative; min-width:0; flex:1 1 220px; }
.vpick-btn{ display:flex; align-items:center; gap:8px; width:100%; min-height:40px; padding:0 12px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); color:var(--ink); font:inherit; font-size:15px; font-weight:600; text-align:left; cursor:pointer; }
.vpick-btn:hover{ border-color:var(--acc); }
.vpick-btn:focus-visible, .vpick.is-open .vpick-btn{ outline:2px solid var(--acc); outline-offset:0; border-color:var(--acc); }
.vpick-val{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vpick-val.is-empty{ color:var(--mute); font-weight:400; }
.vpick-ch{ color:var(--mute); font-size:12px; transition:transform .15s; }
.vpick.is-open .vpick-ch{ transform:rotate(180deg); }
.vpick-pop{ position:absolute; z-index:40; left:0; right:0; top:calc(100% + 6px); min-width:260px; padding:8px; border:1px solid var(--line-strong); border-radius:12px; background:var(--card); box-shadow:0 12px 32px rgba(0,0,0,.16); }
.vpick-q{ width:100%; min-height:40px; padding:0 12px; border:1px solid var(--line-strong); border-radius:10px; background:var(--bg); color:var(--ink); font:inherit; font-size:16px; box-sizing:border-box; }
.vpick-q:focus{ outline:2px solid var(--acc); outline-offset:0; border-color:var(--acc); }
.vpick-list{ max-height:248px; overflow-y:auto; margin-top:6px; display:flex; flex-direction:column; gap:2px; overscroll-behavior:contain; }
.vpick-opt{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:40px; padding:0 10px; border:0; border-radius:8px; background:none; color:var(--ink); font:inherit; font-size:15px; text-align:left; cursor:pointer; }
.vpick-opt:hover, .vpick-opt.is-act{ background:var(--sel); }
.vpick-opt.is-cur{ color:var(--acc); font-weight:700; }
.vpick-opt.is-cur::after{ content:"✓"; margin-left:auto; }
.vpick-n{ flex:none; color:var(--mute); font-size:12px; font-weight:400; }
.vpick-add{ display:block; width:100%; min-height:40px; margin-top:6px; padding:0 10px; border:1px dashed var(--acc); border-radius:8px; background:var(--acc-soft); color:var(--acc); font:inherit; font-size:15px; font-weight:600; text-align:left; cursor:pointer; }
.vpick-add[hidden], .vpick-empty[hidden]{ display:none; }
.vpick-add.is-act{ outline:2px solid var(--acc); outline-offset:1px; }
.vpick-empty{ margin:8px 4px 2px; color:var(--mute); font-size:13px; }
@media (max-width: 899px){ .vpick-btn{ min-height:44px; font-size:16px; } .vpick-opt{ min-height:44px; font-size:16px; } .vpick-list{ max-height:220px; } }
.qedit .vpick-pop{ position:static; margin-top:6px; box-shadow:none; }   /* в окне правки — в потоке: окно прокручивается, список не обрезается */

/* окна раздачи через посредников (01.10): «Передал» со сроком, «Посредник», выбор посредника */
.relay-sheet .relay-sheet-who{ margin:0 0 4px; font-size:17px; }
.relay-sheet .relay-sheet-sum{ margin:0 0 12px; font-size:15px; } .relay-sheet .relay-sheet-sum b{ font-size:24px; }
.relay-sheet .label{ display:block; margin:12px 0 6px; font-size:13px; font-weight:600; color:var(--mute); }
.relay-sheet .relay-days, .relay-sheet .relay-how{ display:flex; flex-wrap:wrap; gap:6px; }
.relay-sheet .relay-days .chip, .relay-sheet .relay-how .chip{ min-height:40px; padding:0 14px; font-size:15px; cursor:pointer; }
.relay-sheet .relay-days-own{ display:inline-flex; align-items:center; gap:6px; margin-top:8px; font-size:14px; color:var(--mute); }
.relay-sheet .relay-days-in{ width:84px; min-height:38px; padding:0 8px; border:1px solid var(--line-strong); border-radius:8px; font:inherit; font-size:16px; text-align:center; }
.relay-sheet .relay-days-hint{ margin:10px 0 0; padding:8px 10px; border-radius:8px; background:var(--acc-soft); color:var(--ink); font-size:14px; }
.relay-sheet .relay-mem-q{ width:100%; min-height:40px; padding:0 10px; border:1px solid var(--line-strong); border-radius:8px; font:inherit; font-size:16px; box-sizing:border-box; margin-bottom:6px; }
.relay-sheet .relay-mem{ max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:10px; overscroll-behavior:contain; }
.relay-sheet .relay-mem-row{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; flex-wrap:wrap; }
.relay-sheet .relay-mem-row[hidden]{ display:none; }
.relay-sheet .relay-mem-row.is-mine{ background:var(--acc-soft); }
.relay-sheet .relay-mem-row input{ width:20px; height:20px; flex:none; }
.relay-sheet .relay-mem-name{ flex:1; min-width:120px; }
.relay-sheet .relay-mem-other{ flex-basis:100%; padding-left:28px; font-size:12px; color:var(--warn); }
.relay-sheet .relay-mem-other.is-free{ color:var(--bad); }
.relay-sheet .relay-pick{ display:flex; flex-direction:column; gap:6px; max-height:420px; overflow:auto; }
.relay-sheet .relay-pick-btn{ display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:48px; padding:0 14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--card); font:inherit; font-size:15px; cursor:pointer; text-align:left; }
.relay-sheet .relay-pick-btn:hover{ border-color:var(--acc); }
/* UX-ревью окон посредников (01.10) */
.relay-sheet .relay-usual{ display:block; margin-top:2px; font-weight:400; font-size:12px; }
.relay-sheet .relay-days-hint.is-bad{ background:var(--bad-soft); color:var(--bad); font-weight:600; }
.relay-sheet .relay-mem-row{ flex-wrap:nowrap; }
.relay-sheet .relay-mem-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.relay-sheet .relay-mem-other{ flex:none; flex-basis:auto; padding-left:0; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--mute); }
.relay-sheet .relay-mem-other.is-move{ color:var(--warn); font-weight:700; }
.relay-sheet .relay-mem-other.is-free{ color:var(--bad); }
.relay-sheet .relay-del{ margin-top:18px; padding-top:12px; border-top:1px solid var(--line); }
.relay-sheet .relay-del-go{ border:0; background:none; padding:8px 0; min-height:44px; color:var(--bad); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.relay-sheet .relay-del-ask p{ margin:0 0 10px; font-size:14px; }
.relay-sheet .relay-del-yes{ background:var(--bad); border-color:var(--bad); color:#fff; min-height:44px; }
.relay-sheet .relay-del-no{ min-height:44px; }
@media (max-width: 899px){
  .relay-sheet .relay-days .chip, .relay-sheet .relay-how .chip{ min-height:44px; }
  .relay-sheet.relay-edit-sheet{ max-height:100dvh; height:100dvh; border-radius:0; overflow-y:auto; padding-bottom:0; }
  .relay-sheet.relay-edit-sheet .relay-mem{ max-height:none; }
  .relay-sheet.relay-edit-sheet .relay-sheet-actions{ position:sticky; bottom:0; z-index:2; margin:12px -16px 0; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--card); border-top:1px solid var(--line); }
}
.relay-sheet .relay-how-big{ flex-direction:column; }
.relay-sheet .relay-how-big .chip{ justify-content:flex-start; min-height:48px; font-size:16px; }
.relay-sheet .relay-or{ margin-top:18px; }
.relay-sheet .relay-note-f[hidden]{ display:none; }
.relay-sheet .relay-days-hint.is-warn{ background:var(--warn-soft); }
.qedit .relay-box .relay-sel, .qedit .relay-box .relay-note-in{ width:100%; min-height:44px; margin-top:8px; padding:0 12px; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--card); font:inherit; font-size:16px; box-sizing:border-box; }
.qedit .relay-box [hidden]{ display:none; }
/* PIN-замок Распорядителя (01.10): пока приложение свёрнуто — содержимое скрыто (в переключателе приложений не видно) */
body.pin-veil main, body.pin-veil #card, body.pin-veil .sheet-back{ visibility:hidden; }
/* PIN-панель замка (01.10): как экран блокировки телефона */
.pinlock{ display:flex; flex-direction:column; align-items:center; gap:18px; padding:24px 0 12px; }
.pinlock-title{ margin:0; font-size:20px; font-weight:600; }
.pinlock-dots{ display:flex; gap:16px; min-height:18px; }
.pinlock-dots span{ width:14px; height:14px; border-radius:50%; border:2px solid var(--ink); box-sizing:border-box; transition:background .1s; }
.pinlock-dots span.is-on{ background:var(--ink); }
.pinlock-dots.is-shake{ animation:pinshake .4s; }
@keyframes pinshake{ 0%,100%{ transform:translateX(0); } 20%,60%{ transform:translateX(-10px); } 40%,80%{ transform:translateX(10px); } }
.pinlock-form{ display:flex; flex-direction:column; align-items:center; gap:28px; }
.pinlock-pad{ display:grid; grid-template-columns:repeat(3, 76px); gap:18px 26px; }
.pinlock-key{ width:76px; height:76px; border-radius:50%; border:0; background:var(--sel); color:var(--ink); font:inherit; font-size:30px; font-weight:400; cursor:pointer;
  -webkit-tap-highlight-color:transparent; user-select:none; touch-action:manipulation; }
.pinlock-key:active{ background:var(--line-strong); transform:scale(.95); }
.pinlock-del, .pinlock-ok{ background:transparent; font-size:26px; }
.pinlock-ok{ color:var(--ok); font-weight:700; }
/* 14.11: вход по Face ID или отпечатку — кнопка над цифрами; пока телефон спрашивает лицо, кнопка тускнеет */
.pinlock-bio{ margin:0; }
.pinlock-bio-btn{ min-height:48px; padding:0 22px; border:1px solid var(--line-strong); border-radius:24px; background:var(--card); color:var(--acc); font:600 16px/1 var(--ui); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.pinlock-bio-btn:active{ transform:scale(.97); }
.pinlock-bio.is-busy .pinlock-bio-btn{ opacity:.55; }
.pinlock-alt{ width:100%; max-width:340px; text-align:center; }
.pinlock-alt > summary{ cursor:pointer; color:var(--mute); font-size:14px; list-style:none; min-height:44px; display:flex; align-items:center; justify-content:center; }
.pinlock-alt > summary::-webkit-details-marker{ display:none; }
.pinlock-alt form{ text-align:left; margin-top:10px; }
.pinlock-gap{ visibility:hidden; }
/* окно посредника (02.10): студенты группами, «ещё не передано», «выбрать всех» */
.relay-sheet .relay-mem-f{ display:flex; gap:6px; margin:0 0 8px; }
.relay-sheet .relay-mem-f .chip{ min-height:38px; padding:0 12px; cursor:pointer; }
.relay-sheet .relay-mem-g[hidden], .relay-sheet .relay-mem-row[hidden]{ display:none; }
.relay-sheet .relay-mem-gh{ position:sticky; top:0; z-index:1; display:flex; align-items:center; gap:6px; padding:8px 10px; background:var(--sel); border-bottom:1px solid var(--line); font-size:13px; }
.relay-sheet .relay-mem-all{ margin-left:auto; border:0; background:none; color:var(--acc); font:inherit; font-size:13px; font-weight:600; cursor:pointer; min-height:32px; }
.relay-sheet .relay-pick-btn.is-done{ opacity:.7; }
.relay-sheet .relay-pick-ask{ margin-top:10px; padding:10px 12px; border-radius:10px; background:var(--warn-soft); }
.relay-sheet .relay-pick-ask[hidden]{ display:none; }
.relay-sheet .relay-pick-ask p{ margin:0 0 8px; font-size:14px; }
.relay-sheet .relay-pick-ask .btn{ min-height:44px; }

/* 03.10: заголовок блока строк в таблице (rows[].group) — и в карточках телефона */
.table tr.row-group{ background:none; box-shadow:none; border:0; }
.table tr.row-group th{ text-align:left; padding:16px 4px 6px; font:700 15px/1.3 var(--ui); color:var(--ink); background:none; border:0; }
@media (max-width:760px){ .table tr.row-group{ display:block; margin:0; padding:0; } .table tr.row-group th{ display:block; } }
/* «Идея или ошибка» (10.10): тихая строка в конце страницы */
.feedback-foot{ margin:28px 0 8px; text-align:center; font-size:14px; }
.feedback-foot a{ color:var(--mute); text-decoration:none; padding:8px 12px; border-radius:999px; }
.feedback-foot a:hover{ color:var(--acc); background:var(--acc-soft); }
/* длинный текст свёрнут (10.10): 4 строки, «Показать полностью» */
.clamp-text{ display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-text.is-open{ display:block; -webkit-line-clamp:unset; overflow:visible; }
.clamp-more{ display:inline-block; margin:2px 0 8px; padding:0; border:0; background:none; color:var(--acc); font:inherit; font-size:14px; cursor:pointer; }
@media (max-width:900px){ .clamp-more{ padding:9px 0; margin:-7px 0 -1px; } }   /* 17.11: зона нажатия 42 px вместо 24, вид тот же */
/* плашка уведомлений компактнее (10.10): шаги под «Как это сделать?» */
.push-bar-how{ margin-top:4px; font-size:14px; } .push-bar-how > summary{ cursor:pointer; color:var(--acc); list-style:none; padding:9px 0; margin:-5px 0; }
.push-bar-how > summary::-webkit-details-marker{ display:none; } .push-bar-how > summary::before{ content:"▸ "; } .push-bar-how[open] > summary::before{ content:"▾ "; }
/* фото и видео кусками (13.10, upload.js): кнопка, список с ходом, готовое — зелёной галочкой, ошибка — словами */
.upl{ display:flex; flex-direction:column; gap:8px; }
.upl-pick{ align-self:flex-start; position:relative; overflow:hidden; cursor:pointer; }
.upl-pick input[type=file]{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; font-size:0; }
.upl-pick:focus-within{ outline:2px solid var(--acc); outline-offset:2px; }
.upl-again{ align-self:flex-start; margin-top:4px; }
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.upl:not(.is-js) .upl-pick input[type=file]{ position:static; opacity:1; font-size:14px; }
.upl-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.upl-list:empty{ display:none; }
.upl-item{ display:grid; grid-template-columns:48px 1fr auto; gap:10px; align-items:center; padding:6px 8px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.upl-item.is-ok{ border-color:var(--ok); }
.upl-item.is-bad{ border-color:var(--bad); background:var(--bad-soft); }
.upl-thumb{ width:48px; height:48px; border-radius:8px; overflow:hidden; display:flex; align-items:center; justify-content:center; background:var(--line); font-size:20px; }
.upl-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.upl-body{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.upl-name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; }
.upl-item.is-bad .upl-meta{ color:var(--bad); }
.upl-item.is-ok .upl-meta{ color:var(--ok); }
.upl-bar{ height:6px; border-radius:3px; background:var(--line); overflow:hidden; }
.upl-bar i{ display:block; height:100%; width:0; background:var(--acc); transition:width .2s linear; }
.upl-x{ border:0; background:none; color:var(--mute); font-size:18px; padding:6px 8px; cursor:pointer; min-width:36px; min-height:36px; }
.upl-warn{ margin:0; color:var(--bad); font-weight:600; }
.upl.is-attn{ outline:2px solid var(--warn); outline-offset:4px; border-radius:10px; }
.upl-note{ margin:0; }
/* видео в ходе (13.10): превью с кнопкой воспроизведения — проигрыватель грузит только при нажатии */
.media-vid{ position:relative; display:block; height:180px; border-radius:10px; overflow:hidden; background:#000; }   /* 15.10: кадр-превью с кнопкой ▶ */
.media-vid img{ display:block; height:100%; width:auto; max-width:min(100%, 320px); }
.media-play{ position:absolute; left:50%; top:50%; width:56px; height:56px; margin:-28px 0 0 -28px; border-radius:50%; background:rgba(0,0,0,.55); box-shadow:0 0 0 2px rgba(255,255,255,.85) inset; }
.media-play::after{ content:""; position:absolute; left:22px; top:17px; border-style:solid; border-width:11px 0 11px 17px; border-color:transparent transparent transparent #fff; }
.media-vid:hover .media-play,.media-vid:focus-visible .media-play{ background:var(--primary); }
.media-sec{ position:absolute; right:6px; bottom:6px; padding:1px 6px; border-radius:6px; background:rgba(0,0,0,.6); color:#fff; font-size:12px; }
.media-viewer{ position:fixed; inset:0; z-index:95; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.92); padding:env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.media-viewer .media-video{ max-width:100%; max-height:100%; width:auto; height:auto; }
.media-viewer-x{ position:absolute; top:calc(env(safe-area-inset-top, 0px) + 8px); right:8px; width:44px; height:44px; border:0; border-radius:50%; background:rgba(255,255,255,.15); color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.media-wait{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:8px; background:var(--warn-soft); font-size:13px; }
.media-wait.is-bad{ background:var(--bad-soft); color:var(--bad); }
/* фото и видео записи (13.10, parts/media_list.php) */
.media-list{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px; margin-top:6px; }
.media-thumb img,.media-pdf{ width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block; }
.media-pdf{ display:flex; align-items:center; justify-content:center; font-weight:600; font-size:13px; }
/* 3.11: итог решения по помощи перед отправкой (app.js form[data-decide]) — сколько, лимиты, флажки, слова после правки грамматики */
.sheet-decide .decide-sum{ display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:4px 0 12px; }
.sheet-decide .decide-sum dt{ color:var(--mute); font-size:14px; }
.sheet-decide .decide-sum dd{ margin:0; font-weight:700; }
.sheet-decide .decide-sum .decide-flag{ grid-column:1 / -1; font-weight:600; color:var(--warn); }
.sheet-decide .decide-words-h{ margin:0 0 4px; color:var(--mute); font-size:14px; }
.sheet-decide .decide-words{ margin:0 0 8px; padding:10px 12px; border-radius:12px; background:var(--bg); white-space:pre-line; }

/* 3.11: дело «Разовой помощи» — окном поверх списка (app.js #sugq-dlg); телефон — на весь экран */
.sugq-dlg{ width:min(820px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:0; border-radius:20px; background:var(--bg); box-shadow:0 24px 60px rgba(20,20,60,.3); overflow:hidden; }
.sugq-dlg::backdrop{ background:rgba(15,15,35,.45); }
.sugq-dlg-body{ max-height:calc(100dvh - 48px); overflow:auto; padding:48px 16px 20px; box-sizing:border-box; }
.sugq-dlg-x{ position:absolute; top:8px; right:8px; z-index:2; width:40px; height:40px; border:0; border-radius:50%; background:var(--card); box-shadow:0 2px 8px rgba(0,0,0,.12); font-size:24px; line-height:1; cursor:pointer; }
@media (max-width:700px){ .sugq-dlg{ width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border-radius:0; } .sugq-dlg-body{ max-height:100dvh; height:100dvh; } }
/* 17.11: «↓ к действиям» — у длинного дела форма в пяти экранах ниже; кнопка видна, только пока действия ниже экрана (app.js cardDialog) */
.sugq-dlg-down{ position:absolute; right:12px; bottom:calc(env(safe-area-inset-bottom, 0px) + 16px); z-index:2; width:44px; height:44px; padding:0; border:1px solid var(--line); border-radius:50%;
  background:var(--card); color:var(--acc); box-shadow:var(--shadow-pop); font:inherit; font-size:20px; font-weight:700; line-height:1; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.sugq-dlg-down[hidden]{ display:none; }
.sugq-dlg-down:active{ transform:scale(.94); }
body.has-dlg{ overflow:hidden; }
/* 17.11: окно дела появлялось рывком (сразу весь экран). Теперь — как лист: на телефоне поднимается снизу, на компьютере проявляется; фон темнеет плавно */
.sugq-dlg[open]{ animation:sheet-pop .2s cubic-bezier(.2,.8,.2,1); }
/* 17.11: закрытие окна дела — так же плавно (app.js ставит .is-closing на 170 мс и только потом закрывает) */
.sugq-dlg[open].is-closing{ animation:sheet-unpop .16s ease-in both; pointer-events:none; }
.sugq-dlg[open].is-closing::backdrop{ animation:dlg-dim .16s ease-in reverse both; }
@media (max-width:700px){ .sugq-dlg[open].is-closing{ animation:dlg-fall .17s ease-in both; } }
@keyframes dlg-fall{ to{ opacity:0; transform:translateY(28px); } }
.sugq-dlg[open]::backdrop{ animation:dlg-dim .2s ease-out; }
@keyframes dlg-dim{ from{ opacity:0; } }
@keyframes dlg-rise{ from{ opacity:0; transform:translateY(28px); } }
@media (max-width:700px){ .sugq-dlg[open]{ animation:dlg-rise .24s cubic-bezier(.2,.85,.25,1); } }
@media (prefers-reduced-motion:reduce){ .sugq-dlg[open],.sugq-dlg[open]::backdrop,.sugq-dlg[open].is-closing,.sugq-dlg[open].is-closing::backdrop{ animation:none; } }

/* ═══ Шапка — одна система для компьютера и телефона (29.09.2026, владелец: «шапка везде как по кайфу, одна система») ═══
   Разметка одна (layouts/desk.php, parts/tabs.php): header.top > .top-row > название · вкладки (.tabs-row, блок «menu») · месяц · поиск · правая группа.
   Компьютер (≥ 901 px): одна строка 56 px, закреплена сверху; вкладки со значками слева, поиск растягивается («/» — к поиску, Esc — сброс), справа
   уведомления и аккаунт. Открытая вкладка сама называет страницу — название видно, только когда её нет (карточка) или вкладок нет (сотрудник).
   Телефон (≤ 900 px): вкладки — нижняя панель, как в приложениях iPhone (значок и подпись, до пяти мест; больше — четыре и «Ещё»);
   кнопки (↻, уведомления, аккаунт) — у заголовка страницы (refresh.js переносит .top-side в .page-head, шапке — .top-empty).
   Значки разделов — public/assets/icons/nav-*.svg по data-ico="модуль:id". Раскладку phone (.phone, layouts/phone.php) это не трогает. */

/* ── общее ── */
.top{ background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.top-row{ max-width:1640px; margin:0 auto; padding:0 var(--pad); display:flex; align-items:stretch; gap:16px; min-height:56px; }
.brand{ align-self:center; font:700 19px/28px var(--ui); letter-spacing:-.01em; color:var(--ink); text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:0 1 auto; }
.top-slot{ display:flex; align-items:center; gap:8px; min-width:0; }
.top-month{ align-self:center; }
.top-month:empty{ display:none; }
.top-side{ align-self:center; display:flex; align-items:center; gap:8px; margin-left:auto; flex:none; }
.top-search ~ .top-side{ margin-left:0; }

/* поиск: значок лупы, подсказка клавиши «/», счётчик найденного справа (app.js) */
.top-search{ position:relative; align-self:center; flex:1 1 260px; max-width:460px; margin-left:auto; }
.top-search::before{ content:""; position:absolute; left:12px; top:50%; width:16px; height:16px; margin-top:-8px; background:var(--mute); pointer-events:none;
  -webkit-mask:url("/assets/icons/nav-search.svg") center/contain no-repeat; mask:url("/assets/icons/nav-search.svg") center/contain no-repeat; }
.top-search input{ width:100%; height:38px; padding:0 44px 0 36px; border:1px solid var(--line); border-radius:10px; background:var(--bg); font-size:14px; color:var(--ink);
  transition:border-color .15s, box-shadow .15s, background .15s; }
.top-search input::placeholder{ color:var(--mute); }
.top-search input{ text-overflow:ellipsis; }
.top-search input:hover{ border-color:var(--line-strong); }
.top-search input:focus{ background:var(--card); border-color:var(--acc); box-shadow:0 0 0 3px var(--acc-soft); outline:none; }
.top-search input:not(:placeholder-shown){ padding-right:136px; }
.top-kbd{ position:absolute; right:10px; top:50%; transform:translateY(-50%); min-width:22px; height:22px; padding:0 6px; border:1px solid var(--line-strong); border-bottom-width:2px;
  border-radius:6px; background:var(--card); color:var(--mute); font:600 12px/19px var(--mono); text-align:center; pointer-events:none; }
.top-search:focus-within .top-kbd,.top-search:has(input:not(:placeholder-shown)) .top-kbd{ display:none; }
.search-count{ position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:12px; color:var(--mute); white-space:nowrap; pointer-events:none; }
.search-count.is-none{ color:var(--warn); }

/* уведомления в шапке (ядро: «Просят вход», «Ждут решения») */
.top-notice{ display:flex; align-items:center; gap:6px; }
.top-notice:empty{ display:none; }
.notice{ display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 11px; border-radius:999px; text-decoration:none; font-weight:600; font-size:13px;
  background:var(--warn-soft); color:var(--warn); border:1px solid var(--warn); white-space:nowrap; }
.notice-bad{ background:var(--bad-soft); color:var(--bad); border-color:var(--bad); }
.notice b{ font-variant-numeric:tabular-nums; }
.notice::before{ content:""; flex:none; width:15px; height:15px; background:currentColor; -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat; }
.notice{ --ico:url("/assets/icons/nav-razbor.svg"); }
.notice[href="/access"],.notice[href^="/auth/devices"]{ --ico:url("/assets/icons/nav-devices.svg"); }

/* меню аккаунта: <details>, работает без скрипта; значок человека, «Глазами» — оранжевая точка */
.menu{ position:relative; }
.menu > summary{ list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 12px 0 10px; border:1px solid var(--line);
  border-radius:999px; background:var(--card); color:var(--ink); font-size:13px; font-weight:500; white-space:nowrap; user-select:none; -webkit-tap-highlight-color:transparent; }
.menu > summary::-webkit-details-marker{ display:none; }
.menu > summary::before{ content:""; flex:none; width:18px; height:18px; background:var(--mute);
  -webkit-mask:url("/assets/icons/person.svg") center/contain no-repeat; mask:url("/assets/icons/person.svg") center/contain no-repeat; }
.menu > summary::after{ content:""; width:8px; height:8px; margin:-4px 2px 0 1px; border-right:1.8px solid var(--mute); border-bottom:1.8px solid var(--mute); transform:rotate(45deg); }
.menu[open] > summary::after{ transform:rotate(225deg); margin-top:4px; border-color:var(--acc); }
.menu > summary:hover{ border-color:var(--line-strong); }
.menu[open] > summary{ background:var(--acc-soft); border-color:var(--acc); color:var(--acc); }
.menu[open] > summary::before{ background:var(--acc); }
.menu > summary.is-viewas{ background:var(--warn-soft); border-color:var(--warn); color:var(--warn); }
.menu > summary.is-viewas::before{ background:var(--warn); }
.menu-box{ position:absolute; right:0; top:calc(100% + 8px); z-index:30; min-width:250px; max-height:calc(100vh - 90px); overflow:auto; padding:6px; background:var(--card);
  border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(0,0,0,.14); }
.menu-box a,.menu-box button{ display:flex; width:100%; align-items:center; min-height:38px; padding:6px 10px; border:0; border-radius:8px; background:none; color:var(--ink);
  text-decoration:none; text-align:left; cursor:pointer; font:400 14px/20px var(--ui); }
.menu-box a:hover,.menu-box button:hover{ background:var(--sel); }
.menu-box hr{ border:0; border-top:1px solid var(--line); margin:6px 0; }
.menu-box .menu-cap{ padding:4px 10px 2px; color:var(--mute); font-size:12px; line-height:16px; }
.menu-box form{ margin:0; }
.menu-box .menu-tick{ display:inline-block; width:18px; flex:none; color:var(--acc); font-weight:700; }
.menu-pair{ display:flex; gap:4px; padding:2px 6px 4px; }
.menu-pair button{ justify-content:center; border:1px solid var(--line); min-height:34px; font-size:13px; }
.menu-pair button[aria-pressed=true]{ border-color:var(--acc); color:var(--acc); background:var(--acc-soft); font-weight:600; }

/* ↻ в шапке «Офиса» (ярлык на экране Домой: своей кнопки обновить у него нет) — refresh.js */
.top-refresh{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; padding:0; border:1px solid var(--line); border-radius:50%;
  background:var(--card); color:var(--ink); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.top-refresh::before{ content:""; width:18px; height:18px; background:currentColor; -webkit-mask:url("/assets/icons/refresh.svg") center/contain no-repeat; mask:url("/assets/icons/refresh.svg") center/contain no-repeat; }
.top-refresh:active,.menu > summary:active{ transform:scale(.94); }
.is-refreshing .top-refresh::before{ animation:spin .8s linear infinite; }

/* значки разделов: data-ico="модуль:id" (View::menu) */
.tabs-row .tab,.tabs-over-box .tabs-item{ --ico:url("/assets/icons/nav-dot.svg"); }
.tabs-row [data-ico="lists:lists"],.tabs-row [data-ico="lists:home"]{ --ico:url("/assets/icons/nav-home.svg"); }
.tabs-row [data-ico="people:razbor"]{ --ico:url("/assets/icons/nav-razbor.svg"); }
.tabs-row [data-ico="people:kassa"]{ --ico:url("/assets/icons/nav-kassa.svg"); }
.tabs-row [data-ico="people:people"]{ --ico:url("/assets/icons/nav-people.svg"); }
.tabs-row [data-ico="people:razdacha"]{ --ico:url("/assets/icons/nav-kassa.svg"); }   /* 01.10: вкладка «Касса» (касса + раздачи) */
.tabs-row [data-ico="people:posredniki"]{ --ico:url("/assets/icons/nav-student.svg"); }   /* 01.10: «Студенты» — раздача через посредников, пока идёт */
.tabs-row [data-ico="people:lenta"]{ --ico:url("/assets/icons/nav-lenta.svg"); }
.tabs-row [data-ico="people:otchety"]{ --ico:url("/assets/icons/nav-report.svg"); }
.tabs-row [data-ico="people:poruchenia"]{ --ico:url("/assets/icons/nav-orders.svg"); }   /* 07.10: «Поручения» — вкладка Распорядителя */
.tabs-row [data-ico="people:svyaz"], .tabs-row [data-ico="people:svyaz-imam"]{ --ico:url("/assets/icons/nav-chat.svg"); }   /* 3.11: «Связь» Распорядитель ↔ Имам */
.tabs-row [data-ico="people:ne-zabyt"]{ --ico:url("/assets/icons/nav-inbox.svg"); }   /* 12.11: «Не забыть» — личные записи Распорядителя */
.tabs-row [data-ico="people:predlozheniya"]{ --ico:url("/assets/icons/nav-report.svg"); }
.tabs-row [data-ico="people:pomosch"]{ --ico:url("/assets/icons/nav-hands.svg"); }   /* 15.10: «Помощь» ведущего помощи — было без значка */
.tabs-row [data-ico="people:predlozhit"]{ --ico:url("/assets/icons/nav-hands.svg"); }   /* 11.11: «Предложить» — главная вкладка помощника по заявкам */
.tabs-row [data-ico="people:razovaya"]{ --ico:url("/assets/icons/nav-hands.svg"); }   /* 18.10: «Разовая помощь» Распорядителя */
.tabs-row [data-ico="people:rezerv"]{ --ico:url("/assets/icons/nav-reserve.svg"); }   /* 22.10: «Резерв» разовой помощи — коробка «на потом» */
.tabs-row [data-ico="people:razobrat"]{ --ico:url("/assets/icons/nav-razbor.svg"); }   /* 17.10: разделы «Помощи» ведущего — нижней панелью */
.tabs-row [data-ico="people:ostalnoe"]{ --ico:url("/assets/icons/nav-lenta.svg"); }
.tabs-row [data-ico="people:moi-poruchenia"]{ --ico:url("/assets/icons/nav-orders.svg"); }   /* 15.10: «Поручения» исполнителя — было без значка */
.tabs-row [data-ico="people:vydacha"]{ --ico:url("/assets/icons/nav-razdacha.svg"); }
.tabs-row [data-ico="people:idei"]{ --ico:url("/assets/icons/nav-help.svg"); }
.tabs-row [data-ico="people:kak"]{ --ico:url("/assets/icons/nav-help.svg"); }
.tabs-row [data-ico="people:proverka"]{ --ico:url("/assets/icons/nav-check.svg"); }
.tabs-row [data-ico="people:zakat"]{ --ico:url("/assets/icons/nav-zakat.svg"); }   /* 31.10: «Закят» — стопка монет (было кружком) */
.tabs-row [data-ico="dedupe:duplicates"]{ --ico:url("/assets/icons/nav-duplicates.svg"); }
.tabs-row [data-ico="access:access"]{ --ico:url("/assets/icons/nav-access.svg"); }
.tabs-row [data-ico="core:devices"]{ --ico:url("/assets/icons/nav-devices.svg"); }
.tabs-row [data-ico="more"]{ --ico:url("/assets/icons/nav-more.svg"); }
.tabs-row .tab[data-ico]::before,.tabs-over-box .tabs-item[data-ico]::before{ content:""; flex:none; width:16px; height:16px; background:currentColor; opacity:.85;
  -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat; }
.tabs-row .tab.is-on[data-ico]::before{ opacity:1; }
.tabs-over{ display:none; }                                        /* «Ещё» нижней панели — только на телефоне */

/* ── компьютер: одна строка ── */
@media (min-width:901px){
  /* 13.10 (владелец): надписи слева нет — шапка начинается с вкладок, выровненных по тексту страницы; на любой странице всё на месте */
  .top-row > .brand{ display:none; }
  /* вкладки сжимаются в последнюю очередь (сначала поиск до 150 px); не влезли — край растворяется (app.js ставит .is-over) */
  .top-row > .tabs-row{ flex:0 0.001 auto; min-width:0; display:flex; align-items:stretch; margin:0 0 0 -12px; }
  .top-row > .tabs-row.is-over{ -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image:linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .top-search{ min-width:150px; }
  .top-row > .tabs-row .tabs{ align-items:stretch; overflow-x:auto; scrollbar-width:none; }
  .top-row > .tabs-row .tabs::-webkit-scrollbar{ display:none; }
  /* 13.10 (владелец: «несерьёзно»): рабочая навигация — тихо. Неоткрытые серые, открытая — фиолетовый текст и полоса прямо на нижней
     границе шапки (одна заметная деталь, без заливок и градиентов). Вес у всех один — ширина вкладок не меняется при переключении. */
  /* «Пастель» (13.10, владелец: «хедер напрягает»): открытая вкладка — небольшая мягкая таблетка по центру шапки, без полосы;
     наведение — светлая подложка. Как нижняя панель телефона. Вес у всех один — ширина не прыгает. */
  .top-row > .tabs-row .tab{ position:relative; align-items:center; align-self:center; gap:8px; height:36px; margin:0 1px; padding:0 13px; border:0; border-radius:999px;
    font-size:14px; font-weight:500; letter-spacing:.005em; color:var(--mute); background:none; transition:color .12s, background-color .12s; }
  .top-row > .tabs-row .tab:hover{ color:var(--ink); background:var(--sel); }
  .top-row > .tabs-row .tab.is-on{ color:var(--acc); background:var(--acc-soft); }
  .top-row > .tabs-row .tab:focus-visible{ outline:2px solid var(--acc); outline-offset:1px; }
  .top-row > .tabs-row .tab[data-ico]::before{ opacity:.75; }
  .top-row > .tabs-row .tab.is-on[data-ico]::before{ background:currentColor; opacity:1; }
  .top-row > .tabs-row .tab .count{ margin-left:-2px; }
  .top-row > .tabs-row .tabs-more > summary{ display:flex; align-items:center; height:100%; }
  .top-row > .tabs-row .tabs-more-box{ top:calc(100% + 1px); }
}
/* узкий компьютер (901–1200): вкладки плотнее, аккаунт — кругом со значком, у уведомлений — только число */
@media (min-width:901px) and (max-width:1200px){
  .top-row{ gap:10px; padding:0 14px; }
  .top-row > .tabs-row{ margin-left:-4px; }
  .top-row > .tabs-row .tab{ padding:0 9px; gap:6px; font-size:14px; }
  .top-search{ flex-basis:150px; }
  .top-search input{ padding-right:12px; }
  .top-search input:not(:placeholder-shown){ padding-right:84px; }
  .search-count{ font-size:0; }
  .search-count::after{ content:attr(data-short); font-size:11px; }
  .top-kbd{ display:none; }
  .notice .notice-text{ display:none; }
  .menu > summary{ width:38px; padding:0; justify-content:center; font-size:0; gap:0; }
  .menu > summary::after{ content:none; }
  .menu > summary.is-viewas::after{ content:""; position:absolute; top:0; right:0; width:10px; height:10px; border-radius:50%; background:var(--warn); border:2px solid var(--card); }
  .menu > summary{ position:relative; }
}

/* ── телефон: нижняя панель разделов и кнопки у заголовка ── */
@media (max-width:900px){
  body{ --nav-h:0px; }
  /* 17.11 (владелец: «таб-бар запарил баговаться») — три причины, по которым панель уезжала, и что с ними сделано:
     1) страница шире экрана (одна длинная строка таблицы) — телефон растягивает под неё «холст», и приклеенная панель оказывается шире и НИЖЕ
        экрана (подписи срезаны). Лишнее по ширине теперь просто обрезается: панель всегда по экрану. clip, а не hidden: липкие шапки таблиц живы;
     2) панель была закреплённым элементом ВНУТРИ липкой шапки — iPhone после клавиатуры и прокрутки «с отскоком» пересчитывал такую пару с ошибкой
        (панель посреди экрана). На телефоне шапка больше не липкая: у каждой страницы свой заголовок, от шапки осталась только панель;
     3) панель пряталась по одному лишь фокусу в поле (app.js) — см. там: теперь только по настоящей клавиатуре. */
  html,body{ overflow-x:clip; }
  /* 17.11 (ревью): раз у <html> своя обрезка, запрет прокрутки с <body> на экран уже не переносится — под открытым окном страница ездила; запираем сам <html> */
  html:has(> body.has-sheet),html:has(> body.has-dlg){ overflow:hidden; }
  .top{ position:relative; }
  .top-row{ align-items:center; gap:8px; min-height:52px; padding:0 12px; }
  .brand{ flex:1 1 auto; font-size:18px; }
  .top-row > .top-search,.top-row > .top-month{ display:none; }
  /* кнопки справа: одинаковые круглые 38 px — ↻, «Не получается», аккаунт; у уведомлений — только число */
  .top-side{ gap:8px; flex-wrap:nowrap; }
  .notice{ height:32px; padding:0 10px; font-size:13px; gap:4px; }
  .notice .notice-text{ display:none; }
  .stuck{ box-sizing:border-box; width:38px; min-width:0; height:38px; min-height:0; padding:0; border-radius:50%; justify-content:center; }
  .stuck .stuck-text{ display:none; }
  .stuck::before{ content:"?"; font-size:16px; font-weight:700; }
  .menu > summary{ position:relative; width:38px; padding:0; justify-content:center; font-size:0; gap:0; background:var(--bg); }
  .menu > summary::before{ width:19px; height:19px; }
  .menu > summary::after{ content:none; }
  .menu > summary.is-viewas::after{ content:""; position:absolute; top:0; right:0; width:11px; height:11px; border-radius:50%; background:var(--warn); border:2px solid var(--card); }
  /* меню аккаунта — листом над нижней панелью: не обрезается краем экрана при любой длине списка «Смотреть глазами» */
  body.desk .menu-box{ position:fixed; left:8px; right:8px; top:auto; bottom:calc(max(var(--nav-h), env(safe-area-inset-bottom, 0px)) + 8px);
    max-height:calc(100vh - var(--nav-h) - 80px); max-height:calc(100dvh - var(--nav-h) - 80px); overscroll-behavior:contain; border-radius:16px; box-shadow:0 12px 36px rgba(0,0,0,.2); z-index:50; }
  body.desk .menu-box a,body.desk .menu-box button{ min-height:46px; font-size:16px; }
  body.desk details.menu[open] > summary{ visibility:hidden; }   /* 10.10: открытое меню — кнопка профиля не лежит поверх пунктов; закрыть — нажать вне или Esc */
  /* кнопки уехали к заголовку страницы — от шапки остаётся только нижняя панель */
  .top.top-empty{ border-bottom:0; background:none; }
  .top.top-empty .top-row{ min-height:0; padding:0; }
  .top.top-empty .brand{ display:none; }
  /* 17.11: то же самое — ещё до скрипта (обычная загрузка большой страницы: сначала рисуется разметка, потом refresh.js переносит кнопки).
     Раньше полсекунды сверху стояла строка шапки 52 px и всё содержимое прыгало вверх. Теперь шапка сразу нулевая, а кнопки сразу
     в правом верхнем углу — там же, куда их поставит скрипт (у заголовка страницы). Без скрипта они там и остаются. */
  body.desk:has(main .page-head) .top:not(.top-empty){ border-bottom:0; background:none; }
  body.desk:has(main .page-head) .top:not(.top-empty) .top-row{ min-height:0; padding:0; }
  body.desk:has(main .page-head) .top:not(.top-empty) .brand{ display:none; }
  body.desk:has(main .page-head) .top:not(.top-empty) .top-row > .top-side{ position:absolute; top:calc(env(safe-area-inset-top, 0px) + 12px); right:12px; z-index:1; margin:0; }
  .page-head.page-head-side{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; }
  .page-head.page-head-side > :is(h1, :has(> h1)){ order:0; flex:1 1 0; min-width:0; margin-right:auto; }   /* h1 бывает в обёртке (карточка семьи) */
  .page-head.page-head-side > .top-side{ order:1; flex:0 0 auto; margin:0; }
  .page-head.page-head-side > :not(h1):not(:has(> h1)):not(.top-side){ order:2; flex:1 1 100%; }   /* месяц, счётчики — строкой ниже, заголовок не сжимается */

  /* нижняя панель: значок 24 px и подпись, открытая — цветом и «таблеткой» под значком, счётчик — кружком на значке */
  body.desk{ padding-bottom:max(var(--nav-h), env(safe-area-inset-bottom, 0px)); }
  body.desk:has(.top .tabs-row .tab){ --nav-h:calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* 3.11: клавиатура открыта (app.js) — нижней панели нет: не «повиснет» после клавиатуры, полю ввода — место */
  html.kb-open body.desk:has(.top .tabs-row .tab){ --nav-h:0px; }
  html.kb-open .top-row > .tabs-row{ display:none; }
  /* 17.11: по ширине — поля не меньше 4 px и не меньше выреза экрана (телефон лёжа), а на широком (раскрытый складной, планшет стоя)
     вкладки не разъезжаются на весь экран: середина до 560 px. Долгое нажатие не вызывает системное меню ссылки, двойное — не приближает. */
  /* 17.11: низ — не «0», а настоящий низ видимого экрана (--vv-gap меряет app.js): iPhone/iPad после клавиатуры и смены размера окна
     оставляют приклеенное к низу висеть выше низа (снимок владельца с прода) */
  .top-row > .tabs-row{ position:fixed; left:0; right:0; bottom:var(--vv-gap, 0px); z-index:35; display:flex; align-items:stretch; margin:0;
    padding:3px max(4px, env(safe-area-inset-right, 0px), calc((100% - 560px) / 2)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px), calc((100% - 560px) / 2));
    background:var(--card); border-top:1px solid var(--line); box-shadow:0 -6px 20px rgba(0,0,0,.05);
    touch-action:manipulation; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
  .top-row > .tabs-row .tabs{ flex:1 1 0; display:flex; gap:0; overflow:visible; min-width:0; }
  .top-row > .tabs-row:has(.tabs-over) .tabs{ flex:4 1 0; }
  .top-row > .tabs-row:has(.tabs-over) .tabs > .tab:nth-child(n+5){ display:none; }
  .top-row > .tabs-row:has(.tabs-over) > .tabs-more{ display:none; }
  .top-row > .tabs-row .tabs-over{ display:block; flex:1 1 0; min-width:0; }
  /* 17.11: значок у всех вкладок на одной высоте (сверху 6 px), подпись — под ним; подпись из двух слов сама встаёт в две строки, когда
     в одну не помещается («Разовая помощь» на узком), одним размером со всеми; не поместилась и так — многоточие, а не срез посреди буквы.
     Выбранная — цветом и «таблеткой», чуть плотнее (600): ширина подписи почти не меняется, на 320 px «Сообщения» не обрезается. */
  .top-row > .tabs-row .tab{ position:relative; isolation:isolate; flex:1 1 0; min-width:0; box-sizing:border-box; height:56px; display:flex; flex-direction:column;
    align-items:center; justify-content:flex-start; gap:2px; padding:6px 1px 0; border:0; border-radius:14px; background:none; color:var(--mute);
    font:500 11px/11px var(--ui); letter-spacing:-.01em; text-align:center; white-space:normal; overflow:hidden; -webkit-tap-highlight-color:transparent; list-style:none; cursor:pointer; }
  .top-row > .tabs-row .tab::-webkit-details-marker{ display:none; }
  .top-row > .tabs-row .tab .tab-t{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; max-width:100%; overflow:hidden; overflow-wrap:normal; word-break:normal;
    hyphens:none; text-wrap:balance; padding-bottom:1px; }
  .top-row > .tabs-row .tab:hover{ background:none; }
  .top-row > .tabs-row .tab:active{ transform:scale(.94); }
  .top-row > .tabs-row .tab[data-ico]::before{ width:24px; height:24px; opacity:1; }
  .top-row > .tabs-row .tab.is-on{ color:var(--acc); font-weight:600; }
  .top-row > .tabs-row .tab.is-on::after{ content:""; position:absolute; z-index:-1; top:4px; left:50%; width:54px; height:30px; margin-left:-27px; border-radius:15px; background:var(--acc-soft); }
  .tabs-over[open] > .tab{ color:var(--ink); }
  .tabs-over[open] > .tab::after{ content:""; position:absolute; z-index:-1; top:4px; left:50%; width:54px; height:30px; margin-left:-27px; border-radius:15px; background:var(--line); }
  .top-row > .tabs-row .tab .count{ position:absolute; top:2px; left:calc(50% + 5px); min-width:18px; height:18px; padding:0 5px; box-sizing:border-box; border-radius:9px;
    background:var(--acc); color:#fff; font:700 11px/18px var(--ui); text-align:center; box-shadow:0 0 0 2px var(--card); }
  .top-row > .tabs-row .tab .count-warn{ background:var(--warn); }
  .top-row > .tabs-row .tab .count-bad{ background:var(--bad); }
  /* «Ещё»: остальные разделы — список над панелью */
  .tabs-over-box{ position:fixed; right:max(8px, env(safe-area-inset-right, 0px), calc((100vw - 560px) / 2)); bottom:calc(var(--nav-h) + 8px); z-index:36; min-width:230px; max-width:calc(100vw - 16px); max-height:min(60vh, calc(100dvh - var(--nav-h) - 24px)); overflow:auto; overscroll-behavior:contain; padding:6px;
    background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:0 12px 36px rgba(0,0,0,.18); }
  .tabs-over-box .tabs-item{ gap:12px; min-height:48px; padding:6px 12px; border-radius:10px; font-size:16px; justify-content:flex-start; }
  .tabs-over-box .tabs-item[data-ico]::before{ width:22px; height:22px; color:var(--mute); }
  .tabs-over-box .tabs-item > span:first-of-type{ flex:1 1 auto; }
  .tabs-over-box .tabs-item.is-on{ background:var(--acc-soft); }

  /* то, что всплывает снизу, — над панелью, а не под ней */
  .toast{ bottom:calc(max(var(--nav-h), env(safe-area-inset-bottom, 0px)) + 12px); }
  body:has(#toast:not([hidden])) .fresh-bar{ bottom:calc(max(var(--nav-h), env(safe-area-inset-bottom, 0px)) + 72px); }   /* тост и «Есть новое» — не друг на друге */
  .fresh-bar{ bottom:calc(max(var(--nav-h), env(safe-area-inset-bottom, 0px)) + 16px); }
  /* 17.11: поле ввода «Связи» в самом низу переписки стояло на 12 px выше панели (нижнее поле страницы) — между ними светилась полоска фона.
     Теперь поле садится вплотную на панель, а с открытой клавиатурой — вплотную к нижнему краю. */
  body.desk .m-people .talk-compose{ margin-bottom:-12px; }
}
/* 17.11: самый узкий телефон (320–350 px, пять вкладок по 62 px) — подписи на размер меньше и без боковых полей: «Сообщения», «Предложить» целиком */
@media (max-width:350px){
  .top-row > .tabs-row{ padding-left:max(2px, env(safe-area-inset-left, 0px)); padding-right:max(2px, env(safe-area-inset-right, 0px)); }
  .top-row > .tabs-row .tab{ font-size:10px; letter-spacing:-.015em; padding-left:0; padding-right:0; }
  .top-row > .tabs-row .tab.is-on::after,.tabs-over[open] > .tab::after{ width:48px; margin-left:-24px; }
}
/* 17.11: браузер без :has() (старый Android) не знает, есть ли вкладки, — отступ под панель считаем всегда: лучше лишние 60 px снизу, чем текст под панелью */
@supports not selector(:has(*)){
  @media (max-width:900px){
    body.desk{ --nav-h:calc(60px + env(safe-area-inset-bottom, 0px)); }
    html.kb-open body.desk{ --nav-h:0px; }
  }
}

/* iOS 26 (29.09, владелец: «мутность» сверху в «Офисе», в Chrome и Safari): система размывает «стеклом» верх экрана, если у верхнего края
   нет закреплённой сплошной полосы (WebKit берёт её цвет вместо размывки: fixed/sticky, выше 10 px, почти во всю ширину).
   Шапка закреплена сверху; где от неё осталась только нижняя панель — узкая полоса цвета страницы. */
@media (max-width:900px) and (hover:none) and (pointer:coarse){
  .top{ padding-top:env(safe-area-inset-top, 0px); }
  body::before{ content:""; position:fixed; top:0; left:0; right:0; height:max(env(safe-area-inset-top, 0px), 12px); background:var(--card); z-index:19; pointer-events:none; }
  body:has(.top.top-empty)::before,body:not(:has(header.top))::before,body.desk:has(main .page-head)::before{ background:var(--bg); }
}

/* «Офис» слева у сотрудника без вкладок (29.09): имя приложения со значком, не второй заголовок страницы */
.brand.brand-app{ display:inline-flex; align-items:center; gap:8px; font-size:17px; }
.brand.brand-app::before{ content:""; width:26px; height:26px; flex:none; border-radius:7px; background:url("/assets/icons/app-180.png") center/cover no-repeat; box-shadow:0 0 0 1px var(--line); }

/* телефон — доводка по ревью (29.09) */
@media (max-width:900px){
  /* кнопки у заголовка: круг 38 px, зона нажатия 44 px */
  .top-side .top-refresh,.top-side .menu > summary,.top-side .stuck{ position:relative; }
  .top-side .top-refresh::after,.top-side .stuck::after{ content:""; position:absolute; inset:-3px; }
  /* открытое меню аккаунта и «Ещё» — затемнение под листом: тап по нему только закрывает (app.js) */
  body.desk details.menu[open]::before,body.desk details.tabs-over[open]::before{ content:""; position:fixed; inset:0; z-index:34; background:rgba(0,0,0,.28); animation:dim-in .15s ease-out; }
  body.desk details.tabs-over[open]::before{ background:rgba(0,0,0,.12); }
  body.desk details.menu[open] > summary{ z-index:51; }
}
@keyframes dim-in{ from{ opacity:0; } to{ opacity:1; } }
/* телефон лёжа: панель ниже и в строку, меню аккаунта — не во всю ширину */
@media (max-width:900px) and (max-height:500px) and (orientation:landscape){
  body.desk:has(.top .tabs-row .tab){ --nav-h:calc(46px + env(safe-area-inset-bottom, 0px)); }
  /* 17.11: в строку — значок, подпись в одну строку (не влезла — многоточие), счётчик рядом с подписью, а не кружком над текстом */
  .top-row > .tabs-row{ padding-left:max(4px, env(safe-area-inset-left, 0px)); padding-right:max(4px, env(safe-area-inset-right, 0px)); }   /* лёжа — во всю ширину: подписям в строку нужно место */
  .top-row > .tabs-row .tab{ height:42px; flex:1 1 auto; flex-direction:row; justify-content:center; gap:6px; padding:0 8px; font-size:12px; line-height:16px; }
  .top-row > .tabs-row .tab .tab-t{ display:block; flex:0 1 auto; min-width:0; white-space:nowrap; text-overflow:ellipsis; padding-bottom:0; }
  .top-row > .tabs-row .tab[data-ico]::before{ width:20px; height:20px; }
  .top-row > .tabs-row .tab.is-on::after,.tabs-over[open] > .tab::after{ top:6px; height:30px; left:6px; right:6px; width:auto; margin-left:0; }
  .top-row > .tabs-row .tab .count{ position:static; flex:none; min-width:16px; height:16px; padding:0 4px; border-radius:8px; font-size:10px; line-height:16px; box-shadow:none; }
  .tabs-over-box{ right:max(8px, env(safe-area-inset-right, 0px)); }
  body.desk .menu-box{ left:auto; width:360px; }
}

/* 17.11 (компьютер): планшет лёжа — шапка ПК под палец: вкладки и поиск по 40 px, поиск 16 px (планшет не приближает экран при вводе) */
@media (min-width:901px) and (hover:none) and (pointer:coarse){
  .top-row > .tabs-row .tab{ height:40px; }
  .top-search input{ height:40px; font-size:16px; }
}

/* переходы между страницами (29.09, владелец: «задержка между переходами — анимациями переиграть»; 17.11 — мягкие переходы, nav.js).
   1) Отклик в момент нажатия: нажатый раздел сразу горит — таблетка въезжает (.is-tapped); если страница идёт дольше мгновения —
      сверху бежит тонкая полоска (html.nav-busy, задержка 150 мс), дошла — полоска добегает и гаснет (html.nav-done).
   2) Страница не перезагружается: шапка и нижняя панель стоят на месте, содержимое проявляется (html.nav-in — новая страница,
      html.nav-in-tab — раздел из нижней панели: только прозрачность). Сдвиг — 8 px и 0,2 с: приклеенных к экрану частей внутри <main> нет (проверено по страницам).
   3) Настоящий переход (вход, замок, отправка формы) — как раньше, view transitions (Safari 18.2+, Chrome 126+).
   «Меньше движения» в настройках телефона — без анимаций. */
html.nav-busy::after,html.nav-done::after{ content:""; position:fixed; top:env(safe-area-inset-top, 0px); left:0; z-index:100; height:3px; width:0; border-radius:0 3px 3px 0;
  background:var(--acc); pointer-events:none; }
html.nav-busy::after{ animation:leave-bar 2.4s cubic-bezier(.1,.7,.2,1) .15s forwards; }
html.nav-done::after{ width:100%; opacity:0; transition:opacity .22s ease .06s; }
@keyframes leave-bar{ 0%{ width:0; } 30%{ width:45%; } 100%{ width:88%; } }
html.nav-in main,html.nav-in .side-card{ animation:nav-in .2s cubic-bezier(.2,.7,.2,1) both; }
html.nav-in-tab main{ animation:nav-in-tab .13s ease-out both; }
@keyframes nav-in{ from{ opacity:.35; transform:translateY(6px); } }   /* не с нуля: пустого кадра между страницами нет */
html.nav-in main:has(.notice-back){ animation-name:nav-in-tab; }   /* окно «Что изменилось» приклеено к экрану изнутри <main> — без сдвига, только проявление */
html.nav-preview main,html.nav-preview .side-card{ pointer-events:none; }   /* снимок прошлого захода: живая страница на подходе — пока не нажимается */
html.nav-full *{ content-visibility:visible !important; }
/* нажатая ссылка, пока её страница идёт (nav.js): остаётся «нажатой», как строка списка в приложении; кнопки-ссылки — как «занятая» кнопка */
a.nav-going{ opacity:.55; transition:opacity .08s ease; }
#nav-live{ position:fixed; top:0; left:0; }   /* объявление новой страницы для читающих с экрана: приклеено к углу — высоту страницы не меняет */
tr:has(a.nav-going),.card:has(> a.nav-going){ background-color:var(--sel); }   /* возврат в середину списка (nav.js): пару кадров рисуем всё — место не сбивается */
@keyframes nav-in-tab{ from{ opacity:.45; } }
.tabs-row .tab.is-tapped::after{ animation:pill-in .22s cubic-bezier(.2,.9,.3,1.2); }
.tabs-row .tab.is-tapped[data-ico]::before{ animation:ico-pop .25s ease-out; }
@keyframes pill-in{ from{ transform:scaleX(.4); opacity:0; } to{ transform:scaleX(1); opacity:1; } }
@keyframes ico-pop{ 40%{ transform:scale(1.15); } }
@media (min-width:901px){ .tabs-row .tab.is-tapped::after{ animation:none; } }   /* на ПК таблетка стоит на месте — без въезда */

@view-transition{ navigation:auto; }
::view-transition-old(root){ animation:vt-out .1s ease-in both; }
::view-transition-new(root){ animation:vt-in .18s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vt-out{ to{ opacity:0; } }
@keyframes vt-in{ from{ opacity:0; transform:translateY(8px); } }
@media (min-width:901px){ header.top{ view-transition-name:site-top; } }
@media (max-width:900px){ .top-row > .tabs-row{ view-transition-name:site-nav; } }
@supports (-webkit-touch-callout:none){ @media (max-width:900px){ .top-row > .tabs-row{ view-transition-name:none; } } }   /* 15.10: iPhone — панель в переходе страниц оставалась посреди экрана */
::view-transition-group(site-top),::view-transition-group(site-nav){ animation-duration:0s; }
::view-transition-old(site-nav){ display:none; }
::view-transition-new(site-nav){ animation:none; }
@media (prefers-reduced-motion:reduce){
  @view-transition{ navigation:none; }
  html.nav-busy::after,html.nav-in main,html.nav-in .side-card,html.nav-in-tab main,.tabs-row .tab.is-tapped::after,.tabs-row .tab.is-tapped[data-ico]::before{ animation:none; }
  html.nav-busy::after{ width:60%; }
}
/* «есть ли номер у нас» (30.09) — ответ прямо под поиском в шапке */
.top-q-drop{ position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:60; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:0 10px 28px rgba(0,0,0,.16); font-size:14px; line-height:20px; }
.top-q-drop .phone-check-a{ margin:0; } .top-q-drop .phone-check-a span,.top-q-drop .phone-check-q{ color:var(--mute); font-size:13px; }
.top-q-drop .phone-check-a.is-ok b{ color:var(--ok); } .top-q-drop .phone-check-a.is-warn b{ color:var(--warn); } .top-q-drop .phone-check-a.is-info b{ color:var(--bot); }
/* 15.10: «нашлось в другом списке» под поиском в шапке — ссылками */
.top-q-drop .name-find-list{ list-style:none; margin:6px 0 0; padding:0; }
.top-q-drop .name-find-list a{ display:block; padding:6px 0; color:var(--ink); text-decoration:none; }
.top-q-drop .name-find-list a span{ color:var(--mute); }

/* Телефонный каркас (раскладка phone, docs/UI_KIT.md §9): один столбец, шапка ≤ 96 px, кнопки 48–52 px, зазор 12 px,
   поля ≥ 16 px (иначе iOS увеличивает страницу), внизу приклеена панель с главным действием. */
.phone{ font-size:16px; line-height:24px; min-height:100vh; display:flex; flex-direction:column; }
.phone .top{ position:sticky; top:0; }
.top-phone{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 12px; min-height:48px; }
.top-phone .brand{ font-size:18px; line-height:24px; }
.top-left{ display:flex; align-items:baseline; gap:8px; min-width:0; }
.top-left .left-count{ color:var(--mute); font-size:13px; white-space:nowrap; }
.phone .menu > summary{ height:36px; }
.phone .tabs-row{ padding:0 2px; }
.phone .tabs-row::after{ display:none; }
.phone .tabs{ flex-wrap:wrap; overflow:visible; }                 /* пять вкладок связной на 390 px — во вторую строку, а не «Готовс» */
.phone .tab{ padding:11px 10px 10px; font-size:15px; min-height:48px; }
.phone-main{ flex:1 1 auto; width:100%; max-width:560px; margin:0 auto; padding:12px 12px 24px; display:flex; flex-direction:column; }
.phone-main > .card{ padding:16px; }
.phone-main > form{ display:contents; }
.phone .btn{ min-height:48px; font-size:17px; line-height:24px; padding:10px 16px; }
.phone .btn-small{ min-height:40px; font-size:15px; }
.phone .field input:not([type=checkbox]):not([type=radio]),.phone .field select,.phone .field textarea{ min-height:48px; font-size:16px; }
.phone .row-actions{ gap:12px; }

/* очередь: единица работы — номер телефона */
.call-list{ list-style:none; margin:0; padding:0; }
.call-row{ display:flex; align-items:center; gap:12px; min-height:64px; padding:10px 12px; margin:0 0 8px; background:var(--card); border:1px solid var(--line);
  border-left:4px solid var(--f); border-radius:var(--radius); color:var(--ink); text-decoration:none; }
.call-row:active{ background:var(--sel); }
.call-row-body{ flex:1 1 auto; min-width:0; } .call-row-name{ display:block; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.call-row-sub{ display:block; color:var(--mute); font-size:13px; line-height:18px; }
.call-row-go{ flex:none; color:var(--mute); font-size:20px; }
.call-row.is-due{ border-color:var(--warn); border-left-color:var(--warn); }

/* экран человека */
.person-name{ font:600 22px/28px var(--head); margin:0 0 4px; }
.person-big{ font:600 26px/32px var(--ui); letter-spacing:.01em; margin:8px 0; font-variant-numeric:tabular-nums; }
.sum-expected{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:10px 12px; border-radius:var(--radius); background:var(--f-soft); color:var(--f); font-weight:600; margin:12px 0; }
.sum-expected b{ font:600 20px/26px var(--head); }

/* итог кнопками: крупные радио, работают без скрипта */
.choices{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0 0 16px; border:0; padding:0; min-width:0; }
.choices legend{ padding:0; margin:0 0 8px; font-weight:600; }
.choices.is-one{ grid-template-columns:1fr; }
.choice{ position:relative; display:block; }
.choice input{ position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.choice span{ display:flex; align-items:center; justify-content:center; text-align:center; min-height:52px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:var(--radius);
  background:var(--card); font-weight:600; }
.choice input:checked + span{ background:var(--acc); border-color:var(--acc); color:var(--card); }
.choice.is-bad input:checked + span{ background:var(--bad); border-color:var(--bad); }
.choice.is-warn input:checked + span{ background:var(--warn); border-color:var(--warn); }
.choice input:focus-visible + span{ outline:2px solid var(--acc); outline-offset:2px; }

/* нижняя приклеенная панель с главным действием */
.bottom-bar-wrap{ position:sticky; bottom:0; z-index:15; margin:auto -12px -24px; padding:12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background:var(--bg); border-top:1px solid var(--line-strong); }
.bottom-bar{ display:flex; gap:12px; }
.bottom-bar .btn{ flex:1 1 0; min-height:52px; }
.bottom-bar .btn-side{ flex:0 0 auto; }
.bottom-bar form{ flex:1 1 0; display:flex; margin:0; } .bottom-bar form .btn{ width:100%; }
.bottom-note{ margin:0 0 8px; color:var(--warn); font-size:14px; line-height:20px; text-align:center; }
.phone .toast{ bottom:84px; }

/* Печать A4: чёрно-белая, код листа, «напечатал: Вы · дата», номера страниц. */
.print{ background:#fff; color:#000; font:400 12pt/16pt var(--ui); padding:12mm; }
.print h1{ font:600 16pt/20pt var(--head); margin:0 0 4mm; }
.print .table th,.print .table td{ border-bottom:1px solid #000; color:#000; height:9mm; }
.print .table-wrap{ border:0; border-radius:0; background:none; }
.print-head{ display:flex; justify-content:space-between; align-items:baseline; gap:8mm; border-bottom:2px solid #000; margin:0 0 4mm; padding:0 0 2mm; }
.print-code{ font:600 12pt/16pt var(--mono); }
.print .table tbody tr:last-child td{ border-bottom:1px solid #000; }   /* последняя строка листа тоже с линией: место под подпись */
.print .table-wrap + p,.print .table + p,.print-note{ margin-top:6mm; }        /* подпись не липнет к последней строке */
.print-foot{ margin-top:8mm; font-size:10pt; display:flex; justify-content:space-between; }
@page{ size:A4; margin:12mm; @bottom-right{ content:counter(page) " / " counter(pages); } }
@media print{
  .print{ padding:0; } .no-print,.top,.toast,.offline-bar{ display:none !important; }
  .push-bar,.fresh-bar,.refresh-done,.pull-refresh,.side-card{ display:none !important; }   /* 17.11: плашки и боковая карточка в печать не идут */
  .table tr{ break-inside:avoid; } .table thead{ display:table-header-group; }
}

