/* Elite Rental admin — «Ночная диспетчерская».
   A near-black desk lit by one cold blue for data and selection, gold only for what waits for an answer,
   white pills for the one action that matters, the fleet's own cut-outs standing in pools of light. */

@font-face { font-family: "TikTok Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/tiktok-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "TikTok Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/tiktok-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "TikTok Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/tiktok-sans-baht.woff2") format("woff2"); unicode-range: U+0E3F, U+2192, U+2212; }

:root {
  color-scheme: dark;
  --bg: #09090a;
  --surface: #121214;
  --surface-2: #19191c;
  --surface-3: #222226;
  --line: #222226;
  --line-2: #2f2f35;
  --ink: #f4f4f6;
  --ink-2: #b6b6be;
  --ink-3: #8a8a94;
  --blue: #3e73ff;
  --blue-ink: #92b1ff;
  --blue-wash: rgba(62, 115, 255, .14);
  --navy: #0b1533;
  --gold: #f2c14e;
  --gold-ink: #f6d27a;
  --gold-wash: rgba(242, 193, 78, .12);
  --danger: #ff7b6e;
  --danger-wash: rgba(255, 123, 110, .11);
  --pill-bg: #f4f4f6;
  --pill-ink: #0a0a0b;
  --r-xl: 20px; --r-lg: 16px; --r-md: 12px; --r-sm: 10px;
  --rail: 76px; --top: 64px;
  --pad: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: "TikTok Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none; text-rendering: optimizeLegibility;
  accent-color: var(--blue); caret-color: var(--blue-ink);
  scrollbar-color: #34343a transparent;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
::selection { background: rgba(62, 115, 255, .42); color: #fff; }
a { color: inherit; text-decoration-color: rgba(244, 244, 246, .32); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.6rem; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 1.3rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.0667rem; line-height: 1.3; font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: .8667rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; height: auto; }

/* ---------- shell: rail + top bar ---------- */
body.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: var(--top) 1fr; }
.rail { grid-row: 1 / -1; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: center;
  border-right: 1px solid var(--line); background: var(--bg); z-index: 30; }
.logo { display: grid; place-items: center; width: 100%; height: var(--top); border-bottom: 1px solid var(--line); }
.logo img { width: 46px; height: 30px; object-fit: cover; border-radius: 9px; display: block; }
.rail-nav { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.rail-nav a, .rail-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--ink-3);
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; transition: background .18s, color .18s; }
.rail-nav a:hover, .rail-btn:hover { color: var(--ink); background: var(--surface-2); }
.rail-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.rail-nav a span, .rail-btn span { position: absolute; left: calc(100% + 12px); top: 50%; translate: 0 -50%; padding: 6px 10px; border-radius: 8px; font-size: .8667rem;
  white-space: nowrap; background: var(--surface-3); color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none;
  transition: opacity .15s; }
.rail-nav a:hover span, .rail-nav a:focus-visible span, .rail-btn:hover span, .rail-btn:focus-visible span { opacity: 1; }
.rail-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px 0 16px; }
.rail-foot form { margin: 0; }
.rail-foot a[aria-current="page"] { color: var(--ink); background: var(--surface-3); }

.top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 0 var(--pad); height: var(--top);
  background: rgba(9, 9, 10, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 1.0667rem; margin-right: auto; }
.crumb a { text-decoration: none; color: var(--ink-3); }
.crumb a:hover { color: var(--ink); }
.crumb .i { width: 16px; height: 16px; color: var(--ink-3); }
.crumb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search { position: relative; flex: 0 1 420px; display: flex; align-items: center; height: 42px; padding: 0 6px 0 14px; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; transition: border-color .18s, box-shadow .18s; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(62, 115, 255, .2); }
.search > .i { color: var(--ink-3); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0; color: var(--ink); font: inherit; font-size: .9333rem; outline: none; box-shadow: none; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.search kbd { display: grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--line-2);
  color: var(--ink-2); font: 600 .8rem/1 inherit; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; }
.search-pop:empty { display: none; }
.pop { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 8px; box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }
.pop h4 { margin: 6px 10px 4px; font-size: .7333rem; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
.pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.pop a:hover, .pop a:focus-visible { background: var(--surface-3); outline: none; }
.pop a img { width: 48px; height: 24px; object-fit: contain; }
.pop a small { color: var(--ink-3); margin-left: auto; }
.pop p { padding: 10px; color: var(--ink-3); font-size: .8667rem; }

.top-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); text-decoration: none; white-space: nowrap; font-size: .9333rem; }
a.top-pill:hover { background: var(--surface-2); }
.top-pill .i { width: 18px; height: 18px; }
.bell .count { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--gold); color: #1a1405; font-weight: 700; font-size: .8rem; }
.datepill { padding: 0 4px; gap: 2px; }
.datepill > a, .datepill > span { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.datepill a { width: 32px; height: 32px; border-radius: 10px; color: var(--ink-2); }
.datepill a:hover { background: var(--surface-3); color: var(--ink); }
.datepill > span { padding: 0 6px; font-weight: 500; }

.me { position: relative; }
.me summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 14px; }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover { background: var(--surface); }
.me summary > .i { width: 16px; height: 16px; color: var(--ink-3); }
.me-name { display: grid; line-height: 1.2; }
.me-name b { font-weight: 600; font-size: .9333rem; }
.me-name small { color: var(--ink-3); font-size: .8rem; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 40; }
.me-menu a, .me-menu button { width: 100%; justify-content: flex-start; }
.me-menu form { margin: 0; }
.me-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.me-menu button:hover { background: var(--surface-3); }

.ava { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
  color: #e9edf6; background: #2a3550; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ava.t1 { background: #33304a; } .ava.t2 { background: #2b3f3b; } .ava.t3 { background: #3d3530; }
.ava.sm { width: 28px; height: 28px; font-size: .7rem; }

main { grid-column: 2; min-width: 0; padding: var(--pad); }
body.bare main { padding: 0; }

/* ---------- type of sections ---------- */
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head p { color: var(--ink-3); margin-top: 4px; font-size: .9333rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--ink-3); margin-top: 6px; }
.page-head .actions { margin: 0; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; font-size: .9333rem; margin-bottom: 10px; }
.backlink:hover { color: var(--ink); }
.backlink .i { width: 16px; height: 16px; }
.title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- surfaces ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { color: var(--ink-3); font-size: .8667rem; margin-top: 2px; }
.card > :last-child { margin-bottom: 0; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack > .card + .card { margin-top: 0; }

/* ---------- controls ---------- */
.btn, button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--pill-bg); background: var(--pill-bg); color: var(--pill-ink); font-weight: 600; font-size: .9333rem; text-decoration: none;
  white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease); }
.btn:hover { background: #dcdce2; border-color: #dcdce2; }
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #3b3b42; }
.btn.ghost:hover { background: var(--surface-3); border-color: #4a4a52; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-3); padding: 0 6px; }
.btn.quiet:hover { color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(255, 123, 110, .45); }
.btn.danger:hover { background: var(--danger-wash); }
.btn.sm { height: 32px; padding: 0 14px; font-size: .8667rem; }
.btn.icon { width: 36px; height: 36px; padding: 0; background: var(--surface-3); border-color: var(--line-2); color: var(--ink); }
.btn.icon:hover { background: #2c2c31; }
.btn.icon.light { background: var(--pill-bg); border-color: var(--pill-bg); color: var(--pill-ink); }
.btn.icon .i { width: 16px; height: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.htmx-request .btn, .btn.htmx-request { opacity: .6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.actions form { margin: 0; }

label { display: block; font-size: .8667rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
input, select, textarea { font: inherit; font-size: 1rem; width: 100%; height: 44px; padding: 0 14px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--r-md); transition: border-color .18s, box-shadow .18s, background .18s; }
textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #6f6f78; }
input:hover, select:hover, textarea:hover { border-color: #3d3d44; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(62, 115, 255, .2); background: #1b1d24; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
input[type="date"], input[type="time"] { padding-right: 10px; }
::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; padding: 0; border-radius: 6px; flex: none; }
.field { margin-bottom: 14px; min-width: 0; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--danger); }
.field .msg { color: var(--danger); font-size: .8667rem; margin-top: 6px; }
.field .hint { color: var(--ink-3); font-size: .8rem; margin-top: 6px; }
.grid2, .grid3, .grid4 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) { .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.check { display: flex; gap: 12px; align-items: center; color: var(--ink); font-size: .9333rem; margin: 4px 0 0; cursor: pointer; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; background: var(--danger-wash);
  color: #ffc2bb; border: 1px solid rgba(255, 123, 110, .25); }
.alert.ok { background: var(--blue-wash); color: #d3e0ff; border-color: rgba(62, 115, 255, .3); }
.alert .i { margin-top: 1px; }

/* segmented control, from the reference's 24h / Week / Month */
fieldset.plain { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.seg { position: relative; display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); }
.seg a, .seg label { display: grid; place-items: center; height: 38px; margin: 0; border-radius: 12px; color: var(--ink-3); text-decoration: none; font-size: .9333rem;
  font-weight: 500; cursor: pointer; transition: background .18s, color .18s; white-space: nowrap; padding: 0 10px; }
.seg a:hover, .seg label:hover { color: var(--ink); }
.seg a[aria-current="true"], .seg input:checked + label { color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1px #393940, 0 6px 14px rgba(0, 0, 0, .35); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + label { outline: 2px solid var(--blue-ink); outline-offset: 2px; }

/* status pills */
.st { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.new { background: var(--gold-wash); color: var(--gold-ink); }
.st.confirmed { background: var(--blue-wash); color: var(--blue-ink); }
.st.active { background: rgba(255, 255, 255, .1); color: var(--ink); }
.st.done { color: var(--ink-3); }
.st.cancelled { background: var(--danger-wash); color: #ffaaa1; }
.st.site::before, .st.hidden::before, .st.service::before { display: none; }
.st .i { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2);
  font-size: .8667rem; border: 1px solid var(--line-2); }
.chip .i { width: 15px; height: 15px; }

/* ---------- tables (the reference's «Popular Campaigns») ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .9333rem; }
.tbl th { text-align: left; font-weight: 500; font-size: .8rem; color: var(--ink-3); padding: 0 12px 2px; white-space: nowrap; }
.tbl td { padding: 10px 12px; background: var(--surface-2); vertical-align: middle; border-top: 1px solid transparent; border-bottom: 1px solid transparent; }
.tbl td:first-child { border-radius: 14px 0 0 14px; }
.tbl td:last-child { border-radius: 0 14px 14px 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: #1e1e22; }
.tbl .no { color: var(--ink-3); width: 1%; }
.tbl .no a { text-decoration: none; color: inherit; }
.tbl .no a:hover { color: var(--ink); }
.tbl .act { text-align: right; width: 1%; }
.tbl .act form { margin: 0; }
.tbl .sub { display: block; color: var(--ink-3); font-size: .8rem; }
.car-cell { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.car-cell img, .car-cell .noimg { width: 56px; height: 28px; object-fit: contain; flex: none; }
.car-cell .noimg { display: grid; place-items: center; color: #4a4a52; }
.car-cell b { font-weight: 600; white-space: nowrap; }
.car-cell > span { min-width: 0; }
.car-cell .sub { display: block; color: var(--ink-3); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.car-cell:hover b { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(244, 244, 246, .4); }
.who { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.paid small { color: var(--ink-3); }
.empty { display: grid; justify-items: start; gap: 8px; padding: 22px 4px 6px; color: var(--ink-3); }
.empty b { color: var(--ink); font-weight: 600; font-size: 1rem; }
.empty .btn { margin-top: 8px; }
.pager-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--ink-3); font-size: .8667rem; }

/* ---------- «Сводка» ---------- */
.dash { display: grid; gap: 28px; }
.dash > section { min-width: 0; }

/* money chart */
.chart-card { background: linear-gradient(180deg, #131317 0%, #10141f 62%, #0e1426 100%); border-color: #1f2638; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hint { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3); cursor: help; }
.hint:hover, .hint:focus-visible { color: var(--ink); }
.hint .i { width: 18px; height: 18px; }
.hint [role="tooltip"] { position: absolute; right: -6px; top: calc(100% + 8px); width: 260px; padding: 10px 12px; border-radius: 12px; z-index: 10;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink-2); font-size: .8rem; line-height: 1.45; box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  opacity: 0; translate: 0 -4px; pointer-events: none; transition: opacity .16s, translate .16s; }
.hint:hover [role="tooltip"], .hint:focus-visible [role="tooltip"] { opacity: 1; translate: 0 0; }
.chart-stats { display: grid; gap: 6px; margin: 14px 0 16px; font-size: .8667rem; }
.chart-stats div { display: flex; justify-content: space-between; gap: 12px; }
.chart-stats dt { color: var(--ink-3); }
.chart-stats dd { margin: 0; color: var(--ink); text-align: right; }
.chart-stats .up { color: var(--blue-ink); }
.chart-stats .down { color: #ffaaa1; }

.chart { position: relative; height: 190px; margin: 22px 0 10px;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 100% 25%, calc(100% / 6) 100%; background-position: 0 0, 0 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.25; stroke-linejoin: round; filter: drop-shadow(0 4px 10px rgba(62, 115, 255, .45)); }
.chart .area { opacity: .95; }
.chart-empty { position: absolute; inset: auto 0 34% 0; text-align: center; color: var(--ink-3); font-size: .8667rem; padding: 0 16px; }
.pts { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.pts li { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); translate: -50% 0; outline: none; }
.pts li::before { content: ""; position: absolute; left: 50%; top: var(--y); bottom: 0; border-left: 1px dashed rgba(146, 177, 255, .5); opacity: 0; transition: opacity .15s; }
.pts .dot { position: absolute; left: 50%; top: var(--y); width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; background: #fff; border: 3px solid var(--blue);
  box-shadow: 0 0 0 4px rgba(62, 115, 255, .22); opacity: 0; transition: opacity .15s; }
.pts .tip { position: absolute; left: 50%; top: var(--y); translate: -50% calc(-100% - 14px); display: grid; gap: 2px; min-width: 112px; padding: 9px 12px; border-radius: 12px;
  background: rgba(26, 33, 55, .94); border: 1px solid rgba(146, 177, 255, .22); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-size: .8rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 2; }
.pts .tip b { font-weight: 500; color: var(--ink-2); }
.pts .tip span { font-weight: 700; font-size: .9333rem; font-variant-numeric: tabular-nums; }
.pts .tip small { color: var(--ink-3); font-size: .7333rem; }
.pts li.edge-l .tip { translate: -16% calc(-100% - 14px); }
.pts li.edge-r .tip { translate: -84% calc(-100% - 14px); }
.pts li.below .tip { translate: -50% 16px; }
.pts li.below.edge-l .tip { translate: -16% 16px; }
.pts li.below.edge-r .tip { translate: -92% 16px; }
.pts li:hover::before, .pts li:focus-visible::before, .pts li.cur::before { opacity: 1; }
.pts li:hover .dot, .pts li:hover .tip, .pts li:focus-visible .dot, .pts li:focus-visible .tip, .pts li.cur .dot, .pts li.cur .tip { opacity: 1; }
.pts:hover li.cur:not(:hover)::before, .pts:hover li.cur:not(:hover) .dot, .pts:hover li.cur:not(:hover) .tip,
.pts:focus-within li.cur:not(:focus-visible)::before, .pts:focus-within li.cur:not(:focus-visible) .dot, .pts:focus-within li.cur:not(:focus-visible) .tip { opacity: 0; }
.ticks { position: relative; height: 18px; font-size: .8rem; color: var(--ink-3); }
.ticks span { position: absolute; left: var(--x); translate: -50% 0; white-space: nowrap; }
.ticks span:first-child { translate: 0 0; }
.ticks span:last-child { translate: -100% 0; }
.chart-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.chart-foot p:last-child { text-align: right; }
.big { font-size: clamp(2.2rem, 1.6rem + 1.6vw, 2.9rem); line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big .of { color: var(--ink-3); font-weight: 500; font-size: .5em; letter-spacing: -.01em; margin-left: .2em; }
.big .unit { color: var(--blue); font-weight: 500; margin-right: .08em; }

/* top cars carousel */
.top-cars { margin-top: 26px; }
.top-cars .sec-head { align-items: center; margin-bottom: 12px; }
.pager { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .8667rem; }
.pager [data-count] { margin-right: 6px; font-variant-numeric: tabular-nums; }
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 6px); gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.tc-list::-webkit-scrollbar { display: none; }
.tc { position: relative; scroll-snap-align: start; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-height: 208px; overflow: hidden; }
.tc > a { display: grid; align-content: start; gap: 4px; height: 100%; padding: 14px 14px 12px; text-decoration: none; }
.tc-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9333rem; padding-right: 26px; }
.tc-name i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.tc-money { font-weight: 700; font-size: 1.0667rem; margin-top: 6px; }
.tc-meta { color: var(--ink-3); font-size: .8rem; }
.tc img { position: absolute; right: 8px; bottom: 8px; width: 62%; height: auto; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); transition: transform .4s var(--ease); }
.tc:hover img { transform: translateX(-6px); }
.tc-more { position: absolute; top: 10px; right: 10px; z-index: 2; }
.tc-add { position: absolute; left: 12px; bottom: 12px; z-index: 2; width: 32px; height: 32px; }

/* today */
.today-card { display: grid; gap: 14px; }
.fleet-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fleet-side { display: grid; justify-items: end; gap: 4px; text-align: right; font-size: .8667rem; color: var(--ink-3); }
.fleet-side b { color: var(--ink); font-weight: 600; }
.fleet-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8667rem; color: var(--ink-3); }
.fleet-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fleet-meta a { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.fleet-meta a:hover { color: var(--ink); }
.fleet-meta .i { width: 14px; height: 14px; }

.stage { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-lg); min-height: 268px; padding: 18px 18px 0;
  display: grid; grid-template-rows: auto auto auto 1fr auto; align-content: start; border: 1px solid #1d2a52;
  background:
    radial-gradient(52% 34% at 58% 80%, rgba(120, 160, 255, .38), transparent 70%),
    radial-gradient(90% 70% at 50% 100%, #1a3483 0%, rgba(17, 33, 85, .7) 42%, transparent 75%),
    linear-gradient(180deg, #0d1736 0%, #0a1230 60%, #0b1638 100%); }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(190, 210, 255, .5) .6px, transparent .8px); background-size: 22px 22px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%); }
.stage-k { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .8667rem; color: #c9d6ff; text-align: center; }
.stage-k .late { color: #ffb4aa; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-ink); box-shadow: 0 0 0 0 rgba(146, 177, 255, .6); animation: pulse 2.4s var(--ease) infinite; flex: none; }
.pulse.idle { animation: none; background: #6f7fa8; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(146, 177, 255, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(146, 177, 255, 0); } }
.stage-t { margin-top: 6px; text-align: center; font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.stage-t a { text-decoration: none; }
.stage-t a:hover { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); }
.stage-s { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 4px; text-align: center; color: #9fb0db; font-size: .8667rem; }
.stage-s .i { width: 14px; height: 14px; }
.stage-car { justify-self: center; align-self: end; width: min(78%, 440px); height: auto; margin: 6px 0 -2px; position: relative; z-index: 1;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5)); animation: arrive .9s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateX(36px); filter: blur(6px) drop-shadow(0 18px 22px rgba(0, 0, 0, .5)); } }

.ribbon { position: relative; z-index: 2; height: 52px; margin: 0 -18px; padding: 0 18px; border-top: 1px solid rgba(146, 177, 255, .14);
  background: rgba(6, 10, 26, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ribbon-track { position: absolute; left: 18px; right: 18px; top: 0; bottom: 0; }
.ribbon-track::before { content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 2px; border-radius: 2px; background: rgba(146, 177, 255, .18); }
.ribbon .h { position: absolute; left: var(--x); top: 33px; translate: -50% 0; font-size: .7333rem; color: #7f8fbd; font-variant-numeric: tabular-nums; }
.ribbon .h::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 5px; background: rgba(146, 177, 255, .3); }
.ribbon .now { position: absolute; left: var(--x); top: 15px; height: 24px; width: 2px; translate: -50% 0; border-radius: 2px; background: var(--gold); }
.mk { position: absolute; left: var(--x); top: 27px; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%; z-index: 1; outline-offset: 3px; }
.mk.out { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); }
.mk.back { background: #0b1638; border: 2px solid var(--blue-ink); }
.mk.done { opacity: .45; }
.mk.next { box-shadow: 0 0 0 5px rgba(146, 177, 255, .3); }
.mk-t { position: absolute; left: 50%; bottom: calc(100% + 4px); translate: -50% 0; font-size: .7333rem; font-weight: 600; color: #dfe6ff; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.mk.done .mk-t { color: #7f8fbd; }
.mk:hover .mk-t, .mk:focus-visible .mk-t { opacity: 0; }
.mk-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 4px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; font-size: .8rem;
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-2); opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s; }
.mk:hover .mk-tip, .mk:focus-visible .mk-tip { opacity: 1; translate: -50% 0; }

.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.day-list a { display: grid; grid-template-columns: 48px 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; min-height: 40px; line-height: 1.35; border-radius: 10px; text-decoration: none; font-size: .9333rem; }
.day-list a:hover { background: var(--surface-2); }
.day-list .t { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.day-list .i { width: 18px; height: 18px; color: var(--ink-3); }
.day-list .out .i { color: var(--ink); }
.day-list .back .i { color: var(--blue-ink); }
.day-list .w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-list .w small { color: var(--ink-3); margin-left: 6px; }
.day-list .w small::before { content: "· "; }
.day-list .done { opacity: .5; }
.day-list .tag { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.day-list .tag.late { color: #ffb4aa; }

/* request card (the reference's promo card) */
.req { display: flex; flex-direction: column; gap: 14px; overflow: hidden; align-self: start; border-color: rgba(242, 193, 78, .28);
  background: radial-gradient(100% 70% at 100% 100%, rgba(242, 193, 78, .22), transparent 64%), radial-gradient(60% 40% at 0% 0%, rgba(242, 193, 78, .05), transparent 70%), var(--surface); }
.req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.req-head b { display: block; font-weight: 600; }
.req-head small { color: var(--ink-3); font-size: .8rem; }
.req-next { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9333rem; text-decoration: none; padding: 4px 2px; }
.req-next .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.req-next:hover .i { transform: translateX(3px); }
.req-ago { align-self: stretch; justify-content: center; height: 40px; border-radius: 12px; background: var(--gold-wash); border-color: rgba(242, 193, 78, .3); color: var(--gold-ink); font-weight: 600; }
.req-ago .i { color: var(--gold); }
.req-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.req-title .i { width: 18px; height: 18px; color: var(--gold); }
.gold { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--gold); color: #241a02; font-weight: 700; font-size: .9333rem; }
.req-when { color: var(--ink-2); font-size: .9333rem; margin-top: -6px; }
.req-msg { color: var(--ink-3); font-size: .8667rem; line-height: 1.5; }
.req-pool { display: grid; justify-items: end; margin: 0 -20px -6px 0; padding-top: 6px; background: radial-gradient(48% 34% at 62% 86%, rgba(242, 193, 78, .26), transparent 72%); }
.req-car { width: min(86%, 320px); filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); pointer-events: none; }
.req-pool + .req-foot { margin-top: 0; }
.req-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.req-empty { display: grid; gap: 8px; margin: auto 0; }
.req-empty .ok { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-3); color: var(--ink-2); margin-bottom: 6px; }
.req-empty b { font-size: 1.0667rem; }
.req-empty p { color: var(--ink-3); font-size: .8667rem; line-height: 1.5; }

.tbl-card .card-head h3 { font-size: 1.0667rem; }

/* layout of the dashboard by width */
.dash-main { display: grid; gap: 20px; align-items: stretch; }
.dash-today { display: grid; grid-template-rows: auto 1fr; }
@media (min-width: 1200px) {
  .dash { grid-template-columns: minmax(300px, .9fr) minmax(0, 2.3fr); gap: 0; align-items: stretch; }
  .dash-left { grid-column: 1; grid-row: 1; padding: var(--pad) var(--pad) var(--pad) 0; margin: calc(var(--pad) * -1) 0; border-right: 1px solid var(--line); }
  .dash-main { grid-column: 2; grid-row: 1; padding-left: var(--pad); grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr); align-items: start; align-content: start; }
  .dash-main .tbl-card { grid-column: 1 / -1; }
}
@media (min-width: 760px) and (max-width: 1199.98px) {
  .dash-main { grid-template-columns: minmax(0, 1.3fr) minmax(240px, 1fr); align-items: start; }
  .dash-main .tbl-card { grid-column: 1 / -1; }
}
@media (max-width: 1199.98px) { .dash-left { order: 2; } }
@media (min-width: 1200px) and (max-width: 1499.98px) {
  .dash-left .big { font-size: 2.3rem; }
  .dash-left .tc-list { grid-auto-columns: 82%; }
}
@media (min-width: 760px) and (max-width: 1499.98px) { .tbl .c-wide-only { display: none; } }
.tbl td.num .sub { white-space: nowrap; }

/* ---------- orders ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 12px; white-space: nowrap; text-decoration: none; color: var(--ink-3); font-size: .9333rem; font-weight: 500; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px #393940; }
.tabs .n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #1a1405; font-size: .7333rem; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.filters .field { margin: 0; flex: 1 1 160px; max-width: 260px; }
.filters .field.car { flex-basis: 240px; max-width: 320px; }
.filters label { font-size: .8rem; color: var(--ink-3); }
.filters input, .filters select { height: 40px; font-size: .9333rem; }
.filters .btn { height: 40px; }

/* order card */
.order-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .order-grid { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; } }
.car-stage { position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: 200px; display: grid; place-items: end center; padding-top: 18px; border: 1px solid #1d2a52;
  background: radial-gradient(55% 40% at 50% 86%, rgba(120, 160, 255, .36), transparent 70%), radial-gradient(95% 80% at 50% 100%, #1a3483 0%, rgba(17, 33, 85, .6) 45%, transparent 78%), linear-gradient(180deg, #0d1736, #0a1230); }
.car-stage img { width: min(84%, 560px); height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5)); margin-bottom: -2px; }
.car-stage .noimg { place-self: center; color: #6f7fa8; display: grid; justify-items: center; gap: 8px; padding-bottom: 18px; font-size: .9333rem; }
.car-stage .noimg .i { width: 40px; height: 40px; stroke-width: 1.25; }
.car-stage .cap { position: absolute; left: 16px; top: 14px; right: 16px; display: flex; justify-content: space-between; gap: 10px; color: #c9d6ff; font-size: .8667rem; }
.car-stage .cap a { color: #fff; font-weight: 600; text-decoration: none; }
.car-stage .cap a:hover { text-decoration: underline; }
.when { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 18px 0 4px; }
.when > div { display: grid; gap: 2px; }
.when > div:last-child { text-align: right; }
.when small { color: var(--ink-3); font-size: .8rem; }
.when b { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.when span { color: var(--ink-2); font-size: .8667rem; }
.when .len { display: grid; justify-items: center; gap: 4px; color: var(--ink-3); font-size: .8rem; }
.when .len::before { content: ""; width: 64px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, var(--blue)); }
.facts { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 10px 18px; margin: 0; font-size: .9333rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts a { text-decoration-color: rgba(244, 244, 246, .3); }
.msg-text { white-space: pre-wrap; color: var(--ink-2); line-height: 1.55; }
.balance { display: grid; gap: 6px; }
.balance small { color: var(--ink-3); font-size: .8667rem; }
.balance .big.paid-up { color: var(--blue-ink); }
.money { display: grid; gap: 8px; margin: 18px 0 4px; font-size: .9333rem; }
.money .line { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.money .line span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.money .line.total { padding-top: 10px; border-top: 1px solid var(--line-2); font-weight: 600; color: var(--ink); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 14px 0 0; }
.bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #6f95ff, var(--blue)); }
.deposit-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--ink-3); font-size: .8667rem; }
.deposit-note .i { width: 16px; height: 16px; }
.pay-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.pay-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9333rem; }
.pay-list .ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); }
.pay-list .ic .i { width: 16px; height: 16px; }
.pay-list .ic.in { color: var(--blue-ink); background: var(--blue-wash); }
.pay-list small { display: block; color: var(--ink-3); font-size: .8rem; }
.pay-list .num { font-weight: 600; }
.pay-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.pay-form h3 { margin-bottom: 12px; }
.suggest { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px 10px 14px; margin: -4px 0 14px; border-radius: 12px;
  background: var(--blue-wash); border: 1px solid rgba(62, 115, 255, .25); font-size: .9333rem; color: #d3e0ff; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 0 0 16px; }
.timeline li::before { content: ""; width: 9px; height: 9px; margin: 6px 0 0 4px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 2px #4a4a52; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 2px; width: 1px; background: var(--line-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li:last-child::before { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.timeline small { display: block; color: var(--ink-3); font-size: .8rem; }
.cancel { margin-top: 4px; }
.cancel summary { list-style: none; cursor: pointer; color: var(--ink-3); font-size: .9333rem; display: inline-flex; gap: 6px; align-items: center; }
.cancel summary::-webkit-details-marker { display: none; }
.cancel summary:hover { color: var(--danger); }
.cancel[open] summary { color: var(--danger); }
.cancel .box { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--danger-wash); border: 1px solid rgba(255, 123, 110, .22); }
.cancel .box p { color: #ffc9c2; font-size: .9333rem; margin-bottom: 12px; }

/* order form */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .form-grid .wide { grid-column: 1 / -1; } }
.form-grid .card h2 { font-size: 1.0667rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.form-grid .card h2 .i { color: var(--ink-3); }
.kind-pick { margin-bottom: 14px; }
.kind-pick .seg { max-width: 460px; }
.savebar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px calc(var(--pad) * -1) calc(var(--pad) * -1);
  padding: 14px var(--pad); background: rgba(9, 9, 10, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.savebar .actions { margin: 0; margin-left: auto; }
.picked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--blue-wash); border: 1px solid rgba(62, 115, 255, .28); color: #d3e0ff; margin-bottom: 14px; }
.picked .i { color: var(--blue-ink); }
.cust-results { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.cust-results:empty { display: none; }
.cust-results .btn { height: 34px; font-size: .8667rem; font-weight: 500; }
.cust-results p { color: var(--ink-3); font-size: .8667rem; }

/* calendar */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ink-3); font-size: .8667rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 10px; border-radius: 4px; }
.legend .confirmed { background: var(--blue); }
.legend .active { box-shadow: inset 0 0 0 1.5px rgba(244, 244, 246, .7); background: rgba(244, 244, 246, .1); }
.legend .new { border: 1px dashed var(--gold); background: var(--gold-wash); }
.legend .block { background: repeating-linear-gradient(135deg, #3a3a40 0 4px, #26262b 4px 8px); }
.cal { overflow-x: auto; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.cal-grid { display: grid; grid-template-columns: 250px repeat(var(--days), minmax(38px, 1fr)); min-width: calc(250px + var(--days) * 38px); }
.cal-head { padding: 10px 2px 8px; display: grid; justify-items: center; gap: 1px; font-size: .7333rem; color: var(--ink-3); border-bottom: 1px solid var(--line); line-height: 1.25; }
.cal-head b { font-size: .9333rem; font-weight: 600; color: var(--ink-2); }
.cal-head.today { background: var(--blue-wash); color: var(--blue-ink); border-radius: 12px 12px 0 0; }
.cal-head.today b { color: #fff; }
.cal-head.sun b { color: #ffaaa1; }
.cal-head.corner { position: sticky; left: 0; z-index: 3; background: var(--surface); justify-items: start; padding-left: 16px; align-content: end; }
.cal-name { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 10px; background: var(--surface); border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line); font-size: .8667rem; text-decoration: none; min-width: 0; }
.cal-name img { width: 52px; height: 26px; object-fit: contain; flex: none; }
.cal-name span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.cal-name small { display: block; color: var(--ink-3); font-size: .7333rem; }
.cal-name:hover span { color: #fff; }
.cal-name.dim { opacity: .55; }
.cal-row { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--days), 1fr); grid-auto-rows: 34px; align-content: center; border-bottom: 1px solid var(--line); position: relative; min-height: 50px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: calc(100% / var(--days)) 100%; }
.cal-row .today-col { grid-row: 1 / -1; background: rgba(62, 115, 255, .07); }
.cal-row .bar { grid-row: 1; align-self: center; height: 28px; margin: 0 2px; padding: 0 10px; border-radius: 9px; display: flex; align-items: center; font-size: .8rem; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; background: var(--blue); color: #fff; z-index: 1; transition: filter .15s, transform .15s var(--ease); }
.cal-row .bar:hover { filter: brightness(1.12); transform: translateY(-1px); }
.cal-row .bar.active { background: rgba(244, 244, 246, .1); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(244, 244, 246, .7); }
.cal-row .bar.new { background: var(--gold-wash); color: var(--gold-ink); border: 1px dashed rgba(242, 193, 78, .7); }
.cal-row .bar.block { background: repeating-linear-gradient(135deg, #3a3a40 0 6px, #2a2a2f 6px 12px); color: var(--ink-2); }
.cal-row .bar.short { overflow: visible; z-index: 2; }
.cal-row .bar.short .out { position: absolute; left: calc(100% + 6px); top: 50%; translate: 0 -50%; z-index: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--ink-2); font-weight: 500; pointer-events: none; }
.cal-row .bar.short { position: relative; }
.cal-row .bar.cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.cal-row .bar.cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-list { display: none; }
@media (max-width: 760px) { .cal { display: none; } .cal-list { display: grid; gap: 12px; } .legend { display: none; } }
.cal-list .card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-list .card h3 img { width: 64px; height: 32px; object-fit: contain; }
.cal-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cal-list li a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-size: .9333rem; }
.cal-list li a .st { flex: none; }
.free-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* cars */
.cars { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.car-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: border-color .2s, transform .3s var(--ease); }
.car-card:hover { border-color: #33333a; transform: translateY(-2px); }
.car-card .pic { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(60% 46% at 50% 88%, rgba(120, 160, 255, .26), transparent 72%), linear-gradient(180deg, #121214, #0e1328); }
.car-card .pic img { width: 86%; height: auto; margin-bottom: 4%; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .5)); transition: transform .5s var(--ease); }
.car-card:hover .pic img { transform: translateX(-8px) scale(1.02); }
.car-card .pic .st { position: absolute; left: 14px; top: 14px; }
.car-card .pic .busy { position: absolute; left: auto; right: 14px; top: 14px; }
.car-card .body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.car-card .body b { font-size: 1.0667rem; font-weight: 600; }
.car-card .body span { color: var(--ink-3); font-size: .8667rem; }
.car-card .rate { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9333rem; }
.car-card .rate b { font-size: 1rem; }
.car-card.dim .pic img { filter: grayscale(.8) brightness(.7) drop-shadow(0 14px 16px rgba(0, 0, 0, .5)); }
.st.busy { background: rgba(18, 18, 20, .82); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.cars-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }

.car-hero { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 1100px) { .car-hero { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: stretch; } }
.car-hero { align-items: start; }
.car-hero .car-stage { min-height: 0; aspect-ratio: 16 / 10; }
.car-hero .car-stage img { width: min(88%, 640px); }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.spec div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.spec small { display: block; color: var(--ink-3); font-size: .8rem; }
.spec b { font-weight: 600; }
.status-pick .seg { grid-auto-flow: row; grid-auto-columns: auto; }
@media (min-width: 560px) { .status-pick .seg { grid-auto-flow: column; grid-auto-columns: 1fr; } }
.status-pick .seg label { height: auto; min-height: 44px; padding: 8px 12px; text-align: center; line-height: 1.25; display: grid; gap: 2px; }
.status-pick .seg label small { color: var(--ink-3); font-size: .7333rem; font-weight: 400; }
.blocks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.blocks li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: .9333rem; }
.blocks li .num { font-weight: 600; }
.blocks li span:nth-child(2) { color: var(--ink-3); flex: 1; min-width: 0; }
.blocks li form { margin: 0; }

/* customers, users, search */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.inline-search { position: relative; flex: 1 1 320px; max-width: 460px; }
.inline-search .i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-3); width: 18px; height: 18px; pointer-events: none; }
.inline-search input { padding-left: 42px; }
.contact { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.contact .i { width: 15px; height: 15px; color: var(--ink-3); }
.contact:hover { color: var(--ink); }
.user-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.user-row + .user-row { margin-top: 8px; }
.user-row .name b { display: block; font-weight: 600; }
.user-row .name small { color: var(--ink-3); }
.user-row .ctl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user-row .ctl form { margin: 0; display: flex; gap: 8px; align-items: center; }
.user-row .ctl input { height: 36px; max-width: 220px; font-size: .9333rem; }
@media (min-width: 900px) { .user-row { grid-template-columns: auto minmax(0, 1fr) auto auto; } .user-row .ctl { grid-column: auto; } }
.results { display: grid; gap: 16px; }
.results .card h3 { margin-bottom: 10px; }
.results ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.results li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; }
.results li a:hover { background: var(--surface-3); }
.results li img { width: 64px; height: 32px; object-fit: contain; }
.results li small { color: var(--ink-3); margin-left: auto; }

/* login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; }
@media (min-width: 960px) { .login { grid-template-columns: minmax(0, 1.25fr) minmax(420px, 1fr); } }
.login-stage { display: none; }
@media (min-width: 960px) {
  .login-stage { position: relative; display: grid; align-content: space-between; padding: 40px; overflow: hidden; border-right: 1px solid var(--line);
    background: radial-gradient(50% 30% at 52% 74%, rgba(120, 160, 255, .4), transparent 70%), radial-gradient(90% 70% at 50% 100%, #1a3483 0%, rgba(17, 33, 85, .65) 45%, transparent 78%), linear-gradient(180deg, #0b1330, #0a1230); }
  .login-stage img.car { position: absolute; left: 50%; bottom: 17%; width: min(78%, 760px); translate: -50% 0; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)); animation: arrive 1.1s var(--ease) both; }
  .login-stage p { position: relative; color: #9fb0db; font-size: .9333rem; max-width: 34ch; }
  .login-stage p b { display: block; color: #fff; font-size: 1.6rem; letter-spacing: -.015em; margin-bottom: 6px; }
}
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-box { width: 100%; max-width: 380px; }
.login-box .mark { width: 64px; height: 42px; object-fit: cover; border-radius: 12px; margin-bottom: 22px; display: block; }
.login-box h1 { margin-bottom: 6px; }
.login-box > p { color: var(--ink-3); margin-bottom: 26px; }
.login-box .btn { width: 100%; height: 48px; margin-top: 8px; font-size: 1rem; }

.error-box { max-width: 520px; margin: 8vh auto 0; text-align: left; }
.error-box h1 { margin-bottom: 8px; }
.error-box p { color: var(--ink-2); margin-bottom: 18px; }

/* htmx swaps fade in, nothing more */
#dash-money, #dash-req { transition: opacity .22s ease; }
#dash-money.htmx-swapping, #dash-req.htmx-swapping { opacity: .35; }
.htmx-added { opacity: 0; }
.htmx-settling .htmx-added, .htmx-added.htmx-settling { opacity: 1; }

/* ---------- the card editor (Изменить карточку) ---------- */
.note { color: var(--ink-3); font-size: .8rem; margin-top: 6px; line-height: 1.4; }
.note a { color: var(--blue-ink); text-underline-offset: .18em; }
.ed-tabs { margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tabs .seg { max-width: 640px; grid-auto-columns: minmax(max-content, 1fr); }
.ed-tabs .seg a { padding: 0 14px; }
.ed-trips { display: grid; gap: 8px; }
@media (min-width: 640px) { .ed-trips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ed-trip { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 0 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink); font-size: 1rem; font-weight: 500; cursor: pointer; transition: border-color .18s, background .18s; }
.ed-trip:hover { border-color: #3d3d44; }
.ed-trip:has(input:checked) { background: var(--blue-wash); border-color: rgba(62, 115, 255, .45); color: #d3e0ff; }
.ed-trip input { accent-color: var(--blue); }

.pair { margin: 0 0 6px; }
.pair legend { padding: 0; margin: 0 0 6px; font-size: .9333rem; font-weight: 600; color: var(--ink); }
.pair .pair-note { margin: -2px 0 8px; }
.ed-rows { display: grid; gap: 12px; margin-bottom: 14px; }
.ed-rows:empty { display: none; }
.ed-row { padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); }
.ed-row .field { margin-bottom: 12px; }
.ed-row input, .ed-row select, .ed-row textarea { background: var(--bg); }
.ed-row > .btn.quiet, .ed-line > .btn.quiet { margin-left: -6px; }
.ed-lines { margin: 4px 0 12px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.ed-lines [data-rows] { display: grid; gap: 4px; margin-bottom: 8px; }
.ed-line { padding: 4px 0 2px; }
.ed-line .field { margin-bottom: 6px; }

.ph-grid { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ph { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ph-img { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-tag { position: absolute; left: 6px; bottom: 6px; right: 6px; width: fit-content; max-width: calc(100% - 12px); padding: 3px 9px; border-radius: 999px; background: rgba(9, 9, 10, .78);
  color: var(--ink-2); font-size: .7333rem; font-weight: 500; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ph-cap { color: var(--ink-3); font-size: .8rem; }
.ph-cap b { color: var(--ink); font-weight: 600; }
.ph-ctl { display: flex; gap: 6px; margin: 0; }
.ph-ctl .btn.icon .i { width: 18px; height: 18px; }
.btn.icon.rm:hover:not(:disabled) { color: var(--danger); }
.card > .note { margin: 8px 0 0; }
.ph-add { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ph-add summary, .ph-alt summary { list-style: none; cursor: pointer; }
.ph-add summary::-webkit-details-marker, .ph-alt summary::-webkit-details-marker { display: none; }
.ph-add summary { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .9333rem; font-weight: 500; margin-bottom: 12px; }
.ph-add summary:hover { color: var(--ink); }
.ph-add summary .i { width: 18px; height: 18px; }
.ph-alts { display: grid; gap: 6px; }
.ph-alt { border-radius: var(--r-md); background: var(--surface-2); }
.ph-alt summary { display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; font-size: .9333rem; color: var(--ink-2); }
.ph-alt summary img { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; display: block; }
.ph-alt summary span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ph-alt summary .i { width: 18px; height: 18px; color: var(--ink-3); transition: rotate .2s var(--ease); }
.ph-alt[open] summary .i { rotate: 180deg; }
.ph-alt form { padding: 4px 14px 14px; }
.ph-alt label { margin-bottom: 6px; }
.ph-alt input { margin-top: 6px; background: var(--bg); font-weight: 400; }
@media (max-width: 559.98px) { /* five tabs do not fit in a row on a phone: three, then two wider ones */
  .ed-tabs { overflow: visible; }
  .ed-tabs .seg { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ed-tabs .seg a { grid-column: span 2; padding: 0 6px; }
  .ed-tabs .seg a:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 759.98px) {
  .savebar > .note { display: none; }
  .ed-row { padding: 14px; }
  .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- «Сайт»: what waits to go out, the two steps, the builds ---------- */
/* a strip that sends the manager somewhere: gold, because it is something waiting for them */
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r-md); text-decoration: none;
  background: var(--gold-wash); color: var(--gold-ink); border: 1px solid rgba(242, 193, 78, .28); }
.notice .i { flex: none; width: 18px; height: 18px; }
.notice .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .8667rem; }
a.notice:hover { background: rgba(242, 193, 78, .17); }
.notice.quiet { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-2); }
.notice.quiet form { margin: 0 0 0 auto; }
.tabs .n.plain { background: var(--surface-3); color: var(--ink-2); }
.site-grid { display: grid; gap: 16px; }
.site-grid > .card { margin-top: 0; }
@media (min-width: 1100px) { .site-grid { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; } }
.site-waits-line { display: flex; align-items: center; gap: 10px; color: var(--gold-ink); font-weight: 600; }
.site-waits-line .i, .site-ok .i { flex: none; width: 18px; height: 18px; }
.site-ok { display: flex; align-items: center; gap: 10px; }
.site-cars { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.site-cars li { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.site-cars a { text-decoration: none; }
.site-cars a:hover { text-decoration: underline; }
.site-step { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.site-step:first-of-type { border-top: 0; padding-top: 0; }
.site-step form { margin: 0; }
.site-step p a { color: var(--blue-ink); }
.site-step .btn { justify-self: start; }
.runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.run { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.run-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.run-head .muted { margin-left: auto; }
.run-log { margin-top: 10px; }
.run-log summary { cursor: pointer; color: var(--ink-3); font-size: .8667rem; }
.run-log pre { margin: 8px 0 0; padding: 12px; max-height: 320px; overflow: auto; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  font: inherit; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
/* car page: the way out of the catalogue */
.away { margin-top: 16px; }
.away-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.away-row form { margin: 0; }
.away-note { margin-top: 14px; }
.away-del { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; max-width: 460px; }
.away-del .field { margin: 0; }
.away-del .btn { justify-self: start; }

/* ---------- phone: the rail becomes a thumb bar ---------- */
@media (max-width: 759.98px) {
  :root { --pad: 16px; --top: 58px; font-size: 15px; }
  body.app { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--top) 1fr; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; grid-row: auto; flex-direction: row; border-right: 0; border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(9, 9, 10, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .logo, .rail-foot { display: none; }
  .rail-nav { margin: 0; width: 100%; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
  .rail-nav a { width: 100%; height: 54px; border-radius: 14px; display: grid; gap: 3px; align-content: center; }
  .rail-nav a span { position: static; translate: none; opacity: 1; padding: 0; background: none; box-shadow: none; font-size: .7333rem; color: inherit; }
  .rail-nav a[aria-current="page"] { background: var(--surface-2); box-shadow: none; }
  .rail-nav a .i { width: 22px; height: 22px; }
  .top { grid-column: 1; padding: 0 var(--pad); gap: 8px; }
  main { grid-column: 1; }
  .search { display: none; }
  .search-btn { display: inline-flex; }
  .top-pill { height: 38px; padding: 0 10px; }
  .datepill:not(.keep), .me-name, .me summary > .i, .dp-pre { display: none; }
  .crumb { display: none; }
  .top-logo { display: grid; place-items: center; margin-right: auto; }
  .day-list a { grid-template-columns: 44px 20px minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 2px; }
  .day-list .t, .day-list a > .i { grid-row: 1 / span 2; }
  .day-list .w { display: contents; }
  .day-list .w1 { grid-column: 3 / -1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .day-list .w small { grid-column: 3; grid-row: 2; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
  .day-list .w small::before { content: none; }
  .day-list .tag { grid-column: 4; grid-row: 2; }
  .tbl tbody tr:not(:first-child) .btn.step { background: transparent; color: var(--ink); border-color: #3b3b42; }
  .tbl .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tbl td.num:not(.no) { justify-self: end; align-self: center; }
  .datepill.keep > span { padding: 0 2px; font-size: .8667rem; }
  .datepill.keep a { width: 28px; }
  .bell .count { padding: 0 7px; }
  .bell .count .w { display: none; }
  .me summary { padding: 0; }
  h1 { font-size: 1.4rem; }
  .card { padding: 16px; border-radius: 18px; }
  .stage { min-height: 250px; padding: 16px 14px 0; }
  .ribbon { margin: 0 -14px; padding: 0 14px; }
  .ribbon-track { left: 14px; right: 14px; }
  .tc-list { grid-auto-columns: 74%; }
  .savebar { margin: 18px calc(var(--pad) * -1) 0; bottom: calc(68px + env(safe-area-inset-bottom)); }
  .savebar .btn { flex: 1; }
  .savebar .actions { width: 100%; }
  .when b { font-size: 1.1rem; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .filters .field, .filters .field.car { max-width: none; flex-basis: 100%; }
  .filters .field.half { flex-basis: calc(50% - 5px); }

  /* tables become stacked cards */
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl thead { display: none; }
  .tbl { border-spacing: 0; }
  .tbl tbody { display: grid; gap: 8px; }
  .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
  .tbl td { padding: 0; background: none !important; border: 0; border-radius: 0 !important; }
  .tbl td[data-l]::before { content: attr(data-l) " "; color: var(--ink-3); }
  .tbl .no { order: -2; width: auto; font-size: .8rem; }
  .tbl .c-st { order: -1; justify-self: end; }
  .tbl .c-car, .tbl .c-wide { grid-column: 1 / -1; }
  .tbl .c-hide { display: none; }
  .tbl .act { grid-column: 1 / -1; width: auto; text-align: left; margin-top: 4px; }
  .tbl .act .btn { width: 100%; height: 40px; }
  .car-cell img { width: 72px; height: 36px; }
}
@media (min-width: 760px) { .search-btn, .top-logo { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
