/* Склад Октябрь. Оформление «Октябрь» (docs/decisions.md, раздел 12).
   Раскладка: на телефоне одна колонка, навигация внизу, главное действие — плавающая кнопка, списки вместо таблиц.
   На компьютере тёмно-синяя боковая панель и таблицы. Тёмно-синий с сайта October Group как основа,
   один акцентный цвет на действиях и данных, цветные плашки состояний, Jost для заголовков и цифр.
   Основа стилей перенесена из прототипа docs/prototype-v2/src/head.html; правки приложения — в конце файла. */
:root {
  --bg: #ECEEF3; --sf: #FFFFFF; --ink: #161D31; --mut: #5A6478; --line: #D7DBE3; --tint: #E6E9F1;
  --blue: #2459F2; --blue-bg: #E1E9FF; --blue-on: #FFFFFF; --blue-l: #8FACFF;
  --orange: #F0661A; --orange-bg: #FDE6D7; --orange-on: #20130A; --orange-l: #FF9F66;
  --teal: #0A7F7B; --teal-bg: #D6EFED; --teal-on: #FFFFFF; --teal-l: #5AD3CB;
  --side: #161D31; --side-ink: #FFFFFF; --side-mut: #A4ACBE; --side-hi: #232B45; --side-line: #2B3450; --side-warn: #F5B24D;
  --ok: #157347; --warn: #94570A; --bad: #C2282D; --ok-bg: #DBF1E5; --warn-bg: #FBE9CC; --bad-bg: #FADADB;
  --scrim: rgba(22, 29, 49, .5); --shadow: 0 10px 28px rgba(22, 29, 49, .2);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C869A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  --r: 12px;
  --font: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --dfont: "Jost", "Century Gothic", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111729; --sf: #1B2237; --ink: #F1F3F7; --mut: #9BA4B6; --line: #2D3550; --tint: #252D45;
    --blue: #8FACFF; --blue-bg: #263363; --blue-on: #0F152A;
    --orange: #FF9F66; --orange-bg: #4A2F21; --orange-on: #1E1208;
    --teal: #5AD3CB; --teal-bg: #17403F; --teal-on: #0B1F1E;
    --side: #0B1020; --side-hi: #1A2139; --side-line: #222A44;
    --ok: #6FD3A6; --warn: #F1B45F; --bad: #F59A9A; --ok-bg: #1B3A34; --warn-bg: #3C3222; --bad-bg: #43272F;
    --scrim: rgba(4, 6, 14, .66); --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111729; --sf: #1B2237; --ink: #F1F3F7; --mut: #9BA4B6; --line: #2D3550; --tint: #252D45;
  --blue: #8FACFF; --blue-bg: #263363; --blue-on: #0F152A;
  --orange: #FF9F66; --orange-bg: #4A2F21; --orange-on: #1E1208;
  --teal: #5AD3CB; --teal-bg: #17403F; --teal-on: #0B1F1E;
  --side: #0B1020; --side-hi: #1A2139; --side-line: #222A44;
  --ok: #6FD3A6; --warn: #F1B45F; --bad: #F59A9A; --ok-bg: #1B3A34; --warn-bg: #3C3222; --bad-bg: #43272F;
  --scrim: rgba(4, 6, 14, .66); --shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
/* Акцентный цвет переключается атрибутом data-accent. --ic-acc — цвет акцентной детали в иконках */
body { --acc: var(--blue); --acc-bg: var(--blue-bg); --on-acc: var(--blue-on); --acc-l: var(--blue-l); --ic-acc: var(--acc); }
body[data-accent="orange"] { --acc: var(--orange); --acc-bg: var(--orange-bg); --on-acc: var(--orange-on); --acc-l: var(--orange-l); }
body[data-accent="teal"] { --acc: var(--teal); --acc-bg: var(--teal-bg); --on-acc: var(--teal-on); --acc-l: var(--teal-l); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--dfont); font-weight: 500; text-wrap: balance; }
small { font-size: 12.5px; }
.muted { color: var(--mut); }
.mono, .inv { font-family: var(--dfont); font-weight: 500; letter-spacing: .05em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.ic { flex: none; display: block; }
.m-only { display: none; }
select { appearance: none; -webkit-appearance: none; background-image: var(--chev); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

/* Каркас */
.layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); }
.side-in { position: sticky; top: env(safe-area-inset-top, 0px); max-height: 100dvh; overflow-y: auto; padding: 22px 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--acc); color: var(--on-acc); --ic-acc: currentColor; }
.brand h1 { font: 500 19px/1.1 var(--dfont); letter-spacing: .02em; }
.brand p { margin: 3px 0 0; font-size: 12.5px; color: var(--side-mut); }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav .grp { margin: 14px 0 4px; padding: 0 10px; font-size: 12.5px; color: var(--side-mut); }
#nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 10px; color: var(--side-mut); font-size: 14px; --ic-acc: var(--acc-l); }
#nav a:hover { color: var(--side-ink); background: var(--side-hi); }
#nav a.on { color: var(--on-acc); background: var(--acc); font-weight: 500; --ic-acc: currentColor; }
#nav a span:first-of-type { flex: 1; }
.cnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: var(--sf); font: 600 11px/18px var(--font); text-align: center; }
.side-user { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--side-line); font-size: 13px; }
.side-user strong { display: block; font-weight: 500; }
.side-user span { color: var(--side-mut); }
.bnav { display: none; }

.content { padding: 28px 36px 64px; min-width: 0; max-width: 1320px; display: flex; flex-direction: column; gap: 18px; }
.top { display: flex; align-items: flex-start; gap: 12px 14px; flex-wrap: wrap; }
.top .tt { flex: 1 1 260px; min-width: 0; }
.top h2 { font: 500 31px/1.1 var(--dfont); letter-spacing: .005em; }
.top .sub { margin: 6px 0 0; color: var(--mut); max-width: 70ch; }
.backb { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--sf); margin-top: -3px; }
.backb.m-only { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--acc); border-radius: 10px; background: var(--acc); color: var(--on-acc); font: 500 14.5px/1.15 var(--font); cursor: pointer; white-space: nowrap; --ic-acc: currentColor; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--sf); color: var(--ink); border-color: var(--line); --ic-acc: var(--acc); }
.btn.ghost:hover { border-color: var(--acc); filter: none; }
.btn.danger { background: none; color: var(--bad); border-color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.filebtn { position: relative; }
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filebtn:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }

/* Блоки и сетки */
.card { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card > h3 { font: 500 18px/1.2 var(--dfont); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card > h3 > a { font: 400 13px/1.2 var(--font); color: var(--mut); text-decoration: underline; text-underline-offset: 3px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.chip, .thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--acc-bg); color: var(--ink); }
.chip { display: grid; place-items: center; }
.thumb { display: block; object-fit: cover; }

/* Полоса показателей: тёмно-синий блок с крупными цифрами */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; overflow: hidden; background: var(--side); border-color: var(--side); color: var(--side-ink); }
.stat { padding: 18px 22px; border-left: 1px solid var(--side-line); }
.stat:first-child { border-left: 0; }
.stat .val { font: 400 40px/1.05 var(--dfont); font-variant-numeric: tabular-nums; }
.stat .lbl { margin-top: 4px; color: var(--side-mut); font-size: 12.5px; line-height: 1.3; }
.stat.hot .val { color: var(--side-warn); }

/* Таблицы: на компьютере таблица, на телефоне список */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; font-weight: 400; color: var(--mut); white-space: nowrap; padding-top: 4px; }
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.m-k { white-space: nowrap; }
td.m-i, th:empty { width: 1%; }
td small { display: block; color: var(--mut); margin-top: 2px; font-weight: 400; }
td a:not(.btn) { font-weight: 500; }
td a:not(.btn):hover { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 22px 8px; text-align: center; color: var(--mut); margin: 0; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--tint); font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--mut); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* Фильтры: все элементы одной высоты и одного вида */
.filters { display: flex; flex-direction: column; gap: 10px; }
.fsearch { display: flex; align-items: center; gap: 8px; height: 46px; max-width: 520px; padding: 0 12px; background: var(--sf); border: 1px solid var(--line); border-radius: 10px; color: var(--mut); }
.fsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
.fsearch input::placeholder { color: var(--mut); }
.fsearch:focus-within { border-color: var(--acc); }
.fstrip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fsel, .frange { height: 40px; border-radius: 20px; border: 1px solid var(--line); background-color: var(--sf); color: var(--ink); font: inherit; font-size: 13.5px; }
.fsel { min-width: 172px; max-width: 240px; padding: 0 34px 0 14px; cursor: pointer; }
.frange { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 14px; color: var(--mut); flex: none; }
.frange input { height: 34px; padding: 0 4px; border: 0; background: none; color: var(--ink); font: inherit; min-width: 0; }
.fsel.on, .frange.on { border-color: var(--acc); background-color: var(--acc-bg); }

/* Формы */
.form { display: grid; gap: 16px; max-width: 780px; }
.form.wide { max-width: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { min-width: 0; }
.field > label:first-child { display: block; font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; background-color: var(--sf); color: var(--ink);
}
.field select { padding-right: 34px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--acc); }
.field .hint { display: block; color: var(--mut); margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }
.inl { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inl > * { flex: 1 1 150px; }
.inl > .btn { flex: 0 0 auto; min-height: 46px; }
.cta { display: flex; gap: 10px; }
.note { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; background: var(--acc-bg); color: var(--ink); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

/* Выбор позиций: галочка, счётчик, переключатель «есть / нет» */
.picks { display: flex; flex-direction: column; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pick.sm { min-height: 50px; padding: 6px 0; }
.pick:last-child { border-bottom: 0; }
.pb { flex: 1; min-width: 0; }
.pn { font-weight: 500; line-height: 1.3; }
.ps { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; margin-top: 3px; font-size: 12.5px; color: var(--mut); }
.cb { width: 28px; height: 28px; flex: none; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--mut); border-radius: 50%; background: none; color: transparent; cursor: pointer; }
.pick.on .cb { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.stp { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.stp button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--sf); color: var(--ink); cursor: pointer; }
.stp button:hover { border-color: var(--acc); }
.qty { width: 50px; height: 40px; padding: 0; text-align: center; border: 0; background: none; color: var(--ink); font: 500 17px/1 var(--dfont); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.qty::-webkit-outer-spin-button, .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.seg button { min-width: 60px; height: 40px; padding: 0 12px; border: 0; background: var(--sf); color: var(--ink); font: inherit; cursor: pointer; }
.seg button.on { background: var(--acc); color: var(--on-acc); }

/* Линия маршрута: откуда и куда */
.route { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 14px; align-items: center; }
.route.one { grid-template-columns: minmax(0, 1fr); }
.rline { height: 2px; margin-top: 24px; margin-right: 10px; background: var(--ink); position: relative; }
.rline::before, .rline::after { content: ""; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; }
.rline::before { left: -4px; background: var(--ink); }
.rline::after { right: -10px; background: var(--acc); }
.route.ro .rline { margin-top: 0; }
.route.ro small { display: block; color: var(--mut); }
.route.ro b { font-weight: 500; font-size: 15.5px; line-height: 1.25; }
.route.ro > div:last-child { text-align: right; }
.route.ro.one > div { text-align: left; }

/* Вкладки */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 12px; border: 0; background: none; font: inherit; color: var(--mut); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tab.on { color: var(--ink); font-weight: 500; border-color: var(--acc); }

dl.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.kv dt { color: var(--mut); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.itemhead { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.itemhead img, .nophoto { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.nophoto { display: grid; place-items: center; gap: 8px; align-content: center; background: var(--acc-bg); color: var(--ink); font-size: 13px; }

/* Шкалы: одна общая сетка, подписи в одну колонку, значение справа */
.bars { display: grid; grid-template-columns: max-content minmax(60px, 1fr) max-content; gap: 13px 14px; align-items: center; font-size: 13.5px; }
.bar { display: contents; }
.bar .bn { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 8px; border-radius: 4px; background: var(--tint); display: block; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 4px; background: var(--acc); min-width: 4px; }
.bar .bv { min-width: 2ch; text-align: right; font: 500 15px/1 var(--dfont); font-variant-numeric: tabular-nums; }

.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.attn li:first-child { border-top: 0; padding-top: 0; }
.attn li:last-child { padding-bottom: 0; }
.attn .chip { background: var(--warn-bg); color: var(--warn); --ic-acc: currentColor; }
.attn li.bad .chip { background: var(--bad-bg); color: var(--bad); }
.attn a { display: flex; flex-direction: column; min-width: 0; }
.attn b { font-weight: 500; }
.attn small { color: var(--mut); }

.quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sf); font-weight: 500; font-size: 13.5px; line-height: 1.2; }
.quick a.q1 { grid-column: 1 / -1; min-height: 58px; background: var(--acc); color: var(--on-acc); border-color: var(--acc); font-size: 15.5px; --ic-acc: currentColor; }

.mlist { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mrow > span:not(.chip) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mrow b { font-weight: 500; }
.mrow small { color: var(--mut); }
.mrow > .ic:last-child { color: var(--mut); }

/* Галерея */
.gdate { font: 500 15px/1.2 var(--dfont); margin: 16px 0 8px; }
.gdate:first-child { margin-top: 0; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sf); cursor: pointer; padding: 0; text-align: left; font: inherit; color: inherit; }
.ph img { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ph span { display: block; padding: 7px 9px; font-size: 13px; }
.ph small { display: block; color: var(--mut); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.previews figure { margin: 0; position: relative; }
.previews img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.previews button { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 6px; background: var(--ink); color: var(--sf); font: inherit; font-size: 11px; padding: 2px 6px; cursor: pointer; }

/* Окно и сообщения */
.modal { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal .box { background: var(--sf); color: var(--ink); border-radius: 14px; padding: 22px; width: min(600px, 100%); max-height: 90%; overflow: auto; display: grid; gap: 16px; }
.modal .box h3 { font-size: 21px; }
.modal .box img { width: 100%; max-width: 100%; border-radius: 10px; }
#toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 60; max-width: min(400px, calc(100% - 32px)); }
.toast { padding: 12px 14px; border-radius: 10px; background: var(--ink); color: var(--sf); font-size: 14px; box-shadow: var(--shadow); }
.toast.err { background: var(--bad); color: var(--bad-bg); }

.prose { max-width: 72ch; display: grid; gap: 10px; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Телефон и узкий экран ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .d-only { display: none !important; }
  .content { padding: 18px 16px calc(150px + env(safe-area-inset-bottom, 0px)); gap: 22px; }
  .top { gap: 10px 12px; }
  .top .tt { flex: 1 1 0; min-width: 55%; }
  .top h2 { font-size: 26px; }
  .backb.m-only { display: grid; }
  .quick.m-only { display: grid; }
  .top .actions { display: contents; }
  .top .actions .btn.accent { position: fixed; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); z-index: 25; min-height: 52px; padding: 0 20px 0 16px; border-radius: 26px; box-shadow: var(--shadow); }

  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--sf); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .bnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: 10.5px; color: var(--mut); }
  .bnav a .ic { box-sizing: content-box; padding: 3px 16px; border-radius: 15px; }
  .bnav a.on { color: var(--ink); font-weight: 600; }
  .bnav a.on .ic { background: var(--acc-bg); }
  .bnav .cnt { position: absolute; top: 0; left: calc(50% + 10px); }
  body.is-form .bnav { display: none; }
  body.is-form .content { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

  .card { background: none; border: 0; border-radius: 0; padding: 0; }
  .card.stats { background: var(--side); border-radius: var(--r); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 14px 16px; border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--side-line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--side-line); }
  .stat .val { font-size: 34px; }
  .split, .cols2, .row2, .itemhead { grid-template-columns: minmax(0, 1fr); }
  .split, .cols2, .stack { gap: 22px; }
  .itemhead img, .nophoto { max-width: 280px; }
  .bar .bn { max-width: 16ch; }

  .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea, .fsearch input { font-size: 16px; }
  .field input:not([type=checkbox]):not([type=file]), .field select { min-height: 48px; }
  .fsearch { max-width: none; height: 48px; }
  .fstrip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .fstrip::-webkit-scrollbar { display: none; }
  .fsel, .frange { flex: none; font-size: 16px; }
  .fsel { min-width: 0; }
  .cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .cta .btn { flex: 1; min-height: 52px; font-size: 16px; }

  /* Таблица превращается в список: заголовок строки, под ним второстепенные поля */
  .tw { overflow: visible; }
  .lt, .lt tbody { display: block; }
  .lt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lt tr { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .lt tbody tr:last-child { border-bottom: 0; }
  .lt td { display: block; width: auto; padding: 0; border: 0; font-size: 12.5px; color: var(--mut); text-align: left; white-space: normal; }
  .lt td.e, .lt td.m-h { display: none; }
  .lt td.m-k { order: -1; flex: 1 1 100%; }
  .lt td.m-t { order: 0; flex: 1 1 100%; font-size: 15px; font-weight: 500; color: var(--ink); }
  .lt.has-r td.m-t { flex-basis: calc(100% - var(--rw, 110px) - 10px); }
  .lt td.m-r { order: 1; flex: 0 0 var(--rw, 110px); text-align: right; font-size: 14px; font-weight: 500; color: var(--ink); }
  .lt td.m-s { order: 2; }
  .lt td[data-l]::before { content: attr(data-l) ": "; font-weight: 400; color: var(--mut); }
  .lt.has-i tr { padding-left: 52px; min-height: 67px; }
  .lt td.m-i { position: absolute; left: 0; top: 13px; }

  .modal { place-items: end stretch; padding: 0; }
  .modal .box { width: 100%; border-radius: 18px 18px 0 0; padding: 22px 16px calc(22px + env(safe-area-inset-bottom, 0px)); }
  #toasts { left: 16px; right: 16px; max-width: none; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Правки приложения ---------- */
[hidden] { display: none !important; }
/* Форма с одной кнопкой ведёт себя как сама кнопка */
.iform { display: contents; }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user > div { flex: 1; min-width: 0; }
.side-user strong, .side-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.side-user button { width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid var(--side-line); border-radius: 10px; background: none; color: var(--side-mut); cursor: pointer; --ic-acc: var(--acc-l); }
.side-user button:hover { color: var(--side-ink); background: var(--side-hi); }
.mrow.out { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.mlist .iform:last-child .mrow { border-bottom: 0; }
.picks .pick[hidden] + .pick { border-top: 0; }
.scan { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; }
td .scan { font-weight: 400; }
.field.err input, .field.err select { border-color: var(--bad); }
.btn.busy { opacity: .6; pointer-events: none; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--mut); font-size: 13.5px; }
.toast { cursor: pointer; }

/* Страница входа */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login .box { width: min(400px, 100%); display: grid; gap: 22px; padding: 28px 26px; border-radius: 16px; background: var(--sf); color: var(--ink); box-shadow: var(--shadow); }
.login .brand { padding: 0; }
.login .brand p { color: var(--mut); }
.login .form { gap: 14px; }
.login .btn { width: 100%; min-height: 48px; font-size: 15.5px; }
.login .field input { font-size: 16px; }

@media (max-width: 900px) {
  .mlist .mrow.out { color: var(--bad); }
  .pager { font-size: 12.5px; }
}
a.tab { display: inline-flex; align-items: center; }
/* Боковая панель тянется на всю высоту окна и на короткой странице */
.layout { min-height: 100vh; min-height: 100dvh; }
a.brand { color: inherit; }
