:root {
    --bg: #e7e7e4;                 /* подложка вокруг листа */
    --panel: #ffffff;
    --panel-muted: #f3f2ef;        /* тёплый светло-серый: инпуты, пилюли */
    --panel-muted-2: #eceae6;
    --text: #1b1b1b;
    --text-muted: #9b9893;
    --border: #ededea;
    --brand: #ffce00;              /* основная жёлтая кнопка/акцент */
    --brand-dark: #f5c400;
    --brand-tint: #fff7d6;         /* подсветка выбранного тарифа */
    --accent: #1f6feb;
    --danger: #e5484d;
    --success: #1fb95b;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    --shadow-float: 0 4px 16px rgba(0, 0, 0, 0.14);
    --radius: 16px;
    --radius-lg: 22px;
    --pill: 999px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #0f1420; /* тёмный: совпадает с inline-фоном в <head>, включает прозрачный статус-бар iOS и убирает белую полосу сверху */
    overflow: hidden; /* только для десктопа; mobile переопределяет ниже */
    -webkit-text-size-adjust: 100%; /* запрет автоувеличения шрифта Safari */
}

.app {
    display: grid;
    grid-template-columns: 420px 1fr;
    height: 100vh;
    width: 100vw;
}

.panel--wide {
    width: 100%;
}

/* Контейнер любой роли виден только если активен */
.role-container {
    display: none !important;
}

.role-container.is-active {
    display: grid !important;
}

.role-picker.role-container.is-active {
    display: flex !important;
}

/* Кнопка смены роли в шапке */
.role-switch {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--panel-muted);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
}

.role-switch:hover {
    background: #e8eaed;
    color: var(--text);
}

.panel__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel__header--driver .logo__mark { background: #1f6feb; color: #fff; }
.panel__header--dispatcher .logo__mark { background: #6b7280; color: #fff; }

/* Panel */
.panel {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    box-shadow: var(--shadow);
    z-index: 500;
    overflow: hidden;
}

.panel__header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo__mark {
    width: 44px;
    height: 44px;
    background: var(--brand);
    color: #111;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
}

.logo__text h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.logo__text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    position: relative; /* база для абсолютно позиционируемой выпадашки подсказок */
}

.panel__body--hidden {
    display: none;
}

.panel__footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--panel-muted);
    font-size: 13px;
}

.footer__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__row a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.footer__row--muted {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 12px;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.field--row {
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
}

.field__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot--green { background: var(--success); }
.dot--red   { background: var(--danger); }

/* SVG-иконки на месте бывших эмодзи */
.completed__icon svg,
.onboard__icon svg,
.orders-empty__icon svg,
.modal__icon svg { width: 1em; height: 1em; display: block; margin: 0 auto; }
.logo__mark svg { width: 24px; height: 24px; }
.menu__item svg { width: 18px; height: 18px; vertical-align: middle; }
.pay-empty svg { width: 34px; height: 34px; opacity: 0.7; margin-bottom: 6px; }

.field__input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--panel-muted);
    transition: border-color 0.15s, background 0.15s;
}

.field__input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.field__action {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 0 0;
    text-align: left;
    font-family: inherit;
    align-self: flex-start;
    font-weight: 500;
}

.field__action:hover:not(:disabled) {
    text-decoration: underline;
}

.field__action:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--panel-muted);
    border-left: 3px solid var(--brand);
    padding: 8px 12px;
    border-radius: 8px;
}

.classes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.class {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px 12px;
    border: 2px solid #efeeea;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    text-align: left;
}

.class:hover {
    border-color: #ddd9d2;
}

.class--active {
    border-color: var(--brand);
    background: #fffdf3;
}

.class__icon {
    width: 100%;
    display: block;
    margin-bottom: 4px;
}
.carico {
    width: 100%;
    height: 50px;
    object-fit: contain;
    display: block;
}

.class__name {
    font-size: 13px;
    font-weight: 700;
}

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

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.summary {
    background: var(--panel-muted);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
}

.summary__row--total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    padding-top: 6px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.06s ease, background 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.985);
}

.btn--primary {
    background: var(--brand);
    color: #1b1b1b;
}

.btn--primary:hover {
    background: var(--brand-dark);
}

.btn--primary:disabled {
    background: #ededea;
    color: #b3b0ab;
    cursor: not-allowed;
}

/* Крупная CTA как в референсах */
.btn--lg {
    padding: 17px 22px;
    font-size: 17px;
    font-weight: 800;
    border-radius: 18px;
}

.btn--block { width: 100%; }

/* Иконки внутри кнопок */
.role-switch svg { width: 20px; height: 20px; }
.btn svg { width: 20px; height: 20px; }

/* =====================================================
   Клиентский экран в стиле Я.Go
   ===================================================== */

.sheet-title {
    margin: 2px 0 14px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Карточка маршрута */
.route-card {
    background: var(--panel-muted);
    border-radius: 16px;
    padding: 2px 14px;
}
.route-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
}
.route-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
    margin-left: 23px;
}
.route-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.route-dot--from { background: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-dark); }
.route-dot--to   { background: #fff; border: 3px solid #1b1b1b; }
.route-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 16px;
    padding: 8px 0;
    outline: none;
    color: var(--text);
}
.route-input::placeholder { color: var(--text-muted); }

/* Опции-пилюли */
.opts { display: flex; gap: 8px; }
.opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 10px;
    background: var(--panel-muted);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.opt input { width: 18px; height: 18px; accent-color: var(--brand-dark); cursor: pointer; }

/* Поле планирования */
.sched-field { display: flex; flex-direction: column; gap: 6px; }

/* Пилюля способа оплаты */
.pay-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: var(--panel-muted);
    border: none;
    border-radius: 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}
.pay-pill:hover { background: var(--panel-muted-2); }
.pay-pill__icon { display: flex; flex: 0 0 auto; }
.pay-pill__icon svg { width: 22px; height: 22px; }
.pay-pill__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-pill__chev { display: flex; flex: 0 0 auto; color: var(--text-muted); }
.pay-pill__chev svg { width: 18px; height: 18px; }

/* Компактный ряд: оплата + детское кресло */
.quick-row { display: flex; gap: 8px; align-items: stretch; }
.chip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--panel-muted);
    border: none;
    border-radius: 14px;
    padding: 11px 13px;
    font: inherit;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.chip--pay { flex: 1; min-width: 0; }
.chip--toggle { flex: 0 0 auto; }
.chip__ic { display: flex; flex: 0 0 auto; }
.chip__ic svg { width: 22px; height: 22px; display: block; }
.chip__val {
    flex: 1; min-width: 0;
    text-align: left;
    font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip__chev { display: flex; flex: 0 0 auto; color: var(--text-muted); }
.chip__chev svg { width: 18px; height: 18px; }
.chip--pay:hover { background: var(--panel-muted-2); }

/* Сегмент-переключатель «Наличные / Безнал» */
.seg {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 3px;
    background: var(--panel-muted);
    border-radius: 14px;
    padding: 3px;
}
.seg__opt {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 9px 6px;
    border-radius: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.seg__opt svg { width: 18px; height: 18px; flex: 0 0 auto; }
.seg__opt--active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Строка-переключатель (детское кресло) — подпись + тумблер */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel-muted);
    border-radius: 14px;
    padding: 13px 14px;
    cursor: pointer;
    user-select: none;
}
.toggle-row__label { flex: 1; font-size: 14px; font-weight: 600; }

/* Панель действий: оплата · заказ · детали */
.order-bar { display: flex; gap: 8px; align-items: stretch; }
.cta-grow { flex: 1; min-width: 0; }
.ord-icon {
    position: relative;
    flex: 0 0 auto;
    width: 54px;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel-muted);
    border: none; border-radius: 16px;
    color: var(--text); cursor: pointer;
    transition: background 0.15s;
}
.ord-icon:hover { background: var(--panel-muted-2); }
.ord-icon svg { width: 24px; height: 24px; }
.ord-icon__ic { display: flex; }
.ord-icon__badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--brand); color: #1b1b1b;
    border-radius: 999px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Опции в панели выбора оплаты */
.pm-opt {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 13px 14px;
    background: var(--panel-muted); border: 2px solid transparent;
    border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600;
    color: var(--text); cursor: pointer; margin-bottom: 8px; text-align: left;
}
.pm-opt--active { border-color: var(--brand); background: var(--brand-tint); }
.pm-opt__ic { display: flex; flex: 0 0 auto; }
.pm-opt__ic svg { width: 24px; height: 24px; }
.pm-opt__txt { flex: 1; min-width: 0; }
.pm-opt__check { display: flex; flex: 0 0 auto; color: var(--brand-dark); }
.pm-opt__check svg { width: 22px; height: 22px; }
.pm-add {
    width: 100%; padding: 12px; margin-top: 2px;
    background: none; border: none; color: var(--accent);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Детали: степпер и подача */
.det-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; }
.det-row__label { font-size: 15px; font-weight: 600; }
.det-sub { font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 6px 0 8px; }
.det-sched { margin-top: 8px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--panel-muted); border-radius: 12px; padding: 4px; }
.stepper__btn {
    width: 34px; height: 34px; border: none; background: #fff; border-radius: 9px;
    font-size: 20px; font-weight: 600; cursor: pointer; color: var(--text);
    display: flex; align-items: center; justify-content: center;
}
.stepper__btn:active { transform: scale(0.95); }
.stepper__val { min-width: 30px; text-align: center; font-size: 16px; font-weight: 700; }

/* iOS-переключатель */
.switch__input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch {
    width: 42px; height: 25px;
    border-radius: 999px;
    background: #d6d3cc;
    position: relative;
    flex: 0 0 auto;
    transition: background 0.18s;
}
.switch::after {
    content: '';
    position: absolute; top: 2.5px; left: 2.5px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s;
}
.switch__input:checked + .switch { background: var(--brand); }
.switch__input:checked + .switch::after { transform: translateX(17px); }
.chip--toggle:has(.switch__input:checked) { background: var(--brand-tint); color: var(--brand-dark); }

/* Панель действий: CTA + календарь */
.action-bar { display: flex; gap: 8px; align-items: stretch; }
.cta { flex: 1; }
.icon-btn {
    flex: 0 0 auto;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-muted);
    border: 2px solid transparent;
    border-radius: 18px;
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover { background: var(--panel-muted-2); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn--sched.is-active {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-dark);
}

/* Плавающие круглые кнопки на карте */
.map-wrap { position: relative; }
.map-fab {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: var(--shadow-float);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b1b1b;
    cursor: pointer;
    z-index: 600;
}
.map-fab:active { transform: scale(0.95); }
.map-fab svg { width: 22px; height: 22px; }
.map-fab--loc  { right: 16px; bottom: 20px; }
.map-fab--menu { left: 16px; top: 16px; }

/* Ручка нижнего листа (вместо шапки-бренда) */
.sheet-handle { display: none; }

/* Согласие на обработку ПДн при входе */
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 8px 0 12px;
    cursor: pointer;
}
.consent input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 auto;
    accent-color: var(--brand-dark);
    cursor: pointer;
}
.consent a { color: #1456c4; }

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn--ghost:hover {
    color: var(--text);
    background: var(--panel-muted);
}

/* Search view */
.search {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 16px;
    gap: 14px;
}

.search__spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.search h2 {
    margin: 0;
    font-size: 20px;
}

.search p {
    margin: 0;
    color: var(--text-muted);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Driver view */
.driver {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.driver__header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.driver__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.driver__name {
    font-size: 17px;
    font-weight: 700;
}

.driver__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.driver__rating span:first-child {
    color: #ffb703;
}

.driver__car {
    background: var(--panel-muted);
    padding: 14px;
    border-radius: var(--radius);
}

.driver__car-line {
    font-size: 15px;
    font-weight: 600;
}

.driver__plate {
    margin-top: 4px;
    display: inline-block;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 14px;
    margin-top: 6px;
}

.driver__eta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.driver__eta-label {
    color: var(--text-muted);
    font-size: 14px;
}

.driver__eta-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.driver__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Map */
.map-wrap {
    position: relative;
    height: 100%;
}

.map {
    width: 100%;
    height: 100%;
    background: #e8eef3;
}

.map-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-weight: 600;
    font-size: 13px;
    z-index: 400;
}

/* Yandex Maps — прячем копирайт-ссылку по желанию (оставим по правилам API) */
.ymaps-2-1-79-copyrights-pane { font-size: 11px; }

/* Custom autocomplete dropdown */
.suggest {
    position: absolute;  /* позиционируется внутри .panel__body — устойчиво к клавиатуре iOS */
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    display: none;
}

.suggest--open { display: block; }

.suggest__item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.suggest__item:hover,
.suggest__item--active {
    background: var(--panel-muted);
}

.suggest__item + .suggest__item {
    border-top: 1px solid var(--border);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
}

.toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal--open { display: flex; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 21, 0.55);
    backdrop-filter: blur(2px);
}

.modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.22s ease-out;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.modal__close:hover { background: var(--panel-muted); }

.modal__icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 8px;
}

.modal__title {
    margin: 0 0 8px;
    font-size: 18px;
    text-align: center;
}

.modal__text {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    line-height: 1.45;
}

.modal__steps {
    margin: 0 0 20px;
    padding-left: 22px;
    line-height: 1.7;
    font-size: 14px;
    color: var(--text);
}

.modal__steps li { margin-bottom: 4px; }

.modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal__actions .btn {
    padding: 10px 14px;
}

@keyframes modalIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===== Способы оплаты ===== */
.modal__dialog--pay { max-width: 460px; text-align: left; }
.modal__dialog--pay .modal__title { text-align: left; margin-bottom: 16px; }

.pay-loading,
.pay-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 18px 0;
    line-height: 1.6;
}

.pay-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.pay-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-muted);
}
.pay-card__brand {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .3px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-transform: uppercase;
}
.pay-card__main { flex: 1 1 auto; min-width: 0; }
.pay-card__num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 1px;
}
.pay-card__sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pay-card__badge {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
    background: rgba(22, 163, 74, .12);
    padding: 4px 8px;
    border-radius: 999px;
}
.pay-card__link {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.pay-card__link:hover { text-decoration: underline; }
.pay-card__del {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    font-family: inherit;
}
.pay-card__del:hover { background: rgba(220, 38, 38, .1); color: var(--danger); }

.pay-form { display: flex; flex-direction: column; gap: 12px; }
.pay-form__row { display: flex; gap: 12px; }
.pay-form__row .field { flex: 1; margin: 0; }

.pay-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0 16px;
}

.pay-note {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.pay-actions { display: flex; gap: 10px; }
.pay-actions .btn { flex: 1; }

/* ===== Меню аккаунта (шапка) ===== */
.menu {
    position: absolute;
    z-index: 10001;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 17, 21, .18);
    padding: 6px;
    display: none;
    animation: modalIn .16s ease-out;
}
.menu--open { display: block; }

.menu__header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}
.menu__role { font-weight: 700; font-size: 14px; }
.menu__phone { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    background: none;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.menu__item span { font-size: 17px; width: 22px; text-align: center; }
.menu__item:hover { background: var(--panel-muted); }
.menu__item--danger { color: var(--danger); }
.menu__item--danger:hover { background: rgba(220, 38, 38, .08); }

.menu__divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ===== Role picker (landing) — премиальный тёмно-золотой со стелой ===== */
.role-picker {
    /* верхний слой — затемняющий градиент (прячет встроенные в картинку
       заголовок/карточки внизу), нижний — сама стела как фон-герой */
    background-color: #081222;
    background-image:
        linear-gradient(180deg,
            rgba(8,18,34,0) 0%,
            rgba(8,18,34,0) 30%,
            rgba(8,18,34,0.45) 47%,
            rgba(8,18,34,0.9) 61%,
            #081222 71%,
            #081222 100%),
        url('/img/start-hero.webp');
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center top, center top;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    color: #ece4d2;
    position: relative;
    overflow: hidden;
}

/* Контент (низ экрана) — со своим тёмным градиентом, чтобы перекрыть низ картинки */
.rp-content {
    background: linear-gradient(180deg, rgba(8,18,34,0) 0%, #081222 26%, #081222 100%);
    padding: 64px 22px calc(26px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.rp-title {
    margin: 0 0 6px;
    font-size: clamp(22px, 6.6vw, 30px);
    font-weight: 800;
    letter-spacing: 0.13em;
    background: linear-gradient(180deg, #f6e0a6 0%, #d8b873 52%, #b58a37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rp-sub {
    margin: 0 0 24px;
    font-size: clamp(12px, 3.6vw, 14px);
    letter-spacing: 0.03em;
    color: #aab0bd;
}

.rp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 460px;
    margin: 0 auto;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 14px 18px;
    border-radius: 18px;
    background: rgba(18,30,54,0.5);
    border: 1px solid rgba(216,184,115,0.38);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: #ece4d2;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.role-card:hover {
    border-color: rgba(231,201,135,0.85);
    background: rgba(24,38,66,0.62);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.role-card:active { transform: scale(0.98); }

.rp-card__ic {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1.5px solid rgba(216,184,115,0.6);
    color: #e7c987;
    box-shadow: inset 0 0 16px rgba(216,184,115,0.08);
}
.rp-card__ic svg { width: 30px; height: 30px; }

.rp-card__title {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
    color: #f0e9da;
}
.rp-card__desc {
    font-size: 12.5px;
    color: #98a0b0;
}

.rp-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 300px;
    margin: 24px auto 8px;
}
.rp-divider__line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(216,184,115,0.5));
}
.rp-divider__line:last-child {
    background: linear-gradient(90deg, rgba(216,184,115,0.5), transparent);
}
.rp-divider__dot { color: #d8b873; font-size: 10px; }

.rp-welcome {
    margin: 0;
    text-align: center;
    color: #8f96a3;
    font-size: 13px;
    letter-spacing: 0.05em;
}

/* ===== Статусные плашки в верхней части панели ===== */
.status-ribbon {
    background: #fff3bf;
    color: #5c4600;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
}

.status-ribbon--green { background: #dcfce7; color: #15803d; }
.status-ribbon--blue  { background: #dbeafe; color: #1d4ed8; }
.status-ribbon--red   { background: #fee2e2; color: #b91c1c; }

/* ===== Заверш ение поездки (клиент) ===== */
.completed {
    text-align: center;
    padding: 24px 0;
}

.completed__icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.completed h2 { margin: 0 0 8px; }
.completed p { color: var(--text-muted); margin: 0 0 20px; }

/* ===== Водитель: выход на линию ===== */
.onboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 20px 0;
}

.onboard__icon {
    font-size: 56px;
}

.onboard h2 { margin: 0; }
.onboard__text { color: var(--text-muted); margin: 0; font-size: 14px; }

.onboard__card {
    width: 100%;
    background: var(--panel-muted);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    font-size: 14px;
}

.onboard__card__row {
    display: flex;
    justify-content: space-between;
}

.onboard__card__row span:first-child { color: var(--text-muted); }
.onboard__card__row span:last-child { font-weight: 600; }

/* ===== Список заказов (водитель / диспетчер) ===== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.order-card:hover {
    border-color: #c7cbd1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-card__fare {
    font-weight: 700;
    color: var(--text);
    font-size: 16px;
}

.order-card__class {
    background: var(--panel-muted);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.order-card__route {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-card__point {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.order-card__status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #eef2ff;
    color: #4338ca;
    margin-left: 6px;
    text-transform: uppercase;
}

.order-card__status--pending   { background: #fff3bf; color: #92400e; }
.order-card__status--assigned  { background: #dbeafe; color: #1d4ed8; }
.order-card__status--arrived   { background: #dcfce7; color: #166534; }
.order-card__status--in_trip   { background: #e0e7ff; color: #3730a3; }
.order-card__status--completed { background: #d1fae5; color: #065f46; }
.order-card__status--cancelled { background: #fee2e2; color: #991b1b; }

.order-card__actions {
    display: flex;
    gap: 8px;
}

.order-card__actions .btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
}

.order-card__driver {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.order-card__note {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-style: italic;
}

/* Блок назначения водителя диспетчером */
.assign {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.assign__select {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    color: var(--text);
}
.assign .btn--sm { flex: 0 0 auto; white-space: nowrap; }

.orders-subhead {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    margin: 18px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.orders-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px;
}

.orders-empty__icon { font-size: 40px; margin-bottom: 8px; }
.orders-empty p { margin: 0 0 4px; }
.orders-empty__sub { font-size: 13px; }

/* ===== Текущий заказ водителя ===== */
.current-order {
    background: var(--panel-muted);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.current-order__route {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.current-order__meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.current-order__client {
    font-size: 13px;
}

.current-order__client a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.driver-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* ===== Диспетчер: KPI и вкладки ===== */
.kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-muted);
}

.kpi__item {
    background: #fff;
    padding: 10px 6px;
    border-radius: 8px;
    text-align: center;
}

.kpi__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.kpi__label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fff;
    padding: 0 12px;
}

.tab {
    background: none;
    border: none;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab:hover { color: var(--text); }

.tab--active {
    color: var(--text);
    border-bottom-color: var(--brand);
}

.tab__badge {
    background: var(--panel-muted);
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.tab--active .tab__badge {
    background: var(--brand);
    color: #111;
}

/* ===== Диспетчер: список водителей ===== */
.drivers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.driver-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.driver-card__body { flex: 1; min-width: 0; }

.driver-card__name {
    font-weight: 600;
    font-size: 14px;
}

.driver-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.driver-card__status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
}

.driver-card__status--free { background: #dcfce7; color: #166534; }
.driver-card__status--busy { background: #fee2e2; color: #991b1b; }

/* Widen the dispatcher panel a bit */
#dispatcherApp { grid-template-columns: 480px 1fr; }

/* Small button */
.btn--sm { padding: 6px 10px; font-size: 13px; }

/* =====================================================
   МОБИЛЬНАЯ ВЕРСИЯ: карта сверху, панель снизу
   ===================================================== */

@media (max-width: 768px) {

    /* html/body остаются overflow:hidden — скролл не нужен в самом приложении.
       Лендинг и логин получают position:fixed + overflow-y:auto (ниже). */

    /* В standalone с прозрачным баром видимая область = весь экран (100vh).
       html/body тоже тянем на 100vh: иначе они держат «малую» высоту (≈873),
       а контейнер 100vh (=932) обрезается по ним снизу — кнопка прячется за
       обрез, и под линией обреза видно тёмный фон (чёрная полоса). Совпадение
       высот убирает и обрезку кнопки, и полосу. */
    html,
    body {
        height: 100vh;
    }

    /* ---- App-экраны: карта сверху, панель снизу ----
       Используем высокоспецифичный селектор чтобы победить
       .role-container.is-active { display: grid !important } из базового CSS */
    #clientApp.is-active,
    #driverApp.is-active,
    #dispatcherApp.is-active {
        display: flex !important;
        flex-direction: column;
        /* Прозрачный бар включён → видимая область = полный экран (932).
           100vh здесь стабильно = 932 и заполняет экран целиком: карта под часами
           сверху, лист до самого низа без тёмной полосы. 100dvh на холодном старте
           недосчитывался до 873 → снизу открывался зазор с тёмным фоном.
           Низ в потоке, padding-bottom: env(safe-area-inset-bottom) у кнопки работает. */
        height: 100vh;
        overflow: hidden;
        background: #0f1420;
    }

    /* Карта — верхняя часть, занимает всё свободное место */
    #clientApp.is-active    .map-wrap,
    #driverApp.is-active    .map-wrap,
    #dispatcherApp.is-active .map-wrap {
        order: 0;
        flex: 1 1 auto;
        min-height: 0;
    }

    /* Панель — нижняя часть, фиксированная высота */
    #clientApp.is-active    .panel,
    #driverApp.is-active    .panel,
    #dispatcherApp.is-active .panel {
        order: 1;
        flex: 0 0 auto;
        max-height: 62vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.15);
        width: 100%;        /* сбрасываем возможный grid-width */
        /* Лист налезает на карту на величину скругления — тогда в уголках за
           закруглением видна карта, а не тёмный фон контейнера. */
        margin-top: -22px;
        position: relative;
        z-index: 5;
    }

    /* Значок города — компактный */
    .map-badge {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Ручка-индикатор (bottom sheet handle) */
    .panel__header::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 0 auto 8px;
    }

    .panel__header {
        padding: 6px 14px 10px;
        flex-shrink: 0;
    }

    /* Тело панели: чуть прокручивается если что-то не влезло */
    .panel__body {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        /* Контент выше home-индикатора, чтобы кнопка была целиком видна */
        padding: 0 14px max(16px, env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }

    /* Скрываем лишнее на мобильном */
    #mapHint,
    .summary,
    #resetBtn,
    .panel__footer,
    .onboard__text,
    .driver__eta,
    .driver__trips,
    .login-hint {
        display: none !important;
    }

    /* Компактная шапка */
    .logo__mark {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .logo { gap: 8px; }
    .logo__text h1 { font-size: 14px; line-height: 1.2; }
    .logo__text p  { font-size: 11px; }

    /* Форма — компактная */
    .form { gap: 9px; }
    .field { gap: 2px; }

    /* Я.Go-компоненты на мобильном */
    .sheet-title { font-size: 21px; margin: 0 0 10px; }
    .route-row { min-height: 44px; }
    .route-input { font-size: 16px; padding: 6px 0; }
    .opt { padding: 10px 8px; font-size: 12px; }
    .pay-pill { padding: 11px 12px; }
    .icon-btn { width: 52px; border-radius: 16px; }
    .map-fab { width: 42px; height: 42px; }
    .map-fab--loc  { right: 12px; bottom: 28px; } /* выше налезающего листа */
    .map-fab--menu { left: 12px; top: max(12px, env(safe-area-inset-top)); }

    /* Ручка листа видна на мобильном вместо шапки */
    .sheet-handle {
        display: block;
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 8px auto 2px;
        flex-shrink: 0;
    }
    .field__label {
        font-size: 10px;
        letter-spacing: 0.06em;
    }

    /* Инпуты — 16px обязательно (Safari не зумит) */
    .field__input {
        font-size: 16px;
        padding: 9px 11px;
        border-radius: 10px;
    }

    /* Геолокация — маленькая ссылка */
    .field__action {
        font-size: 12px;
        padding: 3px 0 0;
        min-height: 0;
    }

    /* Тарифы */
    .classes { gap: 5px; margin: 0; }
    .class {
        padding: 7px 3px;
        border-radius: 10px;
    }
    .class__icon  { font-size: 18px; }
    .class__name  { font-size: 11px; }
    .class__price { font-size: 11px; }

    /* Чекбоксы в одну строку */
    .field--row {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
    }
    .checkbox       { font-size: 13px; gap: 6px; }
    .checkbox input { width: 18px; height: 18px; }

    /* Кнопки — крупные для пальца */
    .btn {
        padding: 12px 14px;
        font-size: 15px;
        min-height: 46px;
        border-radius: 12px;
    }
    .btn--sm {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 36px;
    }

    /* Поиск машины */
    .search {
        padding: 16px 10px;
        gap: 8px;
    }
    .search__spinner { width: 42px; height: 42px; }
    .search h2 { font-size: 16px; margin: 0; }
    .search p  { font-size: 13px; margin: 0; }

    /* Карточка водителя (клиентский вид) */
    .driver { gap: 8px; }
    .driver__header { gap: 10px; }
    .driver__avatar {
        width: 42px;
        height: 42px;
        font-size: 19px;
        flex-shrink: 0;
    }
    .driver__name   { font-size: 15px; }
    .driver__rating { font-size: 12px; }
    .driver__car    { padding: 8px 10px; }
    .driver__car-line { font-size: 14px; }
    .driver__plate  { font-size: 13px; padding: 2px 8px; }
    .driver__actions { gap: 6px; }

    /* Завершение поездки */
    .completed { padding: 10px 0; }
    .completed__icon { font-size: 42px; margin-bottom: 6px; }
    .completed h2  { font-size: 17px; margin: 0 0 4px; }
    .completed p   { font-size: 13px; margin: 0 0 12px; }

    /* Статус-лента */
    .status-ribbon {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    /* Водитель: онбординг */
    .onboard { gap: 8px; padding: 6px 0; }
    .onboard__icon { font-size: 40px; }
    .onboard h2    { font-size: 16px; margin: 0; }
    .onboard__card { padding: 8px 10px; }
    .onboard__card__row { font-size: 12px; }

    /* Водитель: текущий заказ */
    .current-order { padding: 8px 10px; margin-bottom: 8px; }
    .current-order__route { font-size: 13px; gap: 4px; }
    .current-order__meta  { font-size: 11px; }
    .current-order__client { font-size: 12px; }
    .driver-actions { gap: 6px; margin-bottom: 6px; }

    /* Список заказов у водителя */
    .orders-list  { gap: 6px; }
    .orders-empty { padding: 20px 10px; }
    .orders-empty__icon { font-size: 30px; }
    .orders-empty p { font-size: 13px; }

    .order-card { padding: 10px; }
    .order-card__header { margin-bottom: 5px; }
    .order-card__fare   { font-size: 14px; }
    .order-card__route  { font-size: 13px; gap: 3px; margin-bottom: 5px; }
    .order-card__meta   { font-size: 11px; margin-bottom: 7px; }
    .order-card__actions .btn { padding: 9px; font-size: 14px; }

    /* Диспетчер */
    .kpi { padding: 6px 10px; gap: 5px; }
    .kpi__item  { padding: 6px 4px; border-radius: 6px; }
    .kpi__value { font-size: 18px; }
    .kpi__label { font-size: 10px; }

    .tabs { padding: 0 8px; }
    .tab  { padding: 8px 10px; font-size: 13px; gap: 4px; }

    /* Список диспетчера — можно скроллить внутри панели */
    #tabOrdersContent,
    #tabDriversContent {
        overflow-y: auto;
    }

    .driver-card { padding: 8px 10px; gap: 8px; }
    .driver-card__avatar { width: 36px; height: 36px; font-size: 16px; }
    .driver-card__name { font-size: 13px; }
    .driver-card__meta { font-size: 11px; }
    .driver-card__status { font-size: 10px; padding: 2px 7px; }

    /* Тост повыше (не перекрывает кнопки) */
    .toast { bottom: 12px; font-size: 13px; }

    /* Модалка */
    .modal__dialog {
        padding: 22px 16px 18px;
        border-radius: 16px;
    }
    .modal__title { font-size: 16px; }
    .modal__text  { font-size: 13px; }
    .modal__actions .btn { padding: 10px 12px; font-size: 14px; }

    /* ===== Лендинг (стела сверху, контент снизу) ===== */
    #rolePicker.is-active {
        display: flex !important;
        position: fixed;
        inset: 0;
        overflow: hidden;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        padding: 0;
        z-index: 10;
    }

    .rp-content { padding: 52px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
    .rp-grid { gap: 12px; }
    .role-card { padding: 18px 10px 16px; border-radius: 16px; }
    .rp-card__ic { width: 56px; height: 56px; }
    .rp-card__ic svg { width: 27px; height: 27px; }

    /* ===== Экран входа ===== */
    #loginApp.is-active {
        display: flex !important;
        position: fixed;
        inset: 0;
        overflow-y: auto;
        align-items: flex-start;
        padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(60px + env(safe-area-inset-bottom, 0px));
        z-index: 10;
    }

    .login-card {
        padding: 28px 20px 24px;
        border-radius: 18px;
        max-width: 100%;
        box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    }

    .login-logo h2 { font-size: 20px; }
    .field__input--code { font-size: 22px; }
}

/* ===== Экран входа — тёмно-золотой, в стиле лендинга ===== */
.login-screen {
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(20,36,66,0.55) 0%, rgba(8,18,34,0) 55%),
        #081222;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #ece4d2;
}

.login-card {
    background: rgba(16,28,50,0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(216,184,115,0.30);
    border-radius: 22px;
    padding: 22px 26px 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-back {
    color: #aab0bd;
    text-decoration: none;
    font-size: 14px;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.login-back:hover { color: #e7c987; }

.login-logo { text-align: center; }

.login-logo .logo__mark {
    margin: 0 auto 12px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 30px;
    background: linear-gradient(160deg, #e7c987, #b58a37);
    color: #1a1205;
    box-shadow: 0 6px 22px rgba(216,184,115,0.25);
}

.login-logo h2 {
    margin: 0 0 3px;
    font-size: 22px;
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #f6e0a6, #d8b873 60%, #b58a37);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-logo p {
    margin: 0;
    color: #9aa0ad;
    font-size: 14px;
}

.login-role-label {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #e7c987;
    background: rgba(216,184,115,0.10);
    border: 1px solid rgba(216,184,115,0.25);
    border-radius: 10px;
    padding: 8px 12px;
}

/* Поля внутри экрана входа — тёмные, 16px (без авто-зума iOS) */
.login-screen .field__label { color: #9aa0ad; }
.login-screen .field__input {
    background: rgba(8,16,30,0.7);
    border: 1px solid rgba(216,184,115,0.28);
    color: #f0e9da;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 16px;
}
.login-screen .field__input::placeholder { color: #6f7787; }
.login-screen .field__input:focus {
    border-color: rgba(231,201,135,0.85);
    background: rgba(12,22,40,0.85);
    box-shadow: 0 0 0 3px rgba(216,184,115,0.12);
}

.login-btn { width: 100%; margin-top: 4px; }

.login-screen .btn--primary {
    background: linear-gradient(160deg, #efd396, #d8b873 55%, #c19a45);
    color: #1a1205;
    font-weight: 700;
}
.login-screen .btn--primary:hover { filter: brightness(1.06); }
.login-screen .btn--ghost {
    background: transparent;
    color: #aab0bd;
    border: 1px solid rgba(216,184,115,0.22);
}
.login-screen .btn--ghost:hover { color: #e7c987; background: rgba(216,184,115,0.06); }

.login-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8a91a0;
    text-align: center;
    line-height: 1.45;
}

.login-screen .consent { color: #9aa0ad; }
.login-screen .consent a { color: #e7c987; }
.login-screen .consent input { accent-color: #d8b873; }

/* ===== Экран водителя (в стиле клиента) ===== */
.driver-greeting { padding: 2px 2px 10px; }
.driver-greeting h2 { margin: 0; font-size: 20px; }
.driver-greeting__sub { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }

.veh-form { display: flex; flex-direction: column; gap: 12px; }
.veh-form__title,
.veh-tariffs__title { font-weight: 700; font-size: 15px; margin: 2px 0 6px; }

.veh-class {
    display: flex; align-items: center; gap: 8px;
    background: var(--brand-tint); border: 1px solid var(--brand);
    border-radius: 12px; padding: 11px 14px; margin: 12px 0;
    font-size: 14px; font-weight: 600; color: var(--brand-dark);
}

.veh-tariffs { margin: 8px 0 14px; }
.veh-tariffs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.veh-tariff {
    display: inline-flex; align-items: center;
    padding: 9px 15px; border-radius: 12px;
    border: 2px solid var(--border); background: var(--panel-muted);
    font-size: 14px; font-weight: 600; color: var(--text);
    cursor: pointer; user-select: none;
    transition: border-color .15s, background .15s, color .15s;
}
.veh-tariff--on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.veh-tariff input { display: none; }
.btn--block { width: 100%; }
#vehicleCard .btn + .btn { margin-top: 8px; }

.field__input--code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 0.3em;
    font-weight: 700;
}

/* ===== Телефон пользователя в шапке ===== */
.user-phone {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
    font-family: "Courier New", monospace;
}

/* ====================================================
   PWA — плавающая кнопка «Установить приложение»
   ==================================================== */
.install-btn {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 20px;
    background: #ffcc00;
    color: #0f1420;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    animation: install-pop .4s ease-out;
}
.install-btn:hover { background: #ffd633; }
@keyframes install-pop {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* в режиме standalone не показываем */
@media all and (display-mode: standalone) {
    .install-btn { display: none !important; }

    /* Прозрачный статус-бар iOS рисует часы/значки БЕЛЫМИ и это не настраивается.
       Над светлой картой они теряются — кладём очень лёгкую размытую подложку
       строго в зону статус-бара. Маска плавно сводит её на нет: видимой
       «полосы» нет, но часы читаются. Высота = env(safe-area-inset-top): когда
       прозрачный бар НЕ активен, инсет 0 и подложка не появляется. */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top, 0px);
        z-index: 9000;
        pointer-events: none;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0));
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        -webkit-mask: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, 0.45) 78%, rgba(0, 0, 0, 0) 100%);
        mask: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, 0.45) 78%, rgba(0, 0, 0, 0) 100%);
    }
}

/* ====================================================
   Яндекс.Карты — убираем логотип, копирайты, кнопки
   ==================================================== */
.ymaps-2-1-79-copyright,
[class*="ymaps"][class*="-copyright"],
[class*="ymaps"][class*="-gototech"],
[class*="ymaps"][class*="-logo"],
[class*="ymaps"][class*="-map-copyrights-promo"],
[class*="ymaps"][class*="-controls__toolbar"],
[class*="ymaps"][class*="-controls-pane"] {
    display: none !important;
}
