/* golos-text-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(./golos-text-cyrillic-ext-wght-normal-hICkpzq7.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* golos-text-cyrillic-wght-normal */
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(./golos-text-cyrillic-wght-normal-mKek_fSS.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* golos-text-latin-ext-wght-normal */
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(./golos-text-latin-ext-wght-normal-B-I5lbAQ.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* golos-text-latin-wght-normal */
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(./golos-text-latin-wght-normal-BS5oQT7X.woff2) format('woff2-variations');
  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;
}/*
 * Лес — токены и база. Цвета и размеры — из утверждённых макетов (docs/mockups).
 * Стили компонентов лежат рядом с ними (ui/*.css, blocks/**, screens/**).
 * Граница планшет/телефон — 900 px: в каждом файле свой @media (max-width: 900px).
 */
:root {
  /* системные панели и вырезы экрана: приложение Android рисуется под ними (edge-to-edge); в браузере — 0.
     --safe-area-inset-* подставляет Capacitor (SystemBars) там, где WebView не знает env() */
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sar: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --bg: #F2F1EC;
  --surface: #FFFFFF;
  --surface-2: #E8E6DF;
  --hover: #F7F6F2;
  --text: #14161A;
  --text-2: #3F454D;
  --muted: #62686F;
  --line: #CCC8BE;
  --line-strong: #8F8A7F;
  --primary: #1B6644;
  --primary-press: #134D33;
  --primary-soft: #DAEEE2;
  --selected: #EEF6F1;
  --warn-bg: #FFE4AE;
  --warn-soft: #FFF4DC;
  --warn-text: #4F3300;
  --warn-line: #D9A233;
  --danger: #B42318;
  --danger-soft: #FCE1DD;
  --danger-text: #7A160F;
  --info: #1A56A0;
  --info-soft: #DCE8F9;
  --info-text: #123E74;
  --unsynced: #E2ECFA;
  --radius: 14px;
  --radius-lg: 22px;
  --font: "Golos Text Variable", "Golos Text", system-ui, sans-serif;
  /* высота нижней панели и боковые поля страницы */
  --bar-h: 104px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 24px; font-weight: 800; }
h3 { margin: 0; font-size: 20px; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }

/* иконки */
.ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 20px; height: 20px; }
.ic-lg { width: 34px; height: 34px; }

/* раскладка */
.spacer { flex-grow: 1; }
.grow { flex-grow: 1; min-width: 0; }
.grow2 { flex-grow: 2; }
.stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }
.row-gap { display: flex; align-items: center; gap: 12px; }
.row-gap-sm { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.divider { height: 2px; background: var(--line); margin: 4px 0; flex: none; }

/* текст */
.center { text-align: center; }
.strong { font-weight: 700; }
.big { font-size: 22px; }
.huge { font-size: 28px; font-weight: 800; }
.lead { font-size: 19px; }
.hint { font-size: 15px; color: var(--text-2); }
.muted { color: var(--muted); }
.ok { color: var(--primary); }
.nowrap { white-space: nowrap; }
.err-text { color: var(--danger); font-weight: 600; font-size: 15px; }

/* вращение значка: синхронизация идёт */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* телефон — уже 600 px: списки карточками, поля формы в одну колонку. Граница — «not … (max-width)», а не
   «min-width: 601px»: у 8-дюймовых планшетов ширина дробная (~600,2–600,9 px) и между 600 и 601 не прятались ни таблица,
   ни карточки — на экранах харвестера и форвардера записи выводились дважды */
@media not all and (max-width: 600px) {
  .only-phone { display: none !important; }
}
@media (max-width: 600px) {
  .not-phone { display: none !important; }
}

/* что видно только на планшете / только на телефоне и планшете вертикально (граница 900 px) */
@media not all and (max-width: 900px) {
  .only-narrow { display: none !important; }
}
@media (max-width: 900px) {
  :root { --bar-h: 92px; --gutter: 14px; }
  .only-wide { display: none !important; }
  h1 { font-size: 24px; }
  h2 { font-size: 21px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
/* Верхняя стрелка — подтверждения отправки; нижняя — получение без выдуманного процента. */
.btn-sync-pending { background: var(--info-soft); border-color: var(--info); color: var(--info-text); }
.btn-sync[disabled] { opacity: 1; }
.btn-sync-manual { border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.sync-count { min-width: 36px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--info); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.sync-count-value { display: inline-block; animation: sync-number-in 160ms ease-out; }
.sync-symbol { position: relative; display: inline-flex; flex: none; width: 26px; height: 26px; }
.sync-symbol > .ic { position: absolute; inset: 0; width: 100%; height: 100%; }
.btn-sync-running .sync-symbol-base { opacity: .3; }
.btn-sync-running .sync-when { max-width: none; white-space: nowrap; }
.sync-symbol-fill { color: var(--info); transition: clip-path 220ms ease-out; }
.sync-symbol-receive { color: var(--info); clip-path: inset(50% 0 0); }
.btn-sync-running .sync-symbol { animation: sync-wait 2.8s ease-in-out 700ms infinite; }
@keyframes sync-number-in { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes sync-wait { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) {
  .sync-count-value, .btn-sync-running .sync-symbol { animation: none; }
  .sync-symbol-fill { transition: none; }
}
.sync-error { margin: 12px var(--gutter) 0; }

@media (max-width: 900px) {
  .btn-sync { min-height: 54px; padding: 0 12px; font-size: 15px; }
  .sync-when { max-width: 3.2em; text-align: left; line-height: 1.1; white-space: normal; }
  .sync-error { margin-top: 10px; flex-wrap: wrap; }
}
@media not all and (max-width: 900px) { .sync-when { white-space: nowrap; } }
/* «Администрирование» — главная: под телефон (на планшете — по центру, не шире 760 px) */
.adm-page { flex: 1; padding: 12px var(--gutter) calc(24px + var(--sab)); display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 760px; margin: 0 auto; box-sizing: border-box; }
.adm-search, .adm-date { min-height: 52px; padding: 0 14px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 18px; color: var(--text); }
.adm-range { display: flex; border: 2px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.adm-range button { flex: 1; min-height: 50px; border: 0; background: none; font: inherit; font-size: 16px; font-weight: 800; color: var(--text-2); cursor: pointer; }
.adm-range button + button { border-left: 2px solid var(--line); }
.adm-range button.on { background: var(--primary); color: #fff; }
.adm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-tile { padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.adm-tile small { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }
.adm-tile b { display: block; font-size: 24px; font-weight: 900; }
.adm-tile span { font-size: 13px; font-weight: 700; color: var(--muted); }
.adm-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.adm-chip { flex: none; min-height: 42px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; font-size: 15px; font-weight: 800; color: var(--text-2); cursor: pointer; }
.adm-chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-press); }
select.adm-chip { max-width: 220px; }
.adm-empty { padding: 48px 0; text-align: center; font-size: 18px; font-weight: 700; color: var(--muted); }
.adm-day { display: flex; flex-direction: column; gap: 8px; }
.adm-day h3 { margin: 6px 0 0; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
/* карточка: м³ — один в своём столбце (отметка поездки его не сдвигает), остальное — во всю ширину под номером */
.adm-doc { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.adm-annul { opacity: 0.6; }
.adm-ico { grid-row: span 3; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; }
.adm-ico-t { background: #1A56A0; }
.adm-ico-f { background: #B45309; }
.adm-num { display: flex; align-items: center; gap: 6px; min-width: 0; }
.adm-num .num { font-size: 15px; padding: 2px 8px; border-radius: 8px; }
.adm-num small { font-size: 14px; font-weight: 600; color: var(--muted); }
.adm-vol { font-size: 18px; font-weight: 900; text-align: right; white-space: nowrap; }
.adm-who { grid-column: 2 / 4; font-size: 16px; font-weight: 800; }
.adm-where { grid-column: 2 / 4; font-size: 14px; color: var(--text-2); }
.adm-state { grid-column: 2 / 4; justify-self: start; margin-top: 4px; }
.adm-annul-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--danger-soft); color: var(--danger-text); font-size: 13px; font-weight: 800; }
/* свой период: «с» и «по» в строку */
.adm-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-dates label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.adm-dates span { font-size: 16px; font-weight: 800; color: var(--text-2); }
.adm-dates .adm-date { flex: 1; min-width: 0; width: 100%; box-sizing: border-box; padding: 0 10px; font-size: 17px; }
/* поиск — той же высоты, что кнопки аккаунта и синхронизации (на телефоне они ниже); прижат вправо вместо Spacer */
.adm-top-btn { margin-left: auto; }
@media (max-width: 900px) {
  .btn.adm-top-btn { width: 54px; min-height: 54px; }
}
/* поездка и «аннулирована» в карточке — одинаковыми плашками */
.adm-state .trip-tag, .adm-state .trip-done { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.adm-state .trip-done { gap: 6px; background: var(--primary-soft); }

/* «Код для устройства» (22B) */
.codes { display: flex; flex-direction: column; gap: 10px; }
.codes-it { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 76px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; text-align: left; color: inherit; cursor: pointer; }
.codes-it.on { border-color: var(--primary); box-shadow: 0 0 0 4px #DAEEE2; }
.codes-ic { font-size: 28px; }
.codes-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.codes-nm b { font-size: 21px; }
.codes-nm span { font-size: 15px; color: var(--muted); font-weight: 600; }
.codes-code { flex-basis: 100%; display: flex; align-items: baseline; justify-content: center; gap: 14px; padding: 10px 0 2px; }
.codes-code b { font-size: 48px; font-weight: 900; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.codes-code span { font-size: 17px; font-weight: 700; color: var(--muted); }
/* метка показа экрана: поверх всего, нажатия проходят насквозь */
.screen-badge { position: fixed; z-index: 1100; top: calc(var(--sat) + 10px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--danger); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); pointer-events: none; }
.screen-badge i { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: screen-blink 1.4s ease-in-out infinite; }
@keyframes screen-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  .screen-badge i { animation: none; }
}
/* метка тестового сервера: маленькая, поверх всего, ничего не сдвигает и не мешает нажатиям */
.top-badges { position: fixed; z-index: 1100; top: var(--sat); left: 50%; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.test-badge { padding: 2px 14px 3px; border-radius: 0 0 10px 10px; background: #E8740C; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
/* режим администратора открыт — замок той же меткой */
.unl-badge { display: inline-flex; align-items: center; padding: 2px 10px 3px; border-radius: 0 0 10px 10px; background: #E07B1F; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.unl-badge .ic, .unl-badge svg { width: 16px; height: 16px; }
/* подставное место («Сервис») — та же метка, другим цветом */
.fake-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px 3px 8px; border-radius: 0 0 10px 10px; background: #6B3FA0; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.fake-badge .ic { width: 15px; height: 15px; }
/* метка показа экрана — ниже, чтобы не закрывать */
.top-badges:not(:empty) ~ .screen-badge { top: calc(var(--sat) + 28px); }
/* Установка обновления: шкала */
.progress { height: 26px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); transition: width 0.3s; }
.progress-err { background: var(--danger); }

/* нижняя строка: номер планшета, версия, «Проверить обновления» */
.footer-ver { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 15px; color: var(--muted); font-weight: 600; }
/* под панелью навигации Android — тот же фон (экран сверху снизу отступил на --sab, строка его забирает) */
.footer-bar { border-top: 2px solid var(--line); background: var(--surface); min-height: calc(68px + var(--sab)); padding: 6px 12px calc(6px + var(--sab)); margin-bottom: calc(-1 * var(--sab)); flex: none; }
.footer-left { justify-content: flex-start; }

/* Обновление: кружок в верхней строке (заполняется по ходу, внутри — проценты; скачано — закрашен целиком), карточка по нажатию */
.upd-ring { --p: 0%; flex: none; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) var(--p), var(--line) 0); cursor: pointer; }
.upd-ring span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--primary); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.upd-ring.full span { background: var(--primary); color: #fff; }
.upd-ring.full { background: var(--primary); }
.upd-ring.err { background: conic-gradient(var(--danger) var(--p), var(--danger-soft) 0); }
.upd-ring.err span { color: var(--danger); }
/* верхней строки на экране нет — в правом верхнем углу */
.upd-float { position: fixed; z-index: 1000; top: calc(14px + var(--sat)); right: calc(var(--gutter) + var(--sar)); border-radius: 50%; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22); }
.upd-back { position: fixed; inset: 0; z-index: 1000; border: 0; padding: 0; background: transparent; }
.upd-card { position: fixed; z-index: 1001; top: calc(86px + var(--sat)); right: calc(12px + var(--sar)); width: min(430px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 2px solid var(--primary); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.upd-card-err { border-color: var(--danger); }
.upd-v { font-size: 15px; font-weight: 700; color: var(--muted); }
.upd-eta { font-size: 32px; font-weight: 900; line-height: 1.1; }
.upd-t { font-size: 18px; font-weight: 700; }
.upd-mb { font-size: 15px; font-weight: 600; color: var(--muted); }
.upd-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 4px 0; }
.upd-fill { height: 100%; background: var(--primary); transition: width 0.3s; }
.upd-preparing { animation: upd-preparing 1.5s ease-in-out infinite; }
@keyframes upd-preparing { 50% { opacity: 0.5; } }
.upd-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .upd-ring { width: 44px; height: 44px; }
  .upd-ring span { width: 34px; height: 34px; font-size: 12px; }
  .upd-card { top: calc(78px + var(--sat)); }
}
/* Кнопка аккаунта вверху слева и значок техники */
.acct { display: flex; align-items: center; gap: 12px; min-height: 62px; min-width: 0; padding: 6px 18px 6px 6px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; color: inherit; text-align: left; }
.acct-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.acct-name { font-weight: 800; font-size: 20px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* оператор — под техникой, сильно мельче */
.acct-sub { font-size: 14px; font-weight: 600; line-height: 1.15; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «Администрирование» — без значка: только надпись и оператор под ней */
.acct-plain { padding-left: 18px; }
/* временный аккаунт — янтарная рамка вместо подписи */
.acct-temp { border-color: var(--warn-line); border-width: 3px; background: var(--warn-soft); }

.ava { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.ava-temp { background: #6B4F12; }
.ava-lg { width: 56px; height: 56px; }

@media (max-width: 900px) {
  .acct { min-height: 54px; padding-right: 12px; }
  .acct .ava { width: 40px; height: 40px; }
  .acct-name { font-size: 17px; }
  .acct-sub { font-size: 13px; }
  /* «Администрирование» рядом с поиском и синхронизацией — целиком на ширине телефона */
  .acct.acct-plain { padding: 6px 10px; }
  .acct-plain .acct-name { font-size: 15px; letter-spacing: -0.01em; }
}
/* Карта документа (картинка, нажатие — полная карта) и полноэкранная карта; скачивание карт */
.doc-map { height: 300px; }
.full-map { position: absolute; inset: 0; }
/* своя группа наложения: всё на карте (карточка, «Подробнее», поиск) — под окнами и шторками (они в body) */
.map-page { position: relative; flex: 1; min-height: 0; isolation: isolate; }
/* кнопки карты справа одним столбцом, как у ПК (23.11.2026): масштаб, подложка, поиск, фильтр, «⋯», линейка, «где я»;
   --mt — размер кнопки, --mt-z — верх кнопок масштаба (экран машины — свои) */
.map-tools-right { --mt: 40px; --mt-z: 10px; --mt-gap: 8px; }
.map-tools-right .lmap .leaflet-bar a { width: var(--mt); height: var(--mt); line-height: var(--mt); }
.map-tools-right .lmap-layers { left: auto; right: 10px; top: calc(var(--mt-z) + 2 * var(--mt) + var(--mt-gap)); flex-direction: column; align-items: flex-end; }
.map-tools-right .lmap-base { flex-direction: column; }
.map-tools-right .lmap-base button { width: var(--mt); height: var(--mt); }
.map-tools-right .lmap-base button + button { border-left: 0; border-top: 1px solid var(--line); }
.map-tools-right .lmap-ctl { top: calc(var(--mt-z) + 5 * var(--mt) + 2 * var(--mt-gap)); gap: var(--mt-gap); }
.map-tools-right .lmap:has(.lmap-base > :nth-child(4)) .lmap-ctl { top: calc(var(--mt-z) + 6 * var(--mt) + 2 * var(--mt-gap)); }
.map-tools-right .lmap-ctl .btn { min-height: var(--mt); width: var(--mt); }
/* карта без шапки (из техники): сверху слева только «Назад» (и «Убрать рамки») */
.map-back { position: absolute; z-index: 600; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 80px); pointer-events: none; }
.map-back > .btn { pointer-events: auto; min-height: 48px; border-radius: 12px; border-width: 1.5px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
/* быстрые кнопки слоёв (@les/ui mapFilter, 4E): подложка — в столбце справа, поэтому сверху слева, до столбца;
   без шапки — под «Назад»; экран машины — правее «Меню», крупнее (палец в кабине) */
.map-page.map-tools-right .lmap .lmap-quick { top: 10px; left: 10px; right: calc(var(--mt) + 20px); }
.map-page.map-bare .lmap .lmap-quick { top: 66px; }
.ms-page.map-tools-right .lmap .lmap-quick { top: 10px; left: calc(var(--mt) + 20px); right: calc(var(--mt) + 20px); }
.ms-page .lmap-chip { min-height: var(--mt); padding: 0 18px 0 14px; font-size: 17px; }

.map-dl { position: relative; overflow: hidden; }
.map-dl-ok { border-color: var(--primary); color: var(--primary); }
.map-dl-run { min-width: 150px; justify-content: space-between; border-color: var(--info); }
.map-dl-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--info-soft); transition: width 0.4s; }
.map-dl-text { position: relative; font-weight: 800; }
.map-dl-pause { position: relative; width: 16px; height: 18px; border-left: 5px solid var(--info); border-right: 5px solid var(--info); }

/* выбор участка: рамка по краю карты и панель снизу */
.map-select .lmap::after { content: ''; position: absolute; inset: 0; z-index: 450; border: 5px dashed var(--info); pointer-events: none; }
.region-panel { position: absolute; z-index: 700; left: 12px; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); font-size: 19px; }
.region-layers { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 17px; font-weight: 700; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--primary); }

/* карты на планшете: что и где скачать; участки */
.map-store { gap: 10px; }
.dl-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.dl-box .seg { margin-bottom: 4px; }
.dl-box .seg > button { white-space: nowrap; padding: 0 8px; }
.dl-row { display: flex; width: 100%; min-height: 46px; }
.dl-row small { color: var(--text-2); font-weight: 600; font-size: 14px; }
.map-store h3 { margin: 0; }
.region-row { display: flex; align-items: center; gap: 8px; }
.region-bar { position: relative; flex: 1; min-width: 0; min-height: 56px; border: 0; border-radius: 12px; background: var(--surface-2); overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 4px 14px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.region-bar > small { position: relative; color: var(--muted); font-weight: 600; font-size: 13px; }
.region-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--info-soft); transition: width 0.4s; }
.region-bar > span.done { background: var(--primary-soft); }
/* сервер ещё готовит файл (скачивает подложку области) */
.region-bar > span.prep { background: var(--warn-soft, #ffe4ae); }
.region-bar > b { position: relative; display: inline-flex; align-items: center; gap: 6px; }

/* карты из файла .lesmap: файл, слои (отметка, что это, «новое / новее / то же / старее», ход) */
.mf-head { display: flex; align-items: center; gap: 10px; }
.mf-head h2 { margin: 0; }
.mf-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.mf-file small, .mf-layer small { display: block; color: var(--text-2); font-weight: 600; font-size: 14px; }
.mf-layer small.err-text { color: var(--danger); }
.mf-layers { display: flex; flex-direction: column; gap: 6px; }
.mf-layer { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 17px; }
.mf-layer input { flex: none; width: 24px; height: 24px; margin-top: 1px; accent-color: var(--primary); }
.mf-layer.off { cursor: default; }
.mf-layer.off > .grow > b { color: var(--text-2); }
.mf-tag { flex: none; padding: 2px 8px; border-radius: 10px; font-size: 13px; font-weight: 800; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.mf-tag.mf-new, .mf-tag.mf-newer { background: var(--primary-soft); color: var(--primary); }
.mf-tag.mf-older, .mf-tag.mf-unfit { background: var(--danger-soft); color: var(--danger-text); }
.mf-bar { display: block; position: relative; height: 6px; margin: 6px 0 2px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.mf-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--info); transition: width 0.4s; }
.mf-bar.done > i { background: var(--primary); }
.mf-bar.error > i { background: var(--danger); }

/* планшеты рядом (Wi-Fi) */
.lan { margin-top: 10px; padding-top: 12px; border-top: 2px solid var(--line); gap: 10px; }
.lan h3 { margin: 0; }
.lan-peer { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.lan-peer-box { gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.lan-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 15px; }
.lan-code b, .lan-code-big { font-size: 22px; letter-spacing: 3px; }

/* строка «где я» внизу карты — мелко */
/* экран (.screen) уже отступил от панели навигации Android (--sab) — здесь свой отступ не нужен */
/* «где я» — по своей ширине слева, не на всю карту: справа в той же строке — масштаб и «i» (MapBottom, 23.11.2026) */
.gps-line { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 12px; background: rgba(255, 255, 255, 0.9); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-top-right-radius: 10px; font-size: 12px; line-height: 1.35; color: var(--text-2); }
.gps-line b { color: var(--text); font-weight: 700; }
.gps-line .ic { width: 13px; height: 13px; vertical-align: -2px; }
.gps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); flex: none; }
.gps-sep { color: var(--line-strong); }
/* Вход: операторы — на планшете в две колонки, техника — колонкой по центру; на телефоне — во всю ширину */
.login-page { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 20px; }
.login-wide { max-width: 1200px; }
.login-head { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.login-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.login-tile { min-height: 88px; padding: 12px 18px 12px 14px; }
.login-tile .ic { color: var(--line-strong); }
.login-row { display: flex; align-items: center; gap: 16px; }
.login-name { font-size: 26px; font-weight: 800; line-height: 1.15; }
.login-veh { font-size: 28px; font-weight: 800; line-height: 1.15; }
.login-who { font-size: 22px; font-weight: 800; }

/* Оператор — серый кружок с человечком */
.ava.ava-op { width: 56px; height: 56px; background: var(--surface-2); color: var(--text-2); }
.ava-op .ic { width: 30px; height: 30px; color: inherit; }
.login-tile .ava .ic { color: inherit; }

/* Окно PIN: заголовок, оператор, точки, клавиатура */
.pin-window { align-items: center; }
.pin-head { align-self: stretch; display: flex; align-items: center; gap: 12px; }
.pin-title { display: flex; align-items: center; gap: 14px; font-size: 28px; font-weight: 800; }
.pin-dots { display: flex; gap: 20px; }
.pin-dots span { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-strong); }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.pin-msg { width: min(440px, 100%); min-height: 60px; display: flex; flex-direction: column; justify-content: center; }
.pin-msg .spinner { align-self: center; }
.pin-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(440px, 100%); }
.pin-pad .btn { font-size: 30px; }

@media (max-width: 900px) {
  .login-head { min-height: 0; }
  .login-ops { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .login-tile { min-height: 72px; }
  .login-name { font-size: 22px; }
  .login-veh { font-size: 24px; }
  .ava.ava-op { width: 44px; height: 44px; }
  .ava-op .ic { width: 24px; height: 24px; }
  .pin-title { font-size: 24px; }
  .pin-pad .btn { min-height: clamp(56px, 10dvh, 84px); }
}

/* «Как войти?» — временный или постоянный: рядом; не помещаются (телефон, крупный шрифт системы) — друг под другом, и оператор с
   техникой — под заголовком (сеткой 1fr 1fr «Постоянный» уходил за край окна) */
.login-how-head { flex-wrap: wrap; row-gap: 4px; }
.login-how { display: flex; flex-wrap: wrap; gap: 16px; }
.login-how .btn { flex: 1 1 0; min-height: 76px; font-size: 21px; }
/* Экран блокировки — поверх приложения (.layer-lock в @les/ui); под ним приложение без изменений и без касаний */
.app-root { display: contents; }
.lock-layer { background: var(--bg); overflow: auto; }
.lock-page { width: min(1040px, 100%); margin: 0 auto; padding: 24px 16px 12px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.lock-head { display: flex; align-items: center; gap: 12px; }
.lock-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.lock-sync { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 18px; }
.lock-sync-text { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.lock-sync-text b { font-size: 19px; }
.lock-sync-text span { font-size: 13px; font-weight: 600; color: var(--muted); }
.lock-err { margin: -6px 0 0; text-align: right; }
.lock-list { display: flex; flex-direction: column; gap: 14px; }
.lock-acct { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 96px; padding: 14px 18px; font: inherit; color: inherit; text-align: left; cursor: pointer; border: 2px solid var(--line); }
.lock-acct:active { background: var(--hover); }
.lock-acct .ava-lg { width: 64px; height: 64px; }
.lock-acct-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lock-acct-name { font-size: 26px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-acct-veh { font-size: 17px; font-weight: 600; color: var(--text-2); }
.lock-acct .tag { font-size: 15px; padding: 4px 12px; }
.lock-list > .btn { min-height: 76px; font-size: 21px; }

@media (max-width: 700px) {
  .lock-acct { min-height: 80px; gap: 12px; }
  .lock-acct .ava-lg { width: 52px; height: 52px; }
  .lock-acct-name { font-size: 21px; }
}
.logo { display: flex; align-items: center; gap: 16px; }
.logo-mark { width: 80px; height: 80px; border-radius: 24px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.logo-mark .ic { width: 44px; height: 44px; }
.logo-text { font-size: 52px; font-weight: 900; letter-spacing: -0.02em; }
.activation { align-items: center; justify-content: center; position: relative; padding: calc(24px + var(--sat)) 16px calc(110px + var(--sab)); }
.activation > .footer-ver { position: absolute; left: 0; right: 0; bottom: calc(20px + var(--sab)); }
.center-stack { display: flex; flex-direction: column; align-items: center; gap: 44px; }
.btn-hero { width: min(520px, 90vw); min-height: 88px; font-size: 22px; white-space: normal; }
.request { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.request-label { font-size: 18px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; }
.request-code { font-size: clamp(72px, 16vw, 120px); font-weight: 900; letter-spacing: 0.12em; line-height: 1; }
.request-wait { display: flex; align-items: center; gap: 14px; font-size: 21px; font-weight: 700; color: var(--text-2); text-align: center; }
/* Кнопка демо-настроек: только на экранах подключения и входа */
.demo-fab { position: fixed; right: calc(12px + var(--sar)); top: calc(12px + var(--sat)); z-index: 90; display: flex; gap: 6px; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 2px dashed var(--line-strong); background: rgba(255, 255, 255, 0.9); font-size: 14px; font-weight: 700; color: var(--text-2); }

@media (max-width: 900px) {
  .demo-fab { right: 8px; top: 8px; padding: 0 10px; }
  /* на входе вверху заголовок — кнопка внизу справа, у строки версии */
  .demo-fab-login { top: auto; bottom: 14px; }
}
/* «Администрирование»: шапка документа — машина и оператор крупно */
.adm-head { display: flex; flex-direction: column; gap: 6px; }
.adm-head-veh { display: flex; align-items: center; gap: 10px; }
.adm-head-veh .ic { color: var(--primary); }
.adm-head-veh b { display: block; font-size: 20px; font-weight: 800; }
.adm-head-veh small { display: block; font-size: 14px; color: var(--muted); }
.adm-head-op { font-size: 19px; font-weight: 800; }
/* Шапка документа: «Назад», номер, справа дата */
.doc-date { font-size: 21px; font-weight: 800; white-space: nowrap; text-align: right; }

/* номер вручную: префикс + порядковый */
.num-prefix { font-size: 28px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.num-input { width: 110px; font-size: 30px; font-weight: 900; text-align: center; }

/* фото */
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photo { position: relative; width: 150px; height: 110px; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #B9B3A5; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-remote { display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); border: 2px solid var(--line); }
.photo-onec { flex-direction: column; gap: 2px; font-size: 14px; font-weight: 700; }
/* фото на сервере (документ старше недели): нажатие — скачать и открыть */
.photo-fetch { cursor: pointer; color: var(--primary-press); }
.photo-add { width: 150px; height: 110px; border-radius: 12px; border: 2px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-2); font-size: 15px; font-weight: 700; background: var(--surface); }
/* нет обязательного фото — красной рамкой и заливкой, как незаполненные поля (макет WaybillErrors 1A) */
.photo-add.err { border: 2px solid var(--danger); background: var(--danger-soft); color: var(--danger-text); }
.photo-full { display: block; width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 16px; background: #000; }
/* открытое фото с приближением (ZoomImage): жесты — свои, браузер страницу не двигает и не масштабирует */
.zoom-box { position: relative; overflow: hidden; border-radius: 16px; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.zoom-box img { display: block; width: 100%; max-height: 70dvh; object-fit: contain; transform-origin: 0 0; will-change: transform; pointer-events: none; }

/* местоположение нового документа: статус и точность */
.loc { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.loc-title { font-size: 20px; font-weight: 800; }

/* место сохранённого документа — карта с точкой (blocks/map) */
.map-card { padding: 0; overflow: hidden; }

@media (max-width: 900px) {
  .btn-back { width: 54px; min-height: 54px; padding: 0; }
  .doc-date { font-size: 17px; line-height: 1.2; }
  .photo, .photo-add { width: 104px; height: 84px; }
}
/* строки состава под кузовом — в просмотре на телефоне (на планшете они и так есть) */
.comp-list { margin-top: 12px; }
@media (max-width: 900px) {
  .comp-list .block-list { gap: 6px; }
  .comp-list .block-list .box { min-height: 46px; font-size: 16px; }
  /* доля и м³ — одной строкой, переносится название */
  .comp-list .block-list .box > b:last-child { white-space: nowrap; }
}
/* Карточка «Зарплата» в документе (сам расчёт — PayCalcView из @les/ui) */
.pay-card-total { font-size: 26px; font-weight: 900; white-space: nowrap; }
.pay-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pay-head + .pay-calc { margin-top: 14px; }
.pay-chev { transition: transform 0.15s; }
.pay-chev.open { transform: rotate(180deg); }
/* Склады на карте планшета (blocks/stocks): меню «⋯» — слева от столбца кнопок карты, плашка склада и непринятые
   правки — снизу поверх карты, выбор склада 1С. Остальное — общие экраны (@les/ui, ui/src/stock/stock.css). */
.stk-menu.tab-stk-more { right: 60px; top: 98px; }

.tab-stk-place { position: absolute; z-index: 1000; left: 10px; bottom: calc(var(--lmap-bottom-h, 0px) + 32px); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 20px); padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.tab-stk-place > b { min-width: 0; overflow-wrap: anywhere; font-size: 18px; }
.tab-stk-place > .btn, .tab-stk-place > .stk-sq { flex-shrink: 0; }

.tab-stk-peek { position: absolute; z-index: 1000; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.tab-stk-peek.unsent { background: var(--unsynced); }
.tab-stk-peek .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.tab-stk-peek .t b { font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.tab-stk-peek .t small { font-size: 15px; font-weight: 600; color: var(--text-2); }

.tab-stk-failed { position: absolute; z-index: 900; left: 10px; bottom: 44px; max-width: min(560px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 6px; }
.tab-stk-failed > div { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--danger-soft); color: var(--danger-text); font-size: 15px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.tab-stk-failed span { flex: 1; }

.tab-stk-yards { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.tab-stk-yards button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; font-size: 18px; color: var(--text); text-align: left; cursor: pointer; }
.tab-stk-yards button.on { border-color: var(--primary); background: var(--selected); }
.tab-stk-yards button small { color: var(--muted); font-weight: 600; }
.tab-stk-yards button .ic { color: var(--primary); }

/* «Переместить на другой склад» (28B): шаги, строки с объёмом, итог */
.tab-stk-move .tab-stk-steps { display: flex; gap: 6px; margin: 4px 0 10px; }
.tab-stk-move .tab-stk-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.tab-stk-move .tab-stk-steps span.on { background: var(--primary); }
.tab-stk-move > .input { margin-bottom: 8px; }
.tab-stk-mvrow { display: grid; grid-template-columns: 34px 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 64px; padding: 0 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.tab-stk-mvrow.on { border-color: var(--primary); }
.tab-stk-mvrow .cb { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: #fff; padding: 0; }
.tab-stk-mvrow.on .cb { background: var(--primary); border-color: var(--primary); }
.tab-stk-mvrow > i { width: 10px; height: 34px; border-radius: 5px; }
.tab-stk-mvrow .t { display: flex; flex-direction: column; min-width: 0; font-size: 17px; }
.tab-stk-mvrow .t small { color: var(--text-2); font-weight: 600; }
.tab-stk-mvrow .v { min-width: 90px; text-align: right; font: inherit; font-size: 19px; font-weight: 800; border: 0; background: none; color: var(--text); display: flex; flex-direction: column; align-items: flex-end; }
.tab-stk-mvrow .v small { font-size: 12px; font-weight: 600; color: var(--muted); }
.tab-stk-mvrow input.v { width: 100px; border: 2px solid var(--primary); border-radius: 10px; padding: 6px 8px; }
.tab-stk-mvtot { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--selected); font-size: 17px; }
.tab-stk-btns { display: flex; gap: 10px; margin-top: 12px; }
.tab-stk-btns > * { flex: 1; }

/* работа фишки: не с нижнего на верхний (30A) */
.fk-rev { display: inline-flex; align-items: center; align-self: flex-start; min-height: 36px; padding: 0 14px; border-radius: 999px; background: #E8E2F4; color: #4B2E83; font-size: 17px; font-weight: 800; }
/* Печать: номер и дата — на одной высоте */
.print-head { display: flex; gap: 12px 28px; flex-wrap: wrap; padding: 18px; border-radius: 18px; background: var(--bg); }
.print-val { min-height: 54px; display: flex; align-items: center; }
/* печать: три кнопки одной ширины */
.print-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.print-actions .btn { padding: 0 12px; white-space: normal; }
@media (max-width: 600px) {
  .print-actions { grid-template-columns: 1fr; }
}

/* круглый значок в заголовке диалога */
.round-ico { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.round-ico.warn { background: var(--warn-bg); color: var(--warn-text); }
.round-ico.danger { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 900px) {
  .print-val { min-height: 44px; }
  .round-ico { width: 48px; height: 48px; }
}

/* планшет стоя (поля в два столбца): адрес — под контрагентом, пробег — под складом, как лёжа; телефон — одной колонкой по порядку */
@media (max-width: 900px) {
  .two-col > .col-fields > .wf-km { grid-column: 1; grid-row: 2; }
  .two-col > .col-fields > .wf-addr { grid-column: 2; grid-row: 2; }
}
/* Скан QR в браузере: видео с камеры */
.scan-video { width: 100%; max-height: 60dvh; border-radius: 16px; background: #000; object-fit: cover; }
/* Точковка: во весь экран — строки состава сверху, сетка диаметров, кнопки внизу */
.tl-dialog.dialog { height: calc(100dvh - 24px); max-height: none; gap: 12px; }
.tl-head { display: flex; align-items: center; gap: 10px; }
.tl-title { margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-total { font-size: 22px; font-weight: 800; padding: 0 6px; white-space: nowrap; }

.tl-targets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; flex: none; }
.tl-t { flex: none; min-height: 64px; min-width: 200px; padding: 6px 14px 6px 22px !important; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; color: var(--text); cursor: pointer; overflow: hidden; }
.tl-t.spb::before { width: 9px; border-radius: 12px 0 0 12px; }
.tl-t b { font-size: 17px; }
.tl-t span { font-size: 14px; color: var(--muted); font-weight: 600; }
.tl-t.on { border-color: var(--primary); border-width: 3px; background: var(--selected); }

/* сетка диаметров: квадратные кнопки; количество и объём — отдельными строками */
.tl-grid { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; }
.tl-d { position: relative; aspect-ratio: 1; min-width: 0; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overflow: hidden; }
.tl-d b { position: relative; font-size: 32px; line-height: 1.05; }
.tl-d span { position: relative; font-size: 15px; font-weight: 700; color: var(--text-2); line-height: 1.2; }
.tl-d.on { border-color: var(--primary); background: var(--selected); }
.tl-d.on span { color: var(--primary); }
.tl-d:not(:disabled):active { transform: scale(0.9); background: var(--primary-soft); border-color: var(--primary); }
.tl-d:disabled { cursor: default; }
/* нажатие заметно: кнопка вспыхивает сплошным цветом, количество «подпрыгивает» */
.tl-flash { position: absolute; inset: 0; background: var(--primary); opacity: 0; animation: tl-flash 0.5s ease-out; pointer-events: none; }
.tl-bump { animation: tl-bump 0.35s ease-out; }
@keyframes tl-flash { 0% { opacity: 0.85; } 40% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes tl-bump { 0% { transform: scale(1.5); color: var(--primary); } 100% { transform: scale(1); } }

/* внизу кубатурника: очистить, отменить, итог */
.tl-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* внизу точковки: квадратные кнопки одной высоты — очистить (красная), рулетка, отменить, PDF, готово; на планшете — подпись
   под значком; на телефоне — пять в строку на 360 px. Вид «с рулеткой» — одна широкая «Отменить» той же высоты */
.tl-dialog { --tl-sq: 76px; }
.tl-bar { display: flex; align-items: center; gap: 10px; flex: none; }
.tl-bar .tl-sq.btn { width: var(--tl-sq); height: var(--tl-sq); min-height: 0; padding: 0 2px; flex: none; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.1; }
.tl-bar .tl-wide.btn { flex: 1 1 auto; min-width: 0; height: var(--tl-sq); min-height: 0; }

.tl-count-input { font-size: 32px !important; text-align: center; font-weight: 800; }
/* количество: корзина, «Отмена» и «Сохранить» — в одну строку; на телефоне две последние делят ширину */
.tl-count-actions { flex-wrap: nowrap; }

/* выход из изменённой точковки: «Точковка изменена» и три кнопки одной ширины по центру — сохранить, остаться, выйти
   (не влезли при крупном шрифте системы — третья переносится, а не вылезает) */
.tl-leave h2 { text-align: center; }
.tl-leave-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tl-leave-bar .btn { flex: 1 1 0; padding: 0 10px; }

/* кнопка «Провести точковку» под составом */
.tally-btn { justify-content: space-between; }
.tally-btn .muted { font-weight: 600; }

@media (max-width: 900px) {
  .tl-dialog.dialog { height: 100dvh; padding: calc(12px + var(--sat)) 12px calc(12px + var(--sab)); }
  /* пять кнопок и четыре промежутка по 6 px — в ширину окна (поля по 12 px) */
  .tl-dialog { --tl-sq: min(76px, calc((100vw - 48px) / 5)); }
}
/* телефон — как было */
@media (max-width: 600px) {
  .tl-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
  .tl-d b { font-size: 24px; }
  .tl-d span { font-size: 12px; }
  .tl-actions { gap: 6px; }
  .tl-actions .btn { padding-left: 0; padding-right: 0; min-width: 0; flex: 1 1 0; }
  .tl-actions .spacer { display: none; }
  .tl-bar { gap: 6px; justify-content: space-between; }
  .tl-bar .spacer { display: none; }
  .tl-count-actions { gap: 8px; }
  .tl-count-actions .spacer { display: none; }
  .tl-count-actions .btn-square { width: 56px; }
  .tl-count-actions .btn:not(.btn-square) { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 18px; }
  .tl-count-actions .btn-primary { flex-grow: 1.3; }
  /* три в строку одной ширины и на 360 px: поля окна уже, шрифт мельче («Сохранить» — самая длинная) */
  .tl-leave.dialog { padding-left: 12px; padding-right: 12px; }
  .tl-leave-bar { gap: 6px; }
  .tl-leave-bar .btn { padding: 0 2px; font-size: min(18px, 4.5vw); }
}
@media (max-width: 600px) {
  .tl-title { display: none; }
  .tl-head { justify-content: space-between; }
}

/* классы строки: кнопками внутри строки (планшет) и строкой под выбором строки (телефон) */
.tl-t { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tl-grades { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tl-g { min-height: 44px; padding: 4px 12px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--text); text-align: left; display: flex; flex-direction: column; justify-content: center; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tl-g b { font-size: 15px; }
.tl-g span { font-size: 13px !important; color: var(--muted); font-weight: 600; }
.tl-g.on { border-color: var(--primary); border-width: 3px; background: var(--primary-soft); }
.tl-gnames { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.tl-phone { display: flex; flex-direction: column; gap: 6px; flex: none; }
.tl-pick { width: 100%; min-width: 0 !important; }
.tl-pick em { font-style: normal; float: right; color: var(--muted); }
.tl-phone .tl-grades { margin-top: 0; flex-wrap: nowrap; overflow-x: auto; }
.tl-phone .tl-g { flex: 1 0 auto; min-height: 40px; padding: 2px 10px; }

/* рулетка DT20. Внизу — кнопка связи (крутилка — ищем, зелёный — подключено, красный — обрыв) */
.tl-bt-ic { position: relative; display: inline-flex; }
.tl-bt-busy::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: les-spin 0.9s linear infinite; }
.tl-bt-on.btn { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.tl-bt-lost.btn { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-text); animation: tl-blink 1s step-end infinite; }
@keyframes tl-blink { 50% { opacity: 0.55; } }

/* полоса рулетки — одной строкой: слева класс крупно (число — в рамке на две цифры, «см» не сдвигается) и рядом серым
   диаметр до округления (в рамке на «00,0», по правому краю) или сообщение (красным, убирается нажатием), справа — вид
   «с рулеткой» (только в обычной точковке) и шестерёнка; высота одна при любом содержимом */
.tl-strip { position: relative; z-index: 2; flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); }
.tl-ok { border-color: var(--primary); background: var(--selected); }
.tl-bad { border-color: var(--danger); background: var(--danger-soft); }
.tl-strip-main { flex: 1 1 auto; min-width: 0; min-height: 56px; display: flex; align-items: center; }
.tl-cls { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-cls b { min-width: 2ch; text-align: right; font-size: 44px; font-weight: 800; line-height: 1; color: var(--primary); }
.tl-cls small { font-size: 18px; font-weight: 700; color: var(--text-2); }
.tl-raw { min-width: 3.6ch; margin-left: 8px; text-align: right; font-size: 24px; font-weight: 700; line-height: 1; color: var(--muted); }
.tl-cls-none b { color: var(--muted); }
.tl-cls-none small { visibility: hidden; }
.tl-note { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 19px; font-weight: 800; line-height: 1.2; color: var(--danger-text); text-align: left; cursor: pointer; }
span.tl-note { cursor: default; }
.tl-note .ic-sm { flex: none; opacity: 0.75; }
.tl-note-info { color: var(--info-text); }
.tl-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tl-tools .btn { width: 60px; min-height: 56px; }

/* шестерёнка: панель поверх под полосой (справа); мимо — затемнение, нажатие закрывает */
.tl-pop-scrim { position: fixed; inset: 0; z-index: 1; background: rgba(20, 22, 26, 0.25); }
.tl-pop { position: absolute; z-index: 2; top: calc(100% + 8px); right: 0; width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 8px 12px 14px; border-radius: 18px; border: 2px solid var(--line-strong); background: var(--surface); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); }
.tl-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; font-weight: 800; }
.tl-pop-head .btn { width: 52px; min-height: 52px; margin-right: -6px; }
.tl-mode.seg { border-radius: 14px; }
.tl-mode.seg > button { min-height: 84px; flex-direction: column; gap: 4px; padding: 6px 8px; font-size: 15px; line-height: 1.15; white-space: normal; text-align: center; }
.tl-mode .ic { width: 40px; height: 40px; }
.tl-switch.toggle { min-height: 60px; font-size: 18px; font-weight: 700; }
/* голоса нет — переключатель бледный, нажатие — подсказка */
.tl-switch.tl-na { color: var(--muted); border-style: dashed; }
.tl-switch.tl-na .sw { opacity: 0.45; }
.tl-pop .tl-note { font-size: 16px; }

/* вид «точковка с рулеткой»: вместо сетки — полоса крупно (класс с диаметром до округления — по центру; не влезли при
   крупном шрифте системы — от левого края, класс не обрезается) и история строки */
.tl-tv { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.tl-strip-big { padding: 10px 10px 10px 14px; }
.tl-strip-big .tl-strip-main { min-height: 120px; justify-content: center; justify-content: safe center; }
.tl-strip-big .tl-cls b { font-size: 112px; letter-spacing: -0.03em; }
.tl-strip-big .tl-cls small { font-size: 32px; }
.tl-strip-big .tl-raw { margin-left: 14px; font-size: 44px; }
.tl-strip-big .tl-note { font-size: 24px; }
.tl-tv-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.tl-tv-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); }
.tl-tv-list .tl-cls b { font-size: 34px; color: var(--text); }
.tl-tv-list .tl-tv-last { border-color: var(--primary); }
.tl-tv-list .tl-tv-last .tl-cls b { color: var(--primary); }
.tl-tv-n { font-size: 24px; font-weight: 800; }
.tl-tv-ago { min-width: 7.5em; text-align: right; font-size: 17px; font-weight: 600; color: var(--muted); }

@media (max-width: 600px) {
  .tl-strip { gap: 6px; padding: 4px 6px 4px 10px; }
  /* длинное сообщение — до трёх строк, высота полосы та же */
  .tl-strip-main { min-height: 58px; }
  .tl-cls b { font-size: 40px; }
  .tl-raw { margin-left: 6px; font-size: 22px; }
  .tl-note { font-size: 16px; gap: 6px; }
  .tl-tools { gap: 6px; }
  .tl-tools .btn { width: 54px; min-height: 52px; }
  .tl-pop { padding: 6px 10px 12px; }
  .tl-mode.seg > button { min-height: 80px; font-size: 14px; }
  .tl-mode .ic { width: 36px; height: 36px; }
  .tl-strip-big { padding: 8px 6px 8px 10px; }
  .tl-strip-big .tl-strip-main { min-height: 96px; }
  .tl-strip-big .tl-cls b { font-size: 88px; }
  .tl-strip-big .tl-cls small { font-size: 26px; }
  .tl-strip-big .tl-raw { margin-left: 8px; font-size: 30px; }
  .tl-strip-big .tl-note { font-size: 19px; }
  .tl-tv-list li { gap: 10px; padding: 4px 10px; }
  .tl-tv-list .tl-cls b { font-size: 28px; }
  .tl-tv-n { font-size: 20px; }
  .tl-tv-ago { font-size: 15px; min-width: 6.5em; }
}
/* Просмотр PDF: во весь экран, страницы — одна под другой, прокрутка в обе стороны при увеличении */
.pdf-dialog.dialog { width: min(1100px, 100vw) !important; height: calc(100dvh - 24px); max-height: none; padding: 16px; gap: 12px; }
.pdf-head { display: flex; align-items: center; gap: 8px; }
.pdf-title { font-size: 19px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-head .btn-square { font-size: 26px; }
/* прокрутка одним пальцем — браузером; щипок — наш (touch-action без pinch-zoom) */
.pdf-pages { flex: 1; min-height: 0; overflow: auto; background: var(--surface-2); border-radius: 12px; padding: 8px; touch-action: pan-x pan-y; }
.pdf-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: max-content; min-width: 100%; }
.pdf-page { display: block; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); margin: 0 auto; }
@media (max-width: 900px) {
  .pdf-dialog.dialog { height: 100dvh; padding: calc(10px + var(--sat)) 10px calc(10px + var(--sab)); }
}
/* Доп. работы: кнопка на главной, список, «сколько», «Груз», плашки «идёт» и «Порожний → на склад», «Куда дальше» */

/* вторая круглая кнопка — слева от «+», поменьше и светлая */
.fab.fab-extra { right: calc(max(0px, calc(var(--gutter) - 24px)) + var(--sar) + 112px); width: 104px; }
.fab-extra .fab-dot { width: 68px; height: 68px; background: var(--surface); color: var(--text); border: 2px solid var(--line-strong); }
.fab-extra:hover .fab-dot { background: var(--hover); }
.fab-extra .fab-dot .ic { width: 32px; height: 32px; stroke-width: 2.2; }

.xw-row { min-height: 68px; font-size: 20px; font-weight: 700; }
.xw-row .ic { color: var(--muted); }
.xw-cargo { border-color: var(--primary); }

.xw-qty { display: flex; align-items: center; gap: 12px; }
.xw-qty .btn { min-width: 84px; font-size: 30px; }
.xw-qty-v { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 72px; }
.xw-qty-v input { text-align: right; width: 5ch; font-size: 34px; font-weight: 900; }
.xw-unit { font-size: 22px; font-weight: 700; color: var(--muted); }

.xw-what { display: flex; flex-direction: column; gap: 10px; }
.xw-what-g { display: flex; flex-direction: column; gap: 6px; }
.xw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xw-chip { min-height: 56px; padding: 0 20px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 19px; font-weight: 700; color: var(--text); cursor: pointer; }
.xw-chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-press); }

/* «Куда дальше»: три кнопки одним рядом (телефон — столбиком) */
.xw-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.xw-next-b { min-height: 64px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 19px; font-weight: 800; color: var(--text); cursor: pointer; }
.xw-next-b.on { border-color: var(--primary); background: var(--primary); color: #fff; }

/* плашки: идёт работа или груз; порожний на склад */
.xw-going, .xw-empty { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius-lg); }
.xw-going { border: 3px solid var(--info); background: var(--info-soft); }
.xw-empty { border: 2px solid var(--line-strong); background: var(--surface); }
.xw-ico { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--info); }
.xw-ico-empty { background: var(--muted); }
.xw-title { font-size: 22px; font-weight: 800; }
.xw-sub { font-size: 17px; color: var(--info-text); }
.xw-empty .xw-sub { color: var(--muted); }

/* строка доп. работы в списке на главной */
.row-extra td { background: var(--bg); }
.xw-tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--info-text); background: var(--info-soft); }
.card-extra { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }

@media (max-width: 600px) {
  .actionbar .btn.extra-action { flex: none; width: 76px; min-width: 76px; min-height: 76px; padding: 0; }
  .fab.fab-extra { right: calc(max(0px, calc(var(--gutter) - 24px)) + var(--sar) + 104px); }
  .xw-next { grid-template-columns: 1fr; }
  .xw-going, .xw-empty { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; }
  .xw-going > .grow, .xw-empty > .grow { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .xw-going > .btn, .xw-empty > .btn { flex: 1 1 100%; }
  .xw-ico { width: 44px; height: 44px; }
  .xw-title { font-size: 19px; }
  .xw-sub { font-size: 15px; }
}
.xw-recent { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.xw-recent h3 { margin: 0; font-size: 16px; }

/* доп. работа со склада (32A, лес в дорогу): строки состава склада */
.xw-lines { display: flex; flex-wrap: wrap; gap: 8px; }
.xw-line { display: inline-flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 18px; font-weight: 800; color: var(--text); cursor: pointer; }
.xw-line i { width: 10px; height: 28px; border-radius: 5px; }
.xw-line small { font-weight: 600; color: var(--muted); }
.xw-line.on { border-color: var(--primary); background: var(--selected); }
/* Поездка накладной: плашка «В пути» (над списком), полоса в накладной, метки статуса, форма разгрузки */
.trip-banner { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 16px; border: 3px solid var(--warn-line); border-radius: var(--radius-lg); background: var(--warn-soft); }
.trip-ico { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--warn-line); }
.trip-title { font-size: 22px; font-weight: 800; }
.trip-sub { font-size: 17px; color: var(--warn-text); }

/* полоса в накладной (2A): узкая, «В пути · с 09:44 · 224 км» и «Разгрузил» */
.trip-strip { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; margin-bottom: 16px; border: 3px solid var(--warn-line); border-radius: var(--radius-lg); background: var(--warn-soft); }
.trip-strip-t { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.trip-strip .trip-sub { font-size: 18px; font-weight: 700; }
.trip-strip > .btn { min-height: 60px; padding: 0 26px; }

.trip-tag { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap; color: var(--warn-text); background: var(--warn-bg); }
.trip-ok { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap; color: var(--primary-press); background: var(--primary-soft); }
.trip-done { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary-press); }

.unload-time { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.unload-time .btn { min-width: 110px; }
.unload-back .seg > button { padding: 0 6px; white-space: nowrap; font-size: 17px; }
.unload-clock { flex-grow: 1; justify-content: center; min-height: 72px; font-size: 34px; font-weight: 900; }
.hint.err { color: var(--danger-text); }

/* карточка накладной: блок разгрузки */
.card-trip { border: 3px solid var(--warn-line); background: var(--warn-soft); }

/* телефон: время — отдельной строкой над «−10 / +10 мин»; плашка «В пути» — текст рядом со значком, «Разгрузил» — снизу во всю ширину */
@media (max-width: 600px) {
  .trip-banner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; }
  .trip-banner > .grow { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .trip-banner > .btn { flex: 1 1 100%; }
  .trip-ico { width: 44px; height: 44px; }
  /* полоса: «В пути» и «с 09:44 · 224 км» — двумя строками, кнопка справа */
  .trip-strip { gap: 10px; padding: 6px 6px 6px 12px; }
  .trip-strip-t { flex-direction: column; align-items: flex-start; gap: 0; }
  .trip-strip .trip-sub { font-size: 15px; }
  .trip-strip > .btn { min-height: 56px; padding: 0 16px; font-size: 18px; gap: 8px; }
  .trip-title { font-size: 19px; }
  .trip-sub { font-size: 15px; }
  .unload-time { flex-wrap: wrap; }
  .unload-clock { order: -1; flex-basis: 100%; font-size: 30px; min-height: 64px; }
  .unload-time .btn { flex: 1; min-width: 0; padding: 0 12px; }
  .unload-back .seg > button { font-size: 16px; }
  /* «Отмена» и «Разгрузил» — в одну строку */
  .unload-actions { flex-wrap: nowrap; }
  .unload-actions .btn { min-width: 0; padding: 0 16px; }
  .unload-actions .btn:last-child { flex: 1; }
}

/* на месте разгрузки (админка задала место адреса): та же плашка, дополнительно обведена зелёным; «Разгрузил» — как всегда */
.trip-banner.trip-here, .trip-strip.trip-here { box-shadow: 0 0 0 5px var(--bg), 0 0 0 11px var(--primary); margin: 11px 11px 27px; }
.trip-here .trip-ico { background: var(--primary); }
.trip-at { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 16px; font-weight: 800; white-space: nowrap; color: var(--primary-press); background: var(--primary-soft); }
/* «Нумерация сменилась»: итог — было, стало, следующий */
.numch-result { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.numch-org { font-weight: 800; font-size: 18px; }
.numch-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; }
.numch-row b { font-size: 22px; }
.numch-new b { font-size: 28px; color: var(--primary); }
/* «Подключиться к сети машины?» (MachineNet.tsx, макет TabletMachineNet, 1C): на телефоне кнопки друг под другом, «Подключиться» — сверху */
.mn-ask-b { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
@media (max-width: 600px) {
  .mn-ask-b { grid-template-columns: 1fr; }
  .mn-ask-b > :last-child { order: -1; }
}
/* «Wi‑Fi машины — замер» (макет docs/mockups/WifiTestNov24.html, 1A 2B 3A): плитки, таблица итога, график обхода */
.wt-page { display: flex; flex-direction: column; gap: 14px; }
.wt-start { display: flex; flex-direction: column; gap: 14px; }
.wt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.wt-k { font-size: 13px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.wt-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wt-now-v { flex: 1; text-align: right; font-weight: 700; color: var(--text); }

.wt-pill { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.wt-pill-ok { background: var(--primary-soft); color: var(--primary); }
.wt-pill-warn { background: var(--warn-soft); color: var(--warn-text); }
.wt-pill-info { background: var(--info-soft); color: var(--info-text); }

.wt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wt-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 110px; padding: 14px 16px; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); font: inherit; color: var(--text); cursor: pointer; }
.wt-tile b { font-size: 21px; }
.wt-tile small { font-size: 15px; font-weight: 600; color: var(--muted); }
.wt-tile-ic svg { width: 26px; height: 26px; color: var(--primary); }
.wt-tile.on { border-color: var(--primary); background: var(--selected); box-shadow: 0 0 0 3px var(--primary-soft); }
.wt-tile.dis { opacity: 0.45; cursor: default; }
.wt-tile.dis .wt-tile-ic svg { color: var(--muted); }

.wt-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wt-note { background: var(--warn-soft); color: var(--warn-text); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.wt-hints { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* итог */
.wt-res { border-collapse: collapse; width: 100%; font-size: 17px; }
.wt-res th, .wt-res td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.wt-res th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wt-res tr:last-child td { border-bottom: 0; }
.wt-res td.n { font-weight: 800; }
.wt-res tr.best td { background: var(--selected); }
.wt-res tr.live td { background: var(--hover); }
.wt-res .wt-act { text-align: right; width: 1%; white-space: nowrap; }
.wt-err { color: var(--danger); font-weight: 700; }
.wt-phase { white-space: nowrap; }
.wt-prog { display: inline-block; vertical-align: middle; width: min(260px, 40%); height: 10px; margin: 0 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.wt-prog i { display: block; height: 100%; background: var(--primary); border-radius: 5px; transition: width 0.3s; }
.wt-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; background: var(--line); }
.wt-dot.d-ok { background: #2f9e60; }
.wt-dot.d-warn { background: #d9a21b; }
.wt-dot.d-bad { background: #d64535; }

/* обход */
.wt-chart { display: block; }
.wt-grid line { stroke: var(--line); stroke-opacity: 0.6; }
.wt-axis text, .wt-axis { font-size: 12px; fill: var(--muted); }
.wt-dip { fill: var(--danger-soft); opacity: 0.8; }
.wt-dip-t { font-size: 12px; font-weight: 700; fill: var(--danger); }
.wt-sig { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; }
.wt-ms { fill: none; stroke: var(--info); stroke-width: 2; stroke-dasharray: 5 4; }
.wt-mark circle { fill: #d9a21b; }
.wt-mark text { font-size: 12px; font-weight: 700; fill: var(--warn-text); }
.wt-legend text { font-size: 12px; fill: var(--muted); }
.wt-leg-sig { fill: var(--primary); }
.wt-leg-ms { fill: var(--info); }
.wt-big { font-size: 38px; font-weight: 900; line-height: 1.05; }
.wt-big small { font-size: 17px; font-weight: 700; color: var(--muted); }
.wt-big.t-ok { color: var(--primary); }
.wt-big.t-warn { color: #8a5a00; }
.wt-big.t-bad { color: var(--danger); }

@media (max-width: 900px) {
  .wt-tile b { font-size: 19px; }
  .wt-acts .grow { flex-basis: 100%; }
}

/* телефон: плитки в столбец, таблица — карточками (подпись столбца — перед значением) */
@media (max-width: 600px) {
  .wt-tiles { grid-template-columns: 1fr; }
  .wt-tile { min-height: 0; }
  .wt-now-v { text-align: left; }
  .wt-acts > .btn { flex: 1 1 100%; }
  .wt-res thead { display: none; }
  .wt-res, .wt-res tbody, .wt-res tr, .wt-res td { display: block; width: 100%; }
  .wt-res tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .wt-res tr:last-child { border-bottom: 0; }
  .wt-res td { border: 0; padding: 3px 4px; display: flex; gap: 8px; }
  .wt-res td[data-l]:not([data-l=''])::before { content: attr(data-l); flex: 0 0 120px; color: var(--muted); font-size: 14px; }
  .wt-res .wt-act { text-align: left; width: 100%; }
  .wt-prog { width: 40%; }
  .wt-big { font-size: 32px; }
}
/* Карточки аккаунтов в меню: текущий — сплошная рамка (с замком), остальные — пунктир (с «Переключиться») */
.acct-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; width: 100%; border-style: dashed; }
.acct-card-on { border-color: var(--primary); border-width: 3px; border-style: solid; }
.acct-card.acct-temp { border-color: var(--warn-line); background: var(--warn-soft); }
.acct-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-card-name { font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* оператор — под техникой, мелко */
.acct-card-op { font-size: 15px; font-weight: 600; color: var(--text-2); }

/* шапка: «Меню» и мелко — номер планшета и версии (5 нажатий — служебное окно) */
.menu-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-ver { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* удержание 2 с (код администратора): без выделения текста и меню Android — иначе они обрывают удержание */
.menu-ver { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
/* «Входящие»: кнопка в шапке — янтарная, с числом новых; на телефоне — только конверт с числом в углу */
.btn-inbox { position: relative; color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-line); }
.inbox-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; background: var(--warn-line); }

@media (max-width: 600px) {
  .btn-inbox { width: 54px; min-height: 54px; padding: 0; }
  .btn-inbox .inbox-count { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; font-size: 14px; }
}
/* Список документов: таблица на планшете (ui/table.css), карточки на телефоне. Неотправленные — голубой фон. */
.table .row-unsynced td { background: var(--unsynced); }
.table .row-unsynced:hover td { background: #D5E3F7; }

.cards { display: flex; flex-direction: column; gap: 12px; }
.card-doc { cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-unsynced { background: var(--unsynced); border-color: #AFC6EA; }
.empty { padding: 80px 0; }

/* состав одной строкой; порода — полосой слева */
.mix { display: flex; flex-wrap: wrap; gap: 6px; }
.mix span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 15px; font-weight: 700; background: var(--surface-2); overflow: hidden; }

/* отметки накладной в карточке */
.marks { display: flex; gap: 6px; }
.mark { padding: 2px 10px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--primary); background: var(--primary-soft); }

/* ширины колонок таблицы документов */
.c-date { width: 100px; }
.c-num { width: 170px; }
.c-where { width: 240px; }
.c-mix { width: 200px; }
.c-vol { width: 80px; }
.c-mark { width: 70px; }
.c-mark2 { width: 80px; }
.c-dup { width: 86px; }
.table th.c-pay { width: 120px; text-align: right; }
.table th.c-trip { width: 120px; }

/* накладные: номер и «Кому» чуть мельче, под «Кому» — км от склада до адреса */
.table-waybill .c-num { width: 150px; }
.table-waybill .num-sm { font-size: 16px; padding: 3px 9px; }
.table-waybill td.c-who { font-size: 16px; }

/* предполагаемая зарплата за документ; в карточке — под объёмом */
.table td.pay, .vol-pay .pay { text-align: right; font-weight: 400; color: var(--primary-press); white-space: nowrap; }
.vol-pay { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.2; }
/* планшет вертикально: отдельной колонки нет — сумма под объёмом */
.pay-under { display: none; color: var(--primary-press); font-weight: 400; white-space: nowrap; }

/* планшет вертикально: таблица плотнее */
@media (max-width: 900px) {
  .c-date { width: 66px; }
  .c-num { width: 138px; }
  .c-where { width: 180px; }
  .c-mix { width: 150px; }
  .c-vol { width: 58px; }
  .c-mark { width: 54px; }
  .c-mark2 { width: 62px; }
  .c-dup { width: 68px; }
  .table .pay-col { display: none; }
  .table .trip-col { display: none; }
  .pay-under { display: block; font-size: 15px; }
  .table-pay .c-vol { width: 80px; }
  .table-waybill .c-num { width: 124px; }
  .table-waybill .num-sm { font-size: 15px; padding: 3px 7px; }
  .table-waybill td.c-who { font-size: 15px; }
  .table th { padding: 12px 8px; }
  .table td { padding: 8px; height: 68px; font-size: 16px; }
  .table th:first-child, .table td:first-child { padding-left: 14px; }
  .table .btn-square { width: 54px; min-height: 54px; }
}

/* фишка «в лесовоз» (31A): строка подсвечена, отметка в строке (кнопка — в просмотре работы, 1B) */
.table tr.row-truck td { background: var(--selected); }
.tk-mark { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; vertical-align: middle; }

/* накладная в пути (1A): строка жёлтая, полоса слева (на месте разгрузки — зелёная), «Разгрузил» в строке */
.table-click tbody tr.row-trip td { background: var(--warn-soft); }
.table-click tbody tr.row-trip:hover td { background: var(--warn-bg); }
.table tr.row-trip td:first-child { box-shadow: inset 6px 0 0 var(--warn-line); }
.table td.c-unl { padding-left: 8px; text-align: right; }
.trip-unl.btn { min-height: 56px; padding: 0 16px; font-size: 18px; gap: 8px; }
@media not all and (max-width: 900px) {
  .table .trip-port { display: none; }
}
@media (max-width: 900px) {
  .table .trip-land { display: none; }
  .trip-unl.btn { min-height: 54px; padding: 0 14px; font-size: 17px; }
}
/* Замер пути: красно-жёлтая плашка «нужен», синяя «едете», окна выезда и приезда */
.measure-need,
.measure-going { display: flex; align-items: center; gap: 18px; padding: 12px 14px 12px 18px; margin-bottom: 16px; border-radius: var(--radius-lg); }
.measure-need { border: 3px solid var(--danger); background: repeating-linear-gradient(135deg, #FFE4AE 0 22px, #FFD98A 22px 44px); }
.measure-going { border: 3px solid var(--info); background: var(--info-soft); }
.measure-ico { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; }
.measure-ico-need { background: var(--danger); }
.measure-ico-going { background: var(--info); }
.measure-title { font-size: 21px; font-weight: 800; }
.measure-sub { font-size: 16px; font-weight: 700; }
.measure-sub-need { color: var(--danger-text); }
.measure-sub-going { color: var(--info-text); }

.measure-here { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.measure-here b { font-size: 20px; }
.measure-here-on { border: 3px solid var(--primary); background: var(--primary-soft); }
.measure-radio { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-strong); flex: none; }
.measure-here-on .measure-radio { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 6px #fff; }
.measure-place { justify-content: space-between; padding-right: 6px; }
.measure-place-ok { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-press); }
.measure-locate { min-height: 56px; }
.measure-geo-err { font-size: 14px; font-weight: 600; }
.measure-hint { font-size: 16px; }
.measure-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.measure-res > div { background: var(--bg); border-radius: 14px; padding: 10px 14px; }
.measure-res span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.measure-res b { font-size: 24px; font-weight: 900; }

@media (max-width: 600px) {
  .measure-need, .measure-going { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; }
  .measure-need > .grow, .measure-going > .grow { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .measure-ico { width: 44px; height: 44px; }
  .measure-need > .btn, .measure-going > .btn-primary { flex: 1; }
  .measure-title { font-size: 18px; }
  .measure-res b { font-size: 19px; }
  /* «Отмена» и «Поехали» (при приезде — «Отменить замер» и «Сохранить») — в одну строку */
  .measure-actions { flex-wrap: nowrap; gap: 10px; }
  .measure-actions .btn { min-width: 0; flex: 1; padding: 0 12px; }
  .measure-actions .btn-primary { flex: 1.6; }
}
/* Карточка склада у «Администрирования» (adminCard.tsx; макет AdminStockComp.html, CompA): как в админке — полоса по породам,
   дни строк, ГОСТ и TM, плашки («Ждём данных», «Расхождение», «Вывозить первым», синева), «Откуда и куда» с метками вида.
   Цвета меток — как в админке (admin/src/stocks/stockflow.css), размеры — приложения. */

/* вкладки: три в ряд */
.astk .stk-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.astk .stk-tabs button { gap: 8px; padding: 0 6px; line-height: 1.1; text-align: center; }

/* метки шапки: «лежит до N дн» — цветом, как дни строк */
.astk .stk-tag.d0 { background: #E3EFE8; color: #1B6644; }
.astk .stk-tag.d1 { background: #F7E7C3; color: #7A4E00; }
.astk .stk-tag.d2 { background: #FBE0DA; color: #8E2414; }

/* плашки, как в админке */
.astk-notes { display: flex; flex-direction: column; gap: 6px; }
.astk-note { margin: 0; padding: 8px 12px; border-radius: 12px; font-size: 15.5px; line-height: 1.35; }
.astk-note.wait { background: #FFF6E0; color: #5C3D00; }
.astk-note.bad { background: var(--danger-soft); color: var(--danger-text); }
.astk-note.or { background: #FFF1E3; color: #8A4A0B; }

/* полоса по породам и породы метками */
.astk-spbar { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 10px; }
.astk-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.astk-bar i { display: block; height: 100%; }
.astk-bar i + i { box-shadow: inset 2px 0 0 #fff; }
.astk-spc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.astk-spc span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.astk-spc i { width: 12px; height: 12px; border-radius: 50%; background: var(--sp); }

/* состав: столбец дней строки */
.astk .astk-comp .r { grid-template-columns: 22px minmax(0, 1fr) 70px 86px 58px 36px 22px; }
.astk-dc { display: flex; justify-content: flex-end; }
.astk .astk-comp .r .stk-days { padding: 0 9px; font-size: 14px; line-height: 26px; }

/* метки вида движения — как в админке */
.astk-tag { display: inline-flex; align-items: center; flex: none; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 26px; white-space: nowrap; }
.astk-fwd { background: #DDEFE2; color: #1B6644; }
.astk-move { background: #DCE8F8; color: #1D4E89; }
.astk-truck { background: #FCE3CC; color: #8A4A0B; }
.astk-bed { background: #EDE1D0; color: #6B4A1F; }
.astk-fix { background: #ECEAE4; color: #4A4F56; }
.astk-off { background: #F8DEDA; color: #9A2A1F; }
.astk-back { background: #fff; color: #4A4F56; box-shadow: inset 0 0 0 1.5px #B8B3A8; }
.astk-stock { background: #F4ECE0; color: #5C4422; }

/* «Откуда и куда» */
.astk-fm { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 16px; }
.astk-fm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.astk-seg .seg > button { min-height: 50px; padding: 0 18px; font-size: 17px; }
.astk-tr { margin-left: auto; }
.astk-only { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px 0 14px; border: 0; border-radius: 999px; background: #1F2328; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.astk-only .ic { width: 18px; height: 18px; }
.astk-fm .astk-days { margin: 0 -14px; }

/* сводка */
.astk-blk { display: flex; flex-direction: column; }
.astk-blk-h { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 8px; border-bottom: 2px solid var(--surface-2); font-size: 14px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.astk-blk-h b { font-size: 20px; letter-spacing: 0; text-transform: none; }
.astk-blk-h b.in, .astk-day .in, .astk-v.in { color: var(--primary); }
.astk-blk-h b.out, .astk-day .out, .astk-v.out { color: var(--danger); }
.astk-blk .astk-spbar { padding: 10px 2px 4px; }
.astk-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--surface-2); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.astk-sum:hover { background: var(--hover); }
.astk-sum-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.astk-sum-n { font-size: 18px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.astk-sum-t { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.astk-sum-v { font-size: 20px; white-space: nowrap; }
.astk-sum-w { grid-column: 1 / -1; font-size: 15px; font-weight: 600; color: var(--text-2); }
.astk-sum-sp { grid-column: 1 / -1; }

/* по дням: что (порода цветом) и ±м³, ниже — вид, откуда или куда, ходка, документ, техника, причина, время */
.astk-day { position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: baseline; padding: 10px 14px 6px; border-bottom: 2px solid var(--surface-2); background: var(--bg); font-size: 15px; font-weight: 800; color: var(--text-2); }
.astk-day b { color: var(--text); }
.astk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 50px; align-items: center; gap: 4px 12px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--surface-2); }
.astk-row .rv { width: 50px; min-height: 50px; padding: 0; }
.astk-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.astk-sp { display: block; min-width: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.astk-sp i { display: inline-block; width: 12px; height: 20px; margin-right: 8px; border-radius: 3px; background: var(--sp); vertical-align: -4px; }
.astk-sp-v { color: var(--muted); font-weight: 700; }
.astk-more { font-size: 15px; color: var(--muted); }
.astk-pt { font-size: 17px; line-height: 1.25; }
.astk-v { font-size: 21px; white-space: nowrap; }
.astk-sub { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
.astk-pl { color: var(--text); font-weight: 700; }
.astk-doc { color: var(--text-2); font-weight: 800; }
.astk-docb { padding: 0; border: 0; background: none; font: inherit; font-weight: 800; color: var(--link, #1D4E89); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.astk-t { margin-left: auto; color: var(--text-2); font-weight: 700; }
.astk-row.undone { opacity: 0.5; }
.astk-row.undone .astk-sp, .astk-row.undone .astk-v, .astk-row.undone .astk-pt { text-decoration: line-through; }
.astk-row.short { background: #FFF4F2; }
.astk-row.unsent { background: var(--unsynced, #E8F1FB); }

/* телефон: склад на весь экран — строки плотнее, без «откуда» значком и стрелки; метки и подписи мельче */
@media (max-width: 760px) {
  .astk .stk-tabs button { min-height: 50px; gap: 6px; font-size: 16px; }
  .astk .stk-tabs .ic { display: none; }
  .tstk-full .astk .astk-comp .r { grid-template-columns: 16px minmax(0, 1fr) 46px 64px 46px; gap: 6px; padding: 0 8px 0 10px; font-size: 16px; }
  .tstk-full .astk .astk-comp .r > .stk-src, .tstk-full .astk .astk-comp .r > .chev, .tstk-full .astk .astk-comp .r > .astk-x { display: none; }
  .tstk-full .astk .astk-comp .n small { font-size: 12.5px; }
  .tstk-full .astk .astk-comp .r .stk-days { padding: 0 6px; font-size: 12.5px; line-height: 22px; }
  .astk-note { padding: 7px 10px; font-size: 14.5px; }
  .astk-spbar { padding: 10px 10px 8px; }
  .astk-spc { gap: 2px 10px; font-size: 14px; }
  .astk-fm { padding: 10px 10px 14px; }
  .astk-fm .astk-days { margin: 0 -10px; }
  .astk-seg .seg > button { min-height: 46px; padding: 0 12px; font-size: 16px; }
  .astk-tr { margin-left: 0; }
  .astk-day { padding: 8px 10px 5px; }
  .astk-row { gap: 3px 8px; padding: 7px 8px 7px 10px; grid-template-columns: minmax(0, 1fr) auto 46px; }
  .astk-row .rv { width: 46px; min-height: 46px; }
  .astk-sp, .astk-pt { font-size: 16px; }
  .astk-v { font-size: 19px; }
  .astk-sub { gap: 3px 8px; font-size: 14px; }
  .astk-tag { padding: 0 8px; font-size: 13px; line-height: 23px; }
  .astk-sum-n { font-size: 17px; }
  .astk-sum-w { font-size: 14px; }
}
/* Форвардер: делянки, трелёвка, ходка */
.plot-felling-kind { display: block; white-space: normal; overflow-wrap: break-word; line-height: 1.35; }

/* статус делянки цветом */
.st { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; white-space: nowrap; }
.st-sm { padding: 3px 10px; font-size: 14px; }
.st-plot { background: #E4E2DB; color: #30353B; }
.st-given { background: var(--info-soft); color: #123E74; }
.st-saw { background: var(--warn-bg); color: var(--warn-text); }
.st-skid { background: var(--primary); color: #fff; }
.st-haul { background: #3F454D; color: #fff; }
.st-closed { background: transparent; color: var(--muted); border: 2px dashed #ABA69B; }
.kind-tag { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 700; background: var(--surface-2); color: #30353B; white-space: nowrap; }

/* список делянок: активная трелёвка этого аккаунта — лёгкий зелёный, другого оператора — светло-жёлтый */
.table-plots .c-obj { width: 180px; }
.table-plots .c-kind { width: 160px; }
.table-plots .c-yard { width: 180px; }
.table-plots .c-status { width: 140px; }
.table-plots .c-skid { width: 190px; }
.table-plots .c-go { width: 48px; }
.table-plots td.kind { font-weight: 600; color: var(--text-2); }
.table .row-active td { background: var(--primary-soft); }
.table .row-active td:first-child { box-shadow: inset 6px 0 0 var(--primary); }
.table .row-other td { background: #FFF4DC; }
.table .row-other td:first-child { box-shadow: inset 6px 0 0 var(--warn-line); }
/* работа на делянке закончена или делянка закрыта: строка бледная, статус — едва виден */
.table .row-closed td { color: #A3A097; background: var(--bg); }
.table .row-closed td .hint { color: inherit; }
.row-closed .st, .plot-card-closed .st { opacity: 0.35; }
.skid-open-text { color: var(--primary-press); font-weight: 800; }
.skid-other-text { color: var(--warn-text); font-weight: 800; white-space: nowrap; }

/* телефон: карточки */
.plot-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.plot-card-num { font-size: 19px; }
.plot-card-kind { font-size: 14px; font-weight: 700; color: var(--muted); }
.plot-card-line { font-size: 16px; font-weight: 600; }
.plot-card-active { background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 6px 0 0 var(--primary); }
.plot-card-other { background: #FFF4DC; border-color: var(--warn-line); box-shadow: inset 6px 0 0 var(--warn-line); }
.plot-card-closed { color: #A3A097; background: var(--bg); }
.plot-card-closed .plot-card-kind, .plot-card-closed .hint { color: inherit; }

/* «Выбрать делянку» */
.plot-pick { min-height: 76px; gap: 12px; }
.plot-pick-num { font-size: 20px; }
/* справа: дата делянки, под ней статус */
.plot-pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.plot-pick-date { font-size: 14px; font-weight: 700; color: var(--text-2); white-space: nowrap; }

/* на технике не завершена трелёвка другого оператора */
.skid-other { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 16px; border: 3px solid var(--warn-line); border-radius: var(--radius-lg); background: #FFF4DC; }
.skid-other-ico { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--warn-line); }
.skid-other-title { font-size: 21px; font-weight: 800; }
.skid-other-sub { font-size: 17px; color: var(--warn-text); font-weight: 600; }

/* делянка — документ */
.plot-title { display: flex; flex-direction: column; min-width: 0; }
.plot-title h1 { font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plot-date { font-size: 17px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
/* тип и статус — справа вверху, одно над другим */
.plot-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.plot-badges .kind-tag { padding: 3px 10px; font-size: 14px; }
.plot-grid { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 24px; align-items: start; }
.sec { font-size: 15px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.plot-info .stack { gap: 5px; }
.part { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; padding: 4px 16px; background: var(--surface); border: 2px solid var(--surface-2); border-radius: 12px; font-size: 18px; font-weight: 600; }
.part-yard { border-color: var(--line); }
.part-cuts { border-color: #E9B7A2; background: #FFF4EC; }
.part-cuts span { display: inline-flex; align-items: center; gap: 10px; }
/* номер лесосеки (47:9:11:29:ЛС2) — вместо площадей */
.plot-cutting { font-weight: 800; white-space: nowrap; }
.plot-parts-line { min-height: 46px; line-height: 1.35; }
/* на делянке сейчас работает другой аккаунт */
.plot-working { padding: 8px 14px; border-radius: 12px; background: #FFF4DC; border: 2px solid var(--warn-line); color: var(--warn-text); font-size: 17px; font-weight: 700; }
.skid-item { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.skid-item-open { border-color: var(--primary); background: var(--primary-soft); }
.skid-item-main b { font-size: 19px; }
/* карта — до нижней панели: верхняя панель 88 и отступ страницы 20, снизу — панель действий и отступ страницы 24 */
.plot-map { position: relative; isolation: isolate; height: max(360px, calc(100dvh - var(--sat) - var(--sab) - var(--bar-h) - 132px)); border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--line); background: #E4EBDD; }
.plot-map-empty { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; }
/* во весь экран — эта же карта поверх экрана (и .layer — для «Назад» телефона), не заново; системные полосы — отступом карты */
.plot-map.plot-map-full { position: fixed; inset: 0; z-index: 100; height: auto; border: 0; border-radius: 0; background: var(--surface); }
.plot-map-full .full-map { inset: var(--sat) var(--sar) var(--sab) var(--sal); }
.plot-map-full .plot-map-cuts { display: none; }
/* «Схема» (PDF техкарты) — строкой в сведениях, не на карте */
.part.part-btn { width: 100%; min-height: 52px; justify-content: flex-start; border-color: var(--line); font: inherit; font-size: 18px; color: inherit; text-align: left; cursor: pointer; }
.part-btn > .ic:first-child { color: var(--primary); }
.part-btn > .ic:last-child { color: var(--line-strong); }
/* полосы с волоками (KML программы отвода) — подписью внизу карты */
.plot-map-cuts { position: absolute; z-index: 600; left: 10px; bottom: 10px; display: flex; gap: 6px; pointer-events: none; }
.plot-map-cuts span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); font-size: 14px; font-weight: 800; color: var(--text-2); }
.plot-cut-sw { display: inline-block; width: 20px; height: 11px; border-radius: 3px; }
.plot-cut-sw.strip { background: rgba(249, 115, 22, 0.55); border: 2px solid #C2410C; box-shadow: 0 0 0 1.5px #fff; }
.plot-cut-sw.skid { background: #16A34A; height: 7px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #14532D; }

/* окна трелёвки и рубки; единица в поле числа («%», «м³») — справа */
.box-unit { flex: none; font-size: 20px; font-weight: 700; color: var(--muted); }
.skid-dialog-plot { margin-top: -6px; font-size: 20px; }
.skid-dialog-actions .btn { min-width: 180px; }
.skid-dialog-actions .btn-primary { min-width: 240px; }
.skid-done-title { color: var(--text); }
/* «Да, завершить окончательно» на телефоне — в две строки, а не за край окна */
.skid-close-actions .btn { width: 100%; white-space: normal; line-height: 1.2; text-align: center; }

/* трелёвка */
.skid-title { font-size: 30px; }
.skid-info { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; margin-bottom: 14px; }
.skid-info-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 12px 8px 20px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.skid-info-plot { font-size: 20px; white-space: nowrap; }
.skid-info-total { font-size: 20px; font-weight: 900; white-space: nowrap; }
.skid-info-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; }
.skid-info-more .flip { transform: rotate(180deg); }
.skid-info-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; padding: 4px 20px 16px; }
.kv-rows { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; font-size: 18px; align-content: start; }
.kv-rows > span { color: var(--muted); font-weight: 600; font-size: 16px; }

.skid-day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.skid-day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0; border: 0; background: transparent; font: inherit; color: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.skid-day-head b { font-size: 20px; }
.skid-day-closed { min-height: 58px; padding: 0 16px; background: var(--surface-2); border-radius: 14px; }
.skid-run { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 5px 8px 5px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.skid-run-click { cursor: pointer; }
.skid-run-click:hover { background: var(--hover); }
.skid-run-onec { background: var(--bg); }
.skid-run-time { width: 56px; flex: none; font-size: 17px; font-weight: 500; color: var(--text-2); }
.skid-run-mix { flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.skid-run-yard { font-size: 15px; font-weight: 700; color: var(--warn-text); background: var(--warn-bg); border-radius: 8px; padding: 2px 8px; }
.skid-run-vol { flex: none; min-width: 48px; text-align: right; font-size: 16px; font-weight: 500; color: var(--text-2); }
/* состав ходки: плашки плотнее; внутри плашки — текст без своей подложки и отступов */
/* «Повторить ходку» — чуть меньше обычной кнопки */
.skid-run .btn.skid-run-copy { width: 52px; min-height: 52px; }
.skid-run .mix { gap: 4px; }
.skid-run .mix > span { display: block; max-width: 100%; padding: 3px 7px; font-size: 14px; line-height: 1.3; }
.skid-run .mix > span.spb-chip { padding-left: 11px !important; }
.skid-run .mix > span span { display: inline; padding: 0; background: none; border-radius: 0; }
/* часть состава («Берёза», «Пиловочник», «4 м», «100%», «2 ходки») не разрывается — перенос только между частями */
.mix-part { white-space: nowrap; }
.skid-finish { min-width: 0; }
/* ходка: «Сохранить» — во всю ширину (рядом только «Удалить») */
.actionbar .btn.run-save { flex: 1; min-width: 0; }

/* ходка: склад и сведения — сразу под составом */
.run-bottom { margin-top: 16px; align-items: end; }
.run-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; font-size: 18px; }

@media (max-width: 900px) {
  .plot-grid { grid-template-columns: minmax(0, 1fr); }
  /* карта сверху: под ней на экране — участки и первые работы (--plot-info-h, fitPlotGrid); панель 72, отступы 14 и 16, зазор 24 */
  .plot-map { order: -1; height: max(300px, calc(100dvh - var(--sat) - var(--sab) - var(--bar-h) - 126px - var(--plot-info-h, 0px))); }
  .skid-info-body { grid-template-columns: minmax(0, 1fr); }
  .table-plots .c-kind, .table-plots td.kind { display: none; }
}

@media (max-width: 600px) {
  .plot-title h1 { font-size: 20px; }
  .plot-map { height: max(230px, calc(100dvh - var(--sat) - var(--sab) - var(--bar-h) - 126px - var(--plot-info-h, 0px))); border-radius: 18px; }
  /* подпись «полосы · волоки» на телефоне не нужна (полосы и волоки на карте и так видны) */
  .plot-map-cuts { display: none; }
  .part { font-size: 16px; min-height: 38px; padding: 3px 12px; }
  .part.part-btn { min-height: 48px; font-size: 16px; }
  .plot-date { font-size: 14px; }
  .plot-badges .kind-tag { padding: 2px 8px; font-size: 12px; }
  .plot-badges .st-sm { padding: 2px 8px; font-size: 12px; }
  .skid-other { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; }
  .skid-other > .grow { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .skid-other-ico { width: 44px; height: 44px; }
  .skid-other-title { font-size: 18px; }
  .skid-other-sub { font-size: 15px; }
  .skid-other .btn { flex-basis: 100%; }
  .skid-title { font-size: 22px; }
  .skid-info-head { padding: 8px 10px 8px 14px; }
  .skid-info-plot { font-size: 18px; }
  .skid-run { gap: 10px; padding: 6px 6px 6px 12px; }
  .skid-run-time { width: 44px; font-size: 15px; }
  .skid-run-vol { font-size: 15px; min-width: 36px; }
  .skid-run .mix > span { font-size: 13px; white-space: normal; padding: 2px 6px; }
  /* «Завершить» — квадрат высотой с «Добавить ходку», та — во всю ширину до неё */
  .actionbar .btn.skid-finish { width: 76px; min-height: 76px; padding: 0; flex: none; border-radius: 18px; }
  .skid-run .mix > span.spb-chip { padding-left: 10px !important; }
  .skid-run .btn.skid-run-copy { width: 46px; min-height: 46px; }
  .skid-day-head { font-size: 16px; }
  .skid-day-head b { font-size: 17px; }
  .run-info { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 16px; }
  .skid-dialog-actions { flex-wrap: nowrap; }
  .skid-dialog-actions .btn { min-width: 0; flex: 1; }
  .skid-dialog-actions .btn-primary { flex: 2; }
}

/* ходка на планшете: кузов слева, строки состава справа (как в макете) */
@media not all and (max-width: 900px) {
  .run-page > .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
}
/* Харвестер: рубка — строки «порода · сортимент · длина — м³», окна добавления и исправления */

/* рубка: даты «с … по …» — под номером делянки */
.felling-info-head { flex-wrap: wrap; }
.felling-info-title { display: flex; flex-direction: column; align-items: flex-start; min-width: min(200px, 100%); max-width: 100%; }
.felling-info-title .skid-info-plot { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.felling-info-head .skid-info-total, .felling-info-head .skid-info-more { flex: none; }

/* делянка: почему нельзя начать — рядом с «Рубка закончена» */
.felling-limit { font-size: 18px; font-weight: 700; color: var(--text-2); }
.table-plots .c-felling { width: 250px; }
.table-plots .plot-row-date { font-size: 13px; }

/* делянка: номер лесосеки после квартала и лесосеки не разрывается; начать нельзя — почему, вместо кнопки */
.plot-sec-cutting { white-space: nowrap; }
.plot-blocked { flex: 1; min-width: 0; text-align: center; }

/* рубка: по породам — в строке сведений */
.felling-species { display: flex; flex: 1 1 240px; min-width: 0; flex-wrap: wrap; gap: 6px; }
.felling-species > span { display: inline-flex; align-items: center; padding: 3px 10px 3px 12px; border-radius: 8px; font-size: 15px; font-weight: 700; background: var(--surface-2); white-space: nowrap; }

/* строка состава */
.felling-rows { display: flex; flex-direction: column; gap: 8px; }
.felling-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 2px 4px 2px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; }
.felling-row-last { background: var(--info-soft); border-color: #AFC6EA; }
.felling-row-name { flex-grow: 1; min-width: 0; font-size: 19px; font-weight: 700; }
/* объём — тем же шрифтом, что порода · сортимент · длина */
.felling-row-vol { flex: none; min-width: 110px; text-align: right; font-size: 19px; font-weight: 700; white-space: nowrap; }
.felling-row-vol small { margin-left: 4px; font-size: inherit; }
.felling-row .btn { width: 46px; min-height: 44px; border-radius: 10px; }
.felling-row.spb { padding-left: 22px !important; }

/* окно «Добавить»: выбор слева, объём справа */
.felling-add-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: stretch; }
.felling-add-combos { max-height: min(560px, calc(100dvh - 220px)); overflow: auto; }
.felling-add-side { display: flex; flex-direction: column; gap: 14px; }
.felling-add-picked { display: block; padding: 6px 10px 6px 16px; font-size: 20px; border-radius: 10px; }
.felling-add-was { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--info-soft); color: #123E74; font-size: 17px; font-weight: 700; line-height: 1.35; }
.felling-vol-box { min-height: 84px; border-color: var(--primary); }
.felling-add-actions .btn { flex: 1; }
.felling-add-actions .btn-primary { flex: 2; }
/* «Исправить строку»: корзина — квадрат, в одну строку с «Отмена» и «Сохранить» */
.felling-edit-actions { margin-top: 4px; }
.felling-edit-actions .btn-square { width: 76px; }
/* после закрытия рубки: недопиленные выделы — кнопками, отмеченные — жёлтые */
.felling-uncut { display: flex; flex-wrap: wrap; gap: 10px; }
.felling-uncut-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 19px; font-weight: 700; color: var(--text); cursor: pointer; }
.felling-uncut-chip.on { border: 3px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
/* «Да, завершить окончательно» — в одну строку: ей колонка шире */
@media not all and (max-width: 900px) {
  .felling-done-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
}
/* «Закрыть рубку»: на телефоне — одна под другой */
.felling-close-actions .btn { min-width: 180px; }
.felling-close-actions .btn-primary { min-width: 240px; }

@media (max-width: 900px) {
  .felling-add-grid { grid-template-columns: minmax(0, 1fr); }
  .felling-add-combos { max-height: none; overflow: visible; }
}

@media (max-width: 600px) {
  .felling-limit { font-size: 15px; }
  .felling-row { gap: 8px; min-height: 46px; padding: 2px 3px 2px 12px; }
  .felling-row-name { font-size: 15px; line-height: 1.25; }
  .felling-row-vol { min-width: 0; font-size: 15px; line-height: 1.25; }
  .felling-row .btn { width: 42px; min-height: 40px; }
  /* «Добавить» — во всю ширину до «Закрыть рубку»; та — квадрат высотой с «Добавить» */
  .actionbar .btn.felling-finish { width: 76px; min-height: 76px; padding: 0; flex: none; border-radius: 18px; }
  .felling-species > span { font-size: 13px; padding: 2px 8px 2px 10px; }
  /* телефон: корзина поуже, «Отмена» и «Сохранить» делят остальное (у «Сохранить» без значка — чтобы поместилось) */
  .felling-edit-actions { gap: 8px; }
  .felling-edit-actions > .grow { display: none; }
  .felling-edit-actions .btn-square { width: 64px; }
  .felling-edit-actions .btn:not(.btn-square) { flex: 1; min-width: 0; padding: 0 10px; font-size: 18px; }
  .felling-edit-actions .btn-primary > .ic { display: none; }
  .felling-uncut { gap: 8px; }
  .felling-uncut-chip { min-height: 50px; padding: 0 14px; font-size: 17px; }
  .felling-close-actions { flex-direction: column; }
  .felling-close-actions .btn { width: 100%; min-width: 0; }
}

/* кубатурник: во весь экран, как точковка — длины сверху (строка листается вбок), диаметры, внизу итог */
.cu-screen { height: 100dvh; display: flex; flex-direction: column; gap: 12px; padding: calc(16px + var(--sat)) calc(var(--gutter) + var(--sar)) calc(16px + var(--sab)) calc(var(--gutter) + var(--sal)); background: var(--surface); }
.tl-t.cu-len { min-width: 130px; padding-left: 16px !important; }
.tl-t.cu-len b { font-size: 21px; }
/* длина, где ничего не набрано, — уже (только «4 м») */
.tl-t.cu-len.cu-empty { min-width: 84px; }
.cu-total { margin-left: auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cu-total b { font-size: 26px; font-weight: 900; line-height: 1.15; white-space: nowrap; }
.cu-total span { font-size: 15px; font-weight: 700; color: var(--text-2); }

@media (max-width: 600px) {
  .tl-t.cu-len { min-width: 96px; min-height: 56px; }
  .tl-t.cu-len.cu-empty { min-width: 64px; }
  /* заголовок на телефоне виден (у точковки там итог) */
  .cu-screen .tl-head { justify-content: flex-start; }
  .cu-screen .tl-title { display: block; }
  /* очистить и отменить — квадраты, остальное — итог */
  .cu-screen .tl-actions.cu-actions .btn { flex: 0 0 56px; min-height: 56px; }
  .cu-total b { font-size: 20px; }
  .cu-total span { font-size: 12px; }
}
/* Приложение администратора — «Склады» (screens/stocks/StocksScreen.tsx, макет StockAdminApp.html): «Список / Карта»,
   отборы, склады карточками; склад на телефоне — на весь экран (общая карточка, ui/src/stock). */
.tstk-screen { height: 100vh; height: 100dvh; min-height: 0; }
.tstk-title { flex: 1; min-width: 0; margin: 0; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tstk-seg { flex: none; display: grid; grid-template-columns: 1fr 1fr; margin: 10px var(--gutter) 0; border: 2px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.tstk-seg button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 0; background: var(--surface); font: inherit; font-size: 18px; font-weight: 800; color: var(--text); cursor: pointer; }
.tstk-seg button + button { border-left: 2px solid var(--line-strong); }
.tstk-seg button.on { background: var(--primary); color: #fff; }
.tstk-seg .ic { width: 22px; height: 22px; }
.tstk-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px var(--gutter) 24px; }
.tstk-search { flex: none; min-height: 54px; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: 14px; font: inherit; font-size: 18px; }
.tstk-chips { flex: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tstk-chips button { min-height: 42px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font: inherit; font-size: 15.5px; font-weight: 700; color: var(--text); cursor: pointer; }
.tstk-chips button.on { background: #1F2328; border-color: #1F2328; color: #fff; }
.tstk-empty { padding: 30px 4px; text-align: center; }
.tstk-row { flex: none; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.tstk-row .t { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.tstk-row .t .stk-sq { width: 32px; height: 32px; border-radius: 9px; }
.tstk-row .t .stk-sq .ic { width: 20px; height: 20px; }
.tstk-row .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tstk-row .v { white-space: nowrap; }
.tstk-row small { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.tstk-row .bar { display: flex; height: 8px; margin-top: 2px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.tstk-row .w { color: #8A5A00; font-weight: 800; }
.tstk-row.warn { border-color: #D9A233; background: #FFF8E8; }
.tstk-row.unsent { background: var(--unsynced); border-color: #AFC6EA; }
.tstk-row.gone { opacity: 0.6; }
.tstk-map { margin-top: 10px; }
.tstk-full { position: relative; flex: 1; min-height: 0; isolation: isolate; }
/* граница — парой с (max-width: 760px) ниже: у 8-дюймовых планшетов ширина дробная, min-width: 761px оставлял щель (№ 247) */
@media not all and (max-width: 760px) {
  .tstk-seg { max-width: 520px; }
}

/* склад на весь экран телефона: шапка в две строки (итог — второй строкой, крупно), состав плотнее (без «откуда»),
   в истории разница — под текстом (макет StockAdminApp.html, «Склад») */
@media (max-width: 760px) {
  .tstk-full .stk-hd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; row-gap: 4px; }
  .tstk-full .stk-hd .stk-tot { grid-column: 1 / -1; grid-row: 2; font-size: 26px; }
  .tstk-full .stk-body { padding: 10px 10px 0; }
  .tstk-full .stk-comp .r { grid-template-columns: 16px minmax(0, 1fr) 62px 76px 18px; gap: 6px; padding: 0 8px 0 10px; font-size: 17px; }
  .tstk-full .stk-comp .stk-src { display: none; }
  .tstk-full .stk-comp .gh { padding: 0 10px; font-size: 16px; }
  .tstk-full .stk-hist .e { grid-template-columns: 44px 32px minmax(0, 1fr) 48px; grid-template-areas: 't q w r' 't q d r'; gap: 2px 8px; padding: 6px 8px 6px 10px; }
  .tstk-full .stk-hist .e > .t { grid-area: t; font-size: 15px; }
  .tstk-full .stk-hist .e > .stk-sq { grid-area: q; width: 30px; height: 30px; }
  .tstk-full .stk-hist .e > .stk-sq .ic { width: 18px; height: 18px; }
  .tstk-full .stk-hist .e > .w { grid-area: w; }
  .tstk-full .stk-hist .e > .w b { font-size: 16px; }
  .tstk-full .stk-hist .e > .d { grid-area: d; font-size: 15px; }
  .tstk-full .stk-hist .e > :last-child { grid-area: r; }
  .tstk-full .stk-hist .rv { width: 46px; min-height: 46px; }
}
/* Фото отдельно от документов: плитки по дням, отметка — на сервере или ещё на планшете */
.fp-day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.fp-day h3 { margin: 0; font-size: 18px; color: var(--text-2); }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fp-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); padding: 0; cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.fp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-mark { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.fp-mark.ok { color: var(--primary); }
/* из галереи — значок картинки слева сверху */
.fp-gallery { position: absolute; left: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn-text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.fp-mark.wait { color: var(--info); }
.fp-time { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 14px; font-weight: 700; }
@media (max-width: 600px) {
  .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* файл («Файл…»): значок по типу, имя, размер; полоса снизу — сколько дошло */
.fp-tile.fp-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 10px 32px; }
.fp-file .fp-file-ic { width: 48px; height: 48px; }
.fp-name { max-width: 100%; font-size: 15px; font-weight: 700; color: var(--text); text-align: center; overflow: hidden; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fp-size { font-size: 13px; color: var(--text-2); }
.fp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--line); }
.fp-bar > span { display: block; height: 100%; background: var(--info); }
.fp-file-view { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.fp-file-view .fp-file-ic { width: 64px; height: 64px; color: var(--text-2); }
.fp-file-view p { margin: 0; word-break: break-word; }
/* Зарплата: начисления за месяц — таблица на планшете, список на телефоне, итог в нижней панели */
.salary-title { white-space: nowrap; }
.salary-months { margin-bottom: 12px; }

/* вид начисления: трелёвка — зелёный, погрузка и рейс — синий */
.pay-kind { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.pay-haul { background: var(--primary-soft); color: var(--primary-press); }
.pay-load, .pay-trip { background: var(--info-soft); color: var(--info); }
.pay-skid { background: var(--primary-soft); color: var(--primary-press); }
.pay-felling { background: var(--primary-soft); color: var(--primary-press); }
.pay-extra { background: var(--warn-bg); color: var(--warn-text); }
.pay-problem { background: var(--danger-soft); color: #7A160F; border-radius: 6px; padding: 0 6px; font-weight: 700; }
.salary-plot { font-size: 18px; white-space: nowrap; }
.pay-kind-total { padding: 8px 14px; }

.table th.c-pay-kind { width: 170px; }
.table th.c-pay-date { width: 120px; }
.table th.c-pay-sum { width: 150px; text-align: right; }
.table td.pay-sum { text-align: right; font-weight: 800; font-size: 20px; white-space: nowrap; }
.salary-open { cursor: pointer; }
.table .salary-open:hover td { background: var(--hover); }
.salary-doc { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* точковка в подробностях строки — заметно */
.pay-dots { padding: 0 6px; border-radius: 6px; font-weight: 800; color: var(--warn-text); background: var(--warn-bg); }

.salary-total-label { text-align: right; line-height: 1.2; font-size: 18px; font-weight: 700; color: var(--text-2); }
.salary-total-label .hint { font-weight: 400; }
.salary-total { font-size: 36px; font-weight: 900; white-space: nowrap; }

/* телефон: строки в одной карточке */
.salary-list { padding: 0; overflow: hidden; }
.salary-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.salary-item + .salary-item { border-top: 1px solid var(--line); }
.salary-item-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.salary-item .salary-doc { gap: 8px; }
.salary-item .pay-kind { font-size: 14px; padding: 4px 10px; }
/* подробности — переносятся: ошибка расчёта должна быть видна целиком */
.salary-item-hint { overflow-wrap: anywhere; line-height: 1.35; }
.salary-item .pay-sum { font-weight: 800; font-size: 19px; white-space: nowrap; }

@media (max-width: 900px) {
  .table th.c-pay-kind { width: 130px; }
  .table th.c-pay-sum { width: 120px; }
  .salary-total { font-size: 30px; }
}

@media (max-width: 600px) {
  .salary-total-label { text-align: left; font-size: 17px; }
}
/* «Входящие»: карточки текста и файлов, новые — голубым */
.inbox-list { display: flex; flex-direction: column; gap: 14px; }
.inbox-card { display: flex; flex-direction: column; gap: 12px; }
.inbox-new { background: var(--unsynced); border-color: #AFC6EA; }
.inbox-tag { padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--info); background: var(--info-soft); }
.inbox-text { font-size: 20px; line-height: 1.45; white-space: pre-wrap; user-select: text; -webkit-user-select: text; overflow-wrap: anywhere; }

.inbox-file { display: flex; align-items: center; gap: 18px; }
.inbox-thumb { width: 150px; height: 110px; flex: none; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.inbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inbox-icon { width: 110px; height: 110px; flex: none; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
.inbox-file-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inbox-name { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.inbox-actions { display: flex; gap: 12px; }
.inbox-full { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; border-radius: 12px; }

@media (max-width: 600px) {
  .inbox-text { font-size: 18px; }
  .inbox-file { flex-wrap: wrap; gap: 12px; }
  .inbox-thumb { width: 100%; height: 170px; }
  .inbox-icon { width: 64px; height: 64px; }
  .inbox-name { font-size: 17px; }
  .inbox-actions { width: 100%; }
  .inbox-actions .btn:last-child { flex: 1; }
}
/* ТО машин: список машин и экран машины — крупно, для механика у машины; чек-лист — ui/src/maint */
.maint-rows { display: flex; flex-direction: column; gap: 12px; }
.maint-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; width: 100%; min-height: 84px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.maint-row-done { background: var(--unsynced); border-color: #AFC6EA; }
.maint-name { flex: 1 1 240px; min-width: 0; font-size: 24px; font-weight: 800; overflow-wrap: anywhere; }
.maint-marked { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; color: var(--info); background: var(--info-soft); }
.maint-nodata { font-size: 16px; font-weight: 700; color: var(--text-2); }
.maint-unsent { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; background: var(--info); }

.maint-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; border-radius: 18px; background: var(--surface-2); }
.maint-state b { font-size: 26px; font-weight: 900; }
.maint-state span { font-size: 18px; font-weight: 700; color: var(--text-2); }
.maint-state-done { background: var(--unsynced); color: var(--info); }
.maint-state-done svg { width: 56px; height: 56px; }
.maint-after { display: flex; justify-content: center; margin-top: 16px; }

.maint-rejected { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; color: #fff; background: var(--danger, #C5301F); }
.maint-rej-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.maint-rej { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--danger-soft, #FBE4E0); border: 2px solid var(--danger, #C5301F); }
.maint-rej-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.maint-rej-text b { font-size: 20px; font-weight: 900; color: var(--danger, #C5301F); overflow-wrap: anywhere; }
.maint-rej-text span { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .maint-name { flex-basis: 100%; font-size: 22px; }
}

/* макет MaintRound2 (?mock=MR2A, MR2B; MaintRound2.tsx) */
.maint-r2 { display: flex; flex-direction: column; gap: 12px; }
.maint-short { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; background: #FFF7E6; color: #4F3300; border: 2px solid #F0D49A; }
.maint-after { gap: 12px; flex-wrap: wrap; }
/* «Проверить разрешения» (PermsDialog.tsx): сводка на кнопке и строки окна */
.perm-sum { margin-left: 6px; padding: 1px 9px; border-radius: 999px; font-size: 0.85em; font-weight: 800; }
.perm-sum-bad { background: var(--danger-soft); color: var(--danger); }
.perm-sum-ok { background: var(--primary-soft); color: var(--primary); }
.perm-list { display: flex; flex-direction: column; }
.perm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--line); }
.perm-row:first-child { border-top: 0; }
.perm-ic { display: inline-flex; color: var(--text-2); }
.perm-ic svg { width: 22px; height: 22px; }
.perm-bad .perm-ic { color: var(--danger); }
.perm-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.perm-name b { font-weight: 700; }
.perm-name small { color: var(--text-2); font-size: 0.85em; }
.perm-ok { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.perm-ok svg { width: 20px; height: 20px; stroke-width: 3; }
/* служебное окно: выбор сервера — рабочий (зелёный) или тестовый (оранжевый) */
.svc-label { font-weight: 700; color: var(--text-2); }
.svc-servers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-server { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 14px 16px; border: 3px solid var(--line-strong); border-radius: 18px; background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.svc-server b { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.svc-server b i { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); flex: none; }
.svc-server span { font-size: 15px; color: var(--text-2); }
.svc-server-on { border-color: var(--primary); background: var(--primary-soft); cursor: default; }
.svc-server-test b i { background: #E8740C; }
.svc-server-test.svc-server-on { border-color: #E8740C; background: #FFF0E0; }
.btn.svc-to-test:not(:disabled) { background: #E8740C; border-color: #E8740C; color: #fff; }
.svc-code { font-size: 30px; font-weight: 800; letter-spacing: 0.25em; }

/* скачивание карт — подробно: поле сверху, значение снизу */
.svc-diag { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0 0 4px; }
.svc-diag > div { min-width: 0; }
.svc-diag > .w { grid-column: 1 / -1; }
.svc-diag dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.svc-diag dd { margin: 1px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

/* подставное место: две кнопки в ряд */
.svc-row { display: flex; gap: 10px; }
.svc-row > * { flex: 1; min-width: 0; }
/* выбор подставного места: карта во весь экран, перекрестие посередине, внизу — координаты и «Поставить сюда» */
.fpk { display: flex; flex-direction: column; background: var(--bg); padding: var(--sat) var(--sar) var(--sab) var(--sal); }
.fpk-bar { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 18px; background: var(--surface); border-bottom: 2px solid var(--line); }
.fpk-bar h2 { margin: 0; flex: 1; font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpk-q { flex: 0 1 360px; }
.fpk-map { position: relative; flex: 1; min-height: 0; }
.fpk-cross { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 500; pointer-events: none; }
.fpk-cross::before, .fpk-cross::after { content: ""; position: absolute; background: #6B3FA0; box-shadow: 0 0 0 2px #fff; }
.fpk-cross::before { left: 21px; top: 0; width: 3px; height: 44px; }
.fpk-cross::after { top: 21px; left: 0; width: 44px; height: 3px; }
.fpk-foot { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--surface); border-top: 2px solid var(--line); }
.fpk-at { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; color: var(--text-2); }
@media (max-width: 760px) {
  .fpk-bar { gap: 10px; padding: 0 12px; }
  .fpk-bar h2 { display: none; }
  .fpk-q { flex: 1 1 0; }
}
/* Модуль «Машины» (телефон-курьер): макет docs/mockups/MachinesPhone.html */
.mc-page { display: flex; flex-direction: column; gap: 12px; }
.mc-banner { font-size: 15.5px; padding: 12px 14px; }

.mc-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mc-card.mc-far { background: var(--surface-2); }
.mc-card .mc-h { display: flex; align-items: center; gap: 10px; }
.mc-card .mc-h b { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-card.mc-far .mc-h b { color: var(--text-2); }

.mc-tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap; flex: none; }
.mc-tag-ok { background: var(--primary-soft); color: var(--primary-press); }
.mc-tag-warn { background: var(--warn-bg); color: var(--warn-text); }
.mc-tag-sync { background: var(--info-soft); color: var(--info); }
/* «Удалить машину?» */
.mc-del { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mc-del p { margin: 0; font-size: 17px; line-height: 1.4; }

.mc-near { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--text); }
.mc-near i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--muted); }
.mc-near.on i { background: var(--primary); }
.mc-near.off { color: var(--text-2); }
.mc-near .mc-off { color: var(--warn-text); }
.mc-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
/* никого не нашли: крупно и что делать */
.mc-empty { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.mc-empty b { font-size: 19px; }
.mc-empty span { font-size: 15.5px; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.mc-bars span { width: 4px; background: var(--primary-press); border-radius: 1px; }
.mc-bars span.o { background: var(--line-strong); }

.mc-ln { font-size: 15.5px; font-weight: 600; line-height: 1.35; display: flex; gap: 6px; align-items: flex-start; }
.mc-ln .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mc-card.mc-far .mc-ln { color: var(--text-2); }
/* обмен сам: когда последний и сколько сегодня — мелко, не мешает */
.mc-ln.mc-auto { font-size: 14px; font-weight: 500; color: var(--text-2); }
.mc-big { min-height: 60px; font-size: 19px; }

.mc-up { color: var(--primary-press); }
.mc-run { color: var(--info); }
.mc-wait { color: var(--muted); }
.mc-bad { color: var(--danger); }

/* обмен */
.mc-st { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.mc-st .mc-p { font-size: 30px; font-weight: 800; }
.mc-prog { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mc-prog i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s; }
.mc-sec { font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin: 2px 0 -4px; }
.mc-list { padding: 4px 14px; }
.mc-it { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 16px; font-weight: 600; }
.mc-it:first-child { border-top: 0; }
.mc-it > .ic, .mc-it > .spinner { width: 22px; height: 22px; flex: none; }
.mc-it .mc-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mc-it .mc-s { margin-left: auto; color: var(--text-2); font-size: 14px; font-weight: 700; white-space: nowrap; text-align: right; }

/* QR */
.mc-lead { font-size: 18px; font-weight: 700; line-height: 1.4; }
.mc-cam { position: relative; height: 380px; max-height: 50dvh; border-radius: 18px; background: #2b3036; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; border: 0; padding: 0; width: 100%; cursor: pointer; color: #fff; font: inherit; font-size: 18px; font-weight: 700; }
.mc-cam:disabled { opacity: 0.6; cursor: default; }
.mc-cam svg.mc-qr { background: #fff; padding: 8px; border-radius: 10px; border: 2px solid var(--line); }
.mc-cam .mc-cam-l { display: inline-flex; align-items: center; gap: 8px; }
/* Экран машины (макет docs/mockups/TabletSecondScreen.html, кадры 4.1–4.2, 7.1 — без полосы «Экран машины» сверху и без
   «Откуда что»): карта на весь экран, чат свёрнут облаком, окошко чата поверх карты; нет связи — пометка сверху */
.ms-page { position: relative; flex: 1; min-height: 0; isolation: isolate; overflow: hidden; }
.ms-page .full-map { position: absolute; inset: 0; }
/* кнопки карты — столбцом справа, как у ПК (blocks/map/map.css .map-tools-right), крупнее обычной карты: пальцем в кабине;
   меню и вид — того же размера и вида (23.11.2026) */
.ms-page.map-tools-right { --mt: 52px; --mt-z: 72px; }

.ms-fab { position: absolute; z-index: 20; width: var(--mt); height: var(--mt); border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line-strong); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: center; color: var(--text); padding: 0; cursor: pointer; }
.ms-fab .ic { width: 28px; height: 28px; }
.ms-fab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ms-menu { left: 10px; top: 10px; }
/* масштаб и «i» — над облаком чата */
.ms-page .lmap .leaflet-bottom.leaflet-right { bottom: 104px; }

/* делянка: номер и полосы пройдено */
.ms-plot { position: absolute; z-index: 20; left: 14px; bottom: 14px; max-width: calc(100% - 140px); display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 18px 0 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
.ms-plot .ic { width: 28px; height: 28px; color: #C2410C; flex: none; }
.ms-plot b { font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-bar { display: inline-block; width: 110px; height: 10px; border-radius: 5px; background: #E4E2DB; overflow: hidden; flex: none; }
.ms-bar i { display: block; height: 100%; border-radius: 5px; background: rgba(194, 65, 12, 0.75); }
.ms-pct { font-size: 16px; font-weight: 800; color: var(--text-2); }

/* головка харвестера у края делянки (EdgeAlert): сверху посередине, под пометкой связи; нажатие — успокоить */
.ms-edge { position: absolute; z-index: 24; left: 50%; top: 84px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); pointer-events: none; }
.ms-edge > * { pointer-events: auto; }

/* связь с ПК: только когда её нет (или ПК перезапускается) — последнее состояние остаётся под пометкой */
.ms-link { position: absolute; z-index: 25; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; min-height: 56px; max-width: calc(100% - 200px); padding: 8px 20px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-text); border: 2px solid var(--warn-line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); font-size: 19px; font-weight: 800; }
.ms-link.restart { background: var(--info-soft); color: var(--info-text); border-color: var(--info); }
/* на связи по Bluetooth через модуль (13.10): без карт — спокойно, не как «нет связи» */
.ms-link.ble { min-height: 0; padding: 6px 14px; gap: 8px; border-radius: 999px; background: var(--info-soft); color: var(--info-text); border: 1px solid var(--info); box-shadow: none; font-size: 15px; font-weight: 700; }
.ms-link.ble .ic { width: 20px; height: 20px; }
.ms-link .ic { width: 26px; height: 26px; flex: none; }
.ms-link small { font-size: 15px; font-weight: 600; }
.ms-link .spinner { flex: none; }
.ms-page.ms-lost .lmap-canvas { filter: grayscale(0.55) opacity(0.8); }

.ms-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--bg); text-align: center; padding: 24px; }
.ms-wait h1 { font-size: 34px; margin: 0; }
.ms-wait p { font-size: 20px; font-weight: 600; color: var(--text-2); max-width: 640px; margin: 0; }

/* облако чата и подсказка о новом сообщении */
.ms-cloud { position: absolute; z-index: 30; right: 18px; bottom: 18px; width: 76px; height: 76px; border-radius: 50%; background: var(--primary); color: #fff; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.ms-cloud .ic { width: 36px; height: 36px; }
.ms-cloud.on { background: var(--surface); color: var(--text); border-color: var(--primary); }
.ms-cloud .n { position: absolute; top: -8px; right: -8px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; background: var(--info); color: #fff; border: 3px solid #fff; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ms-hint { position: absolute; z-index: 30; right: 108px; bottom: 40px; max-width: min(520px, calc(100% - 140px)); display: flex; flex-direction: column; gap: 1px; padding: 9px 16px 10px; border-radius: 18px 18px 6px 18px; background: var(--surface); border: 2px solid var(--primary); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ms-hint b { font-size: 14.5px; font-weight: 800; color: var(--primary-press); }
.ms-hint span { font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* окошко чата поверх карты; развернуть — на весь экран */
.ms-cw { position: absolute; z-index: 30; right: 18px; bottom: 108px; width: min(480px, calc(100% - 36px)); height: min(560px, calc(100% - 130px)); display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); overflow: hidden; }
.ms-cw.full { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 40; }
.ms-cw-h { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 2px solid #E8E6DF; }
.ms-cw-h .btn { width: 52px; min-height: 52px; padding: 0; flex: none; }
.ms-cv { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; }
.ms-cv > button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.ms-cv > button.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-press); }
.ms-cv .sd { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); flex: none; }
.ms-cv .sd.ok { background: var(--primary); }
.ms-cv .sd.warn { background: var(--warn-line); }
.ms-cv .n { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--info); color: #fff; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; }
.ms-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 10px 12px; background: var(--bg); }
.ms-msgs > :first-child { margin-top: auto; }
.ms-msgs .hint { align-self: center; }
.ms-bb { align-self: flex-start; max-width: min(330px, 85%); display: flex; flex-direction: column; gap: 2px; padding: 8px 13px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 2px solid var(--line); }
.ms-cw.full .ms-bb { max-width: min(620px, 80%); }
.ms-bb.out { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--primary-soft); border-color: #B9DAC6; }
.ms-bb .who { font-size: 13.5px; font-weight: 800; color: var(--primary-press); }
.ms-bb .tx { font-size: 18.5px; font-weight: 600; line-height: 1.28; overflow-wrap: anywhere; }
.ms-bb .mt { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ms-bb .mt .ic { width: 18px; height: 18px; }
.ms-bb .mt .rd { color: var(--primary); }
.ms-bb .mt .bad { color: var(--danger); }
/* голосовое — общий VoiceClip (@les/ui, вид — его voiceClip.css): ▶/⏸, волна с ходом, время; «Оба» — под текстом в том же пузыре */
.ms-bb.vc { width: min(340px, 88%); }
.ms-cw.full .ms-bb.vc { width: min(460px, 80%); }
.ms-bb .tx + .ms-voice { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.ms-comp { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 2px solid #E8E6DF; }
.ms-comp .box { flex: 1; min-width: 0; min-height: 60px; font-size: 18px; }
.ms-comp .btn { width: 60px; min-height: 60px; padding: 0; flex: none; }
.ms-rec { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 14px; border-radius: 14px; background: var(--danger-soft); color: var(--danger-text); font-size: 18px; font-weight: 800; }
.ms-rec i { width: 14px; height: 14px; border-radius: 50%; background: var(--danger); flex: none; }

/* живой текст под записью голосового и окно «Текст / Голос / Оба» после неё (распознаёт ПК) */
.ms-live { display: flex; align-items: flex-start; gap: 10px; max-height: 96px; overflow-y: auto; padding: 10px 14px; border-top: 2px solid #E8E6DF; background: var(--surface); font-size: 18px; font-weight: 600; line-height: 1.3; }
.ms-live .ic { width: 22px; height: 22px; flex: none; margin-top: 1px; color: var(--muted); }
.ms-live.soft { color: var(--muted); }
.ms-vr { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border-top: 2px solid #E8E6DF; background: var(--surface); }
.ms-vr-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ms-vr-h .ic { width: 22px; height: 22px; color: var(--danger); flex: none; }
.ms-vr-h b { font-size: 17px; white-space: nowrap; }
.ms-vr-h span { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-vr-t { display: block; width: 100%; min-height: 64px; resize: none; font: inherit; font-size: 18px; font-weight: 600; padding: 8px 12px; }
.ms-vr-t.draft { color: var(--text-2); }
.ms-vr-b { display: flex; gap: 8px; }
.ms-vr-b .btn { flex: 1; min-height: 56px; font-size: 17px; }
.ms-vr-b .btn-square { flex: none; width: 56px; }

/* рация: держать — говорить (слева, над делянкой); рядом — коротко, что сейчас */
.ms-ptt { position: absolute; z-index: 22; left: 14px; bottom: 92px; width: 104px; height: 104px; border-radius: 50%; border: 4px solid var(--primary); background: var(--surface); color: var(--primary-press); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: box-shadow 0.08s linear, background 0.15s; }
.ms-ptt .ic { width: 38px; height: 38px; pointer-events: none; }
.ms-ptt span { pointer-events: none; }
.ms-ptt.talk { background: var(--primary); border-color: #fff; color: #fff; box-shadow: 0 0 0 calc(6px + var(--lvl, 0) * 16px) rgba(27, 102, 68, 0.35), 0 6px 18px rgba(0, 0, 0, 0.3); }
.ms-ptt.wait { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.ms-ptt.busy { background: var(--info); border-color: #fff; color: #fff; }
.ms-ptt.off { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.ms-ptt-st { position: absolute; z-index: 22; left: 128px; bottom: 124px; max-width: min(440px, calc(100% - 250px)); padding: 10px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16); font-size: 18px; font-weight: 800; pointer-events: none; }
.ms-ptt-st.talk { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-press); }
.ms-ptt-st.wait, .ms-ptt-st.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.ms-ptt-st.info { background: var(--info-soft); border-color: var(--info); color: var(--info-text); }
.ms-ptt-st.bad { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-text); }
.ms-ptt-st.off { color: var(--text-2); }

/* рация кнопкой пульта машины: крупно по центру поверх всего (и меню), касания проходят насквозь */
.ms-key { position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; min-width: min(380px, calc(100vw - 48px)); max-width: calc(100vw - 48px); padding: 24px 36px 22px; border-radius: 28px; background: var(--surface); border: 4px solid var(--line-strong); color: var(--text); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35); text-align: center; pointer-events: none; }
.ms-key .ic { width: 60px; height: 60px; }
.ms-key b { font-size: 44px; font-weight: 900; line-height: 1.1; }
.ms-key span { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-key.talk { background: var(--primary); border-color: #fff; color: #fff; box-shadow: 0 0 0 calc(8px + var(--lvl, 0) * 22px) rgba(27, 102, 68, 0.35), 0 16px 48px rgba(0, 0, 0, 0.35); transition: box-shadow 0.08s linear; }
.ms-key.wait, .ms-key.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.ms-key.info { background: var(--info-soft); border-color: var(--info); color: var(--info-text); }
.ms-key.bad { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-text); }
.ms-key.bad b, .ms-key.info b, .ms-key.warn b { font-size: 32px; }

/* вход на ПК поверх карты (никто не вошёл или заблокировано): операторы машины и PIN — как вход планшета */
.ms-login { position: absolute; inset: 0; z-index: 35; overflow-y: auto; background: var(--bg); padding: 20px var(--gutter); }
.ms-login .login-head h1 { margin: 0; }
.ms-login .login-head small { display: block; font-size: 17px; font-weight: 600; color: var(--text-2); }

/* «Перейти в экран машины?» */
.ms-ask { display: flex; flex-direction: column; gap: 16px; }
.ms-ask-ic { width: 72px; height: 72px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.ms-ask-ic .ic { width: 40px; height: 40px; }
.ms-ask h2 { margin: 0; }
.ms-ask p { margin: 0; font-size: 20px; font-weight: 600; color: var(--text-2); }
.ms-ask-acct { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--surface-2); }
.ms-ask-acct b { display: block; font-size: 21px; }
.ms-ask-acct small { display: block; font-size: 15px; font-weight: 600; color: var(--text-2); }
.ms-ask-b { display: flex; flex-direction: column; gap: 12px; }
.ms-ask-t { display: flex; align-items: center; gap: 16px; }
.ms-ask-t .ms-ask-ic { flex: none; }
.ms-ask-name { display: block; margin-top: 2px; font-size: 24px; font-weight: 800; color: var(--primary-press); overflow-wrap: anywhere; }

/* настройки (кадр 7.1): машины, вход в режим, не гасить экран */
.ms-set { display: flex; flex-direction: column; gap: 22px; }
.ms-set-k { display: flex; flex-direction: column; gap: 8px; }
.ms-set-k > .lbl { font-size: 16px; font-weight: 800; color: var(--text-2); }
.ms-ml { padding: 4px 16px; }
.ms-mrow { display: flex; align-items: center; gap: 14px; min-height: 72px; }
.ms-mrow + .ms-mrow { border-top: 2px solid var(--line); }
.ms-mrow b { display: block; font-size: 19px; }
.ms-mrow small { display: block; font-size: 15px; font-weight: 600; color: var(--text-2); }
.ms-set .seg > button { min-height: 56px; font-size: 16.5px; }
.ms-set .toggle { min-height: 60px; font-size: 18px; }
.ms-tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap; flex: none; background: var(--primary-soft); color: var(--primary-press); }
.ms-tag.warn { background: var(--warn-bg); color: var(--warn-text); }

@media (max-width: 700px) {
  .ms-link { max-width: calc(100% - 100px); left: auto; right: 14px; transform: none; font-size: 16px; }
  .ms-ptt { width: 88px; height: 88px; bottom: 90px; }
  .ms-ptt .ic { width: 32px; height: 32px; }
  .ms-ptt-st { left: 112px; bottom: 112px; max-width: calc(100% - 210px); font-size: 16px; }
  .ms-key { padding: 18px 24px 16px; }
  .ms-key b { font-size: 34px; }
  .ms-key.bad b, .ms-key.info b, .ms-key.warn b { font-size: 26px; }
  .ms-plot b { font-size: 17px; }
  .ms-bar { width: 60px; }
}

/* приборы машины (макет docs/mockups/TabletTmView.html): карта держится и под приборами — переключать быстро, кадры положения ей
   тогда не идут; кнопка вида — справа вверху (на карте — «Приборы», на приборах — «Карта», вместе — карта на весь экран) */
.ms-mapbox { position: absolute; inset: 0; }
.ms-mapbox.off { visibility: hidden; pointer-events: none; }
.ms-gauges { position: absolute; inset: 0; z-index: 2; }
.ms-view { right: 10px; top: 10px; }
/* кнопки карты справа — под кнопкой вида: масштаб, подложка, поиск, фильтр, линейка, «где я» (--mt-z — верх масштаба) */
.ms-page .leaflet-top.leaflet-right { top: calc(var(--mt-z) - 10px); }
/* всё на одном экране: лёжа — карта слева (760 из 1280), приборы справа; стоя — карта сверху, приборы снизу */
.ms-v-both .ms-mapbox { right: auto; width: 59.4%; border-right: 3px solid #1F2328; }
.ms-v-both .ms-gauges.side { left: 59.4%; }
.ms-v-both.ms-port .ms-mapbox { width: auto; right: 0; bottom: auto; height: 52%; border-right: 0; border-bottom: 3px solid #1F2328; }
.ms-v-both.ms-port .ms-gauges.side { left: 0; top: 52%; }
.ms-v-both .gz-one { padding-bottom: 110px; }
/* на приборах рация — в самом низу слева (делянки снизу нет), рядом с плитками */
.ms-v-gauges .ms-ptt { bottom: 14px; }
.ms-v-gauges .ms-ptt-st { bottom: 46px; }

/* «Последние» разговоры рации (ScreenTalks.tsx) — первой вкладкой окна чата, значком рации: строка — кнопка VoiceClip слева на
   обе строки, сверху кто и когда, снизу волна и время (VoiceClip — display: contents, его части — ячейки сетки строки) */
.ms-cv > button.ms-cv-radio { flex: 0 0 auto; padding: 0 14px; }
.ms-cv > button.ms-cv-radio .ic { width: 24px; height: 24px; }
.ms-talks { display: flex; flex-direction: column; gap: 8px; }
.ms-talk { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.ms-talk.out { background: var(--primary-soft); border-color: #B9DAC6; }
.ms-talk:has(.voice-clip.on) { border-color: var(--primary); }
.ms-talk .voice-clip { display: contents; }
.ms-talk .voice-clip-play { grid-column: 1; grid-row: 1 / 3; width: 52px; height: 52px; }
.ms-talk .voice-clip-play .ic { width: 24px; height: 24px; }
.ms-talk .voice-waveform { grid-column: 2; grid-row: 2; height: 34px; min-width: 0; }
.ms-talk .voice-clip-time { grid-column: 3; grid-row: 2; min-width: 0; font-size: 14px; color: var(--text-2); }
.ms-talk-h { grid-column: 2 / 4; grid-row: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ms-talk-h b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-talk-h small { font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.ms-talk-h em { font-style: normal; color: var(--warn-text); }
.ms-talk-h .new { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--info); }
/* Готовый вид «Как в TimberMatic» (макет docs/mockups/TabletTmView.html, раздел 6): места, размеры и цвета родного экрана TimberMatic
   (H 2.10.15 на XL5 1280×800 — один в один; F 2.5.24 на XM9; стоя 800×1280 — те же зоны: брёвна сверху, середина слева, плитки справа).
   Холст — в размерах макета, масштаб — чтобы влез целиком; поля — фоном TimberMatic. Шрифт — Arial, как у неё (на Android — Roboto). */
.tmw-bg { position: absolute; inset: 0; background: #0B653B; }
.tmw { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #0B653B; box-shadow: inset 0 0 0 4px #18B553; color: #fff; font-family: Arial, Roboto, "Golos Text Variable", sans-serif; font-variant-numeric: normal; line-height: 1.15; --tm-tile: #004538; --tm-edge: #18B553; --tm-l1: #FDD300; --tm-l2: #FD9200; --tm-lime: #BDE75E; --tm-log: #85D262; }
.tmw > *, .tm-mid > * { position: absolute; }
.tm-menu { left: 6px; top: 6px; width: 56px; height: 56px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.12); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.tm-menu .ic { width: 30px; height: 30px; }
.tm-site { right: 199px; top: 3px; width: 713px; height: 32px; font-size: 22px; line-height: 32px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-op { right: 199px; top: 35px; width: 440px; height: 32px; font-size: 21px; line-height: 32px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-clock { right: 84px; top: 34px; font-size: 22px; line-height: 32px; }
.tm-map { right: 6px; top: 4px; width: 66px; height: 60px; border-radius: 14px; border: 0; background: #fff; color: #0B653B; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); padding: 0; cursor: pointer; }
.tm-map .ic { width: 32px; height: 32px; }
/* брёвна y 70…230: два последних этого ствола слева, места прогноза двух следующих — справа (прогноз на шину не выходит — пусто) */
.tm-log { top: 70px; width: 240px; height: 160px; border-radius: 6px; background: var(--tm-log); border: 2px solid #3C8A2C; color: #0E140C; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.tm-log.l1 { left: 4px; } .tm-log.l2 { left: 247px; } .tm-log.l3 { left: 529px; } .tm-log.l4 { left: 772px; }
.tm-log .g { display: flex; align-items: center; gap: 8px; max-width: 224px; font-size: 25px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.tm-log .g i { width: 16px; height: 16px; border-radius: 4px; background: var(--a); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75); flex: none; }
.tm-log .nn { display: flex; justify-content: space-between; width: 196px; font-size: 38px; font-weight: 700; }
.tm-log.no { background: rgba(133, 210, 98, 0.32); }
.tm-log.fc { background: rgba(133, 210, 98, 0.16); border: 2px dashed rgba(189, 231, 94, 0.5); }
/* середина (8,234; 1007×380), серая */
.tm-mid { left: 8px; top: 234px; width: 1007px; height: 380px; border-radius: 4px; background: #C0C0C0; color: #000; }
.tm-len { left: 8px; top: 128px; font-size: calc(128px * var(--tm-n, 1)); line-height: 1; letter-spacing: -2px; }
.tm-card { left: 315px; top: 21px; width: 379px; height: 300px; border-radius: 10px; background: #fff; border: 1px solid #8A8A8A; display: flex; flex-direction: column; align-items: center; padding: 14px 18px 14px; }
.tm-card.win { background: linear-gradient(180deg, #A9E65E 0%, #93DD48 40%, #69AD18 100%); border-color: #4E8A12; }
.tm-card .sp2 { font-size: 34px; font-weight: 700; color: #2E7D1E; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; overflow: hidden; max-width: 100%; }
.tm-card.win .sp2 { color: #1D5A0E; }
.tm-card .as2 { margin-top: 26px; display: flex; align-items: center; gap: 12px; max-width: 100%; font-size: 50px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.tm-card .as2 i { width: 20px; height: 20px; border-radius: 5px; background: var(--a); box-shadow: 0 0 0 2px #fff; flex: none; }
.tm-card .bt { margin-top: auto; align-self: stretch; display: flex; justify-content: space-between; align-items: flex-end; }
.tm-card .bt small { display: block; font-size: 20px; margin-bottom: 2px; }
.tm-card .bt b { display: block; font-size: 44px; font-weight: 700; line-height: 1; }
.tm-dia { left: 692px; top: 30px; width: 300px; height: 300px; }
.tm-dia svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tm-dia b { position: absolute; left: 0; right: 0; top: 86px; text-align: center; font-size: calc(128px * var(--tm-n, 1)); font-weight: 400; line-height: 1; letter-spacing: -2px; }
.tm-cnt { top: 338px; display: flex; align-items: center; gap: 8px; font-size: 24px; white-space: nowrap; }
.tm-cnt.c1 { left: 318px; } .tm-cnt.c2 { left: 484px; }
/* правая панель x 1022…1268: символы функций, плитки 80×110 (в 2 столбца — 120), символы машины */
.tm-fn { left: 1024px; top: 146px; width: 244px; height: 120px; }
.tm-fn i { position: absolute; width: 55px; height: 45px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 23px; font-weight: 700; color: rgba(255, 255, 255, 0.28); }
.tm-fn i .ic { width: 28px; height: 28px; }
.tm-fn i:nth-child(1) { left: 14px; top: 11px; } .tm-fn i:nth-child(2) { left: 96px; top: 11px; } .tm-fn i:nth-child(3) { left: 174px; top: 11px; }
.tm-fn i:nth-child(4) { left: 14px; top: 63px; } .tm-fn i:nth-child(5) { left: 96px; top: 63px; } .tm-fn i:nth-child(6) { left: 174px; top: 63px; }
.tm-fn i.on { color: #fff; } .tm-fn i.g { color: var(--tm-lime); } .tm-fn i.r { color: #FF6A4D; }
.tm-tiles { left: 1023px; top: 275px; width: 246px; display: grid; grid-template-columns: repeat(var(--tm-cols, 3), var(--tm-w, 80px)); grid-auto-rows: 110px; column-gap: 3px; row-gap: 8px; }
.tm-t { position: relative; border-radius: 4px; background: var(--tm-tile); border: 1px solid var(--tm-edge); display: flex; flex-direction: column; align-items: center; padding: 10px 2px 8px; gap: 3px; color: #fff; min-width: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.tm-t b { font-size: calc(27px * var(--tm-t, 1)); font-weight: 700; line-height: 1; white-space: nowrap; }
.tm-t span { font-size: calc(14px * min(var(--tm-t, 1), 1.15)); white-space: nowrap; overflow: hidden; max-width: 100%; }
.tm-t .ic { margin-top: auto; width: 28px; height: 28px; stroke-width: 2; }
.tm-t.warn { background: var(--tm-l1); color: #1A1A1A; border-color: var(--tm-l1); }
.tm-t.bad { background: var(--tm-l2); color: #1A1A1A; border-color: var(--tm-l2); }
.tm-t .x { position: absolute; z-index: 2; top: -10px; right: -10px; width: 32px; height: 32px; border-radius: 50%; background: #B42318; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; line-height: 1; border: 2px solid #fff; padding: 0; cursor: pointer; }
.tm-t.add { justify-content: center; background: rgba(255, 255, 255, 0.92); border: 3px dashed #9FD8B5; color: #1B6644; cursor: pointer; }
.tm-t.add .ic { margin: 0; width: 44px; height: 44px; stroke-width: 2.6; }
.tm-t.drag { z-index: 9; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(-4deg) scale(1.08); outline: 3px solid #FDD300; box-shadow: 0 18px 34px rgba(0, 0, 0, 0.6); }
.tm-t.drop { box-shadow: 0 0 0 3px #FDD300; }
.tmw.tm-edit .tm-t:not(.add) { outline: 3px dashed #9FD8B5; outline-offset: 2px; }
/* нижняя полоса y 756…792 */
.tm-bot { left: 0; right: 0; top: 756px; height: 36px; }
.tm-bot > * { position: absolute; top: 0; height: 36px; }
.tm-al { left: 8px; width: 63px; display: flex; align-items: center; gap: 6px; padding-left: 3px; }
.tm-al i { width: 30px; height: 30px; border-radius: 50%; background: #EF5339; color: #fff; font-style: normal; font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.tm-al b { font-size: 22px; }
.tm-note { left: 122px; right: 256px; padding-left: 12px; border-radius: 4px; background: rgba(0, 0, 0, 0.2); font-size: 24px; line-height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-note.warn { background: var(--tm-l1); color: #1A1A1A; } .tm-note.bad { background: var(--tm-l2); color: #1A1A1A; }
.tm-stat { right: 12px; width: 234px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.55); font-size: 22px; line-height: 34px; text-align: center; white-space: pre; }
/* стоя 800×1280: брёвна во всю ширину, середина 540 px слева, колонка плиток 246 px справа */
.tmw.port .tm-site { right: 168px; width: 560px; }
.tmw.port .tm-op { right: 168px; width: 420px; }
.tmw.port .tm-log { top: 72px; width: 188px; height: 140px; gap: 8px; }
.tmw.port .tm-log.l1 { left: 4px; } .tmw.port .tm-log.l2 { left: 196px; } .tmw.port .tm-log.l3 { left: 412px; } .tmw.port .tm-log.l4 { left: 604px; }
.tmw.port .tm-log .g { font-size: 21px; max-width: 176px; } .tmw.port .tm-log .nn { width: 150px; font-size: 32px; }
.tmw.port .tm-mid { left: 6px; top: 220px; width: 540px; height: 840px; }
.tmw.port .tm-len { left: 10px; top: 118px; font-size: calc(138px * var(--tm-n, 1)); }
.tmw.port .tm-dia { left: 266px; top: 18px; width: 264px; height: 264px; }
.tmw.port .tm-dia b { top: 78px; font-size: calc(112px * var(--tm-n, 1)); }
.tmw.port .tm-card { left: 14px; top: 312px; width: 512px; height: 420px; padding: 24px 24px 20px; }
.tmw.port .tm-card .sp2 { font-size: 40px; } .tmw.port .tm-card .as2 { margin-top: 40px; font-size: 62px; }
.tmw.port .tm-card .bt b { font-size: 56px; } .tmw.port .tm-card .bt small { font-size: 22px; }
.tmw.port .tm-cnt { top: 768px; font-size: 28px; } .tmw.port .tm-cnt.c1 { left: 40px; } .tmw.port .tm-cnt.c2 { left: 290px; }
.tmw.port .tm-fn { left: 552px; top: 220px; }
.tmw.port .tm-tiles { left: 551px; top: 352px; }
.tmw.port .tm-bot { top: 1236px; }
.tmw.port .tm-note { right: 222px; font-size: 22px; }
.tmw.port .tm-stat { width: 200px; }
/* форвардер: середина (9,70) — два круга, карточка объявлений, работа двигателя за смену, счётчики */
.tm-mid.f { left: 9px; top: 70px; width: 1010px; height: 680px; }
.tm-dial { width: 300px; height: 300px; }
.tm-dial svg { display: block; width: 100%; height: 100%; }
.tm-dial.d1 { left: 18px; top: 120px; } .tm-dial.d2 { left: 692px; top: 120px; }
.tm-ann { left: 338px; top: 100px; width: 334px; height: 330px; border-radius: 10px; background: #fff; border: 1px solid #8A8A8A; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 20px; text-align: center; }
.tm-ann .bang { width: 66px; height: 66px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFD27A, #F59A1B 55%, #C46A00); color: #fff; font-style: normal; font-size: 42px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
.tm-ann b { font-size: 31px; font-weight: 700; line-height: 1.2; color: #111; }
.tm-black { left: 440px; top: 468px; width: 130px; height: 46px; border-radius: 6px; background: #0B0B0B; color: #fff; font-size: 30px; line-height: 46px; text-align: right; padding-right: 12px; box-shadow: 0 0 0 3px #8A8A8A; }
.tm-mid.f .tm-cnt { top: 566px; } .tm-mid.f .tm-cnt.c1 { left: 300px; } .tm-mid.f .tm-cnt.c2 { left: 600px; }
.tmw.port .tm-mid.f { left: 6px; top: 72px; width: 540px; height: 900px; }
.tmw.port .tm-dial { width: 256px; height: 256px; } .tmw.port .tm-dial.d1 { left: 8px; top: 40px; } .tmw.port .tm-dial.d2 { left: 276px; top: 40px; }
.tmw.port .tm-ann { left: 20px; top: 326px; width: 500px; height: 380px; } .tmw.port .tm-ann b { font-size: 34px; }
.tmw.port .tm-black { left: 205px; top: 740px; }
.tmw.port .tm-mid.f .tm-cnt { top: 828px; } .tmw.port .tm-mid.f .tm-cnt.c1 { left: 60px; } .tmw.port .tm-mid.f .tm-cnt.c2 { left: 320px; }
.tmw.port.f .tm-fn { top: 80px; } .tmw.port.f .tm-tiles { top: 212px; }
/* плиток больше трёх рядов (2 столбца) лёжа — колонка выше, символы функций уходят */
.tmw.tall .tm-fn { display: none; }
.tmw.tall .tm-tiles { top: 146px; }
.tm-dim { position: absolute; inset: 0; z-index: 5; background: rgba(20, 22, 26, 0.55); }
.tmw.tm-edit .tm-tiles { z-index: 6; }
/* кнопки экрана машины на виде TimberMatic: рация — под серединой слева, чат — справа внизу, на месте символов машины */
.ms-page.v-tm .ms-ptt { bottom: 54px; }
.ms-page.v-tm .ms-cloud { right: 26px; bottom: 58px; }
.ms-page.v-tm .ms-ptt-st { bottom: 86px; }
/* Приборы экрана машины (макет docs/mockups/TabletTmView.html, третья версия): готовые виды «Рекомендовано», «Пиление крупно»,
   «Переезд» и «Свой» из тех же карточек — холст в размерах макета (лёжа 1280, стоя 800 по ширине; высота — по экрану), масштаб — по
   ширине экрана; кнопки экрана машины (меню, карта, рация, чат) — поверх, в настоящих пикселях: холст оставляет им место (--gz-top и
   др. — в единицах холста). «Как в TimberMatic» — gaugesTm.css. */
.gz-stage { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.gz-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.3; }
.gz-lost .gz-canvas, .gz-lost .tmw { filter: grayscale(0.6) opacity(0.65); }

/* предупреждение — полоса сверху между кнопками (как край делянки): янтарь — внимание, красный — тревога */
.gz-wb { position: absolute; z-index: 4; top: var(--gz-top0); left: var(--gz-wbl, 92px); right: var(--gz-side, 92px); min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 6px 16px 6px 8px; border-radius: 18px; border: 2px solid var(--c); background: var(--cs); color: var(--ct); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.gz-wb[role="button"] { cursor: pointer; }
.gz-wb.warn { --c: var(--warn-line); --cs: var(--warn-bg); --ct: var(--warn-text); }
.gz-wb.bad { --c: var(--danger); --cs: var(--danger-soft); --ct: var(--danger-text); }
.gz-wb .wi { width: 50px; height: 50px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.gz-wb.warn .wi { color: #3A2600; }
.gz-wb .wi .ic { width: 30px; height: 30px; }
.gz-wb .wt { flex: 1; min-width: 0; font-size: 23px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* карточки: лёжа — две колонки, стоя — одна */
.gz-cnt { position: absolute; z-index: 1; display: grid; gap: 14px; left: 14px; right: 14px; top: var(--gz-top); bottom: var(--gz-bot); }
.gz-cd { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; }
.gz-k { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.gz-k small { margin-left: auto; font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); }
.gz-sp { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-size: 24px; font-weight: 800; white-space: nowrap; }
.gz-big { display: flex; flex-direction: column; min-width: 0; }
.gz-big .k { font-size: 16px; font-weight: 800; color: var(--text-2); }
.gz-big .v { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.gz-big .v b { font-size: calc(92px * var(--gz-n, 1)); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; }
.gz-big .v span { font-size: 26px; font-weight: 800; color: var(--text-2); }
.gz-big .v em { font-style: normal; font-size: calc(40px * var(--gz-n, 1)); font-weight: 800; color: var(--muted); }
.gz-lbar { position: relative; height: 34px; border-radius: 10px; background: #E8E6DF; overflow: hidden; }
.gz-lbar .f { position: absolute; left: 0; top: 0; bottom: 0; background: #3F454D; border-radius: 10px 0 0 10px; }
.gz-lbar .w { position: absolute; top: 0; bottom: 0; background: rgba(27, 102, 68, 0.35); border-left: 3px solid #1B6644; border-right: 3px solid #1B6644; }
.gz-lbar.in .f { background: #1B6644; }
.gz-lsc { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.gz-lsc b { color: #134D33; }
.gz-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gz-small { font-size: 16px; font-weight: 700; color: var(--text-2); }
.gz-small b { color: var(--text); font-weight: 800; }
.gz-sbar { display: flex; height: 56px; flex: none; border-radius: 12px; overflow: hidden; background: #EEECE6; }
.gz-sbar > div { position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800; border-right: 3px solid #fff; white-space: nowrap; overflow: hidden; background: var(--a); }
.gz-sbar > div.cur { background: repeating-linear-gradient(135deg, var(--a) 0 10px, color-mix(in srgb, var(--a) 55%, #fff) 10px 20px); }
.gz-sbar > div.rest { flex: 1; background: transparent; color: var(--muted); border-right: 0; font-weight: 700; font-size: 15px; }
.gz-logs { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.gz-lr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 90px 104px; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid #EEECE6; font-size: 22px; font-weight: 700; }
.gz-lr:first-child { border-top: 0; }
.gz-lr .n { font-size: 17px; font-weight: 800; color: var(--muted); text-align: right; }
.gz-lr .a { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; }
.gz-lr .a i { width: 16px; height: 16px; border-radius: 4px; background: var(--a); flex: none; }
.gz-lr .l, .gz-lr .d { text-align: right; font-weight: 800; white-space: nowrap; }
.gz-lr .d { color: var(--text-2); }
.gz-lr.cur { color: var(--text-2); }
.gz-lr.cur .l::after { content: " …"; }
.gz-nums { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.gz-nums > div { display: flex; flex-direction: column; }
.gz-nums b { font-size: calc(46px * var(--gz-n, 1)); font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.gz-nums b.hg { font-size: calc(56px * var(--gz-n, 1)); }
.gz-nums span { font-size: 16px; font-weight: 700; color: var(--text-2); }
.gz-facts { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 16px; font-weight: 700; color: var(--text-2); }
.gz-facts b { color: var(--text); font-weight: 800; }
.gz-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--muted); }
/* полоса «какой сортимент сейчас решается» — крупно, цветом сортимента; ствола нет — серая */
.gz-asb { display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 0 12px 0 22px; border-radius: 18px; background: var(--a); color: #fff; flex: none; }
.gz-asb b { flex: 1; min-width: 0; font-size: 50px; font-weight: 900; letter-spacing: -0.015em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gz-asb .gz-sp { min-height: 52px; background: rgba(255, 255, 255, 0.94); color: #2F5A22; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.gz-asb.none { background: #C9C5BB; color: #3F454D; }
.c-stem.win .len .v b { color: #1B6644; }

.c-stem { grid-area: stem; justify-content: space-between; }
.c-logs { grid-area: logs; }
.c-shift { grid-area: shift; }
.gz-land .gz-h { grid-template-columns: 1.08fr 1fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stem logs" "stem shift"; }
.gz-port .gz-h { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "stem" "logs" "shift"; }
.gz-land .gz-h .c-stem .gz-big .v b { font-size: calc(100px * var(--gz-n, 1)); }
.gz-port .gz-h .c-stem .gz-big .v b { font-size: calc(112px * var(--gz-n, 1)); }
/* «Пиление крупно» и «Свой» без брёвен и смены — только ствол */
.gz-h.solo { grid-template-columns: 1fr !important; grid-template-rows: minmax(0, 1fr) !important; grid-template-areas: "stem" !important; }
.gz-h.solo .gz-asb { min-height: 112px; }
.gz-h.solo .gz-asb b { font-size: 76px; }
.gz-land .gz-h.solo .c-stem .gz-big .v b { font-size: calc(168px * var(--gz-n, 1)); }
.gz-port .gz-h.solo .c-stem .gz-big .v b { font-size: calc(132px * var(--gz-n, 1)); }
.gz-h.solo .gz-lbar { height: 48px; }
.gz-land .gz-h.no-logs { grid-template-columns: 1.5fr 1fr; grid-template-rows: minmax(0, 1fr); grid-template-areas: "stem shift"; }
.gz-land .gz-h.no-shift { grid-template-rows: minmax(0, 1fr); grid-template-areas: "stem logs"; }
.gz-port .gz-h.no-logs { grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stem" "shift"; }
.gz-port .gz-h.no-shift { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "stem" "logs"; }

/* форвардер (и «Переезд»): двигатель дугой, ход, смена по состояниям */
.c-eng { grid-area: eng; justify-content: space-between; }
.c-drv { grid-area: drv; justify-content: space-between; }
.c-sh { grid-area: sh; justify-content: space-between; }
.gz-land .gz-f { grid-template-columns: 1fr 1.22fr; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "eng drv" "eng sh"; }
.gz-port .gz-f { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "eng" "drv" "sh"; }
.gz-land .gz-f.no-sh { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); grid-template-areas: "eng drv"; }
.gz-port .gz-f.no-sh { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "eng" "drv"; }
.gz-land .gz-f.no-drv { grid-template-columns: 1fr 1.22fr; grid-template-rows: minmax(0, 1fr); grid-template-areas: "eng sh"; }
.gz-port .gz-f.no-drv { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "eng" "sh"; }
.gz-gauge { display: block; width: 100%; height: auto; max-width: 500px; align-self: center; }
.gz-gauge .bg { fill: none; stroke: #E8E6DF; stroke-width: 24; stroke-linecap: round; }
.gz-gauge .wz { fill: none; stroke: #D9A233; stroke-width: 24; }
.gz-gauge .bz { fill: none; stroke: #B42318; stroke-width: 24; stroke-linecap: round; }
.gz-gauge .vl { fill: none; stroke: #1B6644; stroke-width: 24; stroke-linecap: round; }
.gz-gauge .tx { font-family: var(--font); font-weight: 900; font-size: calc(52px * var(--gz-n, 1)); fill: #14161A; text-anchor: middle; letter-spacing: -1px; }
.gz-gauge .un { font-family: var(--font); font-weight: 800; font-size: 20px; fill: #3F454D; text-anchor: middle; }
.gz-gauge .tk { font-family: var(--font); font-weight: 700; font-size: 15px; fill: #62686F; text-anchor: middle; }
.gz-narrow .gz-gauge { max-width: 300px; }
.gz-narrow .gz-f .c-eng .gz-kv { font-size: 16px; }
.gz-hbar { height: 16px; flex: none; border-radius: 8px; background: #E8E6DF; overflow: hidden; }
.gz-hbar i { display: block; height: 100%; border-radius: 8px; background: #1B6644; }
.gz-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text-2); }
.gz-kv b { font-size: calc(26px * var(--gz-n, 1)); font-weight: 900; color: var(--text); white-space: nowrap; }
.gz-kv b small { font-size: 16px; font-weight: 800; color: var(--text-2); }
.gz-spd { display: flex; align-items: center; gap: 18px; }
.gz-dir { width: 86px; height: 86px; border-radius: 50%; background: #1B6644; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.gz-dir.rev { background: #B07800; }
.gz-dir.rev .ic { transform: rotate(180deg); }
.gz-dir.stop { background: #C9C5BB; color: #3F454D; }
.gz-dir .ic { width: 54px; height: 54px; stroke-width: 3; }
.gz-gear { width: 86px; height: 86px; border-radius: 20px; border: 4px solid #14161A; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.gz-gear b { font-size: 46px; font-weight: 900; line-height: 0.95; }
.gz-gear span { font-size: 13px; font-weight: 800; color: var(--text-2); }
.gz-ind { display: flex; gap: 10px; flex-wrap: wrap; }
.gz-ind span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 76px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: #F6F5F1; color: #9A958A; font-size: 19px; font-weight: 800; }
.gz-ind span .ic { width: 22px; height: 22px; }
.gz-ind span.on { background: #DAEEE2; border-color: #1B6644; color: #134D33; }
.gz-ind span.pk { font-size: 26px; font-weight: 900; width: 56px; min-width: 56px; border-radius: 50%; padding: 0; }
.gz-ind span.pk.on { background: #FCE1DD; border-color: #B42318; color: #7A160F; }
.gz-shb { display: flex; height: 40px; border-radius: 10px; overflow: hidden; gap: 3px; background: #EEECE6; }
.gz-shb i { display: block; height: 100%; }
.gz-shb .w { background: #1B6644; } .gz-shb .d { background: #1A56A0; } .gz-shb .o { background: #8F8A7F; } .gz-shb .id { background: repeating-linear-gradient(135deg, #8F8A7F 0 8px, #C9C5BB 8px 16px); }
.gz-shl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.gz-shl > div { display: flex; flex-direction: column; min-width: 0; }
.gz-shl .k { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--text-2); }
.gz-shl .k i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.gz-shl b { font-size: calc(40px * var(--gz-n, 1)); font-weight: 900; line-height: 1.05; }
.gz-shl span.l { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gz-shf { display: flex; gap: 8px 22px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #EEECE6; font-size: 17px; font-weight: 700; color: var(--text-2); }
.gz-shf b { color: var(--text); font-weight: 800; }

/* плитки снизу — между рацией и облаком чата: лёжа — ряд (или два), стоя — по три в ряд (или по два) */
.gz-strip { position: absolute; z-index: 2; display: grid; gap: 10px; left: var(--gz-left); right: var(--gz-right); bottom: var(--gz-bot0); height: var(--gz-strip); grid-template-columns: repeat(var(--gz-cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.gz-tl { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 14px 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; min-width: 0; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.gz-tl .k { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.gz-tl .k .ic { width: 20px; height: 20px; }
.gz-tl .v { font-size: calc(34px * var(--gz-t, 1)); font-weight: 900; line-height: 1.05; white-space: nowrap; }
.gz-tl .v small { font-size: calc(18px * var(--gz-t, 1)); font-weight: 800; color: var(--text-2); }
.gz-tl .v.none { color: var(--muted); }
.gz-tl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--st, #1B6644); }
.gz-tl.warn { --st: #D9A233; background: #FFF4DC; border-color: #D9A233; }
.gz-tl.bad { --st: #B42318; background: #FCE1DD; border-color: #B42318; }
.gz-tl .mb { height: 8px; border-radius: 4px; background: #E8E6DF; overflow: hidden; margin-top: 3px; flex: none; }
.gz-tl .mb i { display: block; height: 100%; border-radius: 4px; background: #1B6644; }

/* правка раскладки: плитки — с крестиком и в рамке, «+» — в конце, перенос пальцем */
.gz-edit .gz-strip { z-index: 6; }
.gz-edit .gz-tl:not(.add) { outline: 3px dashed #9FD8B5; outline-offset: 3px; }
.gz-tl .x { position: absolute; z-index: 2; bottom: 14px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: #B42318; color: #fff; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; font-size: 22px; line-height: 1; border: 2px solid #fff; padding: 0; cursor: pointer; }
.gz-tl.add { align-items: center; justify-content: center; border: 3px dashed #9FD8B5; background: rgba(255, 255, 255, 0.92); color: #1B6644; cursor: pointer; }
.gz-tl.add::after { display: none; }
.gz-tl.add .ic { width: 44px; height: 44px; stroke-width: 2.6; }
.gz-tl.drag { z-index: 10; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(-3deg) scale(1.06); outline: 3px solid #FDD300 !important; box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45); }
.gz-tl.drop { box-shadow: inset 0 0 0 4px #FDD300; }
.gz-dim { position: absolute; z-index: 4; inset: 0; background: rgba(20, 22, 26, 0.5); }

/* всё на одном экране: приборы рядом с картой — сжато, сверху вниз */
.gz-one { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--bg); font-variant-numeric: tabular-nums; }
.gz-one .gz-cd { flex: none; }
.gz-one .gz-asb { min-height: 62px; } .gz-one .gz-asb b { font-size: 36px; } .gz-one .gz-asb .gz-sp { min-height: 42px; font-size: 20px; }
.gz-one .gz-big .v b { font-size: 64px; } .gz-one .gz-big .v em { font-size: 28px; }
.gz-one .gz-sbar { height: 44px; }
.gz-one-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gz-one-tiles .gz-tl { height: 84px; }
.gz-one-tiles .gz-tl .v { font-size: 28px; }
.gz-one .gz-spd .gz-big .v b { font-size: 52px; }

/* сравнение с TimberMatic: вид одним касанием, «Метка», свежесть кадра */
.gz-cmp { position: absolute; z-index: 26; left: 92px; top: 14px; height: 64px; display: flex; align-items: center; gap: 10px; }
.gz-cmp .vsw { display: flex; height: 60px; border-radius: 14px; overflow: hidden; border: 2px solid var(--line-strong); background: var(--surface); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.gz-cmp .vsw button { min-width: 84px; padding: 0 16px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; }
.gz-cmp .vsw button + button { border-left: 2px solid var(--line-strong); }
.gz-cmp .vsw button.on { background: var(--primary); color: #fff; }
.gz-cmp .mk { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 20px 0 14px; border-radius: 14px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary-press); font: inherit; font-size: 19px; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); cursor: pointer; }
.gz-cmp .mk:active { background: var(--primary-soft); }
.gz-cmp .fr { width: 22px; height: 22px; border-radius: 50%; background: #9A958A; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.25); flex: none; }
.gz-cmp .fr.fresh { background: #22A354; } .gz-cmp .fr.stale { background: #E0A320; }
.gz-cmp .ne { padding: 6px 12px; border-radius: 999px; background: #1F2328; color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap; }

/* подсказка, что вид сменился сам (следом за ПК) — снизу посередине, 2 с */
.gz-toast { position: absolute; z-index: 32; left: 50%; bottom: 132px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 14px; max-width: calc(100% - 40px); padding: 14px 24px; border-radius: 18px; background: #1F2328; color: #fff; font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); pointer-events: none; }
.gz-toast .ic { width: 30px; height: 30px; color: #9FD8B5; flex: none; }
.gz-toast small { font-weight: 600; color: #C9C6BD; font-size: 19px; }

/* правка раскладки: панель сверху */
.gz-edp { position: absolute; z-index: 40; left: 14px; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; border-radius: 22px; background: var(--surface); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35); line-height: 1.2; }
.gz-edp .hd { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; flex-wrap: wrap; }
.gz-edp .hd > .ic { color: var(--primary); }
.gz-edp .hd .ttl { flex: 1; min-width: 160px; }
.gz-edp .hd small { display: block; font-size: 15px; font-weight: 700; color: var(--text-2); }
.gz-edp .rw { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.gz-edp .g { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gz-edp .g > span:first-child { font-size: 14px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.gz-sg { display: inline-flex; border: 2px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: var(--surface); }
.gz-sg button { min-width: 62px; min-height: 56px; padding: 0 14px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 21px; font-weight: 800; cursor: pointer; }
.gz-sg button + button { border-left: 2px solid var(--line-strong); }
.gz-sg button.on { background: var(--primary); color: #fff; }
.gz-sg button.a1 { font-size: 16px; } .gz-sg button.a2 { font-size: 22px; } .gz-sg button.a3 { font-size: 29px; }
.gz-chk { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px 0 10px; border-radius: 14px; border: 2px solid var(--line); background: #F6F5F1; color: var(--text); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.gz-chk .ic { width: 26px; height: 26px; padding: 3px; border-radius: 7px; border: 2px solid var(--line-strong); stroke-width: 3.2; color: transparent; }
.gz-chk.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-press); }
.gz-chk.on .ic { background: var(--primary); border-color: var(--primary); color: #fff; }
.gz-pick { position: absolute; z-index: 41; left: 14px; right: 14px; bottom: 128px; display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; border-radius: 22px; background: var(--surface); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35); }
.gz-pick .hd { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; }
.gz-pick .hd .ic { color: var(--primary); }
.gz-pick .hd .grow { flex: 1; }
.gz-pick .opts { display: flex; gap: 10px; flex-wrap: wrap; }
.gz-pick .opts button { display: inline-flex; align-items: center; gap: 8px; min-height: 58px; padding: 0 18px 0 12px; border-radius: 14px; border: 2px solid var(--line); background: #F6F5F1; color: var(--text); font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; }
.gz-pick .opts button .ic { width: 24px; height: 24px; color: var(--primary); }
.gz-pick .none { font-size: 17px; font-weight: 700; color: var(--text-2); }
.ms-port .gz-pick { bottom: 220px; }

/* настройки: готовые виды — миниатюрами настоящих кадров */
.gz-vg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gz-vc { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 8px 9px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.gz-vc.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.gz-vc .th { position: relative; aspect-ratio: var(--ar); margin-bottom: 5px; border-radius: 8px; overflow: hidden; background: #E8E6DF; pointer-events: none; }
.gz-vc .th > div { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.gz-vc > b { font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gz-vc > small { font-size: 13.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gz-vc .ok { position: absolute; top: 2px; right: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; }
.gz-vc .ok .ic { width: 18px; height: 18px; stroke-width: 3.2; }
.gz-vc.add .th { display: flex; align-items: center; justify-content: center; background: #F6F5F1; border: 2px dashed var(--line-strong); color: var(--primary); }
.gz-vc.add .th .ic { width: 42px; height: 42px; }
.gz-opt { display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 6px 16px 6px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.gz-opt.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.gz-opt .rd { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); flex: none; }
.gz-opt.on .rd { border-color: var(--primary); }
.gz-opt.on .rd::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--primary); }
.gz-opt .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gz-opt .tx b { font-size: 19px; font-weight: 800; }
.gz-opt .tx small { font-size: 14.5px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.gz-rec { display: inline-flex; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; vertical-align: 3px; }
.gz-sub { margin: -4px 0 0 44px; }
/* все предупреждения: тревоги первыми */
.gz-wl { display: flex; flex-direction: column; gap: 10px; }
.gz-wl-r { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 6px 16px 6px 8px; border-radius: 16px; border: 2px solid var(--c); background: var(--cs); color: var(--ct); }
.gz-wl-r.warn { --c: var(--warn-line); --cs: var(--warn-bg); --ct: var(--warn-text); }
.gz-wl-r.bad { --c: var(--danger); --cs: var(--danger-soft); --ct: var(--danger-text); }
.gz-wl-r .wi { width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.gz-wl-r.warn .wi { color: #3A2600; }
.gz-wl-r .wi .ic { width: 28px; height: 28px; }
.gz-wl-r .wt { flex: 1; min-width: 0; font-size: 21px; font-weight: 800; line-height: 1.2; }
.gz-wl-ok { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 120px; font-size: 22px; font-weight: 800; color: var(--text-2); }
.gz-wl-ok .ic { width: 32px; height: 32px; color: var(--primary); }
