/* Палитра «Навигатор.Вес» — как на лендинге и в Android-приложении. */
:root {
  --brand-400: #fb923c;
  --brand-500: #f97316;
  --brand-600: #ea580c;
  --amber-500: #f59e0b;
  --dark-950: #09090b;
  --dark-900: #0f0f11;
  --dark-800: #18181b;
  --zinc-800: #27272a;
  --zinc-700: #3f3f46;
  --zinc-500: #71717a;
  --zinc-400: #a1a1aa;
  --zinc-300: #d4d4d8;
  --zinc-100: #f4f4f5;
  --ok: #34d399;
  --danger: #f43f5e;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--dark-950);
  color: var(--zinc-100);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.view { position: fixed; inset: 0; }

/* ---------- бренд ---------- */
.logo-tile {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-500), #d97706);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, .35);
}
.logo-tile.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; box-shadow: 0 4px 12px rgba(249,115,22,.3); }
.brand { font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 0; }
.brand span { color: var(--brand-500); }
.brand.sm { font-size: 17px; }
/* значок версии PRO рядом с названием */
.pro {
  display: inline-block; vertical-align: middle; margin-left: 2px;
  font-size: .5em; font-weight: 800; letter-spacing: .08em; line-height: 1;
  padding: .32em .5em .28em; border-radius: 6px; color: #fff;
  background: linear-gradient(135deg, var(--brand-500), #d97706);
  box-shadow: 0 2px 8px rgba(249, 115, 22, .35); position: relative; top: -.15em;
}
.brand.sm .pro { font-size: 10px; border-radius: 5px; }
.brand-sub { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--zinc-400); font-weight: 600; }

/* ---------- вход ---------- */
.login {
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(234, 88, 12, .14), transparent 70%),
    var(--dark-950);
  overflow-y: auto;
}
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.login-card h1 { font-size: 30px; margin-top: 10px; }
.login-card form { width: 100%; margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.field > span { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--zinc-400); margin-bottom: 6px; letter-spacing: .04em; }
.hint { font-size: 12px; color: var(--zinc-500); text-align: center; margin-top: 18px; }
.error { color: #fda4af; background: rgba(244, 63, 94, .1); border: 1px solid rgba(244, 63, 94, .3); padding: 10px 12px; border-radius: 12px; font-size: 13px; }

/* ---------- поля и кнопки ---------- */
.input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px;
  transition: border-color .15s;
}
.input-wrap:focus-within { border-color: var(--brand-500); }
.input-wrap > i { position: absolute; left: 14px; color: var(--brand-500); font-size: 14px; pointer-events: none; }
.input-wrap > i.amber { color: var(--amber-500); }
.input-wrap input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  padding: 13px 14px 13px 40px; font-size: 16px; /* 16px — iOS не зумит при фокусе */
}
.input-wrap input::placeholder { color: var(--zinc-500); }
.mini-btn { background: none; border: 0; color: var(--zinc-400); padding: 0 14px; height: 44px; cursor: pointer; }
.mini-btn:active { color: var(--brand-400); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border-radius: 12px; border: 0;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--brand-500); color: #fff; box-shadow: 0 8px 24px rgba(249, 115, 22, .25); width: 100%; }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: var(--zinc-800); color: var(--zinc-100); border: 1px solid var(--zinc-700); }

.icon-btn {
  width: 46px; height: 46px; border-radius: 14px; cursor: pointer;
  background: rgba(24, 24, 27, .92); border: 1px solid var(--zinc-700); color: var(--zinc-100);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.icon-btn:active { color: var(--brand-400); }
/* слежение выключено — кнопка подсвечена, нажатие вернёт карту к водителю */
.icon-btn.active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; box-shadow: 0 6px 18px rgba(249,115,22,.4); }

/* ---------- карта ---------- */
#map { position: absolute; inset: 0; background: #1b1b1f; }
.topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 10;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(9,9,11,.92), rgba(9,9,11,0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  background: rgba(9, 9, 11, .8); border: 1px solid var(--zinc-800);
  padding: 5px 14px 5px 5px; border-radius: 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.fab-col { display: flex; flex-direction: column; gap: 10px; }
/* светофор: выключен — обычная кнопка; включён — цвет по баллу пробок */
.traffic-btn { position: relative; }
.traffic-btn.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.traffic-btn.on[data-level="mid"] { background: #ca8a04; border-color: #ca8a04; }
.traffic-btn.on[data-level="high"] { background: #dc2626; border-color: #dc2626; }
.traffic-level {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #fff; color: #09090b; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.fab-col { position: absolute; right: 16px; z-index: 10; bottom: calc(var(--sheet-h, 260px) + 16px); transition: bottom .2s; }

/* ---------- нижняя панель ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--dark-900); border: 1px solid var(--zinc-800); border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(var(--safe-bottom) + 16px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  max-width: 560px; margin: 0 auto;
}
.sheet-handle-area { margin: -8px -16px 4px; padding: 10px 0 12px; cursor: grab; touch-action: none; }
.sheet-handle-area:active { cursor: grabbing; }
.sheet-handle { width: 44px; height: 5px; border-radius: 5px; background: var(--zinc-700); margin: 0 auto; transition: background .15s; }
.sheet-handle-area:hover .sheet-handle, .sheet.collapsed .sheet-handle { background: var(--brand-500); }
.route-inputs { display: flex; flex-direction: column; gap: 8px; }
.suggest {
  background: var(--dark-950); border: 1px solid var(--zinc-700); border-radius: 12px;
  overflow: hidden; margin-top: -2px; max-height: 40vh; overflow-y: auto;
}
.suggest button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--zinc-800);
}
.suggest button:last-child { border-bottom: 0; }
.suggest button:active, .suggest button:hover { background: var(--dark-800); }
.suggest b { display: block; font-size: 15px; font-weight: 600; }
.suggest span { display: block; font-size: 12px; color: var(--zinc-400); margin-top: 2px; }
.chips { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span {
  display: inline-block; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--dark-800); border: 1px solid var(--zinc-700); color: var(--zinc-400);
}
.chip input:checked + span { background: rgba(249, 115, 22, .15); border-color: var(--brand-500); color: var(--brand-400); }

.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.caption { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--zinc-500); }
.result-title { font-size: 17px; font-weight: 700; margin-top: 2px; }
.badge { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.badge.ok { color: var(--ok); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .3); }
.badge.warn { color: var(--brand-400); background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; padding: 10px; min-width: 0; }
.stat span { display: block; font-size: 11px; color: var(--zinc-500); }
.stat b { display: block; font-size: 17px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orange { color: var(--brand-400); }
.note { font-size: 13px; color: var(--zinc-300); background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; }
.row .btn-ghost { width: 56px; flex-shrink: 0; }

.nav-instr { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.nav-instr > i {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: var(--brand-500); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.nav-dist { font-size: 26px; font-weight: 800; }
.nav-text { font-size: 15px; color: var(--zinc-300); }
#stopNavBtn { width: 100%; }

/* ---------- меню / тост ---------- */
.menu { position: absolute; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); display: flex; justify-content: flex-end; }
.menu-card {
  width: min(320px, 86vw); height: 100%; background: var(--dark-900); border-left: 1px solid var(--zinc-800);
  padding: calc(var(--safe-top) + 24px) 16px 24px; display: flex; flex-direction: column; gap: 6px;
}
.menu-user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--zinc-800); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-500); display: flex; align-items: center; justify-content: center; }
.menu-item { background: none; border: 0; text-align: left; padding: 14px 8px; border-radius: 10px; cursor: pointer; display: flex; gap: 12px; align-items: center; font-size: 15px; }
.menu-item i { color: var(--brand-400); width: 20px; }
.menu-item:active { background: var(--dark-800); }
.menu-item.danger, .menu-item.danger i { color: var(--danger); }
.topbar-actions { display: flex; gap: 8px; }

/* компактная группа значков на карте */
.cl {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 700 12px/26px Inter, system-ui, sans-serif;
  text-align: center; border: 2px solid rgba(255,255,255,.9); box-sizing: border-box; box-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* ---------- варианты маршрута (обзор) ---------- */
.variants { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.variants::-webkit-scrollbar { display: none; }
.variant {
  flex: 1 0 0; min-width: 104px; text-align: left; cursor: pointer; position: relative;
  background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; padding: 9px 11px;
}
.variant b { display: block; font-size: 16px; font-weight: 800; }
.variant small { display: block; font-size: 11.5px; color: var(--zinc-400); margin-top: 2px; white-space: nowrap; }
.variant em { position: absolute; top: -8px; right: 8px; font-style: normal; font-size: 10px; font-weight: 700;
  background: var(--dark-800); border: 1px solid var(--zinc-700); color: var(--zinc-300); border-radius: 6px; padding: 1px 6px; }
.variant .v-ok { color: var(--ok); }
.variant .v-warn { color: var(--brand-400); }
.variant.on { border-color: var(--brand-500); background: rgba(249, 115, 22, .12); }
.variant.on b { color: var(--brand-400); }
#resultPeekEnd { margin-bottom: 12px; }

/* ---------- режим обхода и список объездов ---------- */
.mode-row { margin: -2px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.seg-sm span { padding: 8px; font-size: 13px; }
.detour-limit { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--zinc-400); }
.detour-limit select {
  background: var(--dark-950); color: var(--zinc-100); border: 1px solid var(--zinc-700); border-radius: 10px;
  padding: 6px 10px; font: inherit; font-size: 14px;
}
.detour-list { margin-bottom: 12px; border: 1px solid var(--zinc-800); border-radius: 12px; overflow: hidden; max-height: 34vh; overflow-y: auto; }
.detour-head { font-size: 13px; padding: 9px 12px; background: var(--dark-950); color: var(--zinc-300); border-bottom: 1px solid var(--zinc-800); }
.detour-head b { color: var(--brand-400); }
.detour-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--zinc-800); padding: 8px 12px;
}
.detour-row:last-child { border-bottom: 0; }
.detour-row:hover { background: var(--dark-800); }
.detour-row img { width: 24px; height: 28px; flex-shrink: 0; }
.detour-row span { flex: 1; min-width: 0; }
.detour-row b { display: block; font-size: 14px; font-weight: 600; }
.detour-row small { display: block; font-size: 12px; color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detour-row.skipped small { color: var(--danger); }
.detour-row > i { color: var(--zinc-500); font-size: 13px; }

/* ---------- полоска прогресса пути ---------- */
.progress {
  position: absolute; z-index: 15; left: 16px; right: 16px; top: calc(var(--safe-top) + 68px);
  background: rgba(15, 15, 17, .94); border: 1px solid var(--zinc-800); border-radius: 16px;
  padding: 10px 14px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.prog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.prog-next { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-next img { width: 18px; height: 21px; flex-shrink: 0; }
.prog-next b { color: var(--brand-400); }
.prog-left { color: var(--zinc-400); flex-shrink: 0; }
.prog-left b { color: var(--zinc-100); }
.prog-track { position: relative; height: 30px; margin: 4px 8px 0; }
.prog-bar { position: absolute; left: 0; right: 0; top: 13px; height: 5px; border-radius: 5px; background: var(--zinc-700); overflow: hidden; }
.prog-fill { height: 100%; width: 0; background: var(--zinc-500); transition: width .4s; }
.prog-start, .prog-finish { position: absolute; top: 9px; width: 13px; height: 13px; border-radius: 50%; transform: translateX(-50%); }
.prog-start { left: 0; background: var(--brand-500); border: 2px solid #fff; }
.prog-finish { left: 100%; top: 6px; width: auto; height: auto; color: var(--amber-500); font-size: 15px; transform: translateX(-30%); }
.prog-ticks { position: absolute; inset: 0; }
.prog-tick { position: absolute; top: 0; width: 15px; height: 18px; transform: translateX(-50%); }
.prog-tick.passed { opacity: .35; filter: grayscale(1); }
.prog-me {
  position: absolute; top: 4px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-500); border: 2px solid #fff; color: #fff; font-size: 10px; z-index: 2;
  display: flex; align-items: center; justify-content: center; transition: left .4s; box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.prog-me i { transform: rotate(45deg); }
.prog-counts { font-size: 11px; color: var(--zinc-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-counts:empty { display: none; }
@media (min-width: 900px) {
  .progress { left: 440px; right: 90px; max-width: 760px; top: 16px; }
}

/* ---------- контекстное меню карты ---------- */
.ctx-menu {
  position: absolute; z-index: 35; min-width: 210px; max-width: 280px; padding: 6px;
  background: var(--dark-900); border: 1px solid var(--zinc-700); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55); animation: ctxIn .12s ease-out;
}
@keyframes ctxIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ctx-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 10px; padding: 11px 12px; font-size: 15px;
}
.ctx-menu button:hover, .ctx-menu button:active { background: var(--dark-800); }
.ctx-menu button i { width: 18px; text-align: center; color: var(--brand-500); }
.ctx-menu button i.amber { color: var(--amber-500); }
.ctx-addr { font-size: 13px; color: var(--zinc-300); padding: 4px 12px 8px 42px; line-height: 1.35; }
.ctx-menu .ctx-coords { border-top: 1px solid var(--zinc-800); border-radius: 0 0 10px 10px; margin-top: 4px; font-size: 13px; color: var(--zinc-400); font-variant-numeric: tabular-nums; }
.ctx-menu .ctx-coords i { color: var(--zinc-500); }

/* ---------- транспортные средства ---------- */
.vehicle-btn {
  width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 8px; cursor: pointer; text-align: left;
  background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; padding: 9px 14px;
}
.vehicle-btn > i:first-child { color: var(--brand-500); font-size: 17px; width: 20px; text-align: center; }
.vehicle-btn span { flex: 1; min-width: 0; }
.vehicle-btn b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-btn small { display: block; font-size: 12px; color: var(--zinc-400); }
.vehicle-btn .chev { color: var(--zinc-500); font-size: 12px; }
.veh-row {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--zinc-800);
  border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: var(--dark-950);
}
.veh-row > i { color: var(--zinc-400); font-size: 18px; width: 22px; text-align: center; }
.veh-row.on { border-color: var(--brand-500); background: rgba(249,115,22,.1); }
.veh-row.on > i { color: var(--brand-500); }
.veh-txt { flex: 1; min-width: 0; }
.veh-txt b { display: block; font-size: 15px; }
.veh-txt small { display: block; font-size: 12px; color: var(--zinc-400); margin-top: 2px; }
.veh-add { width: 100%; margin-top: 4px; }
#vehForm { display: flex; flex-direction: column; gap: 12px; }
#vehForm.hidden { display: none !important; }
.presets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-top: -6px; scrollbar-width: none; }
.preset {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; white-space: nowrap;
  background: var(--dark-800); border: 1px solid var(--zinc-700); border-radius: 10px; padding: 8px 12px; color: var(--zinc-300);
}
.preset i { color: var(--brand-400); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input { display: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 12px; cursor: pointer;
  background: var(--dark-950); border: 1px solid var(--zinc-800); color: var(--zinc-400); font-weight: 600; font-size: 14px;
}
.seg input:checked + span { border-color: var(--brand-500); background: rgba(249,115,22,.12); color: var(--brand-400); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; }
.grid2 .input-wrap input { padding-left: 38px; }
#truckFields { display: flex; flex-direction: column; gap: 10px; }
#truckFields.hidden { display: none !important; }
.veh-actions .btn-primary { flex: 1; }
.veh-actions .btn-ghost { width: 56px; }

/* ---------- слои ---------- */
.layers { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.layers-card {
  width: 100%; max-width: 560px; background: var(--dark-900); border: 1px solid var(--zinc-800); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 14px 16px calc(var(--safe-bottom) + 18px); max-height: 85vh; overflow-y: auto;
}
.layers-head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; margin-bottom: 12px; }
.maptypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.maptype {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; cursor: pointer;
  background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; font-size: 13px; color: var(--zinc-400);
}
.maptype i { font-size: 18px; }
.maptype.on { border-color: var(--brand-500); background: rgba(249,115,22,.12); color: var(--brand-400); }
.layers-sub { margin: 14px 2px 4px; }
.layer-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; cursor: pointer; border-bottom: 1px solid var(--zinc-800); }
.layer-row:last-child { border-bottom: 0; }
.layer-row img { width: 28px; height: 33px; }
.layer-row > i.fa-solid { width: 28px; text-align: center; color: var(--brand-400); font-size: 18px; }
.layer-row span { flex: 1; font-size: 15px; }
.layer-row input { display: none; }
.switch { width: 44px; height: 26px; border-radius: 26px; background: var(--zinc-800); position: relative; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.layer-row input:checked + .switch { background: var(--brand-500); }
.layer-row input:checked + .switch::after { transform: translateX(18px); }
.osm-hint { text-transform: none; letter-spacing: 0; margin-top: 10px; line-height: 1.4; }
.menu-label { margin: 6px 8px 2px; }
.trailer-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px dashed var(--zinc-700); border-radius: 12px; }
.trailer-hint { text-transform: none; letter-spacing: 0; }
.field.computed .input-wrap { background: var(--dark-800); }
.field.computed input { color: var(--brand-400); font-weight: 700; }
.marker-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--zinc-800); margin-bottom: 4px; }
.marker-opt {
  background: var(--dark-950); border: 1px solid var(--zinc-800); border-radius: 12px; cursor: pointer;
  padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--zinc-400);
}
.marker-opt svg { width: 40px; height: 40px; }
.marker-opt.on { border-color: var(--brand-500); background: rgba(249,115,22,.12); color: var(--brand-400); }
/* маркер водителя на карте: центрируем 48×48 на точке, плавный поворот */
.me-marker { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; transition: transform .4s ease; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.ver { margin-top: auto; text-transform: none; }
.toast {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 50;
  top: calc(var(--safe-top) + 70px); max-width: calc(100% - 32px);
  background: var(--dark-800); border: 1px solid var(--zinc-700); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ---------- ПК: панель маршрута сбоку, как в Яндекс Картах ---------- */
@media (min-width: 900px) {
  .sheet {
    top: 84px; left: 16px; right: auto; bottom: auto; margin: 0;
    width: 400px; max-width: none; max-height: calc(100vh - 100px); overflow-y: auto;
    border: 1px solid var(--zinc-800); border-radius: 20px;
    padding: 18px 18px 18px; transform: none !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    scrollbar-width: thin; scrollbar-color: var(--zinc-700) transparent;
  }
  .sheet-handle-area { display: none; }
  .fab-col { bottom: 24px !important; }
  .topbar { background: none; }
  .topbar-brand { width: 400px; padding-right: 16px; }
  .toast { left: calc(16px + 200px); }
  /* окна слоёв и ТС — по центру, а не снизу */
  .layers { align-items: center; }
  .layers-card { border-radius: 20px; border-bottom: 1px solid var(--zinc-800); max-width: 480px; padding-bottom: 20px; }
  .menu-card { border-radius: 0; }
  .btn:hover { filter: brightness(1.08); }
  .veh-row:hover, .maptype:hover, .preset:hover, .vehicle-btn:hover { border-color: var(--zinc-700); }
  .suggest { max-height: 50vh; }
}

/* Тёмная карта Яндекса: v2.1 не имеет ночной схемы, затемняем тайлы фильтром. */
#map.dark [class*="ground-pane"] { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
