/* Notion-like: строгая типографика, тонкие линии, мягкие цветные метки.
   Мобильная версия (≤860px) — крупная, под палец, для работы в дороге. */
:root {
  --bg: #ffffff;
  --bg-side: #f7f7f5;
  --bg-hover: rgba(55, 53, 47, .06);
  --bg-active: rgba(55, 53, 47, .09);
  --text: #37352f;
  --text-2: rgba(55, 53, 47, .68);
  --text-3: rgba(55, 53, 47, .48);
  --line: #e9e9e7;
  --line-2: #dcdcd8;
  --accent: #2383e2;
  --accent-hover: #0b6bcb;
  --green: #3f8a5c;
  --danger: #e03e3e;
  --radius: 8px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 0px;
  --shadow: 0 0 0 1px rgba(15,15,15,.05), 0 3px 6px rgba(15,15,15,.1), 0 9px 24px rgba(15,15,15,.2);
  --t-gray: #f1f1ef;   --tc-gray: #787774;
  --t-brown: #f4eeee;  --tc-brown: #976d57;
  --t-orange: #fbecdd; --tc-orange: #cc782f;
  --t-yellow: #fbf3db; --tc-yellow: #b58630;
  --t-green: #edf3ec;  --tc-green: #4a7a5a;
  --t-blue: #e7f3f8;   --tc-blue: #3f739b;
  --t-purple: #f8f3fc; --tc-purple: #8a67ab;
  --t-red: #fdebec;    --tc-red: #c4554d;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { line-height: 1.5; -webkit-tap-highlight-color: transparent; }
body:has(.peek), body:has(.modal-bg), body:has(.sidebar.open) { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .86em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.only-m { display: none !important; }

/* ---------- layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; background: var(--bg-side); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 8px 6px 16px;
  display: flex; flex-direction: column;
}
.side-bg { display: none; }
.ws { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-weight: 600; }
.ws .logo { width: 24px; height: 24px; border-radius: 5px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 15px; }
.side-label { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 14px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px; min-height: 34px; border-radius: var(--radius);
  color: var(--text-2); text-decoration: none; cursor: pointer; user-select: none; border: 0; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--bg-active); color: var(--text); font-weight: 500; }
.nav-item .ico { width: 22px; text-align: center; flex: none; }
.nav-item .badge, .badge { margin-left: auto; font-size: 11px; background: var(--danger); color: #fff; border-radius: 10px; padding: 0 6px; font-style: normal; line-height: 18px; min-width: 18px; text-align: center; }
.side-foot { margin-top: auto; padding-top: 12px; }
.main { flex: 1; min-width: 0; }
.topbar { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5; }
.crumbs { color: var(--text-2); display: flex; gap: 6px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs b { color: var(--text); font-weight: 600; }
.live { margin-left: auto; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex: none; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #9b9a97; display: inline-block; }
.live.on i { background: #4dab9a; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 48px 80px; }
.page.wide { max-width: none; }
.page-icon { font-size: 52px; line-height: 1; margin-bottom: 6px; }
h1 { font-size: 32px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.lead { color: var(--text-2); margin: 0 0 18px; }
.btn.burger { display: none; }
.tabbar, .fab { display: none; }

/* ---------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: #fff; cursor: pointer; white-space: nowrap; text-decoration: none; font-size: 15px;
  transition: background .12s, transform .06s; user-select: none;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 9px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; font-weight: 500; }
.btn.green:hover { background: #35774e; }
.btn.big { height: 44px; font-size: 16px; font-weight: 500; }
.input, select.input, textarea.input {
  height: 34px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: #fff; outline: none; min-width: 0;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; width: 100%; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(35,131,226,.15); }
.input.cell { border-color: transparent; background: transparent; width: 100%; }
.input.cell:hover { background: var(--bg-hover); }
.input.cell:focus { background: #fff; border-color: var(--accent); }
.input.qty { width: 96px; text-align: right; }
select.input.cell { min-width: 64px; }
.t td.tight input.input.cell { min-width: 90px; }
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
label.field .input { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input, input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.datebar { display: flex; align-items: center; gap: 4px; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 12px; border: 0; background: none; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table.t { border-collapse: collapse; width: 100%; }
.t th { font-weight: 400; color: var(--text-2); text-align: left; font-size: 13.5px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th + th, .t td + td { border-left: 1px solid var(--line); }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #fafaf9; }
.t td.tight { padding: 2px 4px; }
.t tfoot td { font-weight: 600; border-bottom: 0; }
.t .sub { font-size: 12.5px; color: var(--text-3); }
.empty { padding: 40px 0; text-align: center; color: var(--text-3); }

/* tags */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; font-size: 13px; white-space: nowrap; background: var(--t-gray); color: var(--tc-gray); font-weight: 500; }
.tag.new { background: var(--t-blue); color: var(--tc-blue); }
.tag.assembled { background: var(--t-yellow); color: var(--tc-yellow); }
.tag.on_way { background: var(--t-orange); color: var(--tc-orange); }
.tag.delivered { background: var(--t-green); color: var(--tc-green); }
.tag.cancelled { background: var(--t-red); color: var(--tc-red); }
.tag.purple { background: var(--t-purple); color: var(--tc-purple); }
.tag.brown { background: var(--t-brown); color: var(--tc-brown); }
.tag.done { background: var(--t-green); color: var(--tc-green); }
.tag.draft { background: var(--t-yellow); color: var(--tc-yellow); }

/* callout */
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--t-gray); margin: 10px 0; }
.callout.blue { background: var(--t-blue); }
.callout.yellow { background: var(--t-yellow); }
.callout.red { background: var(--t-red); }
.callout .ci { font-size: 18px; line-height: 1.2; }

/* cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi .k { font-size: 13px; color: var(--text-2); }
.kpi .v { font-size: 22px; font-weight: 650; margin-top: 2px; }
.cards { display: grid; gap: 10px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.card.done { opacity: .6; }
.card.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stop-n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.stop-n.done { background: #9b9a97; }
.stop-n.se { background: var(--accent); }
.r-title { font-size: 1.12em; font-weight: 600; cursor: pointer; }
.r-addr { font-size: 1.05em; margin-top: 2px; }
.r-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.r-actions > .btn, .quick > .btn { min-width: 0; white-space: normal; line-height: 1.15; text-align: center; padding-left: 8px; padding-right: 8px; }
.r-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
details.pts > summary { cursor: pointer; color: var(--text-2); list-style: none; padding: 4px 0; user-select: none; }
details.pts > summary::-webkit-details-marker { display: none; }
details.pts > summary::before { content: "▸ "; }
details.pts[open] > summary::before { content: "▾ "; }
details.pts[open] > summary { margin-bottom: 8px; }

/* мобильные карточки списков */
.m-cards { display: grid; gap: 10px; }
.m-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; cursor: pointer; }
.m-card:active { background: #fafaf9; }
.m-card .mc-top { display: flex; align-items: flex-start; gap: 10px; }
.m-card .mc-name { font-weight: 600; font-size: 1.08em; flex: 1; min-width: 0; }
.m-card .mc-line { color: var(--text-2); margin-top: 3px; }
.m-card .mc-items { margin-top: 6px; font-size: .94em; }
.m-card .mc-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--text-3); font-size: .9em; }
.m-card .mc-sum { margin-left: auto; color: var(--text); font-weight: 650; font-size: 1.12em; }
.m-card input[type=checkbox] { width: 24px; height: 24px; flex: none; margin: 0; }
.m-total { display: flex; justify-content: space-between; padding: 12px 4px; font-weight: 600; }

/* side peek */
.peek-bg { position: fixed; inset: 0; background: rgba(15,15,15,.25); z-index: 20; animation: fade .15s; }
.peek {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(740px, 100vw); background: #fff; z-index: 21; box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slide .18s ease-out;
}
.peek-head { height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.peek-body { padding: 24px 36px 40px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.peek-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex: none; background: #fff; }
.props { display: grid; grid-template-columns: 150px 1fr; gap: 2px 8px; align-items: center; margin: 10px 0 18px; }
.props > .pk { color: var(--text-2); display: flex; gap: 6px; align-items: center; min-height: 34px; }
.props > .pv { min-height: 34px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.props .input { width: 100%; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* autocomplete */
.ac { position: relative; width: 100%; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); z-index: 30; max-height: 300px; overflow-y: auto; padding: 4px; }
.ac-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ac-item:hover, .ac-item.hl { background: var(--bg-hover); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,15,15,.35); z-index: 40; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow); width: min(540px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px 22px; }
.modal h3 { margin-top: 0; }
.m-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* toast */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #2f2f2f; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14.5px; animation: fade .15s; text-align: center; }
.toast.err { background: var(--danger); }

/* history */
.hist { border-left: 2px solid var(--line); margin-left: 4px; padding-left: 14px; }
.hist .h { position: relative; padding: 4px 0; font-size: 14px; }
.hist .h::before { content: ""; position: absolute; left: -19px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.who { font-weight: 500; }

/* bars */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bars .b { flex: 1; max-width: 48px; background: #a7c4e0; border-radius: 3px 3px 0 0; min-width: 4px; position: relative; }
.bars .b:hover { background: var(--accent); }
.bar-inline { height: 6px; background: var(--t-blue); border-radius: 3px; overflow: hidden; }
.bar-inline > i { display: block; height: 100%; background: #6fa3d6; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg-side); padding: 16px; }
.login-box { width: min(380px, 100%); background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 28px; }

.msg-bubble { white-space: pre-wrap; background: var(--bg-side); border-radius: 8px; padding: 10px 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 16px; border: 1px solid var(--line-2); font-size: 14px; cursor: pointer; background: #fff; white-space: nowrap; }
.chip:hover { background: var(--bg-hover); }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
kbd { font-family: inherit; font-size: 12px; padding: 0 4px; border: 1px solid var(--line-2); border-radius: 3px; }

/* =====================================================================
   ТЕЛЕФОН — всё крупно, под большой палец
   ===================================================================== */
@media (max-width: 860px) {
  :root { font-size: 17px; --radius: 12px; --tabbar-h: 66px; }
  .only-m { display: revert !important; }
  div.only-m { display: block !important; }
  .m-cards.only-m { display: grid !important; }
  .only-d, .hide-m { display: none !important; }

  /* шапка */
  .topbar { height: calc(56px + var(--safe-t)); padding: var(--safe-t) 10px 0; border-bottom: 1px solid var(--line); }
  .crumbs { font-size: 18px; }
  .crumbs > span:first-child { display: none; }
  .btn.burger { display: inline-flex; width: 46px; height: 46px; font-size: 22px; padding: 0; }
  .live { font-size: 0; gap: 0; }
  .live i { width: 11px; height: 11px; }

  /* боковое меню — выезжает слева */
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow); width: min(320px, 86vw); height: 100%; padding: calc(10px + var(--safe-t)) 8px calc(16px + var(--safe-b)); }
  .sidebar.open { transform: none; }
  .side-bg { display: block; position: fixed; inset: 0; background: rgba(15,15,15,.35); z-index: 49; animation: fade .15s; }
  .nav-item { min-height: 52px; font-size: 18px; padding: 8px 14px; }
  .nav-item .ico { width: 28px; font-size: 20px; }
  .ws { font-size: 18px; padding: 8px 10px; }
  .side-label { font-size: 13px; padding: 16px 14px 6px; }

  /* нижняя панель навигации */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  }
  .tb { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); cursor: pointer; padding: 6px 2px; min-width: 0; }
  .tb .ti { font-size: 25px; line-height: 1; position: relative; filter: grayscale(1); opacity: .7; }
  .tb .tl { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
  .tb.active { color: var(--accent); }
  .tb.active .ti { filter: none; opacity: 1; }
  .tb .badge { position: absolute; top: -4px; right: -12px; font-size: 11px; }
  .main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); overflow-x: clip; }

  /* кнопка «+» */
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 14;
    width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 34px; line-height: 1;
    box-shadow: 0 6px 18px rgba(35,131,226,.45); cursor: pointer; }
  .fab:active { transform: scale(.95); }

  /* страница */
  .page { padding: 14px 14px 100px; }
  .page-icon { display: none; }
  h1 { font-size: 27px; margin-bottom: 2px; }
  h2 { font-size: 21px; margin-top: 26px; }
  h3 { font-size: 19px; margin-top: 24px; }
  .lead { font-size: 15px; margin-bottom: 12px; }
  .small { font-size: 15px; }
  .t .sub { font-size: 14px; }

  /* кнопки и поля — минимум 48px под палец */
  .btn { height: 50px; padding: 0 16px; font-size: 17px; border-radius: 12px; }
  .btn.sm { height: 46px; padding: 0 14px; font-size: 16px; }
  .btn.big { height: 58px; font-size: 18px; border-radius: 14px; }
  .btn.ghost.sm { min-width: 46px; }
  .input, select.input { height: 52px; font-size: 17px; padding: 0 14px; border-radius: 12px; }
  textarea.input { font-size: 17px; padding: 12px 14px; }
  .input.qty { width: 130px; }
  .input.cell { border-color: var(--line-2); background: #fff; }
  input[type=checkbox], .check input { width: 26px; height: 26px; }
  .check { min-height: 48px; font-size: 17px; }
  label.field > span { font-size: 15px; }
  .chip { padding: 10px 16px; font-size: 16px; border-radius: 24px; }
  .tag { height: 26px; font-size: 14.5px; padding: 0 9px; border-radius: 6px; }
  .tabs { margin: 0 -14px 12px; padding: 0 8px; }
  .tab { padding: 13px 14px; font-size: 17px; }

  .toolbar { gap: 10px; }
  .toolbar > .input, .toolbar > select.input, .toolbar > .datebar { flex: 1 1 100%; width: 100% !important; }
  .toolbar > .row { flex-wrap: wrap; }
  .datebar { gap: 6px; }
  .datebar .input { flex: 1; min-width: 0; }
  .datebar .btn { flex: none; width: 52px; padding: 0; font-size: 26px; border-color: var(--line-2); background: #fff; color: var(--text); }
  .datebar .btn.txt { width: auto; padding: 0 14px; font-size: 16px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }

  /* таблицы: прокрутка и крупные ячейки */
  .t th { font-size: 14px; padding: 10px 8px; }
  .t td { padding: 11px 8px; }
  .t td.tight { padding: 4px; }

  /* таблицы-карточки: каждая строка — отдельная карточка */
  .table-wrap:has(> .t.stack) { border-top: 0; overflow: visible; }
  .t.stack, .t.stack tbody, .t.stack tfoot { display: block; }
  .t.stack thead { display: none; }
  .t.stack tbody tr { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; margin-bottom: 10px; background: #fff; }
  .t.stack tbody td, .t.stack tbody td.tight { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0 !important; padding: 6px 0; text-align: right; min-height: 40px; }
  .t.stack tbody td::before { content: attr(data-label); color: var(--text-2); text-align: left; font-size: 15px; flex: none; }
  .t.stack tbody td.title { font-weight: 600; font-size: 1.05em; text-align: left; justify-content: flex-start; padding-top: 8px; }
  .t.stack tbody td.title::before, .t.stack tbody td:not([data-label])::before { content: none; }
  .t.stack tbody td.title .input, .t.stack tbody td.title select { width: 100%; }
  .t.stack tbody td > .row { justify-content: flex-end; }
  .t.stack tfoot tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px; font-size: 1.1em; }
  .t.stack tfoot td { display: block; border: 0 !important; padding: 0; }
  .t.stack tfoot td:empty { display: none; }
  .t.stack tfoot td.full { flex: 1 1 100%; }
  .t.stack tfoot td.full .row > * { flex: 1; }
  .t.stack tfoot td:last-child, .t.stack tfoot td.sum { margin-left: auto; }
  .t.stack tr.click:hover td { background: none; }

  /* маршрут */
  .card { padding: 14px; border-radius: 16px; }
  .stop-n { width: 38px; height: 38px; font-size: 17px; }
  .r-title { font-size: 1.2em; }
  .r-addr { font-size: 1.08em; }
  .r-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .r-actions .btn { height: 58px; font-size: 17px; border-radius: 14px; }
  .r-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .r-more .btn { min-width: 0; padding: 0 8px; }
  .route-card { margin-left: -2px; margin-right: -2px; }

  /* карточка заказа на весь экран */
  .peek { width: 100vw; animation: up .2s ease-out; box-shadow: none; }
  .peek-head { height: calc(58px + var(--safe-t)); padding: var(--safe-t) 8px 0; }
  .peek-head .btn { font-size: 17px; }
  .peek-head .faint { display: none; }
  .peek-body { padding: 16px 14px 32px; }
  .peek-body h1 { font-size: 26px !important; }
  .peek-foot { padding: 10px 14px calc(10px + var(--safe-b)); }
  .peek-foot .btn { flex: 1; height: 56px; font-size: 18px; }
  .props { grid-template-columns: 1fr; gap: 0; margin: 8px 0 14px; }
  .props > .pk { min-height: 0; font-size: 14px; margin-top: 12px; }
  .props > .pv { min-height: 0; font-size: 17px; }
  .quick { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick .btn { height: 58px; font-size: 17px; }
  .status-row .btn { flex: 1 1 calc(50% - 6px); }
  .ship-row { gap: 10px; }
  .ship-row > select.input { flex: 1; }
  .ship-row > .grow { display: none; }
  .ship-row > .btn.green { flex: 1 1 100%; height: 60px; font-size: 18px; border-radius: 14px; }
  .client-new { grid-template-columns: 1fr; }

  /* модальное окно — снизу, как шторка */
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 20px 16px calc(16px + var(--safe-b)); animation: up .2s ease-out; }
  .modal h3 { font-size: 20px; }
  .m-actions .btn { flex: 1 1 100%; height: 54px; }

  .toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); }
  .toast { font-size: 16px; padding: 12px 18px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 21px; }
  .hist .h { font-size: 15px; }
  .ac-item { padding: 12px; }
  .login-box { padding: 24px 20px; }
  .login-box .btn { height: 56px !important; font-size: 18px; }
}
