:root {
  --g: #0f8a5f; --g-d: #0b6b4a; --g-l: #e7f6ef;
  --y: #ffc21a; --y-l: #fff6d6;
  --red: #dc2626; --red-l: #fee2e2;
  --blue: #2563eb;
  --ink: #111827; --mut: #6b7280; --line: #e5e7eb;
  --bg: #f4f6f5; --card: #fff;
  --r: 16px;
  --shadow: 0 8px 28px rgba(17, 24, 39, .12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; overflow: hidden; font-size: 16px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h2 { font-size: 20px; } h3 { font-size: 17px; }
p { margin: 6px 0; }
a { color: var(--g-d); }
.muted { color: var(--mut); } .small { font-size: 13px; } .center { text-align: center; } .right { text-align: right; }
[hidden] { display: none !important; }

/* ---------- шапка ---------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: calc(6px + env(safe-area-inset-top)) 12px 6px; background: #fff; border-bottom: 1px solid var(--line); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.brand img { border-radius: 9px; }
.brand b { font-size: 19px; letter-spacing: -.02em; display: block; line-height: 1; }
.brand small { color: var(--g-d); font-size: 12px; font-weight: 600; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.roles { order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(4, 1fr); background: #eef1ef; border-radius: 12px; padding: 3px; gap: 3px; }
.roles button { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-size: 14px; font-weight: 600; color: var(--mut); display: flex; gap: 5px; align-items: center; justify-content: center; }
.roles button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
@media (max-width: 519px) {
  .roles button { font-size: 13px; padding: 8px 2px; }
  .roles button span { display: none; }
}
@media (min-width: 760px) {
  .roles { order: 0; flex-basis: auto; width: 560px; }
  .brand { flex: 0 1 auto; margin-right: auto; }
}
main { position: relative; overflow: hidden; min-height: 0; }
.boot { display: grid; place-items: center; height: 100%; color: var(--mut); }
.foot { font-size: 11px; color: var(--mut); text-align: center; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }

/* ---------- общие элементы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 15px; text-decoration: none; min-height: 46px; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--g); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: #eef1ef; color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-navi { background: var(--y); color: #1f2937; }
.btn-xl { width: 100%; min-height: 56px; font-size: 17px; margin-top: 10px; }
.linkbtn { border: 0; background: none; color: var(--g-d); padding: 4px 0; font-size: 13px; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; gap: 8px; }
.chips.scroll-x { overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--g); border-color: var(--g); color: #fff; }
.chip-strong { background: var(--g-l); border-color: #bfe6d3; color: var(--g-d); font-weight: 700; }
.dotc { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: #eef1ef; color: var(--ink); white-space: nowrap; }
.badge-green { background: var(--g-l); color: var(--g-d); }
.badge-yellow { background: var(--y-l); color: #8a5a00; white-space: normal; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row2 { display: flex; gap: 10px; align-items: stretch; }
.row2 > * { flex: 1; }
.row2 .btn-xl { margin-top: 10px; }
.alert { background: var(--red-l); color: #7f1d1d; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 8px 0; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.alert .btn { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.sec { margin: 16px 0 8px; font-size: 15px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.dot.a { background: var(--g); } .dot.b { background: var(--red); }
.avatar { border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.plate { display: inline-flex; align-items: center; gap: 4px; border: 2px solid #1f2937; border-radius: 6px; padding: 2px 6px; font-weight: 800; font-size: 14px; background: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plate small { font-size: 9px; background: var(--g); color: #fff; border-radius: 3px; padding: 1px 3px; }
.stars { color: #b7791f; font-weight: 700; font-size: 14px; }
.req { background: #f8faf9; border: 1px dashed #b7c4bd; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.req b { display: block; font-size: 16px; margin: 2px 0; }

/* ---------- карта и маркеры ---------- */
/* фон под картой — «берег»: суша сверху справа, море снизу слева, без серого */
.map { background: linear-gradient(155deg, #eef5e8 0%, #e8f2e4 46%, #d6eaf3 54%, #cfe6f1 100%); }
.map.fill { position: absolute; inset: 0; }
.map-off { display: grid; place-items: center; }
.map-off-msg { color: var(--mut); text-align: center; padding: 20px; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.pin { display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); cursor: grab; }
.pin span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; border: 3px solid #fff; }
.pin::after { content: ""; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid #fff; margin-top: -3px; }
.pin-a span { background: var(--g); } .pin-b span { background: var(--red); }
.pin-wait span { background: #f59e0b; animation: blink 1.2s infinite; width: 26px; height: 26px; }
@keyframes blink { 50% { transform: scale(1.18); } }
/* position не задаём: у маркера MapLibre должно остаться position:absolute */
.car { width: 38px; height: 38px; }
.car-rot { width: 100%; height: 100%; transition: transform .35s linear; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.car-small { width: 26px; height: 26px; opacity: .9; }
.car-main { width: 44px; height: 44px; }
.car-x { width: 32px; height: 32px; }
.car-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #fff; border: 2px solid var(--pc, var(--g)); border-radius: 8px; font-size: 11px; font-weight: 700; padding: 0 5px; white-space: nowrap; }
.car.busy .car-label { background: #fff3db; }
.car.busy .car-rot svg rect:first-child { fill: #f59e0b; }

/* ---------- пассажир ---------- */
.p-screen { position: absolute; inset: 0; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 58%; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.14); z-index: 5;
}
.sheet-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 14px; }
.sheet-cta { flex: none; padding: 0 16px 10px; background: #fff; box-shadow: 0 -8px 14px -10px rgba(0,0,0,.25); }
.sheet-cta:empty { display: none; }
.cta-cancel { width: 100%; margin-top: 8px; }
.sheet-order { max-height: 60%; }
@media (min-width: 760px) {
  .sheet { left: 16px; right: auto; bottom: 16px; top: 16px; width: 400px; max-height: none; border-radius: 22px; }
  .sheet .grab { display: none; }
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: #d1d5db; margin: 4px auto 10px; }
.hello { font-size: 26px; letter-spacing: -.02em; }
.route-fields { position: relative; margin: 12px 0 6px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rf { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: #fff; padding: 11px 50px 11px 12px; text-align: left; min-height: 56px; }
.rf + .rf { border-top: 1px solid var(--line); }
.rf span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.rf span small { font-weight: 500; color: var(--mut); font-size: 12px; }
.rf em { color: var(--mut); font-style: normal; font-weight: 500; }
.rf.active { background: var(--g-l); box-shadow: inset 4px 0 0 var(--g); }
.rf-swap { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; }
.hint { font-size: 13px; color: var(--mut); margin: 4px 0 2px; }
.price-card { border: 1px solid #cfe9dc; background: linear-gradient(180deg, #f3fbf7, #fff); border-radius: 16px; padding: 14px; margin-top: 8px; }
.price-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.guarantee { margin-top: 10px; background: var(--g-l); color: var(--g-d); font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 10px; }
.guarantee span { font-weight: 500; }
.skeleton { height: 96px; display: flex; flex-direction: column; gap: 10px; }
.skeleton div { height: 22px; border-radius: 8px; background: linear-gradient(90deg, #eef1ef, #f8faf9, #eef1ef); background-size: 200% 100%; animation: sk 1.1s infinite; }
.skeleton div + div { width: 60%; }
@keyframes sk { to { background-position: -200% 0; } }
.opts, .pays { display: flex; flex-direction: column; gap: 8px; }
.opt, .pay { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 56px; cursor: pointer; }
.opt input, .pay input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span:nth-of-type(2), .pay > span:nth-of-type(2) { flex: 1; display: flex; flex-direction: column; font-size: 15px; }
.opt small, .pay small { color: var(--mut); font-size: 12px; }
.opt-ic, .pay-ic { font-size: 22px; width: 28px; text-align: center; }
.opt.on, .pay.on { border-color: var(--g); background: var(--g-l); }
.pay.soon { opacity: .55; cursor: not-allowed; }
.sw { width: 44px; height: 26px; border-radius: 13px; background: #d1d5db; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.opt.on .sw { background: var(--g); } .opt.on .sw::after { transform: translateX(18px); }
.for-other { display: grid; gap: 8px; margin-top: 8px; padding: 10px; background: #fafafa; border-radius: 12px; }
label { font-size: 13px; color: var(--mut); display: flex; flex-direction: column; gap: 4px; }
input:not([type]), input[type="text"], input[inputmode], select, textarea, .search { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 16px; color: var(--ink); background: #fff; width: 100%; }
.teaser { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.teaser div { background: #f8faf9; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; font-size: 13px; }
.teaser b { font-size: 13px; } .teaser span { color: var(--g-d); font-weight: 700; }
.teaser div:first-child { grid-column: 1 / -1; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); padding: 0; margin: 4px 0 14px; gap: 4px; }
.stepper li { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--mut); text-align: center; }
.stepper li i { height: 4px; border-radius: 2px; background: #e5e7eb; }
.stepper li.done i { background: var(--g); }
.stepper li.cur i { background: var(--y); }
.stepper li.cur { color: var(--ink); font-weight: 700; }
.searching { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.radar { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; }
.radar span { font-size: 30px; z-index: 1; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--g); opacity: 0; animation: radar 2.4s infinite; }
.radar i:nth-child(2) { animation-delay: .8s; } .radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.2); opacity: 0; } }
.mini-route { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 15px; }
.mini-route div { display: flex; gap: 8px; align-items: center; }
.price-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #f8faf9; font-size: 14px; }
.price-line b { font-size: 18px; }
.price-line span:not(.badge) { color: var(--mut); flex: 1; }
.status-head { margin-bottom: 10px; }
.driver-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.dc-main { flex: 1; min-width: 0; }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.act { border: 1px solid var(--line); background: #fff; border-radius: 14px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 22px; }
.act span { font-size: 13px; font-weight: 600; }
.act-sos { border-color: #fecaca; color: var(--red); }
.act-sos.on { background: var(--red); color: #fff; }
.nb { font-style: normal; background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.pay-box { text-align: center; padding: 14px; border-radius: 16px; background: var(--g-l); margin: 10px 0 12px; }
.pay-box .req { text-align: left; background: #fff; }
.paid { margin-top: 8px; font-weight: 700; color: var(--mut); }
.paid.yes { color: var(--g-d); }
.rate-stars { display: flex; justify-content: center; gap: 6px; }
.rate-stars button { border: 0; background: none; font-size: 40px; color: #d1d5db; padding: 0 2px; line-height: 1; }
.rate-stars button.on { color: #f5b301; }
.rate textarea { margin-top: 8px; resize: none; }
.rate .chips { margin-top: 10px; justify-content: center; }
.state-big { font-size: 52px; text-align: center; margin: 8px 0; }

/* ---------- модалки, чат, тосты ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; background: #fff; width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); } }
@media (min-width: 760px) { .modal-wrap { align-items: center; } .modal { border-radius: 22px; } }
.modal h3 { margin-right: 36px; margin-bottom: 10px; font-size: 19px; }
.modal-x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #eef1ef; font-size: 22px; line-height: 1; }
.modal-tall { height: 80dvh; display: flex; flex-direction: column; }
.modal-wide { max-width: 640px; }
.places { overflow-y: auto; flex: 1; margin-top: 10px; }
.pl-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); margin: 12px 0 4px; }
.pl { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f1f1f1; background: #fff; padding: 13px 4px; font-size: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 10px; }
.tbl td { padding: 8px 4px; border-bottom: 1px solid #f1f1f1; } .tbl td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.modal-chat { display: flex; flex-direction: column; height: 78dvh; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 2px; background: #f8faf9; border-radius: 12px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 16px; display: flex; flex-direction: column; font-size: 15px; margin: 0 8px; }
.msg time { font-size: 10px; opacity: .6; align-self: flex-end; }
.msg.me { align-self: flex-end; background: var(--g); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }
.chat-form .btn { width: 52px; }
.sos-calls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
#toasts { position: fixed; left: 50%; top: calc(110px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: #111827; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast.err { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(-8px); }

/* ---------- водитель ---------- */
.d-screen { position: absolute; inset: 0; overflow-y: auto; background: var(--bg); }
.d-top { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.d-top.is-online { background: linear-gradient(90deg, #fff, var(--g-l)); }
.d-who { flex: 1; min-width: 0; }
.d-who .plate { font-size: 12px; padding: 0 4px; }
.online-sw { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.online-sw input, .mini-sw input { position: absolute; opacity: 0; }
.online-sw i { width: 56px; height: 32px; border-radius: 16px; background: #d1d5db; position: relative; transition: background .15s; }
.online-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.online-sw input:checked + i { background: var(--g); }
.online-sw input:checked + i::after { transform: translateX(24px); }
.online-sw span { min-width: 64px; }
.d-map-wrap { position: relative; height: 30vh; min-height: 190px; }
.d-body { padding: 12px; max-width: 640px; margin: 0 auto; }
.waiting { display: flex; gap: 14px; align-items: center; }
.pulse-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 0 rgba(15,138,95,.6); animation: pulse 1.6s infinite; flex: none; margin: 0 6px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(15,138,95,0); } 100% { box-shadow: 0 0 0 0 rgba(15,138,95,0); } }
.balance { font-size: 32px; font-weight: 800; margin: 6px 0 2px; }
.balance.neg, .neg { color: var(--red); } .pos { color: var(--g-d); }
.mini-sw { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.mini-sw i { width: 40px; height: 24px; border-radius: 12px; background: #d1d5db; position: relative; flex: none; }
.mini-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mini-sw input:checked + i { background: var(--ink); } .mini-sw input:checked + i::after { transform: translateX(16px); }
.ledger { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.ledger li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid #f1f1f1; }
.ledger b { white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.kpis div { background: #f8faf9; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.kpis small { font-size: 11px; color: var(--mut); } .kpis b { font-size: 17px; } .kpis span { font-size: 11px; color: var(--mut); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 110px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 4px; }
.bar i { width: 100%; max-width: 28px; background: linear-gradient(180deg, #19b07c, var(--g)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar span { font-size: 11px; color: var(--mut); }
.com-line { margin: 10px 0 0; font-size: 14px; }
.pay-screen { text-align: center; } .pay-screen .req { text-align: left; }
.offer-wrap { position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.offer { background: #fff; width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .25s ease-out; }
.offer-head { display: flex; justify-content: space-between; align-items: center; }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: #eef1ef; } .ring-fg { stroke: var(--g); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 32px 32px; transition: stroke-dashoffset .2s linear; }
.ring text { font-size: 20px; font-weight: 800; fill: var(--ink); }

/* ---------- диспетчерская ---------- */
.x-screen { position: absolute; inset: 0; overflow-y: auto; }
.x-map-wrap { position: relative; height: 42vh; min-height: 260px; }
.x-side { padding: 12px; background: var(--bg); }
.x-new { position: absolute; top: 12px; left: 12px; z-index: 3; box-shadow: var(--shadow); }
.x-sos { position: absolute; top: 12px; right: 12px; left: 200px; z-index: 3; display: flex; justify-content: flex-end; }
.sos-banner { background: var(--red); color: #fff; font-weight: 700; padding: 10px 14px; border-radius: 12px; cursor: pointer; box-shadow: var(--shadow); animation: blink 1.4s infinite; font-size: 14px; }
.x-legend { position: absolute; left: 10px; bottom: 26px; z-index: 3; background: rgba(255,255,255,.92); border-radius: 10px; padding: 6px 10px; display: flex; gap: 10px; font-size: 12px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.lg.free { background: var(--y); border: 1px solid #1f2937; } .lg.busy { background: #f59e0b; } .lg.wait { background: #f59e0b; border-radius: 50% 50% 50% 0; } .lg.off { background: #d1d5db; }
.x-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.tile { background: #fff; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tile small { color: var(--mut); font-size: 12px; } .tile b { font-size: 20px; letter-spacing: -.01em; } .tile span { font-size: 11px; color: var(--mut); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e7ebe9; border-radius: 12px; padding: 3px; margin: 4px 0 10px; }
.seg button { border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 700; color: var(--mut); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.x-list { display: flex; flex-direction: column; gap: 8px; }
.ocard { background: #fff; border-radius: 14px; padding: 10px 12px; border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.ocard.sel { border-color: var(--g); }
.ocard.sos { border-color: var(--red); background: #fff7f7; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.st-search { background: #fef3c7; color: #92400e; } .st-go { background: #dbeafe; color: #1e40af; } .st-ride { background: #ede9fe; color: #5b21b6; }
.st-done { background: var(--g-l); color: var(--g-d); } .st-cancel { background: #f3f4f6; color: var(--mut); }
.assign { background: #fffbeb; border-radius: 10px; padding: 8px; margin-top: 4px; }
.assign select { padding: 8px; font-size: 14px; flex: 2; }
.assign .btn { min-height: 40px; }
.drow { background: #fff; border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; cursor: pointer; font-size: 14px; }
.form { display: grid; gap: 10px; }
.checks { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.checks label { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
@media (min-width: 900px) {
  .x-screen { display: grid; grid-template-columns: 1fr 440px; overflow: hidden; }
  .x-map-wrap { height: auto; }
  .x-side { overflow-y: auto; border-left: 1px solid var(--line); }
  .x-stats { grid-template-columns: repeat(3, 1fr); }
}
.cap { background: #f8faf9; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.cap-bar { height: 8px; border-radius: 4px; background: #e5e7eb; margin: 6px 0 4px; overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: var(--g); border-radius: 4px; }

/* индикатор загрузки тайлов */
.map-spin { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s; }
.map-spin i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--g-l); border-top-color: var(--g); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-wrap-loading .map-spin { opacity: 1; transition-delay: .3s; }
.map:not(.map-ready) .map-spin { display: none; }
.map-cover { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; transition: opacity .4s ease;
  background: linear-gradient(155deg, #eef5e8 0%, #e8f2e4 46%, #d6eaf3 54%, #cfe6f1 100%); }
.map-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  background-size: 250% 100%; animation: sk 1.6s linear infinite; }
.map-ready .map-cover { opacity: 0; pointer-events: none; }
.map-cover-box { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); }
.map-cover-box i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--g-l); border-top-color: var(--g); animation: spin .8s linear infinite; }
@media (max-width: 759px) { .p-screen .map-cover { place-items: start center; padding-top: min(22vh, 180px); } }
@media (prefers-reduced-motion: reduce) { .map-cover::before { animation: none; } }

/* ---------- гибридная цена ---------- */
.offers-teaser { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 12px; border-radius: 14px; background: #eef4ff; border: 1px solid #d6e4ff; }
.offers-teaser div { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: #334155; }
.offers-teaser b { font-size: 14px; color: var(--ink); }
.offers-teaser .btn { flex: none; background: #fff; border: 1px solid #c7d7fe; }
.fixed-note { font-size: 13px; color: #475569; background: #f1f5f9; border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; }
.pinned { color: var(--g-d); font-weight: 600; margin: 8px 0; }
.raise { display: flex; gap: 10px; align-items: center; background: var(--y-l); border: 1px solid #fde68a; border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; animation: up .25s ease-out; }
.raise div { flex: 1; display: flex; flex-direction: column; font-size: 12px; color: #6b4f00; }
.raise b { font-size: 14px; color: var(--ink); }
.raise .btn { flex: none; white-space: nowrap; }
.bids { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.bid { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 14px; animation: up .2s ease-out; }
.bid-main { min-width: 0; }
.bid-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bid-price b { font-size: 18px; }
.bid-price small { font-size: 11px; font-weight: 700; }
.bid-price small.up { color: #b45309; } .bid-price small.eq { color: var(--g-d); }
.bid-price .btn { min-height: 38px; padding: 6px 12px; }
.bid-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--g); width: 100%; transition: width .2s linear; }
.own { background: #f8faf9; border-radius: 16px; padding: 12px; margin: 10px 0; }
.own-row { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; align-items: center; margin: 6px 0; }
.own-row .btn { font-size: 24px; padding: 0; }
.own-price { text-align: center; font-size: 32px; font-weight: 800; }
.own input[type="range"] { width: 100%; accent-color: var(--g); }
.modal-offers label { margin: 8px 0; }
.meter { background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.meter .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0; }
.meter .row3 b { font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }
.meter .row3 small { display: block; font-size: 11px; color: #94a3b8; }
.meter .small { color: #cbd5e1; }
.counter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.counter-row .btn { min-height: 52px; flex-direction: column; gap: 0; font-size: 16px; }
.counter-row .btn small { font-size: 11px; font-weight: 600; opacity: .75; }
.settings-card summary { font-weight: 700; cursor: pointer; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f1f1f1; font-size: 14px; }
.set-row small { color: var(--mut); display: block; font-size: 12px; }
.set-row input { width: 20px; height: 20px; accent-color: var(--g); flex: none; }
.d-screen .card { scroll-margin-top: 90px; }
.cap b { white-space: nowrap; }

/* ---------- партнёрам ---------- */
.pt-screen { position: absolute; inset: 0; overflow-y: auto; background: var(--bg); }
.pt-wrap { max-width: 1080px; margin: 0 auto; padding: 16px 12px 24px; }
.pt-hero { margin: 4px 4px 12px; }
.pt-seg { max-width: 460px; }
.pt-seg button { padding: 10px 8px; }
.pt-grid { display: grid; gap: 12px; align-items: start; }
.pt-grid .card { margin: 0; }
@media (min-width: 900px) {
  .pt-grid { grid-template-columns: 1fr 420px; }
  .pt-jump { display: none; }
}
.pt-jump { width: 100%; margin: 8px 0 6px; }
.pt-form { scroll-margin-top: 12px; }
.pt-lead h2 { margin-bottom: 6px; }
.pt-lead .sec { margin-top: 18px; font-size: 13px; }
.pt-tbl td { vertical-align: top; }
.pt-tbl td:last-child { color: var(--g-d); font-size: 16px; }
.pt-note { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--g-d); }
.pt-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.pt-list li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 10px 12px; background: #f8faf9; border-radius: 12px; }
.pt-dots { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.pt-form { display: flex; flex-direction: column; gap: 12px; }
.pt-form h3 { font-size: 18px; }
.pf { font-size: 13px; color: var(--mut); gap: 4px; min-width: 0; }
.pf > small { font-size: 12px; }
.pf input:not([type="checkbox"]):not([type="radio"]), .pf select { width: 100%; }
.pf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-car { grid-template-columns: 1fr 96px; }
.pf-err { color: var(--red); font-size: 12px; font-weight: 600; min-height: 0; }
.pf-err:empty { display: none; }
.pf.bad input:not([type="checkbox"]):not([type="radio"]), .pf.bad select { border-color: var(--red); background: #fff7f7; }
.pf.bad .pf-row { color: var(--red); }
.pf-row { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 14px; }
.pf-check .pf-row span { font-size: 13px; color: #374151; line-height: 1.35; }
.pf-row input[type="checkbox"], .pf-row input[type="radio"] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--g); flex: none; }
.pf-radio { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-radio legend { padding: 0; margin-bottom: 6px; }
.pf-radio .pf-row { gap: 10px; }
.pf-radio .pf-row label { flex: 1; flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--ink); font-size: 15px; cursor: pointer; background: #fff; }
.pf-radio .pf-row label:has(input:checked) { border-color: var(--g); background: var(--g-l); }
.pf-radio.bad .pf-row label { border-color: #fca5a5; }
.pf-stop { margin: 0; background: var(--y-l); color: #6b4f00; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.pf-result:empty { display: none; }
.pf-result.err { background: var(--red-l); color: #7f1d1d; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pf-contact { display: block; margin-top: 6px; font-weight: 600; }
.pt-form .btn-xl { margin-top: 0; }
.pf-done { display: flex; flex-direction: column; gap: 6px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
