/* ============================================================================
   СпецТех — design system
   White canvas, near-black ink, yellow primary action, status red/yellow/green.
   Two shells: mobile customer/driver app (max 480) and desktop owner cabinet.
   ========================================================================== */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --ink: #0f1720;
  --ink-soft: #25313d;
  --muted: #5b6773;
  --muted-soft: var(--muted-soft);
  --line: #e6e9ee;
  --line-strong: #d3d9e0;
  --surface: #f6f7f9;
  --surface-2: #fbfbfc;
  --surface-3: var(--surface-3);
  --yellow: #f5a524;
  --yellow-soft: #fff4de;
  --yellow-ink: #1a1305;
  --on-yellow: #1a1305;
  --red: #e5484d;
  --red-strong: #b2262b;
  --red-soft: #fdecec;
  --red-ink: #a32a2e;
  --green: #2e9e5b;
  --green-soft: #e8f6ee;
  --green-ink: #1d6e3f;
  --blue: var(--blue);
  --blue-soft: var(--blue-soft);
  --blue-ink: var(--blue-ink);
  --violet: #6d5ce7;
  --violet-soft: #efedfe;
  --on-solid: #ffffff;
  --overlay: rgba(15, 23, 32, 0.46);
  --map-bg: var(--map-bg);
  --glass: var(--glass);
  --glass-strong: var(--glass-strong);
  --glass-border: var(--glass-border);
  --yellow-line: var(--yellow-line);
  --yellow-line-2: var(--yellow-line-2);
  --yellow-wash: var(--yellow-wash);
  --yellow-wash-2: var(--yellow-wash-2);
  --yellow-deep: var(--yellow-deep);
  --yellow-strong: var(--yellow-strong);
  --green-line: var(--green-line);
  --red-line: var(--red-line);
  --red-deep: var(--red-deep);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 32, 0.04), 0 8px 24px rgba(15, 23, 32, 0.05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 32, 0.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-app: 480px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #111820;
  --ink: #f2f5f8;
  --ink-soft: #d5dde5;
  --muted: #a2afbc;
  --muted-soft: #7c8a98;
  --line: #2a3541;
  --line-strong: #3c4957;
  --surface: #1e2732;
  --surface-2: #111820;
  --surface-3: #26313d;
  --yellow: #f5a524;
  --yellow-soft: #3a2a0d;
  --yellow-ink: #ffd88a;
  --on-yellow: #1a1305;
  --red: #ff6369;
  --red-strong: #ff8a8e;
  --red-soft: #3a161a;
  --red-ink: #ffb3b6;
  --green: #4ec27f;
  --green-soft: #12301f;
  --green-ink: #8fe3ab;
  --blue: #6f9dff;
  --blue-soft: #142544;
  --blue-ink: #b7ccff;
  --violet: #a99bff;
  --violet-soft: #211d3d;
  --on-solid: #ffffff;
  --overlay: rgba(0, 0, 0, 0.62);
  --map-bg: #141a20;
  --glass: rgba(24, 31, 38, 0.94);
  --glass-strong: rgba(24, 31, 38, 0.97);
  --glass-border: rgba(42, 53, 65, 0.95);
  --yellow-line: #6b4a0c;
  --yellow-line-2: #6b4a0c;
  --yellow-wash: #241c0c;
  --yellow-wash-2: #241c0c;
  --yellow-deep: #ffd88a;
  --yellow-strong: #ffb84d;
  --green-line: #235c3b;
  --red-line: #6b2a2f;
  --red-deep: #ffb3b6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #111820;
    --ink: #f2f5f8;
    --ink-soft: #d5dde5;
    --muted: #a2afbc;
    --muted-soft: #7c8a98;
    --line: #2a3541;
    --line-strong: #3c4957;
    --surface: #1e2732;
    --surface-2: #111820;
    --surface-3: #26313d;
    --yellow: #f5a524;
    --yellow-soft: #3a2a0d;
    --yellow-ink: #ffd88a;
    --on-yellow: #1a1305;
    --red: #ff6369;
    --red-strong: #ff8a8e;
    --red-soft: #3a161a;
    --red-ink: #ffb3b6;
    --green: #4ec27f;
    --green-soft: #12301f;
    --green-ink: #8fe3ab;
    --blue: #6f9dff;
    --blue-soft: #142544;
    --blue-ink: #b7ccff;
    --violet: #a99bff;
    --violet-soft: #211d3d;
    --on-solid: #ffffff;
    --overlay: rgba(0, 0, 0, 0.62);
    --map-bg: #141a20;
    --glass: rgba(24, 31, 38, 0.94);
    --glass-strong: rgba(24, 31, 38, 0.97);
    --glass-border: rgba(42, 53, 65, 0.95);
    --yellow-line: #6b4a0c;
    --yellow-line-2: #6b4a0c;
    --yellow-wash: #241c0c;
    --yellow-wash-2: #241c0c;
    --yellow-deep: #ffd88a;
    --yellow-strong: #ffb84d;
    --green-line: #235c3b;
    --red-line: #6b2a2f;
    --red-deep: #ffb3b6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding-left: 1.1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}

.btn:focus-visible,
.tab:focus-visible,
.map-pin:focus-visible,
.segmented__btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-solid);
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  flex: none;
  display: block;
}

/* Theme-aware equipment marks: the light PNG is the default, the dark one replaces it on
   [data-theme='dark']. Only the visible file is downloaded. */
.category-art {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-art__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-art__img--dark {
  display: none;
}

[data-theme='dark'] .category-art__img--light {
  display: none;
}

[data-theme='dark'] .category-art__img--dark {
  display: block;
}

.small {
  font-size: 13px;
  line-height: 1.4;
}

.muted {
  color: var(--muted);
}

.warn-text {
  color: var(--red-ink);
}

.req {
  color: var(--red-ink);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ layout */

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.col-4 {
  grid-column: span 4;
}
.col-5 {
  grid-column: span 5;
}
.col-7 {
  grid-column: span 7;
}
.col-8 {
  grid-column: span 8;
}
.col-12 {
  grid-column: span 12;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row--end {
  justify-content: flex-end;
}
.row--between {
  justify-content: space-between;
}
.row--center {
  justify-content: center;
}

/* ------------------------------------------------------------- app shell */

.app {
  max-width: var(--max-app);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: 92px;
  position: relative;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  --brand-size: 34px;
  width: var(--brand-size);
  height: var(--brand-size);
  border-radius: 11px;
  flex: none;
  display: inline-flex;
  overflow: hidden;
}

.brand-mark__fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
}

.brand-mark__img,
.brand-mark__svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 11px;
}

.brand-mark__img[hidden],
.brand-mark__fallback[hidden] {
  display: none;
}

/* Demo screen-state switch: present on every product screen, compact on 390 px. */

.state-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}

.cab-inner > .state-bar {
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.state-bar__label {
  font-weight: 600;
  color: var(--ink-soft);
}

.state-bar__select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.state-bar__hint {
  font-size: 11.5px;
}

@media (max-width: 420px) {
  .state-bar__hint {
    display: none;
  }
}

/* Forced loading / empty / error states (see src/demo-state.js). */

.state-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.state-view__lead {
  font-size: 14px;
  color: var(--muted);
}

/* Two classes so the base `.banner` rule later in the file cannot win the cascade. */
.banner.banner--error {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red-ink);
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton--kpi {
  height: 96px;
}

.skeleton--line {
  height: 16px;
}

.skeleton--short {
  width: 60%;
}

.skeleton--card {
  height: 150px;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* Boot shell in index.html — replaced by the router on the first render. */

.boot {
  max-width: var(--max-app);
  margin: 0 auto;
  min-height: 100dvh;
}

.boot__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.boot__main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.boot__title {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.boot__sub {
  font-size: 14px;
  color: var(--muted);
}

.brand__text {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand__text small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-top: 3px;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-header__nav {
  display: none;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--yellow-line);
  background: var(--yellow-soft);
  color: var(--yellow-deep);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  max-width: 150px;
}

.user-chip__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-solid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}

.user-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-headbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 0;
}

.app-header__titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-title {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.app-sub {
  font-size: 13px;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  width: fit-content;
  min-height: 32px;
}

.back-link:hover {
  color: var(--ink);
}

.app-main {
  padding: 18px 18px 8px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-width: var(--max-app);
  margin: 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  background: var(--glass-strong);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  min-height: 52px;
  justify-content: center;
}

.tab[aria-current='page'] {
  color: var(--ink);
  background: var(--yellow-soft);
}

.tab[aria-current='page'] .icon {
  color: var(--ink);
}

/* ----------------------------------------------------------- cabinet shell */

.cab {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--bg);
}

.cab-side {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.brand--cab .brand__text {
  font-size: 18px;
}

.cab-side__fleet {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 13px;
}

.cab-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cab-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  min-height: 40px;
}

.cab-nav a:hover {
  background: var(--surface);
}

.cab-nav a[aria-current='page'] {
  background: var(--yellow-soft);
  color: var(--ink);
  font-weight: 650;
}

.cab-nav a[aria-current='page'] .icon {
  color: var(--yellow-deep);
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: var(--on-solid);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cab-side__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cab-user {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.cab-user strong {
  display: block;
  font-size: 13px;
}

.cab-user small {
  color: var(--muted);
  font-size: 11.5px;
}

.cab-side__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 28px;
}

.linklike:hover {
  color: var(--ink);
}

.cab-main {
  padding: 28px 34px 64px;
  min-width: 0;
}

.cab-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.page-title {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  max-width: 70ch;
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.crumbs a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crumbs span[aria-current] {
  color: var(--ink);
}

/* --------------------------------------------------------------- surfaces */

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card__title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.card__sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics--3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  min-width: 0;
}

.metric--link:hover {
  border-color: var(--line-strong);
}

.metric__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.metric__value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.metric__value--danger {
  color: var(--red-ink);
}

.metric__value--accent {
  color: var(--ink);
  background: linear-gradient(180deg, transparent 62%, var(--yellow-soft) 62%);
  width: fit-content;
}

.metric__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.empty p {
  font-size: 14px;
}

.note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  padding: 10px 12px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: 0 8px 8px 0;
}

.note-quiet {
  border-left-color: var(--yellow);
}

.banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}

.banner strong {
  font-size: 14.5px;
}

.banner--info {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.banner--warn {
  background: var(--yellow-soft);
  border-color: var(--yellow-line-2);
}

.banner--danger {
  background: var(--red-soft);
  border-color: var(--red-line);
  color: var(--red-deep);
}

.banner--ok {
  background: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green-ink);
}

.is-muted {
  opacity: 0.55;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.12s ease, border-color 0.12s ease;
  text-align: center;
  line-height: 1.15;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--yellow-ink);
}

.btn-primary:hover {
  background: var(--yellow-strong);
}

.btn-ghost {
  background: var(--bg);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-danger {
  background: var(--red-strong);
  border-color: var(--red-strong);
  color: var(--on-solid);
}

.btn-danger:hover {
  background: var(--red-deep);
}

.btn-danger-ghost {
  color: var(--red-ink);
  border-color: var(--red-line);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-xs {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  flex: none;
}

.icon-btn:hover {
  background: var(--surface);
}

/* ------------------------------------------------------------------- forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field__hint {
  font-size: 11.5px;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

textarea.input {
  resize: vertical;
  min-height: 76px;
  line-height: 1.4;
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 23, 32, 0.08);
  outline: none;
}

.input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
}

.input:disabled {
  background: var(--surface);
  color: var(--muted);
}

.input--sm {
  min-height: 38px;
  font-size: 13.5px;
  padding: 6px 10px;
}

.input--xs {
  min-height: 32px;
  font-size: 12.5px;
  padding: 4px 8px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.filter__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter--grow {
  flex: 1 1 180px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--yellow);
  flex: none;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}

.segmented__btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.segmented__btn[aria-pressed='true'] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 32, 0.12);
}

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar--wrap {
  align-items: flex-end;
}

/* ------------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.chip-neutral {
  background: var(--surface);
  color: var(--muted);
}

.chip-green {
  background: var(--green-soft);
  color: var(--green-ink);
}

.chip-yellow {
  background: var(--yellow-soft);
  color: var(--yellow-deep);
}

.chip-red {
  background: var(--red-soft);
  color: var(--red-ink);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot--green {
  background: var(--green);
}
.dot--yellow {
  background: var(--yellow);
}
.dot--red {
  background: var(--red);
}

.gps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
}

.gps--fresh {
  color: var(--green-ink);
}

.gps--stale {
  color: var(--muted);
}

/* --------------------------------------------------------------------- map */

.map {
  position: relative;
  height: 260px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-3);
}

.map__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 10px;
  background: var(--glass-soft);
  backdrop-filter: blur(2px);
  z-index: 2;
}

.map-pin:hover .map-pin__chip,
.map-pin:focus-visible .map-pin__chip {
  background: var(--bg);
  transform: translateY(-1px);
}

.map-pin__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--on-solid);
  box-shadow: 0 1px 4px rgba(15, 23, 32, 0.35);
}

.map-pin--red .map-pin__dot {
  background: var(--red);
}
.map-pin--yellow .map-pin__dot {
  background: var(--yellow);
}
.map-pin--green .map-pin__dot {
  background: var(--green);
}

.map-pin__chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--glass);
  color: var(--ink);
  transition: transform 0.12s ease;
}

.map__legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  z-index: 3;
}

.map__legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.map__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ customer app */

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--yellow-deep);
}

.intro__title {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-top: 6px;
}

.intro__sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 8px;
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.list-head__title {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.eq-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eq-card__media {
  position: relative;
  background: linear-gradient(180deg, var(--yellow-wash) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  justify-content: center;
}

.eq-card__media .truck-glyph {
  width: 168px;
  height: 112px;
}

.truck-glyph {
  display: block;
}

.eq-card__id {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.eq-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
}

.eq-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.eq-card__title {
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eq-card__title a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.eq-card__title a:hover {
  text-decoration-color: var(--line-strong);
}

.eq-card__meta {
  font-size: 12.5px;
  color: var(--muted);
}

.eq-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.eq-card__price strong {
  font-size: 20px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.eq-card__status {
  color: var(--ink-soft);
}

.eq-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.detail-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--yellow-wash), var(--bg) 70%);
}

.detail-hero__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-hero__price {
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.detail-hero__sub {
  font-size: 13px;
  color: var(--muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.photo {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.photo__frame {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-strong);
  margin-bottom: 5px;
}

.photo figcaption {
  line-height: 1.3;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kv-list--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv__k {
  color: var(--muted);
  flex: none;
  max-width: 55%;
}

.kv__v {
  text-align: right;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.price-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.price-box > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-box strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.price-box--total {
  grid-template-columns: 1fr;
  background: var(--yellow-soft);
  border-color: var(--yellow-line);
}

.price-total {
  font-size: 30px !important;
  letter-spacing: -0.03em;
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.big-line {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.file-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.file-list li {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* ---- request steps ---- */

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.request-kind {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.request-kind__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--yellow-soft);
  color: var(--ink);
}

.request-kind__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.request-kind__text strong {
  font-size: 13.5px;
  color: var(--ink);
}

.request-kind__change {
  margin-left: auto;
  flex: none;
  font-size: 13px;
  font-weight: 650;
  color: var(--yellow-ink);
}

.request .spmap {
  min-height: 260px;
  height: 260px;
}

.steps__item {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  line-height: 1.25;
}

.steps__item.is-current {
  background: var(--yellow-soft);
  border-color: var(--yellow-line);
  color: var(--ink);
}

.steps__item.is-done {
  background: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green-ink);
}

/* ---- order cards ---- */

.order-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.order-card:hover {
  border-color: var(--line-strong);
}

.order-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-card__title {
  font-size: 16.5px;
  letter-spacing: -0.015em;
}

.order-card__site {
  font-size: 13px;
  color: var(--muted);
}

.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.order-card__sum {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.order-item {
  display: grid;
  gap: 6px;
}

.order-repeat {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--yellow-line);
  background: var(--yellow-soft);
  color: var(--yellow-ink);
  font-size: 12px;
  font-weight: 700;
}

.order-repeat:hover {
  background: var(--yellow-line);
}

/* ---- timeline & feed ---- */

.timeline {
  list-style: none;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 18px 28px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  z-index: 1;
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 19px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.done::before {
  background: var(--green);
  border-color: var(--green);
}

.timeline li.current::before {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-soft);
}

.timeline__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.timeline li.current .timeline__label {
  font-weight: 700;
}

.timeline__meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.feed {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 6px;
  flex: none;
}

.feed__dot.is-read {
  background: var(--line-strong);
}

.feed__item p {
  font-size: 13.5px;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- driver */

.hello {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hello__name {
  font-size: 23px;
  letter-spacing: -0.025em;
}

.timer-card {
  border-radius: var(--radius);
  border: 1px solid var(--yellow-line);
  background: linear-gradient(180deg, var(--yellow-wash-2), var(--bg));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timer-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.timer-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

.timer-card__value {
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.timer-card__money {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.machine {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.machine__mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex: none;
}

.machine strong {
  display: block;
  font-size: 15px;
}

.shift-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.break-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.break-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
}

.doc-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.doc-list strong {
  display: block;
  font-size: 13.5px;
}

.doc-list .small {
  display: block;
  margin-top: 2px;
}

.prelim-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--yellow-line);
  background: var(--yellow-wash);
}

.prelim-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prelim-card__value {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
  background: var(--bg);
}

.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.table a:hover {
  text-decoration-color: var(--ink);
}

/* -------------------------------------------------------- cabinet blocks */

.totals-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.row-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.row-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.row-list li:last-child {
  border-bottom: 0;
}

.row-list__main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1 1 150px;
}

.row-list__main span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.timeline-pill {
  display: inline-flex;
  flex-direction: column;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.timeline-pill.is-done {
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green-ink);
  font-weight: 600;
}

.timeline-pill small {
  font-size: 10px;
  opacity: 0.8;
}

.timeline-arrow {
  color: var(--line-strong);
  font-size: 11px;
}

.moderation-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.moderation-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.moderation-card__title {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.moderation-card .btn {
  margin-top: auto;
  width: fit-content;
}

.small-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 16px 0 8px;
}

/* ---- reports ---- */

.report-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.report-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.report-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}

.report-group summary::-webkit-details-marker {
  display: none;
}

.report-group summary:hover {
  background: var(--surface-2);
}

.report-group[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.report-group__name {
  font-weight: 650;
}

.report-group__metrics {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.report-group__body {
  padding: 14px 15px 16px;
}

/* ---- notifications ---- */

.notif-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.notif:last-child {
  border-bottom: 0;
}

.notif__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  margin-top: 6px;
  flex: none;
}

.notif.is-unread .notif__dot {
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}

.notif__body {
  flex: 1;
  min-width: 0;
}

.notif__body p {
  font-size: 13.5px;
}

.notif.is-unread .notif__body p {
  font-weight: 600;
}

.notif__link {
  color: inherit;
  text-decoration: none;
}

.notif__link:hover {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.notif__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Header unread badge, shared by the cabinet and the driver app. */
.bell-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}

.bell-badge:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.bell-badge__count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------- dialogs */

.dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.dialog::backdrop {
  background: rgba(15, 23, 32, 0.45);
  backdrop-filter: blur(2px);
}

.dialog__form {
  display: flex;
  flex-direction: column;
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.dialog__title {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.dialog__desc {
  padding: 6px 18px 0;
  font-size: 13px;
  color: var(--muted);
}

.dialog__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
}

.dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  position: sticky;
  bottom: 0;
}

.correction-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.correction-preview > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.correction-preview strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-solid);
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast--error {
  background: var(--red-strong);
}

.toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}

/* ------------------------------------------------------------------ login */

.role-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  min-height: 44px;
}

.role-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.role-card.is-active {
  border-color: var(--yellow-line);
  background: var(--yellow-soft);
}

.role-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
}

.role-card__go {
  color: var(--muted);
}

.role-card__note {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.role-card__account {
  font-size: 11.5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.session-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------- 404 */

.notfound {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.notfound__inner {
  max-width: 440px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.notfound__code {
  font-size: 64px;
  font-weight: 750;
  letter-spacing: -0.05em;
  color: var(--yellow);
  line-height: 1;
}

/* ------------------------------------------------------------- responsive */

@media (min-width: 640px) {
  .metrics--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metrics--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .metric__value {
    font-size: 36px;
  }
  .map {
    height: 300px;
  }
}

@media (min-width: 1024px) {
  .metrics {
    gap: 16px;
  }
  .metric {
    padding: 18px;
  }
  .metric__value {
    font-size: 38px;
  }
  .eq-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .eq-card__media {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    align-items: center;
  }
  .eq-card__media .truck-glyph {
    width: 150px;
    height: 100px;
  }
  .eq-card__body {
    padding: 16px 18px;
  }
  .map {
    height: 320px;
  }
}

@media (max-width: 1180px) {
  .cab {
    grid-template-columns: 1fr;
  }
  .cab-side {
    position: sticky;
    top: 0;
    z-index: 25;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: visible;
  }
  .cab-side__fleet {
    display: none;
  }
  .cab-nav {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
  }
  .cab-nav a {
    white-space: nowrap;
    min-height: 38px;
    padding: 7px 10px;
  }
  .cab-side__foot {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    flex-direction: row;
    align-items: center;
  }
  .cab-side__links {
    display: none;
  }
  .cab-main {
    padding: 22px 20px 56px;
  }
  .col-7,
  .col-8,
  .col-5,
  .col-4 {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .page-title {
    font-size: 26px;
  }
  .cab-main {
    padding: 18px 14px 48px;
  }
  .cab-side {
    gap: 10px;
    padding: 10px 12px;
  }
  .cab-side .brand__text small {
    display: none;
  }
  .cab-nav a span:not(.nav-count) {
    display: none;
  }
  .cab-nav a {
    padding: 8px;
  }
  .cab-nav a[aria-current='page'] {
    background: var(--yellow-soft);
  }
  .cab-user span:last-child {
    display: none;
  }
  .grid-12 {
    gap: 14px;
  }
  .col-7,
  .col-8,
  .col-5,
  .col-4 {
    grid-column: span 12;
  }
  .kv-list--2 {
    grid-template-columns: 1fr;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .price-box {
    grid-template-columns: 1fr 1fr;
  }
  .report-group summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .role-card__top {
    font-size: 14.5px;
  }
}

@media (max-width: 560px) {
  .brand__text small {
    display: none;
  }
  .user-chip__name {
    display: none;
  }
  .metric__value {
    font-size: 30px;
  }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active {
    transform: none;
  }
}

/* ------------------------------------------------------------------- print */

@media print {
  .cab-side,
  .tabbar,
  .app-header,
  .page-head__actions,
  .toolbar,
  .demo-badge,
  .toasts {
    display: none !important;
  }
  .cab {
    display: block;
  }
  .cab-main {
    padding: 0;
  }
  .card,
  .metric {
    box-shadow: none;
    break-inside: avoid;
  }
  body {
    font-size: 12px;
  }
}

/* ------------------------------------------- moderation & verification */
/* The dossier card is the whole decision context: state, checks, materials, history. */

.moderation-card {
  display: grid;
  gap: 10px;
}

.moderation-card__sub {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.moderation-card__history summary {
  cursor: pointer;
  font-weight: 600;
}

.moderation-card__actions {
  gap: 8px;
  margin-top: 4px;
}

.row--wrap {
  flex-wrap: wrap;
}

.check-list,
.material-list,
.decision-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.check-list__item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.check-list__item:last-child,
.material-list li:last-child,
.decision-list li:last-child {
  border-bottom: 0;
}

.check-list__mark {
  font-weight: 700;
  text-align: center;
}

.check-list__item--passed .check-list__mark {
  color: var(--green-ink);
}

.check-list__item--failed .check-list__mark {
  color: var(--red-ink);
}

.check-list__item--waived .check-list__mark {
  color: var(--muted);
}

.check-list__body {
  display: grid;
  gap: 2px;
}

.material-list li,
.decision-list li {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.material-list__name {
  font-weight: 600;
}

.check-edit {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.check-edit:last-of-type {
  border-bottom: 0;
}

/* ============================================================================
   Documents & geo (card #135) — upload sets, evidence flags, review, queue
   ========================================================================== */

.doc-panel {
  display: grid;
  gap: 14px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-sets {
  display: grid;
  gap: 14px;
}

.doc-set {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.doc-set__head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.doc-set__title {
  margin: 0 0 2px;
  font-size: 15px;
}

.doc-set__chips,
.doc-item__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-set__actions {
  display: grid;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.doc-list--stack {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.doc-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-item__head > div:first-child {
  display: grid;
  gap: 2px;
}

.doc-version {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
}

.doc-item__meta {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.doc-meta__k {
  display: inline-block;
  min-width: 74px;
  color: var(--muted);
}

.doc-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-flag,
.doc-return {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--yellow-soft);
  color: var(--yellow-ink);
  font-size: 13px;
}

.doc-return {
  background: var(--red-soft);
  color: var(--red-ink);
}

.doc-history {
  font-size: 13px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}

.doc-history summary {
  cursor: pointer;
  font-weight: 600;
}

.doc-history__list {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.doc-history__list li {
  display: grid;
  gap: 1px;
}

.doc-comments {
  display: grid;
  gap: 6px;
}

.doc-comments__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.doc-comments__list li {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface);
}

.doc-comments__list p {
  margin: 0;
}

.doc-requirements {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.doc-requirements__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.doc-requirements__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.doc-requirements__list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
}

.doc-requirements__list .is-ok > span:first-child {
  color: var(--green-ink);
  font-weight: 700;
}

.doc-requirements__list .is-missing > span:first-child {
  color: var(--red-ink);
  font-weight: 700;
}

.doc-requirement {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 600;
}

.doc-requirement--required {
  background: var(--yellow-soft);
  color: var(--yellow-ink);
}

.doc-queue {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: var(--bg);
}

.doc-queue__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.doc-queue__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.doc-queue__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface);
}

.doc-queue__item > div:first-child {
  display: grid;
  gap: 2px;
}

.doc-queue__item--done {
  background: var(--green-soft);
}

.doc-queue__item--retry {
  background: var(--red-soft);
}

.doc-queue__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.doc-panel__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

@media (max-width: 560px) {
  .doc-item__meta {
    font-size: 12px;
  }

  .doc-meta__k {
    min-width: 64px;
  }
}

/* ============================================================================
   Onboarding & registration (card #153)
   Full-height pre-auth surfaces on the same tokens: yellow primary, ink text,
   status red/yellow/green, 44 px touch targets, focus-visible everywhere.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.field__error {
  margin: 6px 0 0;
  color: var(--red-ink);
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- onboarding */

.onb {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 18px 20px;
  gap: 18px;
}

.onb__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.onb__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}

.onb__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onb-slide {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onb-slide[hidden] {
  display: none;
}

.onb-slide__art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: var(--yellow-soft);
  color: var(--yellow-ink);
  box-shadow: inset 0 0 0 1px rgba(245, 165, 36, 0.35);
}

.onb-slide__title {
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.onb-slide__lead {
  color: var(--ink-soft);
  font-size: 16px;
}

.onb-slide__list {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.onb-slide__list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--ink-soft);
}

.onb-slide__list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--yellow);
}

.onb__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.onb__arrow {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.onb__arrow:hover:not(:disabled) {
  background: var(--surface);
}

.onb__arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.onb__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.onb__dot {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.onb__dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.onb__dot[aria-current='true']::before {
  width: 26px;
  margin-left: -13px;
  background: var(--ink);
}

.onb__progress {
  text-align: center;
}

.onb__foot {
  display: grid;
  gap: 8px;
}

.onb__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

@media (min-width: 640px) {
  .onb {
    padding: 28px 24px 32px;
  }

  .onb-slide__title {
    font-size: 32px;
  }

  .onb__foot {
    grid-template-columns: 1fr 1fr;
  }

  .onb__note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .onb {
    max-width: 760px;
    gap: 26px;
  }

  .onb-slide {
    gap: 16px;
  }

  .onb-slide__title {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .onb-slide:not([hidden]) {
    animation: onb-fade 0.18s ease-out both;
  }
}

@keyframes onb-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------- registration */

.auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 18px 24px;
  gap: 18px;
}

.auth__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth__top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth__title {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.auth__title:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.auth__lead {
  color: var(--muted);
  font-size: 15px;
}

.auth-form {
  margin-top: 4px;
}

.auth-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.auth__foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.steps__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

.steps__item.is-current {
  color: var(--yellow-ink);
  background: var(--yellow-soft);
  font-weight: 600;
}

.steps__item.is-done {
  color: var(--green-ink);
  background: var(--green-soft);
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

/* --------------------------------------------------- order window (card #155) */

.order-window {
  display: grid;
  gap: 12px;
}

.order-window__title {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.order-window__subtitle {
  font-size: 16px;
}

.order-window__step {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.ow-groups,
.ow-types {
  display: grid;
  gap: 8px;
}

.ow-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'icon title'
    'icon meta'
    'icon count';
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ow-tile:hover:not(:disabled) {
  border-color: var(--ink);
}

.ow-tile.is-selected {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.ow-tile:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ow-tile__icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.ow-tile__title {
  grid-area: title;
  font-weight: 600;
}

.ow-tile__meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 13px;
}

.ow-tile__count {
  grid-area: count;
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 600;
}

.ow-tile__count--empty {
  color: var(--muted);
  font-weight: 500;
}

.ow-tile--type {
  grid-template-columns: 1fr;
  grid-template-areas:
    'title'
    'meta'
    'count';
}

.ow-tile--type .ow-tile__icon {
  display: none;
}

.ow-tile--skeleton {
  grid-template-columns: 1fr;
  grid-template-areas:
    'title'
    'meta';
  gap: 6px;
  cursor: default;
}

.ow-machine {
  color: var(--ink-soft);
}

.ow-locked {
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

@media (min-width: 420px) {
  .ow-groups {
    grid-template-columns: 1fr 1fr;
  }
}

/* ------------------------------------------------------------------ verification */

.verify {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.verify__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.verify__title {
  font-size: 16px;
}

.verify__status {
  color: var(--ink-soft);
}

.verify__status:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.verify__note {
  color: var(--muted);
}

@media (min-width: 1024px) {
  .auth {
    max-width: 680px;
    padding: 28px 24px 32px;
  }

  .auth__title {
    font-size: 30px;
  }
}

/* --------------------------------------------------------------- map (#156) */

/* Interactive map shell. MapLibre's `.maplibregl-map` is mounted into `.spmap__canvas`; the legend
   and the hint stay in HTML so they are readable (and translatable) without the map library. */
.spmap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow);
}

.spmap__canvas {
  min-height: var(--map-height, 380px);
  height: var(--map-height, 380px);
  width: 100%;
}

.spmap__canvas .maplibregl-map {
  height: 100%;
  width: 100%;
  background: var(--surface-3);
  font-family: var(--font);
}

/* MapLibre owns the canvas transform; the app only supplies its focus ring. */
.spmap__canvas .maplibregl-canvas:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

/* Popup + control skin: MapLibre ships functional defaults, the panel should look like the app. */
.spmap .maplibregl-popup-content {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
}

.spmap .maplibregl-popup-content strong {
  font-size: 13px;
}

.spmap .maplibregl-popup-content a {
  color: var(--ink);
  font-weight: 600;
}

.spmap .maplibregl-popup-tip {
  display: none;
}

.spmap .maplibregl-popup-close-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.spmap .maplibregl-popup-close-button:hover {
  color: var(--ink);
}

.spmap .maplibregl-ctrl-group {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.spmap .maplibregl-ctrl-group button {
  width: 30px;
  height: 30px;
}

.spmap .maplibregl-ctrl-attrib {
  border-radius: var(--radius-sm);
  background: var(--glass);
  font-family: var(--font);
  font-size: 11px;
}

.spmap .maplibregl-ctrl-attrib a {
  color: var(--ink-soft);
}

.spmap__legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--ink-soft);
}

.spmap__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.spmap__swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.spmap__swatch--green {
  background: var(--green);
}

.spmap__swatch--yellow {
  background: var(--yellow);
}

.spmap__swatch--red {
  background: var(--red);
}

.spmap__swatch--ink {
  background: var(--ink);
}

.spmap__swatch--line {
  width: 16px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed var(--ink);
  background: none;
}

.spmap__hint {
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.spmap__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

/* Markers: a white pill with the role letter / machine number, coloured by role or status.
   MapLibre adds `.maplibregl-marker` (absolute, top/left 0) to the element it positions and writes
   `transform: translate(-50%, -100%) translate(x, y)` for the `bottom` anchor. The wrapper is
   therefore 0×0 — never give it a size or its own transform, or the pin drifts from its point. */
.spmap__icon {
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.spmap__pin {
  --pin: var(--muted);
  position: absolute;
  left: 0;
  bottom: 6px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 6px;
  border: 2px solid var(--pin);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 32, 0.18);
}

/* The 6 px tail reaches from the pill down to the coordinate (the wrapper's origin). */
.spmap__pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 2px;
  height: 6px;
  background: var(--pin);
  transform: translateX(-50%);
}

.spmap__pin-chip {
  font-variant-numeric: tabular-nums;
}

/* The wrapper is 0×0, so the focus ring belongs on the visible pill. */
.spmap__icon:focus-visible {
  outline: none;
}

.spmap__icon:focus-visible .spmap__pin {
  box-shadow: 0 0 0 3px var(--ink), 0 2px 8px rgba(15, 23, 32, 0.18);
}

.spmap__pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pin);
  flex: none;
}

.spmap__pin--green {
  --pin: var(--green);
}

.spmap__pin--yellow {
  --pin: var(--yellow);
}

.spmap__pin--red {
  --pin: var(--red);
}

.spmap__pin--ink {
  --pin: var(--ink);
}

.spmap__pin--neutral {
  --pin: var(--muted);
}

/* A machine pin: a round badge carrying the catalogue illustration; the ring keeps the
   availability tone and the number moves to the popup. The anchor is `center`, so the badge is
   centred on the coordinate instead of hanging above it. */
.spmap__pin--badge {
  left: 0;
  top: 0;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-width: 3px;
  border-radius: 50%;
}

.spmap__pin--badge::after {
  content: none;
}

.spmap__pin-art {
  width: 24px;
  height: 24px;
  flex: none;
  object-fit: contain;
}

.spmap__pin-art--dark {
  display: none;
}

[data-theme='dark'] .spmap__pin-art--light {
  display: none;
}

[data-theme='dark'] .spmap__pin-art--dark {
  display: block;
}

/* A MapLibre Marker with the `center` anchor: it owns the absolute position and transform, so the
   chip must stay inline and must not position itself. */
.spmap__route-chip {
  display: inline-block;
  padding: 2px 7px;
  border: 1px dashed var(--ink);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.spmap__popup-detail {
  color: var(--muted);
  font-size: 12px;
}

/* Fallback when the map library is unavailable: the same points, projected into the panel. */
.spmap__fallback {
  width: 100%;
  height: 100%;
  display: block;
  /* `meet` letterboxes the square projection; keep the margins the same colour as the plot. */
  background: #f2f5f7;
}

.spmap__fallback-pin {
  color: var(--muted);
}

.spmap__fallback-pin--green {
  color: var(--green);
}

.spmap__fallback-pin--yellow {
  color: var(--yellow);
}

.spmap__fallback-pin--red {
  color: var(--red);
}

.spmap__fallback-pin--ink {
  color: var(--ink);
}

.spmap__fallback-label {
  font-size: 2.6px;
  fill: var(--ink-soft);
}

/* Point picker: the map is the primary input, the coordinate fields keep it keyboard-editable. */
.spmap--picker .maplibregl-canvas-container.maplibregl-interactive,
.spmap--picker .maplibregl-canvas-container.maplibregl-interactive:active,
.spmap--picker .maplibregl-canvas {
  cursor: crosshair;
}

.sp-picker {
  display: grid;
  gap: 10px;
}

.sp-picker__rule {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--yellow-soft);
  color: var(--yellow-ink);
  font-size: 13px;
}

.sp-picker__fields {
  display: grid;
  gap: 10px;
}

.sp-picker__hint {
  color: var(--muted);
  font-size: 12px;
}

.sp-point {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.sp-point__legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.sp-point__coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .spmap__canvas {
    min-height: var(--map-height, 440px);
    height: var(--map-height, 440px);
  }
}


/* ============================================================================
   Map-first home (wave 1) � ����� �� ���� �����, ������ ��������� ������ ��,
   ������ ������ �� �������. �� �������� �� �� �������� ���������� ����� �������.
   ========================================================================== */

.app--map {
  --home-header: 60px;
  --home-tabbar: 66px;
  --home-peek: 92px;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
  background: var(--map-bg);
}

.app--map .app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
}

.app--map .app-header .brand__text small {
  display: none;
}

.app--map .state-bar {
  display: none;
}

.app--map .app-main {
  height: 100dvh;
  padding: 0;
}

.app--map .tabbar {
  z-index: 45;
  background: var(--glass-strong);
}

.home {
  position: relative;
  height: calc(100dvh - (var(--home-tabbar) + env(safe-area-inset-bottom)));
  overflow: hidden;
  background: var(--map-bg);
}

.home [hidden],
.home__tiles[hidden],
.home__peek-repeat[hidden] {
  display: none !important;
}

.home__map {
  position: absolute;
  inset: 0;
}

.home__map .spmap {
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--map-bg);
}

.home__map .spmap__canvas {
  height: 100%;
  min-height: 0;
}

.home__map .spmap__hint,
.home__map .spmap__legend {
  display: none;
}

.home__map .maplibregl-ctrl-top-right {
  top: 132px;
}

.home__map .maplibregl-ctrl-group {
  display: none;
}

.home__top {
  position: absolute;
  top: calc(var(--home-header) + env(safe-area-inset-top) + 8px);
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass-strong);
  box-shadow: 0 8px 24px rgba(15, 23, 32, 0.1);
  color: var(--muted);
}

.home-search:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 23, 32, 0.08), 0 8px 24px rgba(15, 23, 32, 0.12);
}

.home-search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

.home-search input::placeholder {
  color: var(--muted-soft, var(--muted-soft));
}

.home-search__clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.home-filters::-webkit-scrollbar {
  display: none;
}

.home-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: 0 2px 8px rgba(15, 23, 32, 0.07);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.home-chip:hover {
  background: var(--bg);
}

.home__locate {
  position: absolute;
  right: 12px;
  bottom: calc(var(--home-peek) + 212px);
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 8px 22px rgba(15, 23, 32, 0.14);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: bottom 0.2s ease;
}

.home.has-group .home__locate {
  bottom: calc(var(--home-peek) + 14px);
}

.home__locate.is-active {
  border-color: var(--blue);
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.home__locate.is-busy {
  opacity: 0.6;
}

.home__tiles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--home-peek) + 8px);
  z-index: 18;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 92px);
  grid-auto-columns: 112px;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 12px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.home__tiles::-webkit-scrollbar {
  display: none;
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  height: 92px;
  padding: 8px 9px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass-strong);
  box-shadow: 0 6px 18px rgba(15, 23, 32, 0.1);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.cat-tile:hover {
  border-color: var(--line-strong);
  background: var(--bg);
}

.cat-tile.is-selected {
  border-color: var(--yellow);
  background: var(--yellow);
}

.cat-tile:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.cat-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 3px;
  border-radius: 11px;
  background: var(--yellow-soft);
  color: var(--ink);
}

.cat-tile.is-selected .cat-tile__icon {
  background: var(--glass-soft);
}

.cat-tile__label {
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-tile__meta {
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.cat-tile.is-selected .cat-tile__meta {
  color: var(--yellow-ink);
}

.cat-tile__count {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-solid);
  font-size: 10px;
  font-weight: 750;
  line-height: 18px;
  text-align: center;
}

.cat-tile.is-selected .cat-tile__count {
  background: var(--bg);
  color: var(--ink);
}

.cat-tile:disabled .cat-tile__count {
  background: var(--surface-3);
  color: var(--muted);
}

.home__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  height: var(--home-peek);
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  box-shadow: 0 -14px 40px rgba(15, 23, 32, 0.14);
  transition: height 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: hidden;
}

.home__sheet[data-mode='half'] {
  height: 46%;
}

.home__sheet[data-mode='full'] {
  height: calc(100% - var(--home-header) - env(safe-area-inset-top) - 6px);
  border-radius: 20px 20px 0 0;
}

.home__grabber {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.home__grabber span {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.home__peek {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px 12px;
}

.home__peek-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.home__peek-text strong {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home__peek-text span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.home__peek-repeat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.home__peek-open {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home__peek-open svg {
  transform: rotate(180deg);
}

.home__sheet-body {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.home__sheet[data-mode='half'] .home__sheet-body,
.home__sheet[data-mode='full'] .home__sheet-body {
  display: flex;
}

.home__sheet[data-mode='half'] .home__peek,
.home__sheet[data-mode='full'] .home__peek {
  display: none;
}

.home__sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 16px 10px;
}

.home__sheet-head h2 {
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.home__sheet-head p {
  margin-top: 2px;
}

.home__all {
  flex: none;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.home-active {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
}

.home-active::-webkit-scrollbar {
  display: none;
}

.home-active__order {
  flex: none;
  margin-left: auto;
}

.offer-card {
  border-left: 4px solid var(--accent, var(--yellow));
}

.offer-card .kv-list {
  margin: 8px 0;
}


.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}

.active-chip--group {
  background: var(--yellow-soft);
  border-color: var(--yellow);
  font-weight: 750;
}

.active-chip.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-solid);
}

.active-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.active-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--overlay-soft);
  font-size: 9.5px;
  font-weight: 750;
}

.active-chip.is-selected .active-chip__count {
  background: var(--glass-faint);
}

.home-repeat-slot:empty {
  display: none;
}

.home-repeat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  padding: 9px 11px;
  border: 1px solid var(--yellow);
  border-radius: 14px;
  background: var(--yellow-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.home-repeat--disabled {
  border-color: var(--line);
  background: var(--surface);
  cursor: default;
}

.home-repeat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
}

.home-repeat__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.home-repeat__body strong {
  font-size: 12.5px;
  line-height: 1.25;
}

.home-repeat__body span {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-repeat__cta {
  flex: none;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.home-repeat--disabled .home-repeat__cta {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.home__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 12px 10px;
  overscroll-behavior: contain;
}

.home-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.home-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(15, 23, 32, 0.07);
}

.home-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(15, 23, 32, 0.12);
}

.home-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--yellow-soft);
  color: var(--ink);
}

.home-card__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.home-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.home-card__top strong {
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card__top .chip {
  flex: none;
  font-size: 10px;
  padding: 2px 7px;
}

.home-card__meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.home-card__price {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.home-card__price small {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.home-card__km {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-card__chevron {
  flex: none;
  color: var(--muted-soft);
}

.home__note {
  flex: none;
  margin: 0;
  padding: 9px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px 26px;
  text-align: center;
}

.home-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.home-empty strong {
  font-size: 15px;
}

.home-empty p {
  max-width: 30ch;
  color: var(--muted);
  font-size: 12px;
}

.home__pop {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 32, 0.24);
}

.home__pop[hidden] {
  display: none !important;
}

.home-pop__card {
  width: 100%;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  box-shadow: 0 -16px 50px rgba(15, 23, 32, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-pop__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-pop__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-pop__options--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.home-pop__options button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.home-pop__options button.is-active {
  border-color: var(--yellow);
  background: var(--yellow-soft);
  font-weight: 800;
}

.home-pop__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.home-pop__field input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
}

.home-pop__hint {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

/* Marker selection and the �� ������ dot. */
.spmap__icon.is-selected .spmap__pin {
  box-shadow: 0 0 0 3px var(--ink), 0 4px 14px rgba(15, 23, 32, 0.22);
  transform: scale(1.06);
}

/* The badge is centred by its own translate, so the selected scale must keep it. */
.spmap__icon.is-selected .spmap__pin--badge {
  transform: translate(-50%, -50%) scale(1.06);
}

.spmap__pin--blue {
  --pin: var(--blue);
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .app-header {
    gap: 6px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-header .app-header__nav {
    margin-left: 4px;
    gap: 0;
  }

  .app-header .app-header__nav a {
    gap: 5px;
    padding: 0 9px;
    font-size: 12.5px;
  }

  .app-header .demo-badge {
    display: none;
  }

  .user-chip {
    max-width: 118px;
  }
}

@media (min-width: 1024px) {
  .app-header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 10px;
    margin-right: auto;
  }

  .app-header__nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 650;
  }

  .app-header__nav a:hover {
    background: var(--surface-3);
    color: var(--ink);
  }

  .app-header__nav a[aria-current='page'] {
    background: var(--yellow-soft);
    color: var(--yellow-ink);
  }

  .tabbar {
    display: none;
  }

  .app:not(.app--map) {
    max-width: 1120px;
    padding-bottom: 0;
  }

  .app:not(.app--map) .app-main {
    max-width: 760px;
    margin: 0 auto;
    padding-top: 26px;
  }

  .app--map .app-header {
    position: relative;
  }

  .home {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    height: calc(100dvh - var(--home-header));
    background: var(--bg);
  }

  .home__map {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1 / -1;
    min-height: 0;
  }

  .home__map .spmap__legend {
    display: inline-flex;
    bottom: 14px;
  }

  .home__top {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    grid-column: 1;
    grid-row: 1;
    padding: 14px 14px 10px;
    background: var(--bg);
    border-right: 1px solid var(--line);
    box-shadow: none;
  }

  .home__tiles {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 2;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 78px;
    gap: 6px;
    overflow: visible;
    padding: 0 14px 10px;
    background: var(--bg);
    border-right: 1px solid var(--line);
  }

  .home__tiles .cat-tile {
    height: 78px;
    padding: 7px 8px;
    gap: 1px;
  }

  .home__tiles .cat-tile__icon {
    width: 26px;
    height: 26px;
    margin-bottom: 1px;
    border-radius: 9px;
  }

  .home__tiles .cat-tile__icon svg {
    width: 18px;
    height: 18px;
  }

  .home__tiles .cat-tile__label {
    font-size: 10.5px;
    line-height: 1.1;
  }

  .home__tiles .cat-tile__meta {
    font-size: 9px;
  }

  .home__tiles .cat-tile__count {
    top: 5px;
    right: 5px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    line-height: 16px;
  }

  .home__sheet {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 3;
    height: auto;
    min-height: 0;
    border-radius: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
    transition: none;
  }

  .home__grabber,
  .home__peek {
    display: none !important;
  }

  .home__sheet-body {
    display: flex !important;
  }

  .home__sheet-head {
    padding: 4px 14px 10px;
  }

  .home-active {
    padding: 0 14px 10px;
  }

  .home-repeat {
    width: calc(100% - 28px);
    margin: 0 14px 10px;
  }

  .home__list {
    padding: 0 14px 10px;
  }

  .home__note {
    padding: 9px 14px 12px;
  }

  .home__locate {
    bottom: 46px;
    right: 18px;
    font-size: 13px;
  }

  .home__pop {
    align-items: center;
    justify-content: center;
  }

  .home-pop__card {
    width: 360px;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 32, 0.24);
  }

  .home__map .maplibregl-ctrl-top-right {
    top: 10px;
  }

  .home__map .maplibregl-ctrl-group {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home__sheet,
  .home__locate {
    transition: none;
  }
}

/* ------------------------------------------------------------------ chat */

.chat-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 520px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-head__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-head__people {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.chat-head__person {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-head__aside {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-head__readonly {
  flex: 1 1 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--yellow-soft);
  color: var(--yellow-ink);
  font-size: 13px;
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: 320px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, transparent), transparent 120px),
    var(--bg);
  padding: 14px;
  overscroll-behavior: contain;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-older {
  align-self: center;
  margin-bottom: 6px;
}

.chat-day {
  align-self: center;
  margin: 6px 0;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-day span {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.chat-msg {
  max-width: 78%;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg.is-mine {
  align-self: flex-end;
  background: var(--yellow-soft);
  border-color: color-mix(in srgb, var(--yellow) 32%, var(--line));
  color: var(--ink);
}

.chat-msg.is-owner {
  background: var(--surface-2);
}

.chat-msg__author {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.chat-msg p {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-msg__meta {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.chat-msg__receipt {
  margin-left: 6px;
}

.chat-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.chat-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.chat-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-photo.is-loading {
  opacity: 0.6;
}

.chat-photo.is-pending,
.chat-photo.is-rejected {
  cursor: default;
  padding: 6px;
  text-align: center;
}

.chat-photo.is-rejected {
  color: var(--red-ink);
  background: var(--red-soft);
}

.chat-composer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-composer--blocked {
  background: var(--surface);
  color: var(--muted);
}

.chat-composer__row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-composer__input {
  flex: 1 1 auto;
  resize: none;
  min-height: 42px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}

.chat-composer__input:focus {
  outline: 2px solid color-mix(in srgb, var(--yellow) 55%, transparent);
  outline-offset: 1px;
}

.chat-composer__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-draft-photo {
  position: relative;
  width: 84px;
  height: 64px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.chat-draft-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-draft-photo__remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 32, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.chat-composer__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 16px;
}

.chat-composer__foot .danger {
  color: var(--red-ink);
}

.chat-card__preview {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.chat-card__preview p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chat-card__unread {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.chat-photo-dialog {
  width: min(920px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #0c1117;
  color: #fff;
  overflow: hidden;
}

.chat-photo-dialog::backdrop {
  background: var(--overlay);
}

.chat-photo-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #dfe7ef;
}

.chat-photo-dialog img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 54px);
  object-fit: contain;
  background: #05080b;
}

.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 640px) {
  .chat-screen {
    min-height: 0;
  }

  .chat-scroll {
    max-height: none;
    min-height: 55vh;
  }

  .chat-msg {
    max-width: 88%;
  }

  .chat-head {
    gap: 8px;
  }
}
