/* ═══════════════════════════════════════════════════════════════════════════
   Combustivel.net — Design Tokens & Stylesheet
   Dark-mode fuel price dashboard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-base:        #080c18;
  --bg-surface:     #0e1325;
  --bg-surface-2:   #131929;
  --bg-surface-3:   #1a2038;
  --bg-card:        rgba(19, 25, 41, 0.72);

  --accent-green:   #00e5a0;
  --accent-green-2: #00d4aa;
  --accent-purple:  #7c5bf5;
  --accent-purple-2:#6366f1;
  --accent-glow-g:  rgba(0, 229, 160, 0.15);
  --accent-glow-p:  rgba(124, 91, 245, 0.15);

  --price-cheap:    #00e5a0;
  --price-mid:      #f59e0b;
  --price-exp:      #f43f5e;
  --price-cheap-bg: rgba(0, 229, 160, 0.1);
  --price-mid-bg:   rgba(245, 158, 11, 0.1);
  --price-exp-bg:   rgba(244, 63, 94, 0.1);

  --text-primary:   #f0f4ff;
  --text-muted:     #8892ab;
  --text-faint:     #4a5568;
  --text-accent:    #00e5a0;

  --border:         rgba(255, 255, 255, 0.07);
  --border-strong:  rgba(255, 255, 255, 0.12);
  --border-accent:  rgba(0, 229, 160, 0.25);

  /* Spacing (4px grid) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Type scale (fluid) */
  --text-xs:   clamp(10px, 1.8vw, 11px);
  --text-sm:   clamp(12px, 2vw, 13px);
  --text-base: clamp(13px, 2.2vw, 14px);
  --text-md:   clamp(14px, 2.4vw, 15px);
  --text-lg:   clamp(16px, 2.8vw, 18px);
  --text-xl:   clamp(18px, 3vw, 22px);
  --text-2xl:  clamp(22px, 4vw, 28px);

  /* Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  --shadow-glow-green: 0 0 20px rgba(0,229,160,0.2);
  --shadow-glow-purple: 0 0 20px rgba(124,91,245,0.2);

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast:  120ms;
  --t-base:  180ms;
  --t-slow:  320ms;

  /* Layout */
  --header-h:  56px;
  --filter-h:  52px;
  --sidebar-w: 380px;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
}

/* Numeric values always tabular */
.num, .price, [data-num] {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum", "lnum";
}

/* ── Dashboard Layout ─────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-rows: var(--header-h) var(--filter-h) 1fr;
  grid-template-columns: 1fr var(--sidebar-w);
  height: 100dvh;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-wordmark {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--bg-base);
  background: var(--accent-green);
  padding: 1px 6px;
  border-radius: var(--r-full);
  letter-spacing: 0.01em;
  margin-left: 2px;
  transform: translateY(-1px);
}

.header-tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: none;
}

.header-spacer { flex: 1; }

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-shrink: 0;
}

.update-time {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
}

.update-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.btn-share, .btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-3);
  color: var(--text-primary);
  min-height: 36px;
}

.btn-share:hover, .btn-refresh:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-accent);
  color: var(--accent-green);
}

.btn-share:active, .btn-refresh:active {
  transform: scale(0.97);
}

/* ── Filter Bar ───────────────────────────────────────────────────────────── */
.filter-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.filter-label {
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  white-space: nowrap;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-base) var(--ease-out);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  min-height: 28px;
}

.pill-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.pill-btn.active {
  background: var(--accent-glow-g);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.pill-btn:active { transform: scale(0.96); }

.sort-select {
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-3);
  color: var(--text-muted);
  min-height: 28px;
  transition: all var(--t-base) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
  padding-right: var(--sp-6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238892ab' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.sort-select:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent-green);
}

/* ── Map Area ─────────────────────────────────────────────────────────────── */
.map-area {
  grid-column: 1;
  grid-row: 3;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-base);
}

/* Override Leaflet for dark theme */
.leaflet-container {
  background: #080c18;
  font-family: 'Inter', sans-serif;
}

.leaflet-tile-pane { filter: brightness(0.85) saturate(0.7) hue-rotate(200deg); }

.leaflet-control-zoom {
  border: 1px solid var(--border-strong) !important;
  overflow: hidden;
  border-radius: var(--r-md) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-surface-2) !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--border) !important;
  transition: all var(--t-base) var(--ease-out);
}

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

.leaflet-control-attribution {
  background: rgba(8,12,24,0.8) !important;
  color: var(--text-faint) !important;
  font-size: 10px !important;
}

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

/* Custom map popup */
.leaflet-popup-content-wrapper {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}

.leaflet-popup-tip-container { display: none; }

.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}

.map-popup {
  padding: var(--sp-4);
  min-width: 200px;
}

.map-popup-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.map-popup-brand {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.map-popup-price {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}

.map-popup-fuel-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Custom marker styles */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: all var(--t-base) var(--ease-out);
  cursor: pointer;
}

.custom-marker.cheap  { background: var(--accent-green); }
.custom-marker.mid    { background: #f59e0b; }
.custom-marker.exp    { background: #f43f5e; }

.custom-marker-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  transform: rotate(45deg);
}

.custom-marker.selected {
  transform: rotate(-45deg) scale(1.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.7), 0 0 0 3px rgba(255,255,255,0.25);
  z-index: 1000 !important;
}

/* Cheapest station marker — special highlight */
.cheapest-marker {
  width: 44px !important;
  height: 44px !important;
  border: 3px solid rgba(255,255,255,0.6) !important;
  box-shadow: 0 0 20px rgba(0, 229, 160, 0.5), 0 4px 16px rgba(0,0,0,0.6) !important;
  z-index: 1500 !important;
  animation: cheapest-glow 2s ease-in-out infinite;
}
.cheapest-marker .custom-marker-inner {
  width: 14px;
  height: 14px;
}
.cheapest-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: rgba(0, 229, 160, 0.2);
  transform: rotate(45deg);
  animation: cheapest-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}
.cheapest-badge {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: rotate(45deg) translateX(-50%);
  transform-origin: left center;
  white-space: nowrap;
  padding: 2px 8px;
  background: var(--accent-green, #00e5a0);
  color: #080c18;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 4px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
}
@keyframes cheapest-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 160, 0.5), 0 4px 16px rgba(0,0,0,0.6); }
  50% { box-shadow: 0 0 30px rgba(0, 229, 160, 0.8), 0 4px 20px rgba(0,0,0,0.6); }
}
@keyframes cheapest-ping {
  0% { transform: rotate(45deg) scale(0.8); opacity: 0.6; }
  75%, 100% { transform: rotate(45deg) scale(1.8); opacity: 0; }
}

/* Radius circle */
.radius-circle {
  stroke: var(--accent-green) !important;
  stroke-width: 1.5px !important;
  stroke-dasharray: 6 4 !important;
  fill: rgba(0,229,160,0.04) !important;
}

/* ── Sidebar / Station List ───────────────────────────────────────────────── */
.sidebar {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-surface);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
}

.station-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-surface-3);
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
  font-variant-numeric: tabular-nums;
}

/* AI Summary Panel */
.ai-panel {
  margin: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ai-panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-purple), var(--accent-green));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: shimmer-border 3s linear infinite;
  opacity: 0.6;
}

@keyframes shimmer-border {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ai-panel-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.ai-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent-green), var(--accent-purple));
}

.ai-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
}

.ai-insights {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.ai-insight {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.4;
}

.ai-insight strong {
  font-weight: 600;
  color: var(--accent-green);
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  padding: 3px var(--sp-2);
  border-radius: var(--r-full);
}

/* Station list */
.station-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-2) var(--sp-4) var(--sp-4);
}

.station-list::-webkit-scrollbar { width: 4px; }
.station-list::-webkit-scrollbar-track { background: transparent; }
.station-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
}

.station-card {
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-3);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  content-visibility: auto;
  contain-intrinsic-size: 0 140px;
  position: relative;
  overflow: hidden;
}

.station-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-green);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  border-radius: 0 2px 2px 0;
}

.station-card:hover {
  border-color: var(--border-accent);
  background: rgba(19, 25, 41, 0.9);
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}

.station-card:hover::before { opacity: 1; }

.station-card.selected {
  border-color: var(--accent-green);
  background: rgba(0, 229, 160, 0.05);
  box-shadow: 0 0 0 1px var(--accent-green), var(--shadow-glow-green);
}

.station-card.selected::before { opacity: 1; }

.station-card:active { transform: translateX(2px) scale(0.99); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.card-name-row {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.card-brand {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.badge-dist {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--r-full);
  font-variant-numeric: tabular-nums;
}

.card-address {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prices mini-table */
.prices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2) var(--sp-3);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.fuel-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-val {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  padding: 2px 5px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.price-val.cheap { color: var(--price-cheap); background: var(--price-cheap-bg); }
.price-val.mid   { color: var(--price-mid);   background: var(--price-mid-bg); }
.price-val.exp   { color: var(--price-exp);   background: var(--price-exp-bg); }
.price-val.na    { color: var(--text-faint);  background: transparent; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.card-updated {
  font-size: var(--text-xs);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-navigate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-green);
  text-decoration: none;
  padding: 4px var(--sp-3);
  border-radius: var(--r-full);
  border: 1px solid var(--border-accent);
  transition: all var(--t-base) var(--ease-out);
  min-height: 28px;
}

.btn-navigate:hover {
  background: var(--accent-glow-g);
  color: var(--accent-green);
}

/* ── Skeleton Loaders ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface-2) 25%,
    var(--bg-surface-3) 50%,
    var(--bg-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}

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

.skeleton-card {
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-3);
}

.skel-line {
  height: 12px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-2);
}

.skel-line.w-70 { width: 70%; }
.skel-line.w-50 { width: 50%; }
.skel-line.w-80 { width: 80%; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-30 { width: 30%; }

.skel-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.skel-price {
  height: 28px;
  border-radius: var(--r-sm);
}

/* ── Empty & Error States ─────────────────────────────────────────────────── */
.empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-xl);
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

.empty-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-muted);
}

.empty-desc {
  font-size: var(--text-sm);
  color: var(--text-faint);
  max-width: 240px;
}

/* ── Toast Notification ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--t-slow) var(--ease-out),
             toast-out var(--t-slow) var(--ease-in) 2.5s forwards;
}

.toast.success { border-color: var(--accent-green); color: var(--accent-green); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(16px); }
}

/* ── Map controls overlay ─────────────────────────────────────────────────── */
.map-overlay-info {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-4);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(8,12,24,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer-area {
  display: none; /* Hidden in dashboard mode, accessible via sidebar scroll */
}

/* ── Stagger animation for cards ──────────────────────────────────────────── */
.station-card {
  opacity: 0;
  animation: card-in var(--t-slow) var(--ease-out) forwards;
}

@keyframes card-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Responsive: Tablet ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 320px;
  }
}

/* ── Responsive: Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-h: 52px;
    --filter-h: 48px;
  }

  .app {
    grid-template-rows: var(--header-h) var(--filter-h) 32vh 1fr;
    grid-template-columns: 1fr;
  }

  .map-area {
    grid-column: 1;
    grid-row: 3;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 4;
    border-left: none;
    border-top: 1px solid var(--border);
    overflow: hidden;
  }

  .header-tagline { display: none; }

  .logo-wordmark { font-size: var(--text-md); }

  .ai-panel { display: none; } /* Collapsed on mobile - show inline in list */

  .prices-grid { grid-template-columns: 1fr 1fr; gap: 2px var(--sp-2); }

  .station-list { padding: var(--sp-1) var(--sp-2) var(--sp-3); }

  .station-card { margin-bottom: var(--sp-2); padding: var(--sp-3); }

  .map-legend { display: none; }

  .filter-bar { padding: 0 var(--sp-4); }

  /* Compact card-footer on mobile */
  .card-footer {
    margin-top: var(--sp-2);
    padding-top: var(--sp-2);
  }

  .card-top { margin-bottom: 2px; }

  .card-address {
    margin-bottom: var(--sp-2);
    font-size: 10px;
  }

  /* Tighter price rows on mobile */
  .price-row {
    gap: 2px;
  }
  .fuel-label { font-size: 10px; }
  .price-val { font-size: 11px; padding: 1px 4px; }

  /* Smaller card name on mobile */
  .card-name { font-size: var(--text-sm); }

  /* Reorder sidebar sections: station list first, then extras */
  .sidebar {
    display: flex;
    flex-direction: column;
  }
  .ai-panel     { order: 1; }
  .geo-panel    { order: 2; }
  .sidebar-header { order: 3; }
  .station-list { order: 4; }
  .tips-section { order: 5; }
  .news-section { order: 6; }
  .trends-section { order: 7; }
  .sidebar-footer { order: 8; }

  /* Collapse tips on mobile to save space */
  .tips-section .tips-grid { display: none; }
  .tips-section .section-header { cursor: pointer; }
  .tips-section.expanded .tips-grid { display: grid; }
}

@media (min-width: 1280px) {
  .header-tagline { display: block; }

  :root {
    --sidebar-w: 420px;
  }
}

/* ── Accessibility & Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ── Stale data warning ──────────────────────────────────────────────────── */
.stale-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-size: var(--text-xs);
  color: #f59e0b;
  flex-shrink: 0;
}

/* ── Skip link ───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: var(--sp-3) var(--sp-6);
  background: var(--accent-green);
  color: var(--bg-base);
  font-weight: 700;
  z-index: 10000;
  border-radius: 0 0 var(--r-md) 0;
  text-decoration: none;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UPGRADES: News Feed, Trends, Share, Mobile Nav, Splash, Footer, Modals
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Splash Screen ───────────────────────────────────────────────────────── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.splash-logo {
  width: 64px;
  height: 64px;
  animation: splash-bounce 1.2s var(--ease-out) infinite alternate;
}

@keyframes splash-bounce {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-8px) scale(1.05); }
}

.splash-wordmark {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.splash-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--bg-base);
  background: var(--accent-green);
  padding: 1px 6px;
  border-radius: var(--r-full);
  margin-left: 2px;
  transform: translateY(-1px);
}

.splash-status {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.splash-bar {
  width: 160px;
  height: 3px;
  background: var(--bg-surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}

.splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-purple));
  border-radius: var(--r-full);
  animation: splash-fill 1.4s var(--ease-out) forwards;
}

@keyframes splash-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── Section Headers (shared) ────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.section-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  background: var(--accent-glow-g);
  border: 1px solid var(--border-accent);
  padding: 1px 6px;
  border-radius: var(--r-full);
}

/* ── News Feed ───────────────────────────────────────────────────────────── */
.news-section {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.news-feed {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  cursor: grab;
}

.news-feed::-webkit-scrollbar { display: none; }
.news-feed:active { cursor: grabbing; }

.news-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 200px;
  padding: var(--sp-3);
}

.news-card {
  flex-shrink: 0;
  width: 230px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: relative;
  overflow: hidden;
}

.news-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-card:active {
  transform: translateY(0) scale(0.98);
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.news-category {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: var(--r-full);
}

.news-cat-price   { background: rgba(244,63,94,0.15);  color: #f43f5e; }
.news-cat-global  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.news-cat-portugal{ background: rgba(0,229,160,0.12);  color: var(--accent-green); }
.news-cat-policy  { background: rgba(124,91,245,0.15); color: var(--accent-purple); }

.news-impact {
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
}

.news-impact.up      { color: #f43f5e; }
.news-impact.down    { color: var(--accent-green); }
.news-impact.neutral { color: var(--text-faint); }

.news-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-summary {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}

.news-source {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 500;
}

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

/* ── Trends Section ──────────────────────────────────────────────────────── */
.trends-section {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.trends-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--t-base) var(--ease-out);
}

.trends-summary::-webkit-details-marker { display: none; }
.trends-summary:hover { background: rgba(255,255,255,0.03); }

.trends-section[open] .summary-chevron {
  transform: rotate(180deg);
}

.summary-chevron {
  color: var(--text-faint);
  transition: transform var(--t-base) var(--ease-out);
  flex-shrink: 0;
}

.trends-content {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
}

.chart-container {
  position: relative;
  height: 180px;
  margin-bottom: var(--sp-3);
}

.trends-analysis {
  background: rgba(0,229,160,0.04);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-md);
  padding: var(--sp-3);
}

.trends-analysis .ai-insight {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Like Button ─────────────────────────────────────────────────────────── */
.btn-like {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-3);
  color: var(--text-muted);
  min-height: 36px;
  position: relative;
}

.btn-like:hover {
  border-color: rgba(244,63,94,0.4);
  color: #f43f5e;
}

.btn-like:active { transform: scale(0.95); }

.btn-like.liked {
  background: rgba(244,63,94,0.12);
  border-color: rgba(244,63,94,0.4);
  color: #f43f5e;
}

.btn-like.liked .heart-icon {
  fill: #f43f5e;
  stroke: #f43f5e;
  animation: heart-pop 0.35s var(--ease-out);
}

@keyframes heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Heart burst particles */
.heart-burst {
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  top: 50%;
  left: 20px;
}

.burst-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f43f5e;
  animation: burst-fly 0.5s var(--ease-out) forwards;
}

@keyframes burst-fly {
  from { transform: translate(0,0) scale(1); opacity: 1; }
  to   { transform: var(--fly-to) scale(0); opacity: 0; }
}

/* ── Social Share Bar ────────────────────────────────────────────────────── */
.share-bar {
  position: fixed;
  left: 16px;
  bottom: 80px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(14,19,37,0.9);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: var(--sp-3) var(--sp-2);
  box-shadow: var(--shadow-lg);
}

.share-bar-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-surface-3);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  color: var(--text-muted);
}

.share-btn:hover { transform: scale(1.1); border-color: var(--border-strong); }
.share-btn:active { transform: scale(0.95); }

.share-whatsapp:hover { color: #25d366; border-color: rgba(37,211,102,0.4); background: rgba(37,211,102,0.08); }
.share-facebook:hover { color: #1877f2; border-color: rgba(24,119,242,0.4); background: rgba(24,119,242,0.08); }
.share-twitter:hover  { color: #e7e9ea; border-color: rgba(231,233,234,0.3); background: rgba(231,233,234,0.05); }
.share-copy:hover     { color: var(--accent-green); border-color: var(--border-accent); background: var(--accent-glow-g); }

/* ── Mobile Bottom Navigation ────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,12,24,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-strong);
  flex-direction: row;
  align-items: stretch;
}

.mobile-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 10px;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--t-base) var(--ease-out);
  padding: var(--sp-2) 0;
  position: relative;
}

.mobile-nav-tab:active { transform: scale(0.9); }

.mobile-nav-tab.active {
  color: var(--accent-green);
}

.mobile-nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-green);
  border-radius: 0 0 var(--r-full) var(--r-full);
}

/* ── Site Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  margin-top: auto;
}

.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-footer-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.site-footer-tagline {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  transition: color var(--t-base) var(--ease-out);
}

.footer-link:hover { color: var(--accent-green); }

.footer-sep {
  color: var(--text-faint);
}

.site-footer-note {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.site-footer-copy {
  font-size: var(--text-xs);
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
}

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.modal-overlay.open {
  display: flex;
  animation: modal-fade-in 0.25s var(--ease-out);
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modal-slide-in 0.25s var(--ease-out);
  overflow: hidden;
}

@keyframes modal-slide-in {
  from { transform: translateY(16px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-surface-3);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
}

.modal-close:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.modal-body {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  line-height: 1.7;
}

.modal-body h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-green);
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.modal-body a {
  color: var(--accent-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-body strong { color: var(--text-primary); }

.modal-date {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-bottom: var(--sp-5) !important;
}

.about-logo-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--bg-surface-3);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.about-links {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

.modal-link-btn {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent-glow-g);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-full);
  color: var(--accent-green);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-base) var(--ease-out);
}

.modal-link-btn:hover {
  background: rgba(0,229,160,0.2);
  text-decoration: none;
}

/* ── Pull-to-refresh hint ────────────────────────────────────────────────── */
.pull-hint {
  text-align: center;
  padding: var(--sp-3) 0;
  font-size: var(--text-xs);
  color: var(--text-faint);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  flex-shrink: 0;
}

.pull-hint.visible { opacity: 1; }

/* ── Touch feedback ──────────────────────────────────────────────────────── */
button:active, a:active, [role="button"]:active {
  -webkit-tap-highlight-color: transparent;
}

/* ── Responsive: Mobile Updates ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }

  /* Account for bottom nav height */
  .app {
    grid-template-rows: var(--header-h) var(--filter-h) 32vh 1fr;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  /* Toast above bottom nav */
  .toast-container {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* Share bar above bottom nav - HIDDEN on mobile to save space */
  .share-bar {
    display: none;
  }

  /* Site footer hidden on mobile (accessible via scroll) */
  .site-footer { padding: var(--sp-6) var(--sp-4); }

  /* Trends section collapsed by default on mobile */
  .trends-section { }

  /* News cards slightly smaller on mobile */
  .news-card { width: 200px; }
}

@media (min-width: 769px) {
  /* Share bar positions on desktop - left side over map */
  .share-bar {
    bottom: 80px;
    left: 16px;
    right: auto;
  }

  /* App needs to account for no mobile nav - show footer outside app grid */
  .site-footer {
    grid-column: 1 / -1;
  }
}

/* ── Sidebar scrolls as a unit with all new sections ─────────────────────── */
.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Station list: allow natural flow (sidebar handles scroll) */
.station-list {
  flex: none !important;
  overflow-y: visible !important;
  overflow-x: hidden;
  min-height: 200px;
  padding-bottom: 80px; /* space for bottom nav + footer */
}



/* ── Allow page scroll on desktop for footer visibility ─────────────────── */
@media (min-width: 769px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  .app {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* ── Footer Contact ──────────────────────────────────────────────────────── */
.footer-contact { margin: 16px 0; text-align: center; }
.footer-contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted, #8892ab); font-size: 13px; text-decoration: none;
  transition: color 180ms ease;
}
.footer-contact-link:hover { color: var(--accent-green, #00e5a0); }

/* ── Fuel Saving Tips ─────────────────────────────────────────── */
.tips-section { padding: 0 16px 8px; }
.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 229, 160, 0.06);
  border: 1px solid rgba(0, 229, 160, 0.12);
  border-radius: 10px;
  transition: border-color 180ms ease;
}
.tip-card:hover { border-color: rgba(0, 229, 160, 0.3); }
.tip-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.tip-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted, #8892ab);
}
@media (max-width: 768px) {
  .tips-grid { grid-template-columns: 1fr; }
}

/* ── Geolocation Nearest Cheapest ─────────────────────────────── */
.geo-panel { padding: 0 16px 12px; }
.geo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.15), rgba(124, 91, 245, 0.1));
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 12px;
  color: var(--accent-green, #00e5a0);
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.geo-btn:hover {
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.25), rgba(124, 91, 245, 0.18));
  border-color: rgba(0, 229, 160, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 229, 160, 0.15);
}
.geo-btn:active { transform: translateY(0); }
.geo-btn:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
}
.geo-btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.geo-result {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.15);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary, #bfc8db);
}
.geo-result strong { color: var(--accent-green, #00e5a0); }
.geo-result .geo-nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; padding: 6px 12px;
  background: rgba(0, 229, 160, 0.12);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 8px;
  color: var(--accent-green, #00e5a0);
  font-size: 11px; font-weight: 600; text-decoration: none;
  transition: all 180ms ease;
}
.geo-result .geo-nav-link:hover {
  background: rgba(0, 229, 160, 0.2);
}
