:root {
  --tg-bg: var(--tg-theme-bg-color, #f8f9fc);
  --tg-text: var(--tg-theme-text-color, #1a1a2e);
  --tg-hint: var(--tg-theme-hint-color, #6b7280);
  --tg-link: var(--tg-theme-link-color, #4361ee);
  --tg-button: var(--tg-theme-button-color, #4361ee);
  --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
  --tg-secondary: var(--tg-theme-secondary-bg-color, #eef0f7);
  --accent: #4361ee;
  --accent-light: #eef1ff;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --gray: #9ca3af;
  --sheet-radius: 20px;
  --shadow: 0 -8px 32px rgba(26, 26, 46, 0.12);
  --glass: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(0, 0, 0, 0.08);
  --overlay: rgba(0, 0, 0, 0.45);
  --toast-bg: rgba(26, 26, 46, 0.88);
  --toast-text: #ffffff;
}

[data-theme="dark"] {
  --glass: rgba(28, 28, 42, 0.94);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  --overlay: rgba(0, 0, 0, 0.65);
  --accent-light: rgba(67, 97, 238, 0.2);
  --toast-bg: rgba(240, 240, 245, 0.92);
  --toast-text: #1a1a2e;
}

[data-theme="dark"] .badge-fresh { background: rgba(34, 197, 94, 0.2); color: #86efac; }
[data-theme="dark"] .badge-aging { background: rgba(234, 179, 8, 0.2); color: #fde047; }
[data-theme="dark"] .badge-stale { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
[data-theme="dark"] .badge-none { background: rgba(255, 255, 255, 0.08); color: #9ca3af; }
[data-theme="dark"] .fuel-ok { background: rgba(34, 197, 94, 0.18); color: #86efac; }
[data-theme="dark"] .fuel-no { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
[data-theme="dark"] .q-none { background: rgba(34, 197, 94, 0.18); color: #86efac; }
[data-theme="dark"] .q-small { background: rgba(234, 179, 8, 0.18); color: #fde047; }
[data-theme="dark"] .q-medium { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
[data-theme="dark"] .q-large { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
[data-theme="dark"] .btn-no-fuel { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
[data-theme="dark"] .sheet-close:active { background: rgba(255, 255, 255, 0.12); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--tg-bg);
  color: var(--tg-text);
  -webkit-font-smoothing: antialiased;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Loading */
.loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--tg-bg);
  z-index: 1000;
  font-size: 15px;
  color: var(--tg-hint);
}

.loading.hidden { display: none; }

.loading-error { color: var(--red); }

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--tg-secondary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Search bar */
.search-bar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  left: 12px;
  z-index: 600;
  pointer-events: none;
  max-width: calc(100vw - 140px);
}

.search-box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 4px;
  height: 42px;
  width: 42px;
  overflow: hidden;
  transition: width 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease, padding 0.25s ease;
}

.search-box.open {
  width: min(280px, calc(100vw - 160px));
  padding: 4px 8px 4px 4px;
  gap: 4px;
}

.search-box.has-query {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.12);
}

.search-icon-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--tg-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.search-icon-btn:active { transform: scale(0.96); }

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--tg-text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  opacity: 0;
  width: 0;
  max-width: 0;
  padding: 0;
  transition: opacity 0.2s ease, max-width 0.25s ease;
}

.search-box.open .search-input {
  opacity: 1;
  width: auto;
  max-width: 100%;
  padding: 8px 0;
}

.search-input::placeholder { color: var(--tg-hint); }

.search-clear {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--tg-secondary);
  color: var(--tg-hint);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.search-box:not(.open) .search-clear {
  display: none !important;
}

.search-clear.hidden { display: none; }

.search-clear:active { transform: scale(0.95); }

/* Top bar & filter */
.top-bar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  right: 12px;
  left: auto;
  z-index: 600;
  pointer-events: none;
}

.filter-btn {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px 14px;
  min-width: 42px;
  max-width: min(200px, calc(100vw - 160px));
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tg-text);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  text-align: left;
}

.filter-btn-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn.expanded {
  padding-bottom: 8px;
}

.filter-btn-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

.filter-btn-tags.hidden {
  display: none;
}

.filter-btn-tag {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: inherit;
  opacity: 0.92;
}

.filter-btn.has-filters:not(.active) .filter-btn-tag {
  color: var(--accent);
}

.filter-btn.active .filter-btn-tag {
  color: rgba(255, 255, 255, 0.95);
}

.filter-btn.active .filter-btn-tags {
  border-top-color: rgba(255, 255, 255, 0.25);
}

.filter-btn:active { transform: scale(0.97); }

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-btn.has-filters:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

.filter-btn svg { flex-shrink: 0; }

#filter-btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* Filter panel */
.filter-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 100px);
  right: 12px;
  left: auto;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - 120px);
  overflow-y: auto;
  z-index: 650;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: slideDown 0.2s ease;
}

.filter-panel.hidden { display: none; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.filter-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--tg-text);
}

.filter-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-clear-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, background 0.15s;
}

.filter-clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.filter-clear-btn:active {
  background: var(--accent-light);
}

.filter-panel-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--tg-secondary);
  color: var(--tg-hint);
  font-size: 13px;
  cursor: pointer;
}

.filter-section {
  margin-bottom: 14px;
}

.filter-section:last-child { margin-bottom: 0; }

.filter-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-hint);
  margin-bottom: 8px;
  padding-left: 2px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 8px 12px;
  background: var(--tg-secondary);
  border: 1.5px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-chip:active { transform: scale(0.97); }

.filter-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Map legend */
.map-legend {
  position: fixed;
  bottom: 24px;
  left: 12px;
  z-index: 400;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 12px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  min-width: 168px;
}

.legend-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
}

.legend-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--tg-hint);
}

.legend-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.legend-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-text);
  line-height: 1.2;
}

.legend-hint {
  font-size: 10px;
  color: var(--tg-hint);
  line-height: 1.2;
}

.legend-dot,
.legend-ring,
.legend-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-marker {
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.legend-marker.green { background: var(--green); }
.legend-marker.yellow { background: var(--yellow); }
.legend-marker.red { background: var(--red); }
.legend-marker.gray { background: var(--gray); }

.legend-ring {
  background: transparent;
  border: 3px solid;
  box-sizing: border-box;
}

.legend-dot.green,
.legend-ring.green { border-color: var(--green); }
.legend-dot.yellow,
.legend-ring.yellow { border-color: var(--yellow); }
.legend-dot.red,
.legend-ring.red { border-color: var(--red); }
.legend-dot.gray,
.legend-ring.gray { border-color: var(--gray); }

.legend-dot.green { background: var(--green); border: none; width: 10px; height: 10px; }
.legend-dot.yellow { background: var(--yellow); border: none; width: 10px; height: 10px; }
.legend-dot.red { background: var(--red); border: none; width: 10px; height: 10px; }
.legend-dot.gray { background: var(--gray); border: none; width: 10px; height: 10px; }

/* Leaflet markers */
.leaflet-div-icon.azs-div-icon {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.marker-wrap {
  position: relative;
  width: var(--marker-size, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-wrap--labeled {
  width: 160px;
}

.station-marker-img {
  width: var(--marker-size, 28px);
  height: var(--marker-size, 28px);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--fill-color, var(--gray));
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.station-marker-symbol {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.station-marker-img.selected {
  transform: scale(1.14);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(67, 97, 238, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.35);
  z-index: 1000 !important;
}

.station-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  position: relative;
  z-index: 2;
}

.station-marker.selected {
  transform: scale(1.3);
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000 !important;
}

.marker-label {
  position: absolute;
  top: calc(var(--marker-size, 28px) + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 6px 10px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 1;
  pointer-events: none;
  min-width: 80px;
  text-align: center;
}

.marker-label-network {
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-text);
  line-height: 1.3;
}

.marker-label-fuel {
  font-size: 10px;
  color: var(--tg-hint);
  line-height: 1.3;
  margin-top: 1px;
}

.marker-label-meta {
  font-size: 10px;
  color: var(--tg-hint);
  line-height: 1.3;
  margin-top: 2px;
}

/* Bottom sheet */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78vh;
  background: var(--tg-bg);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  box-shadow: var(--shadow);
  z-index: 500;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}

.sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.sheet.sheet-dragging {
  transition: none;
}

.sheet-handle {
  width: 40px;
  height: 5px;
  background: var(--tg-hint);
  border-radius: 3px;
  margin: 10px auto 0;
  opacity: 0.35;
  flex-shrink: 0;
  cursor: grab;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--tg-secondary);
  color: var(--tg-hint);
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.sheet-close:active { background: #dde0ea; }

.sheet-content {
  overflow-y: auto;
  padding: 8px 16px 28px;
  -webkit-overflow-scrolling: touch;
}

/* Station card */
.station-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  margin-bottom: 16px;
  padding: 0;
}

.station-photo-wrap {
  width: 100%;
  min-height: 200px;
  max-height: min(44vh, 300px);
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-muted, #eef2f6);
}

.station-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: transparent;
}

.station-header-info {
  width: 100%;
  padding: 0 4px;
}

.station-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}

.station-address {
  font-size: 13px;
  color: var(--tg-hint);
  margin-bottom: 2px;
  line-height: 1.4;
}

.station-district {
  font-size: 12px;
  color: var(--tg-hint);
}

/* Report section */
.report-section {
  background: var(--tg-secondary);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.report-empty {
  text-align: center;
  padding: 20px;
}

.empty-icon { font-size: 32px; margin-bottom: 8px; }

.empty-hint {
  font-size: 13px;
  color: var(--tg-hint);
  margin-top: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
}

.freshness-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.badge-fresh { background: #dcfce7; color: #166534; }
.badge-aging { background: #fef9c3; color: #854d0e; }
.badge-stale { background: #fee2e2; color: #991b1b; }
.badge-none { background: #f3f4f6; color: #6b7280; }

.fuel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.fuel-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.fuel-ok { background: #dcfce7; color: #166534; }
.fuel-no { background: #fee2e2; color: #991b1b; }

.fuel-status-empty {
  text-align: center;
  padding: 8px;
  color: var(--red);
  font-weight: 500;
  font-size: 14px;
}

.info-rows { display: flex; flex-direction: column; gap: 4px; }

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tg-hint);
}

.info-icon { font-size: 14px; }

.ratings-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-rate {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--tg-bg);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-rate:active { background: var(--tg-secondary); }

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active { opacity: 0.85; transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
  background: var(--tg-secondary);
  color: var(--tg-text);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline.active-toggle {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.actions-row {
  display: flex;
  gap: 8px;
}

.actions-row .btn { flex: 1; font-size: 13px; padding: 11px 8px; }

.history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 0;
}

.history-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.history-toggle.open .history-arrow { transform: rotate(90deg); }

.history-list {
  display: none;
  margin-top: 4px;
}

.history-list.open { display: block; }

.history-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--tg-secondary);
  font-size: 13px;
}

.history-item:last-child { border-bottom: none; }

.history-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.history-author { font-weight: 600; }
.history-time { color: var(--tg-hint); font-size: 12px; }
.history-fuels { color: var(--tg-text); }
.history-queue { color: var(--tg-hint); font-size: 12px; margin-top: 2px; }
.history-empty { font-size: 13px; color: var(--tg-hint); padding: 8px 0; }

.btn-admin {
  margin-top: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
}

.btn-admin:active { opacity: 0.9; }

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.admin-modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-field input,
.admin-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tg-secondary);
  border-radius: 12px;
  background: var(--tg-bg);
  color: var(--tg-text);
  font-size: 14px;
}

.admin-coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-move-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.admin-photo-field input[type="file"] {
  font-size: 13px;
  padding: 8px 0;
  border: none;
  background: transparent;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--tg-bg);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: 20px 16px 32px;
  z-index: 1;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--tg-secondary);
  color: var(--tg-hint);
  font-size: 14px;
  cursor: pointer;
}

.modal-hint {
  font-size: 13px;
  color: var(--tg-hint);
  margin-bottom: 16px;
}

.fuel-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.fuel-toggle {
  cursor: pointer;
}

.fuel-toggle input { display: none; }

.fuel-toggle-box {
  display: block;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--tg-secondary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s;
}

.fuel-toggle.checked .fuel-toggle-box,
.fuel-toggle input:checked + .fuel-toggle-box {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.btn-no-fuel {
  background: #fee2e2;
  color: #991b1b;
  margin-bottom: 4px;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-no-fuel.active {
  background: #ef4444;
  color: #fff;
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
}

[data-theme="dark"] .btn-no-fuel.active {
  background: #dc2626;
  color: #fff;
  border-color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

.modal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-hint);
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.queue-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.queue-btn {
  font-size: 14px;
  font-weight: 500;
}

.q-none { background: #dcfce7; color: #166534; }
.q-small { background: #fef9c3; color: #854d0e; }
.q-medium { background: #ffedd5; color: #9a3412; }
.q-large { background: #fee2e2; color: #991b1b; }

.btn-cancel {
  background: transparent;
  color: var(--tg-hint);
  font-weight: 500;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  backdrop-filter: blur(8px);
  color: var(--toast-text);
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.25s ease;
}

.toast.hidden { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Leaflet overrides */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--glass) !important;
  backdrop-filter: blur(8px);
  color: var(--tg-text) !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
}

.leaflet-control-attribution {
  display: none !important;
}

/* Hide legend when sheet is open on small screens */
@media (max-height: 600px) {
  .map-legend { display: none; }
}
