/* DroneX -- calm, Linear/Vercel-style mission control over a dark map.
   Palette: near-black chrome, muted indigo accent for primary actions,
   quiet greys for everything else. Inter for UI/numbers, IBM Plex Mono
   reserved for coordinates/callsigns/telemetry values only. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0c0c0d;
  --panel: #111113;
  --panel-solid: #131316;
  --panel-raised: rgba(255,255,255,0.03);
  --surface-ghost: rgba(255,255,255,0.015);
  --surface-2: rgba(255,255,255,0.025);
  --surface-1: #141417;
  --surface-primary: #1a1a1f;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.10);
  --line-bright: rgba(255,255,255,0.12);
  --line-hover: rgba(255,255,255,0.18);
  /* muted indigo accent -- reserved for primary actions + active states */
  --accent: #5e6ad2;
  --accent-hover: #6e79e0;
  --accent-soft: rgba(94,106,210,0.16);
  --accent-2: #57d38c;
  --accent-dim: #6b6975;
  --text: #eeeeef;
  --text-2: #8a8a8f;
  --text-dim: #5a5a5e;
  --red: #ff6b81;
  --amber: #f6a94a;
  --green: #57d38c;
  --blue: #6cc6ff;
  --font-ui: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 10px;
  --radius-sm: 7px;
  /* 8px spacing scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-3: 0 18px 44px rgba(0,0,0,0.5);
  --ease: cubic-bezier(.2,.8,.3,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); }
button, .side-icon, .mission-card, input, .map-tool-btn, .d-close, .template-item, .new-mission-btn, .metric, .ostep {
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .18s var(--ease), transform .16s var(--ease);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.list-col, .detail-col { scrollbar-width: thin; scrollbar-color: var(--line-bright) transparent; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { 0% { opacity: 0; transform: translateY(-14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes soft-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- sidebar ---------------- */
.sidebar {
  position: fixed;
  top: 16px; left: 16px; bottom: 16px;
  width: 52px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 10px;
  z-index: 1000;
}
.side-logo { margin-bottom: 8px; }
.side-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text-2);
}
.side-icon { position: relative; }
.side-icon:hover { background: var(--panel-raised); color: var(--text); }
.side-icon.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(94,106,210,0.3); }
.side-icon::after {
  content: attr(title);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) scale(0.95);
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-bright);
  padding: 5px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease; z-index: 1200;
}
.side-icon:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }
.side-spacer { flex: 1; }
.side-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3d4a, #23252e);
  border: 1px solid var(--line-bright);
  margin-top: 6px;
}

/* ---------------- global topbar ---------------- */
.topbar-global {
  position: fixed;
  top: 16px; left: 84px; right: 16px;
  height: 52px;
  background: var(--surface-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 9px;
  padding: 0 18px;
  z-index: 900;
}
.tb-left { display: flex; align-items: baseline; gap: 9px; }
.tb-brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; letter-spacing: -0.01em; color: var(--text); }
.tb-brand svg { flex: none; }
.tb-name { color: var(--text); }
.tb-sub { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.tb-mission { color: var(--text-dim); }
.tb-meta { font-size: 13px; color: var(--text-2); }
.tb-sep { width: 1px; height: 14px; background: var(--line-bright); }
/* right-aligned status cluster, quiet (no pill) */
.tb-status-cluster { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-2); }
.tb-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.tb-pill .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.tb-pill.ok { color: var(--text-2); }
.tb-clock { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(94,106,210,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(94,106,210,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,106,210,0); }
}
@media (max-width: 640px) {
  .tb-tag { display: none; }
}

/* ---------------- toast stack ---------------- */
.toast-stack {
  position: fixed; top: 84px; right: 18px; z-index: 3000;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--panel-solid); border: 1px solid var(--line-bright);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  font-size: 13px; line-height: 1.45; color: var(--text);
  animation: toast-in .25s cubic-bezier(.2,.9,.3,1);
}
.toast.leaving { animation: toast-out .2s ease forwards; }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.toast.success { border-color: rgba(87,211,140,0.5); }
.toast.success .t-dot { background: var(--green); }
.toast.error { border-color: rgba(255,107,129,0.5); }
.toast.error .t-dot { background: var(--red); }
.toast.info .t-dot { background: var(--amber); }
.toast .t-msg { flex: 1; }
.toast .t-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; }
.toast .t-close:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------------- shared bits ---------------- */
.fade-in { animation: fade-in .3s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, #1a1922 25%, #25242e 50%, #1a1922 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.aqi-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.aqi-pill .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------------- top toolbar ---------------- */
.topbar {
  position: fixed;
  top: 16px; left: 88px; right: 16px;
  height: 56px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  z-index: 900;
}
.topbar .fill { flex: 1; }
.tb-icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--text-dim);
  cursor: pointer;
}
.tb-icon-btn:hover { color: var(--text); border-color: var(--line-bright); }
.tb-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.tb-toggle .dot {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--line-bright);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.tb-toggle .dot svg { opacity: 0; }
.tb-toggle.active .dot { background: var(--accent); border-color: var(--accent); }
.tb-toggle.active .dot svg { opacity: 1; }
.tb-toggle.active { color: var(--text); }
.tb-input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 6px 6px 16px;
  flex: 1;
  max-width: 480px;
}
.tb-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
}
.tb-input-wrap input::placeholder { color: var(--text-dim); }
.btn-accent {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent);
  color: #0a0a0d;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-accent:hover { background: #dedce2; }
.btn-accent:disabled { background: var(--accent-dim); color: rgba(255,255,255,0.7); cursor: wait; }
.tb-badge {
  background: var(--panel-solid);
  border: 1px solid var(--line-bright);
  border-radius: 20px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
}
.tb-badge.live { background: rgba(87,211,140,0.15); border-color: rgba(87,211,140,0.5); color: var(--green); }
.tb-badge.waiting { background: rgba(246,169,74,0.12); border-color: rgba(246,169,74,0.4); color: var(--amber); }

/* ---------------- map + floating cards ---------------- */
.map-stage { position: fixed; inset: 0; z-index: 0; }
#map { width: 100%; height: 100%; background: #111; }

.card-stack {
  position: fixed;
  top: 88px; left: 88px;
  width: 320px;
  bottom: 16px;
  overflow-y: auto;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}
.card-stack::-webkit-scrollbar { width: 4px; }
.card-stack::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 4px; }

.glass-card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  flex-shrink: 0;
  animation: fade-in .3s ease both;
}
.glass-card .card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-dim);
}
.glass-card .card-head .title { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.glass-card .card-head .date-pill {
  background: var(--panel-raised); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px 10px; font-size: 11px;
}

.big-number { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.big-number .decimal { color: var(--text-dim); font-size: 20px; }
.delta-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  padding: 3px 7px;
  margin-left: 8px;
}
.delta-pill.bad { background: rgba(255,107,107,0.15); color: var(--red); }
.range-pill {
  background: var(--panel-raised); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 8px; font-size: 11px; color: var(--text-dim);
}

.bars {
  display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 14px 0 6px;
  position: relative;
}
.bars .bar { flex: 1; background: var(--panel-raised); border-radius: 2px; min-height: 3px; }
.bars .bar.hi { background: var(--accent); }
.bars .empty-note {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 11px; color: var(--text-dim);
  border: 1px dashed var(--line); border-radius: 10px;
}
.axis-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-cell {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.stat-cell .k { font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }
.stat-cell .v { font-size: 20px; font-weight: 700; }
.stat-cell .spark { height: 20px; margin-top: 4px; }

/* -- dashboard spark bars -- */
.spark-row { display: flex; flex-direction: column; gap: 14px; }
.spark-block { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; }
.spark-k { font-size: 12px; color: var(--text-dim); }
.spark-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.spark-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .6s cubic-bezier(.2,.9,.3,1); }
.spark-fill.alt { background: #6cc6ff; }
.spark-v { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }


.perf-chart-wrap { height: 90px; margin-top: 8px; }
.perf-top { display: flex; justify-content: space-between; align-items: baseline; }
.perf-top .pct { font-family: var(--font-mono); font-size: 12px; background: var(--text); color: #0a0a0a; padding: 2px 7px; border-radius: 8px; }

/* target/selection popup card (like the AB-564813 card) */
.map-popup-card {
  position: fixed;
  z-index: 850;
  width: 300px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.map-popup-card .mp-head { display: flex; align-items: center; justify-content: space-between; }
.mp-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.mp-sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.mp-ring {
  --pct: 0; width: 46px; height: 46px; border-radius: 50%;
  background: var(--panel-raised);
  border: 3px solid var(--ring-color, var(--accent));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mp-ring::after { content:''; position:absolute; }
.mp-ring-inner {
  width: 36px; height: 36px; border-radius: 50%; background: var(--panel-solid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}

.live-card {
  position: fixed;
  z-index: 850;
  width: 300px;
}
.live-card .lc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 10px;
  font-size: 12px;
}
.live-card .lc-head .lbl { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.live-card .lc-head .track { color: var(--text-dim); }
.live-thumb {
  height: 150px;
  border-radius: 14px;
  background: var(--panel-solid);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.live-thumb .telemetry-readout {
  font-family: var(--font-mono);
  text-align: center;
}
.live-thumb .telemetry-readout .v { font-size: 26px; color: var(--accent); font-weight: 600; }
.live-thumb .telemetry-readout .k { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.more-info-btn {
  width: 100%; margin-top: 10px;
  background: var(--panel-raised); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 10px; font-size: 13px; cursor: pointer;
}
.more-info-btn:hover { border-color: var(--line-bright); }

/* map marker badges */
.aqi-marker {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel-solid);
  border: 2px solid var(--marker-color, var(--text-dim));
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.aqi-marker.chosen { background: var(--accent); border-color: var(--accent); }
.cluster-marker {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(30,30,30,0.85);
  border: 1px solid var(--line-bright);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* ---------------- generic content panel (history page etc) ---------------- */
.content-page { position: fixed; top: 88px; left: 88px; right: 16px; bottom: 16px; overflow-y: auto; z-index: 800; }
.page-panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.page-panel h1 { font-size: 18px; margin: 0 0 4px; }
.page-panel p.dim { color: var(--text-dim); font-size: 13px; margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 500; text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; }
tr.chosen td:first-child { border-left: 2px solid var(--accent); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(111,207,125,0.15); color: var(--green); }
.badge.warn { background: rgba(255,182,72,0.15); color: var(--amber); }
.badge.bad { background: rgba(255,107,107,0.15); color: var(--red); }

/* -- log summary -- */
.log-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 20px; }
.sum-cell { background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.sum-cell .k { font-size: 11px; color: var(--text-dim); margin-bottom: 5px; }
.sum-cell .v { font-size: 22px; font-weight: 700; }

/* -- expandable log rows -- */
.log-row { cursor: pointer; transition: background .12s ease; animation: fade-in .3s ease both; }
.log-row:hover { background: var(--panel-raised); }
.log-row.open { background: var(--panel-raised); }
.row-caret { display: inline-block; color: var(--text-dim); transition: transform .18s ease; }
.log-row.open .row-caret { transform: rotate(90deg); color: var(--text); }
.row-del { background: none; border: 1px solid var(--line); color: var(--text-dim); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; }
.row-del:hover { border-color: var(--red); color: var(--red); }
.log-detail td { background: rgba(255,255,255,0.02); padding: 0; }
.log-detail-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 16px 22px; }
.log-detail-inner .d-k { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.log-detail-inner span:not(.d-k) { font-size: 13px; }

.alert { border-left: 3px solid var(--amber); background: rgba(255,182,72,0.08); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: 13px; margin-bottom: 12px; }
.alert.bad { border-color: var(--red); background: rgba(255,107,107,0.08); }

.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

.dim { color: var(--text-dim); }
.mono { font-family: var(--font-mono); }

.leaflet-container { background: #0a0a0a; }
.leaflet-control-attribution { background: rgba(10,10,10,0.7) !important; color: var(--text-dim) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.leaflet-control-zoom a {
  background: var(--panel-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}
.leaflet-control-zoom a:hover { background: var(--panel-raised) !important; }
.leaflet-popup-content-wrapper {
  background: var(--panel-solid) !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  border: 1px solid var(--line);
}
.leaflet-popup-tip { background: var(--panel-solid) !important; }

/* =================================================================
   Planning page (three-column: mission list / detail / live map)
   ================================================================= */
.plan-shell {
  position: fixed;
  top: 100px; left: 88px; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 10;
}

.btn-secondary {
  background: var(--panel-solid); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--line-bright); background: var(--panel-raised); }
.btn-secondary:active { transform: scale(0.98); }

.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -- toolbar: single panel wrapping fields + stepper -- */
.plan-toolbar {
  display: flex; flex-direction: column; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
}
.pt-fields {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
}
.plan-progress {
  display: none; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 18px; border-top: 1px solid var(--line); font-size: 12px;
  background: rgba(255,255,255,0.015);
}
.plan-progress.show { display: flex; }

.pt-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.pt-label { font-size: 11px; color: var(--text-dim); font-weight: 500; letter-spacing: 0.02em; }
.pt-search {
  display: flex; align-items: center; gap: 10px; height: 34px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 0 10px 0 12px; width: 200px;
  transition: border-color .16s var(--ease);
}
.pt-search:focus-within { border-color: var(--line-hover); }
.pt-search svg { color: var(--text-2); flex-shrink: 0; }
.pt-search select {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font-ui); font-size: 13px;
  appearance: none; -webkit-appearance: none; color-scheme: dark; cursor: pointer;
}
.pt-range-wrap {
  position: relative; display: flex; align-items: center;
}
.pt-range {
  width: 76px; height: 34px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 7px;
  color: var(--text); padding: 0 30px 0 10px; font-size: 12.5px; font-family: var(--font-ui);
  transition: border-color .16s var(--ease);
}
.pt-range:focus { outline: none; border-color: var(--line-hover); }
.pt-unit {
  position: absolute; right: 10px; color: var(--text-dim); font-size: 11.5px; pointer-events: none;
  font-family: var(--font-mono);
}

.btn-plan-cta {
  background: var(--accent); color: #fff; border: none; border-radius: 7px;
  padding: 0 14px; font-weight: 560; font-size: 12.5px; cursor: pointer; height: 34px;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .16s var(--ease), background .16s var(--ease), opacity .16s var(--ease);
}
.btn-plan-cta:hover { background: var(--accent-hover); }
.btn-plan-cta:active { transform: translateY(1px); }
/* disabled until a location is chosen (step 1 incomplete) */
.btn-plan-cta.disabled {
  background: var(--panel-solid); color: var(--text-dim);
  border: 1px solid var(--line-2); cursor: not-allowed; opacity: 1;
}
.btn-plan-cta.disabled:hover { background: var(--panel-solid); }
.btn-plan-cta.disabled:active { transform: none; }
.btn-plan-cta.disabled .cta-kbd { background: rgba(255,255,255,0.08); }
.cta-kbd {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,0.18); border-radius: 6px; padding: 2px 6px; line-height: 1;
}

.pt-status { margin-left: auto; }
.metric-cards { display: flex; align-items: center; gap: 18px; }
/* metrics = ghost tier: minimal weight, they are reference info */
.metric {
  display: flex; align-items: baseline; gap: 5px;
  background: transparent; border: none; padding: 0; font-size: 12px;
}
.metric .m-ico { display: none; }
.metric .m-v { font-size: 12px; font-weight: 590; font-family: var(--font-mono); color: var(--text); }
.metric .m-k { font-size: 12px; color: var(--text-dim); text-transform: lowercase; }

.plan-body { flex: 1; display: flex; gap: 16px; min-height: 0; }

/* -- list column -- */
.list-col { width: 230px; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding-right: 4px; }
.list-col::-webkit-scrollbar { width: 4px; }
.list-col::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 4px; }

/* New Mission = the single primary action in the sidebar */
.new-mission-btn {
  background: var(--accent); border: none; border-radius: 7px;
  color: #fff; padding: 9px; font-weight: 560; font-size: 12.5px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.new-mission-btn:hover { background: var(--accent-hover); }
.new-mission-btn:active { transform: scale(0.99); }

.pt-section-title { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: none; letter-spacing: 0; margin: 0 0 8px; }
.list-divider { height: 1px; background: var(--line); margin: 0; }
/* templates = ghost tier: flat, quiet until interacted with */
.template-list { display: flex; flex-direction: column; gap: 1px; }
.template-item {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2);
  background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 7px 8px; cursor: pointer;
}
.template-item .tpl-ico { color: var(--text-dim); width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.template-item .tpl-name { flex: 1; }
.template-item:hover { border-color: transparent; background: var(--panel-raised); color: var(--text); }
.template-item:hover .tpl-ico { color: var(--text-2); }
.template-item input { accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; opacity: 0; transition: opacity .16s var(--ease); }
.template-item:hover input, .template-item input:checked { opacity: 1; }

#missionCards { display: flex; flex-direction: column; gap: 8px; }

/* mission card = secondary tier: flat surface, quiet border */
.mission-card {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; flex-shrink: 0; overflow: hidden;
  border-left: 2px solid transparent; transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease), box-shadow .18s var(--ease);
  animation: fade-in .25s var(--ease) both;
}
.mission-card:hover { border-color: var(--line-hover); background: var(--surface-1); }
.mission-card.selected { border-color: var(--accent); border-left-color: var(--accent); background: var(--surface-primary); box-shadow: 0 0 0 1px var(--accent-soft); }
.mission-card.status-awaiting { border-left-color: rgba(246,169,74,0.5); }
.mission-card.status-transit { border-left-color: rgba(108,198,255,0.5); }
.mission-card.status-complete { border-left-color: rgba(87,211,140,0.5); }
.mission-card.selected.status-awaiting, .mission-card.selected.status-transit, .mission-card.selected.status-complete { border-left-color: var(--accent); }
.mission-card .mc-thumb { height: 46px; display: flex; align-items: center; justify-content: flex-end; padding: 0 16px; }
.mission-card .mc-thumb-aqi { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--text); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.mission-card .mc-body { padding: 12px 16px 14px; }
.mission-card .mc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.mission-card .mc-title { font-weight: 600; font-size: 13.5px; }
.mission-card .mc-loc { font-size: 12.5px; color: var(--text-dim); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-card .mc-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 11.5px; color: var(--text-dim); }
.mission-card .mc-meta span { font-family: var(--font-mono); }
.mission-card .mc-actions { margin-top: 12px; }
.mission-card .mc-resume {
  background: var(--panel-raised); border: 1px solid var(--line-2); color: var(--text-2);
  border-radius: 9px; padding: 7px 13px; font-size: 12px; font-weight: 600; cursor: pointer; width: 100%;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.mission-card .mc-resume:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.list-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: var(--text-dim); font-size: 11px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.5; }
.empty-illustration { display: none; }
.empty-title { font-weight: 560; color: var(--text-2); font-size: 12px; }
.empty-sub { font-size: 11px; max-width: 200px; }
.empty-cta {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line-2); color: var(--text);
  border-radius: 6px; padding: 5px 10px; font-size: 11.5px; font-weight: 500; cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.empty-cta:hover { border-color: var(--accent); color: var(--accent); }
.empty-sub { font-size: 12px; }

.status-pill { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 5px; display: inline-flex; align-items: center; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.status-pill.awaiting { background: rgba(246,169,74,0.12); color: var(--amber); }
.status-pill.transit { background: rgba(108,198,255,0.12); color: var(--blue); }
.status-pill.complete { background: rgba(87,211,140,0.12); color: var(--green); }
.status-pill .dot { display: none; }

/* -- detail column (hidden until selected) -- */
.detail-col { width: 340px; flex-shrink: 0; overflow-y: auto; padding-right: 4px; display: none; }
.detail-col::-webkit-scrollbar { width: 4px; }
.detail-col::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 4px; }
.detail-empty { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; text-align: center; color: var(--text-dim); }
.detail-empty {
  color: var(--text-dim); font-size: 13px; text-align: center; padding-top: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; line-height: 1.5;
}
#detailContent { animation: fadeIn .15s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.d-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.d-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.d-close {
  width: 28px; height: 28px; border-radius: 8px; background: var(--panel-raised); border: 1px solid var(--line);
  color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.d-close:hover { color: var(--text); border-color: var(--line-bright); }
.d-close:active { transform: scale(0.94); }
.d-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.d-grid-2 + .d-grid-2 { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.d-k { font-size: 11px; color: var(--text-dim); margin-bottom: 5px; }
.d-v { font-size: 14px; font-weight: 600; }
.d-v.mono { font-family: var(--font-mono); font-size: 13px; }
.d-section-title { font-size: 12px; font-weight: 600; margin: 22px 0 12px; color: var(--text-dim); }

.route-box {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.route-info { display: flex; flex-direction: column; gap: 11px; font-size: 13px; min-width: 0; }
.route-row { display: flex; align-items: center; gap: 9px; color: var(--text); }
.route-row svg { color: var(--text-dim); flex-shrink: 0; }

.addr-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.addr-row { display: flex; align-items: center; gap: 12px; font-size: 13px; padding: 7px 0; position: relative; }
.addr-row:first-child::after {
  content: ''; position: absolute; left: 3px; top: 22px; bottom: -8px; width: 1px; background: var(--line-bright);
}
.addr-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-dim); flex-shrink: 0; z-index: 1; background: var(--bg); }
.addr-dot.end { background: var(--accent); border-color: var(--accent); }

.mini-map-box { position: relative; height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.mini-map-box #miniMap { width: 100%; height: 100%; }
.mini-map-label {
  position: absolute; top: 10px; left: 10px; z-index: 400;
  background: #fff; color: #111; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-expand-btn {
  position: absolute; top: 10px; right: 10px; z-index: 400;
  width: 28px; height: 28px; border-radius: 8px; background: rgba(0,0,0,0.55);
  border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mini-expand-btn:hover { background: rgba(0,0,0,0.75); }

/* -- candidate comparison bars -- */
.candidate-bars { display: flex; flex-direction: column; gap: 10px; }
.cbar { padding: 9px 11px; border-radius: 11px; background: var(--panel-raised); border: 1px solid var(--line); }
.cbar.chosen { border-color: rgba(94,106,210,0.5); background: var(--accent-soft); }
.cbar-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.cbar-top b { font-family: var(--font-mono); }
.cbar-track { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.cbar-fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2,.9,.3,1); }
.cbar-sub { font-size: 11px; color: var(--text-dim); margin-top: 5px; }

/* -- AQI trend chart -- */
.trend-chart { margin-top: 4px; }
.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.tbar { flex: 1; border-radius: 3px 3px 0 0; min-height: 4px; transition: height .5s cubic-bezier(.2,.9,.3,1); }
.trend-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); margin-top: 5px; }

/* -- map column -- */
.map-col { flex: 1; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0b; }
.map-col.full { /* map takes all space when no mission selected */ }
.map-col.expanded ~ .list-col, .plan-body.map-focus .list-col, .plan-body.map-focus .detail-col { display: none; }
#planMap { width: 100%; height: 100%; }
/* Brighten the dark basemap so roads/landmarks read clearly */
#planMap .leaflet-tile-pane { filter: brightness(1.2) contrast(1.05) saturate(1.05); }
#map .leaflet-tile-pane { filter: brightness(1.12) contrast(1.03); }
/* Separate label layer gets a dark halo so place names stay legible over any basemap region */
#planMap .leaflet-pane.leaflet-label-pane { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.9)) drop-shadow(0 0 2px rgba(0,0,0,0.8)); }

/* faint planning grid + vignette -- makes idle map read as mission control */
.map-grid {
  position: absolute; inset: 0; z-index: 401; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9), transparent 78%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9), transparent 78%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.map-col:not(.has-mission) .map-grid { opacity: 1; }
.map-col::after {
  content: ''; position: absolute; inset: 0; z-index: 400; pointer-events: none;
  box-shadow: inset 0 0 120px rgba(0,0,0,0.45);
}
.map-compass {
  position: absolute; top: 14px; left: 14px; z-index: 460; pointer-events: none;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-1); border: 1px solid var(--line-2); border-radius: 50%;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-1);
}
.compass-n { position: absolute; top: 2px; font-size: 8px; font-weight: 700; color: var(--text-dim); }

/* ambient wind readout, top-left under compass */
.wind-readout {
  position: absolute; top: 14px; left: 62px; z-index: 460; pointer-events: none;
  display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  background: var(--surface-1); border: 1px solid var(--line-2); border-radius: 8px;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-1);
  font-size: 11px; color: var(--text-2);
}
.wind-arrow { color: var(--text-dim); transition: transform 2s var(--ease); }
.wind-val { font-family: var(--font-mono); font-weight: 600; }
.wind-dir { color: var(--text-dim); font-family: var(--font-mono); }

/* hover pin preview (ghosted) */
.pin-preview { color: rgba(94,106,210,0.5); display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }

/* no-fly zone tooltip */
.nfz-tip {
  background: var(--surface-primary) !important; color: var(--red) !important;
  border: 1px solid rgba(255,107,129,0.4) !important; border-radius: 7px !important;
  font-size: 11px !important; font-weight: 600 !important; padding: 4px 9px !important;
  box-shadow: var(--shadow-2) !important;
}
.nfz-tip::before { border-top-color: rgba(255,107,129,0.4) !important; }

/* -- step indicator (docked under toolbar, preview style) -- */
.pp-step { display: flex; align-items: center; gap: 0; font-size: 12px; font-weight: 500; color: var(--text-dim); white-space: nowrap; }
.pp-num { display: none; }
.pp-track { width: 40px; max-width: 40px; height: 1px; background: var(--line-strong); overflow: hidden; margin: 0 8px; }
.pp-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .45s var(--ease); }
.pp-step.active { color: var(--text); font-weight: 600; }
.pp-step.active .pp-label::before { content: attr(data-num) '  '; }
.pp-step.done { color: var(--text-2); }
.pp-step.done .pp-label::before { content: '✓ '; }
.pp-step.done ~ .pp-track .pp-fill,
.pp-track.done .pp-fill { width: 100%; }

/* -- lightweight coach hint, bottom of map, preview style -- */
.map-coach {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 480;
  display: none; align-items: center; gap: 8px;
  background: var(--panel); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 9px 11px; font-size: 11.5px; color: var(--text-2);
  box-shadow: var(--shadow-2);
  animation: fade-in .2s var(--ease) both;
}
.map-coach.show { display: flex; }
.coach-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(94,106,210,0.6); animation: pulse-ring 1.8s infinite; flex-shrink: 0; }
.coach-text { line-height: 1.4; }
.coach-close { width: 22px; height: 22px; border-radius: 6px; background: transparent; border: none; color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.coach-close:hover { background: var(--panel-raised); color: var(--text); }

/* dropped pin with animation */
.drop-pin { position: relative; display: flex; align-items: center; justify-content: center; color: var(--accent); animation: drop-in .35s cubic-bezier(.2,.9,.3,1) both; }
.drop-pin .drop-pulse { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(94,106,210,0.25); animation: pulse-ring 1.8s infinite; }
.drop-pin.dropped { color: var(--accent); }

/* -- restyled leaflet zoom controls -- */
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-2) !important; margin: 14px !important; }
.leaflet-control-zoom a {
  background: var(--panel) !important; color: var(--text) !important;
  border: 1px solid var(--line-2) !important; width: 26px !important; height: 24px !important;
  line-height: 22px !important; font-size: 14px !important; font-weight: 400 !important;
  transition: background .12s ease, color .12s ease !important;
}
.leaflet-control-zoom a:first-child { border-radius: 7px 7px 0 0 !important; }
.leaflet-control-zoom a:last-child { border-radius: 0 0 7px 7px !important; border-top: none !important; }
.leaflet-control-zoom a:hover { background: var(--panel-raised) !important; color: var(--text) !important; }
.leaflet-bar { border-radius: 7px !important; }

/* -- grouped map controls (bottom-right) -- */
.map-ctrl-group {
  position: absolute; z-index: 500; right: 14px; bottom: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.map-tool-btn {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-1);
}
.map-tool-btn:hover { border-color: var(--line-hover); color: var(--text); background: var(--surface-1); }

/* right-click context menu */
.map-context-menu {
  position: absolute; z-index: 900; min-width: 190px;
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--line-bright); border-radius: var(--radius-sm);
  padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,0.5);
  animation: fade-in .12s ease both;
}
.ctx-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; color: var(--text);
  font-size: 13px; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.ctx-item:hover { background: var(--panel-raised); color: var(--text); }
.ctx-item .ctx-ico { width: 16px; text-align: center; font-size: 13px; }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* drag-drop template target highlight */
#planMap.drop-target { box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 60px rgba(94,106,210,0.12); }
.template-item[draggable="true"] { cursor: grab; }
.template-item.dragging { opacity: 0.5; border-color: var(--accent); cursor: grabbing; }

/* location picker: search + recents + favorites */
.loc-picker-btn {
  margin-left: auto; width: 26px; height: 26px; border-radius: 8px;
  background: var(--panel-raised); border: 1px solid var(--line); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.loc-picker-btn:hover { border-color: var(--line-hover); color: var(--text); }
.loc-panel {
  position: absolute; z-index: 950; top: calc(100% + 6px); left: 0; width: 260px;
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--line-bright); border-radius: var(--radius-sm);
  padding: 8px; box-shadow: 0 14px 38px rgba(0,0,0,0.5);
  animation: fade-in .12s ease both;
}
.loc-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 8px; color: var(--text-dim); }
.loc-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 13px; }
.loc-body { margin-top: 6px; max-height: 280px; overflow-y: auto; }
.loc-group { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 8px 4px; }
.loc-row { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text); }
.loc-row:hover { background: var(--panel-raised); }
.loc-star { color: var(--text-dim); font-size: 14px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.loc-star.on { color: #f6c94a; }
.loc-name { flex: 1; }
.loc-tag { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.loc-empty { padding: 10px 8px; font-size: 12px; color: var(--text-dim); }

.target-float-card {
  position: absolute; z-index: 500;
  background: #fff; color: #16151c; border-radius: 12px;
  padding: 10px 16px 10px 10px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.45);
  animation: fadeIn .15s ease both;
}
.target-float-card::after {
  content: ''; position: absolute; left: 24px; bottom: -6px;
  width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 2px;
  z-index: -1;
}
.target-float-card .tfc-icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--panel-solid);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.target-float-card .tfc-title { font-weight: 600; font-size: 13px; }
.target-float-card .tfc-sub { font-size: 11px; color: #6b6577; }

.package-marker {
  width: 30px; height: 30px; border-radius: 50%;
  background: #26242e; border: 1px solid var(--line-bright);
  display: flex; align-items: center; justify-content: center; color: #cfc9db;
  position: relative; transition: transform .12s ease;
}
.package-marker:hover { transform: scale(1.12); z-index: 600; }
.package-marker::after {
  content: ''; position: absolute; bottom: -7px; width: 4px; height: 4px; border-radius: 50%;
  background: #cfc9db;
}
.package-marker.chosen { background: var(--accent); border-color: transparent; color: #0a0a0d; }
.drone-marker {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--panel-solid);
  display: flex; align-items: center; justify-content: center; color: #0a0a0d;
}
.home-marker {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel-solid); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  position: relative;
}
.home-marker::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(94,106,210,0.4);
  animation: pulse-ring 2.4s infinite;
}

/* ---------------- settings modal ---------------- */
.settings-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.settings-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
.settings-panel {
  position: relative; width: 360px; max-width: 92vw; padding: 22px;
  background: var(--panel-solid); border: 1px solid var(--line-bright); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.settings-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.settings-close { background: none; border: none; color: var(--text-dim); font-size: 24px; line-height: 1; cursor: pointer; }
.settings-close:hover { color: var(--text); }
.settings-field { display: block; margin-bottom: 14px; }
.settings-field span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.settings-field input {
  width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: #100f15; color: var(--text); font-family: var(--font-mono); font-size: 13px;
}
.settings-field input:focus { outline: none; border-color: var(--line-bright); }
.settings-note { font-size: 11px; color: var(--text-dim); margin: 4px 0 16px; line-height: 1.5; }
.settings-actions { display: flex; gap: 10px; justify-content: flex-end; }
.settings-actions .btn-secondary,
.settings-actions .btn-primary-grad { padding: 8px 16px; border-radius: 9px; cursor: pointer; font-size: 13px; border: 1px solid var(--line); }
.settings-actions .btn-secondary { background: transparent; color: var(--text); }
.settings-actions .btn-primary-grad { background: var(--accent); color: #0a0a0d; border-color: transparent; font-weight: 600; }
