/* ServoStatus — Light Theme */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f6f8;
  color: #1a202c;
}

/* Hide scrollbar but keep scroll */
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

/* Map */
#map { background: #e8edf2; }

@media (min-width: 1024px) {
  #map { right: 384px; }
}
@media (max-width: 1023px) {
  #map { bottom: 64px; }
}

/* ── Custom Leaflet markers ────────────────────────────────── */
.servo-marker {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.servo-marker:hover  { transform: scale(1.2); }
.servo-marker.active { transform: scale(1.3); border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.3); }

.servo-marker.status-available { background: #16a34a; color: white; }
.servo-marker.status-low       { background: #d97706; color: white; }
.servo-marker.status-out       { background: #dc2626; color: white; }
.servo-marker.status-limited   { background: #ca8a04; color: white; }
.servo-marker.status-unknown   { background: #2563eb; color: white; }
.servo-marker.status-expired   { background: #9ca3af; color: white; }

/* ── Leaflet overrides ─────────────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: #ffffff;
  color: #1a202c;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.leaflet-popup-tip { background: #ffffff; }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }

.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}
.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  margin-bottom: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
}
.leaflet-control-zoom a:hover { background: #f3f4f6 !important; }
.leaflet-control-attribution {
  background: rgba(255,255,255,0.85) !important;
  color: #9ca3af !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: #6b7280 !important; }

/* ── Header ────────────────────────────────────────────────── */
#header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Filters bar ───────────────────────────────────────────── */
#filters {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.filter-fuel {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.filter-fuel.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.filter-fuel:hover:not(.active) {
  background: #e5e7eb;
  color: #374151;
}

/* ── Desktop panel ─────────────────────────────────────────── */
#desktop-list {
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
}

/* ── Station panel ─────────────────────────────────────────── */
#station-panel {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10);
}
#station-panel.open { transform: translateY(0); }

/* ── Station list cards ────────────────────────────────────── */
.station-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.station-card:hover, .station-card.active {
  background: #f0f7ff;
  border-color: #bfdbfe;
  box-shadow: 0 1px 6px rgba(37,99,235,0.08);
}

/* ── Status badges ─────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.status-badge.available { background: #dcfce7; color: #15803d; }
.status-badge.low       { background: #fef3c7; color: #b45309; }
.status-badge.out       { background: #fee2e2; color: #dc2626; }
.status-badge.limited   { background: #fef9c3; color: #ca8a04; }
.status-badge.unknown   { background: #dbeafe; color: #2563eb; }
.status-badge.expired   { background: #f3f4f6; color: #9ca3af; }

/* ── Freshness ─────────────────────────────────────────────── */
.freshness-fresh  { color: #16a34a; }
.freshness-aging  { color: #d97706; }
.freshness-stale  { color: #dc2626; }
.freshness-expired { color: #9ca3af; }

/* ── Confidence ────────────────────────────────────────────── */
.confidence-high   { color: #15803d; }
.confidence-medium { color: #b45309; }
.confidence-low    { color: #9ca3af; }

/* ── Price rows ────────────────────────────────────────────── */
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.price-row:last-child { border-bottom: none; }

/* ── Report cards ──────────────────────────────────────────── */
.report-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
}

/* ── Report status buttons ─────────────────────────────────── */
.report-status-btn {
  background: #f9fafb;
  color: #6b7280;
  border-color: #e5e7eb;
}
.report-status-btn.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #2563eb;
}
.report-status-btn:hover:not(.active) {
  background: #f3f4f6;
  color: #374151;
}

/* ── Inputs ────────────────────────────────────────────────── */
.field-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #1a202c;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.field-input::placeholder { color: #9ca3af; }

/* ── Primary button ────────────────────────────────────────── */
.btn-primary {
  background: #2563eb;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover  { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Bottom nav ────────────────────────────────────────────── */
nav {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
}

/* ── Toast ─────────────────────────────────────────────────── */
#toast {
  background: #1a202c;
  color: #f9fafb;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: opacity 0.3s;
}
#toast.show { display: block !important; }
#toast.hide { opacity: 0; }

/* ── Mobile list ───────────────────────────────────────────── */
#mobile-list { background: #f5f6f8; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section headers ───────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 8px;
}
