:root {
  --accent: #ffd400;
  --accent-ink: #1a1a1a;
  --accent-soft: #fff6c2;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b66;
  --line: #e4e3dd;
  --ok: #1f9d55;
  --ok-soft: #e3f5ea;
  --warn: #b7791f;
  --warn-soft: #fdf1dc;
  --danger: #d63c3c;
  --danger-soft: #fdecec;
  --info: #2b6cb0;
  --info-soft: #e6effa;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 6%);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.4; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ── Верхняя панель ── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: relative; z-index: 1000;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; text-decoration: none; }
.brand-wordmark { display: block; width: 136px; max-width: 100%; height: auto; }
/* «Такси MAX» и подпись роли под ним (кабинет водителя) */
.logo-name { line-height: 1.1; white-space: nowrap; }
.logo-name small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
/* узкий телефон: логотип мельче, имя справа (вход в профиль) не сжимается в ноль */
@media (max-width: 360px) {
  .topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .topbar .logo { font-size: 15px; gap: 6px; }
  .topbar .brand-wordmark { width: 110px; }
  .topbar .who { min-width: 44px; }
  .topbar .btn.sm { padding-left: 10px; padding-right: 10px; }
}
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-page .forgot { justify-self: center; margin-top: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
/* своё имя в шапке кабинета — кнопка «Профиль и пароль» */
.topbar .who-btn { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.topbar .who-btn:hover { color: var(--ink); }
.drawer.account .drawer-sec .linkish { justify-self: start; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.conn.on { background: var(--ok); }

/* ── Раскладка «панель + карта» ── */
.app { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; height: calc(100dvh - 53px); }
.panel { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); min-width: 0; }
.map { position: relative; min-height: 300px; background: #e8e6df; }
@media (max-width: 820px) {
  /* minmax(0, 1fr): колонка не шире экрана, даже если внутри что-то длинное (иначе съезжает весь кабинет) */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 42dvh auto; height: auto; }
  .map { order: -1; }
  /* панель — «шторка» поверх края карты */
  .panel { overflow: visible; position: relative; z-index: 2; margin-top: -20px; border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 10%); padding-top: 10px; }
  .panel::before { content: ''; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: #d3d0c8; flex: none; }
}
.map-offline { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }

/* ── Карточки и элементы ── */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big { font-size: 26px; font-weight: 800; }
.grow { flex: 1; min-width: 0; }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: 15px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea.input { resize: vertical; min-height: 60px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; background: #ecebe6; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(0.96); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 13px; }

.seg { display: flex; background: #ecebe6; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 10%); }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #ecebe6; white-space: nowrap; }
.badge.searching { background: var(--warn-soft); color: var(--warn); }
.badge.accepted, .badge.arrived { background: var(--info-soft); color: var(--info); }
.badge.in_progress { background: var(--accent-soft); color: #7a6400; }
.badge.completed, .badge.online { background: var(--ok-soft); color: var(--ok); }
.badge.cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.busy { background: var(--info-soft); color: var(--info); }
.badge.offline { background: #ecebe6; color: var(--muted); }

/* Адресная строка */
.addr { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; }
.addr .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; cursor: pointer; border: 2px solid transparent; }
.addr .dot.a { background: var(--ok); }
.addr .dot.b { background: var(--danger); }
.addr .dot.picking { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.hint { font-size: 13px; color: var(--muted); background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; }
.cad-box { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; gap: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* Тарифы */
/* ── Тарифы: карточки-«таблички такси» ──
   силуэт машины своего класса, цена крупно; выбранная — тёмная, с «шашечками» сверху и жёлтой ценой */
.tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tariff {
  --glass: var(--surface);
  position: relative; overflow: hidden; display: grid; justify-items: start; align-content: start; gap: 1px;
  padding: 14px 10px 10px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer; min-height: 132px; transition: background .15s, border-color .15s, box-shadow .15s;
}
.tariff:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tariff .t-car { height: 26px; margin-bottom: 6px; color: #cfccc3; transition: color .15s; }
.tariff .t-car svg { height: 100%; width: auto; display: block; }
.tariff .t-car .g { fill: var(--glass); }
.tariff .t-name { font-weight: 700; font-size: 14px; }
.tariff .t-old { font-size: 12px; line-height: 16px; min-height: 16px; color: var(--muted); }
.tariff .t-price { font-weight: 800; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tariff .t-badge { margin-top: 6px; background: var(--ok); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2;
  padding: 3px 7px; border-radius: 8px; max-width: 100%; }
.tariff .t-note { margin-top: 6px; font-size: 12px; color: var(--muted); }
.tariff.promo:not(.active) { border-color: var(--ok); }
.tariff.active { --glass: var(--ink); background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 20px rgb(0 0 0 / 22%); }
.tariff.active::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px) 0 0 / 100% 3px no-repeat,
              repeating-linear-gradient(90deg, transparent 0 6px, var(--accent) 6px 12px) 0 3px / 100% 3px no-repeat;
}
.tariff.active .t-car { color: var(--accent); }
.tariff.active .t-price { color: var(--accent); }
.tariff.active .t-old { color: rgb(255 255 255 / 55%); }
/* машин этого класса нет на линии — тариф не выбрать */
.tariff.off, .tariff:disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
@media (max-width: 360px) { .tariff .t-price { font-size: 17px; } }

/* «Найти машину» — главное действие: крупно, цена справа; на телефоне прилипает к низу экрана */
#order-btn { min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 800; display: flex; align-items: center;
  justify-content: center; gap: 12px; position: sticky; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 3;
  box-shadow: 0 6px 18px rgb(0 0 0 / 14%); }
#order-btn:not(:disabled) { justify-content: space-between; padding: 0 10px 0 20px; }
#order-btn .btn-price { background: var(--ink); color: var(--accent); border-radius: 12px; padding: 7px 12px; font-variant-numeric: tabular-nums; }

/* «откуда» и «куда» связаны пунктиром маршрута */
.addr { position: relative; }
.addr::before { content: ''; position: absolute; left: 13px; top: 32px; bottom: 32px; border-left: 2px dotted #c9c6bd; }

/* водитель принял заказ: значок «выпрыгивает» и расходится жёлтая волна (анимируем содержимое — значок двигает MapLibre) */
.pin-found > * { animation: pin-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.pin-found::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; animation: pin-ring 1.3s ease-out .4s 3; pointer-events: none; }
@keyframes pin-pop { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pin-ring { from { box-shadow: 0 0 0 0 rgb(255 212 0 / 75%); } to { box-shadow: 0 0 0 26px rgb(255 212 0 / 0%); } }
@media (prefers-reduced-motion: reduce) { .pin-found > *, .pin-found::after { animation: none; } }

/* Водитель/машина */
.car-plate { display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; letter-spacing: 1px; border: 2px solid var(--ink); border-radius: 6px; padding: 2px 8px; background: #fff; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }

.stars { display: flex; gap: 4px; }
.stars button { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: #d5d3cb; padding: 0; }
.stars button.on { color: #f5b301; }

.status-head { display: flex; align-items: center; gap: 12px; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--warn); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(183 121 31 / 50%); } 70% { box-shadow: 0 0 0 12px rgb(183 121 31 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(183 121 31 / 0%); } }

.route { display: grid; grid-template-columns: 14px 1fr; gap: 4px 10px; font-size: 14px; }
.route .ra, .route .rb { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.route .ra { background: var(--ok); }
.route .rb { background: var(--danger); }
.route .rs { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; background: #6c63c7; color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
/* заезды в форме пассажира: точка «1», «2» и кнопка «убрать» в поле */
.addr .dot.s { background: #6c63c7; width: 22px; height: 22px; font-size: 12px; justify-self: center; }
.stop-ac { position: relative; }
.stop-ac .input { padding-right: 36px; }
.stop-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 6px; z-index: 1; }
.stop-del:hover { color: var(--danger); }
.add-stop { justify-self: start; align-self: flex-start; margin-left: 36px; }
.pin-stop1, .pin-stop2, .pin-stop3, .pin-stop4, .pin-stop5 { background: #6c63c7; }

.list { display: flex; flex-direction: column; gap: 10px; }
.offer { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.offer.new { animation: flash 1.5s; }
@keyframes flash { from { background: var(--accent-soft); } to { background: var(--surface); } }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.stat .v { font-size: 20px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); }

/* Переключатель «на линии» */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5d3cb; border-radius: 999px; transition: 0.2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(22px); }

/* Уведомления */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 5000; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; animation: rise 0.2s; }
/* цвет текста задаём явно: общее правило .error (красный текст подписей под полями) иначе перекрашивало его в цвет фона */
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Маркеры карты */
.pin { display: grid; place-items: center; border-radius: 50%; font-weight: 800; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 35%); font-size: 13px; }
.pin-from { background: var(--ok); }
.pin-to { background: var(--danger); }
.pin-car, .pin-me { background: var(--accent); font-size: 18px; }
.pin-me { box-shadow: 0 0 0 4px rgb(255 212 0 / 45%), 0 2px 6px rgb(0 0 0 / 35%); }
.pin-free { background: #fff; font-size: 14px; border-width: 2px; border-color: var(--accent); }
.pin-busy { background: var(--info); font-size: 14px; }
.pin-offline { background: #b8b6ae; font-size: 14px; }
.pin-wait { background: var(--warn); font-size: 12px; }
/* машины — значок-машинка: свободная — жёлтая, на заказе — серая */
.pin svg { width: 66%; height: 66%; display: block; }
.pin svg .glass { fill: #fff; }
.pin-car, .pin-me, .pin-free, .pin-busy, .pin-offline { color: #1a1a1a; }
.pin-free { background: var(--accent); border: 2px solid #fff; }
.pin-busy { background: #d3d6dc; color: #5c6270; border: 2px solid #fff; }
.pin-offline { background: #e6e4de; color: #9b988f; border: 2px solid #fff; }
.pin-click { cursor: pointer; transition: transform .15s; }
/* фото водителя вместо значка: обводка — свободна (жёлтая) или на заказе (серая) */
.pin-photo { padding: 0; overflow: hidden; background: #fff; }
.pin-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pin-photo.pin-free, .pin-photo.pin-car { border: 3px solid var(--accent); }
.pin-photo.pin-busy { border: 3px solid #b9bdc6; }
.pin-photo.pin-busy img { filter: grayscale(.5); }
.pin-click:hover { transform: scale(1.12); }
.maplibregl-marker.pin { z-index: 1; }
.maplibregl-marker.radar { z-index: 0; }
.maplibregl-popup { z-index: 5; } /* карточка машины — поверх значков */

/* карточка машины по нажатию */
.car-popup .maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font: inherit; color: var(--ink); }
.car-popup .maplibregl-popup-close-button { font-size: 18px; width: 28px; height: 28px; right: 2px; top: 2px; }
.car-pop { display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; row-gap: 2px; align-items: center; min-width: 210px; }
.car-pop .avatar { width: 44px; height: 44px; font-size: 16px; grid-row: span 3; }
.car-pop-status { font-size: 12px; font-weight: 700; }
.car-pop-status.free { color: var(--ok); }
.car-pop-status.busy { color: var(--muted); }

/* «радар» поиска машины вокруг точки подачи */
/* волны расходятся от точки подачи до края круга; размер круга растёт вместе с кругом поиска (--radar-size из map.js) */
.radar { width: var(--radar-size, 320px); height: var(--radar-size, 320px); border-radius: 50%; position: relative; pointer-events: none;
  transition: width .8s ease, height .8s ease; }
.radar-sweep, .radar-ring { position: absolute; inset: 0; border-radius: 50%; }
.radar-sweep { inset: 22%; background: conic-gradient(from 0deg, rgb(255 212 0 / 0%) 0deg 250deg, rgb(255 212 0 / 45%) 360deg); animation: radar-spin 2.6s linear infinite; }
.radar-ring { border: 2px solid rgb(232 180 0 / 80%); background: rgb(255 212 0 / 6%); opacity: 0; animation: radar-ring 3.6s cubic-bezier(.25, .55, .35, 1) infinite; }
.radar-ring.r1 { animation-delay: .9s; }
.radar-ring.r2 { animation-delay: 1.8s; }
.radar-ring.r3 { animation-delay: 2.7s; }
@keyframes radar-spin { to { transform: rotate(1turn); } }
@keyframes radar-ring { 0% { transform: scale(.06); opacity: .95; } 70% { opacity: .35; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .radar-sweep { animation: none; opacity: .4; }
  .radar-ring { animation: none; transform: scale(.6); opacity: .5; }
}

/* фото водителя */
img.avatar { object-fit: cover; background: var(--line); }
.avatar-edit { border: 0; padding: 0; cursor: pointer; position: relative; overflow: visible; }
.avatar-edit img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-edit::after { content: '📷'; position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; font-size: 12px;
  display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }

/* ── Страница входа ── */
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--accent) 0 34%, var(--bg) 34%); }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.auth-title { display: grid; justify-items: start; gap: 8px; }
.auth-title h1 { max-width: 100%; padding: 10px 14px; background: #fff; border-radius: 12px; }
.auth-title .brand-wordmark { width: 222px; }
.error { color: var(--danger); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Диспетчерская ── */
.admin { padding: 16px; display: flex; flex-direction: column; gap: 16px; max-width: 1400px; margin: 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.admin-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.admin .map { height: 460px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .input { padding: 6px 8px; width: 90px; }

/* Подпись источника данных карты (ODbL): минимальная, но читаемая и видимая без нажатий */
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib {
  margin: 0 4px 4px 0;
  padding: 0 5px;
  font-size: 10px;
  line-height: 16px;
  background: rgb(255 255 255 / 55%);
  border-radius: 4px;
}
.maplibregl-ctrl-attrib a { color: #555; text-decoration: none; }

/* Подпись источника карты в панели (вместо надписи поверх карты) */
.map-credit { font-size: 11px; color: var(--muted); }
.map-credit a { color: inherit; text-decoration: none; }
.map-credit a:hover { text-decoration: underline; }
.panel > .map-credit { margin-top: auto; padding-top: 4px; }
.admin .map-credit { text-align: right; }
@media (max-width: 820px) {
  /* на телефоне карта сверху, панель под ней — подпись первой строкой, сразу под картой */
  .panel > .map-credit { order: -1; margin: -8px 0 -6px; text-align: right; }
}

/* Подсказки адресов */
.ac { position: relative; min-width: 0; }
.ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%); max-height: 320px; overflow-y: auto; padding: 4px 0;
}
.ac-head { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.ac-note { margin: 6px 8px 2px; padding: 6px 10px; border-radius: 8px; background: #fff3d6; color: #7a4b00; font-size: 13px; font-weight: 600; }
.ac-item { padding: 8px 12px; cursor: pointer; }
.ac-item.active, .ac-item:hover { background: var(--accent-soft); }
.ac-item .t { font-weight: 600; font-size: 14px; }
.ac-item .d { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ac-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* «Моё местоположение» */
.map-locate { display: grid; place-items: center; color: var(--ink); }
.map-locate svg { display: block; }
@media (pointer: coarse) { .maplibregl-ctrl-group .map-locate { width: 44px; height: 44px; } }
.pin-user { background: var(--info); box-shadow: 0 0 0 6px rgb(43 108 176 / 25%), 0 1px 4px rgb(0 0 0 / 30%); }
.ac-foot { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }

/* Свои адреса в диспетчерской */
.pin-addr { background: #7c3aed; font-size: 13px; }
.pin-pick { background: var(--ink); font-size: 18px; }
label.field .ac { width: 100%; }

/* Адаптивная диспетчерская. */
.admin-grid > * { min-width: 0; }
.admin .badge.online { color: #13713c; }
@media (max-width: 820px) { .admin .map-credit { flex-basis: 100%; min-width: max-content; } }

/* «Установить на телефон» (js/install.js): карточка сверху, не закрывает кнопки действий внизу */
.install-banner {
  position: fixed; z-index: 1000;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: calc(8px + env(safe-area-inset-left, 0px)); right: calc(8px + env(safe-area-inset-right, 0px));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px;
  border: 1px solid var(--line);
}
.install-banner img { border-radius: 10px; flex: none; }
.install-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; min-width: 0; font-size: 14px; }
.install-text span { color: var(--muted); }
.install-actions { display: flex; gap: 8px; margin-left: auto; }
.install-actions .btn { min-height: 44px; }

/* ожидание: строка с таймером у водителя и пассажира */
.wait-line { font-weight: 600; color: var(--warn); }
.wait-line:empty { display: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* регистрация с кодом из бота MAX */
.verify-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); }
#verify-code { font-size: 22px; letter-spacing: .3em; text-align: center; }

/* ── Карточка поездки: главное — цветным блоком наверху ──
   ищем (светлый) · едет (тёмный, жёлтое время) · ждёт вас (жёлтый, «шашечки», крупный таймер) ·
   платное ожидание (оранжево-красный, сумма) · в пути (тёмный) · приехали (зелёный) */
.trip-hero { margin: -16px -16px 4px; padding: 20px 18px 16px; border-radius: var(--radius) var(--radius) 0 0;
  position: relative; overflow: hidden; display: grid; gap: 2px; transition: background .3s, color .3s; }
.trip-hero .hero-label { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.trip-hero .hero-big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.trip-hero .hero-big:empty { display: none; }
.trip-hero .hero-sub { font-size: 14px; opacity: .85; }
.trip-hero .hero-sub:empty { display: none; }
.hero-searching { background: #efede6; }
.hero-searching .hero-label::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); animation: pulse 1.4s infinite; }
.hero-accepted, .hero-ride { background: var(--ink); color: #fff; }
.hero-accepted .hero-big, .hero-ride .hero-big { color: var(--accent); }
.hero-arrived { background: var(--accent); color: var(--ink); padding-top: 26px; }
.hero-arrived::before, .hero-paid::before { content: ''; position: absolute; inset: 0 0 auto; height: 8px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px) 0 0 / 100% 4px no-repeat,
              repeating-linear-gradient(90deg, transparent 0 8px, var(--ink) 8px 16px) 0 4px / 100% 4px no-repeat; opacity: .9; }
.hero-arrived .hero-label::before, .hero-paid .hero-label::before { content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: currentColor; animation: blink 1s steps(2, start) infinite; }
.hero-paid { background: #f2542d; color: #fff; padding-top: 26px; }
.hero-done { background: var(--ok-soft); color: var(--ok); }
.hero-done .hero-big { color: var(--ink); }
.hero-cancelled { background: #efede6; color: var(--muted); }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .hero-arrived .hero-label::before, .hero-paid .hero-label::before { animation: none; } }

.driver-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.driver-row .avatar { width: 56px; height: 56px; font-size: 22px; }
.driver-row .who { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.driver-row .who strong { font-size: 16px; }
.driver-row .rating { font-weight: 600; color: var(--warn); font-size: 14px; }
.driver-row .meta { font-size: 13px; color: var(--muted); }
.driver-row .car-plate { font-size: 15px; letter-spacing: 1.5px; }
.call-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgb(31 157 85 / 35%); text-decoration: none; }
.call-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.trip-foot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.trip-foot strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.cancel-btn { color: var(--danger); border-color: var(--danger-soft); }

/* ── Отказ водителя с причиной, жалоба, заметки о клиенте ── */
.refuse { border: 1.5px solid var(--danger-soft); border-radius: 14px; padding: 12px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.reason { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 12px; font-size: 14px; cursor: pointer; min-height: 40px; }
.reason.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--danger); }
.client-notes { background: var(--warn-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: grid; gap: 4px; }
.client-notes strong { color: var(--warn); }

/* ── Диспетчерская: жалобы на клиентов ── */
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; margin-left: 4px; }
.tab-count[hidden] { display: none; }
.complaint { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.complaint.open { border-color: var(--danger); background: var(--danger-soft); }
.complaint-text { font-size: 15px; }
.report-link { min-height: 44px; justify-self: center; }
.complaint .btn.danger { background: var(--danger); color: #fff; }

/* ── Навигатор водителя (navigator.js): карта на весь экран, поворот сверху, остаток пути и шаг заказа снизу ── */
.nav-launch { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.nav-launch .btn { min-height: 48px; display: grid; place-items: center; text-decoration: none; }
body.nav-open { overflow: hidden; }
body.nav-open #map { position: fixed; inset: 0; z-index: 1400; height: 100dvh; min-height: 0; }
body.nav-open .maplibregl-ctrl-top-left, body.nav-open .maplibregl-ctrl-bottom-right, body.nav-open .pin-me { display: none; }
.nav { position: fixed; inset: 0; z-index: 1500; pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-head { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.nav-head > * { pointer-events: auto; }
.nav-top { align-self: stretch; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center;
  background: var(--ink); color: #fff; border-radius: 20px; padding: 12px 16px 12px 12px; box-shadow: 0 10px 28px rgb(0 0 0 / 28%); }
.nav-arrow { width: 64px; height: 64px; border-radius: 16px; background: var(--accent); color: var(--ink); display: grid; place-items: center; position: relative; }
.nav-exit-n { position: absolute; inset: 19px 0 auto; text-align: center; font-weight: 800; font-size: 12px; }
.nav-cue { min-width: 0; display: grid; gap: 1px; }
.nav-dist { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nav-text { font-size: 17px; font-weight: 600; }
.nav-street { font-size: 14px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-then { margin-left: 18px; display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff;
  border-radius: 0 0 14px 14px; padding: 4px 12px 6px; font-weight: 600; font-size: 14px; }
.nav-then-arrow svg { width: 22px; height: 22px; display: block; }
.nav-then-arrow .nav-exit-n { display: none; }
.nav-tools { position: absolute; right: 12px; top: 44%; display: flex; flex-direction: column; gap: 10px; }
.nav-round { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 4px 14px rgb(0 0 0 / 22%); cursor: pointer; }
.nav-round:focus-visible, .nav-act:focus-visible, .nav-exit:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 28px rgb(0 0 0 / 16%); display: grid; gap: 8px; }
.nav-credit { position: absolute; top: -26px; right: 8px; font-size: 11px; background: rgb(255 255 255 / 85%); padding: 2px 6px; border-radius: 6px; }
.nav-eta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nav-time { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nav-meta { color: var(--muted); font-size: 14px; }
.nav-to { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.nav-exit { min-height: 56px; padding: 0 18px; }
.nav-act { min-height: 56px; font-size: 17px; }
.nav-act-go { animation: nav-go 1.6s ease-out infinite; }
@keyframes nav-go { 0% { box-shadow: 0 0 0 0 rgb(255 212 0 / 70%); } 70% { box-shadow: 0 0 0 14px rgb(255 212 0 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 212 0 / 0%); } }
.nav-me { width: 44px; height: 44px; filter: drop-shadow(0 3px 6px rgb(0 0 0 / 30%)); }
@media (prefers-reduced-motion: reduce) { .nav-act-go { animation: none; } }
@media (min-width: 821px) {
  .nav-head { right: auto; width: 440px; left: 16px; }
  .nav-sheet { left: 16px; right: auto; width: 440px; bottom: 16px; border-radius: 22px; }
}

/* ── Без связи (кабинет водителя): полоска сверху; кнопки заказа работают, действия уйдут позже ── */
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 4000; background: #3a2a00; color: #ffe27a;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 20%); }
body.is-offline .topbar { margin-top: 38px; }
body.is-offline .nav-head { top: calc(48px + env(safe-area-inset-top, 0px)); }
/* в навигаторе сообщения — над нижней панелью, не поверх кнопки шага заказа */
body.nav-open .toasts { bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }

/* ── Карта на телефоне (offline-map.js): полоса загрузки ── */
.om-progress { height: 8px; border-radius: 4px; background: #ecebe6; overflow: hidden; }
.om-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* заказ отменил водитель или диспетчер — заметно, а не серым */
.hero-lost { background: var(--danger-soft); color: var(--danger); }
.hero-lost .hero-label { font-size: 22px; }
.hero-lost .hero-sub { color: var(--ink); opacity: 1; font-size: 15px; }

/* ═════════ Диспетчерская (admin.html). Правила оформления — навык ~/.claude/skills/taxi-admin-ui ═════════
   Шрифт Onest (кириллица, OFL, лежит у нас). Жёлтый — только внимание (заказы без машины) и знак такси.
   Цвет статуса — точкой или полосой рядом с текстом, сам текст всегда тёмный. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/vendor/onest/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/vendor/onest/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/vendor/onest/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.admin-page { font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px; }
/* статусы: одна палитра для табло, полос у заказов и легенды карты (как значки на карте) */
.tone-wait { --rail: var(--warn); }
.tone-go { --rail: var(--info); }
.tone-ride { --rail: var(--ok); }
.tone-free { --rail: var(--accent); }
.tone-busy { --rail: #b9bdc6; }
.tone-done { --rail: #cfcdc5; }
.tone-off { --rail: var(--danger); }

/* шапка: знак такси, разделы, кто вошёл */
.admin-top { background: var(--ink); color: #fff; border: 0; height: 56px; padding: 0 20px; gap: 28px; }
.admin-top .logo { flex: none; gap: 10px; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.admin-top .brand-wordmark { box-sizing: content-box; width: 118px; padding: 4px 7px; background: #fff; border-radius: 5px; }
.admin-top .logo small { display: block; font-size: 11.5px; font-weight: 500; color: #a3a39b; letter-spacing: 0; }
.admin-top .logo > span:last-child { line-height: 1.1; }
.admin-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav button { border: 0; background: transparent; color: #b4b4ac; font-weight: 600; font-size: 14.5px; padding: 8px 14px;
  border-radius: 999px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.admin-nav button:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.admin-nav button.active { background: #fff; color: var(--ink); }
.admin-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-me { display: flex; align-items: center; gap: 10px; flex: none; }
/* 10 вкладок в шапке на ноутбуке (1280–1440): плотнее, без подписи «диспетчерская» и имени */
@media (max-width: 1440px) and (min-width: 1001px) {
  .admin-top { gap: 14px; padding: 0 14px; }
  .admin-top .logo small, .admin-top .who { display: none; }
  .admin-nav button { padding: 8px 9px; font-size: 14px; gap: 4px; }
}
.admin-top .who { color: #c9c9c1; }
.admin-top .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 22%); }
.admin-top .btn.ghost:hover { background: rgb(255 255 255 / 8%); filter: none; }

.admin-page .admin { max-width: none; padding: 16px 20px; gap: 14px; }

/* табло: «ждут машину» крупно и горит жёлтым, когда такие заказы есть; дальше — что сейчас на линии; справа — итоги дня */
.board { display: grid; grid-template-columns: auto 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.board-hero { display: flex; align-items: center; gap: 12px; padding: 12px 24px 12px 18px; background: #f6f5f0; min-width: 260px; }
.board-hero b { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.board-hero span { font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--muted); max-width: 150px; }
.board-hero.hot { background: var(--accent); }
.board-hero .board-planned { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.board-hero.hot span { color: var(--ink); }
.board-hero.hot::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: board-pulse 1.4s ease-out infinite; }
@keyframes board-pulse { 0% { box-shadow: 0 0 0 0 rgb(26 26 26 / 45%); } 80%, 100% { box-shadow: 0 0 0 10px rgb(26 26 26 / 0%); } }
.board-now { display: flex; align-items: center; padding: 0 6px; min-width: 0; }
.board-item { display: flex; align-items: center; gap: 8px; padding: 0 18px; border-left: 1px solid var(--line); white-space: nowrap; }
.board-item:first-child { border-left: 0; }
.board-item::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rail); }
.board-item b { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.board-item span { font-size: 13.5px; color: var(--muted); }
.board-day { display: flex; align-items: center; gap: 20px; padding: 0 22px; background: #fbfbf9; border-left: 1px solid var(--line); }
.board-day-t { font-size: 13px; font-weight: 700; }
.board-day-item { display: grid; line-height: 1.2; white-space: nowrap; }
.board-day-item b { font-size: 16px; font-weight: 700; }
.board-day-item span { font-size: 12px; color: var(--muted); }

/* карта с обозначениями поверх; подпись источника — тоже на карте, всегда видна */
.map-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #e8e6df; min-height: 0; }
.admin-page .map-wrap .map { height: 100%; min-height: 0; border-radius: 0; box-shadow: none; }
.map-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 14px; align-items: center; background: rgb(255 255 255 / 94%);
  border-radius: 10px; padding: 7px 12px; font-size: 12.5px; box-shadow: 0 2px 10px rgb(0 0 0 / 12%); z-index: 2; }
.map-legend span { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.lg { width: 13px; height: 13px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 800; color: #fff; }
.lg-free { background: var(--accent); box-shadow: 0 0 0 1px #c9a800; }
.lg-busy { background: #d3d6dc; box-shadow: 0 0 0 1px #b9bdc6; }
.lg-wait { background: var(--warn); }
.admin-page .map-wrap .map-credit { position: absolute; right: 8px; bottom: 8px; background: rgb(255 255 255 / 88%); padding: 2px 6px; border-radius: 6px; z-index: 2; }

/* раздел справа */
.admin-panel { border: 1px solid var(--line); box-shadow: none; border-radius: 16px; padding: 18px 18px 10px; gap: 14px; }
.panel-title { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.admin-panel h3 { font-size: 16px; font-weight: 700; margin-top: 6px; }
.admin-page th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 8px; background: var(--surface); position: sticky; top: -18px; z-index: 1; }
.admin-page td { padding: 10px 8px; }
.admin-page tbody tr:hover td { background: #faf9f5; }

/* фильтр заказов */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px;
  font-weight: 600; color: #4a4a45; cursor: pointer; min-height: 34px; }
.chips button:hover { border-color: #cfcdc5; }
.chips button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* заказы: полоса статуса слева, маршрут точками, кто едет, действие справа; нажатие — заказ на карте */
.orders { display: grid; }
.order { position: relative; display: grid; gap: 6px; padding: 12px 10px 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.order::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--rail, #cfcdc5); }
.order:hover { background: #faf9f5; }
.order.sel { background: var(--accent-soft); }
.order:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }
.order-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.order-no { font-weight: 750; font-size: 15px; }
.order-time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.order-price { margin-left: auto; font-weight: 750; font-size: 16px; white-space: nowrap; }
.order-price small { font-weight: 600; color: var(--muted); }
.order-route { display: grid; gap: 2px; font-size: 14.5px; }
.order-route .o-a, .order-route .o-b { position: relative; padding-left: 16px; }
.order-route .o-a::before, .order-route .o-b::before { content: ''; position: absolute; left: 1px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.order-route .o-b::before { background: var(--danger); }
.order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 13px; }
.order-meta a { color: inherit; text-decoration: none; }
.order-meta a:hover { text-decoration: underline; }
.order-cancel { margin-left: auto; }
.order-note { font-size: 13px; color: var(--muted); }
.orders .empty { padding: 36px 8px; }

@media (prefers-reduced-motion: reduce) { .board-hero.hot::before { animation: none; } }

@media (min-width: 1001px) {
  /* карта и раздел — на всю высоту окна; длинные списки прокручиваются внутри раздела */
  .admin-page .admin { height: calc(100dvh - 56px); min-height: 600px; }
  .admin-page .admin-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(540px, 44%); gap: 14px; align-items: stretch; }
  .admin-page .map-wrap { height: 100%; }
  .admin-panel { overflow-y: auto; min-height: 0; }
}
@media (max-width: 1280px) and (min-width: 1001px) {
  .board-item { padding: 0 12px; }
  .board-day { gap: 14px; padding: 0 16px; }
  .board-day-t { display: none; }
}
@media (max-width: 1000px) {
  .admin-top { height: auto; flex-wrap: wrap; padding: 10px 14px 8px; row-gap: 8px; }
  .admin-top .logo { order: 1; }
  .admin-me { order: 2; margin-left: auto; }
  .admin-nav { order: 3; flex-basis: 100%; margin: 0 -14px; padding: 0 10px; }
  .admin-top .who { display: none; }
  .admin-page .admin { padding: 12px; }
  .board { grid-template-columns: 1fr; }
  .board-hero { min-width: 0; }
  .board-now { flex-wrap: wrap; padding: 8px 6px; gap: 8px 0; }
  .board-item { border-left: 0; padding: 4px 12px; }
  .board-day { flex-wrap: wrap; border-left: 0; border-top: 1px solid var(--line); padding: 10px 16px; gap: 10px 18px; }
  .map-wrap { height: 48dvh; }
  .map-legend { left: 8px; bottom: 8px; gap: 10px; padding: 6px 9px; }
  /* на узкой карте подпись источника — сверху справа, чтобы не наезжала на обозначения */
  .admin-page .map-wrap .map-credit { top: 8px; bottom: auto; }
}
/* подсказки в разделах — спокойные, жёлтый в диспетчерской оставлен для того, что требует внимания, и главных кнопок */
.admin-page .hint { background: #f6f5f0; color: #55554f; border-radius: 12px; padding: 10px 12px; }

/* ── Кабинет водителя: вкладки «Работа / Мои поездки», история по дням ── */
.tab-pane { gap: 14px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 2px 0; font-size: 14px; flex-wrap: wrap; }
.day-head strong { font-size: 16px; }
.trip { gap: 8px; }
.trip-earn { font-size: 16px; color: #13713c; }
.trip-off { opacity: .8; }
.trip-rate { color: var(--warn); }

/* ── Следующий заказ во время поездки ── */
.chain-note { display: grid; gap: 2px; background: var(--info-soft); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.chain-note strong { color: var(--info); }
.next-order { display: grid; gap: 6px; border: 1.5px dashed #b9c9e0; border-radius: 12px; padding: 10px 12px; background: #f7faff; }
.nav-after { color: var(--info); }
.nav-offer { position: absolute; left: 10px; right: 10px; bottom: calc(205px + env(safe-area-inset-bottom, 0px)); z-index: 3; display: grid; gap: 6px;
  background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); border: 2px solid var(--accent); }
.nav-offer-t { font-size: 15px; }
.nav-offer-a { font-size: 17px; font-weight: 700; }
.nav-offer-m { font-size: 14px; color: var(--muted); }
.nav-offer .btn { min-height: 52px; }
@media (min-width: 821px) { .nav-offer { left: 16px; right: auto; width: 440px; bottom: 230px; } }

/* ── «Мои поездки» водителя: заработок за период ── */
.period-custom { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.period-custom .field { font-size: 13px; }
.earn { gap: 6px; }
.earn-l { font-size: 14px; color: var(--muted); }
.earn-v { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 6px; }
.earn-grid > div { display: grid; line-height: 1.25; }
.earn-grid b { font-size: 16px; font-variant-numeric: tabular-nums; }
.earn-grid span { font-size: 12.5px; color: var(--muted); }
.earn-bars { display: flex; align-items: flex-end; gap: 3px; height: 86px; margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.earn-bar { flex: 1; min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; justify-items: center; gap: 3px; }
.earn-fill { width: min(100%, 22px); min-height: 2px; background: var(--ink); border-radius: 4px 4px 0 0; align-self: end; }
.earn-day { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 380px) { .period-custom { grid-template-columns: 1fr 1fr; } .period-custom .btn { grid-column: 1 / -1; } }

/* ── Чат пассажира и водителя (chat-ui.js): окно снизу экрана ── */
.chat-btn { position: relative; }
.chat-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px; }
.driver-row:has(.chat-btn) { grid-template-columns: 56px 1fr auto auto; }
.driver-row .chat-btn { width: 52px; height: 52px; border-radius: 50%; padding: 0; font-size: 20px; }
.driver-row .chat-btn .chat-count { position: absolute; top: -2px; right: -2px; margin: 0; }
.chat-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 35%); z-index: 1600; }
.chat-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1601; background: var(--surface); border-radius: 20px 20px 0 0;
  max-height: 82dvh; display: grid; grid-template-rows: auto 1fr auto auto auto; gap: 8px;
  padding: 14px 14px calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgb(0 0 0 / 20%); }
@media (min-width: 821px) { .chat-sheet { left: auto; right: 24px; bottom: 24px; width: 420px; border-radius: 20px; } }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-close { border: 0; background: #efede6; width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.chat-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 160px; padding: 4px 2px; }
.chat-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 18px 8px; }
.chat-msg { max-width: 82%; align-self: flex-start; background: #f1f0eb; border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.chat-msg.mine { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.chat-time { font-size: 11px; opacity: .65; margin-top: 2px; text-align: right; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; cursor: pointer; min-height: 36px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-form .input { font-size: 16px; }
.chat-note { font-size: 12px; color: var(--muted); text-align: center; }
/* кабинет водителя: регистрация по документам — шаги с фото, проверка данных */
.verify-card { display: grid; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.verify-card > .row.between { flex-wrap: wrap; }
.doc-steps { display: grid; gap: 8px; }
/* шаг: фото | название и что распознано; кнопки — строкой ниже (на узком телефоне с крупным шрифтом тоже влезают) */
.doc-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.doc-step.done { background: #f7f8f3; }
.doc-step .grow { min-width: 0; display: grid; gap: 2px; }
.doc-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-actions .btn { flex: 1 1 auto; }
.doc-thumb { flex: none; width: 64px; height: 44px; border-radius: 8px; background: #ecebe6; display: grid; place-items: center; font-weight: 700; color: var(--muted); overflow: hidden; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.verify-form { border-top: 1px solid var(--line); padding-top: 12px; }
/* поддержка: переписка */
.support-list { display: grid; gap: 8px; max-height: 50vh; overflow: auto; padding: 2px; }
.support-msg { padding: 8px 10px; border-radius: 12px; background: #f1f0ea; max-width: 88%; justify-self: end; }
.support-msg.from-admin { background: #fff7cc; justify-self: start; }
.problem-link { justify-self: start; text-align: left; }
/* качество работы водителя: метки из оценок (плохие — красноватые), много отказов — предупреждение */
.rate-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rate-tag { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: #eef6ee; color: #24572b; }
.rate-tag.bad { background: #fdecec; color: #8a1f1f; }
.facts3 .fact.fact-warn { background: #fdecec; }
.facts3 .fact.fact-warn strong, .warn-text { color: #b42318; }
.quality-line { padding: 0 2px; line-height: 1.45; }
/* блокировка водителя: карточка в кабинете (красная полоса), блок в профиле у диспетчера */
.block-card { border-left: 4px solid var(--danger); display: grid; gap: 8px; }
.block-card h2 { margin: 0; font-size: 18px; }
.block-reason { background: var(--danger-soft); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.block-sec { border-left: 4px solid var(--danger); padding-left: 12px; }
.block-sec.idle { border-left: 0; padding-left: 0; }
.block-hist { display: grid; gap: 4px; }
/* правила для водителей: карточка «Ознакомился» и ссылка в кабинете */
.rules-card { border-left: 4px solid var(--accent); display: grid; gap: 8px; }
.rules-card h2 { margin: 0; font-size: 18px; }
.rules-card .btn.sm { justify-self: start; }
.rules-row { border-top: 1px solid var(--line); padding-top: 10px; }
/* калькулятор стоимости во вкладке «Тарифы» */
.calc-card { margin-top: 6px; }
/* новый заказ от диспетчера */
.nf-open { justify-self: start; align-self: flex-start; }
.nf { gap: 12px; }
.nf-back { justify-self: start; align-self: flex-start; }
.nf-sec { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.nf-sec h3 { margin: 0; font-size: 15px; }
.nf-warn { color: var(--danger); font-weight: 600; }
.nf-tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nf-tariff { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.nf-tariff.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fffbe6; }
.nf-tariff .nf-t-price { font-size: 17px; font-weight: 800; }
.nf-kid { gap: 8px; align-items: center; }
.nf-kid select { width: auto; }
.nf-drivers { display: grid; gap: 4px; }
.nf-drv { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.nf-drv:hover { background: #f6f5f0; }
.nf-drv > span { display: grid; gap: 1px; min-width: 0; }
.nf-drv.off { opacity: .55; cursor: default; }
.nf-drv input { margin-top: 3px; }
.nf-unfit summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.nf-submit { position: sticky; bottom: 0; }
.order-src { font-size: 13px; }
.assign-pick { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 6px; }
.assign-pick .small { flex-basis: 100%; }
/* таблица тарифов помещается в панель на ноутбуке (1280–1440): поля уже, кнопка целиком */
#tariffs .input { width: 100%; min-width: 64px; max-width: 96px; padding-left: 10px; padding-right: 6px; }
#tariffs td, #tariffs th { padding-right: 8px; }
#tariffs .btn { white-space: nowrap; }
.calc-points { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; }
.calc-label { display: inline-flex; align-items: center; gap: 6px; }
.calc-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; }
.calc-dot.a { background: var(--ok); }
.calc-dot.b { background: var(--danger); }
.calc-sum { margin: 4px 0 6px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.calc-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.calc-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc-table .calc-price { font-weight: 800; font-size: 16px; }
.calc-note { color: #8a5a00; }
@media (max-width: 640px) { .calc-points { grid-template-columns: minmax(0, 1fr); } }
/* заказы ко времени: вкладка водителя, ближайший закреплённый в «Работе» */
.pre-h { margin: 6px 0 0; font-size: 15px; }
.pre-card.mine { border-left: 4px solid var(--accent); }
.pre-next { border: 0; background: #fff7cc; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px;
  font-weight: 600; text-align: left; cursor: pointer; }
.pre-next:focus-visible { outline: 2px solid var(--ink); }
.reserved-note { background: #eef6ee; border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; font-size: 13.5px; }
.claim-tag.blocked-tag { background: var(--danger); color: #fff; white-space: nowrap; }
/* вкладка «Обращения»: переписка — карточкой; ждёт ответа — жёлтая полоса слева */
.support-thread { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.support-thread.unread { border-left: 4px solid var(--accent); background: #fffdf0; }
.support-thread:focus-visible { outline: 2px solid var(--ink); }
.support-preview { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.support-thread .claim-tag { justify-self: start; }
/* кабинет водителя: долг не даёт открыть смену — «Оплатить» и куда переводить */
.debt-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--danger-soft); }
.debt-box strong { color: var(--danger); }
.pay-info { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.pay-phone { font-size: 24px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
/* баланс водителя: строка в карточке смены, сумма на выбор, последние операции */
.wallet { display: grid; gap: 8px; }
.bal-plus { color: var(--ok); }
.wallet .pos, .wallet-ops .pos { color: var(--ok); }
.wallet .neg, .wallet-ops .neg, .earn-v.neg { color: var(--danger); }
.pay-info .chips { align-items: center; }
.pay-own { width: 140px; padding-top: 6px; padding-bottom: 6px; }
/* узкий экран: текст переносится, кнопка «Пополнить» — справа целиком; кнопки оплаты — в несколько строк */
.wallet > .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.wallet > .row > div { min-width: 0; }
.pay-info .row { flex-wrap: wrap; }
.wallet-ops { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.late-warn { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; font-weight: 600; }
.late-ask { display: grid; gap: 6px; background: var(--warn-soft); border-radius: 14px; padding: 12px; }
.late-ask strong { font-size: 16px; }

/* ── Пассажир: избранные адреса, «ко времени» ── */
.fav-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fav-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer; min-height: 38px; }
.fav-chip:hover { border-color: #cfcdc5; }
.fav-add { color: var(--muted); }
.fav-panel { flex-basis: 100%; display: grid; gap: 6px; background: #f6f5f0; border-radius: 12px; padding: 10px; }
.fav-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.fav-del { color: var(--danger); }
.when-row { display: grid; gap: 8px; }
.planned { gap: 8px; border: 1.5px dashed var(--line); box-shadow: none; }

/* ── Дети в заказе ── */
.kids-note { display: grid; gap: 2px; background: #fff3e6; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.kids-note strong { color: #9a4d00; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.stepper strong { min-width: 1.5em; text-align: center; font-size: 18px; }
.kids-panel { display: grid; gap: 8px; background: #f6f5f0; border-radius: 12px; padding: 10px; }
.kid-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.kid-row select { font-size: 16px; }
.kid-rule { grid-column: 2; font-size: 12.5px; color: var(--muted); }

/* кнопка заказа: подпись может переноситься, цена — всегда целиком внутри */
#order-btn { white-space: normal; min-width: 0; }
#order-btn > span:first-child { min-width: 0; text-align: left; line-height: 1.2; }
#order-btn .btn-price { flex: none; white-space: nowrap; }
#order-btn .btn-label { display: grid; gap: 1px; }
#order-btn .btn-label small { font-size: 13px; font-weight: 600; opacity: .75; }
/* «Едут дети»: строка с переключателем, выбор детей — под ней */
.kids-wrap { display: grid; gap: 8px; }
.opts-wrap { display: grid; gap: 6px; }
/* состав цены: надбавка за спрос — заметной строкой; «Из чего цена» — таблица */
.price-box { gap: 6px; }
.surge-line { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #fff3d6; border-left: 4px solid var(--warn); font-size: 13.5px; }
.surge-line span { color: var(--muted); }
.price-more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.price-more[open] summary { margin-bottom: 6px; }
.price-table { display: grid; gap: 3px; font-size: 13.5px; }
.price-table .pl { display: flex; justify-content: space-between; gap: 10px; }
.price-table .pl span { color: var(--muted); }
.price-table .pl strong { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table .pl-sub { border-top: 1px dashed var(--line); padding-top: 3px; }
.price-table .pl-sub span, .price-table .pl-total span { color: var(--ink); }
.price-table .pl-surge strong { color: #b45309; }
.price-table .pl-minus strong { color: var(--ok); }
.price-table .pl-total { border-top: 1px solid var(--line); padding-top: 4px; font-size: 14.5px; }
.price-table .pl-total strong { font-weight: 800; }
.kids-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kids-head label:first-child { display: grid; gap: 1px; cursor: pointer; }
.kids-panel .stepper strong { min-width: 1.2em; }
.kid-row { grid-template-columns: 92px 1fr; }

/* ── Диспетчерская → «Настройки»: каждая настройка — карточка ── */
.settings { display: grid; gap: 12px; }
.set-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; background: var(--surface); }
.set-head { display: grid; gap: 3px; }
.set-head h3 { font-size: 17px; font-weight: 700; margin: 0; }
.set-head p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; max-width: 62ch; }
.set-head-switch { grid-template-columns: 1fr auto; align-items: start; gap: 12px; }
.set-head-switch > div { display: grid; gap: 3px; }
.set-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: -4px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: end; }
/* пароль: текущий — отдельной строкой, новый и повтор — рядом */
.pass-grid .field:first-child { grid-column: 1 / -1; }
.unit-input .input::-webkit-inner-spin-button, .unit-input .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit-input .input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.set-card .field { font-size: 13px; color: #4a4a45; gap: 4px; }
.unit-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .15s; }
.unit-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(26 26 26 / 8%); }
.unit-input .input { border: 0; box-shadow: none; background: transparent; min-width: 0; flex: 1; font-variant-numeric: tabular-nums; }
.unit-input .input:focus { outline: none; }
.unit-input > span { padding: 0 12px 0 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.set-more { font-size: 13.5px; color: #55554f; }
.set-more summary { cursor: pointer; color: var(--muted); font-weight: 600; width: max-content; }
.set-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.set-more p { margin: 8px 0 0; line-height: 1.45; max-width: 70ch; }
.set-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.set-status:empty { display: none; }
.admin-page #tab-settings .hint { display: none; }

/* ── Диспетчерская: профиль водителя — панель справа ── */
/* пользователи: итоги строкой (числа тёмные, подписи серые), фильтр с числами, поиск */
.users-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.users-sum div { display: flex; align-items: baseline; gap: 8px; }
.users-sum strong { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.users-sum .sum-hero span { color: var(--ink); font-size: 15px; font-weight: 600; }
.users-sum span { color: var(--muted); font-size: 13.5px; }
.users-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.users-tools .input { flex: 0 1 220px; min-width: 160px; }
.chips button .n { margin-left: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips button.active .n { color: rgba(255, 255, 255, .7); }
.user-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11.5px; line-height: 18px; background: #efeee8; color: var(--muted); vertical-align: 1px; }
.note-line { font-size: 13.5px; line-height: 1.45; }
/* расчёты водителя: форма оплаты и движения (цифры тёмные; отменённая оплата — зачёркнута) */
.pay-form { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbf9; }
.pay-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.ledger { display: grid; }
.ledger-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ledger-row:first-child { border-top: 0; }
.ledger-row strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger-row.cancelled > span:first-child, .ledger-row.cancelled strong { color: var(--muted); text-decoration: line-through; }
.ledger-row .linkish { margin-left: 6px; }
#drivers td.num { white-space: nowrap; } /* «442 ₽» в одну строку */
#drivers th, #drivers td { padding-left: 7px; padding-right: 7px; } /* 7 столбцов в панели без прокрутки вбок */
#drivers .kids-cell { font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
/* водитель нажал «Я оплатил» — строка и плашка жёлтые: требует действия диспетчера */
#drivers tr.row-claim > td { background: #fff7cc; }
.claim-tag { display: inline-block; margin-top: 3px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--ink); font-size: 11.5px; font-weight: 700; line-height: 18px; }
.claim-note { padding: 7px 10px; border-radius: 10px; background: #fff7cc; font-size: 13.5px; font-weight: 600; }
.claim-box { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fff7cc; border: 1px solid #f0d54a; }
.drawer-num { color: var(--muted); font-weight: 600; font-size: .8em; }
/* профиль водителя: документы — фото и сверка «в документе / указал водитель» */
.doc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.doc-photo { display: grid; gap: 4px; text-decoration: none; color: inherit; }
.doc-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.doc-compare { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
.doc-compare td { overflow-wrap: anywhere; } /* VIN и номера не распирают панель */
.doc-compare th:first-child, .doc-compare td:first-child { width: 30%; }
.doc-compare th, .doc-compare td { text-align: left; padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.doc-compare th { font-size: 12px; color: var(--muted); font-weight: 600; }
.doc-compare tr.bad td { background: var(--danger-soft); }
/* журнал входов: неудачная попытка — красная плашка у причины, строка не цветная */
.login-bad { color: var(--danger); font-weight: 600; }
@media (max-width: 520px) { #users .col-last { display: none; } } /* телефон: только имя и поездки — влезает без прокрутки вбок */
.note-line .muted { font-size: 12.5px; }

.row-link { cursor: pointer; }
.row-link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.drawer-backdrop { position: fixed; inset: 56px 0 0; background: rgb(0 0 0 / 22%); z-index: 1300; }
.drawer { position: fixed; top: 56px; right: 0; bottom: 0; width: min(440px, 100%); /* 100% — видимая ширина, без полосы прокрутки */ background: var(--surface); z-index: 1301;
  box-shadow: -10px 0 30px rgb(0 0 0 / 18%); overflow-y: auto; animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #efede6; cursor: pointer; font-size: 16px; }
.drawer-body { padding: 20px 18px 28px; display: grid; gap: 16px; }
.drawer-body > * { min-width: 0; } /* содержимое не шире панели */
.drawer-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding-right: 44px; }
.drawer-head.solo { grid-template-columns: minmax(0, 1fr); } /* без аватарки — заголовок на всю ширину */
.drawer-head .avatar { width: 64px; height: 64px; font-size: 24px; }
.drawer-head h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 4px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-sec { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.drawer-sec h3 { font-size: 13px; font-weight: 700; color: var(--muted); }
.fact { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.fact span { color: var(--muted); }
.fact strong { font-weight: 600; text-align: right; }
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.facts3 .fact { display: grid; gap: 2px; background: #f6f5f0; border-radius: 10px; padding: 8px 10px; }
.facts3 .fact strong { font-size: 18px; text-align: left; }
.drawer-list { display: grid; gap: 8px; }
.drawer-trip { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 1000px) { .drawer, .drawer-backdrop { top: 0; } }

/* Подсказки адресов: идёт поиск — значок в поле, полоса над списком, заготовки строк */
.ac-input { padding-right: 40px; }
.ac-spin { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  border: 2.5px solid rgb(26 26 26 / 14%); border-top-color: var(--ink); animation: ac-spin .7s linear infinite; pointer-events: none; }
.ac-spin[hidden] { display: none; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-list.loading::before { content: ''; position: sticky; top: -4px; display: block; height: 3px; margin: -4px 0 1px; border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 45% 100%; animation: ac-bar 1s ease-in-out infinite; }
@keyframes ac-bar { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.ac-list.stale .ac-item { opacity: .55; transition: opacity .15s; }
.ac-wait { padding: 10px 12px 12px; display: grid; gap: 12px; }
.ac-wait-t { font-size: 13px; color: var(--muted); }
.ac-skel { display: grid; gap: 6px; }
.ac-skel i { display: block; height: 12px; width: 72%; border-radius: 6px;
  background: linear-gradient(90deg, #ecebe5 25%, #f7f6f2 50%, #ecebe5 75%); background-size: 200% 100%; animation: ac-shimmer 1.1s linear infinite; }
.ac-skel i + i { height: 9px; width: 38%; }
.ac-skel:nth-child(3) i:first-child { width: 58%; }
.ac-skel:nth-child(4) i:first-child { width: 66%; }
@keyframes ac-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ac-spin { animation-duration: 2.4s; }
  .ac-skel i, .ac-list.loading::before { animation: none; }
}

/* Ожидание: секундомер крупно, бесплатные минуты — полоской, платное — красным, сумма сразу в цене */
.wait-box { border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; background: var(--accent); color: var(--ink); }
.wait-box.wait-paid, .wait-box.wait-stop { background: #f2542d; color: #fff; }
.wait-box.wait-early, .wait-box.wait-ride { background: #efede6; }
.wait-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; font-size: 15px; }
.wait-top strong { font-variant-numeric: tabular-nums; font-size: 17px; }
.wait-clock { font-size: 42px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.wait-bar, .hero-bar { height: 6px; border-radius: 3px; background: rgb(26 26 26 / 16%); overflow: hidden; }
.wait-bar i, .hero-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width 1s linear; }
.hero-bar { margin: 6px 0 4px; }
.hero-bar[hidden] { display: none; }
.wait-note { font-size: 13px; opacity: .85; }
.nav-waiting .nav-dist { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .wait-bar i, .hero-bar i { transition: none; } }

/* Что знают о клиенте другие водители: отзывы, жалобы. Плохие есть — жёлтым, только хорошие — зелёным */
.client-notes.good { background: var(--ok-soft); }
.client-notes.good strong { color: var(--ok); }
.notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.notes-tally { font-size: 13px; font-weight: 600; white-space: nowrap; }
.client-notes .note { display: grid; grid-template-columns: 22px 1fr; gap: 4px; }
/* Отзыв о клиенте после поездки */
.review-card { border: 1.5px solid var(--ok); }
.review-card .drawer-close { position: static; flex: none; width: 36px; height: 36px; }
.review { gap: 10px; }
.review-tone button { padding: 10px 8px; font-size: 15px; }
.trip-review { display: grid; gap: 4px; justify-items: start; }
.trip-review:empty { display: none; }
.trip-review .review { width: 100%; border-top: 1px solid var(--line); padding-top: 10px; }

/* Заказ ко времени только что оформлен — отмечен зелёным, форма под ним уже чистая */
.planned.fresh { border: 2px solid var(--ok); background: var(--ok-soft); }
.planned-ok { font-weight: 700; color: var(--ok); }

/* Какой маршрут откроют «Навигатор» и «Яндекс Карты»: к клиенту или до места назначения */
.nav-leg { font-weight: 600; color: var(--muted); margin-bottom: -4px; }
