.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); font-size: 17px; font-weight: 600; }
.banner-warn { background: var(--warn-bg); color: var(--warn-text); border: 2px solid var(--warn-line); }
.banner-info { background: var(--info-soft); color: var(--info-text); }
.banner-err { background: var(--danger-soft); color: var(--danger-text); border: 2px solid var(--danger); }
.banner-ok { background: var(--primary-soft); color: var(--primary-press); }
/* Край делянки (EdgeAlert.tsx): полоса крупно — стрелка «где край», что за край, метры; нажатие — успокоить */
.edge-alert { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 18px 10px 10px; border-radius: 18px; border: 2px solid var(--c);
  background: var(--cs); color: var(--ct); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.edge-alert.edge-near { --c: var(--warn-line, #D9A233); --cs: var(--warn-bg, #FFE4AE); --ct: var(--warn-text, #4F3300); }
.edge-alert.edge-out { --c: var(--danger, #B42318); --cs: var(--danger-soft, #FCE1DD); --ct: var(--danger-text, #7A160F); animation: edge-blink 0.9s ease-in-out infinite; }
.edge-alert.edge-nogps { --c: var(--info, #1A56A0); --cs: var(--info-soft, #DCE8F9); --ct: var(--info-text, #123E74); }
.edge-alert.edge-quiet { animation: none; cursor: default; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
@keyframes edge-blink { 50% { background: #fff; } }
@media (prefers-reduced-motion: reduce) { .edge-alert.edge-out { animation: none; } }
.edge-dir { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--c); display: flex; align-items: center; justify-content: center; }
.edge-dir svg { width: 46px; height: 46px; fill: #fff; transition: transform 0.4s ease; }
.edge-t { flex: 1; min-width: 0; font-size: 22px; font-weight: 800; line-height: 1.15; }
.edge-t small { font-size: 17px; font-weight: 700; opacity: 0.8; }
.edge-t .edge-sub { display: block; margin-top: 2px; }
.edge-dir b { color: #fff; font-size: 34px; font-weight: 900; line-height: 1; }
.edge-m { flex: none; font-size: 40px; font-weight: 900; line-height: 1; color: var(--c); }
.edge-alert.edge-near .edge-m { color: var(--ct); }
/* Слои поверх экрана: шторка сбоку и диалог по центру */
.layer { position: fixed; inset: 0; z-index: 100; }
/* экран блокировки планшета — поверх приложения и его окон; его собственные окна — ещё выше */
.layer-lock { z-index: 150; }
.layer-top { z-index: 160; }
.layer-center { display: flex; align-items: center; justify-content: center; padding: calc(12px + var(--sat)) calc(12px + var(--sar)) calc(12px + var(--sab)) calc(12px + var(--sal)); }
.scrim { position: absolute; inset: 0; background: rgba(20, 22, 26, 0.55); }

.dialog { position: relative; max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); border-radius: 28px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); padding: 32px; display: flex; flex-direction: column; gap: 20px; }

/* шторка — одним видом с выбором склада (макет WaybillLine, 1.11.2026): шапка с ✕ слева, черта под ней; фон за шторкой темнее */
.layer-sheet > .scrim { background: rgba(20, 22, 26, 0.74); }
.sheet { position: absolute; top: 0; bottom: 0; width: min(var(--sheet-w, 560px), 100vw); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; padding-top: var(--sat); padding-bottom: var(--sab); }
/* низ (и клавиатура снизу) сам отступает от системной полосы */
.sheet:has(> .sheet-foot), .sheet:has(> .sheet-keys-bottom) { padding-bottom: 0; }
.sheet-right { padding-right: var(--sar); }
.sheet-left { padding-left: var(--sal); }
.sheet-right { right: 0; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25); }
.sheet-left { left: 0; box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25); }
.sheet-head { flex: none; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 18px; background: var(--surface); border-bottom: 2px solid var(--line); }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-main { flex: 1; min-height: 0; display: flex; }
.sheet-body { flex: 1; min-width: 0; overflow: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 16px; }
/* выбор и окно строки: тело на бежевом — белые поля и строки на нём видны (как список складов) */
.sheet-tinted .sheet-body { background: var(--bg); }
/* низ — высотой с нижнюю полосу экрана (.actionbar): черта над кнопкой — вровень с чертой страницы под шторкой */
.sheet-foot { flex: none; display: flex; align-items: center; gap: 12px; height: calc(var(--bar-h) + var(--sab)); box-sizing: border-box; padding: 0 18px var(--sab); background: var(--surface); border-top: 2px solid var(--line); }
/* поиск в шапке — справа, на месте лупы (как у выбора склада): лупа в начале поля, маленький ✕ — в конце */
.sheet-q { flex: 0 1 520px; min-width: 0; min-height: 56px; padding: 0 8px 0 12px; gap: 8px; }
.sheet-q:focus-within { border-color: var(--primary); }
.sheet-q > .ic { color: var(--muted); }
.sheet-q input { height: 52px; font: inherit; font-size: 20px; font-weight: 700; color: var(--text); }
.sheet-q-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.sheet-q-x .ic { width: 18px; height: 18px; }

/* окном по центру (окно строки — «Настройка интерфейса») */
.sheet-center { position: relative; top: auto; bottom: auto; width: min(var(--sheet-w, 780px), calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border-radius: 26px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.sheet-center .sheet-foot { height: auto; padding: 16px 18px; }

/* своя клавиатура: лёжа — столбцом слева в окне (окно шире на её ширину), стоя — снизу вместо низа; подложка серая, как у клавиатуры */
.sheet-keys-side, .sheet-keys-bottom { background: var(--surface-2); }
.sheet-keys-side { display: none; flex: none; width: 400px; box-sizing: border-box; padding: 14px; flex-direction: column; justify-content: flex-end; border-right: 2px solid var(--line); }
.sheet-keys-side .nkeys button { min-height: 66px; }
.sheet-keys-bottom { flex: none; padding: 10px 12px calc(10px + var(--sab)); border-top: 2px solid var(--line); }
@media (orientation: landscape) {
  .sheet-keys-side { display: flex; }
  .sheet-keys-bottom { display: none; }
  /* Нижняя клавиатура скрыта: от системной панели отступает всё окно, включая клавиши слева. */
  .sheet-pad:not(.sheet-center) { width: min(calc(var(--sheet-w, 560px) + 400px), 100vw); padding-bottom: var(--sab); }
  .sheet-center.sheet-pad { width: min(calc(var(--sheet-w, 780px) + 400px), calc(100vw - 24px)); }
}

@media (max-width: 900px) {
  .dialog { padding: 20px; border-radius: 22px; gap: 16px; }
  /* окно на весь экран телефона */
  .layer-fill { padding: 0; }
  .dialog-fill { width: 100vw !important; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; padding-top: calc(20px + var(--sat)); padding-bottom: calc(20px + var(--sab)); }
  .sheet-head { gap: 10px; padding: 0 12px; }
  .sheet-head h2 { font-size: 21px; }
  .sheet-body { padding: 12px 12px 16px; }
  .sheet-foot { padding: 0 12px var(--sab); }
}
@media (max-width: 600px) {
  /* название длинное («Порода · сортимент · длина») — в две строки; поиск — вместо названия */
  .sheet-head h2 { white-space: normal; line-height: 1.1; }
  .sheet-head.q h2 { display: none; }
  .sheet-q { flex: 1 1 0; }
  /* окно по центру — во весь экран */
  .layer-center:has(> .sheet-center) { padding: 0; }
  .sheet-center { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; padding: var(--sat) 0 0; box-shadow: none; }
  .sheet-center .sheet-foot { padding-bottom: calc(16px + var(--sab)); }
}
/* Chromium без dvh (Edge 94 на Windows 10 LTSC — окно программы без WebView2): высота окошка — по vh; запасное значение
   рядом минификатор CSS сливает с основным, поэтому — отдельным правилом */
@supports not (height: 100dvh) {
  .dialog { max-height: calc(100vh - 24px); }
  .sheet-center { max-height: calc(100vh - 24px); }
}
/* код администратора (22B) — общее у планшета и программы ПК */
/* полоса во всю ширину сверху; экран и окна сдвигаются вниз на её высоту (отступ сверху --sat) */
html.unlocked { --sat: calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 48px); }
.unl-bar { position: fixed; z-index: 170; top: 0; left: 0; right: 0; height: var(--sat); padding: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) 12px 0 18px; display: flex; align-items: center; justify-content: center; gap: 14px; background: #E07B1F; color: #fff; font-weight: 800; font-size: 18px; box-sizing: border-box; }
.unl-bar .btn { background: #fff; }
.unl-ring { vertical-align: middle; margin-left: 6px; }
.unl-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.unl-cells span { display: grid; place-items: center; height: 64px; border-radius: 14px; border: 2px solid var(--line-strong); font-size: 32px; font-weight: 900; background: var(--surface); }
.unl-cells span.on { border-color: var(--primary); }
.unl-err { margin: 0; font-weight: 800; color: #8E2414; }
.unl-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.unl-pad button { min-height: 64px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 26px; font-weight: 800; color: var(--text); cursor: pointer; }
.unl-pad button.ok { background: var(--primary); border-color: var(--primary); color: #fff; font-size: 20px; }
.unl-pad button:disabled { opacity: .5; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 20px; min-width: 0; }
.card-err { border-color: var(--danger); background: var(--danger-soft); }
.card-warn { border-color: var(--warn-line); background: var(--warn-soft); }
.card-title { font-size: 24px; }

/* «название — значение» */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 20px; font-size: 18px; }
.kv > span:nth-child(odd) { color: var(--muted); font-weight: 600; }
.kv > span:nth-child(even) { font-weight: 700; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .card { padding: 16px; }
  .kv { gap: 10px 14px; font-size: 17px; }
}
/* Дата и время: кнопка в шапке документа и шторка выбора */
.dt-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 16px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-size: 19px; font-weight: 800; white-space: nowrap; }
.dt-btn-text { display: inline-flex; gap: 8px; }
.dt-btn-err { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-text); }

.dt-now { font-size: 26px; font-weight: 800; }
.dt-label { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: -6px; }
.dt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.dt-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dt-cell { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 19px; font-weight: 700; }
.dt-cell span { font-size: 14px; font-weight: 600; color: var(--muted); }
.dt-cell.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.dt-cell.on span { color: #fff; }
.dt-cell:disabled { opacity: 0.35; }

@media (max-width: 900px) {
  /* на телефоне в шапке: дата над временем */
  .dt-btn { min-height: 54px; padding: 4px 10px; gap: 6px; font-size: 16px; }
  .dt-btn .ic { display: none; }
  .dt-btn-text { flex-direction: column; gap: 0; line-height: 1.15; text-align: right; }
  .dt-cell { min-height: 50px; font-size: 18px; }
}
/* Поля ввода и выбора */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 15px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
/* справа в строке подписи: подсказка к значению (как посчитан пробег) */
.lbl-aside { margin-left: auto; font-weight: 600; color: var(--muted); white-space: nowrap; }
.req { color: var(--danger); font-weight: 800; }

.box { min-height: 56px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); font-size: 17px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.box-ro { background: var(--surface-2); border-color: var(--surface-2); color: var(--text-2); }
.box-err { border-color: var(--danger); background: var(--danger-soft); }
/* проверить: подставлено, но не наверняка — как .card-warn («Проверьте пробег») */
.box-warn { border-color: var(--warn-line); background: var(--warn-soft); }
.box-sub { font-size: 14px; font-weight: 600; color: var(--muted); }
.box-btn { width: 100%; text-align: left; }
.box-btn:disabled { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); }
/* не заполнено, хоть и выключено (адрес без контрагента) — как остальные незаполненные (макет WaybillErrors 1A) */
.box-btn.box-err:disabled { border-color: var(--danger); background: var(--danger-soft); }
.box-selected { border-color: var(--primary); border-width: 3px; background: var(--selected); }
.box-tall { min-height: 64px; }
.box-input { width: 100%; outline: none; }
.box-input:focus, .box-split:focus-within { border-color: var(--primary); }
.box-split { justify-content: space-between; }
.box .stack { gap: 0; }
.bare { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; padding: 0; }
/* поле в рамке: фокус — рамкой поля, без синего контура браузера вокруг ввода (общий :focus-visible в theme.css в сборке бывает
   позже .bare — и побеждал) */
.box .bare:focus-visible, .box-input:focus-visible { outline: none; }
.box:has(> .bare:focus) { border-color: var(--primary); }
.ph { color: var(--muted); font-weight: 500; }
.ph-err { color: var(--danger-text); font-weight: 700; }
.pick-list { display: flex; flex-direction: column; gap: 10px; }
/* строка выбора (PickerSheet) — как строка выбора склада: крупно, белым на бежевом, имя до трёх строк (адреса длинные) */
.pick-card { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 18px; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; font: inherit; text-align: left; color: var(--text); cursor: pointer; overflow: hidden; }
.pick-card.on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.pick-card:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.pick-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-card-nm { font-size: 21px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pick-card-sub { margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--muted); }
.divider-label { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 15px; font-weight: 700; margin: 8px 0; }
.divider-label::before,
.divider-label::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* выбор из длинного списка (SearchSelect): меню с поиском под полем — как выбор лесного участка */
.spick { position: relative; min-width: 0; }
/* значение с длинным пояснением (адрес) — в несколько строк, с отступами */
.spick .box.spick-btn { padding-top: 6px; padding-bottom: 6px; }
.spick-btn .ic { flex: none; color: var(--muted); }
.spick-btn.spick-open { border-color: var(--primary); }
.spick-sub { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.spick-menu { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; display: flex; flex-direction: column; max-height: 360px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); overflow: hidden; }
.spick-menu.spick-portal { position: fixed; z-index: 180; right: auto; }
.spick-find { margin: 6px; min-height: 38px; flex-shrink: 0; padding: 0 10px; border: 1.5px solid var(--primary); border-radius: 9px; font: inherit; font-size: 14px; outline: none; }
.spick-list { overflow: auto; }
.spick-it { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-top: 1px solid var(--surface-2); background: var(--surface); font: inherit; font-size: 14px; text-align: left; color: var(--text); cursor: pointer; }
.spick-it.spick-key { background: var(--surface-2); }
.spick-it.on { background: var(--primary-soft); }
.spick-it:disabled { color: var(--muted); background: var(--surface-2); cursor: default; }
.spick-it small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.spick-it > .ic:first-child { color: var(--primary); flex: none; }
.spick-sp { width: 16px; flex: none; }
.spick-none { margin: 0; padding: 10px; color: var(--muted); font-size: 14px; }

/* сегменты */
.seg { display: inline-flex; min-width: 0; border: 2px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--surface); }
.seg-full { display: flex; width: 100%; }
.seg > button { min-height: 62px; min-width: 0; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; font-weight: 700; font-size: 19px; background: transparent; border: 0; }
.seg:not(.seg-full) > button { flex: none; }
.seg > button + button { border-left: 2px solid var(--line-strong); }
.seg > button.on { background: var(--primary); color: #fff; }
.seg-field > button { min-height: 52px; }
.seg-vertical { display: flex; flex-direction: column; }
.seg-vertical > button { flex: none; min-height: 54px; }
.seg-vertical > button + button { border-left: 0; border-top: 2px solid var(--line-strong); }
/* мелко: высота с рамкой — как у кнопок админки (44) */
.seg.seg-sm { border-radius: 10px; }
.seg.seg-sm > button { min-height: 40px; padding: 0 14px; font-size: 15px; gap: 6px; }

/* переключатель */
.toggle { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 17px; font-weight: 600; text-align: left; }
.sw { width: 54px; height: 32px; border-radius: 999px; background: #C9C5BB; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.sw-on { background: var(--primary); }
.sw-on::after { left: 26px; }
/* нельзя менять (следует из другой отметки, нет прав) — переключатель бледнее */
.toggle:disabled .sw { opacity: 0.5; }

/* число кнопками «−» и «+»: высота — как у переключателя */
.stepper { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 6px 0 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 17px; font-weight: 600; }
.stepper-label { flex: 1; min-width: 0; }
.stepper-btn { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: var(--bg); color: var(--text); }
.stepper-btn:disabled { opacity: 0.35; }
.stepper-val { min-width: 36px; text-align: center; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper-off { opacity: 0.6; }

@media (max-width: 900px) {
  .seg > button { padding: 0 8px; font-size: 17px; gap: 6px; }
  .seg > button .ic { width: 24px; height: 24px; }
  /* много вариантов — в несколько рядов */
  .seg-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line-strong); }
  .seg-wrap > button { background: var(--surface); }
  .seg-wrap > button + button { border-left: 0; }
  .seg-wrap:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 5, 8, … вариантов — последний на две клетки, без пустой */
  .seg-wrap:has(> :nth-child(5)) > :last-child:nth-child(3n + 2) { grid-column: span 2; }
  .seg-wrap:not(:has(> :nth-child(4))) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
/* Таксационное описание: планшет — крупно; .tax-sm — админка */
.tax { display: flex; flex-direction: column; gap: 14px; font-size: 18px; min-width: 0; }
.tax > .seg { align-self: flex-start; }
.tax-table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: 14px; }
.tax-table { width: 100%; border-collapse: collapse; }
.tax-table th { padding: 8px 12px; font-size: 14px; font-weight: 800; color: var(--text-2); text-align: left; white-space: nowrap; border-bottom: 2px solid var(--line); background: var(--hover); }
.tax-table td { padding: 8px 12px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tax-table tbody tr:last-child td { border-bottom: 0; }
.tax-table td:not(:first-child), .tax-table th:not(:first-child) { text-align: right; }
.tax-params { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.tax-params > div { display: contents; }
.tax-params dt { color: var(--text-2); font-weight: 600; }
.tax-params dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.tax-layer { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 2px solid var(--line); }
.tax-layer h4 { margin: 0; font-size: 1em; font-weight: 800; }
.tax-doc { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tax-doc pre { margin: 0; padding: 12px 14px; overflow-x: auto; border-radius: 12px; background: var(--hover); border: 2px solid var(--line); font: 500 15px/1.35 ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Roboto Mono", monospace; white-space: pre; }
.tax-note { color: var(--muted); font-size: 15px; font-weight: 600; }
.tax-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tax-head h2 { margin: 0; }
.tax-sub { color: var(--muted); font-size: 16px; font-weight: 600; margin-top: 4px; }

.tax-sm { font-size: 14px; gap: 12px; }
.tax-sm .tax-table-wrap { border-width: 1px; border-radius: 8px; }
.tax-sm .tax-table th { padding: 5px 8px; font-size: 12px; border-bottom-width: 1px; }
.tax-sm .tax-table td { padding: 4px 8px; }
.tax-sm .tax-params { gap: 3px 14px; }
.tax-sm .tax-layer { border-top-width: 1px; padding-top: 10px; }
.tax-sm .tax-doc pre { font-size: 12.5px; padding: 10px 12px; border-width: 1px; border-radius: 8px; }
.tax-sm .tax-note { font-size: 13px; }
.tax-dialog-sm { padding: 20px 24px; border-radius: 14px; gap: 14px; }
.tax-dialog-sm .tax-head h2 { font-size: 20px; }
.tax-dialog-sm .tax-sub { font-size: 13px; }
/* Выделы и кварталы на карте (устройства и админка): фильтр, карточка «что здесь», «Подробнее», поиск */
/* выделы: порода по возрасту, цвет слоя */
.forest-swatch { width: 18px; height: 6px; border-radius: 3px; flex: none; }
.forest-ages { display: inline-flex; flex: none; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.2); }
.forest-ages i { width: 8px; height: 16px; }

/* кнопки на карте: фильтр с выбранным лесным участком, нажатая — зелёная */
.lmap-ctl .btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lmap-filter { position: relative; overflow: visible; }
.lmap-badge { position: absolute; top: -8px; right: -8px; min-width: 20px; padding: 0 5px; border-radius: 9px; border: 1.5px solid #fff; background: #0F766E; color: #fff; font-size: 10px; font-weight: 800; line-height: 17px; }

/* краткая карточка «что здесь» — мелко, под окнами */
.fc { position: absolute; z-index: 650; left: 12px; bottom: 38px; width: min(460px, calc(100% - 80px)); display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); font-size: 13px; line-height: 1.45; }
.fc-top { display: flex; align-items: center; gap: 6px; }
.fc .grow, .fd .grow, .fs .grow, .ff .grow { flex: 1; min-width: 0; }
/* номер — одной строкой (места мало — сокращаются координаты рядом) */
.fc-code { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 8px; margin-left: -4px; border: 0; border-radius: 8px; background: var(--surface-2); font: inherit; font-size: 14px; font-weight: 800; color: var(--text); cursor: pointer; white-space: nowrap; text-align: left; }
.fc-none { font-size: 14px; }
.fc-btn.btn { min-height: 34px; width: 34px; border-radius: 9px; border-width: 1.5px; padding: 0; }
.fc-btn.btn-small { min-height: 30px; width: 30px; }
.fc-l1 { font-size: 14px; font-weight: 700; }
.fc-ln { display: flex; align-items: flex-start; gap: 6px; color: var(--text-2); }
.fc-ln > i { width: 11px; height: 11px; border-radius: 3px; flex: none; margin-top: 4px; border: 1px solid rgba(0, 0, 0, 0.2); }
/* координаты — сразу за номером, мелко (нажатие — скопировать) */
.fc-xy { display: inline-block; min-width: 0; padding: 1px 4px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .fc { left: 8px; right: 8px; width: auto; bottom: 34px; }
}

/* «Подробнее» — панель справа на всю высоту (на телефоне — во весь экран), поле сверху, значение снизу */
.fd { position: absolute; z-index: 660; top: 0; right: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 2px solid var(--line); box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15); font-size: 14px; line-height: 1.4; }
.fd-h { display: flex; align-items: center; gap: 6px 10px; padding: 8px 12px; border-bottom: 1.5px solid var(--surface-2); }
.fd-h .fc-code { font-size: 15px; margin-left: 0; flex: none; }
/* координаты — рядом с номером и так же: плашкой, по центру строки */
.fd-h .fc-xy { font-size: 12px; }
@media (max-width: 420px) {
  .fd-h .fc-code { font-size: 14px; }
}
.fd-b { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(12px + var(--sab)); }
.fd-obj { border: 1.5px solid var(--surface-2); border-radius: 12px; }
.fd-oh { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 800; color: var(--text); text-align: left; cursor: pointer; }
.fd-oh small { font-weight: 600; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fd-oh > i { width: 13px; height: 13px; border-radius: 4px; flex: none; border: 1px solid rgba(0, 0, 0, 0.2); }
.fd-oh .ic { color: var(--muted); flex: none; }
.fd-obj.closed .fd-oh { color: var(--text-2); }
.fd-ob { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }
.fd-fld { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.fd-fld > div { min-width: 0; }
.fd-fld > .w { grid-column: 1 / -1; }
.fd-fld dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.fd-fld dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.fd-tax-h { display: flex; align-items: center; gap: 8px; }
.fd-tax-h b { flex: 1; font-size: 13px; }
.fd-tax-h small { font-weight: 600; color: var(--muted); }
.fd-ob .btn { align-self: flex-start; min-height: 32px; padding: 0 10px; gap: 6px; font-size: 13px; border-radius: 9px; border-width: 1.5px; }
.fd-tax { overflow-x: auto; }
.fd-tax table { border-collapse: collapse; width: 100%; font-size: 12px; }
.fd-tax th { text-align: left; font-weight: 700; color: var(--muted); padding: 3px 4px; border-bottom: 1px solid var(--surface-2); font-size: 11px; white-space: nowrap; }
.fd-tax td { padding: 3px 4px; border-bottom: 1px solid var(--surface-2); font-weight: 600; }
@media (max-width: 600px) {
  .fd { border-left: 0; }
  .fd-fld { grid-template-columns: 1fr; }
}

/* поиск — окно справа вверху, под кнопками */
.fs { position: absolute; z-index: 670; top: 10px; right: 64px; width: min(460px, calc(100% - 84px)); max-height: calc(100% - 20px); display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); font-size: 14px; }
.fs-in { display: flex; align-items: center; gap: 6px; margin: 10px 10px 6px; padding: 0 4px 0 10px; min-height: 44px; border: 2px solid var(--primary); border-radius: 11px; }
.fs-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 600; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.fs-chip { padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.fs-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0 10px 6px; font-size: 13px; font-weight: 700; }
.fs-crumbs span { display: inline-flex; align-items: center; gap: 2px; }
.fs-crumbs button { border: 0; background: transparent; padding: 2px 4px; font: inherit; color: var(--info); cursor: pointer; }
.fs-crumbs button.cur { color: var(--text); }
.fs-crumbs .grow { flex: 1; }
.fs-crumbs button.fs-show { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.fs-crumbs button.fs-show .ic { width: 13px; height: 13px; color: var(--danger); }
/* что внутри выбранного: слои фишками с числом */
.fs-groups { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 8px; border-bottom: 1px solid var(--surface-2); margin-bottom: 4px; }
.fs-groups .fs-chip small { font-size: 11px; font-weight: 600; opacity: 0.75; }
.fs-sub { margin: 6px 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fs-res { overflow: auto; padding: 0 10px 10px; display: flex; flex-direction: column; }
.fs-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--surface-2); }
.fs-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 2px; border: 0; background: transparent; font: inherit; text-align: left; color: var(--text); cursor: pointer; }
.fs-go > i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.fs-go b { display: block; font-size: 14px; }
.fs-go small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fs-pin { color: var(--danger); }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.fs-res .hint { margin: 6px 2px; }
@media (max-width: 600px) {
  .fs { left: 8px; right: 8px; width: auto; top: 8px; }
}

/* фильтр: лесной участок, лесная карта, слои и породы с числом */
.ff { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ff-sec { margin: 8px 0 -2px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ff-sel { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--surface); font: inherit; font-size: 15px; font-weight: 700; color: var(--text); text-align: left; cursor: pointer; }
.ff-sel small { font-size: 12px; font-weight: 500; color: var(--muted); }
.ff-pick { display: flex; flex-direction: column; border: 1.5px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.ff-find { margin: 6px; min-height: 38px; padding: 0 10px; border: 1.5px solid var(--primary); border-radius: 9px; font: inherit; font-size: 14px; }
.ff-it { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-top: 1px solid var(--surface-2); background: var(--surface); font: inherit; font-size: 14px; text-align: left; color: var(--text); cursor: pointer; }
.ff-it.on { background: var(--primary-soft); }
.ff-it small { color: var(--muted); font-size: 12px; }
.ff-it > .ic:first-child { color: var(--primary); }
.ff-sp { width: 16px; flex: none; }
.ff-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-press); font-size: 11px; font-weight: 800; line-height: 16px; }
.ff-dl { color: var(--primary); }
.ff-cloud { color: var(--muted); }
.ff-opt { display: flex; align-items: center; gap: 9px; min-height: 36px; cursor: pointer; }
.ff-opt input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.ff-n { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ff-range { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ff-range input { flex: 1; accent-color: var(--primary); }
.ff-opt small { color: var(--muted); font-size: 12px; font-weight: 600; }
/* раздел с галочкой (лесосеки, лесная карта): строки раздела — с отступом под галочкой */
.ff-main { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 800; }
.ff > .ff-main:first-child, .ff-tabs + .ff-main { margin-top: 0; padding-top: 0; border-top: 0; }
.ff-group { display: flex; flex-direction: column; gap: 2px; padding-left: 29px; }
.ff-group .ff-opt { min-height: 34px; }
/* полосы рубки и волоки — под «Делянки 1С» */
.ff-opt.ff-sub { padding-left: 22px; }
.forest-swatch.ff-strips { height: 10px; background: repeating-linear-gradient(90deg, rgba(249, 115, 22, 0.75) 0 5px, #16A34A 5px 7px); box-shadow: 0 0 0 1px #C2410C; }
.ff-top { margin-top: 6px; }
.ff-line { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; font-size: 12px; font-weight: 700; color: var(--text-2); }

/* продвинутый фильтр выделов: варианты (ИЛИ) с условиями (И) */
/* под галочкой «Продвинутый фильтр» — без своего отступа: варианты шире, во всю ширину раздела */
.tf-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.tf-hd > .grow { white-space: nowrap; }
.tf { display: flex; flex-direction: column; gap: 6px; }
.tf-alt { display: flex; flex-direction: column; gap: 6px; }
.tf-or { display: flex; align-items: center; gap: 8px; }
.tf-or::before, .tf-or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.tf-or b { padding: 2px 10px; border-radius: 8px; background: var(--primary); color: var(--on-primary, #fff); font-size: 12px; }
.tf-grp { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid var(--primary); border-radius: 14px; }
.tf-gh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--primary-press); }
.tf-ci { display: flex; flex-direction: column; gap: 6px; }
.tf-and { align-self: center; font-size: 12px; font-weight: 800; color: var(--primary); }
.tf-cond { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.tf-hd { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.tf-hd .seg { border-width: 1.5px; border-radius: 10px; }
.tf-hd .seg > button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.tf-hd .seg > button + button { border-left-width: 1.5px; }
.tf-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.tf-x:hover { background: var(--hover, rgba(0, 0, 0, 0.06)); color: var(--text); }
.tf-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-v { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.tf-v small { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tf-v.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-press); }
.tf-pick { border-style: dashed; color: var(--primary); }
.tf-pick.open { border-style: solid; }
.tf-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.tf-add-alt { min-height: 40px; color: var(--primary-press); border-color: var(--primary); }
.tf-orders { max-height: 360px; overflow: auto; }
.tf-row { display: flex; align-items: center; border-top: 1px solid var(--surface-2); background: var(--surface); }
.tf-row.on { background: var(--primary-soft); }
.tf-row .ff-it { flex: 1; border-top: 0; background: none; }
.tf-orders .ff-it input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.tf-sub { padding-left: 34px; }
.tf-none { border-top: 2px solid var(--line); }
/* Та же форма фильтра панелью: карта остаётся видна и принимает жесты. */
.forest-filter-inline { position: relative; flex: none; display: flex; flex-direction: column; width: 430px; max-width: 46%; min-height: 0; height: 100%; background: var(--surface); border-left: 1px solid var(--line); }
.forest-filter-inline-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 4px 10px 4px 18px; border-bottom: 1px solid var(--line); font-size: 20px; }
.forest-filter-inline-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
/* Выбор карты (обычная / новая 3D) и плашки новой карты */
/* переключатель на самой карте — рядом с подложкой, тем же видом */
.lmap-engine button { width: auto; min-width: 40px; padding: 0 10px; font: 800 14px var(--font); }
.lmap-engine-sw { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.lmap-engine-l { font-weight: 800; }
.lmap-engine-sw .hint { margin: 0; font-size: 14px; }
/* плашка: чего в новой карте пока нет, почему новая не запустилась — вверху посередине, мелко, закрывается */
.lmap-note { position: absolute; z-index: 650; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; max-width: min(520px, calc(100% - 140px)); padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(255, 251, 235, 0.95); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); font-size: 13px; font-weight: 600; color: #713F12; }
.lmap-note button { display: inline-grid; place-items: center; min-width: 30px; min-height: 30px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
/* счётчик скорости карты (mapPerf.tsx) — слева сверху, мелко, не мешает нажатиям */
.lmap-perf { position: absolute; z-index: 640; left: 8px; top: 8px; padding: 4px 8px; border-radius: 6px; background: rgba(20, 24, 20, 0.72); color: #E8F5E9; font: 600 11.5px/1.35 ui-monospace, Consolas, monospace; white-space: pre; pointer-events: none; }
.lmap-perf.bad { background: rgba(127, 29, 29, 0.8); color: #fff; }
/* Рельеф: выбор источника (фильтр и легенда), легенда на карте — под переключателем подложек (макет PcMapMachine) */
.relief-src { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.relief-src button { flex: 1; min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.relief-src button + button { border-left: 1px solid var(--line); }
.relief-src button.on { background: var(--primary); color: #fff; }
.relief-src button:disabled { opacity: 0.4; cursor: default; }
.ff-group .relief-src { margin: 4px 0 6px; }
.relief-nc { margin: 0 0 4px; color: #92400E; }
.relief-sw-shade { background: linear-gradient(135deg, #fff 0%, #bbb 50%, #555 100%); }

.relief-legend { position: absolute; z-index: 500; left: 10px; top: 60px; display: flex; flex-direction: column; gap: 4px; width: 260px; max-width: calc(100% - 80px); padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); font-size: 12px; color: var(--text); }
.relief-legend b { font-size: 13px; }
.relief-legend small { color: var(--text-2); }
.relief-legend .relief-src { margin-bottom: 2px; }
.relief-legend .relief-src button { min-height: 32px; padding: 0 4px; font-size: 12px; }
.relief-scale { display: grid; gap: 2px; margin-top: 2px; }
.relief-scale i { display: block; height: 10px; border-radius: 3px; opacity: 0.8; }
.relief-ticks { position: relative; height: 13px; margin: 0 6px; }
.relief-ticks em { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--text-2); }
.relief-cont { display: flex; align-items: center; gap: 6px; }
.relief-cont i { display: inline-block; width: 24px; height: 0; }
.relief-credit { font-size: 10px; line-height: 1.25; }
.lmap-static .relief-legend { display: none; }
@media (max-width: 600px) {
  .relief-legend { width: 190px; top: 56px; padding: 6px 8px; }
  .relief-credit { display: none; }
}
/* Один фильтр карты (mapFilter.tsx): вкладки «Лес · Работа · Машины», быстрые кнопки поверх карты и их настройка */

/* вкладки фильтра (4F) — сверху, не уезжают при прокрутке */
.ff-tabs { position: sticky; top: 0; z-index: 2; margin: -4px 0 4px; padding: 4px 0 8px; background: var(--surface); }
.mf-sw { height: 8px; box-shadow: 0 0 0 1px var(--line-strong); }
/* «Рубка» без строк: почему этому входу брёвна не видны (экран машины под входом лесовоза) */
.ff-why { margin: 0 0 4px; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--muted); }

/* быстрые кнопки (4E): одной строкой под выбором подложки, не до столбца кнопок справа; лишнее листается вбок.
   Свои места — у клиентов (ПК: go_code/web/src/map.css, планшет и экран машины: frontend/src/blocks/map/map.css) */
.lmap-quick { position: absolute; z-index: 500; left: 10px; right: 64px; top: 58px; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 8px; scrollbar-width: none; pointer-events: none; }
.lmap-quick::-webkit-scrollbar { display: none; }
.lmap:not(:has(> .lmap-layers)) .lmap-quick { top: 10px; }
.lmap-static .lmap-quick { display: none; }
.lmap-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 12px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); font: inherit; font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.lmap-chip > i { width: 11px; height: 11px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(0, 0, 0, 0.18); }
/* выключенная — бледная */
.lmap-chip.off { background: var(--surface-2); border-color: var(--line); color: var(--muted); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.lmap-chip.off > i { opacity: 0.35; }
@media (any-pointer: coarse) {
  .lmap-chip { min-height: 44px; font-size: 15px; }
}

/* настройка: вкладками, какие пункты — на кнопки */
.mf-prefs { display: flex; flex-direction: column; gap: 8px; }
.mf-prefs-h { margin-top: 4px; font-size: 15px; font-weight: 800; }
.mf-prefs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mf-prefs-chips .lmap-chip { box-shadow: none; }
.mf-more { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.mf-more > summary { min-height: 32px; font-size: 15px; font-weight: 800; cursor: pointer; }
.mf-more[open] > summary { margin-bottom: 8px; }
/* Каркас экрана: верхняя панель, страница, нижняя панель действий */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: var(--sat) var(--sar) var(--sab) var(--sal); }
/* верхняя панель заходит под строку состояния (у экрана сверху отступ --sat — панель поднимается на него) */
.topbar { position: sticky; top: 0; z-index: 20; flex: none; height: calc(80px + var(--sat)); margin-top: calc(-1 * var(--sat)); display: flex; align-items: center; gap: 16px; padding: var(--sat) var(--gutter) 0; background: var(--surface); border-bottom: 2px solid var(--line); }
.topbar-doc { height: calc(88px + var(--sat)); }
/* clip — страница никогда не шире экрана, даже если что-то внутри не помещается */
.page { flex: 1; min-width: 0; padding: 20px var(--gutter) calc(var(--bar-h) + 24px); overflow-x: clip; }
.actionbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--bar-h) + var(--sab)); display: flex; align-items: center; gap: 16px; padding: 0 calc(var(--gutter) + var(--sar)) var(--sab) calc(var(--gutter) + var(--sal)); background: var(--surface); border-top: 2px solid var(--line); }
/* панель-надпись (действия нет): ниже, голубая, текст по центру; странице — меньший отступ снизу */
.screen:has(> .actionbar-note) { --bar-h: 64px; }
.actionbar-note { justify-content: center; background: var(--info-soft); border-top-color: #AFC6EA; color: #123E74; font-size: 18px; font-weight: 700; text-align: center; line-height: 1.25; }

/* плавающая кнопка: круг 84 px, нажимается вся зона 132 px вокруг */
.fab { position: fixed; z-index: 25; right: calc(max(0px, calc(var(--gutter) - 24px)) + var(--sar)); bottom: var(--sab); width: 132px; height: 132px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fab-dot { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 0 4px var(--bg); }
.fab:hover .fab-dot { background: var(--primary-press); }
.fab:active .fab-dot { transform: scale(0.96); }
.fab-dot .ic { width: 42px; height: 42px; stroke-width: 2.5; }
.page.page-fab { padding-bottom: 150px; }

/* две колонки документа: поля слева, состав справа */
.two-col { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 20px; align-items: start; }
.two-col > .stack { gap: 14px; }

@media (max-width: 900px) {
  .topbar, .topbar-doc { height: calc(72px + var(--sat)); gap: 8px; }
  .page { padding: 14px var(--gutter) calc(var(--bar-h) + 16px); }
  .actionbar { gap: 8px; }
  .actionbar .btn { padding: 0 14px; font-size: 17px; gap: 8px; }
  .actionbar .btn-square { width: 54px; padding: 0; }
  /* планшет вертикально: поля в два столбца, ниже — состав */
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .two-col > .col-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
  .two-col > .col-fields > .col-full { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .screen:has(> .actionbar-note) { --bar-h: 58px; }
  .actionbar-note { font-size: 16px; }
  .two-col > .col-fields { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
}
/* Номер документа: серый пунктир — будет присвоен, чёрный — присвоен, красный зачёркнутый — аннулирован */
.num { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 12px; font-weight: 800; font-size: 28px; letter-spacing: 0.02em; line-height: 1.2; white-space: nowrap; }
.num-pending { color: #7D828A; background: #E4E2DB; border: 2px dashed #ABA69B; }
.num-fixed { color: #FFFFFF; background: #14161A; border: 2px solid #14161A; }
.num-annul { color: #8A1A12; background: var(--danger-soft); border: 2px solid var(--danger); text-decoration: line-through; }
.num-sm { font-size: 18px; padding: 4px 10px; border-radius: 9px; }

@media (max-width: 900px) {
  .num:not(.num-sm) { font-size: 22px; padding: 4px 12px; }
}
/* Своя цифровая клавиатура (numpad.tsx): поле числа и клавиши с «готово» — окно строки состава (макет WaybillLine 2B, 4B) */

/* поле: высотой с другие поля, число крупно */
.nbox { display: flex; align-items: center; gap: 4px; min-height: 56px; width: 100%; box-sizing: border-box; padding: 0 8px 0 14px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-size: 26px; font-weight: 800; color: var(--text); cursor: text; -webkit-tap-highlight-color: transparent; }
.nbox.foc { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.nbox.err { border-color: var(--danger); background: var(--danger-soft); }
.nbox .ph { color: #A09B90; font-weight: 700; }
/* подставлено, не трогали — выделено: первая цифра заменит */
.nbox-v.sel { background: var(--primary-soft); border-radius: 6px; padding: 0 4px; margin-left: -4px; }
.nbox-v { display: inline-flex; align-items: center; }
/* символ — шире на 1 px с боков: проще попасть между цифрами */
.nbox-ch { padding: 0 1px; }
.nbox-caret { display: inline-block; flex: none; width: 3px; height: 32px; margin: 0 -1px; background: var(--text); animation: nbox-blink 1s steps(1) infinite; }
@keyframes nbox-blink { 50% { opacity: 0; } }
.nbox small { margin-left: auto; padding-right: 6px; font-size: 16px; font-weight: 700; color: var(--muted); }
/* ↶ — вернуть подставленное */
.nbox-reset { margin-left: auto; flex: none; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.nbox small + .nbox-reset { margin-left: 4px; }

/* клавиши: 4 столбца — цифры; «стереть» и запятая справа; ✓ — на два ряда, 0 — на три столбца */
.nkeys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nkeys button { min-height: 58px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 14px; background: var(--surface); font: inherit; font-size: 26px; font-weight: 800; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nkeys button:active { filter: brightness(0.92); }
/* «стереть» держат — без выделения текста и меню */
.nkeys button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.nkeys button.f { background: #F6F5F1; }
.nkeys .k-ok { grid-row: span 2; background: var(--primary); color: #fff; }
.nkeys .k-ok .ic { width: 34px; height: 34px; }
.nkeys .k-0 { grid-column: span 3; }

@media (max-width: 600px) {
  .nkeys { gap: 6px; }
  .nkeys button { min-height: 52px; font-size: 24px; border-radius: 12px; }
}
/* ScrollTabs — навигация по разделам одной строкой: листается вбок, у краёв затухание, полосы прокрутки не видно */
.stabs { position: relative; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 2px 0; scroll-snap-type: none; overscroll-behavior-x: contain; }
.stabs::-webkit-scrollbar { display: none; }
.stabs.fl { mask-image: linear-gradient(to right, transparent 0, #000 28px); }
.stabs.fr { mask-image: linear-gradient(to left, transparent 0, #000 28px); }
.stabs.fl.fr { mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.stabs > button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line, #E4E2DB); background: var(--surface, #fff); font: inherit; font-size: 13px; font-weight: 800; color: var(--text-2, #3F454D); white-space: nowrap; cursor: pointer; }
.stabs > button:hover { border-color: var(--line-strong, #8F8A7F); }
.stabs > button.on { background: #1F2328; border-color: #1F2328; color: #fff; }
.stabs > button > i { font-style: normal; font-weight: 700; opacity: 0.7; }
/* Цвета пород — как на карте «Выделы цветом породы»: классы sp-<цвет> (заливка) и spb-<цвет> (--sp) строит species.ts */

/* Порода в списках и полях — цветная полоса слева */
.spb { position: relative; padding-left: 22px !important; }
.spb::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; border-radius: 10px 0 0 10px; background: var(--sp); }
/* у поля и карточки выбора — вровень с рамкой: полосу обрезает их скругление (своё давало просвет в углах — макет WaybillLine) */
.box.spb, .pick-card.spb { overflow: hidden; }
.box.spb::before, .pick-card.spb::before { border-radius: 0; width: 10px; }
/* маленькая плашка состава в списке документов */
.spb-chip { padding-left: 14px !important; }
.spb-chip::before { width: 6px; border-radius: 8px 0 0 8px; }
/* Подробный расчёт зарплаты: группы, строки «что — как — сколько», итог */
.pay-calc { display: flex; flex-direction: column; gap: 14px; }
.pay-group { display: flex; flex-direction: column; }
.pay-group h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }
.pay-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.pay-row:last-child { border-bottom: 0; }
.pay-amount { white-space: nowrap; font-weight: 700; }
.pay-subtotal { font-weight: 700; background: var(--surface-2); margin: 4px -10px 0; padding: 8px 10px; border-radius: 10px; border-bottom: 0; }
.pay-total { font-size: 19px; font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; padding-top: 12px; }
.pay-total .pay-amount { font-weight: 900; font-size: 22px; }
.pay-total .hint { font-weight: 400; }

/* Зарплата фишки картинкой: кузов, загрузка и разгрузка по длинам, дорога участками */
.haul-box { border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.haul-head { display: flex; align-items: baseline; gap: 8px; }
.haul-head > :first-child { flex-grow: 1; }
.haul-caps { font-size: 15px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }
.haul-label { font-size: 16px; font-weight: 700; color: var(--text-2); }
.haul-sum { font-size: 20px; font-weight: 800; white-space: nowrap; }

.haul-fill { flex-direction: row; align-items: stretch; gap: 14px; }
.haul-bed { width: 64px; height: 120px; flex: none; display: flex; flex-direction: column-reverse; overflow: hidden; border: 2px solid var(--line-strong); border-radius: 6px; background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--surface-2) 6px 12px); }
.haul-bed > div { flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; border-top: 1px solid rgba(0, 0, 0, 0.25); overflow: hidden; }
.haul-legend { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.haul-leg { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.haul-leg b { white-space: nowrap; }
.haul-sw { width: 16px; height: 16px; flex: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }

.haul-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 17px; }
.haul-table th, .haul-table td { padding: 7px 4px; text-align: right; vertical-align: top; white-space: nowrap; }
.haul-table thead th { padding-top: 0; font-size: 15px; color: var(--text-2); }
.haul-table tbody th { text-align: left; }
.haul-table tbody tr > * { border-top: 1px solid var(--line); }
.haul-table td b { font-weight: 700; }
.haul-table .hint { font-size: 13px; }
.haul-table .haul-total { font-weight: 800; }

.haul-road { display: flex; gap: 4px; }
.haul-road > div { flex: 1 1 0; min-width: 76px; display: flex; flex-direction: column; gap: 3px; }
.haul-road .hint { font-size: 13px; font-weight: 600; white-space: nowrap; }
.haul-seg { height: 14px; border-radius: 4px; background: #9FC3AE; }
.haul-road > div:nth-child(2) .haul-seg { background: #5E9C78; }
.haul-road > div:nth-child(3) .haul-seg { background: #1B6644; }
.haul-road > div:nth-child(n + 4) .haul-seg { background: #0E3D28; }
.haul-formula { text-align: right; }
.skeleton { display: block; flex-shrink: 0; max-width: 100%; min-height: 1em; border-radius: 5px; background: var(--line); animation: skeleton-pulse 1.6s ease-in-out infinite; }
@keyframes skeleton-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
/* ТО машин: чек-лист и замена детали (ui/src/maint): крупно, для механика у машины */
.mnt-badge { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; white-space: nowrap; }
.mnt-ok { background: var(--primary-soft); color: var(--primary-press, #134D33); }
.mnt-soon { background: #FFE9B3; color: #4F3300; }
.mnt-over { background: var(--danger, #C5301F); color: #fff; }

.mnt-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mnt-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.mnt-title { display: flex; flex-direction: column; min-width: 0; }
.mnt-title h2 { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.1; }
.mnt-title span { font-size: 15px; font-weight: 600; color: var(--text-2); }
.mnt-count { margin-left: auto; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mnt-prog { height: 12px; border-radius: 6px; background: var(--surface-2, #E8E6DF); overflow: hidden; }
.mnt-prog i { display: block; height: 100%; background: var(--primary); }
.mnt-empty { padding: 26px 14px; text-align: center; font-size: 20px; font-weight: 800; color: var(--text-2); background: var(--surface-2, #F4F3EF); border-radius: 14px; }
.mnt-node h3 { margin: 8px 0 4px; font-size: 14px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.mnt-job { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 10px 14px; margin-top: 6px; text-align: left; background: var(--surface, #fff); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font: inherit; color: inherit; }
.mnt-job.on { background: var(--primary-soft); border-color: var(--primary); }
.mnt-recent .mnt-job:not(.on) { border-color: #A9BDB2; background: #F3F8F5; }
.mnt-previous { color: #34664B !important; }
.mnt-recent-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 4px 14px; font-size: 13px; color: var(--text-2); }
.mnt-box { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line-strong, #8F8A7F); background: #fff; }
.mnt-job.on .mnt-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.mnt-box svg { width: 24px; height: 24px; }
.mnt-text { flex: 1; min-width: 0; }
.mnt-text b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.mnt-text small { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.mnt-text .mnt-when { font-size: 14px; font-weight: 800; color: #4F3300; }
.mnt-part { flex: none; max-width: 40%; padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 800; background: #FFF7E6; color: #4F3300; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.mnt-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.mnt-sp { flex: 1; }
.mnt-hints { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.mnt-hint { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; background: var(--surface, #fff); border: 0; border-top: 1px solid var(--line); font: inherit; cursor: pointer; text-align: left; color: inherit; }
.mnt-hint:first-child { border-top: 0; }
.mnt-hint b { font-weight: 800; }
.mnt-hint span { font-size: 14px; color: var(--text-2); font-weight: 600; }
.mnt-row { display: flex; gap: 10px; }
.mnt-row > * { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .mnt-text b { font-size: 16px; }
  .mnt-part { max-width: 35%; font-size: 13px; }
}
/* окно детали на невысоком экране: ряды в flex-колонке .dialog не сжимаются (иначе Segmented и подсказки обрезаны) */
.dialog:has(.mnt-row) > * { flex: none; }

/* макет MaintRound2 (?mock=MR2A, MR2B): ступени напоминания, выбор работы, отметка любой работы, запчасти заранее */
.mnt-st-ok { background: var(--primary-soft); color: var(--primary-press, #134D33); }
.mnt-st-soon { background: #FFE9B3; color: #4F3300; }
.mnt-st-due { background: #E8730C; color: #fff; }
.mnt-st-over { background: var(--danger, #C5301F); color: #fff; }
.mnt-snoozed { background: var(--surface-2, #E8E6DF); color: var(--text-2); }
button.mnt-badge { border: 0; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.mnt-pick { border-color: #E8730C; }
.mnt-work-hint { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.mnt-pick-list { flex: 1 1 auto; min-height: 120px; overflow: auto; }
.mnt-snooze { display: flex; gap: 10px; flex-wrap: wrap; }
.mnt-snooze > * { flex: 1; }
.mnt-ahead { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: #FFF7E6; border: 2px solid #F0D49A; color: #4F3300; }
.mnt-ahead { background: var(--surface-2, #F4F3EF); border: 1px solid var(--line); color: var(--text-2); }
.mnt-ahead-toggle, .mnt-ahead-later { border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.mnt-ahead-toggle { flex: 1; }
.mnt-ahead-toggle small { display: block; margin-top: 3px; }
.mnt-ahead-later { padding: 12px 14px; font-size: 14px; color: var(--text-2); }
.mnt-capture { overflow: hidden !important; }
.mnt-part-dialog { scrollbar-width: thin; scrollbar-color: #A6AEA4 transparent; overscroll-behavior: contain; }
.mnt-capture > * { flex: none; }
.mnt-capture .seg > button { white-space: normal; padding: 8px; }
.mnt-capture .mnt-pick-list, .mnt-capture-scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: #A6AEA4 transparent; padding-right: 6px; }
.mnt-capture-scroll { display: flex; flex-direction: column; gap: 16px; }
.mnt-capture textarea { min-height: 110px; resize: vertical; width: 100%; font: inherit; }
.mnt-voice-player { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface-2, #F4F3EF); border-radius: 12px; }
.mnt-voice-player .voice-waveform { flex: 1 1 0; min-width: 0; }
.mnt-plan-original, .mnt-plan-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; border: 1px solid var(--line); background: var(--surface-2); padding: 12px; border-radius: 12px; }
.mnt-plan-original span { margin-left: auto; font-size: 14px; color: var(--text-2); }
.mnt-plan-summary { flex: 1; font-size: 15px; }
.mnt-plan-summary b, .mnt-plan-summary span, .mnt-plan-summary small { display: block; width: 100%; }
.mnt-plan-summary small { color: var(--text-2); }
.mnt-voice-player .voice-clip-time { min-width: 0; font-size: 13px; font-weight: 400; color: var(--text-2); }
.mnt-voice-player .voice-clip-play { width: 40px; height: 40px; }
.mnt-voice-player .voice-clip-play .ic { width: 20px; height: 20px; }
.mnt-defer-options { display: grid; gap: 10px; }
.mnt-ahead-deferred { padding-top: 9px; padding-bottom: 9px; background: transparent; border-color: transparent; font-size: 14px; }
.mnt-voice-match { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mnt-ahead > b { font-size: 16px; font-weight: 900; }
.mnt-ahead-row { display: flex; gap: 8px; align-items: baseline; font-size: 15px; font-weight: 700; flex-wrap: wrap; }
.mnt-ahead-art { font-size: 13px; color: #7A5A1A; }
.mnt-ahead-n { margin-left: auto; font-size: 14px; font-weight: 800; }
.mnt-lists { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mnt-tab { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mnt-tab .mnt-badge { padding: 3px 10px; font-size: 14px; }
.mnt-lh-t { font-weight: 900; }
.mnt-lh-n { min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2, #E8E6DF); color: var(--text-2); font-size: 14px; font-weight: 900; text-align: center; }
.mnt-lh-done { padding: 3px 10px; border-radius: 999px; background: var(--info-soft, #E3ECFA); color: var(--info, #2B5FB0); font-size: 14px; font-weight: 800; }
.mnt-stack { gap: 10px; }
.mnt-card { border: 2px solid var(--line); border-radius: 16px; background: var(--surface, #fff); overflow: hidden; }
.mnt-card.open { border-color: var(--line-strong, #8F8A7F); }
.mnt-lh { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; width: 100%; min-height: 64px; padding: 10px 14px; background: none; border: 0; font: inherit; font-size: 20px; color: inherit; text-align: left; cursor: pointer; }
.mnt-lh > svg { width: 24px; height: 24px; flex: none; }
.mnt-lh .mnt-lh-n { margin-left: auto; }
.mnt-card-body { padding: 0 14px 14px; }
.mnt-fore { font-size: 15px; font-weight: 700; color: var(--text-2); }
.mnt-lists > .seg > button { flex: 1 1 0; min-width: 0; padding: 8px 14px; }
.mnt-tab .mnt-badge { white-space: normal; text-align: left; }
@media (max-width: 640px) {
  .mnt-lists > .seg { display: flex; flex-direction: column; }
  .mnt-lists > .seg > button { flex: none; justify-content: flex-start; }
  .mnt-lists > .seg > button + button { border-left: 0; border-top: 2px solid var(--line-strong); }
  .mnt-lh { font-size: 18px; }
  .mnt-lh .mnt-badge { white-space: normal; }
}
.voice-waveform { position: relative; flex: 1; min-width: 90px; height: 44px; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.voice-wave-bars { flex: 1; width: 100%; min-width: 0; height: 30px; display: block; pointer-events: none; }
.voice-wave-bars rect { fill: var(--line-strong); }
.voice-wave-bars rect.done { fill: var(--primary); }
.voice-wave-knob { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--primary-press); border: 3px solid #fff; box-shadow: 0 1px 5px #0005; pointer-events: none; }
.voice-waveform.drag .voice-wave-knob { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.voice-waveform:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
/* VoiceClip: ▶/⏸, волна, время; размеры и цвета под свой пузырь — у вызывающего (.мой-пузырь .voice-clip-play …) */
.voice-clip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voice-clip-play { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.voice-clip-play:disabled { opacity: 0.75; cursor: default; }
.voice-clip-play .ic { width: 22px; height: 22px; }
.voice-clip .voice-waveform { flex: 1 1 0; min-width: 60px; }
/* место под «0:04 / 0:06» — шкала не прыгает, когда начинает играть */
.voice-clip-time { flex: none; min-width: 5.6em; text-align: right; font-size: 15px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saw4-notice { position: fixed; z-index: 1100; right: 20px; bottom: 20px; width: min(560px, calc(100vw - 32px)); padding: 18px 20px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; background: #dce8f9; color: #123e74; border: 2px solid #1a56a0;
  border-radius: 18px; box-shadow: 0 12px 34px #0003; }
.saw4-notice b { flex: 1 1 200px; font-size: 22px; }
.saw4-notice > div { display: flex; gap: 10px; align-items: center; }
.saw4-notice .btn { min-height: 54px; font-size: 18px; }
.saw4-notice .saw5-close { width: 44px; min-width: 44px; min-height: 44px; }
.saw4-dialog { display: flex; flex-direction: column; padding: 24px; gap: 18px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.saw4-dialog h2 { margin: 0; }
.saw4-parts { display: flex; gap: 10px; flex-wrap: wrap; }
.saw4-part { display: flex; align-items: center; gap: 8px; flex: 1 1 130px; min-height: 54px; padding: 10px 12px; font-size: 19px;
  font-weight: 700; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--text); }
.saw4-check { display: inline-flex; border: 2px solid var(--line-strong); border-radius: 6px; width: 26px; height: 26px; }
.saw4-check svg { visibility: hidden; }
.saw4-part.on { border-color: var(--primary); background: var(--primary-soft, #e3eee8); }
.saw4-part.on .saw4-check { color: white; border-color: var(--primary); background: var(--primary); }
.saw4-part.on .saw4-check svg { visibility: visible; }
.saw4-scroll { min-height: 0; overflow: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; }
.saw4-scroll::-webkit-scrollbar { width: 6px; }
.saw4-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.saw4-scroll::-webkit-scrollbar-button { display: none; }
.saw4-line { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.saw4-line > b { font-size: 20px; }
.saw4-dialog .seg > button { padding: 8px; white-space: normal; line-height: 1.25; }
.saw4-dialog .box, .saw4-dialog .btn { min-height: 52px; }
.saw4-footer { flex: none; }
@media (max-width: 600px) { .saw4-dialog { padding: 18px; } .saw4-part { flex-basis: 95px; font-size: 17px; gap: 5px; padding: 8px; }
  .saw4-notice { right: 16px; bottom: 16px; } }
@media not all and (max-width: 600px) { .saw4-parts { flex-wrap: nowrap; } }
/* Таблица: рамка со скруглением, строки кликабельны (.table-click) */
.table-wrap { border: 2px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th { font-size: 13px; font-weight: 800; color: var(--text-2); text-align: left; padding: 14px 16px; border-bottom: 2px solid var(--line); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.table td { padding: 10px 16px; height: 76px; border-bottom: 1px solid var(--line); font-size: 18px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:hover td { background: var(--hover); }
/* Кузов: блоки груза в масштабе, пустые места «+», пол до последнего тира и линейка */
.bed-wrap { padding-top: 6px; }
.bed { position: relative; height: 200px; }
.bed-compact .bed { height: 120px; }
.floor { height: 8px; background: #6E6A61; border-radius: 0 4px 4px 0; }
.ruler { position: relative; height: 24px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.tick { position: absolute; top: 0; width: 2px; height: 8px; background: var(--line-strong); }
.tick-l { position: absolute; top: 9px; transform: translateX(-50%); white-space: nowrap; }
.tick-l-last { transform: translateX(-100%); }

.slot { position: absolute; border: 2px dashed var(--line-strong); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 16px; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, 0.6); }
.slot:hover { background: var(--primary-soft); }
/* пустой кузов, грузить пока нельзя: что сделать сначала */
.bed-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; border: 2px dashed var(--warn-line); border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); font-size: 17px; font-weight: 700; }

/*
 * Блок груза. Подпись подстраивается под размер блока (container queries):
 *   высокий  — «Порода · сортимент» / «длина · % · м³» / кто грузил;
 *   средний  — первые две строки;
 *   низкий   — одна строка «Порода · длина · м³»;
 *   узкий    — порода и сортимент переносятся, шрифт меньше.
 */
.blk { position: absolute; border: 0; border-radius: 8px; padding: 0; font: inherit; text-align: left; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.18); overflow: hidden; container-type: size; }
.blk:disabled { opacity: 1; cursor: default; }
.blk-in { position: absolute; inset: 0; padding: 6px 9px; display: flex; flex-direction: column; justify-content: center; gap: 2px; line-height: 1.15; }
.blk-in > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-name { font-size: 15px; font-weight: 800; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.blk-nums { font-size: 14px; font-weight: 700; }
.blk-who { font-size: 13px; font-weight: 600; opacity: 0.85; }
.blk-short { display: none; font-size: 14px; font-weight: 800; }

@container (max-height: 96px) {
  .blk-who { display: none; }
  .blk-name { -webkit-line-clamp: 1; }
}
@container (max-height: 58px) {
  .blk-full { display: none; }
  .blk-short { display: flex; }
}
@container (max-height: 22px) {
  .blk-short { display: none; }
}
/* одна строка не влезает — две, перенос между частями («Берёза · 3 м» / «11,0 м³»), а не многоточие */
@container (min-height: 40px) and (max-height: 58px) {
  .blk-short > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* высокий блок: длина, доля и м³ — тоже переносом, а не многоточием */
@container (min-height: 97px) {
  .blk-in > .blk-nums { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* узкий (телефон, короткий груз) — шрифт чуть меньше, длина, доля и м³ — до двух строк (перенос между частями) */
@container (max-width: 240px) {
  .blk-in { padding: 5px 7px; }
  .blk-name { font-size: 14px; }
  .blk-nums, .blk-short { font-size: 13px; }
  .blk-in > .blk-nums { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@container (max-width: 130px) {
  .blk-in { padding: 4px 6px; }
  .blk-nums, .blk-short { font-size: 13px; }
  /* узко — порода и сортимент отдельными строками */
  .blk-name { display: flex; flex-direction: column; font-size: 14px; }
  .blk-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .blk-sep { display: none; }
  .blk-as { font-size: 13px; font-weight: 700; }
}
@container (max-width: 130px) and (max-height: 96px) {
  .blk-as { display: none; }
}

/* строки состава под кузовом */
.block-list { display: flex; flex-direction: column; gap: 10px; }
.block-list .box { min-height: 58px; font-size: 18px; }
.total { font-size: 26px; font-weight: 800; white-space: nowrap; }

@media (max-width: 900px) {
  .bed { height: 170px; }
}
/* Выбор «порода · сортимент · длина» кнопками: крупно, порода — цветной полосой */
.cb { gap: 12px; }
.cb-hint { padding: 24px 0; }

/* породы */
.cb-species { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cb-sp { min-height: 76px; padding: 0 18px 0 28px !important; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 22px; font-weight: 800; color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.cb-sp.spb::before { width: 12px; border-radius: 14px 0 0 14px; }
.cb-sp.on { border-color: var(--primary); border-width: 3px; background: var(--selected); }

/* сортимент строкой, ниже — длины */
.cb-assort { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 2px solid var(--line); }
.cb-assort h3 { margin: 0; font-size: 19px; }
.cb-lengths { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.cb-len { min-height: 80px; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 27px; font-weight: 800; color: var(--text); cursor: pointer; }
.cb-len:not(:disabled):active { transform: translateY(1px); }
.cb-len.on { border-color: var(--primary); border-width: 3px; background: var(--selected); }
.cb-len:disabled { background: var(--surface-2); border-color: var(--surface-2); color: var(--muted); cursor: default; }

@media (max-width: 600px) {
  .cb-species { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-sp { min-height: 66px; font-size: 20px; }
  .cb-lengths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cb-len { min-height: 70px; font-size: 24px; }
}
/* Окно строки (BlockSheet): порода и поля слева, доля по высоте — столбиком справа; на телефоне порода — во всю ширину (макет
   WaybillLine 5A: «Берёза · Пиловочник · 4 м» — в одну строку) */
/* Высокий столбец процентов не растягивает строку породы: свободное место остаётся под остальными полями. */
.blk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; grid-template-areas: "combo height" "fields height";
  grid-template-rows: min-content 1fr; gap: 16px 14px; align-items: start; }
.blk-combo { grid-area: combo; min-width: 0; }
.blk-fields { grid-area: fields; min-width: 0; }
.blk-height { grid-area: height; }

@media (max-width: 600px) {
  .blk-grid { grid-template-columns: minmax(0, 1fr) 112px; grid-template-areas: "combo combo" "fields height"; gap: 14px 10px; }
  /* доля по высоте — ниже (кнопки 46 вместо 54, «Точно, %» — 48): с «Точно» у ходки форвардера окно на телефоне листалось
     (3.11.2026) */
  .blk-height .seg-vertical > button { min-height: 46px; }
  .blk-height .nbox { min-height: 48px; }
}
/* Выбор склада в админке (макет AdminNewDoc, 2-й круг): «Все склады», склад вне правил планшета, своя подпись и расстояние */
/* меток у строки больше — переносятся на вторую строку: строка растёт, а не сжимается до min-height (у флекс-элемента min-height
   заменяет «не меньше содержимого») */
.spk-full .spk-it { flex: none; }
.spk-all { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 48px; padding: 0 16px; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); font: inherit; font-size: 17px; font-weight: 800; color: var(--text); cursor: pointer; }
.spk-all.on { background: #FFF4D6; border-color: #C98A00; color: #6B4A00; }
.spk-all .ic { width: 18px; height: 18px; }
.spk-it.out { border-color: #E2B54A; background: #FFFBEF; }
.spk-it.out::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: #E2B54A; border-radius: 16px 0 0 16px; }
.spk-it.out.on { border-color: #1B6644; }
.spk-d.out { background: #F7E7C3; color: #6B4A00; }
.spk-d.err { background: #FBE0DA; color: #8E2414; }
.spk-d.warn { background: #F7E7C3; color: #7A4E00; }
.spk-allbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: #FFF4D6; color: #6B4A00; font-size: 16px; font-weight: 700; }
.spk-allbar .grow { flex: 1; min-width: 0; }
.spk-allbar button { flex: none; border: 0; padding: 4px 0; background: none; font: inherit; font-weight: 800; color: var(--primary); text-decoration: underline; cursor: pointer; }
.spk-more { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 18px; border: 2px dashed #CCC8BE; border-radius: 18px; background: transparent; font: inherit; font-size: 19px; font-weight: 800; color: var(--text); text-align: left; cursor: pointer; }
.spk-more span { font-size: 15px; font-weight: 700; color: #62686F; }
.spk-km small { display: block; font-size: 13px; font-weight: 700; color: #8A9098; }
