/* ubersdr_doppler — web UI styles */

/* REF badge */
.ref-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--yellow);
  color: #000;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.05em;
}

/* Reference quality banner */
.ref-banner {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.ref-banner.hidden { display: none; }
.ref-banner.banner-none    { background: rgba(248,81,73,0.1);  border-color: var(--red);    color: var(--red); }
.ref-banner.banner-gpsdo   { background: rgba(63,185,80,0.1);  border-color: var(--green);  color: var(--green); }
.ref-banner.banner-refstat { background: rgba(88,166,255,0.1); border-color: var(--accent); color: var(--accent); }


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #30363d;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --accent:   #58a6ff;
  --green:    #3fb950;
  --red:      #f85149;
  --yellow:   #d29922;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left h1 { font-size: 1.3rem; font-weight: 600; }
.header-left .subtitle { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

/* SDR info badge — shows "M9PSY | 📍 IO86ha" from /api/description */
.sdr-info-badge {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  margin-right: 10px;
  white-space: nowrap;
}
.sdr-info-badge .sdr-callsign {
  color: var(--accent);
  font-weight: 600;
}
.sdr-info-badge .sdr-info-sep {
  color: var(--border);
  margin: 0 5px;
}
.sdr-info-badge .sdr-grid {
  color: var(--green);
  font-weight: 600;
}

/* Receiver identity fieldset (read-only, auto-populated from UberSDR) */
.receiver-info-fieldset {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px 14px;
  margin-bottom: 18px;
}
.receiver-info-fieldset legend {
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.receiver-info-fieldset input[disabled] {
  background: var(--bg);
  color: var(--muted);
  cursor: default;
  border-color: var(--border);
  opacity: 1;
}

/* Connection badge */
.conn-badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.conn-connected    { color: var(--green);  border-color: var(--green);  background: rgba(63,185,80,0.1); }
.conn-connecting   { color: var(--yellow); border-color: var(--yellow); background: rgba(210,153,34,0.1); }
.conn-disconnected { color: var(--red);    border-color: var(--red);    background: rgba(248,81,73,0.1); }

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
section h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }

/* Status table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
/* State column — fixed width so label changes don't reflow the table */
td.col-state, th.col-state { min-width: 110px; width: 110px; }
th { color: var(--muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { font-variant-numeric: tabular-nums; }
.loading { color: var(--muted); text-align: center; padding: 24px; }

.station-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.doppler-pos  { color: var(--red);   font-weight: 600; }
.doppler-neg  { color: var(--red);   font-weight: 600; }
.doppler-zero { color: var(--green); font-weight: 600; }
.invalid      { color: var(--muted); font-style: italic; }

.state-excellent { color: #58ffb0; font-weight: 600; }          /* bright cyan-green  ≥50 dB */
.state-verygood  { color: var(--green); font-weight: 600; }     /* green              ≥45 dB */
.state-ok        { color: #8bc34a; }                            /* yellow-green       ≥40 dB */
.state-fair      { color: var(--yellow); }                      /* amber              ≥35 dB */
.state-poor      { color: #e07b39; }                            /* orange             ≥30 dB */
.state-weak      { color: var(--yellow); }                      /* kept for compat    (unused) */
.state-nosig     { color: var(--red); font-weight: 600; }
.state-stale     { color: var(--yellow); font-weight: 600; }

/* Row-level signal-loss and staleness highlights */
tr.row-nosig td  { background: rgba(248,81,73,0.06); }
tr.row-stale td  { background: rgba(210,153,34,0.08); }

/* Stale timestamp badge */
.stale-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(210,153,34,0.18);
  color: var(--yellow);
  border: 1px solid var(--yellow);
  vertical-align: middle;
  margin-left: 5px;
  letter-spacing: 0.03em;
}

/* Per-station backend connection dot in the Station column */
.backend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}
.backend-dot-excellent { background: #58ffb0; }
.backend-dot-verygood  { background: var(--green); }
.backend-dot-ok        { background: #8bc34a; }
.backend-dot-fair      { background: var(--yellow); }
.backend-dot-poor      { background: #e07b39; }
.backend-dot-nosig     { background: var(--red); }
.backend-dot-stale     { background: var(--yellow); }

/* Charts */
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.chart-header h2 { margin-bottom: 0; }
.chart-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chart-controls select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; }
.chart-container { position: relative; height: 300px; }
.snr-chart-container { height: 140px; margin-top: 8px; }
.chart-hint { color: var(--muted); font-size: 0.78rem; margin-top: 8px; }

/* Station management */
#station-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.station-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px;
}
.station-card .station-info { display: flex; flex-direction: column; gap: 2px; }
.station-card .station-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.station-card .station-meta { color: var(--muted); font-size: 0.8rem; }
.station-card .station-actions { display: flex; gap: 8px; }
.station-disabled { opacity: 0.5; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px; border: 1px solid transparent;
  font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.82; }
.btn-primary   { background: var(--accent); color: #000; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-danger    { background: transparent; color: var(--red); border-color: var(--red); }
.btn-sm        { padding: 3px 10px; font-size: 0.78rem; }
.btn-mode      { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-mode.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.audio-mode-toggle { display:flex; gap:4px; align-items:center; }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; width: 100%; max-width: 500px;
}
.modal-box h3 { margin-bottom: 20px; font-size: 1rem; }

.form-row { display: flex; gap: 16px; margin-bottom: 14px; }
.form-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.form-row input[type="text"],
.form-row input[type="number"] {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px 10px; font-size: 0.9rem; width: 100%;
}
.field-hint { font-size: 0.72rem; color: var(--muted); }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text) !important; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Password show/hide toggle */
.password-input-wrap { position: relative; display: flex; align-items: center; }
.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
  flex: 1; padding-right: 38px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px 38px 6px 10px; font-size: 0.9rem; width: 100%;
}
.btn-pw-toggle {
  position: absolute; right: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
  transition: color 0.15s;
}
.btn-pw-toggle:hover { color: var(--text); }

/* Download */
.download-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.download-controls label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.download-controls select,
.download-controls input[type="date"] {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 8px;
}
.hint { color: var(--muted); font-size: 0.8rem; }
.hint code { background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; font-size: 0.75rem; }

/* ── Audio analysis modal ─────────────────────────────────────────────────── */
.audio-modal-box {
  max-width: 1200px !important;
  width: 96vw !important;
}
.audio-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.audio-modal-header h3 { margin-bottom: 4px; }
.audio-modal-subtitle {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}
.audio-status-bar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  min-height: 30px;
}
.audio-status-connecting { color: var(--yellow); }
.audio-status-live       { color: var(--green);  }
.audio-status-error      { color: var(--red);    }

/* Side-by-side panels row */
.audio-panels-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}
.audio-panel-fft {
  flex: 3;   /* FFT gets ~60% width */
  min-width: 0;
}
.audio-panel-history {
  flex: 2;   /* history gets ~40% width */
  min-width: 0;
}

.audio-panel {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}
/* Panels inside the row share the row's bottom margin — remove their own */
.audio-panels-row > .audio-panel {
  margin-bottom: 0;
}
/* Canvas that stretches to fill its panel vertically */
.audio-canvas-fill {
  flex: 1;
  min-height: 180px;
}
.audio-panel-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.audio-panel-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}
.audio-panel-toggles {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}
.audio-canvas {
  width: 100%;
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: crosshair;
}

/* ── Propagation Map ────────────────────────────────────────────────────── */
#map-section {
  margin-bottom: 24px;
}

#doppler-map {
  height: 420px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0a0e1a;
}

/* Leaflet popup — dark theme */
.leaflet-popup-content-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  color: var(--text);
  padding: 0;
}
.leaflet-popup-content {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}
.leaflet-popup-tip {
  background: var(--surface);
}
.leaflet-popup-close-button {
  color: var(--muted) !important;
  font-size: 16px !important;
  top: 6px !important;
  right: 8px !important;
}
.leaflet-popup-close-button:hover {
  color: var(--text) !important;
}

/* Popup content layout */
.map-popup {
  padding: 10px 14px 10px 12px;
  min-width: 180px;
}
.map-popup-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.map-popup-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  color: var(--muted);
}
.map-popup-label {
  flex-shrink: 0;
}

/* Map legend */
.map-legend {
  background: rgba(22, 27, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.8;
  backdrop-filter: blur(4px);
}
.map-legend-title {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.map-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.map-legend-row svg {
  flex-shrink: 0;
}

/* UTC clock control */
.map-clock {
  background: rgba(22, 27, 34, 0.88);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-family: monospace;
  color: var(--accent);
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

/* Leaflet attribution — dim to match dark theme */
.leaflet-control-attribution {
  background: rgba(13, 17, 23, 0.75) !important;
  color: var(--muted) !important;
  font-size: 0.68rem !important;
}
.leaflet-control-attribution a {
  color: var(--accent) !important;
}

/* Frequency readout control */
.map-freq-readout {
  background: rgba(22, 27, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 0.78rem;
  color: var(--text);
  min-width: 200px;
  backdrop-filter: blur(4px);
}
.map-freq-title {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.map-freq-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  line-height: 1.5;
}
.map-freq-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-freq-label {
  color: var(--muted);
  flex: 1;
  white-space: nowrap;
}
.map-freq-value {
  font-family: monospace;
  color: var(--text);
  white-space: nowrap;
}
.map-freq-doppler {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
}

/* Station visibility toggle control */
.map-station-toggles {
  background: rgba(22, 27, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 0.78rem;
  color: var(--text);
  min-width: 120px;
  backdrop-filter: blur(4px);
}
.map-toggle-title {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.map-toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}
.map-toggle-row input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.map-toggle-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-toggle-label {
  color: var(--text);
  white-space: nowrap;
}

/* Leaflet zoom buttons — dark theme */
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--border) !important;
}

/* ── Chart zoom / pan ──────────────────────────────────────────────────── */
/* Crosshair cursor on all history chart canvases */
#doppler-chart, #snr-chart, #power-chart {
  cursor: crosshair;
}
/* Drag-selection box drawn over the chart while the user is selecting a range */
#chart-sel-box {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.55);
  box-sizing: border-box;
}

/* ── Collapsible section toggle ─────────────────────────────────────────── */
.collapsible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
}
.collapsible-toggle:hover { opacity: 0.8; }
.collapsible-title { flex: 1; text-align: left; }
.collapsible-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  color: var(--muted);
}
.collapsible-toggle[aria-expanded="true"] .collapsible-chevron {
  transform: rotate(90deg);
}
.collapsible-body {
  margin-top: 18px;
}
.collapsible-body[hidden] { display: none; }

/* ── API Reference section ──────────────────────────────────────────────── */
.api-intro {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
  line-height: 1.6;
}
.api-intro code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.78rem;
}
.api-group {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}
.api-group:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.api-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.api-group-title code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.8rem;
  color: var(--accent);
}
.api-desc {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 10px;
  line-height: 1.6;
}
.api-desc code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.78rem;
  color: var(--text);
}
.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 10px;
  min-width: 0;
}
.api-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.api-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(48,54,61,0.5);
  vertical-align: top;
  color: var(--text);
  font-variant-numeric: normal;
  white-space: normal;
}
.api-table td code,
.api-table th code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: normal;
  word-break: break-all;
}
/* curl example cells should wrap rather than overflow the table */
.api-table td:last-child code {
  color: var(--green);
  word-break: break-all;
}
.api-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  overflow-x: auto;
}
.api-example code {
  color: var(--green);
  white-space: pre-wrap;
  word-break: break-all;
}
.api-notes {
  list-style: disc;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.7;
}
.api-notes code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.75rem;
  color: var(--text);
}

/* ── FTP test log panel ──────────────────────────────────────────────────── */
#ftp-test-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
#ftp-test-panel h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
#ftp-test-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}
.ftp-log-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 4px;
}
.ftp-log-icon {
  font-style: normal;
  font-weight: 700;
  text-align: center;
}
.ftp-log-step {
  font-weight: 500;
}
.ftp-log-msg {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
  word-break: break-all;
}
.ftp-log-ok   { background: rgba(63,185,80,0.08);  color: var(--green); }
.ftp-log-ok   .ftp-log-icon { color: var(--green); }
.ftp-log-err  { background: rgba(248,81,73,0.08);  color: var(--red);   }
.ftp-log-err  .ftp-log-icon { color: var(--red);   }
.ftp-log-skip { background: rgba(139,148,158,0.08); color: var(--muted); }
.ftp-log-skip .ftp-log-icon { color: var(--muted); }
.ftp-log-running { background: rgba(88,166,255,0.06); color: var(--muted); }
.ftp-log-summary {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.82rem;
}
.ftp-log-summary.ftp-log-ok  { background: rgba(63,185,80,0.12);  color: var(--green); }
.ftp-log-summary.ftp-log-err { background: rgba(248,81,73,0.12);  color: var(--red);   }

/* ---------------------------------------------------------------------------
 * Propagation metrics sub-row
 * Appears immediately below each station's main status row when
 * doppler_spread_hz, scintillation_s4, or multipath_index are available.
 * --------------------------------------------------------------------------- */
.prop-metrics-row {
  background: transparent;
}
.prop-metrics-cell {
  padding: 2px 8px 6px 8px !important;
  border-top: none !important;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
/* Each metric chip: label + value side by side */
.prop-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-right: 18px;
  cursor: default;
}
.prop-label {
  font-size: 0.70rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6e7681;
  border-bottom: 1px dotted #6e7681;
}
.prop-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text);
}
