:root {
  --bg: #0b0f14;
  --panel: rgba(14, 19, 26, 0.92);
  --line: rgba(255, 255, 255, 0.10);
  --txt: #e7ecf2;
  --mut: #8a97a6;
  --orange: #ff7a18;
  --orange-2: #ff9a4d;
  --accent: #2fd4c4;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--txt);
  font: 14px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }

#cesium { position: fixed; inset: 0; }
.hidden { display: none !important; }

/* Top bar */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(8,11,15,.96), rgba(8,11,15,.72) 70%, transparent);
  backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; white-space: nowrap; }
.brand b { color: var(--orange); font-weight: 700; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.brand .tag { font-size: 11px; color: var(--mut); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

#search { display: flex; flex: 1; max-width: 460px; gap: 6px; }
#search input { flex: 1; height: 34px; padding: 0 12px; color: var(--txt);
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 8px; }
#search input:focus { outline: none; border-color: var(--orange); }
#search button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--orange); color: #111; font-weight: 700; }

.modes { display: flex; gap: 6px; margin-left: auto; }
.mode { height: 34px; padding: 0 14px; cursor: pointer; color: var(--txt);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 8px; }
.mode.active { background: var(--orange); color: #111; border-color: var(--orange); font-weight: 700; }

/* Panels */
.panel {
  position: fixed; top: 72px; left: 16px; width: 330px; max-height: calc(100vh - 110px);
  overflow: auto; z-index: 15; padding: 16px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.panel h2 { margin: 0 0 4px; font-size: 16px; }
.hint { color: var(--mut); margin: 0 0 10px; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.row > span:first-child { color: var(--mut); }
.row span:last-child { display: flex; align-items: center; gap: 8px; }
input[type=range] { width: 120px; accent-color: var(--orange); }

.stats { display: flex; gap: 8px; margin: 4px 0 2px; }
.stat { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.stat em { display: block; font-style: normal; font-size: 20px; font-weight: 800; color: var(--accent); }
.stat span { font-size: 11px; color: var(--mut); }

#skyplot { width: 100%; height: auto; margin-top: 6px; border-radius: 10px;
  background: radial-gradient(circle at 50% 50%, #0e1a24, #0a0f14); }

.note { font-size: 11px; color: var(--mut); margin: 8px 0 0; }

/* time + constellations + legend (GNSS) */
input[type=datetime-local] { background: rgba(255,255,255,.06); color: var(--txt);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; }
.timebar { display: flex; gap: 6px; }
.timebar button, .timebar select { height: 30px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); padding: 0 10px; }
.timebar .primary { background: var(--accent); color: #062; border-color: var(--accent); font-weight: 700; flex: 1; }
.timebar select { padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; }
.chips label { display: flex; align-items: center; gap: 5px; color: var(--mut); cursor: pointer; }
.chips input { accent-color: var(--orange); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--mut); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend .sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend .los { background: #39d98a; }
.legend .nlos { background: #ff5a5a; }
.legend .masked { background: #6b7684; }
.btns { display: flex; gap: 8px; }
.btns button { flex: 1; height: 36px; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); }
.btns .primary { background: var(--accent); color: #062; border-color: var(--accent); font-weight: 700; }

/* Banners / status */
.banner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 18;
  background: #3a2a0c; color: #ffcf8a; border: 1px solid #6b4e14;
  padding: 8px 14px; border-radius: 10px; font-size: 13px; }
.banner code { color: #ffe3b0; }
#statusbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; height: 28px;
  display: flex; align-items: center; padding: 0 14px; font-size: 12px; color: var(--mut);
  background: linear-gradient(0deg, rgba(8,11,15,.92), transparent); }

@media (max-width: 680px) {
  .panel { left: 8px; right: 8px; width: auto; top: 64px; }
  .brand .tag { display: none; }
}
