: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);
}
