/* Режим «Путь»: АЗС по пути с отметками водителей */

/* --- Кнопка режима на карте --- */

.map-action-button--route.is-route-active {
  border-color: rgba(244, 63, 94, 0.62);
  background: rgba(254, 226, 226, 0.88);
  color: #e11d48;
}

.map-action-button--route.is-route-active:hover {
  border-color: rgba(225, 29, 72, 0.8);
  background: rgba(254, 205, 211, 0.92);
  color: #be123c;
}

body.theme-night .map-action-button--route.is-route-active {
  border-color: rgba(244, 63, 94, 0.6);
  background: rgba(76, 5, 25, 0.66);
  color: #fda4af;
}

body.theme-night .map-action-button--route.is-route-active:hover {
  border-color: rgba(251, 113, 133, 0.78);
  background: rgba(96, 7, 32, 0.78);
  color: #fecdd3;
}

/* --- Модалка «Путь» --- */

.route-modal {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
}

.route-modal[hidden] {
  display: none;
}

.route-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 100%, rgba(22, 163, 74, 0.16), transparent 34%),
    rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(5px) saturate(0.92);
  -webkit-backdrop-filter: blur(5px) saturate(0.92);
}

.route-modal__card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(86vh, 640px);
  display: grid;
  gap: 12px;
  padding: 20px 16px 16px;
  border: 1px solid rgba(22, 163, 74, 0.34);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(7, 10, 16, 0.94), rgba(4, 7, 12, 0.96)),
    rgba(4, 7, 12, 0.96);
  color: #f8fafc;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.route-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
}

.route-modal__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 34px;
}

.route-modal__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(22, 163, 74, 0.16);
  color: #4ade80;
}

.route-modal__icon svg {
  width: 24px;
  height: 24px;
}

.route-modal__header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.route-modal__header p {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.3;
}

.route-modal__points {
  display: grid;
  gap: 7px;
}

.route-point {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
}

.route-point.is-editing {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(22, 163, 74, 0.1);
}

.route-point__dot {
  width: 11px;
  height: 11px;
  justify-self: center;
  border-radius: 50%;
}

.route-point__dot--origin {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.route-point__dot--destination {
  background: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}

.route-point__body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.route-point__caption {
  color: #7c8aa0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-point__body strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-point:not(.is-filled) .route-point__body strong {
  color: #8b99ae;
  font-weight: 650;
}

.route-point__edit {
  color: #64748b;
}

.route-point__edit svg {
  width: 16px;
  height: 16px;
}

/* --- Поиск места --- */

.route-search {
  display: grid;
  gap: 6px;
}

.route-search__field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.route-search__field:focus-within {
  border-color: rgba(34, 197, 94, 0.62);
}

.route-search__field svg {
  width: 18px;
  height: 18px;
}

.route-search__field input {
  height: 44px;
  border: 0;
  background: transparent;
  color: #f1f5f9;
  font-size: 14.5px;
  font-weight: 650;
  outline: none;
}

.route-search__field input::placeholder {
  color: #64748b;
  font-weight: 550;
}

.route-search__results {
  display: grid;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.route-search__empty {
  padding: 10px 12px;
  color: #7c8aa0;
  font-size: 12.5px;
}

.route-search__item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.route-search__item:hover {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(22, 163, 74, 0.09);
}

.route-search__item-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.route-search__item-icon svg {
  width: 16px;
  height: 16px;
}

.route-search__item-body {
  display: grid;
  min-width: 0;
}

.route-search__item-body strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-search__item-body span {
  color: #7c8aa0;
  font-size: 11.5px;
}

/* --- Кнопка «точка на карте» (пунктир) --- */

.route-map-pick {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1.6px dashed rgba(74, 222, 128, 0.55);
  border-radius: 14px;
  background: rgba(22, 163, 74, 0.07);
  color: inherit;
  text-align: left;
}

.route-map-pick:hover {
  border-color: rgba(74, 222, 128, 0.85);
  background: rgba(22, 163, 74, 0.13);
}

.route-map-pick__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(22, 163, 74, 0.16);
  color: #4ade80;
}

.route-map-pick__icon svg {
  width: 21px;
  height: 21px;
}

.route-map-pick__body {
  display: grid;
  gap: 1px;
}

.route-map-pick__body strong {
  font-size: 14px;
  font-weight: 850;
}

.route-map-pick__body span {
  color: #8b99ae;
  font-size: 11.5px;
  line-height: 1.3;
}

/* --- Чипы топлива --- */

.route-fuels {
  display: grid;
  gap: 7px;
}

.route-fuels__caption {
  color: #7c8aa0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-fuels__grid,
.route-panel__fuels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-fuel {
  min-width: 44px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.route-fuel.is-active {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

/* --- Примечание и submit --- */

.route-modal__note {
  margin: 0;
  color: #7c8aa0;
  font-size: 11.5px;
  line-height: 1.35;
}

.route-modal__submit {
  /* Липнет к низу скролла карточки, чтобы CTA был виден при длинном списке подсказок */
  position: sticky;
  bottom: -16px;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #f0fdf4;
  font-size: 15.5px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(22, 163, 74, 0.32), 0 -12px 18px rgba(4, 7, 12, 0.5);
}

.route-modal__submit:disabled {
  background: #232c3a;
  color: #7c8aa0;
  box-shadow: 0 -12px 18px rgba(4, 7, 12, 0.5);
}

body:not(.theme-night) .route-modal__submit {
  box-shadow: 0 14px 34px rgba(22, 163, 74, 0.32), 0 -12px 18px rgba(248, 250, 252, 0.9);
}

body:not(.theme-night) .route-modal__submit:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: 0 -12px 18px rgba(248, 250, 252, 0.9);
}

/* --- Светлая тема модалки --- */

body:not(.theme-night) .route-modal__card {
  border-color: rgba(22, 163, 74, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99));
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04) inset;
}

body:not(.theme-night) .route-modal__close {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
}

body:not(.theme-night) .route-modal__header p,
body:not(.theme-night) .route-modal__note,
body:not(.theme-night) .route-search__empty,
body:not(.theme-night) .route-search__item-body span,
body:not(.theme-night) .route-map-pick__body span,
body:not(.theme-night) .route-point__caption,
body:not(.theme-night) .route-fuels__caption {
  color: #64748b;
}

body:not(.theme-night) .route-point {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(15, 23, 42, 0.03);
}

body:not(.theme-night) .route-point.is-editing {
  border-color: rgba(22, 163, 74, 0.6);
  background: rgba(22, 163, 74, 0.07);
}

body:not(.theme-night) .route-point:not(.is-filled) .route-point__body strong {
  color: #94a3b8;
}

body:not(.theme-night) .route-search__field {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(15, 23, 42, 0.04);
}

body:not(.theme-night) .route-search__field input {
  color: #0f172a;
}

body:not(.theme-night) .route-search__item:hover {
  background: rgba(22, 163, 74, 0.08);
}

body:not(.theme-night) .route-search__item-icon {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

body:not(.theme-night) .route-map-pick {
  border-color: rgba(21, 128, 61, 0.5);
  background: rgba(22, 163, 74, 0.06);
}

body:not(.theme-night) .route-map-pick__icon {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

body:not(.theme-night) .route-fuel {
  border-color: rgba(100, 116, 139, 0.32);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}

body:not(.theme-night) .route-fuel.is-active {
  border-color: rgba(21, 128, 61, 0.65);
  background: rgba(22, 163, 74, 0.16);
  color: #15803d;
}

/* --- Плашка выбора точки на карте --- */

.route-pick-bar {
  position: fixed;
  right: 12px;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  left: 12px;
  z-index: 2300;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.route-pick-bar[hidden] {
  display: none;
}

.route-pick-bar__card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: min(480px, 100%);
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 16px;
  background: rgba(4, 7, 12, 0.92);
  color: #f1f5f9;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  pointer-events: auto;
}

.route-pick-bar__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
}

.route-pick-bar__icon svg {
  width: 19px;
  height: 19px;
}

.route-pick-bar__text {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.route-pick-bar__actions {
  display: flex;
  gap: 7px;
}

.route-pick-bar__cancel {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.route-pick-bar__go {
  min-height: 38px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #f0fdf4;
  font-size: 13.5px;
  font-weight: 900;
}

.route-pick-bar__go:disabled {
  background: rgba(100, 116, 139, 0.26);
  color: #7c8aa0;
}

body:not(.theme-night) .route-pick-bar__card {
  border-color: rgba(21, 128, 61, 0.4);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

body:not(.theme-night) .route-pick-bar__cancel {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
}

/* --- Маркеры на карте --- */

.route-pick-pin {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #e11d48;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.route-pick-pin svg {
  width: 38px;
  height: 38px;
  fill: rgba(254, 226, 226, 0.9);
}

.route-endpoint {
  display: grid;
  place-items: center;
}

.route-endpoint--start {
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.route-endpoint--finish {
  width: 30px;
  height: 30px;
  color: #e11d48;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.route-endpoint--finish svg {
  width: 30px;
  height: 30px;
}

/* --- Панель маршрута --- */

.route-panel {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 780;
  width: min(460px, calc(100vw - 20px));
  display: grid;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94)),
    rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  overflow: hidden;
}

.route-panel[hidden] {
  display: none;
}

.route-panel__toggle {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.route-panel__toggle-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
}

.route-panel__toggle-icon svg {
  width: 17px;
  height: 17px;
}

.route-panel__toggle-route {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}

.route-panel__toggle-route strong {
  overflow: hidden;
  max-width: 45%;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-panel__toggle-route span {
  color: #4ade80;
  flex: 0 0 auto;
}

.route-panel__chevron {
  color: #64748b;
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

.route-panel.is-collapsed .route-panel__chevron {
  transform: rotate(0deg);
}

.route-panel__chevron svg {
  width: 18px;
  height: 18px;
}

.route-panel__body {
  display: grid;
  gap: 9px;
  padding: 0 12px 12px;
}

.route-panel.is-collapsed .route-panel__body {
  display: none;
}

.route-panel__stats {
  display: flex;
  gap: 6px;
}

.route-panel__stats span {
  flex: 1 1 0;
  display: grid;
  gap: 1px;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: #8b99ae;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.route-panel__stats strong {
  color: #f1f5f9;
  font-size: 14.5px;
  font-weight: 900;
}

.route-panel__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.route-panel__control {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.route-panel__control:hover {
  border-color: rgba(34, 197, 94, 0.55);
  color: #f1f5f9;
}

.route-panel__control svg {
  width: 15px;
  height: 15px;
}

.route-panel__fuels {
  width: 100%;
}

.route-panel__fuels .route-fuel {
  min-width: 40px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.route-panel__checked {
  margin: 0;
  color: #7c8aa0;
  font-size: 11px;
}

.route-panel__list {
  display: grid;
  gap: 6px;
  max-height: min(38vh, 330px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Узкий скроллбар для списков режима «Путь» */
.route-panel__list,
.route-search__results,
.route-modal__card {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.route-panel__list::-webkit-scrollbar,
.route-search__results::-webkit-scrollbar,
.route-modal__card::-webkit-scrollbar {
  width: 5px;
}

.route-panel__list::-webkit-scrollbar-track,
.route-search__results::-webkit-scrollbar-track,
.route-modal__card::-webkit-scrollbar-track {
  background: transparent;
}

.route-panel__list::-webkit-scrollbar-thumb,
.route-search__results::-webkit-scrollbar-thumb,
.route-modal__card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
}

.route-panel__list::-webkit-scrollbar-thumb:hover,
.route-search__results::-webkit-scrollbar-thumb:hover,
.route-modal__card::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.62);
}

.route-panel__empty {
  padding: 14px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: #8b99ae;
  font-size: 12.5px;
  text-align: center;
}

.route-station {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
}

.route-station:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(22, 163, 74, 0.08);
}

.route-station__logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ffffff;
  overflow: hidden;
}

.route-station__logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.route-station__logo--text {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}

.route-station__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.route-station__body > strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-station__address {
  overflow: hidden;
  color: #8b99ae;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-station__meta {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.route-station__status {
  font-size: 10.5px;
  font-weight: 850;
}

.route-station__status--available { color: #4ade80; }
.route-station__status--queue { color: #fb923c; }
.route-station__status--low { color: #facc15; }
.route-station__status--unavailable { color: #fb7185; }
.route-station__status--unknown { color: #94a3b8; }

.route-station__fuels {
  overflow: hidden;
  color: #7c8aa0;
  font-size: 10.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-station__distance {
  color: #8b99ae;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
}

.route-station__distance strong {
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 900;
}

/* --- Светлая тема панели --- */

body:not(.theme-night) .route-panel {
  border-color: rgba(100, 116, 139, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99));
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.04) inset;
}

body:not(.theme-night) .route-panel__toggle-icon {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

body:not(.theme-night) .route-panel__toggle-route span {
  color: #15803d;
}

body:not(.theme-night) .route-panel__stats span {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(15, 23, 42, 0.03);
  color: #64748b;
}

body:not(.theme-night) .route-panel__stats strong {
  color: #0f172a;
}

body:not(.theme-night) .route-panel__control {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}

body:not(.theme-night) .route-panel__control:hover {
  color: #0f172a;
}

body:not(.theme-night) .route-panel__checked,
body:not(.theme-night) .route-station__address,
body:not(.theme-night) .route-station__fuels,
body:not(.theme-night) .route-station__distance {
  color: #64748b;
}

body:not(.theme-night) .route-panel__empty {
  border-color: rgba(100, 116, 139, 0.3);
  color: #64748b;
}

body:not(.theme-night) .route-station {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(15, 23, 42, 0.03);
}

body:not(.theme-night) .route-station:hover {
  background: rgba(22, 163, 74, 0.07);
}

body:not(.theme-night) .route-station__logo {
  border: 1px solid rgba(100, 116, 139, 0.16);
}

body:not(.theme-night) .route-station__status--available { color: #15803d; }
body:not(.theme-night) .route-station__status--queue { color: #c2410c; }
body:not(.theme-night) .route-station__status--low { color: #a16207; }
body:not(.theme-night) .route-station__status--unavailable { color: #be123c; }
body:not(.theme-night) .route-station__status--unknown { color: #64748b; }

body:not(.theme-night) .route-station__distance strong {
  color: #15803d;
}

/* --- Мобильная раскладка --- */

@media (max-width: 720px) {
  .route-modal {
    padding: 12px 10px max(12px, env(safe-area-inset-bottom));
  }

  .route-modal__card {
    width: 100%;
    max-height: 84vh;
    padding: 18px 13px 13px;
    border-radius: 18px;
  }

  .route-panel {
    right: max(10px, calc(env(safe-area-inset-right) + 8px));
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 6px));
    left: max(10px, calc(env(safe-area-inset-left) + 8px));
    width: auto;
    transform: none;
    z-index: 880;
  }

  .route-panel__list {
    max-height: 34vh;
  }

  body.sheet-open .route-panel,
  body.route-picking .mobile-chrome,
  body.route-picking .map-status-filter {
    opacity: 0.06;
    pointer-events: none;
  }

  .route-pick-bar__card {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .route-pick-bar__icon {
    display: none;
  }

  .route-pick-bar__actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }
}

/* --- Модалка «Путь» в стиле Яндекс.Карт: два поля + быстрый выбор --- */

.route-fields {
  display: grid;
  gap: 7px;
}

.route-field {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  cursor: text;
}

.route-field.is-active {
  border-color: rgba(34, 197, 94, 0.62);
  background: rgba(22, 163, 74, 0.08);
}

.route-field__dot {
  width: 11px;
  height: 11px;
  justify-self: center;
  border-radius: 50%;
}

.route-field__dot--origin {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.route-field__dot--destination {
  background: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}

.route-field input {
  height: 48px;
  border: 0;
  background: transparent;
  color: #f1f5f9;
  font-size: 14.5px;
  font-weight: 700;
  outline: none;
}

.route-field input::placeholder {
  color: #64748b;
  font-weight: 550;
}

.route-field__clear {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1;
}

.route-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.route-quick__button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px dashed rgba(74, 222, 128, 0.5);
  border-radius: 11px;
  background: rgba(22, 163, 74, 0.07);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 800;
}

.route-quick__button:hover {
  border-color: rgba(74, 222, 128, 0.85);
  background: rgba(22, 163, 74, 0.13);
}

.route-quick__button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.route-modal__cancel {
  min-height: 40px;
  margin-top: -4px;
  border: 0;
  border-radius: 11px;
  background: rgba(100, 116, 139, 0.14);
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 800;
}

.route-modal__cancel:hover {
  background: rgba(100, 116, 139, 0.22);
  color: #cbd5e1;
}

body:not(.theme-night) .route-field {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(15, 23, 42, 0.04);
}

body:not(.theme-night) .route-field.is-active {
  border-color: rgba(22, 163, 74, 0.6);
  background: rgba(22, 163, 74, 0.07);
}

body:not(.theme-night) .route-field input {
  color: #0f172a;
}

body:not(.theme-night) .route-field__clear {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

body:not(.theme-night) .route-quick__button {
  border-color: rgba(21, 128, 61, 0.5);
  background: rgba(22, 163, 74, 0.06);
  color: #15803d;
}

body:not(.theme-night) .route-modal__cancel {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}
