/* Кабинет клиента в дизайн-системе Разборки (ватман кабинета v4, «Окей» владельца 19.10).
   Токены и детали --ds-* / ds-* — из office-shared-ds.css (копия admin-st-ds.css админки; совпадение — t71).
   Здесь — только перекраска экранов кабинета поверх office.css / office-st-2.css: плоско, без рамок-коробок,
   таблица «из воздуха» на всю ширину, чипы как у админки. Телефон — html.office-phone (office-ds.js). */

body { background: var(--ds-bg); color: var(--ds-ink); font: 14px/1.4 var(--ds-font); }

/* ---------- шапка: бренд · разделы сегментом · клиент · События · Выйти ---------- */
.filters { background: var(--ds-bg); border-bottom: 1px solid var(--ds-line-2); padding: 10px 16px; gap: 10px 16px; }
.office-brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: 4px; }
.office-brand b { font-size: 15px; font-weight: 800; }
.office-brand span { font-size: 12px; color: var(--ds-muted); }
.filters-tabs .ds-seg > .filt { font-size: var(--ds-fs); font-weight: 600; letter-spacing: 0; color: var(--ds-ink); border-radius: 0; padding: 6px 11px; }
.filters-tabs .ds-seg > .filt.is-on { color: #fff; background: var(--ds-ink); }
.filters-side .env-release { display: none !important; }
.filters-side .pill { background: none; color: var(--ds-muted); font-weight: 600; font-size: 13px; padding: 0; border: 0; }
.logout-btn { border: 0 !important; background: none !important; color: var(--ds-muted) !important; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 4px; box-shadow: none !important; }
.logout-btn:hover { color: var(--ds-ink) !important; text-decoration: underline; }
.events-btn, .events-btn.has-events {
  font: inherit; font-size: var(--ds-fs); font-weight: 700; border-radius: var(--ds-r); padding: 6px 12px;
  border: 1.5px solid var(--ds-line-2); background: #fff; color: var(--ds-ink); box-shadow: none; display: inline-flex; align-items: center; gap: 8px;
}
.events-btn:hover { background: var(--ds-hover); border-color: var(--ds-line-2); }
.events-btn .events-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--ds-yel); color: var(--ds-ink); font-size: 11.5px; font-weight: 800; margin: 0;
}

/* ---------- таблица «из воздуха» ---------- */
.table-wrap { padding: 6px 16px 40px; }
.cars-table { background: transparent; border: 0; border-radius: 0; font-size: var(--ds-fs); }
.cars-table thead th {
  text-align: left; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--ds-muted);
  background: transparent; border-bottom: 1px solid var(--ds-line-2); padding: 0 8px; height: 30px;
}
.cars-table thead th.th-photo .th-photo-ico, .cars-table thead th.th-photo .th-photo-ico svg { color: var(--ds-muted) !important; stroke: var(--ds-muted) !important; }
.cars-table tbody tr.car-row { background: transparent; }
.cars-table tbody tr.car-row td { border-bottom: 0; border-top: 1px solid var(--ds-line); padding: 7px 8px; text-align: left; }
.cars-table tbody tr.car-row:first-child td { border-top: 0; }
.cars-table tbody tr.car-row:hover { background: rgba(255, 255, 255, .7); }
.cars-table tbody tr.car-row.is-on { background: var(--ds-card); }
.cars-table .cell-date { color: #334155; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cars-table .cell-car { display: flex; gap: 10px; align-items: center; justify-content: flex-start; text-align: left; }
.cars-table .cell-car img, .cars-table .cell-car .car-ph { width: 58px; height: 40px; border-radius: 5px; object-fit: cover; flex: none; }
.cars-table .cell-title { font-weight: 700; font-size: 13px; }
.cars-table .cell-vin { font-family: var(--ds-mono); font-size: 11.5px; color: #475569; letter-spacing: .02em; }
.cars-table .cell-money .money { font-weight: 700; color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.cars-table .cell-meta, .cars-table .cell-code, .cars-table .cell-container { font-variant-numeric: tabular-nums; }
.cars-table .cell-code { font-weight: 800; }

/* ---------- чипы: статус (ds-st), площадка (ds-yard), значки ---------- */
.badge.ds-st { display: inline-block; font-size: var(--ds-fs-s); font-weight: 700; line-height: 1.35; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.badge.ds-st--onsite { background: var(--ds-s-onsite-bg); border-color: var(--ds-s-onsite-line); color: var(--ds-s-onsite-ink); }
.badge.ds-st--ready  { background: var(--ds-s-ready-bg);  border-color: var(--ds-s-ready-line);  color: var(--ds-s-ready-ink); }
.badge.ds-st--slot   { background: var(--ds-s-slot-bg);   border-color: var(--ds-s-slot-line);   color: var(--ds-s-slot-ink); }
.badge.ds-st--work   { background: var(--ds-s-work-bg);   border-color: var(--ds-s-work-line);   color: var(--ds-s-work-ink); }
.badge.ds-st--done   { background: var(--ds-s-done-bg);   border-color: var(--ds-s-done-line);   color: var(--ds-s-done-ink); }
.badge.ds-st--pack   { background: var(--ds-s-pack-bg);   border-color: var(--ds-s-pack-line);   color: var(--ds-s-pack-ink); }
.badge.ds-st--load   { background: var(--ds-s-load-bg);   border-color: var(--ds-s-load-line);   color: var(--ds-s-load-ink); }
.badge.ds-st--arch   { background: var(--ds-s-arch-bg);   border-color: var(--ds-s-arch-line);   color: var(--ds-s-arch-ink); }
.badge.ds-st--unpaid { background: var(--ds-s-unpaid-bg); border-color: var(--ds-s-unpaid-line); color: var(--ds-s-unpaid-ink); }
.badge.ds-st--wait   { background: var(--ds-s-wait-bg);   border-color: var(--ds-s-wait-line);   color: var(--ds-s-wait-ink); }
.badge.ds-st--transit { background: var(--ds-s-transit-bg); border-color: var(--ds-s-transit-line); color: var(--ds-s-transit-ink); }
.badge.nj, .badge.tx, .badge.nc { font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff; border: 0; border-radius: var(--ds-r-s); padding: 1px 6px; line-height: 1.45; }
.badge.nj { background: var(--ds-nj); }
.badge.tx { background: var(--ds-tx); }
.badge.nc { background: var(--ds-nc); }
.status-chips { align-items: flex-start; gap: 4px; }
.status-chip, .card-ico {
  height: 22px; min-width: 24px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--ds-line-2); box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ds-muted);
}
.status-chip svg, .card-ico svg { width: 13px; height: 13px; }
.status-chip.is-ok, .card-ico.is-ok { border-color: var(--ds-ok-line); color: var(--ds-ok); background: var(--ds-ok-soft); box-shadow: none; }
.status-chip.is-miss, .card-ico.is-miss { border-color: var(--ds-bad-line); color: var(--ds-bad); background: var(--ds-bad-soft); box-shadow: none; }
.card-ico.is-wait { border-color: var(--ds-warn-line); color: var(--ds-warn-ink); background: var(--ds-warn-soft); box-shadow: none; }
.card-ico.is-idle { border-color: var(--ds-line); color: var(--ds-faint); background: #fff; box-shadow: none; }

/* ---------- раскрытая машина под строкой — без коробки ---------- */
.cars-table tr.expand-row > td { background: var(--ds-card); border-top: 0; border-bottom: 1.5px solid var(--ds-line-2); padding: 4px 12px 22px; text-align: left; }
.car-head-title h2, .car-head-topline h2 { font-size: 19px; font-weight: 800; }
.vin-code { font-family: var(--ds-mono); }
.dc-map-btn { border: 1.5px solid var(--ds-line-2); background: #fff; border-radius: var(--ds-r); padding: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ds-ink); box-shadow: none; }
.dc-map-btn.is-review { border-color: #f59e0b; color: var(--ds-warn-ink); }
.dc-map-btn.is-ready, .dc-map-btn.is-accepted { border-color: var(--ds-ok); color: var(--ds-ok-ink); }
.dc-map-btn.is-open { background: var(--ds-ink); border-color: var(--ds-ink); color: #fff; }
.ledger { background: none; border: 0; box-shadow: none; gap: 6px 26px; padding: 2px 0 10px; }
.ledger .led { background: none; border: 0; padding: 0; text-align: left; align-items: flex-start; }
.ledger .led label { font-size: 11px; color: var(--ds-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.ledger .led b { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ds-ink); }
.ledger .led.total { background: none; }
.ledger .led.total b { font-size: 16px; color: var(--ds-ink); }
.stages { display: inline-flex; border: 1px solid var(--ds-line-2); border-radius: var(--ds-r); overflow: hidden; background: var(--ds-card); gap: 0; margin: 0 0 10px; }
.stages .stage { border: 0; border-radius: 0; background: var(--ds-card); padding: 6px 11px; font-size: var(--ds-fs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ds-ink); box-shadow: none; }
.stages .stage + .stage { border-left: 1px solid var(--ds-line-2); }
.stages .stage.is-on { background: var(--ds-ink); color: #fff; }
.stages .stage.is-empty:not(.is-on) { color: var(--ds-faint); }
.hero-wrap { border-radius: 8px; } /* фото не берёт --ds-r; 8px — как было до 20.10 */
.thumbs .thumb { border-radius: 6px; }
.thumbs .thumb.is-on { outline: 2px solid var(--ds-ink); outline-offset: 0; }

/* ---------- карта разбора (ватман склада, экраны 2 и 3) ---------- */
.dismantle-dock { background: var(--ds-card); border-top: 1px solid var(--ds-line-2); }
.dc-marks-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: var(--ds-mk-bg); border: 0; border-radius: 10px; padding: 7px 10px; margin-bottom: 12px; }
.dc-marks-row::before { content: "Маяки"; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ds-mk-ink); margin-right: 2px; }
.dc-for-assembly { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--ds-mk-line); color: #334155; display: inline-flex; gap: 6px; align-items: center; min-height: 0; box-shadow: none; }
.dc-for-assembly.is-on { background: var(--ds-s-work-bg); border-color: var(--ds-s-work-line); color: var(--ds-s-work-ink); }
.dc-for-assembly input { width: 14px; height: 14px; margin: 0; accent-color: #6b21a8; }
/* Тип упаковки контейнера (19.10): обязательный выбор клиента, один из трёх */
.dc-packing { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.dc-packing__lbl { font-weight: 600; color: #334155; margin-right: 2px; }
.dc-packing__btn { font: inherit; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--ds-mk-line); color: #334155; min-height: 0; box-shadow: none; cursor: pointer; }
.dc-packing__btn.is-on { background: var(--ds-s-work-bg); border-color: var(--ds-s-work-line); color: var(--ds-s-work-ink); }
.dc-packing__btn:disabled { cursor: default; opacity: .7; }
.dc-packing__need { color: #b45309; font-weight: 600; }
.dc-marks { display: contents; }
.dc-mark { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--ds-mk-line); color: #334155; }
.dc-mark b { font-weight: 800; }
.dc-mark.is-y b { color: var(--ds-ok-ink); }
.dc-mark.is-n b { color: var(--ds-bad-ink); }
.dc-mark.is-e, .dc-mark.is-e b { color: var(--ds-faint); }
.dc-groups { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0 28px; align-items: start; }
.dc-sec-nav { display: flex; flex-direction: column; gap: 2px; border: 0; background: none; padding: 0; }
.dc-sec { display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: none; border-radius: 6px; padding: 7px 10px; font-size: 13px; font-weight: 700; color: var(--ds-ink); box-shadow: none; min-height: 0; }
.dc-sec:hover { background: #f1f5f9; }
.dc-sec.is-on { background: var(--ds-ink); color: #fff; border: 0; }
.dc-sec .dc-sec-meta { font-weight: 600; color: var(--ds-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.dc-sec.is-on .dc-sec-meta { color: #cbd5e1; }
.dc-sec.is-done:not(.is-on) .dc-sec-meta { color: var(--ds-ok-ink); }
.dc-sec-work { border: 0; background: none; padding: 0; box-shadow: none; }
.dc-sec-work-head h4 { font-size: 15px; font-weight: 800; }
.dc-parts { columns: 2 300px; column-gap: 28px; display: block; }
.dc-part { display: flex; align-items: center; gap: 12px; padding: 5px 0; border: 0; border-bottom: 1px solid #f1f5f9; border-radius: 0; background: none; break-inside: avoid; font-size: 13.5px; min-height: 42px; box-shadow: none; }
.dc-part .dc-part-ru { flex: 1; min-width: 0; }
.dc-part.is-pending { background: #fefce8; }
.dc-part .ds-tg { order: 2; }
.dc-btn { font: inherit; font-size: 14px; font-weight: 800; border-radius: 10px; height: 40px; padding: 0 18px; border: 1.5px solid var(--ds-line-2); background: #fff; color: var(--ds-ink); box-shadow: none; }
.dc-btn.primary { border-color: var(--ds-ink); background: var(--ds-ink); color: #fff; }
.dc-submit-inline, .dc-btn.dc-submit-inline { border-color: var(--ds-ok-ink); background: var(--ds-ok-ink); color: #fff; }
.dc-reject-banner { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; background: var(--ds-bad-soft); color: #7f1d1d; border: 0; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.dc-stats { display: inline-flex; border: 1px solid var(--ds-line-2); border-radius: var(--ds-r); overflow: hidden; background: var(--ds-card); gap: 0; }
.dc-stats .dc-stat { border: 0; border-radius: 0; background: var(--ds-card); padding: 6px 10px; height: auto; font-size: 12.5px; font-weight: 600; color: var(--ds-ink); box-shadow: none; display: inline-flex; gap: 5px; align-items: center; }
.dc-stats .dc-stat + .dc-stat { border-left: 1px solid var(--ds-line-2); }
.dc-stats .dc-stat.is-on { background: var(--ds-ink); color: #fff; }
.dc-stats .dc-stat .dc-stat-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.dc-stats .dc-stat .dc-stat-ico svg { width: 13px; height: 13px; }

/* ---------- События и История — панель справа (как во «Дворе») ---------- */
dialog.events-dlg { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(420px, 100vw); max-width: 100vw; border: 0; border-left: 1px solid var(--ds-line-2); border-radius: 0; padding: 0; box-shadow: none; background: var(--ds-card); }
dialog.events-dlg::backdrop { background: rgba(15, 23, 42, .18); }
.events-dlg-inner { height: 100%; display: flex; flex-direction: column; border-radius: 0; box-shadow: none; }
.events-dlg-head { padding: 14px 16px; border-bottom: 1px solid var(--ds-line); background: var(--ds-card); }
.events-dlg-head h2 { font-size: 17px; font-weight: 700; }
.events-dlg-list { flex: 1; overflow: auto; padding: 6px 16px 16px; }
.events-sec-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ds-muted); margin: 14px 0 4px; }
.events-item { border: 0; border-bottom: 1px solid var(--ds-line); border-radius: 0; background: none; box-shadow: none; padding: 10px 0; }
.events-item-title { font-size: 13.5px; font-weight: 700; }
.events-item-meta { font-size: 11.5px; color: var(--ds-muted); }

/* ---------- Финансы: три числа без рамок, таблица «из воздуха» ---------- */
.finance-panel.is-tab-mode { background: var(--ds-bg); border-bottom: 0; }
.finance-ledger-bar { background: none; border: 0; box-shadow: none; padding: 10px 16px 2px; gap: 10px 40px; justify-content: flex-start; }
.finance-ledger-bar .finance-history-btn { order: 9; }
.fin-sum { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0; align-items: flex-start; text-align: left; }
.fin-sum__label { font-size: 11.5px; color: var(--ds-muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.fin-sum__val { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.finance-history-btn { font: inherit; font-size: var(--ds-fs); font-weight: 700; border-radius: var(--ds-r); padding: 7px 14px; border: 1.5px solid var(--ds-line-2); background: #fff; color: var(--ds-ink); box-shadow: none; margin-left: auto; }
.finance-table { background: transparent; border: 0; border-radius: 0; font-size: var(--ds-fs); box-shadow: none; }
.finance-table thead th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--ds-muted); border-bottom: 1px solid var(--ds-line-2); }
.finance-table tbody td { border-bottom: 0; border-top: 1px solid var(--ds-line); }
.finance-table tbody tr:first-child td { border-top: 0; }

/* «Установить кабинет» — только телефон */
html:not(.office-phone) .office-pwa-hint { display: none !important; }

/* поверх старых правил таблицы (office-st-2.css) */
.badge.nj { background: var(--ds-nj) !important; color: #fff !important; }
.badge.tx { background: var(--ds-tx) !important; color: #fff !important; }
.badge.nc { background: var(--ds-nc) !important; color: #fff !important; }
.cars-table .card-ico { width: 24px; height: 22px; min-width: 24px; border: 1px solid var(--ds-line-2); border-radius: 5px; background: #fff; color: var(--ds-muted); box-shadow: none; }
.cars-table .card-ico svg { width: 13px; height: 13px; }
.cars-table .card-ico.is-ok { border-color: var(--ds-ok-line); color: var(--ds-ok); background: var(--ds-ok-soft); }
.cars-table .card-ico.is-miss { border-color: var(--ds-bad-line); color: var(--ds-bad); background: var(--ds-bad-soft); }
.cars-table .card-ico.is-wait, .cars-table .card-ico.is-wait:hover { border-color: var(--ds-warn-line); color: var(--ds-warn-ink); background: var(--ds-warn-soft); box-shadow: none; }
.cars-table .card-ico.is-idle { border-color: var(--ds-line); color: var(--ds-faint); background: #fff; }
.cars-table .cell-date { color: #334155; font-size: var(--ds-fs); text-align: left; }
.cars-table th:nth-child(1), .cars-table td:nth-child(1) { width: 96px; text-align: left; }
.cars-table th:last-child, .cars-table td.cell-status { width: 190px; text-align: left; }
.cars-table .cell-money { text-align: right; }
.cars-table th.th-money { text-align: right; }
.cars-table .cell-meta { color: var(--ds-ink); font-size: var(--ds-fs); }

/* ===================== телефон (html.office-phone) ===================== */
.ophone-nav { display: none; }
html.office-phone .ophone-nav {
  display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ds-card); border-top: 1px solid var(--ds-line);
  padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
html.office-phone body.is-office-locked .ophone-nav { display: none; }
.ophone-nav button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; min-height: 56px; font: inherit; font-size: 10.5px; font-weight: 700; color: var(--ds-muted); cursor: pointer; }
.ophone-nav button svg { width: 22px; height: 22px; }
.ophone-nav button.is-on { color: var(--ds-ink); }
.ophone-nav button.is-on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2.5px; border-radius: 2px; background: var(--ds-ink); }
.ophone-nav__n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--ds-yel); color: var(--ds-ink); font-size: 10.5px; line-height: 17px; text-align: center; }
html.office-phone body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
html.office-phone .filters { flex-wrap: nowrap; padding: 10px 16px; }
html.office-phone .filters-tabs, html.office-phone #btnEvents { display: none !important; }
html.office-phone .filters-side { width: auto; margin-left: auto; }
html.office-phone body.otl-phone-on .table-wrap,
html.office-phone body.otl-phone-on .finance-panel,
html.office-phone body.otl-phone-on > .dismantle-dock { display: none !important; }

/* строки машин */
html.office-phone .table-wrap { padding: 0; }
html.office-phone .cars-table, html.office-phone .cars-table tbody { display: block; width: 100%; }
html.office-phone .cars-table thead { display: none; }
html.office-phone .cars-table tbody tr.oph-tr { display: block; }
html.office-phone .cars-table tbody tr.oph-tr td.oph-td { display: block; width: auto; padding: 0; border: 0; border-bottom: 1px solid var(--ds-line); text-align: left; white-space: normal; }
.oph-row { display: flex; gap: 12px; align-items: center; padding: 10px 16px; min-height: 68px; background: var(--ds-card); }
.oph-img { flex: none; position: relative; border: 0; padding: 0; background: none; line-height: 0; }
.oph-img img, .oph-img .car-ph { width: 64px; height: 46px; border-radius: 6px; object-fit: cover; display: block; background: var(--ds-line); }
.oph-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oph-ttl, .oph-tx .cell-title { font-size: 14px; font-weight: 700; line-height: 1.25; }
.oph-vin { font-family: var(--ds-mono); font-size: 11.5px; color: #475569; display: flex; align-items: center; gap: 5px; }
.oph-vin .vin-copy { width: 18px; height: 18px; padding: 0; border: 1px solid var(--ds-line-2); border-radius: 4px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ds-muted); }
.oph-vin .vin-copy svg { width: 11px; height: 11px; }
.oph-ln { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oph-idx { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 12.5px; background: #f1f5f9; border-radius: 4px; padding: 1px 5px; }
.oph-rt { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.oph-rt .money { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* открытая машина — свой экран с «назад» */
html.office-phone .cars-table tr.oph-screen {
  display: block; position: fixed; left: 0; right: 0; top: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  background: var(--ds-card); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
html.office-phone .cars-table tr.oph-screen > td { display: block; padding: 0 0 24px; border: 0; }
.oph-back { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; background: var(--ds-card); border-bottom: 1px solid var(--ds-line); }
.oph-back button { border: 0; background: none; color: #1d4ed8; font: inherit; font-size: 15px; font-weight: 700; min-height: 40px; padding: 0; cursor: pointer; white-space: nowrap; }
.oph-back b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.office-phone .cars-table tr.oph-screen #detailSlot { padding: 10px 16px 0; }
html.office-phone .ledger.ledger--over-hero { display: grid; grid-auto-flow: row; grid-template-columns: 1fr auto; grid-auto-columns: auto; gap: 6px 12px; margin: 0 0 12px; }
html.office-phone .ledger.ledger--over-hero .led { display: contents; }
html.office-phone .ledger.ledger--over-hero .led label { font-size: 14px; color: var(--ds-muted); letter-spacing: 0; margin: 0; }
html.office-phone .ledger.ledger--over-hero .led b { text-align: right; font-size: 14px; font-weight: 700; letter-spacing: 0; overflow: visible; }
html.office-phone .ledger.ledger--over-hero .led.total label, html.office-phone .ledger.ledger--over-hero .led.total b { font-size: 16px; font-weight: 800; color: var(--ds-ink); border-top: 1px solid var(--ds-line); padding-top: 6px; }
.oph-map { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--ds-line-2); background: #fff; padding: 8px 14px; margin: 0 0 12px; font: inherit; font-size: 15px; font-weight: 800; color: var(--ds-ink); cursor: pointer; }
.oph-map svg { width: 20px; height: 20px; }
.oph-map small { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.oph-map.is-miss { border-color: var(--ds-bad); } .oph-map.is-miss small { color: var(--ds-bad-ink); }
.oph-map.is-wait { border-color: #f59e0b; } .oph-map.is-wait small { color: var(--ds-warn-ink); }
.oph-map.is-ok { border-color: var(--ds-ok); } .oph-map.is-ok small { color: var(--ds-ok-ink); }
.oph-map.is-open { background: var(--ds-ink); border-color: var(--ds-ink); color: #fff; } .oph-map.is-open small { color: #cbd5e1; }
html.office-phone .stages { display: flex; width: 100%; }
html.office-phone .stages .stage { flex: 1; padding: 8px 6px; }

/* карта разбора на телефоне — под палец */
html.office-phone .dc-groups { display: block; }
html.office-phone .dc-acc-block { border-bottom: 1px solid var(--ds-line); }
html.office-phone .dc-acc-block .dc-sec { width: 100%; min-height: 48px; border-radius: 0; padding: 10px 4px; font-size: 14px; }
html.office-phone .dc-acc-block.is-open > .dc-sec { background: var(--ds-ink); color: #fff; border-radius: 8px; padding: 10px 12px; }
html.office-phone .dc-parts { columns: 1; }
html.office-phone .dc-part { min-height: 58px; font-size: 14px; }
html.office-phone .dc-part .ds-tg > button { width: 54px; height: 42px; font-size: 13px; }

/* События — на весь экран телефона */
html.office-phone dialog.events-dlg { width: 100vw; border-left: 0; }
.dc-part.is-yes, .dc-part.is-no, .dc-part.is-yes:hover, .dc-part.is-no:hover { background: none !important; box-shadow: none !important; }
.dc-part.is-pending { background: #fefce8 !important; }
.dc-pend-q { display: inline-flex; align-items: center; justify-content: center; width: 22px; font-weight: 800; color: var(--ds-yel-ink); }
.dc-note-add { border: 0; background: none; color: var(--ds-faint); font-size: 11.5px; font-weight: 600; padding: 0 4px; }
.dc-stats .dc-stat { flex-direction: row; white-space: nowrap; }
.dc-sec { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 2px; }
.dc-map-btn.is-open, .dc-map-btn.is-open * { color: #fff !important; }
.dc-sec.is-done:not(.is-on) { background: none; }
.dc-sec.is-done:not(.is-on):hover { background: #f1f5f9; }
.dc-sec.is-gated:not(.is-on) { color: var(--ds-faint); background: none; }
.dc-reject-banner .dc-btn { height: 34px; font-size: 13px; padding: 0 14px; }

/* События — строки «из воздуха», кнопки дизайн-системы */
.events-dlg .events-item, .events-dlg .events-item:hover { background: none !important; border: 0 !important; border-bottom: 1px solid var(--ds-line) !important; border-radius: 0 !important; box-shadow: none !important; padding: 10px 0 !important; }
.events-dlg .btn { font: inherit; font-size: var(--ds-fs); font-weight: 700; border-radius: var(--ds-r); padding: 6px 12px; border: 1.5px solid var(--ds-line-2); background: #fff; color: var(--ds-ink); box-shadow: none; }
.events-dlg .btn:hover { background: var(--ds-hover); }
.events-dlg .btn[data-ans="yes"] { border: 0; background: var(--ds-ok); color: #fff; }
.events-dlg .btn[data-ans="no"] { border: 0; background: var(--ds-bad); color: #fff; }
html.office-phone .cars-table tr.oph-screen > td { width: auto !important; max-width: none; }
html.office-phone .oph-rt .money { color: var(--ds-ink); }
.oph-pad { padding: 12px 16px 0; }
html.office-phone .dc-map-chips-bar { display: flex; gap: 8px; align-items: center; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
html.office-phone .dc-map-chips-bar::-webkit-scrollbar { display: none; }
.dc-stats .dc-stat, .dc-stats { flex: none; }
html.office-phone .dc-part .dc-part-ru { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
html.office-phone .dc-part .dc-note-add { font-size: 0; padding: 0 2px; }
html.office-phone .dc-part .dc-note-add::before { content: "+"; font-size: 15px; font-weight: 700; color: var(--ds-faint); }
/* прогон по красоте 26.10: узкие столбцы таблицы машин — заголовок и значение на одной оси (было: заголовок по центру, значение влево) */
html:not(.office-phone) .cars-table td.cell-lot, html:not(.office-phone) .cars-table td.cell-yard, html:not(.office-phone) .cars-table td.cell-code,
html:not(.office-phone) .cars-table td.cell-container, html:not(.office-phone) .cars-table td.cell-money,
html:not(.office-phone) .cars-table td.cell-meta, html:not(.office-phone) .cars-table td.cell-dc { text-align: center; }
html:not(.office-phone) .cars-table th.th-money { text-align: center; }
