/* Planevision Systems MLAT Network viewer: theme tokens + top tab bar (shared by map.html and dashboard.html) */
:root, :root[data-theme="light"] {
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #f0f3f7; --text: #1b2430; --muted: #5f6b7a;
  --border: #dce2ea; --accent: #2f6fed; --ok: #1f9d55; --warn: #c98a04; --bad: #d64545;
  --ok-bg: rgba(31,157,85,.12); --warn-bg: rgba(201,138,4,.14); --bad-bg: rgba(214,69,69,.13);
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1319; --panel: #161d26; --panel-2: #1c2531; --text: #e4eaf1; --muted: #8d99a8;
  --border: #283340; --accent: #5b9bff; --ok: #3fb950; --warn: #e3b341; --bad: #f85149;
  --ok-bg: rgba(63,185,80,.14); --warn-bg: rgba(227,179,65,.14); --bad-bg: rgba(248,81,73,.15);
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  color-scheme: dark;
}

#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 20000;
  display: flex; align-items: center; gap: 18px; padding: 0 14px;
  background: var(--panel); color: var(--text); border-bottom: 1px solid var(--border);
  font: 14px/1.2 "Segoe UI", system-ui, -apple-system, sans-serif; box-shadow: var(--shadow);
}
#topbar .tb-brand { font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
#topbar .tb-brand span { color: var(--accent); font-weight: 700; letter-spacing: .5px; }
#topbar .tb-brand span:empty { display: none; }
#topbar .tb-tabs { display: flex; gap: 4px; height: 100%; }
#topbar .tb-tab {
  display: flex; align-items: center; padding: 0 14px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; font-weight: 500;
}
#topbar .tb-tab:hover { color: var(--text); }
#topbar .tb-tab.active { color: var(--text); border-bottom-color: var(--accent); }
#topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
#topbar .tb-age { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.amber { color: var(--warn); background: var(--warn-bg); }
.pill.red { color: var(--bad); background: var(--bad-bg); }
.pill.muted { color: var(--muted); background: var(--panel-2); }
#topbar .tb-theme {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
#topbar .tb-theme svg { width: 16px; height: 16px; }
