:root {
  --bg-base: #0d0f14;
  --bg-panel: #151820;
  --bg-card: #1c2030;
  --bg-input: #111420;
  --border: #2a2f45;
  --border-focus: #3dd6c8;
  --accent: #3dd6c8;
  --accent-glow: rgba(61, 214, 200, 0.18);
  --orange: #f97316;
  --red: #f05e5e;
  --green: #4ade80;
  --yellow: #fbbf24;
  --purple: #a78bfa;
  --text-primary: #e8ecf4;
  --text-secondary: #8a92ab;
  --text-muted: #4e5670;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --transition: 0.18s ease;
}

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

html,
body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(61, 214, 200, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 214, 200, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0
}

.app-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh
}

/* Header */
header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px
}

.logo-text .t {
  color: var(--accent)
}

/* Fuel price badge */
.fuel-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: border-color 0.3s, background 0.3s;
  cursor: default
}

.fuel-badge.live {
  border-color: rgba(61, 214, 200, 0.4);
  background: rgba(61, 214, 200, 0.06)
}

.fuel-badge.fetching {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.05)
}

.fuel-badge.error {
  border-color: rgba(240, 94, 94, 0.4);
  background: rgba(240, 94, 94, 0.05)
}

.fuel-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
  flex-shrink: 0
}

.fuel-badge .pulse.loading {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
  animation: pulse 0.8s infinite
}

.fuel-badge .pulse.err {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: none
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

#fuel-badge-text {
  transition: opacity 0.3s
}

.fuel-badge-spinner {
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0
}

/* User pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition)
}

.user-pill:hover {
  border-color: var(--red);
  color: var(--red)
}

.user-pill .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #0d1117;
  flex-shrink: 0;
  overflow: hidden
}

.user-pill .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%
}

/* Layout */
.main-content {
  display: grid;
  grid-template-columns: 395px 1fr;
  height: calc(100vh - 65px)
}

/* Sidebar */
.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px
}

.sidebar::-webkit-scrollbar {
  width: 4px
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px
}

.card-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px
}

.card-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

/* Forms */
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px
}

.form-group {
  margin-bottom: 12px
}

.form-group:last-child {
  margin-bottom: 0
}

select,
input[type="number"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a92ab' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 34px;
  cursor: pointer
}

select:focus,
input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow)
}

select option {
  background: var(--bg-card)
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.2px
}

.btn-full {
  width: 100%
}

.btn-primary {
  background: var(--accent);
  color: #0d1117
}

.btn-primary:hover {
  background: #5ee8db;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px)
}

.btn-primary:active {
  transform: translateY(0)
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border)
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow)
}

.btn-pin {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border)
}

.btn-pin:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(251, 191, 36, 0.08)
}

.btn-pin.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: var(--yellow);
  color: var(--yellow);
  animation: pinGlow 1.5s ease-in-out infinite
}

@keyframes pinGlow {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2)
  }

  50% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5)
  }
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(240, 94, 94, 0.3)
}

.btn-danger:hover {
  background: rgba(240, 94, 94, 0.1);
  border-color: var(--red)
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

/* Refresh fuel price button */
.btn-refresh {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px
}

.btn-refresh:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.btn-refresh:disabled {
  opacity: 0.4;
  cursor: not-allowed
}

.btn-refresh.spinning svg {
  animation: spin 0.8s linear infinite
}

/* Live price display */
.live-price-box {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(61, 214, 200, 0.06);
  border: 1px solid rgba(61, 214, 200, 0.2);
  margin-bottom: 10px;
  transition: all 0.3s
}

.live-price-box.loading {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.25)
}

.live-price-box.error {
  background: rgba(138, 146, 171, 0.06);
  border-color: rgba(138, 146, 171, 0.2)
}

.live-price-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px
}

.live-price-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent)
}

.live-price-label.loading {
  color: var(--yellow)
}

.live-price-label.error {
  color: var(--text-secondary)
}

.live-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px
}

.live-price-item {
  text-align: center;
  padding: 6px 4px;
  background: var(--bg-input);
  border-radius: 4px;
  border: 1px solid var(--border)
}

.live-price-item-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 2px
}

.live-price-item-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary)
}

.live-price-item-unit {
  font-size: 9px;
  color: var(--text-secondary)
}

.live-price-source {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4
}

.live-price-source a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px
}

.live-price-source a:hover {
  color: var(--accent)
}

.live-price-skeleton {
  height: 72px;
  background: linear-gradient(90deg, var(--bg-input) 25%, rgba(251, 191, 36, 0.08) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

/* Location row */
.loc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 40px;
  transition: border-color var(--transition), background var(--transition)
}

.loc-row.manual-active {
  border-color: var(--yellow);
  background: rgba(251, 191, 36, 0.05)
}

.loc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0
}

.loc-dot.gps {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent)
}

.loc-dot.manual {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow)
}

.loc-dot.target {
  background: var(--orange);
  box-shadow: 0 0 6px var(--orange)
}

.loc-text {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.4
}

/* Manual banner */
#manual-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 10px;
  animation: slideDown 0.2s ease
}

#manual-banner.show {
  display: flex
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* Info boxes */
.info-box {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px
}

.info-box.info {
  background: rgba(61, 214, 200, 0.07);
  border: 1px solid rgba(61, 214, 200, 0.2);
  color: var(--accent)
}

.info-box.warn {
  background: rgba(249, 115, 22, 0.07);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--orange)
}

.tag {
  display: inline-block;
  background: rgba(61, 214, 200, 0.12);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px
}

/* Results */
.results-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-muted);
  font-size: 13px
}

.results-empty .icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5
}

.fetching-row {
  text-align: center;
  padding: 18px 0;
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px
}

.mini-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0
}

/* Route cards */
.route-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.route-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden
}

.route-card:hover {
  border-color: rgba(61, 214, 200, 0.5);
  background: rgba(61, 214, 200, 0.03)
}

.route-card.selected {
  border-color: var(--accent);
  background: rgba(61, 214, 200, 0.07);
  box-shadow: 0 0 0 1px var(--accent)
}

.route-card.best-fuel {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.04)
}

.route-card.best-fuel:hover {
  background: rgba(74, 222, 128, 0.08)
}

.route-card.best-fuel.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green)
}

.route-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
  border-radius: 3px 0 0 3px;
  transition: background var(--transition)
}

.route-card.selected::before {
  background: var(--accent)
}

.route-card.best-fuel.selected::before {
  background: var(--green)
}

.route-card.best-fuel:not(.selected)::before {
  background: rgba(74, 222, 128, 0.5)
}

.route-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px
}

.route-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px
}

.route-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase
}

.badge-fastest {
  background: rgba(61, 214, 200, 0.15);
  color: var(--accent)
}

.badge-fuel {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green)
}

.badge-alt {
  background: rgba(167, 139, 250, 0.15);
  color: var(--purple)
}

.route-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 4px
}

.route-stat {
  text-align: center
}

.route-stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 2px
}

.route-stat-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1
}

.route-stat-value.green {
  color: var(--green)
}

.route-stat-value.accent {
  color: var(--accent)
}

.route-stat-unit {
  font-size: 10px;
  color: var(--text-secondary)
}

.saving-banner {
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  font-size: 12px;
  color: var(--green);
  line-height: 1.6;
  margin-top: 10px
}

/* Map */
.map-area {
  position: relative;
  background: var(--bg-base)
}

#map {
  width: 100%;
  height: 100%
}

.map-area::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(13, 15, 20, 0.45);
  z-index: 400
}

.map-area.pin-mode #map {
  cursor: crosshair !important
}

#map-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: rgba(21, 24, 32, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s
}

#map-hint.pin-mode {
  border-color: var(--yellow);
  color: var(--yellow)
}

#layer-switcher {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 500;
  display: flex;
  background: rgba(21, 24, 32, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(8px)
}

.layer-btn {
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition)
}

.layer-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05)
}

.layer-btn.active {
  background: var(--accent);
  color: #0d1117;
  font-weight: 600
}

.layer-btn+.layer-btn {
  border-left: 1px solid var(--border)
}

#loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 600;
  gap: 14px
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

#loading-overlay p {
  color: var(--text-secondary);
  font-size: 13px
}

/* Leaflet overrides */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important
}

.leaflet-popup-tip {
  background: var(--bg-card) !important
}

.leaflet-popup-close-button {
  color: var(--text-secondary) !important
}

.leaflet-control-attribution {
  background: rgba(13, 15, 20, 0.8) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important
}

.leaflet-control-attribution a {
  color: var(--text-muted) !important
}

.leaflet-control-zoom a {
  background: rgba(21, 24, 32, 0.92) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important
}

.leaflet-control-zoom a:hover {
  background: var(--bg-card) !important;
  color: var(--accent) !important
}

/* Place Search */
.place-search-wrap {
  position: relative;
  margin-bottom: 10px
}

.place-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 36px 9px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition)
}

.place-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow)
}

.place-search-input::placeholder {
  color: var(--text-muted)
}

.place-search-input.searching {
  border-color: rgba(167, 139, 250, 0.5)
}

.place-search-input.found {
  border-color: rgba(74, 222, 128, 0.5)
}

.place-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  display: none;
  transition: color var(--transition)
}

.place-search-clear:hover {
  color: var(--red)
}

.place-search-spinner {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  pointer-events: none
}

.place-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 2000;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: none;
  max-height: 220px;
  overflow-y: auto
}

.place-suggestions.show {
  display: block
}

.place-suggestions::-webkit-scrollbar {
  width: 3px
}

.place-suggestions::-webkit-scrollbar-thumb {
  background: var(--border)
}

.place-suggestion-item {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 8px
}

.place-suggestion-item:last-child {
  border-bottom: none
}

.place-suggestion-item:hover,
.place-suggestion-item.active {
  background: rgba(61, 214, 200, 0.07)
}

.place-suggestion-icon {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 12px;
  opacity: 0.7
}

.place-suggestion-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3
}

.place-suggestion-addr {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 1px
}

.place-suggestion-no-results {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted)
}

.search-or-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0
}

.search-or-divider::before,
.search-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

/* News Feed */
.news-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1)
}

.news-panel.collapsed {
  transform: translateY(calc(100% - 38px))
}

.news-tab {
  height: 38px;
  background: rgba(21, 24, 32, 0.97);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  transition: background var(--transition)
}

.news-tab:hover {
  background: rgba(28, 32, 48, 0.98)
}

.news-tab-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary)
}

.news-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0
}

.news-tab-dot.loading {
  background: var(--yellow);
  box-shadow: 0 0 5px var(--yellow)
}

.news-tab-dot.error {
  background: var(--text-muted);
  box-shadow: none;
  animation: none
}

.news-tab-count {
  background: rgba(61, 214, 200, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px
}

.news-tab-chevron {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.28s ease;
  line-height: 1
}

.news-panel.collapsed .news-tab-chevron {
  transform: rotate(180deg)
}

.news-body {
  background: rgba(15, 17, 26, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 14px 14px
}

.news-body::-webkit-scrollbar {
  width: 3px
}

.news-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none
}

.news-item:hover {
  border-color: rgba(61, 214, 200, 0.4);
  background: rgba(61, 214, 200, 0.04)
}

.news-item-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1
}

.news-item-body {
  flex: 1;
  min-width: 0
}

.news-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.news-item-source {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3px
}

.news-item-date {
  font-size: 10px;
  color: var(--text-muted)
}

.news-item-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px
}

.news-item-tag.hike {
  background: rgba(240, 94, 94, 0.15);
  color: var(--red)
}

.news-item-tag.drop {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green)
}

.news-item-tag.neutral {
  background: rgba(138, 146, 171, 0.12);
  color: var(--text-secondary)
}

.news-loading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 12px;
  justify-content: center
}

.news-error-row {
  padding: 12px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted)
}

.news-refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color var(--transition)
}

.news-refresh-btn:hover {
  color: var(--accent)
}

.news-fetched-at {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  padding-top: 6px
}

@media(max-width:900px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto
  }

  .map-area {
    height: 55vw;
    min-height: 280px;
    order: -1
  }

  .sidebar {
    height: auto
  }

  header {
    padding: 12px 16px
  }

  .fuel-badge {
    display: none
  }
}

/* ─── AUTH OVERLAY ─────────────────────────────────────────────── */
#auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px
}

#auth-overlay.hidden {
  display: none
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7)
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800
}

.auth-logo-text .t {
  color: var(--accent)
}

.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px
}

.auth-input-group {
  margin-bottom: 14px
}

.auth-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px
}

.auth-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition)
}

.auth-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow)
}

.auth-input::placeholder {
  color: var(--text-muted)
}

.auth-btn {
  width: 100%;
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.auth-btn:hover {
  background: #5ee8db;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px)
}

.auth-btn:active {
  transform: translateY(0)
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none
}

/* ── Google Sign-In Button ── */
.auth-btn-google {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 11px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px
}

.auth-btn-google:hover {
  border-color: #4285f4;
  background: rgba(66, 133, 244, 0.08);
  box-shadow: 0 0 16px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px)
}

.auth-btn-google:active {
  transform: translateY(0)
}

.auth-btn-google:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0
}

/* ── Auth divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--text-muted)
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 18px
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer
}

.auth-switch a:hover {
  text-decoration: underline
}

.auth-error {
  background: rgba(240, 94, 94, 0.1);
  border: 1px solid rgba(240, 94, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--red);
  margin-bottom: 14px;
  display: none
}

.auth-error.show {
  display: block
}

.auth-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 14px;
  display: none
}

.auth-success.show {
  display: block
}

#auth-init {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px
}

#auth-init.hidden {
  display: none
}

#auth-init .big-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite
}

#auth-init p {
  color: var(--text-secondary);
  font-size: 13px
}
/* ─── MAP MARKERS ──────────────────────────────────────────────────
   Previously these lived as inline styles inside JS template strings,
   which also injected a duplicate <style> block per marker. */

.map-marker-pulse {
  position: relative;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%)
}

.map-marker-pulse .ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--marker-ripple);
  animation: marker-ripple 2s ease-out infinite
}

.map-marker-pulse .core {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--marker-core);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px var(--marker-shadow)
}

.map-marker-pulse.is-gps {
  --marker-ripple: rgba(61, 214, 200, 0.25);
  --marker-core: #3dd6c8;
  --marker-shadow: rgba(61, 214, 200, 0.7)
}

.map-marker-pulse.is-manual {
  --marker-ripple: rgba(251, 191, 36, 0.25);
  --marker-core: #fbbf24;
  --marker-shadow: rgba(251, 191, 36, 0.8)
}

@keyframes marker-ripple {
  0% {
    transform: scale(1);
    opacity: .6
  }
  100% {
    transform: scale(2.8);
    opacity: 0
  }
}

.map-marker-pin {
  width: 28px;
  height: 38px;
  transform: translate(-50%, -100%)
}
