/* ═══════════════════════════════════════════════════════════
   LandWatch — Dark Space Theme
   Copernicus Land Monitoring App
   ═══════════════════════════════════════════════════════════ */

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

:root {
  /* Colors */
  --bg-base:       #04080f;
  --bg-surface:    #080f1e;
  --bg-card:       rgba(8, 16, 34, 0.92);
  --bg-card-hover: rgba(10, 22, 48, 0.97);
  --border:        rgba(0, 168, 255, 0.12);
  --border-active: rgba(0, 200, 255, 0.35);

  --accent:        #00b4ff;
  --accent-dim:    rgba(0, 180, 255, 0.15);
  --accent-glow:   rgba(0, 180, 255, 0.4);
  --green:         #00e676;
  --green-dim:     rgba(0, 230, 118, 0.15);
  --orange:        #ff9800;
  --red:           #ff5252;
  --purple:        #b388ff;

  --text-primary:  #d4e1f7;
  --text-sec:      #6a83a8;
  --text-muted:    #3a4e6a;
  --text-accent:   #00c8ff;

  /* Layout */
  --topbar-h:      52px;
  --left-w:        280px;
  --right-w:       300px;
  --radius:        10px;
  --radius-sm:     6px;

  /* Transitions */
  --t:             0.2s ease;
  --t-slow:        0.4s ease;
}

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

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 4px; }

/* ══════════════════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: rgba(4, 8, 16, 0.97);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  position: relative;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-icon { font-size: 20px; }
.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.brand-tag {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--border-active);
}

.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
.status-dot.error { background: var(--red); box-shadow: 0 0 8px var(--red); animation: none; }
.status-dot.loading { background: var(--orange); box-shadow: 0 0 8px var(--orange); }

.status-text { color: var(--text-sec); font-size: 12px; }

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-icon-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sec);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: var(--t);
}
.btn-icon-action:hover {
  border-color: var(--accent);
  color: var(--text-accent);
  background: var(--accent-dim);
}

/* ══════════════════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   SIDE PANELS
   ══════════════════════════════════════════════════════════ */
.side-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  background: rgba(4, 8, 18, 0.6);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}

.left-panel  { width: var(--left-w); border-right: 1px solid var(--border); }
.right-panel { width: var(--right-w); border-left: 1px solid var(--border); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--border-active); }

.card-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 180, 255, 0.04);
}

.card-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.card-body { padding: 12px; }

/* ── Inputs ──────────────────────────────────────────────── */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.input-group { display: flex; flex-direction: column; gap: 4px; }

.input-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.input-field {
  width: 100%;
  padding: 7px 10px;
  background: rgba(0, 168, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  transition: var(--t);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input-field:focus {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.1);
}
.input-field::placeholder { color: var(--text-muted); font-size: 12px; }
.input-field option { background: var(--bg-surface); color: var(--text-primary); }

/* Date input calendar icon color */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) brightness(1.5) sepia(1) saturate(3) hue-rotate(180deg);
  cursor: pointer;
}

/* ── Analyze Button ──────────────────────────────────────── */
.btn-analyze {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #0099e6, #006db3);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: var(--t);
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}
.btn-analyze::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: var(--t);
}
.btn-analyze:hover { box-shadow: 0 0 20px rgba(0, 153, 230, 0.5); transform: translateY(-1px); }
.btn-analyze:hover::after { opacity: 1; }
.btn-analyze:active { transform: translateY(0); }
.btn-analyze:disabled {
  background: rgba(0, 100, 150, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Quick Examples ──────────────────────────────────────── */
.quick-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.examples-label {
  font-size: 11px;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 2px;
}
.ex-btn {
  padding: 3px 9px;
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-sec);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--t);
}
.ex-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-accent);
}

/* ── Layer Lists ─────────────────────────────────────────── */
.layer-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.layer-note {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 6px;
}

.layer-list { display: flex; flex-direction: column; gap: 4px; }

/* Radio-based GIBS layer items */
.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--t);
  background: transparent;
}
.layer-item input[type="radio"] { display: none; }
.layer-item:hover { background: var(--accent-dim); border-color: var(--border-active); }
.layer-item:has(input:checked),
.layer-item.active {
  background: rgba(0, 180, 255, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim) inset;
}

/* Button-based CDSE layer items */
.layer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--t);
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.layer-btn:not(:disabled):hover {
  background: var(--accent-dim);
  border-color: var(--border-active);
}
.layer-btn.active {
  background: rgba(0, 230, 118, 0.12);
  border-color: var(--green);
}
.layer-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.layer-swatch {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.layer-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.layer-name { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.layer-meta { font-size: 10px; color: var(--text-muted); }

/* ── Opacity Slider ──────────────────────────────────────── */
.opacity-control { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

.range-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--pct, 85%), var(--border) var(--pct, 85%));
  border-radius: 4px;
  outline: none;
  margin-top: 6px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ── Scene Meta ──────────────────────────────────────────── */
.scene-meta { display: flex; flex-direction: column; gap: 6px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.meta-key { font-size: 11px; color: var(--text-muted); }
.meta-val { font-size: 12px; font-weight: 500; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
.meta-val.good { color: var(--green); }
.meta-val.warn { color: var(--orange); }
.meta-val.bad  { color: var(--red); }

.placeholder-text { color: var(--text-muted); font-size: 12px; font-style: italic; }

/* ══════════════════════════════════════════════════════════
   MAP
   ══════════════════════════════════════════════════════════ */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #050c1e;
}

/* Override Leaflet defaults for dark theme */
.leaflet-container { background: #050c1e; }
.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
}
.leaflet-control-attribution {
  background: rgba(4, 8, 16, 0.8) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text-sec) !important; }

/* ── NDVI Legend ─────────────────────────────────────────── */
.legend-panel {
  position: absolute;
  bottom: 32px;
  left: 12px;
  z-index: 800;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 180px;
  backdrop-filter: blur(16px);
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}

.legend-gradient {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Coordinates Bar ─────────────────────────────────────── */
.coords-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: rgba(4, 8, 16, 0.82);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-sec);
  backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
}

/* ── Map Loading Overlay ─────────────────────────────────── */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 900;
  background: rgba(4, 8, 18, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.scan-animation {
  position: relative;
  width: 120px;
  height: 120px;
}

.scan-earth {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  animation: float 3s ease-in-out infinite;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
  animation: scan 2s linear infinite;
  top: 0;
}

.loading-label {
  color: var(--text-accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════
   RIGHT PANEL COMPONENTS
   ══════════════════════════════════════════════════════════ */

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-box {
  background: rgba(0, 180, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  transition: var(--t);
}
.stat-box:hover { border-color: var(--border-active); background: var(--accent-dim); }

.stat-icon { font-size: 16px; margin-bottom: 4px; }
.stat-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Health Bar */
.health-card {
  background: rgba(0, 230, 118, 0.04);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.health-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.health-label { font-size: 11px; color: var(--text-sec); font-weight: 500; }
.health-score { font-size: 14px; font-weight: 700; color: var(--green); font-family: 'JetBrains Mono', monospace; }

.health-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.health-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff5252, #ff9800, #ffeb3b, #66bb6a, #00e676);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.health-text { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* Badge */
.badge-live {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,230,118,0.3);
  padding: 2px 6px;
  border-radius: 20px;
  animation: pulse 2s infinite;
}

/* ── Chart ───────────────────────────────────────────────── */
.chart-card-body { padding: 10px 10px 12px; }

.chart-wrap { position: relative; height: 160px; }

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.chart-empty-icon { font-size: 28px; opacity: 0.5; }
.chart-empty p { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.chart-empty strong { color: var(--text-sec); }

/* Period Pills */
.period-pills {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.pill {
  padding: 3px 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--t);
}
.pill:hover { border-color: var(--accent); color: var(--text-accent); }
.pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-accent);
}

/* ── Scene List ──────────────────────────────────────────── */
.scene-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  font-family: 'JetBrains Mono', monospace;
}

.scene-scroll { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

.scene-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--t);
  background: transparent;
}
.scene-row:hover { background: var(--accent-dim); border-color: var(--border-active); }
.scene-row.active { background: rgba(0,230,118,0.08); border-color: var(--green); }

.scene-date {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  flex: 1;
}
.scene-cloud {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
}
.scene-cloud.low  { background: rgba(0,230,118,0.15); color: var(--green); }
.scene-cloud.mid  { background: rgba(255,152,0,0.15); color: var(--orange); }
.scene-cloud.high { background: rgba(255,82,82,0.15);  color: var(--red); }
.scene-cloud.na   { background: rgba(100,100,100,0.15); color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  min-width: 220px;
  max-width: 320px;
  font-size: 12px;
  color: var(--text-primary);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  pointer-events: auto;
  animation: slideIn 0.25s ease;
}
.toast.info    { border-color: rgba(0,180,255,0.4); }
.toast.success { border-color: rgba(0,230,118,0.4); }
.toast.error   { border-color: rgba(255,82,82,0.4); }
.toast.warning { border-color: rgba(255,152,0,0.4); }

.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast.hide { animation: slideOut 0.25s ease forwards; }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}
.modal-close:hover { border-color: var(--red); color: var(--red); }

.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; color: #fff; }

.modal p { font-size: 13px; color: var(--text-sec); line-height: 1.7; margin-bottom: 12px; }
.modal strong { color: var(--text-primary); }

.modal ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.modal ul li {
  font-size: 13px;
  color: var(--text-sec);
  display: flex;
  gap: 8px;
}

.modal-footer { font-size: 12px !important; color: var(--text-muted) !important; border-top: 1px solid var(--border); padding-top: 12px; }

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes scan {
  from { top: 0; }
  to   { top: 100%; }
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -56%) scale(1.05); }
}

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(0,180,255,0.06) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Base Layer Toggle (Leaflet control top-right) ───────────────────────── */
.base-toggle-ctrl { margin-top: 10px; }

.base-toggle {
  display: flex;
  gap: 4px;
  background: rgba(4, 8, 18, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  backdrop-filter: blur(12px);
}

.base-btn {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
}
.base-btn:hover { border-color: var(--accent); color: var(--text-accent); }
.base-btn.base-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text-accent);
}

.leaflet-draw-toolbar a { background-color: var(--bg-card) !important; }
.leaflet-touch .leaflet-draw-toolbar a { background-color: var(--bg-card) !important; }

