:root { color-scheme: light dark; --bg: var(--tg-theme-bg-color, #f4f7f6); --surface: var(--tg-theme-secondary-bg-color, #fff); --surface-strong: var(--tg-theme-section-bg-color, #fff); --text: var(--tg-theme-text-color, #16201d); --muted: var(--tg-theme-hint-color, #6f7b76); --accent: var(--tg-theme-button-color, #188b72); --accent-text: var(--tg-theme-button-text-color, #fff); --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--bg)); --border: color-mix(in srgb, var(--text) 12%, transparent); --danger: #c74646; --danger-text: color-mix(in srgb, var(--danger) 60%, var(--text)); }
/* Надписи цвета ошибки («Убрать») — с примесью цвета текста темы: в тёмной
   теме светлее, в светлой темнее, читаются в обеих. */
/* Без color-mix (iOS 16.1 и ниже) переменная недействительна и «Убрать» терял
   красный цвет — там просто цвет ошибки, как до выкладки 2 (ревью 7110563). */
@supports not (color: color-mix(in srgb, red 50%, blue)) { :root { --danger-text: var(--danger); } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 8%, var(--bg)), var(--bg) 40%); color: var(--text); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.app { max-width: 600px; min-height: 100vh; margin: 0 auto; padding: calc(22px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); }
header { margin: 4px 0 24px; } .eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.02em; margin: 0; } #subtitle { color: var(--muted); margin: 8px 0 0; }
.chooser { display: grid; gap: 14px; }.report-choice { appearance: none; width: 100%; display: grid; grid-template-columns: 48px 1fr 20px; column-gap: 12px; align-items: center; text-align: left; padding: 18px; border: 1px solid var(--border); border-radius: 20px; background: color-mix(in srgb, var(--surface-strong) 94%, transparent); color: var(--text); cursor: pointer; box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 6%, transparent); transition: transform .15s ease, border-color .15s ease; }.report-choice::after { content: "›"; color: var(--muted); font-size: 28px; font-weight: 300; }.report-choice:active { transform: scale(.985); }.report-choice span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); font-size: 23px; }.report-choice strong { font-size: 18px; }.report-choice small { display: block; color: var(--muted); margin-top: 3px; }
.form-section { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 20px; background: color-mix(in srgb, var(--surface-strong) 96%, transparent); box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 5%, transparent); } .section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }.section-heading h2 { font-size: 20px; line-height: 1.2; margin: 0; }.section-heading p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }.section-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); font-size: 22px; } label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; } input, select { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); font: inherit; outline: none; } input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); } input::placeholder { color: var(--muted); } input[type=file] { padding: 9px; font-size: 14px; font-weight: 500; } input[type=file]::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 0; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 700; }.file-hint { color: var(--muted); font-size: 12px; font-weight: 500; }.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.hint, .confirm-copy { color: var(--muted); margin: 0; }.actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }button { font: inherit; font-weight: 700; } .actions button, .success button { border: 0; border-radius: 14px; padding: 14px 16px; background: var(--accent); color: var(--accent-text); cursor: pointer; box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 22%, transparent); }.actions .secondary { background: var(--surface); color: var(--text); box-shadow: none; }.actions button:disabled { opacity: .55; }.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-radius: 12px; padding: 11px 12px; white-space: pre-line; }.success { text-align: center; padding: 54px 12px; }.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: #2ea36f; color: white; font-size: 38px; }.success h2 { margin: 0 0 8px; }.success p { color: var(--muted); margin: 0 0 24px; }
@media (max-width: 380px) { .app { padding-left: 14px; padding-right: 14px; } .form-section { padding: 15px; } .two-columns { grid-template-columns: 1fr; } }
.file-list { display: grid; gap: 7px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--accent-soft); color: var(--text); font-size: 13px; }
.file-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 6px 9px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger-text); cursor: pointer; font-size: 12px; font-weight: 700; }
.upload-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 13px; background: var(--accent-soft); }
.upload-status > span { grid-row: span 2; font-size: 24px; animation: upload-spin 1s steps(4, end) infinite; }
.upload-status strong, .upload-status small { display: block; }.upload-status small { color: var(--muted); margin-top: 2px; }
.upload-status progress { width: 100%; height: 7px; accent-color: var(--accent); }
/* Под крутилкой всё время отправки: форма, закрытая до конца загрузки, отчёт не отправит. */
.upload-status .upload-keep { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; font-weight: 600; }
@keyframes upload-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.form-section > label, .form-section input, .form-section select { min-width: 0; max-width: 100%; }
.form-section input[type="date"] { display: block; width: 100%; }
/* Пока открыта форма, внизу страницы — место под «Готово»: «Отправить»
   прокручивается выше и не уходит под кнопку. Место есть всю форму, а не
   только пока видно «Готово»: иначе касание «Отправить» прятало «Готово»,
   страница сдвигалась, и касание промахивалось мимо кнопки. */
body:has(#report-form:not([hidden])) .app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.keyboard-dismiss { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 20; border: 1px solid var(--border); border-radius: 11px; padding: 9px 13px; background: var(--surface-strong); color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 16%, transparent); }
/* Высоту задаёт `rows` у самого поля: описание работ в три-четыре строки и
   список позиций — разные по объёму тексты, и общий min-height растягивал
   короткие поля на пол-экрана. */
textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; resize: vertical; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); font: inherit; line-height: 1.45; outline: none; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.error-text { color: var(--danger); }
.admin-panel { gap: 16px; }
.form-section { min-width: 0; }
.form-section > label { width: 100%; min-width: 0; }
.form-section input, .form-section select, .form-section textarea { display: block; width: 100%; min-width: 0; max-width: 100%; margin: 0; box-sizing: border-box; }
.form-section input[type="date"] { appearance: none; -webkit-appearance: none; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; block-size: 48px; }
.form-section input[type="date"]::-webkit-date-and-time-value { text-align: center; }
.form-section input:not([type="file"]), .form-section select, .form-section textarea,
.admin-panel input:not([type="file"]), .admin-panel select, .admin-panel textarea { font-size: 16px; }
html { -webkit-text-size-adjust: 100%; }
.admin-employees-field { display: grid; gap: 8px; }
.field-label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; }
.admin-employees-list { display: grid; gap: 8px; }
.admin-employee-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.admin-employee-row input { min-width: 0; }
.admin-add { justify-self: start; border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; background: var(--surface); color: var(--accent); cursor: pointer; }
.admin-delete-confirm { display: grid; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--danger) 7%, transparent); white-space: pre-line; }
.admin-delete-confirm p { margin: 0; }
/* «Исправить отчёт» (этап 3, №13): предпросмотр — спокойной рамкой, не красной;
   в форме правки этого режима фото и списков нет. */
.admin-edit-confirm { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); white-space: pre-line; }
.admin-edit-confirm p { margin: 0; }
#report-form.boss-edit [data-boss-hidden] { display: none !important; }
.correction-report-meta { display: grid; gap: 7px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.correction-report-id-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.correction-report-id-row span { color: var(--muted); }
.correction-report-id-row code { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; font-size: 0.95rem; }
.report-list { display: grid; gap: 10px; }
.report-list-item { display: grid; gap: 4px; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 13px; padding: 13px 14px; background: var(--surface); color: var(--text); cursor: pointer; }
.report-list-item strong { color: var(--accent); }
.report-list-item code { font-size: .9rem; overflow-wrap: anywhere; }
/* Подпись отчёта (этап 4А, №18): крупно — что за отчёт, мелко — когда и кто. */
.report-list-item strong, .report-list-item small { overflow-wrap: anywhere; }
.report-list-item small { color: var(--muted); font-size: 13px; font-weight: 500; }
.report-label { display: grid; gap: 3px; overflow-wrap: anywhere; }
.report-label-title { color: var(--text); font-size: 16px; }
.report-label-store { color: var(--text); }
.report-label-meta { font-size: 13px; }
.danger-button { border: 0; border-radius: 12px; padding: 12px 14px; background: var(--danger); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.danger-button:disabled { opacity: .55; }

/* Блок хостинга на экране настроек: читается как строка состояния, а не как
   ещё одна кнопка выбора. */
.hosting-card {
  background: var(--card, #fff);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.hosting-main { margin: 8px 0 0; font-size: 15px; line-height: 1.45; }
.hosting-extra { margin: 4px 0 0; font-size: 13px; color: var(--muted, #7a8699); line-height: 1.4; }
.hosting-billing { display: block; text-align: center; text-decoration: none; border-radius: 14px; padding: 14px 16px; background: var(--accent); color: var(--accent-text); font-weight: 700; box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.hosting-card.is-warning .hosting-main { color: #b3261e; }

/* Аналитика в «Настройках» (этап 4А, №7): выбор периода — общий, таблица на
   ширине iPhone прокручивается вбок, колонка магазина закреплена. */
.period-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.period-choice { border: 1px solid var(--border); border-radius: 999px; padding: 8px 13px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px; }
.period-choice.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.period-custom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.period-custom .admin-add { grid-column: 1 / -1; }
.period-label { margin: 0; font-weight: 700; }
/* Рамка прокручивается только вбок (№27, docs/specs/pravki-0511.md): при
   одном `overflow-x: auto` браузер сам ставит `overflow-y: auto`, рамка
   считается прокручиваемой и по вертикали, и движение пальцем вверх-вниз по
   таблице уходит не странице, а Telegram сворачивает мини-приложение. Вбок —
   до края таблицы и не дальше (`overscroll-behavior-x`). Не `touch-action:
   pan-x` (странице листаться нельзя) и не `overscroll-behavior(-y)` (обрывает
   передачу прокрутки странице); жест Telegram глобально не отключаем. */
.stats-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: 13px; }
.stats-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); }
.stats-table thead th { min-width: 84px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: normal; vertical-align: bottom; }
.stats-table tbody th { font-weight: 600; }
.stats-table tfoot th, .stats-table tfoot td { border-bottom: 0; font-weight: 800; }
.stats-link { border: 0; padding: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.stats-note { font-size: 12px; }
/* «📅 Графики» (work/spec-grafiki-v3.md): полоска дней в один ряд на 320 px, строка точки переносится по словам. Цвета — только переменные темы. */
.sch-main, .sch-point { display: grid; gap: 14px; min-width: 0; }
.sch-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sch-day { display: grid; justify-items: center; gap: 1px; min-width: 0; min-height: 44px; padding: 5px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; }
.sch-dow { font-size: 12px; font-weight: 600; color: var(--muted); }
.sch-num { font-size: 16px; font-weight: 800; }
.sch-day.is-today .sch-dow { color: var(--accent); }
.sch-day.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.sch-day.is-active .sch-dow { color: var(--accent-text); }
.sch-row { min-height: 44px; }
.sch-name { font-weight: 700; overflow-wrap: anywhere; }
.sch-who, .sch-pwho { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.sch-line { display: block; }
.sch-prow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; min-height: 40px; padding: 10px 14px; box-sizing: border-box; }
.sch-prow + .sch-prow { border-top: 1px solid var(--border); }
.sch-prow.is-today .sch-pday { color: var(--accent); }
.sch-pday { font-weight: 700; white-space: nowrap; }
.sch-pwho { color: var(--text); }
.sch-excel { display: grid; gap: 10px; padding-top: 4px; }
/* Название магазина переносится внутри ячейки и не касается рамки (№24,
   docs/specs/sbp.md): «Хрустальногорская» — одно слово шире колонки, поэтому
   перенос внутри слова с дефисом (`lang="ru"` у документа), а где переносов по
   слогам нет — разрыв в любом месте. Ширина колонки — прежняя. */
.stats-table th:first-child, .stats-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 108px; max-width: 132px; text-align: left; white-space: normal; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; box-shadow: 1px 0 0 var(--border); }
.stats-table .stats-link { display: block; max-width: 100%; white-space: normal; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
/* Тех. проблемы (№27): четыре колонки помещаются по ширине без прокрутки
   вбок на 320 и 390 px — первая колонка уже, шапка переносится («Посту-пило»
   — мягким дефисом из app.js), шрифт и отступы чуть меньше. Только этот
   класс: таблица доставок прежняя. */
.tech-stats-table { font-size: 13px; }
.tech-stats-table th, .tech-stats-table td { padding: 8px 6px; }
.tech-stats-table thead th { min-width: 0; font-size: 11px; -webkit-hyphens: manual; hyphens: manual; }
.tech-stats-table th:first-child, .tech-stats-table td:first-child { width: 36%; min-width: 0; max-width: none; }
/* «🧾 Продажи без карт»: четыре колонки по образцу тех. таблицы — помещаются
   на 320 px без прокрутки; «Без карты» в шапке переносится. */
.no-card-table { font-size: 13px; }
.no-card-table th, .no-card-table td { padding: 8px 6px; }
.no-card-table thead th { min-width: 0; font-size: 11px; -webkit-hyphens: manual; hyphens: manual; }
.no-card-table th:first-child, .no-card-table td:first-child { width: 42%; min-width: 0; max-width: none; }
.no-card-sellers { margin-top: 12px; }
#no-card-stats-note p { margin: 8px 0 0; }
/* «📦 Продажи по товарам» (product-stats.js): строка — название слева (длинное
   переносится), штуки и выручка — справа в две строки, «на N точках» — под
   названием. Без таблицы: на 320 px не нужна прокрутка вбок. */
.ps-groups { display: grid; gap: 10px; }
.tb-brow.ps-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 10px; }
.tb-brow.ps-row > .ps-name { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; line-height: 1.3; }
.tb-brow.ps-row > .ps-meta { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; }
.tb-brow.ps-row > .ps-nums { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 14px; }
.tb-brow.ps-row > .ps-nums span { color: var(--muted); font-size: 13px; }
.tb-brow.ps-row > .tb-chev { grid-column: 3; grid-row: 1 / span 2; }
.ps-row.is-static { cursor: default; }
.tb-brow.ps-more { justify-content: center; color: var(--accent); font-weight: 600; text-align: center; grid-template-columns: 1fr; }
.ps-total { margin: 0; font-variant-numeric: tabular-nums; }
#product-stats-note p { margin: 8px 0 0; }
/* «♻️ Аналитика брака / возвратов»: шесть колонок по образцу тех. таблицы —
   без прокрутки вбок на 320 px: шрифт и отступы меньше. Шапка — в одну
   строку (правка Стэна 23.11); пять колонок цифр одной ширины — в знаках
   самого длинного числа (`--ds-num` из defect-stats.js), остаток — магазину.
   Не уже 6 знаков — «Возврат» в шапке; не влезла таблица (320 px) — 5 знаков
   (`ds-narrow`) и «Возвр.». +0,6 знака — жирные цифры «Итого» шире; последней
   — ещё 6 px отступа у рамки. Шестизначные суммы на 320 px не влезают и так —
   тогда таблица листается вбок, магазину остаётся не меньше 48 px. */
.defect-stats-table { --ds-min: 6; --ds-col: calc((max(var(--ds-num, 5), var(--ds-min)) + 0.6) * 1ch + 4px); font-size: 12px; table-layout: fixed; min-width: calc(5 * var(--ds-col) + 48px); }
.defect-stats-table.ds-narrow { --ds-min: 5; }
.defect-stats-table.ds-narrow th:first-child, .defect-stats-table.ds-narrow td:first-child { padding-left: 6px; padding-right: 2px; }
.defect-stats-table col.ds-num { width: var(--ds-col); }
.defect-stats-table col.ds-num:last-child { width: calc(var(--ds-col) + 6px); }
.defect-stats-table th, .defect-stats-table td { padding: 8px 2px; }
.defect-stats-table thead th, .defect-stats-table thead th:first-child { min-width: 0; font-size: 10px; white-space: nowrap; overflow: hidden; }
.defect-stats-table th:first-child, .defect-stats-table td:first-child { min-width: 0; max-width: none; padding-left: 8px; padding-right: 4px; }
.defect-stats-table td:last-child, .defect-stats-table th:last-child { padding-right: 8px; }
.defect-stats-summary { display: grid; gap: 4px; }
.defect-stats-summary p { margin: 0; }
.defect-stats-total { font-weight: 700; }
.defect-stats-units { font-size: 12px; }
.ds-sellers { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ds-sellers p { margin: 0; }
.ds-seller-sum { white-space: nowrap; }
.ds-sellers-label { color: var(--muted); }
.ds-nick, .ds-open-chat { color: var(--accent); text-decoration: none; }
.ds-open-chat { justify-self: start; padding: 4px 0; font-weight: 600; }
.ds-missing { color: var(--danger-text); }
/* «🛠 Задача Манге» (№30): магазины — галочками в столбик, итог — как «Отчёт
   принят», крупной строкой. */
.boss-task-fields { display: grid; gap: 14px; }
.boss-task-store-list { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.boss-task-done { display: grid; gap: 10px; }
.boss-task-done-title { margin: 0; font-size: 20px; font-weight: 800; }

/* Строки продаж в сверке: сумма и способ оплаты в одну линию, фото чека под
   ними и только у безнала. */
.sales-list { display: grid; gap: 12px; }
.sale-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--accent-soft); }
.sale-row .sale-amount, .sale-row .sale-method { width: 100%; }
.sale-row .file-remove { white-space: nowrap; }
.sale-row .sale-photo { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.sale-row .file-list { grid-column: 1 / -1; }
/* «Смешанная» (этап 2, №15): вместо одной суммы — «Нал» и «Безнал» под строкой. */
.sale-row.is-mixed .sale-amount { display: none; }
.sale-row.is-mixed .sale-method { grid-column: 1 / 3; }
.sale-row .sale-parts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sale-row .sale-parts[hidden] { display: none; }
.sale-row .sale-parts label { margin: 0; font-size: 13px; }

/* Категории просрока и галочка «не обнаружен». */
.expiry-category { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.expiry-category + .expiry-category { margin-top: 10px; }
/* Галочки в мини-аппе выглядят одинаково и узнаваемо: скруглённый квадрат,
   круг с контуром. Пустая — только контур, без заливки; отмеченная — заливка
   цветом темы и белая галочка почти во весь круг. */
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.checkbox-row input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; flex: 0 0 auto; margin: 0;
  border: 2px solid var(--border); border-radius: 50%;
  background: transparent; position: relative; transition: background-color .15s, border-color .15s;
}
.checkbox-row input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
/* Галочка занимает почти весь круг: маленькая читается как точка. */
.checkbox-row input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 50%; top: 46%;
  width: 6px; height: 12px; margin: -8px 0 0 -3px;
  border: solid var(--accent-text); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.checkbox-row input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Галочка «просрок не обнаружен» выключает оба блока категории — и это должно
   быть видно, а не только не работать. */
.expiry-category.is-off .expiry-block { opacity: .4; pointer-events: none; }

/* Позиция просрока: название, количество, дата и «Убрать». */
.expiry-block { display: grid; gap: 8px; }
.expiry-items { display: grid; gap: 8px; }
/* «📦 Расходники»: галочка на позицию, строка повыше — под палец. */
.supply-items { display: grid; gap: 4px; }
.supply-row { min-height: 40px; font-size: 15px; font-weight: 600; }
.expiry-row { display: grid; grid-template-columns: 1fr 96px auto; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--accent-soft); }
/* На iOS у пустого поля даты нет подписи — рисуем её сами и убираем, как
   только дату выбрали. */
.expiry-date-field { grid-column: 1 / 3; position: relative; display: block; }
.expiry-date-field .expiry-date-hint { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.expiry-date-field input[type=date] { color: var(--text); }
.expiry-date-field.is-empty input[type=date] { color: transparent; }
/* Дату выбрали — подпись уходит, иначе она ложится поверх самой даты. */
.expiry-date-field:not(.is-empty) .expiry-date-hint { display: none; }
.expiry-row input { width: 100%; box-sizing: border-box; }
.field-label.small { font-size: 13px; color: var(--muted, #7a8699); }

/* График: день — строка, смены — рядом. */
.schedule-grid { display: grid; gap: 10px; }
.schedule-day { display: grid; gap: 8px; padding: 11px; border: 1px solid var(--border); border-radius: 12px; }
.schedule-day .schedule-day-label { font-weight: 700; font-size: 14px; }
.schedule-shift { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; }
.schedule-shift span { color: var(--muted); font-size: 13px; }
.onway-other { display: grid; gap: 10px; margin-top: 4px; }
#onway-own { border: 0; border-radius: 14px; padding: 14px 16px; background: var(--accent); color: var(--accent-text); cursor: pointer; }
#onway-send-other { border: 0; border-radius: 14px; padding: 13px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); cursor: pointer; }
#onway-send-other:disabled { opacity: .55; }

/* Фотографии, которые уже в отчёте: превью рядом с названием кадра, иначе
   непонятно, какую именно убираешь. */
.file-row.photo-row { gap: 10px; }
.photo-thumb { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--surface); }

/* Экран ответственного за тех. проблемы (tech-board.js): «список →
   подробности» в духе родных списков Telegram, цвета — из темы Telegram. */
.tech-board { display: grid; gap: 14px; padding-bottom: 96px; }
.tb-back { justify-self: start; border: 0; background: none; color: var(--accent); padding: 4px 0; cursor: pointer; }
.tb-status { margin: 0; }
.tb-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 10px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.tb-seg button { border: 0; border-radius: 8px; padding: 8px 4px; background: none; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.tb-seg button[aria-pressed="true"] { background: var(--surface-strong); font-weight: 700; box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 18%, transparent); }
.tb-group { margin: 0; border-radius: 14px; background: var(--surface-strong); overflow: hidden; border: 1px solid var(--border); }
.tb-row, .tb-card { position: relative; width: 100%; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font-weight: 400; }
.tb-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.tb-row + .tb-row::before, .tb-card + .tb-card::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 1px solid var(--border); }
.tb-card + .tb-card::before { left: 90px; }
.tb-row.is-dim { opacity: .5; cursor: default; }
.tb-name { flex: 1; min-width: 0; }
.tb-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-count.is-hot { color: var(--text); font-weight: 700; }
.tb-chev { color: var(--muted); font-size: 22px; line-height: 1; }
.tb-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
.tb-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; background: color-mix(in srgb, var(--text) 8%, transparent) center / cover no-repeat; overflow: hidden; }
.tb-more { position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700; }
.tb-card-body { display: grid; gap: 3px; min-width: 0; }
.tb-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.tb-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tb-done { color: #2ea36f; font-size: 13px; font-weight: 600; }
.tb-empty { margin: 0; padding: 40px 16px; text-align: center; color: var(--muted); }
.tb-resolved { justify-self: start; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, #2ea36f 15%, transparent); color: #2ea36f; font-size: 14px; font-weight: 700; }
.tb-full { margin: 0; padding: 14px; font-size: 17px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.tb-kv dt, .tb-kv dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 15px; }
.tb-kv dt:first-of-type, .tb-kv dt:first-of-type + dd { border-top: 0; }
.tb-kv dt { color: var(--muted); padding-right: 6px; }
.tb-kv dd { text-align: right; overflow-wrap: anywhere; }
.tb-kv code { font-size: 13px; }
.tb-label { margin: 4px 14px -8px; color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.tb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tb-grid button { aspect-ratio: 1; max-width: 100%; border: 0; border-radius: 8px; padding: 0; background: color-mix(in srgb, var(--text) 8%, transparent) center / cover no-repeat; cursor: pointer; }
.tb-wait { display: grid; place-items: center; }
/* Задача от руководства без фото (№30): значок вместо превью. */
.tb-nophoto { display: grid; place-items: center; font-size: 26px; }
/* Раздел «Задачи от руководства» — своей группой над магазинами. */
.tb-tasks { margin-bottom: 4px; }
.tb-wait::after { content: "⏳"; font-size: 18px; }
.tb-fail { display: grid; place-items: center; }
.tb-fail::after { content: "⚠"; font-size: 18px; color: var(--muted); }
.tb-fail-box { display: grid; gap: 10px; justify-items: start; padding: 14px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); }
.tb-fail-box p { margin: 0; }
.tb-retry { border: 0; border-radius: 10px; padding: 9px 16px; background: var(--accent); color: var(--accent-text); font-size: 15px; cursor: pointer; }
.tb-skel { display: block; min-height: 16px; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 25%, color-mix(in srgb, var(--text) 13%, transparent) 50%, color-mix(in srgb, var(--text) 7%, transparent) 75%); background-size: 200% 100%; animation: tb-shimmer 1.2s infinite linear; }
.tb-skel-lines { display: grid; gap: 8px; }
/* Этап 4Б: фото решения у ответственного (выбор до «Решено») и список
   проблем магазина в аналитике боссов. */
.tb-res { display: grid; gap: 10px; padding: 12px 14px; }
.tb-res-hint, .tb-res-state { margin: 0; color: var(--muted); font-size: 14px; }
.tb-res-state { padding: 0 14px; }
.tb-res-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tb-res-item { position: relative; aspect-ratio: 1; }
.tb-res-thumb { position: absolute; inset: 0; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent) center / cover no-repeat; }
.tb-res-remove { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border: 0; border-radius: 13px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.tb-res-add { position: relative; display: grid; place-items: center; min-height: 46px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 16px; font-weight: 700; cursor: pointer; }
.tb-res-input, .boss-task-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* Комментарий к «Решено» (№25, docs/specs/sbp.md): поле под фото и строка
   «💬 …» у ответственного и в аналитике. 16px — иначе iPhone приближает поле. */
.tb-res-comment { gap: 6px; }
.tb-res-comment-input { font-size: 16px; font-weight: 400; }
.tb-res-comment-text { margin: 0; padding: 0 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-brow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; width: 100%; padding: 12px 14px; border: 0; background: none; color: var(--text); text-align: left; font-weight: 400; cursor: pointer; }
.tb-brow + .tb-brow::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 1px solid var(--border); }
.tb-brow > :not(.tb-chev) { grid-column: 1; }
.tb-brow .tb-chev { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.tb-open { color: var(--danger-text); font-weight: 600; }
@keyframes tb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tb-main { position: fixed; left: 50%; bottom: 0; z-index: 25; transform: translateX(-50%); width: min(600px, 100%); padding: 8px 18px calc(8px + env(safe-area-inset-bottom)); background: var(--surface-strong); border-top: 1px solid var(--border); }
.tb-main-btn { width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-size: 17px; cursor: pointer; }
.tb-main-btn.is-secondary { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--accent); }
.tb-main-btn:disabled { opacity: .6; }
/* Низ плашки — на одной высоте над родной кнопкой; длинный текст растёт вверх. */
.tb-toast { position: fixed; left: 50%; top: calc(var(--tg-viewport-stable-height, 100vh) - 36px - env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, -100%); width: min(560px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #2b2b2f; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.tb-toast span { flex: 1; font-size: 15px; font-weight: 500; }
.tb-toast-close { flex: none; width: 32px; height: 32px; margin: -6px -6px -6px 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 16px; opacity: .8; }
.tb-photo-note { grid-column: 1 / -1; margin: 2px 2px 6px; color: var(--muted); font-size: 13px; }
.tb-fail-text { color: var(--muted); }
.tb-noscroll { overflow: hidden; }
/* Просмотр фото. Высота — видимая область Telegram, а не 100vh: на телефоне
   окно мини-приложения бывает выше видимой части, и фото уезжало вниз. */
.photo-viewer { position: fixed; top: 0; left: 0; right: 0; height: var(--tg-viewport-stable-height, 100%); z-index: 50; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #000; color: #fff; overflow: hidden; transition: background-color .2s ease; }
.photo-viewer[hidden] { display: none; }
.tb-v-top { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; min-height: 48px; padding: env(safe-area-inset-top) 4px 0; }
.tb-v-close { width: 48px; height: 48px; border: 0; border-radius: 24px; background: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.tb-v-close:active { background: rgba(255, 255, 255, .15); }
.tb-v-count { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Область фото между счётчиком и подсказкой: фото в неё вписывается целиком. */
.tb-stage { position: relative; min-height: 0; overflow: hidden; }
.tb-stage:not(.is-dragging) { transition: transform .2s ease; }
.tb-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.tb-track::-webkit-scrollbar { display: none; }
.tb-track.is-locked { overflow-x: hidden; }
.tb-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: center; touch-action: pan-x; }
.tb-slide.is-zoomed { touch-action: none; }
/* Фото занимает всю область и вписывается в неё (object-fit): проценты
   max-height в WebKit (Telegram на iPhone и на Mac) не срабатывали, и высокое
   фото обрезалось снизу. */
.tb-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; color: #fff; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.tb-slide img:not([src]) { visibility: hidden; }
.tb-v-msg { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); margin: 0; text-align: center; color: #ddd; font-size: 15px; }
.tb-slide.is-failed .tb-v-msg { cursor: pointer; text-decoration: underline; }
/* Стрелки — только там, где есть мышь (Telegram на компьютере); на телефоне
   листают свайпом. */
.tb-v-arrow { display: none; position: absolute; top: 50%; z-index: 2; width: 44px; height: 64px; margin-top: -32px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.tb-v-arrow.is-prev { left: 12px; }
.tb-v-arrow.is-next { right: 12px; }
@media (hover: hover) and (pointer: fine) { .tb-v-arrow { display: block; } .tb-v-arrow:hover { background: rgba(255, 255, 255, .22); } }
.tb-v-hint { margin: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; color: #9aa; font-size: 13px; }
.tb-v-hint .is-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .tb-v-hint .is-touch { display: none; } .tb-v-hint .is-mouse { display: inline; } }
@media (prefers-reduced-motion: reduce) { .tb-skel { animation: none; } .tb-stage, .photo-viewer { transition: none !important; } }

/* --- Новая отправка (выкладка 2, макет 09.10): фото по одному, плашки, статус --- */
.pending-banners { display: grid; gap: 12px; }
.draft-banner { display: grid; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, #e0a100 45%, transparent); background: color-mix(in srgb, #e0a100 14%, var(--surface-strong)); }
.draft-banner p { margin: 0; }
.draft-banner .meta { color: var(--muted); font-size: 14px; }
.banner-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.banner-primary { flex: 1 1 200px; border: 0; border-radius: 13px; padding: 12px 14px; background: var(--accent); color: var(--accent-text); cursor: pointer; }
.banner-link { border: 0; background: none; padding: 6px 0; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.confirm-box { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-strong); border: 1px solid var(--border); }
.confirm-box p { margin: 0; font-size: 14px; }
.confirm-row { display: flex; align-items: center; gap: 12px; }
.publishing-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; text-align: left; padding: 13px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); color: var(--text); cursor: pointer; }
.publishing-row .pub-icon { grid-row: span 2; font-size: 22px; }
.publishing-row small { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.publishing-row.is-done { border-color: color-mix(in srgb, #2ea36f 40%, transparent); background: color-mix(in srgb, #2ea36f 10%, var(--surface-strong)); }

.draft-summary { display: grid; gap: 8px; }
.upload-line { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.upload-line .upload-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.upload-line .upload-top strong { font-variant-numeric: tabular-nums; }
.upload-line .upload-top span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.upload-line.is-done { background: color-mix(in srgb, #2ea36f 10%, var(--surface-strong)); border-color: color-mix(in srgb, #2ea36f 35%, transparent); }
.bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.upload-line.is-done .bar i { background: #2ea36f; }
.note { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.note strong { display: block; margin-bottom: 2px; }
.note.warn { background: color-mix(in srgb, #e0a100 14%, var(--surface-strong)); border: 1px solid color-mix(in srgb, #e0a100 40%, transparent); }
.note.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface-strong)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.note.calm { background: var(--surface); color: var(--muted); }

.thumb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.thumb { position: relative; aspect-ratio: 1; max-width: 100%; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--text) 8%, transparent); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.is-processing::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--text) 12%, transparent) 50%, transparent 80%); background-size: 200% 100%; animation: thumb-shimmer 1.1s linear infinite; }
.thumb .badge { position: absolute; right: 4px; bottom: 4px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.thumb .badge.ok { background: #2ea36f; }
.thumb .badge.bad { background: var(--danger); }
.thumb .badge.wait::after { content: ""; width: 10px; height: 10px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: upload-spin 0.8s linear infinite; }
.thumb .ring { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.thumb .ring i { display: block; height: 100%; width: 0; background: #fff; }
@keyframes thumb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; background: rgba(0, 0, 0, .3); }
.sheet-wrap[hidden] { display: none; }
.thumb-menu { width: min(600px, 100%); margin: 0 auto; display: grid; gap: 12px; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface-strong); box-shadow: 0 -6px 24px rgba(0, 0, 0, .18); }
.sheet-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.sheet-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: color-mix(in srgb, var(--text) 8%, transparent); }
.sheet-head p { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions button { flex: 1; border-radius: 12px; padding: 12px 10px; font-size: 15px; cursor: pointer; }
.sheet-remove { border: 0; background: color-mix(in srgb, var(--danger) 16%, var(--surface-strong)); color: var(--danger-text); }
.sheet-plain { border: 1px solid var(--border); background: var(--surface); color: var(--text); }

.send-wait { display: grid; gap: 4px; padding: 13px 14px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.send-wait strong { font-size: 15.5px; }
.send-wait span { color: var(--muted); font-size: 14px; }

.publish-steps { display: grid; margin: 0 0 18px; text-align: left; border-radius: 16px; background: var(--surface-strong); border: 1px solid var(--border); }
.publish-steps .step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
.publish-steps .step + .step { border-top: 1px solid var(--border); }
.publish-steps .step strong { display: block; font-size: 15.5px; }
.publish-steps .step small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.publish-steps .bar { margin-top: 8px; }
.dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; margin-top: 1px; }
.dot.ok { background: #2ea36f; }
.dot.run { border: 2.5px solid var(--accent); border-right-color: transparent; animation: upload-spin .9s linear infinite; }
.dot.warn { background: #e0a100; }
.dot.bad { background: var(--danger); }
.publish-hint { margin: 0 0 18px; }
/* «Повторить» после «Нет связи с сервером» — единственное действие экрана, как «Отправить». */
.retry-start { display: block; width: 100%; margin: 0 0 16px; border: 0; border-radius: 14px; padding: 14px 16px; background: var(--accent); color: var(--accent-text); cursor: pointer; box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.success .secondary-button { display: block; width: 100%; margin-top: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
/* Во всю ширину — только на экране живого статуса новой отправки; прежний
   экран «Отправлено» остаётся как был (ревью выкладки 2, круг 16). */
.success:has(#publish-steps:not([hidden])) #new-report { display: block; width: 100%; }
@media (prefers-reduced-motion: reduce) { .thumb .badge.wait::after, .dot.run, .thumb.is-processing::before { animation: none; } .bar i { transition: none; } }

/* «🔍 Ревизии» (docs/specs/revizii.md): экран ревизора и раздел в «Настройках». */
.rv-item { display: grid; gap: 8px; padding: 12px 14px; }
.rv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rv-head strong { min-width: 0; overflow-wrap: anywhere; }
.rv-state { margin: 0; font-weight: 700; font-size: 15px; }
.rv-done { color: #2ea36f; }
.rv-cancelled, .rv-nothing { color: var(--muted); }
.rv-kv { margin: 0 -14px; }
.rv-id { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rv-shortage { margin: 0; font-weight: 700; }
.rv-big { font-size: 20px; }
.rv-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-small, .rv-deduct, .rv-yes { border: 1px solid var(--border); border-radius: 12px; padding: 9px 14px; background: var(--surface); color: var(--text); cursor: pointer; }
.rv-deduct, .rv-yes { border: 0; background: var(--accent); color: var(--accent-text); }
.rv-danger { color: var(--danger); }
.rv-armed { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.rv-deduct-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rv-deduct-row input { font-size: 16px; }
.rv-question { margin: 0 0 8px; font-weight: 700; }
.rv-deductions { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rv-deduction { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.rv-deduction > span, .rv-deduction > s { min-width: 0; overflow-wrap: anywhere; }
.rv-deduction.is-cancelled { color: var(--muted); }
.rv-closed summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.rv-closed[open] { display: grid; gap: 10px; }
.rv-admin { gap: 12px; }
/* «🧰 Прочее» на экране ответственного (docs/specs/prochee.md): webapp/tech-work.js. */
/* «＋ Добавить задачу» (docs/specs/prochie-raboty.md) — рядом с вкладками; на узком экране переносится под них. */
.tb-seg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.tb-seg-row .tb-seg { flex: 1 1 170px; }
.tb-add { flex: 1 0 auto; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tb-add:active { opacity: .8; }
.tw-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tw-confirm-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
