:root { --green:#19e36b; --amber:#ffb020; --red:#ff3b30; --grey:#7a7a7a; --magenta:#ff36c8; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:#000; color:#dfe6ee;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow:hidden; }
#app { position:fixed; inset:0; display:flex; flex-direction:column; }
a { color:#7fb2ff; text-decoration:none; }
a:hover { text-decoration:underline; }

/* top bar */
#bar { display:flex; align-items:center; gap:10px; padding:8px 12px; font-size:13px;
  background:linear-gradient(#101417,#0a0d0f); border-bottom:1px solid #1c2227; flex:0 0 auto; }
#status { display:flex; align-items:center; gap:8px; font-weight:600; letter-spacing:.04em; }
#dot { width:11px; height:11px; border-radius:50%; background:var(--grey);
  box-shadow:0 0 8px currentColor; color:var(--grey); transition:.2s; }
#status.live #dot { background:var(--green); color:var(--green); }
#status.stale #dot { background:var(--amber); color:var(--amber); }
#status.down #dot { background:var(--red); color:var(--red); }
#sub { color:#7e8a92; font-weight:400; }
#spacer { flex:1; }
#hz { color:#7e8a92; font-variant-numeric:tabular-nums; }
button.icon { background:#161c21; color:#cdd6dd; border:1px solid #263039; border-radius:8px;
  padding:6px 12px; font:inherit; font-size:13px; cursor:pointer; }
button.icon:hover { background:#1d252c; }
button.icon:disabled { opacity:.45; cursor:default; }

/* recording name input (live bar) */
input.recname { width:130px; padding:6px 10px; background:#0b0f12; border:1px solid #263039;
  color:#e8eef3; border-radius:8px; font:inherit; font-size:13px; }
input.recname:focus { outline:none; border-color:#3d8bff; }
input.recname:disabled { opacity:.5; }

/* record button */
button.rec { display:flex; align-items:center; gap:7px; }
button.rec .rdot { width:10px; height:10px; border-radius:50%; background:#ff5a4d; }
button.rec.on { border-color:#5a2222; background:#2a1414; color:#ffd7d2; }
button.rec.on .rdot { animation:pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

/* PFD area */
#stage { flex:1; display:flex; align-items:center; justify-content:center; min-height:0; padding:6px; position:relative; }
svg#pfd { width:100%; height:100%; max-width:min(100vw, 142vh); }
svg#pfd.stale { filter:saturate(.25) brightness(.6); }

.ro { fill:#e8eef3; font-weight:700; font-variant-numeric:tabular-nums; }
.lbl { fill:#8a97a0; font-weight:600; }
.tick { stroke:#cfd8de; stroke-width:2; }
.tickf { fill:#cfd8de; font-weight:600; font-variant-numeric:tabular-nums; }

/* no-data overlay */
#nodata { position:absolute; inset:0; display:none; align-items:center; justify-content:center;
  pointer-events:none; }
#nodata.show { display:flex; }
#nodata span { background:rgba(0,0,0,.55); border:1px solid #333; border-radius:10px;
  padding:14px 26px; font-size:22px; letter-spacing:.12em; color:var(--amber); font-weight:700; }

/* settings overlay */
#settings { position:absolute; inset:0; background:rgba(0,0,0,.72); display:none;
  align-items:center; justify-content:center; padding:18px; z-index:10; }
#settings.show { display:flex; }
#panel { width:min(440px,100%); background:#12181d; border:1px solid #283139;
  border-radius:14px; padding:20px; }
#panel h2 { margin:0 0 4px; font-size:17px; }
#panel p { margin:0 0 16px; color:#8a97a0; font-size:12.5px; }
label.f { display:block; margin:12px 0 5px; font-size:12px; color:#9aa7af; letter-spacing:.04em; }
input.f { width:100%; padding:10px 12px; background:#0b0f12; border:1px solid #2a343c;
  color:#e8eef3; border-radius:9px; font:inherit; font-size:14px; }
input.f:focus { outline:none; border-color:#3d8bff; }
.row { display:flex; gap:18px; align-items:center; margin-top:18px; }
button.go { flex:1; background:#1f6fff; color:#fff; border:0; border-radius:10px; padding:12px;
  font:inherit; font-weight:700; font-size:14px; cursor:pointer; }
button.go:hover { background:#2f7bff; }
button.ghost { background:transparent; color:#9aa7af; border:1px solid #2a343c; border-radius:10px;
  padding:12px 16px; font:inherit; cursor:pointer; }
.hint { color:#6b7780; font-size:11.5px; margin-top:12px; line-height:1.5; }

/* replay page: recordings panel */
#recpanel { flex:0 0 auto; height:40vh; min-height:200px; border-top:1px solid #1c2227;
  background:#0a0d0f; display:flex; flex-direction:column; }
#recbar { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #161b1f;
  flex-wrap:wrap; }
#recbar h3 { margin:0; font-size:14px; letter-spacing:.04em; }
#recbar .grow { flex:1; }
#playstate { color:#9aa7af; font-size:12px; font-variant-numeric:tabular-nums; }
select.f { background:#0b0f12; color:#e8eef3; border:1px solid #2a343c; border-radius:8px;
  padding:6px 8px; font:inherit; font-size:13px; }
.reclist { overflow:auto; padding:6px 10px; }
.recrow { display:flex; align-items:center; gap:12px; padding:9px 8px; border-bottom:1px solid #14191d;
  font-size:13px; }
.recrow:hover { background:#0e1316; }
.recrow.playing { background:#10261a; }
.recrow .id { color:#cdd6dd; font-weight:600; min-width:150px; }
.recrow .meta { color:#7e8a92; font-size:12px; flex:1; }
.recrow .acts { display:flex; gap:6px; align-items:center; }
.recrow button { background:#161c21; color:#cdd6dd; border:1px solid #263039; border-radius:7px;
  padding:5px 10px; font:inherit; font-size:12px; cursor:pointer; }
.recrow button:hover { background:#1d252c; }
.recrow button.play { border-color:#1f5a36; color:#bdf0cf; }
.recrow button.danger { border-color:#5a2222; color:#ffc7c0; }
.recrow a.exp { font-size:12px; }
.empty { color:#6b7780; padding:18px 10px; font-size:13px; }
.progress { height:4px; background:#16306f; border-radius:2px; margin-top:4px; transition:width .2s; }

/* graphs page (flight-data-recorder strip charts) */
#charts { flex:1; display:flex; flex-direction:column; gap:4px; position:relative;
  padding:4px 12px 0; min-height:0; }
.chart { position:relative; flex:1 1 0; min-height:44px; }
.chart canvas { display:block; width:100%; height:100%; background:#0a0d0f;
  border:1px solid #14191d; border-radius:6px; }
.chlabel { position:absolute; top:4px; left:10px; right:10px; display:flex; gap:12px;
  align-items:baseline; font-size:12px; pointer-events:none; }
.chname { font-weight:700; }
.chval { color:#e8eef3; font-weight:700; font-variant-numeric:tabular-nums; min-width:50px; }
.chrange { color:#5f6b73; margin-left:auto; font-size:11px; font-variant-numeric:tabular-nums; }
#cursor { position:absolute; inset:0 12px; pointer-events:none; }
#timeaxis { flex:0 0 auto; display:flex; justify-content:space-between; color:#7e8a92;
  font-size:11px; padding:4px 14px 8px; font-variant-numeric:tabular-nums; }
#gerror { color:#ffb020; padding:30px; text-align:center; }
