/* ==========================================================================
   AeroChronik: High-Tech Theme, Archive Timeline & Statistics Suite
   ========================================================================== */

/* Leaflet Dark Aeronautical Vector Chart Filter */
[data-theme="dark"] .leaflet-tile-pane {
  filter: invert(1) hue-rotate(190deg) brightness(0.85) contrast(1.08) saturate(0.38);
}

[data-theme="dark"] .leaflet-tile {
  background: #070a0f !important;
}

/* Base Body Overrides */
body {
  background: var(--canvas);
  color: var(--ink);
}

/* ==========================================================================
   Archive & Historical Playback View
   ========================================================================== */

.archive-view {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 140px;
  background: var(--canvas);
}

.history-sidebar {
  grid-row: 1 / -1;
  padding: 16px 18px 20px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.archive-intro h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  color: var(--ink);
}

.archive-intro > p:last-child {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.recording-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
}

.archive-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.archive-stats div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.archive-stats strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 750;
  display: block;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.archive-stats span {
  font-size: 9.5px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.archive-since {
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.archive-since > span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.archive-since strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 4px;
  color: var(--ink);
}

.period-fields {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.period-presets, .speed-presets {
  display: flex;
  gap: 4px;
}

.period-presets button, .speed-presets button {
  font-size: 10px;
  font-weight: 650;
  min-height: 28px;
  flex: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.period-presets button:hover, .speed-presets button:hover {
  color: var(--ink);
  background: var(--panel-elevated);
}

.period-presets button[aria-pressed="true"], .speed-presets button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 700;
}

.period-fields input, .history-sidebar input[type="search"], .history-sidebar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  background: var(--panel);
  color: var(--ink);
  height: 32px;
}

.archive-search-fields {
  display: grid;
  gap: 7px;
}

.archive-search-box {
  position: relative;
}

.archive-search-box > svg {
  position: absolute;
  z-index: 1;
  width: 15px;
  height: 15px;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.archive-search-box input[type="search"] {
  padding-left: 32px;
}

.archive-search-results {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.archive-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 8px 9px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid transparent;
}

.archive-search-result:hover,
.archive-search-result:focus-visible {
  background: var(--panel-elevated);
  border-color: var(--line-strong);
  outline: none;
}

.archive-search-result strong,
.archive-search-result span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.archive-search-result strong { font-size: 11.5px; }
.archive-search-result span { grid-column: 1; font-size: 9.5px; color: var(--muted); }
.archive-search-result em { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); font-size: 9.5px; font-style: normal; font-weight: 750; }
.archive-search-empty { margin: 0; padding: 9px; color: var(--muted); font-size: 10.5px; }

.archive-aircraft-leaflet-popup .leaflet-popup-content-wrapper,
.archive-aircraft-leaflet-popup .leaflet-popup-tip {
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 48px rgba(0,0,0,.34);
}

.archive-aircraft-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 14px;
  backdrop-filter: blur(18px);
}

.archive-aircraft-leaflet-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.archive-aircraft-leaflet-popup .leaflet-popup-close-button { top: 8px; right: 8px; color: var(--muted); font-size: 20px; }

.archive-aircraft-popup { padding: 17px; }
.archive-aircraft-popup > strong { display: block; padding-right: 22px; color: var(--ink); font-size: 14px; letter-spacing: -.15px; }
.archive-aircraft-popup > p { margin: 7px 0 14px; color: var(--muted); font-size: 10.5px; }

.archive-popup-timeline {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #071413;
  background: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
}

.archive-popup-alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.archive-popup-action { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 9.5px; font-weight: 700; }
.archive-popup-action svg { width: 15px; height: 15px; }
.archive-popup-action:hover { color: var(--ink); border-color: var(--line-strong); background: var(--panel-elevated); }
.archive-popup-action.active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }

.period-fields .primary {
  width: 100%;
  height: 34px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
}

/* History Stage */
.history-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.history-caption {
  position: absolute;
  top: 16px;
  left: 16px;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  z-index: 450;
  max-width: calc(100% - 90px);
}

.history-caption h2 {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
  margin: 0 0 2px;
  font-family: var(--font-mono);
}

.history-caption > p:last-child {
  font-size: 10.5px;
  color: var(--muted);
  margin: 0;
}

.history-fit {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 450;
  width: 32px;
  height: 32px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  display: grid;
  place-items: center;
}

/* Timeline Panel */
.timeline-panel {
  grid-column: 2;
  grid-row: 2;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 18px 8px;
  min-width: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timeline-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-heading strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.timeline-heading > span {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline-visual {
  height: 38px;
  position: relative;
  margin: 4px 0;
}

.timeline-bars {
  height: 28px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.timeline-bars button {
  display: block;
  flex: 1;
  border: 0;
  min-height: 0;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  opacity: 0.45;
  margin: 0;
  padding: 0;
}

.timeline-bars button:hover, .timeline-bars button.active {
  opacity: 1;
}

#archiveCursor {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: ew-resize;
  height: 14px;
  background: transparent;
}

.timeline-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--muted);
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.playback-controls .icon {
  width: 26px;
  min-height: 26px;
  height: 26px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.playback-controls output {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  margin-left: 6px;
}

/* ==========================================================================
   Statistics & Analytical Operations Suite (#statsView)
   ========================================================================== */

.stats-view {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--canvas);
  padding: 20px 24px 40px;
  gap: 18px;
  scrollbar-width: thin;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.view-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 4px;
  padding: 2px 7px;
  display: inline-block;
}

.stats-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 4px 0 2px;
  color: var(--ink);
}

.stats-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  max-width: 680px;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stats-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stats-card.highlight-emergency {
  border-left: 4px solid var(--bos-red);
}

.stats-card.highlight-civil {
  border-left: 4px solid var(--civil-sky);
}

.stats-card-label {
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.stats-card-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin: 6px 0 2px;
  letter-spacing: -0.5px;
}

.stats-card-value-small {
  font-size: 14px;
  font-weight: 750;
  font-family: var(--font-mono);
  color: var(--ink);
  margin: 6px 0 2px;
}

.stats-card-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.stats-content-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.stats-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-panel-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  margin: 0;
}

.stats-badge {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.stats-service-group, .stats-sort-group {
  display: flex;
  gap: 2px;
  background: var(--panel);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.service-btn, .sort-btn {
  border: none;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.service-btn:hover, .sort-btn:hover {
  color: var(--ink);
}

.service-btn.active, .sort-btn.active {
  background: var(--paper);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.stats-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  scrollbar-width: thin;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.stats-table thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  padding: 8px 10px;
  z-index: 2;
}

.stats-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.stats-table tbody tr:hover td {
  background: var(--panel);
}

.stats-table .num-col {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stats-bar-container {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.stats-bar {
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  min-width: 3px;
}

.stats-bar-label {
  font-size: 9.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  min-width: 34px;
  text-align: right;
}

/* ==========================================================================
   Alerts & Geofence System
   ========================================================================== */

.alerts-modal {
  position: relative;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.push-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 11px;
}

.push-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alerts-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.alerts-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.alerts-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.alerts-section-title {
  font-size: 14px;
  font-weight: 750;
  margin: 0 0 4px;
  color: var(--ink);
}

.alerts-section-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.4;
}

/* Alert Form */
.alert-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.alert-search-wrapper {
  position: relative;
}

.alert-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  max-height: 180px;
  overflow-y: auto;
  box-shadow: var(--shadow-hud);
}

.alert-search-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-search-item:hover {
  background: var(--panel-elevated);
}

.alert-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
}

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

.alert-input-col input,
.alert-field-group input {
  height: 34px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
}

.alert-types-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.alert-type-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 11.5px;
}

.alert-type-toggle input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.alert-type-toggle .toggle-text strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.alert-type-toggle .toggle-text small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.alert-geofence-options {
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geofence-preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.geofence-radius-select-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

.geofence-radius-select-col select {
  height: 30px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 11.5px;
}

.button.small {
  height: 28px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.button.small.secondary {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.button.small.secondary:hover {
  background: var(--panel-elevated);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.small svg {
  width: 14px;
  height: 14px;
}

button.full-width {
  width: 100%;
  height: 34px;
  font-weight: 700;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
}

button.full-width:hover {
  background: var(--accent-hover);
}

/* Configured Alerts List */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-alerts {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

.alert-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.alert-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.alert-card-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.alert-hex-badge {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--muted);
  margin-left: 6px;
}

.delete-btn.icon {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}

.delete-btn.icon:hover {
  color: var(--bos-red);
  background: rgba(244, 63, 94, 0.12);
}

.delete-btn.icon svg {
  width: 15px;
  height: 15px;
}

.alert-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.alert-row-desc {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.alert-row-desc .alert-row-icon,
.alert-row-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  flex-shrink: 0;
  color: var(--accent);
}

.alert-row-desc div {
  min-width: 0;
}

.alert-row-desc strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.alert-row-desc small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.25;
}

.alert-toggle-btn {
  flex-shrink: 0;
  font-size: 10.5px;
  padding: 3px 8px;
  min-height: 24px;
}

.alert-geo-actions {
  flex-shrink: 0;
}

.alert-geo-actions button {
  font-size: 10.5px;
  padding: 3px 8px;
  min-height: 24px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.alert-geo-actions button:hover {
  background: var(--panel-elevated);
  border-color: var(--line-strong);
}

/* Geofence Toolbar on Map */
.geofence-toolbar {
  position: fixed;
  z-index: 1100;
  left: 18px;
  bottom: 25px;
  width: 320px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.geofence-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.geofence-toolbar-head > div {
  flex: 1;
  min-width: 0;
}

.geofence-toolbar-head button {
  margin-left: auto;
  flex-shrink: 0;
}

.geofence-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent);
  flex-shrink: 0;
}

.geofence-icon svg {
  width: 16px;
  height: 16px;
}

.geofence-toolbar-head strong {
  font-size: 13px;
  font-weight: 700;
}

.geofence-toolbar-head .subtitle {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}

.geofence-radius-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11.5px;
}

.geofence-radius-row input {
  width: 80px;
  height: 28px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.geofence-toolbar-actions {
  display: flex;
  gap: 6px;
}

.geofence-toolbar-actions button {
  flex: 1;
  text-align: center;
}

/* 3D Approach Funnel / Cone Map Styles */
.approach-cone-tooltip {
  background: #0284c7;
  border: 1px solid #38bdf8;
  color: #fff;
  font-weight: 700;
  font-size: 10.5px;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.4);
  padding: 2px 7px;
}

.approach-cone-tooltip::before {
  border-top-color: #0284c7;
}

@media (max-width: 1050px) {
  .stats-content-grid {
    grid-template-columns: 1fr;
  }
}
