/* ============================================================
   ORBITAL EYE · 近地轨道态势感知平台
   深色科幻 HUD 风格 · 纯 CSS（无外部资源）
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg-0: #04070d;
  --bg-1: #070d18;
  --bg-2: #0b1424;
  --panel: rgba(10, 18, 33, 0.72);
  --panel-2: rgba(13, 23, 42, 0.88);
  --line: rgba(110, 170, 255, 0.13);
  --line-strong: rgba(120, 190, 255, 0.30);
  --cyan: #53e8ff;
  --cyan-dim: #2b9fc4;
  --blue: #4c9aff;
  --teal: #2dd4bf;
  --amber: #ffb454;
  --red: #ff4d5e;
  --violet: #b18cff;
  --green: #3ddc97;
  --yellow: #f5d949;
  --text: #dce8fb;
  --muted: #8299bb;
  --faint: #5a6f92;

  --sev-critical: #ff4d5e;
  --sev-high: #ff9f43;
  --sev-medium: #f5d949;
  --sev-low: #4cc9f0;
  --st-unconfirmed: #b18cff;
  --st-tracking: #53e8ff;
  --st-resolved: #3ddc97;

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 58px;
  --side-w: 216px;
  --side-w-rail: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
}
::selection { background: rgba(83, 232, 255, 0.28); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(110, 170, 255, 0.18);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(110, 170, 255, 0.34); }
* { scrollbar-width: thin; scrollbar-color: rgba(110,170,255,.22) transparent; }

/* ---------- background layers ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg > div { position: absolute; inset: 0; }
.bg-grad {
  background:
    radial-gradient(1200px 800px at 78% -10%, rgba(37, 78, 140, 0.34), transparent 60%),
    radial-gradient(900px 700px at 8% 108%, rgba(24, 58, 92, 0.30), transparent 60%),
    radial-gradient(700px 500px at 45% 50%, rgba(20, 44, 84, 0.20), transparent 70%),
    linear-gradient(180deg, #05080f 0%, #04070d 55%, #03060b 100%);
}
.bg-stars {
  background-image:
    radial-gradient(1px 1px at 22px 34px, rgba(210, 235, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 121px 89px, rgba(160, 200, 255, 0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 199px 151px, rgba(220, 240, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 263px 61px, rgba(140, 180, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 71px 219px, rgba(200, 225, 255, 0.65), transparent 60%);
  background-size: 320px 320px;
  opacity: 0.75;
  animation: starDrift 240s linear infinite;
}
.bg-stars.s2 {
  background-image:
    radial-gradient(1px 1px at 57px 173px, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 141px 41px, rgba(120, 220, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 233px 247px, rgba(255, 240, 220, 0.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 311px 133px, rgba(255, 255, 255, 0.5), transparent 60%);
  background-size: 390px 390px;
  opacity: 0.5;
  animation: starDrift2 320s linear infinite;
}
@keyframes starDrift  { from { background-position: 0 0; }      to { background-position: -1280px 640px; } }
@keyframes starDrift2 { from { background-position: 0 0; }      to { background-position: 780px -780px; } }
.bg-grid {
  background-image:
    linear-gradient(rgba(110, 170, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 170, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 42%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 42%, #000 30%, transparent 78%);
}
.bg-scan {
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.55;
}
.bg-vig {
  background: radial-gradient(ellipse 120% 100% at 50% 45%, transparent 55%, rgba(2, 4, 9, 0.75) 100%);
}

/* ---------- boot sequence ---------- */
#boot {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(20, 48, 88, 0.5), transparent 70%),
    var(--bg-0);
  opacity: 1;
  transition: opacity 0.55s ease, visibility 0.55s;
}
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-box { width: min(460px, 86vw); text-align: center; }
.boot-logo { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 26px; }
.boot-mark { width: 46px; height: 46px; color: var(--cyan); filter: drop-shadow(0 0 10px rgba(83, 232, 255, 0.5)); animation: bootSpin 7s linear infinite; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-name { font-size: 24px; font-weight: 700; letter-spacing: 0.34em; color: #eaf6ff; text-shadow: 0 0 24px rgba(83, 232, 255, 0.45); text-align: left; }
.boot-name span { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 400; letter-spacing: 0.42em; color: var(--muted); }
.boot-lines { text-align: left; font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-height: 86px; }
.boot-lines p { margin: 0 0 7px; opacity: 0; animation: bootLine 0.4s var(--ease) forwards; }
.boot-lines p b { color: var(--green); font-weight: 600; }
.boot-lines p.ok b { color: var(--green); }
@keyframes bootLine { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.boot-bar { height: 3px; border-radius: 99px; background: rgba(110, 170, 255, 0.14); overflow: hidden; margin-top: 18px; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--blue)); box-shadow: 0 0 12px rgba(83, 232, 255, 0.6); transition: width 0.3s var(--ease); }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 20px;
  background: rgba(5, 9, 17, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--cyan); flex: none; filter: drop-shadow(0 0 8px rgba(83, 232, 255, 0.45)); }
.brand-text { font-size: 15px; font-weight: 700; letter-spacing: 0.26em; white-space: nowrap; color: #eaf6ff; }
.brand-text span { display: block; margin-top: 2px; font-size: 10px; font-weight: 400; letter-spacing: 0.3em; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 14px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--green);
  border: 1px solid rgba(61, 220, 151, 0.3);
  background: rgba(61, 220, 151, 0.07);
  padding: 5px 11px; border-radius: 99px;
  white-space: nowrap;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55);
  animation: pulse 2s infinite;
  flex: none;
}
.pulse-dot.small { width: 5px; height: 5px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
.pill {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 99px;
  white-space: nowrap;
}
.clock-block { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); white-space: nowrap; }
.clock-block b { font-size: 17px; font-weight: 600; color: #eaf6ff; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.clock-block i { font-style: normal; font-size: 10px; color: var(--cyan); letter-spacing: 0.14em; }
.clock-block span { font-size: 11px; color: var(--muted); }

/* ---------- shell layout ---------- */
.shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.stage {
  min-width: 0;
  padding: 22px 26px 14px;
  display: flex;
  flex-direction: column;
}

/* ---------- sidenav ---------- */
.sidenav {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 14, 26, 0.55), rgba(5, 9, 17, 0.25));
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 13.5px; letter-spacing: 0.06em;
  transition: color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: 0.85; }
.nav-item:hover { color: var(--text); background: rgba(110, 170, 255, 0.06); }
.nav-item.active {
  color: #eaf6ff;
  background: linear-gradient(90deg, rgba(83, 232, 255, 0.12), rgba(83, 232, 255, 0.02));
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 2.5px; border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(83, 232, 255, 0.8);
}
.nav-item.active svg { color: var(--cyan); opacity: 1; filter: drop-shadow(0 0 6px rgba(83, 232, 255, 0.6)); }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  color: #fff; background: var(--sev-critical);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(255, 77, 94, 0.55);
}
.nav-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.nav-foot-label { font-size: 10.5px; line-height: 1.7; letter-spacing: 0.14em; color: var(--faint); }

/* ---------- views / transitions ---------- */
.view { display: none; }
.view.active { display: block; animation: viewIn 0.5s var(--ease); }
#view-logs.active { display: flex; flex-direction: column; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.view.active .card { animation: cardIn 0.55s var(--ease) both; }
.view.active .card:nth-child(1) { animation-delay: 0.03s; }
.view.active .card:nth-child(2) { animation-delay: 0.08s; }
.view.active .card:nth-child(3) { animation-delay: 0.13s; }
.view.active .card:nth-child(4) { animation-delay: 0.18s; }
.view.active .card:nth-child(5) { animation-delay: 0.23s; }
.view.active .card:nth-child(6) { animation-delay: 0.28s; }
.view.active .card:nth-child(n + 7) { animation-delay: 0.33s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.view-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.view-head h1 {
  margin: 0;
  font-size: 21px; font-weight: 700; letter-spacing: 0.08em; color: #eaf6ff;
}
.view-head h1 em {
  font-style: normal; font-size: 11px; font-weight: 500;
  letter-spacing: 0.3em; color: var(--cyan); opacity: 0.75;
  margin-left: 10px; vertical-align: 2px;
}
.view-sub { margin: 5px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.05em; }
.head-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px;
}

/* ---------- card / panel ---------- */
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(140, 200, 255, 0.05), transparent 26%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  min-width: 0;
}
.card::before, .card::after {
  content: ""; position: absolute; width: 15px; height: 15px;
  pointer-events: none;
  border-color: rgba(83, 232, 255, 0.65);
  border-style: solid;
  filter: drop-shadow(0 0 4px rgba(83, 232, 255, 0.5));
}
.card::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; border-radius: 6px 0 0 0; }
.card::after { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; border-radius: 0 0 6px 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.card-title { font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; color: #c3d6f2; }
.card-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--faint); white-space: nowrap;
}
.card-tag-link { color: var(--cyan); opacity: 0.8; transition: opacity 0.2s; }
.card-tag-link:hover { opacity: 1; }
.card-note { margin: 10px 0 0; font-size: 11.5px; color: var(--faint); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- dashboard grid ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.stat-card { grid-column: span 3; display: flex; flex-direction: column; }
.stat-card-alert { border-color: rgba(255, 77, 94, 0.22); }
.radar-card { grid-column: span 4; }
.feed-card { grid-column: span 5; }
.health-card { grid-column: span 3; }

.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.stat-label { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.stat-ic { width: 17px; height: 17px; color: var(--cyan-dim); }
.stat-card-alert .stat-ic { color: rgba(255, 77, 94, 0.75); }
.stat-value { display: flex; align-items: baseline; gap: 7px; }
.stat-value .num {
  font-family: var(--font-mono);
  font-size: 33px; font-weight: 600; line-height: 1.1;
  color: #eaf6ff; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(83, 232, 255, 0.28);
}
.stat-card-alert .stat-value .num { text-shadow: 0 0 22px rgba(255, 77, 94, 0.35); }
.stat-value .unit { font-size: 11.5px; color: var(--muted); letter-spacing: 0.1em; }
.stat-value .num.tick { animation: numTick 0.45s var(--ease); }
@keyframes numTick {
  0% { transform: translateY(0); opacity: 1; }
  30% { transform: translateY(-4px); opacity: 0.55; }
  100% { transform: translateY(0); opacity: 1; }
}
.stat-delta {
  margin-top: 4px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--faint);
  min-height: 16px;
}
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--amber); }
.stat-delta.warn-up { color: var(--red); }

.spark { width: 100%; height: 40px; margin-top: auto; padding-top: 8px; display: block; }
.spark-line { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(83, 232, 255, 0.5)); }
#spark-alerts .spark-line { stroke: var(--red); filter: drop-shadow(0 0 3px rgba(255, 77, 94, 0.45)); }
.spark-area { fill: rgba(83, 232, 255, 0.08); stroke: none; }
#spark-alerts .spark-area { fill: rgba(255, 77, 94, 0.08); }

/* gauge */
.stat-card-gauge { padding-bottom: 12px; }
.gauge-wrap { position: relative; margin-top: 2px; }
.gauge { width: 100%; max-width: 170px; display: block; margin: 0 auto; }
.gauge-track { fill: none; stroke: rgba(110, 170, 255, 0.14); stroke-width: 6; stroke-linecap: round; }
.gauge-val {
  fill: none; stroke: url(#none); stroke: var(--cyan);
  stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 131.9;
  stroke-dashoffset: 131.9;
  transition: stroke-dashoffset 0.9s var(--ease);
  filter: drop-shadow(0 0 6px rgba(83, 232, 255, 0.55));
}
.gauge-num {
  position: absolute; left: 0; right: 0; bottom: 0;
  text-align: center;
}
.gauge-num b { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: #eaf6ff; }
.gauge-num span { font-size: 11px; color: var(--muted); margin-left: 2px; }

/* radar */
.radar {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  margin: 4px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(83, 232, 255, 0.06) 0%, rgba(8, 16, 30, 0.6) 68%),
    rgba(6, 12, 24, 0.8);
  border: 1px solid rgba(83, 232, 255, 0.22);
  overflow: hidden;
}
.radar::after {
  content: ""; position: absolute; inset: -2px;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(83, 232, 255, 0.12) inset;
}
.radar-ring { position: absolute; border: 1px solid rgba(83, 232, 255, 0.16); border-radius: 50%; }
.radar-ring.r1 { inset: 12%; }
.radar-ring.r2 { inset: 27%; }
.radar-ring.r3 { inset: 42%; }
.radar-cross { position: absolute; inset: 0;
  background:
    linear-gradient(rgba(83, 232, 255, 0.10), rgba(83, 232, 255, 0.10)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(83, 232, 255, 0.10), rgba(83, 232, 255, 0.10)) 0 50% / 100% 1px no-repeat;
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(83, 232, 255, 0.30), rgba(83, 232, 255, 0.05) 18%, transparent 26%);
  animation: radarSpin 4s linear infinite;
}
@keyframes radarSpin { to { transform: rotate(360deg); } }
.radar-blips { position: absolute; inset: 0; }
.blip {
  position: absolute; width: 5px; height: 5px; margin: -2.5px;
  border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px rgba(83, 232, 255, 0.9);
  opacity: 0;
  animation: blipFade 4s infinite;
}
.blip.hot { background: var(--amber); box-shadow: 0 0 8px rgba(255, 180, 84, 0.9); }
@keyframes blipFade {
  0%, 12% { opacity: 1; transform: scale(1.4); }
  45% { opacity: 0.35; transform: scale(1); }
  70%, 100% { opacity: 0; }
}

/* feed */
.feed { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
.feed-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line); border-left: 2px solid var(--faint);
  border-radius: var(--r-sm);
  background: rgba(110, 170, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.feed-item:hover { background: rgba(110, 170, 255, 0.08); transform: translateX(3px); }
.feed-item.sev-critical { border-left-color: var(--sev-critical); }
.feed-item.sev-high { border-left-color: var(--sev-high); }
.feed-item.sev-medium { border-left-color: var(--sev-medium); }
.feed-item.sev-low { border-left-color: var(--sev-low); }
.fdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.feed-item.sev-critical .fdot { background: var(--sev-critical); box-shadow: 0 0 8px rgba(255,77,94,.8); }
.feed-item.sev-high .fdot { background: var(--sev-high); box-shadow: 0 0 8px rgba(255,159,67,.8); }
.feed-item.sev-medium .fdot { background: var(--sev-medium); }
.feed-item.sev-low .fdot { background: var(--sev-low); }
.fmain { flex: 1; min-width: 0; }
.fmain b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmain span { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item time { font-family: var(--font-mono); font-size: 10.5px; color: var(--cyan); white-space: nowrap; }

/* health */
.health { display: flex; flex-direction: column; gap: 12px; padding-top: 2px; }
.hrow { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 10px; }
.hname { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
.hbar { height: 5px; border-radius: 99px; background: rgba(110, 170, 255, 0.12); overflow: hidden; }
.hfill {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 8px rgba(83, 232, 255, 0.4);
  transition: width 0.9s var(--ease), background 0.5s;
}
.hfill.low { background: linear-gradient(90deg, #8a5a2b, var(--amber)); box-shadow: 0 0 8px rgba(255, 180, 84, 0.4); }
.hfill.crit { background: linear-gradient(90deg, #7e2731, var(--red)); box-shadow: 0 0 8px rgba(255, 77, 94, 0.4); }
.hval { font-size: 11.5px; text-align: right; color: var(--text); }

/* ---------- orbit view ---------- */
.orbit-head { align-items: center; }
.orbit-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: 0.08em;
  color: var(--text);
  background: rgba(110, 170, 255, 0.07);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s, transform 0.15s var(--ease);
}
.btn:hover { background: rgba(83, 232, 255, 0.12); border-color: rgba(83, 232, 255, 0.5); box-shadow: 0 0 16px rgba(83, 232, 255, 0.18); }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 14px; height: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(8, 14, 26, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.seg-btn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted);
  background: transparent; border: 0; border-radius: 6px;
  padding: 5px 11px; cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on {
  color: #06121f;
  background: linear-gradient(180deg, #7cf0ff, #3ec9e8);
  box-shadow: 0 0 14px rgba(83, 232, 255, 0.4);
}

.orbit-stage {
  flex: 1;
  min-height: 420px;
  height: min(74vh, 760px);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(22, 46, 84, 0.4), transparent 72%),
    rgba(5, 10, 20, 0.4);
}
#orbit-canvas { position: absolute; inset: 0; display: block; cursor: crosshair; }
#orbit-canvas:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.orbit-hud {
  position: absolute; top: 14px; left: 16px; z-index: 3;
  display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--muted);
  pointer-events: none;
}
.hud-item b { color: var(--cyan); margin-left: 5px; }
.orbit-legend {
  position: absolute; left: 16px; bottom: 14px; z-index: 3;
  display: flex; gap: 14px;
  font-size: 11px; color: var(--muted);
  pointer-events: none;
}
.lg { display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: -1px; }
.lg-sat { border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px rgba(83,232,255,.8); }
.lg-deb { width: 7px; height: 7px; background: var(--amber); transform: rotate(45deg); }
.lg-unk { border-radius: 50%; background: var(--violet); box-shadow: 0 0 6px rgba(177,140,255,.8); }
.orbit-hint {
  position: absolute; right: 16px; bottom: 14px; z-index: 3;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--faint);
  pointer-events: none;
}
.orbit-tip {
  position: absolute; z-index: 5;
  min-width: 158px;
  background: rgba(7, 14, 27, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(83, 232, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s, transform 0.16s var(--ease);
}
.orbit-tip.show { opacity: 1; transform: none; }
.orbit-tip .ot-name { font-size: 12.5px; font-weight: 600; color: #eaf6ff; }
.orbit-tip .ot-type { font-size: 10px; color: var(--cyan); letter-spacing: 0.12em; margin-left: 6px; }
.orbit-tip .ot-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 5px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.orbit-tip .ot-row b { color: var(--text); font-weight: 500; }
.orbit-detail {
  position: absolute; z-index: 6;
  top: 14px; right: 14px;
  width: min(272px, calc(100% - 28px));
  background: rgba(7, 14, 27, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 14px 16px 15px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 22px rgba(83, 232, 255, 0.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.22s, transform 0.25s var(--ease);
}
.orbit-detail.show { opacity: 1; transform: none; }
#orbit-close { position: absolute; top: 9px; right: 9px; }
.icon-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(110, 170, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted); cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { color: #eaf6ff; border-color: var(--line-strong); background: rgba(110, 170, 255, 0.12); }
.od-name { font-size: 15px; font-weight: 700; color: #eaf6ff; padding-right: 26px; }
.od-type { font-size: 10px; font-weight: 500; color: var(--cyan); letter-spacing: 0.14em; margin-left: 8px; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin-top: 12px; }
.od-cell { font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }
.od-cell b { display: block; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text); margin-top: 1px; }
.od-alerts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.od-alerts b { color: var(--amber); font-weight: 600; }
.od-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- collision view ---------- */
.coll-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 12px;
}
.cs-chip b { color: var(--text); font-weight: 600; }
.cs-chip.c-critical b { color: var(--sev-critical); }
.cs-chip.c-high b { color: var(--sev-high); }
.cs-chip.c-medium b { color: var(--sev-medium); }
.cs-chip.c-low b { color: var(--sev-low); }
.cs-chip.c-open b { color: var(--cyan); }

.coll-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.chip-group { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(110, 170, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on {
  color: #eaf6ff;
  background: rgba(83, 232, 255, 0.12);
  border-color: rgba(83, 232, 255, 0.55);
  box-shadow: 0 0 12px rgba(83, 232, 255, 0.15);
}
.sev-dot { width: 7px; height: 7px; border-radius: 50%; }
.sev-dot-critical { background: var(--sev-critical); box-shadow: 0 0 6px rgba(255,77,94,.7); }
.sev-dot-high { background: var(--sev-high); }
.sev-dot-medium { background: var(--sev-medium); }
.sev-dot-low { background: var(--sev-low); }

.search {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(8, 14, 26, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: rgba(83, 232, 255, 0.5); box-shadow: 0 0 14px rgba(83, 232, 255, 0.12); }
.search svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.search input {
  background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: 12.5px;
  padding: 8px 0; width: 190px;
}
.search input::placeholder { color: var(--faint); }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-cap { position: absolute; left: 12px; font-size: 10.5px; letter-spacing: 0.1em; color: var(--faint); pointer-events: none; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: 12px; color: var(--text);
  background: rgba(8, 14, 26, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 32px 8px 44px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.select-wrap select:hover { border-color: var(--line-strong); }
.select-wrap::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.coll-count { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }

.coll-list { display: flex; flex-direction: column; gap: 8px; }
.coll-row {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(110, 170, 255, 0.045), transparent 42%),
    rgba(9, 16, 30, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px 11px 12px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.coll-row:hover, .coll-row:focus-visible {
  border-color: var(--line-strong);
  background: rgba(13, 23, 42, 0.9);
  transform: translateX(3px);
}
.coll-row .sev-bar { width: 4px; align-self: stretch; border-radius: 99px; }
.coll-row.sev-critical .sev-bar { background: var(--sev-critical); box-shadow: 0 0 10px rgba(255,77,94,.7); }
.coll-row.sev-high .sev-bar { background: var(--sev-high); }
.coll-row.sev-medium .sev-bar { background: var(--sev-medium); }
.coll-row.sev-low .sev-bar { background: var(--sev-low); }
.coll-row.is-resolved { opacity: 0.55; }
.coll-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sev-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  padding: 2.5px 9px; border-radius: 5px;
}
.sev-badge-critical { color: #fff; background: rgba(255, 77, 94, 0.16); border: 1px solid rgba(255, 77, 94, 0.55); box-shadow: 0 0 10px rgba(255,77,94,.25); }
.sev-badge-high { color: var(--sev-high); background: rgba(255, 159, 67, 0.12); border: 1px solid rgba(255, 159, 67, 0.45); }
.sev-badge-medium { color: var(--sev-medium); background: rgba(245, 217, 73, 0.1); border: 1px solid rgba(245, 217, 73, 0.4); }
.sev-badge-low { color: var(--sev-low); background: rgba(76, 201, 240, 0.1); border: 1px solid rgba(76, 201, 240, 0.4); }
.coll-id { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.04em; }
.tca-block { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.tca-block b { color: var(--text); font-weight: 500; }
.tca-rel { margin-left: 7px; color: var(--cyan); }
.tca-rel.past { color: var(--red); }
.coll-objs { margin-top: 5px; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 12.5px; }
.coll-objs .obj-names { color: var(--text); font-weight: 500; min-width: 0; }
.coll-objs .obj-names .xsep { color: var(--red); margin: 0 4px; font-family: var(--font-mono); }
.coll-metric { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.coll-metric b { color: var(--text); font-weight: 500; }
.st-badge {
  font-size: 10.5px; letter-spacing: 0.1em;
  padding: 3.5px 10px; border-radius: 99px;
  white-space: nowrap;
}
.st-unconfirmed { color: var(--st-unconfirmed); border: 1px solid rgba(177, 140, 255, 0.45); background: rgba(177, 140, 255, 0.08); }
.st-tracking { color: var(--st-tracking); border: 1px solid rgba(83, 232, 255, 0.45); background: rgba(83, 232, 255, 0.08); }
.st-resolved { color: var(--st-resolved); border: 1px solid rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.07); }
.coll-empty {
  padding: 44px 20px; text-align: center;
  color: var(--faint); font-size: 13px;
  border: 1px dashed var(--line); border-radius: var(--r-md);
}
.coll-empty svg { width: 34px; height: 34px; margin-bottom: 12px; opacity: 0.5; }

/* modal */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 6, 12, 0.72);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  position: relative;
  width: min(780px, 100%);
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(140, 200, 255, 0.06), transparent 24%),
    linear-gradient(180deg, #0c1526, #081020);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(83, 232, 255, 0.08);
  animation: modalIn 0.32s var(--ease);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head .modal-id { font-family: var(--font-mono); font-size: 14px; color: #eaf6ff; letter-spacing: 0.04em; }
.modal-head .modal-id small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.16em; margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { overflow-y: auto; padding: 18px 20px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.m-sec-title { font-size: 11px; letter-spacing: 0.22em; color: var(--cyan); margin: 0 0 10px; opacity: 0.85; }
.m-kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 12.5px; }
.m-kv dt { color: var(--muted); }
.m-kv dd { margin: 0; font-family: var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.obj-card {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; margin-bottom: 9px;
  background: rgba(110, 170, 255, 0.04);
}
.obj-card .oname { font-size: 13.5px; font-weight: 600; color: #eaf6ff; }
.obj-card .oname .otype { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 8px; letter-spacing: 0.1em; }
.obj-card .orow { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 5px; }
.obj-card .orow b { color: var(--text); font-weight: 500; }
.prob-line { margin-top: 10px; }
.prob-track { height: 7px; border-radius: 99px; background: rgba(110, 170, 255, 0.12); overflow: hidden; }
.prob-fill { height: 100%; border-radius: 99px; width: 0; background: linear-gradient(90deg, var(--teal), var(--cyan)); transition: width 0.8s var(--ease); }
.prob-fill.hot { background: linear-gradient(90deg, var(--amber), var(--red)); }
.prob-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); margin-top: 4px; }
.m-advice { font-size: 12.5px; color: var(--text); line-height: 1.75; border-left: 2px solid var(--line-strong); padding-left: 12px; }
.m-timeline { list-style: none; margin: 0; padding: 0; }
.m-timeline li { position: relative; padding: 0 0 14px 20px; }
.m-timeline li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px rgba(83,232,255,.7);
}
.m-timeline li::after {
  content: ""; position: absolute; left: 7px; top: 15px; bottom: -2px;
  width: 1px; background: var(--line-strong);
}
.m-timeline li:last-child { padding-bottom: 0; }
.m-timeline li:last-child::after { display: none; }
.m-timeline li b { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); font-weight: 500; }
.m-timeline li span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.m-timeline li.future::before { background: var(--faint); box-shadow: none; }
.modal-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: rgba(8, 14, 26, 0.6);
}
.modal-foot .spacer { flex: 1; }
.btn-ghost {
  background: transparent; border-color: var(--line); color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); box-shadow: none; background: rgba(110,170,255,.06); }
.btn-primary {
  background: linear-gradient(180deg, rgba(83, 232, 255, 0.22), rgba(83, 232, 255, 0.1));
  border-color: rgba(83, 232, 255, 0.6);
  color: #eaf6ff;
}
.btn-primary:hover { box-shadow: 0 0 18px rgba(83, 232, 255, 0.3); }

/* ---------- logs ---------- */
#view-logs { min-height: 0; }
.log-controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.log-count { font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }
.log-terminal {
  min-height: 300px;
  height: min(62vh, 640px);
  display: flex; flex-direction: column;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(140, 200, 255, 0.04), transparent 18%),
    rgba(4, 8, 16, 0.88);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.term-dot { width: 9px; height: 9px; border-radius: 50%; background: #2c3e5c; }
.term-dot.d2 { background: #2c3e5c; }
.term-dot.d3 { background: #2c3e5c; }
.term-title { margin-left: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--faint); }
.term-side { margin-left: auto; font-size: 10px; letter-spacing: 0.18em; color: var(--green); }
.term-side.paused { color: var(--amber); }
#log-lines { flex: 1; overflow-y: auto; padding: 10px 14px 16px; font-family: var(--font-mono); font-size: 12px; line-height: 1.72; }
.ll {
  display: grid;
  grid-template-columns: 172px 58px 1fr;
  gap: 10px;
  padding: 1.5px 0;
  border-left: 2px solid transparent;
  animation: llIn 0.3s var(--ease);
}
@keyframes llIn { from { opacity: 0; transform: translateY(4px); } }
.ll time { color: #5f7799; white-space: nowrap; }
.ll .tag {
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--faint);
  background: rgba(110, 170, 255, 0.08);
  border-radius: 4px;
  text-align: center;
  padding: 0 4px;
  align-self: center;
}
.ll .msg { color: #a8bcd8; min-width: 0; overflow-wrap: anywhere; }
.ll.lvl-WARN { border-left-color: rgba(255, 180, 84, 0.5); }
.ll.lvl-WARN .msg { color: #e8c893; }
.ll.lvl-WARN .tag { color: var(--amber); background: rgba(255, 180, 84, 0.1); }
.ll.lvl-ERROR { border-left-color: rgba(255, 77, 94, 0.6); }
.ll.lvl-ERROR .msg { color: #f0a9b0; }
.ll.lvl-ERROR .tag { color: var(--red); background: rgba(255, 77, 94, 0.12); }
.ll.lvl-CRIT { border-left-color: var(--red); background: rgba(255, 77, 94, 0.07); }
.ll.lvl-CRIT .msg { color: #ffd7db; font-weight: 600; }
.ll.lvl-CRIT .tag { color: #fff; background: rgba(255, 77, 94, 0.35); }

/* ---------- statusbar / toasts ---------- */
.statusbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 20px;
  padding: 9px 22px;
  border-top: 1px solid var(--line);
  background: rgba(5, 9, 17, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--faint);
}
.sb-item b { color: var(--muted); font-weight: 600; margin-left: 4px; }
.sb-item .pulse-dot { margin-right: 6px; }
.sb-right { margin-left: auto; display: inline-flex; align-items: center; color: var(--green); }
.ticker {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: inline-flex; white-space: nowrap;
  animation: tick 36s linear infinite;
  will-change: transform;
}
@keyframes tick { to { transform: translateX(-50%); } }
.ticker-track span { margin-right: 3em; color: var(--faint); }

.toasts {
  position: fixed; z-index: 300;
  right: 18px; bottom: 52px;
  display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
  width: min(340px, calc(100vw - 36px));
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(8, 15, 28, 0.94);
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 12.5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: toastIn 0.4s var(--ease);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.toast.out { opacity: 0; transform: translateX(14px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.toast.t-critical { border-left-color: var(--sev-critical); }
.toast.t-high { border-left-color: var(--sev-high); }
.toast.t-medium { border-left-color: var(--sev-medium); }
.toast.t-low { border-left-color: var(--sev-low); }
.toast.t-info { border-left-color: var(--cyan); }
.toast .tdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.t-critical .tdot { background: var(--sev-critical); box-shadow: 0 0 8px rgba(255,77,94,.8); }
.t-high .tdot { background: var(--sev-high); box-shadow: 0 0 8px rgba(255,159,67,.8); }
.t-medium .tdot { background: var(--sev-medium); }
.t-low .tdot { background: var(--sev-low); }
.t-info .tdot { background: var(--cyan); box-shadow: 0 0 8px rgba(83,232,255,.8); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--side-w-rail) minmax(0, 1fr); }
  .nav-item { justify-content: center; padding: 10px 6px; }
  .nav-label { display: none; }
  .nav-badge { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 16px; height: 16px; font-size: 9px; padding: 0 4px; }
  .nav-foot { display: none; }
  .stat-card { grid-column: span 6; }
  .radar-card { grid-column: span 6; }
  .feed-card { grid-column: span 6; }
  .health-card { grid-column: span 12; }
}
@media (max-width: 900px) {
  .modal-grid { grid-template-columns: 1fr; }
  .orbit-stage { height: min(60vh, 560px); min-height: 380px; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 54px; }
  .shell { grid-template-columns: 1fr; padding-bottom: 62px; }
  .stage { padding: 16px 14px 12px; }
  .sidenav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    height: auto;
    z-index: 60;
    flex-direction: row;
    justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    background: rgba(5, 9, 17, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .nav-item { flex-direction: column; gap: 3px; padding: 6px 10px; font-size: 10px; letter-spacing: 0.08em; }
  .nav-label { display: block; }
  .nav-item.active::before { left: 20%; right: 20%; top: auto; bottom: 3px; width: auto; height: 2.5px; }
  .nav-badge { top: 0; right: 8px; }
  .topbar { padding: 0 14px; }
  .brand-text span, .pill, .hidden-m { display: none; }
  .clock-block b { font-size: 14.5px; }
  .stat-card, .radar-card, .feed-card, .health-card { grid-column: span 12; }
  .stat-value .num { font-size: 29px; }
  .orbit-stage { height: 56vh; min-height: 340px; }
  .orbit-hint { display: none; }
  .orbit-detail { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; }
  .search input { width: 120px; }
  .ll { grid-template-columns: 1fr; gap: 2px; padding: 3px 0; }
  .ll .tag { display: inline-block; width: auto; margin-right: 6px; }
  .ll time { order: -1; font-size: 10px; }
  .ll .msg { display: block; }
  .statusbar { gap: 12px; padding: 8px 14px; }
  .ticker { display: none; }
  .toasts { bottom: 74px; }
  .view-head { flex-direction: column; align-items: flex-start; }
  .orbit-head { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .live-pill { display: none; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .coll-row { grid-template-columns: 4px minmax(0, 1fr); }
  .coll-row .st-badge { grid-column: 2; justify-self: start; margin-top: 2px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .radar-sweep { display: none; }
  .bg-stars { animation: none; }
  .ticker-track { animation: none; }
}
/* ---------- 补丁：JS 引用的补充类 ---------- */
.coll-main { display: block; min-width: 0; }
.coll-row.flash { border-color: var(--cyan); box-shadow: 0 0 18px rgba(83, 232, 255, 0.35); }
.modal-root[hidden] { display: none; }
.modal-head.h-critical { border-bottom-color: rgba(255, 77, 94, 0.5); }
.modal-head.h-critical .modal-id { color: #ffd7db; }
.modal-head.h-high { border-bottom-color: rgba(255, 159, 67, 0.5); }
.modal-head.h-high .modal-id { color: var(--sev-high); }
.modal-head.h-medium { border-bottom-color: rgba(245, 217, 73, 0.45); }
.modal-head.h-medium .modal-id { color: var(--sev-medium); }
.modal-head.h-low { border-bottom-color: rgba(76, 201, 240, 0.45); }
.modal-head.h-low .modal-id { color: var(--sev-low); }
