/* ГдеБензин v2 — тёмная/светлая тема, mobile-first */

:root {
  --bg:        #0A0E1A;
  --bg2:       #111827;
  --card:      #161D2E;
  --card2:     #1E2740;
  --border:    #2A3450;
  --accent:    #00C853;
  --accent2:   #00A844;
  --yellow-s:  #F59E0B;
  --yellow-b:  #FF6B00;
  --red:       #EF4444;
  --text:      #F0F4FF;
  --text2:     #8892A4;
  --text3:     #4A5568;
  --radius:    14px;
  --nav-h:     68px;
  --header-h:  116px;
  --shadow:    0 8px 32px rgba(0,0,0,.5);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --bg:     #F4F6FA;
  --bg2:    #FFFFFF;
  --card:   #FFFFFF;
  --card2:  #EEF1F8;
  --border: #D8DEEA;
  --text:   #1A2033;
  --text2:  #5A6478;
  --text3:  #9AA3B2;
  --shadow: 0 4px 20px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition), color var(--transition);
}

/* ═══════════════════ HEADER ═══════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,14,26,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .header {
  background: rgba(244,246,250,.95);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 6px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: -.3px;
  flex-shrink: 0;
}
.logo-icon { font-size: 20px; }
.logo strong { color: var(--accent); }

.city-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color var(--transition);
}
.city-selector:hover { border-color: var(--accent); }
.city-selector span { overflow: hidden; text-overflow: ellipsis; }
.city-selector svg:first-child { color: var(--accent); flex-shrink: 0; }

.header-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.btn-icon {
  width: 36px; height: 36px;
  border: none; border-radius: 10px;
  background: var(--card2);
  color: var(--text2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background var(--transition), transform .1s;
}
.btn-icon:active { transform: scale(.9); }
.btn-donate-hdr { color: #e74c3c; }

/* Фильтры по топливу */
.fuel-filters {
  display: flex;
  gap: 6px;
  padding: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fuel-filters::-webkit-scrollbar { display: none; }
.fuel-filter {
  flex-shrink: 0;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.fuel-filter.active {
  border-color: var(--accent);
  background: rgba(0,200,83,.15);
  color: var(--accent);
}

/* Статус-бар */
.status-bar {
  display: flex;
  gap: 6px;
  padding: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.status-bar::-webkit-scrollbar { display: none; }
.s-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.s-chip.green  { background: rgba(0,200,83,.12);  color: var(--accent); }
.s-chip.yellow { background: rgba(245,158,11,.12); color: var(--yellow-s); }
.s-chip.red    { background: rgba(239,68,68,.12);  color: var(--red); }
.s-chip.gray   { background: var(--card2);          color: var(--text3); }
.sdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.s-chip.green .sdot  { box-shadow: 0 0 5px var(--accent); }
.s-chip.yellow .sdot { box-shadow: 0 0 5px var(--yellow-s); }
.s-chip.red .sdot    { box-shadow: 0 0 5px var(--red); }

/* ═══════════════════ MAP ═══════════════════ */
#map {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 1;
}

/* «Найти ближайшую» кнопка */
.find-nearest {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 24px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,200,83,.45);
  white-space: nowrap;
  transition: transform .1s, box-shadow .1s;
}
.find-nearest:active { transform: translateX(-50%) scale(.96); }

/* Анимация пульсации маркера */
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}
.marker-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ═══════════════════ FAB ═══════════════════ */
.fab {
  position: fixed;
  right: 14px;
  bottom: calc(var(--nav-h) + 14px);
  z-index: 50;
  width: 50px; height: 50px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,200,83,.45);
  transition: transform .15s, box-shadow .15s;
}
.fab:active { transform: scale(.9); }

/* ═══════════════════ BOTTOM NAV ═══════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--card);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-btn {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  border: none; background: none;
  color: var(--text3);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active svg { filter: drop-shadow(0 0 4px var(--accent)); }
.chat-badge {
  position: absolute;
  top: 6px; right: calc(50% - 14px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--card);
}

/* ═══════════════════ SIDE PANELS ═══════════════════ */
.side-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 10;
  background: var(--bg);
  overflow-y: auto;
  display: none;
  padding: 12px;
}
.side-panel.active { display: block; }

/* Поиск */
.panel-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  color: var(--text3);
}
.panel-search input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.panel-search input::placeholder { color: var(--text3); }

/* Секции */
.sit-section { margin-bottom: 20px; }
.sit-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.sit-title .sdot { width: 9px; height: 9px; }
.sdot.green  { background: var(--accent);   box-shadow: 0 0 5px var(--accent); }
.sdot.yellow { background: var(--yellow-s); box-shadow: 0 0 5px var(--yellow-s); }
.sdot.red    { background: var(--red);      box-shadow: 0 0 5px var(--red); }
.sdot.gray   { background: var(--text3); }
.see-all {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.sit-list { display: flex; flex-direction: column; gap: 8px; }
.sit-empty {
  text-align: center;
  padding: 16px;
  color: var(--text3);
  font-size: 13px;
  background: var(--card2);
  border-radius: 10px;
}

/* Карточки заправок */
.station-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: transform .1s, border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.station-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.station-card.green::before   { background: var(--accent); }
.station-card.yellow-small::before,
.station-card.yellow-big::before { background: var(--yellow-s); }
.station-card.red::before     { background: var(--red); }
.station-card:active { transform: scale(.99); }

.sc-brand {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  font-weight: 900;
  overflow: hidden;
}
.sc-body { flex: 1; min-width: 0; }
.sc-name {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
}
.sc-badge.green       { background: rgba(0,200,83,.15);   color: var(--accent); }
.sc-badge.yellow-small { background: rgba(245,158,11,.15); color: var(--yellow-s); }
.sc-badge.yellow-big  { background: rgba(255,107,0,.15);  color: var(--yellow-b); }
.sc-badge.red         { background: rgba(239,68,68,.15);  color: var(--red); }
.sc-badge.gray        { background: var(--card2);          color: var(--text3); }
.sc-sub { font-size: 11px; color: var(--text3); line-height: 1.5; }
.sc-fresh {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ═══════════════════ CHAT ═══════════════════ */
.chat-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 10;
  background: var(--bg);
  display: none;
  flex-direction: column;
}
.chat-panel.active { display: flex; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  background: var(--card);
  flex-shrink: 0;
}
.chat-online { font-size: 11px; color: var(--text3); font-weight: 500; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-empty {
  text-align: center;
  color: var(--text3);
  font-size: 14px;
  margin-top: 40px;
  line-height: 1.6;
}
.chat-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-msg.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border-radius: 14px 14px 4px 14px;
}
.chat-msg.other {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}
.msg-nick  { font-size: 10px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.msg-time  { font-size: 10px; opacity: .55; text-align: right; margin-top: 3px; }

.chat-input-area {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}
.chat-nick-input {
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 7px;
  outline: none;
  font-family: inherit;
}
.chat-nick-input:focus { border-color: var(--accent); }
.chat-send-row { display: flex; gap: 8px; align-items: flex-end; }
#chat-text {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  max-height: 80px;
}
#chat-text:focus { border-color: var(--accent); }
.btn-send {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .1s;
}
.btn-send:active { transform: scale(.9); }

/* ═══════════════════ FAVORITES ═══════════════════ */
.badges-section { margin-bottom: 20px; }
.badges-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text2); }
.badges-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.badge-card.earned { border-color: #FFB300; }
.badge-card.earned::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,179,0,.05), transparent);
}
.badge-icon { font-size: 32px; margin-bottom: 6px; }
.badge-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.badge-desc { font-size: 11px; color: var(--text3); margin-bottom: 8px; }
.badge-progress {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.badge-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #00FF88);
  transition: width .5s;
}
.badge-count { font-size: 10px; color: var(--text3); margin-top: 4px; }

.fav-section-title { font-size: 14px; font-weight: 700; color: var(--text2); margin-bottom: 10px; }
.fav-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text3);
}
.fav-empty-icon { font-size: 48px; margin-bottom: 12px; }
.fav-empty-title { font-size: 15px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.fav-empty p { font-size: 13px; line-height: 1.5; }

/* ═══════════════════ BOTTOM SHEET ═══════════════════ */
.bottom-sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: 80;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  max-height: 78vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow);
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 10px auto 0;
  flex-shrink: 0;
}
.sheet-content { padding: 14px 16px 28px; }

/* Хедер станции */
.station-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
}
.station-emblem {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
}
.station-info { flex: 1; min-width: 0; }
.station-name  { font-size: 17px; font-weight: 800; margin-bottom: 3px; }
.station-address { font-size: 13px; color: var(--text2); line-height: 1.4; }
.btn-fav {
  border: none; background: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: transform .2s;
}
.btn-fav:active { transform: scale(.8); }

/* Статус */
.station-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.big-status-badge {
  padding: 7px 14px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.big-status-badge.green       { background: rgba(0,200,83,.15);   color: var(--accent);   border: 1px solid rgba(0,200,83,.3); }
.big-status-badge.yellow-small { background: rgba(245,158,11,.15); color: var(--yellow-s); border: 1px solid rgba(245,158,11,.3); }
.big-status-badge.yellow-big  { background: rgba(255,107,0,.15);  color: var(--yellow-b); border: 1px solid rgba(255,107,0,.3); }
.big-status-badge.red         { background: rgba(239,68,68,.15);  color: var(--red);      border: 1px solid rgba(239,68,68,.3); }
.big-status-badge.gray        { background: var(--card2);          color: var(--text3);    border: 1px solid var(--border); }
.station-details { font-size: 12px; color: var(--text3); line-height: 1.6; }

/* Топливо */
.fuel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fuel-tag {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text2);
}

.station-meta { font-size: 12px; color: var(--text3); margin-bottom: 14px; line-height: 1.6; }

/* Кнопки действий */
.action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 7px;
  margin-bottom: 16px;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform .1s;
}
.action-btn:active { transform: scale(.96); }
.action-btn:hover { border-color: var(--accent); color: var(--text); }
.confirm-btn { color: var(--accent); border-color: rgba(0,200,83,.3); background: rgba(0,200,83,.05); }
.nav-btn-y svg path { fill: #FF0000 !important; }

/* Форма отчёта */
.report-section { border-top: 1px solid var(--border); padding-top: 14px; }
.report-title { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 10px; }
.status-buttons { display: flex; flex-direction: column; gap: 7px; }
.status-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.status-btn.selected.s-green       { background: rgba(0,200,83,.12);   border-color: var(--accent);   color: var(--accent); }
.status-btn.selected.s-yellow-small { background: rgba(245,158,11,.12); border-color: var(--yellow-s); color: var(--yellow-s); }
.status-btn.selected.s-yellow-big  { background: rgba(255,107,0,.12);  border-color: var(--yellow-b); color: var(--yellow-b); }
.status-btn.selected.s-red         { background: rgba(239,68,68,.12);  border-color: var(--red);      color: var(--red); }

#report-details { margin-top: 12px; }
.fuel-label, .report-sublabel { font-size: 12px; color: var(--text2); font-weight: 600; margin-bottom: 7px; }
.fuel-checks { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.fuel-check {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  font-size: 13px;
  cursor: pointer;
}
.fuel-check:has(input:checked) { border-color: var(--accent); background: rgba(0,200,83,.1); }
.fuel-check input { accent-color: var(--accent); }

.report-row { margin-bottom: 12px; }
.wait-options, .limit-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wait-opt, .limit-opt {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.wait-opt.active, .limit-opt.active {
  border-color: var(--accent);
  background: rgba(0,200,83,.12);
  color: var(--accent);
}

#report-comment {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  margin: 10px 0;
}
#report-comment:focus { border-color: var(--accent); }

.btn-submit {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  letter-spacing: .2px;
}
.btn-submit:active { transform: scale(.98); opacity: .9; }
.btn-submit:disabled { opacity: .45; cursor: not-allowed; }

/* ═══════════════════ MODALS ═══════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  width: 100%;
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  max-height: 80vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
}
.btn-close {
  border: none; background: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-hint { font-size: 13px; color: var(--text2); margin-bottom: 14px; line-height: 1.5; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 5px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.form-group select option { background: var(--card); }
.coords-display {
  font-size: 13px;
  color: var(--text3);
  padding: 10px;
  background: var(--bg2);
  border-radius: 8px;
  text-align: center;
  margin: 10px 0 14px;
}
.coords-display.set { color: var(--accent); }

/* Поиск города */
#city-search {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  margin-bottom: 12px;
}
#city-search:focus { border-color: var(--accent); }
.city-list { display: flex; flex-direction: column; gap: 2px; }
.city-item {
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: background .15s;
}
.city-item:hover, .city-item:active { background: var(--card2); }
.city-item.active { color: var(--accent); font-weight: 700; }

/* Легенда */
.legend-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.legend-item { display: flex; align-items: flex-start; gap: 12px; }
.lbadge {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lbadge.green       { background: rgba(0,200,83,.15); }
.lbadge.yellow-small { background: rgba(245,158,11,.15); }
.lbadge.yellow-big  { background: rgba(255,107,0,.15); }
.lbadge.red         { background: rgba(239,68,68,.15); }
.lbadge.gray        { background: var(--card2); }
.legend-item strong { font-size: 14px; display: block; margin-bottom: 2px; }
.legend-item p { font-size: 12px; color: var(--text2); }
.legend-note {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.pulse-demo {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: blink 1.5s ease-in-out infinite;
}

/* ═══════════════════ TOAST ═══════════════════ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 300;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════ COOKIE ═══════════════════ */
.cookie-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + 8px);
  left: 10px; right: 10px;
  z-index: 150;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 13px; color: var(--text2); line-height: 1.5; }
.cookie-banner a { color: var(--accent); }
.cookie-banner button {
  align-self: flex-end;
  padding: 8px 22px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ═══════════════════ UTILS ═══════════════════ */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ═══════════════════ DESKTOP (≥768px) ═══════════════════ */
@media (min-width: 768px) {
  :root { --header-h: 96px; --nav-h: 0px; }

  .bottom-nav { display: none; }

  .header-row { max-width: 1400px; margin: 0 auto; padding: 12px 24px 8px; }
  .fuel-filters, .status-bar { max-width: 1400px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

  .side-panel, .chat-panel {
    top: var(--header-h);
    bottom: 0;
    left: 0;
    width: 380px;
    border-right: 1px solid var(--border);
  }

  /* Карта сдвигается вправо когда открыта боковая панель */
  body.panel-open #map { left: 380px; }
  body.panel-open .find-nearest { left: calc(380px + 50%); transform: translateX(-50%); }
  body.panel-open .fab { right: 24px; }

  .bottom-sheet {
    bottom: 0;
    left: auto; right: 0;
    width: 380px;
    border-radius: 20px 20px 0 0;
    border-left: 1px solid var(--border);
    max-height: 90vh;
  }

  .fab { bottom: 24px; right: 24px; }
  .modal-overlay { align-items: center; }
  .modal { max-width: 480px; margin: 0 auto; }
  .toast { bottom: 24px; }
  .cookie-banner { bottom: 12px; max-width: 500px; left: 50%; right: auto; transform: translateX(-50%); }
  .find-nearest { top: calc(var(--header-h) + 16px); }
}

/* Leaflet — тёмная тема */
.leaflet-container{background:#0A0E1A;font-family:inherit;}
.leaflet-control-attribution{background:rgba(10,14,26,.75)!important;color:#8892A4!important;font-size:10px!important;}
.leaflet-control-attribution a{color:#00C853!important;}
.leaflet-bar{border:none!important;}
.leaflet-bar a{background:#161D2E!important;color:#F0F4FF!important;border-color:#2A3450!important;}
.leaflet-bar a:hover{background:#1f2a42!important;}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#161D2E!important;color:#F0F4FF!important;}
.leaflet-control-zoom{box-shadow:0 2px 8px rgba(0,0,0,.4)!important;}
