:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #17212b;
  --muted: #6f7985;
  --accent: #2688eb;
  --accent-dark: #1b74d1;
  --danger: #e64646;
  --success: #2fa84f;
  --border: #dce2ea;
  --shadow: 0 12px 32px rgba(23, 33, 43, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 40px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.hero {
  background:
    radial-gradient(circle at top right, rgba(38, 136, 235, 0.2), transparent 35%),
    #ffffff;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(38, 136, 235, 0.11);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

h1, h2 {
  margin: 0 0 10px;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

p {
  margin: 0;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
  margin-bottom: 14px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
  background: #ffffff;
  color: var(--text);
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

.primary-btn, .secondary-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  background: var(--accent);
  color: white;
}

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

.secondary-btn {
  background: rgba(38, 136, 235, 0.11);
  color: var(--accent);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.route-item {
  position: relative;
  margin-bottom: 12px;
}

.route-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.route-title {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

.suggestions {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.suggestion {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
  font-size: 14px;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover {
  background: #f5f8fc;
}

.options-list {
  display: grid;
  gap: 10px;
}

.option-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.option-item input {
  width: auto;
}

.option-title {
  font-weight: 800;
}

.option-price {
  color: var(--muted);
  font-size: 13px;
}

.verified-phone {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
  margin-bottom: 13px;
}

.verified-phone span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.message {
  margin-top: 14px;
  padding: 13px;
  border-radius: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.message.success {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.message.error {
  background: rgba(230, 70, 70, 0.12);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.mt {
  margin-top: 10px;
}

.route-comment-field {
  margin-top: 8px;
  margin-bottom: 0;
}

.route-comment-field input {
  background: #f8fbff;
}

/* Поле уточнения адреса: подъезд / место встречи */
.route-comment-field {
  margin-top: 7px;
  margin-left: 12px;
  margin-bottom: 0;
  padding: 9px 10px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #fff8e6;
}

.route-comment-field span {
  font-size: 12px;
  color: #8a6d1d;
  font-weight: 800;
}

.route-comment-field input {
  min-height: 36px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  border-color: #efd58a;
}

.route-comment-field input:focus {
  border-color: var(--accent);
}

/* Маркеры миникарты: Старт / 2 / 3 / Финиш */
.route-map-marker {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(23, 33, 43, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.route-map-marker span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.route-map-marker-start {
  background: #2fa84f;
}

.route-map-marker-middle {
  background: var(--accent);
}

.route-map-marker-finish {
  background: #e64646;
}

/* Блок миникарты */
.route-map-block {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.route-map-hint {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: #f8fbff;
  border-bottom: 1px solid var(--border);
}

.route-map {
  width: 100%;
  height: 220px;
  background: #eef3f8;
}

/* Метка-капля для карты */
.route-map-pin-wrap {
  background: transparent !important;
  border: 0 !important;
}

.route-map-pin-wrap div {
  background: transparent;
}

.route-map-marker {
  position: relative;
  width: 28px;
  height: 28px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(23, 33, 43, 0.35);
  transform: rotate(-45deg);
  transform-origin: center center;
  border-radius: 50% 50% 50% 0;
  display: block;
}

.route-map-marker span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.route-map-marker-start {
  background: #2fa84f;
}

.route-map-marker-middle {
  background: var(--accent);
}

.route-map-marker-finish {
  background: #e64646;
}

/* ===== Красивые pin-маркеры маршрута ===== */

.route-map-pin-wrap {
  background: transparent !important;
  border: 0 !important;
}

.route-map-pin {
  position: relative;
  width: 34px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  filter: drop-shadow(0 5px 8px rgba(23, 33, 43, 0.35));
}

.route-map-pin-body {
  position: relative;
  width: 30px;
  height: 30px;
  margin-top: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-map-pin-body span {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.route-map-pin-body::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 4px;
  top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.route-map-pin-start .route-map-pin-body {
  background: #2fa84f;
}

.route-map-pin-middle .route-map-pin-body {
  background: #2688eb;
}

.route-map-pin-finish .route-map-pin-body {
  background: #e64646;
}

.route-map-pin-shadow {
  position: absolute;
  bottom: 1px;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.25);
  filter: blur(1px);
}

/* Подсказки адресов всегда поверх миникарты */
.route-item {
  z-index: 50;
}

.route-item:focus-within {
  z-index: 5000;
}

.suggestions {
  z-index: 6000 !important;
}

.route-map-block {
  position: relative;
  z-index: 1;
}

.leaflet-container,
.leaflet-pane,
.leaflet-map-pane,
.leaflet-control-container {
  z-index: 1;
}

/* Цветной комментарий над картой */
.route-map-hint {
  padding: 0;
  background: #ffffff;
}

.route-map-summary {
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  border-left: 5px solid var(--accent);
}

.route-map-summary-success {
  background: #eef9f1;
  color: #1f6f35;
  border-left-color: #2fa84f;
}

.route-map-summary-warning {
  background: #fff8e6;
  color: #8a6d1d;
  border-left-color: #f0b429;
}

.route-map-summary-muted {
  background: #f8fbff;
  color: var(--muted);
  border-left-color: var(--accent);
}

.route-map-time-icon {
  display: inline-block;
  margin: 0 2px;
}

.route-map-note {
  color: #6f7985;
  font-weight: 700;
}

.route-map-time-icon {
  display: inline-block;
  margin: 0 3px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.route-map-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.route-map-summary-line:last-of-type {
  margin-bottom: 0;
}

.route-map-summary-label {
  font-weight: 900;
}

.route-map-summary-value {
  font-weight: 800;
}

.route-map-summary-extra {
  margin-top: 8px;
  font-weight: 700;
  color: #6f7985;
}

/* ===== Опции автомобиля: сетка 3 x 2 ===== */

.options-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.option-item {
  position: relative;
  min-height: 104px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.option-item:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: #f8fbff;
}

.option-item input {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.option-visual {
  height: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 4px;
  padding-top: 10px;
}

.option-icon {
  font-size: 25px;
  line-height: 1;
}

.option-title {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.option-price {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.1;
}

.option-item:has(input:checked) {
  border-color: var(--accent);
  background: #edf4ff;
  box-shadow: 0 8px 22px rgba(38, 136, 235, 0.14);
}

@media (max-width: 420px) {
  .options-list {
    gap: 8px;
  }

  .option-item {
    min-height: 96px;
    padding: 8px 6px;
  }

  .option-icon {
    font-size: 22px;
  }

  .option-title {
    font-size: 11px;
  }

  .option-price {
    font-size: 10px;
  }
}

/* Стабильное нажатие по подсказкам адреса */
.suggestion {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.suggestions {
  pointer-events: auto;
}

/* ===== Бюджет поездки: движок цены ===== */

.budget-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  background: #f8fbff;
}

.budget-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.budget-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.budget-help {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
  font-weight: 700;
}

.budget-current {
  min-width: 82px;
  text-align: right;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
}

.budget-recommended {
  font-size: 13px;
  font-weight: 800;
  color: #1f6f35;
  background: #eef9f1;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.budget-slider {
  width: 100%;
  accent-color: var(--accent);
}

.budget-slider:disabled {
  opacity: 0.45;
}

.budget-limits {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

@media (max-width: 420px) {
  .budget-head {
    align-items: flex-start;
  }

  .budget-current {
    font-size: 20px;
    min-width: 74px;
  }
}

/* Нижние подписи под движком бюджета убираем */
.budget-limits {
  display: none !important;
}

/* Цветной движок бюджета */
.budget-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  outline: none;
  background: #f0c94a;
  cursor: pointer;
}

.budget-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -8px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: var(--budget-slider-color, #f0c94a);
  box-shadow: 0 4px 12px rgba(23, 33, 43, 0.28);
}

.budget-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

.budget-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: var(--budget-slider-color, #f0c94a);
  box-shadow: 0 4px 12px rgba(23, 33, 43, 0.28);
}

.budget-slider:disabled {
  cursor: not-allowed;
  background: #dce2ea !important;
}

/* Рекомендованная цена как кнопка возврата */
.budget-recommended {
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.budget-recommended:hover {
  background: #e1f5e7;
  box-shadow: 0 6px 16px rgba(47, 168, 79, 0.12);
}

.budget-recommended:active {
  transform: scale(0.98);
}

.budget-recommended b::after {
  content: "  ↺";
  font-weight: 900;
}

/* ===== Адреса не из базы ===== */

.route-address-input-error {
  border-color: #e64646 !important;
  background: #fff5f5 !important;
}

.route-address-input-error:focus {
  border-color: #e64646 !important;
  box-shadow: 0 0 0 3px rgba(230, 70, 70, 0.12);
}

.address-review-box {
  margin-top: 8px;
  padding: 10px;
  border-left: 4px solid #e64646;
  border-radius: 12px;
  background: #fff0f0;
}

.address-review-text {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.address-review-btn {
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  padding: 9px 11px;
  background: #e64646;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.address-review-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===== Стоимость по таксометру ===== */

.budget-box.taximeter-mode {
  background: #fff8e6;
  border-color: #f0b429;
}

.budget-box.taximeter-mode .budget-recommended,
.budget-box.taximeter-mode .budget-slider,
.budget-box.taximeter-mode .budget-limits {
  display: none !important;
}

.budget-box.taximeter-mode .budget-current {
  min-width: auto;
  font-size: 16px;
  color: #8a6d1d;
  background: #fff0c2;
  border-radius: 999px;
  padding: 7px 10px;
}

.budget-box.taximeter-mode .budget-help {
  color: #8a6d1d;
}

/* ===== Размытые адреса: по городу / скажу водителю / покажу водителю ===== */

.route-address-input-blocked {
  border-color: #e64646 !important;
  background: #fff5f5 !important;
}

.address-ambiguous-box {
  margin-top: 8px;
  padding: 10px 11px;
  border-left: 4px solid #e64646;
  border-radius: 12px;
  background: #fff0f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.primary-btn.submit-blocked,
.primary-btn.submit-blocked:hover {
  background: #b8c1cc;
  color: #ffffff;
  cursor: not-allowed;
}

/* Блокировка некорректных адресных формулировок */
.route-address-input-blocked,
.route-address-input-error {
  border-color: #e64646 !important;
  background: #fff5f5 !important;
}

.address-ambiguous-box {
  margin-top: 8px;
  padding: 10px 11px;
  border-left: 4px solid #e64646;
  border-radius: 12px;
  background: #fff0f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.primary-btn.submit-blocked,
.primary-btn.submit-blocked:hover,
.primary-btn:disabled.submit-blocked {
  background: #b8c1cc !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
}

/* FINAL: блокировка фраз вместо адреса */
.route-address-input-blocked,
.route-address-input-error {
  border-color: #e64646 !important;
  background: #fff5f5 !important;
}

.address-ambiguous-box-final {
  margin-top: 8px;
  padding: 10px 11px;
  border-left: 4px solid #e64646;
  border-radius: 12px;
  background: #fff0f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.primary-btn.submit-blocked,
.primary-btn.submit-blocked:hover,
.primary-btn:disabled.submit-blocked {
  background: #b8c1cc !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
}

/* ===== Последние адреса пользователя ===== */

.recent-addresses-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px dashed #c8d7ea;
}

.recent-addresses-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.recent-addresses-list {
  display: grid;
  gap: 7px;
}

.recent-address-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(23, 33, 43, 0.06);
}

.recent-address-btn:hover {
  background: #edf4ff;
}

.recent-address-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-address-count {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(38, 136, 235, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

/* Быстрые последние адреса: показываем только при фокусе */
.recent-addresses-focus-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px dashed #c8d7ea;
  position: relative;
  z-index: 7000;
}

/* Компактный комментарий к заказу */
#commentInput {
  min-height: 58px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.35;
}

/* Описание внутри карточки опции */
.option-description {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.15;
  font-weight: 700;
  color: #8a6d1d;
}

.option-item:has(input[value="child_tariff"]) {
  min-height: 132px;
}

.option-item:has(input[value="child_tariff"]) .option-visual {
  gap: 3px;
  align-content: start;
  padding-top: 18px;
}

.option-item:has(input[value="child_tariff"]) .option-icon {
  font-size: 21px;
}

.option-item:has(input[value="child_tariff"]) .option-title {
  font-size: 11px;
}

.option-item:has(input[value="child_tariff"]) .option-price {
  font-size: 10px;
}

@media (max-width: 420px) {
  .option-description {
    font-size: 8.5px;
    line-height: 1.12;
  }

  .option-item:has(input[value="child_tariff"]) {
    min-height: 126px;
  }
}

/* ===== Страница активного заказа ===== */

.active-order-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: auto;
  background: #f4f7fb;
  color: var(--text);
}

.active-order-page.hidden {
  display: none;
}

.active-order-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.active-order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.active-order-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.active-order-top h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.active-order-card,
.active-order-status-card,
.active-order-driver-card {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.active-order-status-card {
  background: #eef9f1;
  border-left: 5px solid #2fa84f;
}

.active-order-status-title {
  font-size: 16px;
  font-weight: 900;
  color: #1f6f35;
}

.active-order-status-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #6f7985;
}

.active-order-card-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
}

.active-order-route-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.active-order-route-row:last-child {
  border-bottom: 0;
}

.active-order-route-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.active-order-route-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.active-order-route-title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 900;
}

.active-order-route-comment {
  margin-top: 3px;
  color: #8a6d1d;
  font-size: 12px;
  font-weight: 800;
}

.active-order-map {
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: #dce2ea;
}

.active-order-param-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.active-order-param-row:last-child {
  border-bottom: 0;
}

.active-order-param-row span {
  color: var(--muted);
  font-weight: 800;
}

.active-order-param-row b {
  text-align: right;
  font-weight: 900;
}

.active-order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.active-order-light-btn,
.active-order-danger-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.active-order-light-btn {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--border);
}

.active-order-danger-btn {
  background: #e64646;
  color: #ffffff;
}

.active-order-danger-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.active-order-message {
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 900;
}

.active-order-message.hidden {
  display: none;
}

.active-order-message-success {
  background: #eef9f1;
  color: #1f6f35;
}

.active-order-message-error {
  background: #fff0f0;
  color: #b42318;
}

@media (max-width: 420px) {
  .active-order-actions {
    grid-template-columns: 1fr;
  }

  .active-order-map {
    height: 230px;
  }
}

/* ===== Радар поиска автомобиля ===== */

.active-order-radar-wrap.hidden {
  display: none;
}

.active-order-radar-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef9f1 0%, #f8fffa 100%);
  border: 1px solid #cfe8d6;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.active-order-radar {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 132px;
  background:
    radial-gradient(circle at center, rgba(47,168,79,0.12) 0%, rgba(47,168,79,0.06) 35%, rgba(47,168,79,0.03) 60%, rgba(47,168,79,0.02) 100%);
  border: 2px solid rgba(47, 168, 79, 0.18);
}

.active-order-radar::before,
.active-order-radar::after {
  content: "";
  position: absolute;
  background: rgba(47, 168, 79, 0.16);
}

.active-order-radar::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.active-order-radar::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

.active-order-radar-ring {
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  border: 1px solid rgba(47, 168, 79, 0.28);
  transform: translate(-50%, -50%);
  animation: activeOrderRadarPulse 2.6s infinite ease-out;
}

.active-order-radar-ring-1 {
  width: 34px;
  height: 34px;
  animation-delay: 0s;
}

.active-order-radar-ring-2 {
  width: 68px;
  height: 68px;
  animation-delay: 0.35s;
}

.active-order-radar-ring-3 {
  width: 102px;
  height: 102px;
  animation-delay: 0.7s;
}

.active-order-radar-sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 50%;
  transform-origin: 0% 0%;
  background: linear-gradient(45deg, rgba(47,168,79,0.00) 0%, rgba(47,168,79,0.10) 40%, rgba(47,168,79,0.34) 100%);
  clip-path: polygon(0 0, 100% 20%, 100% 0);
  animation: activeOrderRadarSweep 2.2s linear infinite;
}

.active-order-radar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47,168,79,0.16);
  z-index: 2;
}

.active-order-radar-text {
  min-width: 0;
}

.active-order-radar-title {
  font-size: 16px;
  font-weight: 900;
  color: #1f6f35;
}

.active-order-radar-subtitle {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #6f7985;
}

@keyframes activeOrderRadarSweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes activeOrderRadarPulse {
  0% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.25;
  }
}

@media (max-width: 520px) {
  .active-order-radar-card {
    flex-direction: column;
    text-align: center;
  }

  .active-order-radar {
    width: 118px;
    height: 118px;
    flex-basis: 118px;
  }
}

/* ===== FIX: радар поиска автомобиля ===== */

.active-order-radar-wrap.hidden {
  display: none !important;
}

.active-order-radar-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef9f1 0%, #f8fffa 100%);
  border: 1px solid #cfe8d6;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.active-order-radar {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 132px;
  background: radial-gradient(circle at center, rgba(47,168,79,0.12) 0%, rgba(47,168,79,0.05) 70%, rgba(47,168,79,0.02) 100%);
  border: 2px solid rgba(47, 168, 79, 0.18);
}

.active-order-radar::before,
.active-order-radar::after {
  content: "";
  position: absolute;
  background: rgba(47, 168, 79, 0.16);
}

.active-order-radar::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.active-order-radar::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

.active-order-radar-ring {
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  border: 1px solid rgba(47, 168, 79, 0.3);
  transform: translate(-50%, -50%);
  animation: activeOrderRadarPulse 2.6s infinite ease-out;
}

.active-order-radar-ring-1 {
  width: 34px;
  height: 34px;
}

.active-order-radar-ring-2 {
  width: 68px;
  height: 68px;
  animation-delay: 0.35s;
}

.active-order-radar-ring-3 {
  width: 102px;
  height: 102px;
  animation-delay: 0.7s;
}

.active-order-radar-sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 50%;
  transform-origin: 0% 0%;
  background: linear-gradient(45deg, rgba(47,168,79,0.00) 0%, rgba(47,168,79,0.14) 45%, rgba(47,168,79,0.4) 100%);
  clip-path: polygon(0 0, 100% 20%, 100% 0);
  animation: activeOrderRadarSweep 2.2s linear infinite;
}

.active-order-radar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47,168,79,0.16);
  z-index: 2;
}

.active-order-radar-title {
  font-size: 16px;
  font-weight: 900;
  color: #1f6f35;
}

.active-order-radar-subtitle {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #6f7985;
}

@keyframes activeOrderRadarSweep {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes activeOrderRadarPulse {
  0% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.95;
  }

  100% {
    opacity: 0.25;
  }
}

@media (max-width: 520px) {
  .active-order-radar-card {
    flex-direction: column;
    text-align: center;
  }

  .active-order-radar {
    width: 118px;
    height: 118px;
    flex-basis: 118px;
  }
}

/* ===== FINAL: независимый индикатор поиска автомобиля ===== */

.search-car-indicator-final.hidden {
  display: none !important;
}

.search-car-indicator-final {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef9f1 0%, #f8fffa 100%);
  border: 1px solid #cfe8d6;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.search-car-radar-final {
  position: relative;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(47, 168, 79, 0.2);
  background: radial-gradient(circle at center, rgba(47,168,79,0.13) 0%, rgba(47,168,79,0.05) 70%, rgba(47,168,79,0.02) 100%);
}

.search-car-radar-final::before,
.search-car-radar-final::after {
  content: "";
  position: absolute;
  background: rgba(47, 168, 79, 0.18);
}

.search-car-radar-final::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.search-car-radar-final::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

.search-car-radar-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(47, 168, 79, 0.32);
  transform: translate(-50%, -50%);
  animation: searchCarPulseFinal 2.5s infinite ease-in-out;
}

.search-car-radar-circle-1 {
  width: 34px;
  height: 34px;
}

.search-car-radar-circle-2 {
  width: 68px;
  height: 68px;
  animation-delay: 0.25s;
}

.search-car-radar-circle-3 {
  width: 100px;
  height: 100px;
  animation-delay: 0.5s;
}

.search-car-radar-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  height: 52%;
  transform-origin: 0% 0%;
  background: linear-gradient(45deg, rgba(47,168,79,0) 0%, rgba(47,168,79,0.12) 45%, rgba(47,168,79,0.45) 100%);
  clip-path: polygon(0 0, 100% 22%, 100% 0);
  animation: searchCarSweepFinal 2s linear infinite;
}

.search-car-radar-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47,168,79,0.16);
  font-size: 18px;
  z-index: 2;
}

.search-car-indicator-title {
  font-size: 16px;
  font-weight: 900;
  color: #1f6f35;
}

.search-car-indicator-subtitle {
  margin-top: 5px;
  color: #6f7985;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

@keyframes searchCarSweepFinal {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes searchCarPulseFinal {
  0% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.95;
  }

  100% {
    opacity: 0.25;
  }
}

@media (max-width: 520px) {
  .search-car-indicator-final {
    flex-direction: column;
    text-align: center;
  }

  .search-car-radar-final {
    width: 108px;
    height: 108px;
    flex-basis: 108px;
  }
}

/* ===== Контроль поиска водителя через 10 минут ===== */

.driver-search-timeout-control.hidden {
  display: none !important;
}

.driver-search-timeout-control {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff8e8;
  border: 1px solid #f1d391;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.driver-search-timeout-title {
  color: #8a5b00;
  font-size: 15px;
  font-weight: 900;
}

.driver-search-timeout-text {
  margin-top: 6px;
  color: #5f6670;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.driver-search-timeout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.driver-search-continue-btn,
.driver-search-cancel-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.driver-search-continue-btn {
  background: #2fa84f;
  color: #ffffff;
}

.driver-search-cancel-btn {
  background: #e64646;
  color: #ffffff;
}

.driver-search-continue-btn:disabled,
.driver-search-cancel-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 420px) {
  .driver-search-timeout-actions {
    grid-template-columns: 1fr;
  }
}

/* Карточка назначенного водителя */
.active-order-driver-main {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.active-order-driver-main b {
  color: var(--accent);
  font-weight: 900;
}

.active-order-driver-car {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #5f6670;
  line-height: 1.35;
}

.active-order-driver-car b {
  color: var(--text);
  font-weight: 900;
}

/* Ожидание водителя */
.active-order-waiting-row {
  background: #fff8e8;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 10px;
}

.active-order-waiting-row b {
  color: #8a5b00;
}

.active-order-total-row {
  background: #eef9f1;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 10px;
}

.active-order-total-row b {
  color: #1f6f35;
  font-size: 15px;
}

/* ===== Обратный отсчёт ожидания ===== */

.final-waiting-old-hidden {
  display: none !important;
}

.final-waiting-countdown-block {
  display: contents;
}

.final-waiting-row {
  background: #fff8e8;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 10px;
}

.final-waiting-row b {
  color: #8a5b00;
}

.final-waiting-total-row {
  background: #eef9f1;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 10px;
}

.final-waiting-total-row b {
  color: #1f6f35;
  font-size: 15px;
}

.final-waiting-paid {
  color: #b42318 !important;
}

/* Отключаем старый дубль радара */
.active-order-radar-wrap,
.active-order-radar-card {
  display: none !important;
}

/* Кнопка связи с водителем */
.active-order-driver-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 119, 255, 0.18);
}

.active-order-driver-call-btn:active {
  transform: translateY(1px);
}

/* ===== Живая машинка водителя ===== */

.driver-live-info-box.hidden {
  display: none !important;
}

.driver-live-info-box {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #cfe8d6;
  background: #eef9f1;
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
}

.driver-live-info-title {
  font-size: 14px;
  font-weight: 900;
  color: #1f6f35;
}

.driver-live-info-text {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  color: #5f6670;
}

.driver-live-info-warning {
  background: #fff8e8;
  border-color: #f1d391;
}

.driver-live-info-warning .driver-live-info-title {
  color: #8a5b00;
}

.driver-live-info-success {
  background: #eef9f1;
  border-color: #cfe8d6;
}

.driver-live-car-icon {
  background: transparent;
  border: 0;
}

.driver-live-car-inner {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #2fa84f;
  box-shadow: 0 5px 14px rgba(23, 33, 43, 0.28);
  font-size: 19px;
  transform-origin: center;
}

/* VK Push */
.vk-push-permission-btn {
  width: 100%;
  min-height: 44px;
  margin: 10px 0;
  border: 0;
  border-radius: 14px;
  background: #eef4ff;
  color: #1d5fd6;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.vk-push-permission-btn:active {
  transform: translateY(1px);
}

/* Legal links */
.legal-footer {
  max-width: 520px;
  margin: 18px auto 28px;
  padding: 0 16px;
  text-align: center;
  color: #7a8494;
  font-size: 12px;
  line-height: 1.5;
}

.legal-footer a {
  color: #2d74ff;
  text-decoration: none;
  font-weight: 800;
}

.legal-footer a:active {
  opacity: .75;
}

.legal-footer span {
  margin: 0 5px;
  color: #a0a8b5;
}

/* TEMP: VK push disabled until app moderation/trusted status */
#vkPushPermissionBtn,
#forceVkPushBtn,
#vkPushUntrustedNotice,
.vk-push-permission-btn,
.vk-push-untrusted-notice {
  display: none !important;
}

/* Offline / network error overlay */
.network-offline-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(8px);
}

.network-offline-overlay.visible {
  display: flex;
}

.network-offline-card {
  width: min(420px, 100%);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, .28);
  padding: 22px;
  text-align: center;
}

.network-offline-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff4e5;
  color: #b45309;
  font-size: 30px;
}

.network-offline-title {
  margin: 0 0 8px;
  color: #17212b;
  font-size: 20px;
  font-weight: 900;
}

.network-offline-text {
  margin: 0 0 18px;
  color: #5f6b7a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.network-offline-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: #2d74ff;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.network-offline-btn:active {
  transform: translateY(1px);
}

.network-offline-note {
  margin-top: 10px;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 700;
}

/* Real VK push button after app approval */
#vkRealPushEnableBtn.vk-real-push-enable-btn {
  display: block !important;
  width: 100%;
  min-height: 46px;
  margin: 10px 0 14px;
  border: 0;
  border-radius: 16px;
  background: #eef4ff;
  color: #1d5fd6;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

#vkRealPushEnableBtn.vk-real-push-enable-btn:active {
  transform: translateY(1px);
}

#vkRealPushEnableBtn.vk-real-push-enable-btn:disabled {
  opacity: .75;
  cursor: default;
}

#vkRealPushEnableBtn.vk-real-push-enable-btn-done {
  background: #e9f8ef !important;
  color: #16803a !important;
}

#vkRealPushEnableBtn.vk-real-push-enable-btn-under-order {
  margin-top: 10px !important;
  margin-bottom: 14px !important;
}

/* Simple VK push button */
#vkSimplePushBtn.vk-simple-push-btn {
  display: block !important;
  width: 100%;
  min-height: 46px;
  margin: 10px 0 14px;
  border: 0;
  border-radius: 16px;
  background: #eef4ff;
  color: #1d5fd6;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

#vkSimplePushBtn.vk-simple-push-btn:active {
  transform: translateY(1px);
}

#vkSimplePushBtn.vk-simple-push-btn:disabled {
  opacity: .75;
  cursor: default;
}

#vkSimplePushBtn.vk-simple-push-btn-enabled {
  background: #e9f8ef !important;
  color: #16803a !important;
}

/* FINAL: машинка водителя на карте без кружка */
.leaflet-marker-icon.driver-live-car-icon,
.driver-live-car-icon {
  background: transparent !important;
  border: 0 !important;
}

.driver-live-car-inner {
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 24px !important;
  line-height: 1 !important;
  transform-origin: center center !important;
  filter: drop-shadow(0 2px 4px rgba(23, 33, 43, 0.35));
}

/* FINAL: машинка водителя всегда колёсами вниз */
.driver-live-car-inner {
  transform: none !important;
  rotate: 0deg !important;
}

/* FINAL: предупреждение если рядом нет свободных машин */
.driver-availability-warning {
  margin: 0 0 12px;
  padding: 12px 13px;
  border-left: 5px solid #e64646;
  border-radius: 14px;
  background: #fff0f0;
  color: #b42318;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

/* FINAL: сообщение о повышенном спросе и надбавке к цене */
.driver-demand-surcharge-message {
  margin: -4px 0 14px;
  padding: 12px 13px;
  border-left: 5px solid #e64646;
  border-radius: 14px;
  background: #fff0f0;
  color: #b42318;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

/* FINAL CLEAN: сообщения по водителям строго скрыты до выбора адреса */
.driver-availability-warning.hidden,
.driver-demand-surcharge-message.hidden {
  display: none !important;
}


/* FINAL: предупреждение по адресу показываем выше поля ввода */
.address-review-box {
  margin: 0 0 8px 0 !important;
}

/* FINAL: подсказки адресов делаем чуть заметнее */
.suggestions {
  background: #fffdf0 !important;
  border-color: #efd58a !important;
}

.suggestion:hover {
  background: #fff8e6 !important;
}


/* FINAL: подсказки адресов под полем и поверх комментария */
.route-item {
  position: relative;
}

.route-item:focus-within {
  z-index: 30000 !important;
}

.route-comment-field {
  position: relative;
  z-index: 1;
}

.suggestions {
  position: absolute !important;
  z-index: 30000 !important;
  background: #eef6ff !important;
  border: 1px solid #b9d7ff !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 34px rgba(23, 33, 43, 0.22) !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

.suggestion {
  background: #eef6ff !important;
  border-bottom: 1px solid #d6e8ff !important;
  color: #17212b !important;
}

.suggestion:hover,
.suggestion:active {
  background: #dcebff !important;
}


/* FINAL: заголовок блока подсказок адресов */
.suggestions-title {
  padding: 7px 12px 5px;
  background: #dcebff;
  color: #4f6f95;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #c8ddfb;
  user-select: none;
  pointer-events: none;
}


/* FINAL: значок помощи справа от поля адреса */
.route-address-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.route-address-input-row .route-address-main-input {
  flex: 1 1 auto;
  min-width: 0;
}

.route-address-help {
  position: relative;
  flex: 0 0 auto;
  z-index: 35000;
}

.route-address-help-btn {
  width: 44px;
  height: 100%;
  min-height: 48px;
  border: 1px solid #b9d7ff;
  border-radius: 16px;
  background: #eef6ff;
  color: #1d5fd6;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(38, 136, 235, 0.12);
}

.route-address-help-btn:hover,
.route-address-help.route-address-help-open .route-address-help-btn {
  background: #dcebff;
  border-color: #8fc0ff;
}

.route-address-help-tip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 48px));
  padding: 11px 12px;
  border-radius: 14px;
  background: #17212b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(23, 33, 43, 0.28);
  z-index: 36000;
}

.route-address-help-tip::before {
  content: "";
  position: absolute;
  right: 15px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #17212b;
  transform: rotate(45deg);
}

.route-address-help:hover .route-address-help-tip,
.route-address-help.route-address-help-open .route-address-help-tip {
  display: block;
}

@media (max-width: 420px) {
  .route-address-input-row {
    gap: 6px;
  }

  .route-address-help-btn {
    width: 40px;
    min-height: 46px;
    border-radius: 14px;
  }

  .route-address-help-tip {
    right: -2px;
    width: min(310px, calc(100vw - 34px));
    font-size: 11.5px;
  }
}

/* FINAL: всплывающая помощь по адресу всегда поверх следующего адресного блока */
.route-item.route-item-help-open {
  z-index: 70000 !important;
}

.route-item.route-item-help-open .route-address-help {
  z-index: 71000 !important;
}

.route-item.route-item-help-open .route-address-help-tip {
  z-index: 72000 !important;
}

/* Для браузеров, где поддерживается :has — дополнительная страховка */
.route-item:has(.route-address-help:hover),
.route-item:has(.route-address-help-open) {
  z-index: 70000 !important;
}


/* FINAL: помощь рядом с заголовком Маршрут */
.route-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 20000;
}

.route-card-title-row h2 {
  margin-bottom: 0;
}

.route-title-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 21000;
}

.route-title-help-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #b9d7ff;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d5fd6;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(38, 136, 235, 0.12);
}

.route-title-help-btn:hover,
.route-title-help.route-title-help-open .route-title-help-btn {
  background: #dcebff;
  border-color: #8fc0ff;
}

.route-title-help-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(380px, calc(100vw - 40px));
  padding: 11px 12px;
  border-radius: 14px;
  background: #17212b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(23, 33, 43, 0.28);
  z-index: 22000;
}

.route-title-help-tip::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #17212b;
  transform: rotate(45deg);
}

.route-title-help:hover .route-title-help-tip,
.route-title-help.route-title-help-open .route-title-help-tip {
  display: block;
}

/* FINAL: старые значки помощи внутри адресных полей скрываем полностью */
#routeList .route-address-help,
#routeList .route-address-help-btn,
#routeList .route-address-help-tip {
  display: none !important;
}

#routeList .route-address-input-row {
  display: block !important;
}

#routeList .route-address-input-row .route-address-main-input {
  width: 100% !important;
}

@media (max-width: 420px) {
  .route-title-help-tip {
    left: auto;
    right: -8px;
    width: min(330px, calc(100vw - 32px));
    font-size: 11.5px;
  }

  .route-title-help-tip::before {
    left: auto;
    right: 15px;
  }
}

/* ===== FINAL: быстрая очистка адресного поля ===== */

.route-address-input-row {
  position: relative;
  display: block;
}

.route-address-input-row .route-address-main-input {
  padding-right: 48px;
}

.route-address-clear-btn {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: #6f7985;
  font-size: 22px;
  font-weight: 900;
  line-height: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.route-address-input-row.route-address-input-row-has-value .route-address-clear-btn {
  display: flex;
}

.route-address-clear-btn:hover {
  background: #dcecff;
  color: var(--accent);
}

.route-address-clear-btn:active {
  transform: translateY(-50%) scale(0.94);
}

/* ===== /FINAL: быстрая очистка адресного поля ===== */

/* ===== FINAL FIX: помощь Маршрут (?) внутри карточки без выхода за экран ===== */

.route-card-title-row {
  display: grid !important;
  grid-template-columns: auto auto 1fr !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
  margin-bottom: 10px !important;
  position: relative !important;
  z-index: 25000 !important;
}

.route-card-title-row h2 {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
}

.route-title-help {
  display: contents !important;
}

.route-title-help-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.route-title-help-tip {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: none !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: #17212b !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.22) !important;
  z-index: auto !important;
}

.route-title-help-tip::before {
  display: none !important;
}

.route-title-help:hover .route-title-help-tip,
.route-title-help.route-title-help-open .route-title-help-tip {
  display: block !important;
}

@media (max-width: 420px) {
  .route-card-title-row {
    grid-template-columns: auto auto 1fr !important;
    margin-bottom: 10px !important;
  }

  .route-title-help-tip {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11.5px !important;
  }
}

/* ===== /FINAL FIX: помощь Маршрут (?) внутри карточки без выхода за экран ===== */

/* ===== FINAL FIX: полные названия адресов в подсказках ===== */

/*
  Подсказки оставляем уже поля, чтобы справа было место для скролла экрана.
  Но адреса показываем полностью: с переносом слов и без троеточий.
*/
.suggestions {
  width: 70% !important;
  max-width: 70% !important;
  min-width: 0 !important;
  left: 0 !important;
  right: auto !important;

  max-height: 68vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;

  border-radius: 12px !important;
}

/* Заголовок блока подсказок */
.suggestions-title {
  padding: 6px 9px 5px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

/* Полное название адреса, переносим на несколько строк */
.suggestion {
  min-height: auto !important;
  padding: 8px 9px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;

  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

/*
  На маленьких экранах даём блоку чуть больше ширины,
  чтобы адрес меньше дробился по строкам.
*/
@media (max-width: 360px) {
  .suggestions {
    width: 78% !important;
    max-width: 78% !important;
    max-height: 70vh !important;
  }

  .suggestion {
    font-size: 11.5px !important;
    padding: 8px 8px !important;
  }
}

/* ===== /FINAL FIX: полные названия адресов в подсказках ===== */

/* ===== FINAL MOBILE FIX: подсказки адресов в потоке страницы ===== */

/*
  На мобильном подсказки не должны быть маленьким абсолютным окном.
  Делаем их обычным блоком внутри карточки маршрута:
  карточка раздвигается вниз, адреса видны полностью.
*/
@media (max-width: 520px) {
  .route-item:focus-within {
    z-index: 30000 !important;
  }

  .suggestions {
    position: static !important;
    display: none;
    width: 70% !important;
    max-width: 70% !important;
    min-width: 0 !important;

    margin-top: 7px !important;
    margin-bottom: 10px !important;

    max-height: none !important;
    overflow: visible !important;

    background: #eef6ff !important;
    border: 1px solid #b9d7ff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 18px rgba(23, 33, 43, 0.12) !important;
  }

  .suggestions-title {
    padding: 6px 9px 5px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .suggestion {
    padding: 8px 9px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;

    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

/*
  На очень узких экранах даём чуть больше ширины,
  иначе длинные адреса будут слишком сильно дробиться.
*/
@media (max-width: 360px) {
  .suggestions {
    width: 78% !important;
    max-width: 78% !important;
  }

  .suggestion {
    font-size: 11.5px !important;
    padding: 8px 8px !important;
  }
}

/* ===== /FINAL MOBILE FIX: подсказки адресов в потоке страницы ===== */

/* ===== FINAL FIX: слой активного заказа выше формы маршрута ===== */

/* Страница активного заказа должна быть выше любых подсказок формы маршрута */
.active-order-page {
  z-index: 120000 !important;
}

/* Дополнительная страховка: когда активный заказ открыт, форма оформления полностью скрыта */
body.active-order-visible #orderCard,
body.active-order-visible #authCard {
  display: none !important;
}

/* Убираем всплывающие подсказки маршрута, если они остались открытыми под активным заказом */
body.active-order-visible .route-title-help-tip,
body.active-order-visible .suggestions {
  display: none !important;
}

/* ===== /FINAL FIX: слой активного заказа выше формы маршрута ===== */

/* ===== FINAL: автоотмена поиска водителя с обратным отсчётом ===== */

.driver-search-timeout-control.driver-search-timeout-auto-mode {
  border-color: #f0b429 !important;
  background: #fff8e6 !important;
}

.driver-search-timeout-control.driver-search-timeout-auto-mode .driver-search-timeout-title {
  color: #8a6d1d !important;
}

.driver-search-cancel-btn.driver-search-cancel-countdown {
  background: #e64646 !important;
  color: #ffffff !important;
  animation: driver-search-cancel-pulse 1s infinite;
}

@keyframes driver-search-cancel-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

/* ===== /FINAL: автоотмена поиска водителя с обратным отсчётом ===== */

/* ===== FINAL: интерфейс оплаты картой T-Bank ===== */

.payment-method-box {
  margin: 12px 0 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fbff;
}

.payment-method-title {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.payment-method-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
}

.payment-method-option:last-of-type {
  margin-bottom: 0;
}

.payment-method-option input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.payment-method-option span {
  display: grid;
  gap: 3px;
}

.payment-method-option b {
  font-size: 14px;
  color: var(--text);
}

.payment-method-option small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.25;
}

.payment-method-option:has(input:checked) {
  border-color: var(--accent);
  background: #edf4ff;
  box-shadow: 0 8px 18px rgba(38, 136, 235, 0.12);
}

.payment-method-hint {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 4px solid #f0b429;
  border-radius: 12px;
  background: #fff8e6;
  color: #8a6d1d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

/* ===== /FINAL: интерфейс оплаты картой T-Bank ===== */

/* ===== FINAL: правила оплаты по маршруту Кингисепп ===== */

.payment-method-card-required {
  border-color: #f0b429 !important;
  background: #fff8e6 !important;
}

.payment-method-card-required .payment-method-option:has(input[value="cash"]) {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f5f8;
}

.payment-method-card-required .payment-method-option:has(input[value="cash"]) b::after {
  content: " — недоступно";
  color: #e64646;
  font-weight: 900;
}

.payment-method-card-required .payment-method-hint {
  background: #fff0c2;
  border-left-color: #e6a400;
  color: #735a12;
}

/* ===== /FINAL: правила оплаты по маршруту Кингисепп ===== */

/* ===== FINAL: отключение онлайн перевода при оплате картой ===== */

.option-item.option-disabled-by-card-payment {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f5f8 !important;
  border-color: #d7dde6 !important;
  box-shadow: none !important;
}

.option-item.option-disabled-by-card-payment:hover {
  transform: none !important;
  background: #f3f5f8 !important;
  border-color: #d7dde6 !important;
}

.option-item.option-disabled-by-card-payment .option-title::after {
  content: " — отключено при оплате картой";
  display: block;
  margin-top: 3px;
  color: #e64646;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 900;
}

.option-item.option-disabled-by-card-payment input {
  cursor: not-allowed;
}

/* ===== /FINAL: отключение онлайн перевода при оплате картой ===== */

/* ===== FINAL: интерфейс изменения маршрута во время поездки ===== */

.active-order-route-change-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  background: #ffb020;
  color: #3b2500;
}

.active-order-route-change-btn:hover {
  background: #f0a000;
}

.route-change-modal {
  position: fixed;
  inset: 0;
  z-index: 90000;
  padding: 14px;
  background: rgba(10, 18, 32, 0.58);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.route-change-sheet {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 22px 22px 14px 14px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.route-change-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.route-change-title {
  font-size: 20px;
  font-weight: 950;
  color: var(--text);
}

.route-change-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-change-close-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: #17212b;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}

.route-change-step {
  display: block;
}

.route-change-warning {
  padding: 14px;
  border-radius: 18px;
  background: #fff0f0;
  border: 1px solid rgba(230, 70, 70, 0.25);
  margin-bottom: 14px;
}

.route-change-warning-title {
  margin-bottom: 8px;
  color: #b42318;
  font-size: 18px;
  font-weight: 950;
}

.route-change-warning-text {
  margin-top: 8px;
  color: #8a1f16;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 800;
}

.route-change-info {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff8e6;
  color: #8a6d1d;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.route-change-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.route-change-item {
  position: relative;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
}

.route-change-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.route-change-item-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.route-change-remove-btn {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.route-change-input-wrap {
  position: relative;
}

.route-change-input-wrap input,
.route-change-comment-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  background: #ffffff;
}

.route-change-input-locked {
  background: #eef3f8 !important;
  color: #6f7985 !important;
  font-weight: 850;
}

.route-change-comment-input {
  margin-top: 8px;
  font-size: 13px;
  background: #fff8e6;
  border-color: #efd58a;
}

.route-change-suggestions {
  display: none;
  position: absolute;
  z-index: 91000;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 310px;
  overflow-y: auto;
  background: #fffdf4;
  border: 1px solid #efd58a;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(23, 33, 43, 0.18);
}

.route-change-suggestions-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 11px;
  background: #fff6d6;
  color: #8a6d1d;
  font-size: 11px;
  font-weight: 950;
  border-bottom: 1px solid #efd58a;
}

.route-change-suggestion {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(239, 213, 138, 0.65);
  color: #17212b;
  font-size: 13px;
  line-height: 1.28;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: normal;
  overflow-wrap: anywhere;
}

.route-change-suggestion:last-child {
  border-bottom: 0;
}

.route-change-suggestion:hover {
  background: #fff8e6;
}

.route-change-result-card {
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.route-change-result-title {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 950;
  color: var(--text);
}

.route-change-price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e7edf5;
  font-size: 14px;
}

.route-change-price-row span {
  color: var(--muted);
  font-weight: 850;
}

.route-change-price-row b {
  color: var(--text);
  font-weight: 950;
}

.route-change-price-row-new b {
  color: var(--success);
  font-size: 18px;
}

.route-change-price-row-warning b {
  color: var(--danger);
}

.route-change-payment-note {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 13px;
  background: #fff8e6;
  color: #8a6d1d;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.route-change-cash-fallback-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  background: #fff0f0;
  color: #b42318;
  margin-top: 10px;
}

.route-change-message {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.route-change-message-success {
  background: rgba(47, 168, 79, 0.12);
  color: var(--success);
}

.route-change-message-error {
  background: rgba(230, 70, 70, 0.12);
  color: var(--danger);
}

@media (max-width: 430px) {
  .route-change-modal {
    padding: 8px;
  }

  .route-change-sheet {
    padding: 13px;
    max-height: 94vh;
  }

  .route-change-title {
    font-size: 18px;
  }

  .route-change-warning-text,
  .route-change-info,
  .route-change-payment-note {
    font-size: 12px;
  }
}

/* ===== /FINAL: интерфейс изменения маршрута во время поездки ===== */


/* ===== FINAL: legal consent on registration ===== */

.legal-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 13px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-consent input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.legal-consent span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.legal-consent a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.legal-consent a:hover {
  text-decoration: underline;
}

/* ===== /FINAL: legal consent on registration ===== */


/* ===== FINAL: auth agreement links and checkbox ===== */

.auth-legal-box {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fbff;
}

.auth-legal-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.auth-legal-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(38, 136, 235, 0.12);
  font-size: 18px;
}

.auth-legal-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.auth-legal-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.auth-legal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.auth-legal-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 8px 7px;
  border: 1px solid #d7e7fb;
  border-radius: 12px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.auth-legal-link:hover {
  background: #edf4ff;
  text-decoration: none;
}

.auth-agreement-check {
  display: flex !important;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 11px;
  border-radius: 14px;
  background: #edf4ff;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.auth-agreement-check input {
  width: 20px !important;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.auth-agreement-check span {
  color: var(--text);
}

@media (max-width: 420px) {
  .auth-legal-links {
    grid-template-columns: 1fr;
  }

  .auth-legal-link {
    justify-content: flex-start;
    text-align: left;
  }
}

/* ===== /FINAL: auth agreement links and checkbox ===== */


/* ===== FINAL: footer service links ===== */

.legal-footer {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 24px;
  text-align: center;
}

.legal-footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legal-footer-docs a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.legal-footer-docs a:hover {
  text-decoration: underline;
}

.footer-service-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.footer-service-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 12px;
  border: 1px solid #d7e7fb;
  border-radius: 16px;
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.06);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.footer-service-link:hover {
  background: #edf4ff;
  text-decoration: none;
}

@media (max-width: 520px) {
  .footer-service-links {
    grid-template-columns: 1fr;
  }

  .footer-service-link {
    min-height: 44px;
  }
}

/* ===== /FINAL: footer service links ===== */


/* ===== FINAL: спокойный статус оплаты ===== */

.message.info {
  background: rgba(38, 136, 235, 0.11);
  color: #1766c2;
  border-left: 5px solid var(--accent);
}

/* ===== /FINAL: спокойный статус оплаты ===== */


/* ===== FINAL HARD: route change modal visible above active order ===== */

.route-change-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 12px !important;
  background: rgba(23, 33, 43, 0.56) !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.route-change-modal.hidden,
.route-change-modal[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.route-change-sheet {
  width: 100% !important;
  max-width: 760px !important;
  max-height: 92vh !important;
  overflow: auto !important;
  background: #ffffff !important;
  border-radius: 22px 22px 18px 18px !important;
  padding: 16px !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32) !important;
  box-sizing: border-box !important;
}

.route-change-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.route-change-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.route-change-subtitle {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.route-change-close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.route-change-step.hidden {
  display: none !important;
}

.route-change-warning {
  margin-bottom: 14px;
  padding: 13px;
  border-radius: 16px;
  border-left: 5px solid #f0b429;
  background: #fff8e6;
  color: #684f0f;
}

.route-change-warning-title {
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 900;
}

.route-change-warning-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.route-change-info {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.route-change-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.route-change-message {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.route-change-message.hidden {
  display: none !important;
}

.route-change-message.error {
  background: rgba(230, 70, 70, 0.12);
  color: var(--danger);
}

.route-change-message.success,
.route-change-message.info {
  background: rgba(38, 136, 235, 0.11);
  color: #1766c2;
}

.active-order-route-change-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(38, 136, 235, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto !important;
}

/* ===== /FINAL HARD: route change modal visible above active order ===== */

