/* ============================================================
   留影观察站 · Candle Observatory
   设计系统：深夜空 × 烛光金 · 玻璃拟态 · 观星台
   ============================================================ */
:root {
  --bg0: #05070f;
  --bg1: #0a0f22;
  --panel: rgba(17, 23, 48, 0.66);
  --panel-solid: #111730;
  --panel-br: rgba(139, 156, 255, 0.14);
  --panel-br-strong: rgba(139, 156, 255, 0.28);
  --ink: #e9edff;
  --ink2: #a4adc9;
  --ink3: #6b7494;
  --gold: #f6b352;
  --gold2: #f98f4a;
  --cyan: #6fd3ff;
  --green: #58d6a3;
  --red: #ff6b6b;
  --orange: #ffb020;
  --violet: #b78cff;
  --slate: #8a93b8;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 18px 50px rgba(2, 4, 12, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: radial-gradient(1200px 800px at 85% -10%, #141c42 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #101736 0%, transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--ink);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
}
#starfield { position: fixed; inset: 0; z-index: 0; opacity: 0.8; }
.aurora {
  position: fixed; inset: -20% -10% auto; height: 60vh; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 30% 40%, rgba(246, 179, 82, 0.07), transparent 70%),
              radial-gradient(40% 55% at 70% 30%, rgba(111, 211, 255, 0.06), transparent 70%);
  filter: blur(30px);
  animation: auroraDrift 24s ease-in-out infinite alternate;
}
@keyframes auroraDrift { from { transform: translateX(-3%) } to { transform: translateX(3%) } }

::selection { background: rgba(246, 179, 82, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(139, 156, 255, 0.18); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 布局骨架 ---------------- */
.shell { position: relative; z-index: 1; display: flex; height: 100vh; }
.sidebar {
  width: 232px; flex: none; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px; border-right: 1px solid var(--panel-br);
  background: rgba(8, 11, 26, 0.55); backdrop-filter: blur(14px);
}
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.view-root { flex: 1; overflow-y: auto; padding: 22px 26px 40px; scroll-behavior: smooth; outline: none; }
.view-enter { animation: viewIn 0.42s var(--ease); } /* 仅路由切换时播放，引擎事件重渲染不闪 */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

/* ---------------- 品牌 ---------------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px; }
.brand-orbit {
  width: 40px; height: 40px; border-radius: 50%; position: relative; flex: none;
  border: 1.5px solid rgba(246, 179, 82, 0.55);
  animation: orbitSpin 9s linear infinite;
}
.brand-orbit::before {
  content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
@keyframes orbitSpin { to { transform: rotate(360deg) } }
.brand-flame {
  position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffe3b0, var(--gold) 55%, var(--gold2));
  box-shadow: 0 0 14px 3px rgba(246, 179, 82, 0.55);
  animation: flameBreath 2.6s ease-in-out infinite;
}
@keyframes flameBreath { 50% { transform: scale(1.22); box-shadow: 0 0 20px 5px rgba(246, 179, 82, 0.7) } }
.brand-text h1 { font-size: 17px; letter-spacing: 1px; }
.brand-text p { font-size: 10.5px; color: var(--ink3); letter-spacing: 2.5px; text-transform: uppercase; }

/* ---------------- 导航 ---------------- */
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: var(--r-md); background: none;
  color: var(--ink2); font-size: 13.5px; font-family: var(--sans); cursor: pointer;
  transition: all 0.22s var(--ease); text-align: left;
}
.nav-item:hover { color: var(--ink); background: rgba(139, 156, 255, 0.07); }
.nav-item.active {
  color: var(--gold); background: linear-gradient(90deg, rgba(246, 179, 82, 0.13), rgba(246, 179, 82, 0.03));
  border-color: rgba(246, 179, 82, 0.3);
}
.nav-ico { width: 20px; text-align: center; font-size: 14px; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--gold); color: #241300; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-badge[hidden] { display: none; }
.sidebar-foot { margin-top: auto; font-size: 11px; color: var(--ink3); text-align: center; line-height: 1.7; }

/* ---------------- 演示控制盒 ---------------- */
.demo-box {
  border: 1px dashed rgba(246, 179, 82, 0.35); border-radius: var(--r-md);
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
  background: rgba(246, 179, 82, 0.04);
}
.demo-box h2 { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 8px; letter-spacing: 1px; }
.demo-actions { display: flex; flex-direction: column; gap: 6px; }

/* ---------------- 顶栏链路状态 ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 26px; border-bottom: 1px solid var(--panel-br);
  background: rgba(8, 11, 26, 0.5); backdrop-filter: blur(14px);
}
.link-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: flex; align-items: center; gap: 9px; padding: 7px 13px;
  border: 1px solid var(--panel-br); border-radius: 999px;
  background: var(--panel); font-size: 12px; min-width: 0;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; position: relative; }
.pill .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.8 } 80%, 100% { transform: scale(1.4); opacity: 0 } }
.pill-ok .dot { background: var(--green); color: var(--green); box-shadow: 0 0 8px var(--green); }
.pill-bad .dot { background: var(--red); color: var(--red); box-shadow: 0 0 8px var(--red); }
.pill-warn .dot { background: var(--orange); color: var(--orange); box-shadow: 0 0 8px var(--orange); }
.pill-name { color: var(--ink3); letter-spacing: 0.5px; }
.pill-value { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pill-sub { color: var(--ink3); font-size: 11px; font-variant-numeric: tabular-nums; }

.scan-pill {
  display: flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(246, 179, 82, 0.35); background: rgba(246, 179, 82, 0.07);
  font-size: 12.5px; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.topbar-side { display: flex; align-items: center; gap: 10px; }

/* 精简版 / 完整版 切换 */
.mode-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  border: 1px solid var(--panel-br-strong); background: var(--panel);
}
.mode-switch[hidden] { display: none; }
.mode-switch button {
  border: none; background: transparent; color: var(--ink3); cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 600; padding: 4px 13px;
  border-radius: 999px; transition: all 0.2s var(--ease);
}
.mode-switch button:hover { color: var(--ink); }
.mode-switch button.active {
  background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2a1500;
  box-shadow: 0 2px 10px rgba(246, 179, 82, 0.35);
}
.demo-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--ink3); }
.scan-pill.idle { border-color: var(--panel-br); background: var(--panel); color: var(--ink2); }
.scan-pill.error { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); color: var(--red); }
.scan-pill .cd { font-family: var(--mono); font-weight: 700; font-size: 14px; }

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-md); border: 1px solid transparent;
  font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s var(--ease); color: var(--ink); background: rgba(139, 156, 255, 0.1);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2a1500; box-shadow: 0 6px 20px rgba(246, 179, 82, 0.3); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(246, 179, 82, 0.45); }
.btn-danger { background: rgba(255, 107, 107, 0.14); border-color: rgba(255, 107, 107, 0.45); color: var(--red); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.22); }
.btn-ghost { background: transparent; border-color: var(--panel-br-strong); color: var(--ink2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink3); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.icon-btn {
  width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--panel-br);
  background: transparent; color: var(--ink2); cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink3); }
.mini-btn {
  padding: 1px 7px; border-radius: 6px; border: 1px solid var(--panel-br);
  background: rgba(139, 156, 255, 0.08); color: var(--ink2); font-size: 10.5px;
  cursor: pointer; font-family: var(--sans); transition: all 0.18s;
}
.mini-btn:hover { color: var(--gold); border-color: rgba(246, 179, 82, 0.4); }
.mini-btn-ghost { background: transparent; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px; border: 1px solid; white-space: nowrap;
}
.tag-gold { color: var(--gold); border-color: rgba(246, 179, 82, 0.45); background: rgba(246, 179, 82, 0.1); }
.tag-cyan { color: var(--cyan); border-color: rgba(111, 211, 255, 0.4); background: rgba(111, 211, 255, 0.08); }
.tag-green { color: var(--green); border-color: rgba(88, 214, 163, 0.4); background: rgba(88, 214, 163, 0.08); }
.tag-red { color: var(--red); border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.09); }
.tag-orange { color: var(--orange); border-color: rgba(255, 176, 32, 0.45); background: rgba(255, 176, 32, 0.09); }
.tag-violet { color: var(--violet); border-color: rgba(183, 140, 255, 0.45); background: rgba(183, 140, 255, 0.1); }
.tag-slate { color: var(--slate); border-color: rgba(138, 147, 184, 0.4); background: rgba(138, 147, 184, 0.08); }
.tag-mock { color: #241300; background: var(--gold); border-color: var(--gold); font-size: 9.5px; padding: 1px 6px; }

.card {
  background: var(--panel); border: 1px solid var(--panel-br); border-radius: var(--r-lg);
  padding: 18px; backdrop-filter: blur(10px);
}
.card-title { font-size: 13px; color: var(--ink3); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.hint { font-size: 11.5px; color: var(--ink3); line-height: 1.7; }
.hint-inline { font-size: 11px; color: var(--ink3); }
.mono { font-family: var(--mono); font-size: 12px; }

.switch { position: relative; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; z-index: 1; margin: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: rgba(139, 156, 255, 0.18);
  border: 1px solid var(--panel-br-strong); transition: all 0.25s var(--ease);
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink2); transition: all 0.25s var(--ease);
}
.switch input:checked + i { background: rgba(246, 179, 82, 0.4); border-color: var(--gold); }
.switch input:checked + i::after { left: 19px; background: var(--gold); box-shadow: 0 0 8px rgba(246, 179, 82, 0.7); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink2); cursor: pointer; }
.switch-row em { display: block; font-style: normal; font-size: 10.5px; color: var(--ink3); }

input[type="text"], input[type="number"], input[type="search"], select, textarea {
  background: rgba(5, 8, 18, 0.6); border: 1px solid var(--panel-br-strong); color: var(--ink);
  border-radius: var(--r-sm); padding: 8px 11px; font-family: var(--sans); font-size: 13px;
  outline: none; transition: border-color 0.2s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type="checkbox"] { accent-color: var(--gold); width: 14px; height: 14px; }

/* ---------------- 长 ID ---------------- */
.longid { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.longid-short { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }
.longid-suffix { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); }
.longid-alias { color: var(--gold); font-weight: 600; font-size: 12.5px; }

/* ---------------- 总览 ---------------- */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px; }
.hero-single { grid-template-columns: 1fr; } /* 精简版：无链路卡，扫描摘要独占一行 */
.hero-main { position: relative; overflow: hidden; }
.hero-main::before {
  content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, rgba(246, 179, 82, 0.14), transparent 70%);
}
.link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.link-card {
  border: 1px solid var(--panel-br); border-radius: var(--r-md); padding: 13px 15px;
  background: rgba(5, 8, 18, 0.4); display: flex; flex-direction: column; gap: 5px;
  transition: border-color 0.25s;
}
.link-card:hover { border-color: var(--panel-br-strong); }
.link-card-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink3); letter-spacing: 1px; }
.link-card-state { font-size: 15.5px; font-weight: 700; }
.link-card-sub { font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.state-ok { color: var(--green); } .state-bad { color: var(--red); } .state-warn { color: var(--orange); }

.gauge-wrap { display: flex; align-items: center; gap: 20px; }
.gauge {
  --p: 0; --gauge-color: var(--gold);
  width: 128px; height: 128px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(var(--gauge-color) calc(var(--p) * 1%), rgba(139, 156, 255, 0.12) 0);
  display: flex; align-items: center; justify-content: center;
  transition: --p 0.5s;
}
.gauge::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0c1128; }
.gauge-center { position: relative; text-align: center; }
.gauge-center b { font-size: 21px; font-variant-numeric: tabular-nums; display: block; }
.gauge-center span { font-size: 10.5px; color: var(--ink3); }
.gauge-meta { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink2); }
.gauge-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { text-align: left; padding: 14px 16px; }
.stat-card b { font-size: 24px; display: block; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-card span { font-size: 11.5px; color: var(--ink3); }
.stat-card .trend { font-size: 10.5px; margin-top: 3px; display: block; }

.overview-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.event-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; }
.event-item { display: flex; gap: 11px; padding: 9px 4px; border-bottom: 1px dashed rgba(139, 156, 255, 0.1); font-size: 12.5px; }
.event-item:last-child { border-bottom: none; }
.event-time { font-family: var(--mono); font-size: 11px; color: var(--ink3); flex: none; padding-top: 2px; }
.event-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }
.event-info .event-dot { background: var(--cyan); }
.event-ok .event-dot { background: var(--green); }
.event-warn .event-dot { background: var(--orange); }
.event-alert .event-dot { background: var(--red); }
.event-text { color: var(--ink2); }

.notify-panel .notify-item {
  border: 1px solid var(--panel-br); border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 9px;
  background: rgba(5, 8, 18, 0.4); font-size: 12.5px;
}
.notify-item p { color: var(--ink2); }
.notify-item .notify-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--ink3); }
.empty-note {
  border: 1px dashed var(--panel-br-strong); border-radius: var(--r-md); padding: 18px;
  text-align: center; color: var(--ink3); font-size: 12.5px;
}

/* ---------------- 扫描页 ---------------- */
.scan-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.type-card {
  border: 1px solid var(--panel-br); border-radius: var(--r-md); padding: 12px 10px; cursor: pointer;
  background: rgba(5, 8, 18, 0.4); text-align: center; transition: all 0.22s var(--ease); position: relative;
}
.type-card:hover { border-color: var(--panel-br-strong); transform: translateY(-1px); }
.type-card.active { border-color: var(--gold); background: rgba(246, 179, 82, 0.09); box-shadow: 0 0 0 1px var(--gold) inset; }
.type-card.disabled { opacity: 0.45; cursor: not-allowed; }
.type-card .t-ico { font-size: 19px; display: block; margin-bottom: 4px; }
.type-card b { font-size: 13px; display: block; }
.type-card span { font-size: 10px; color: var(--ink3); display: block; margin-top: 2px; }

.param-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
.param-item label { font-size: 11px; color: var(--ink3); display: block; margin-bottom: 4px; font-family: var(--mono); }
.param-item .param-static {
  font-family: var(--mono); font-size: 12.5px; padding: 8px 11px; border-radius: var(--r-sm);
  background: rgba(5, 8, 18, 0.4); border: 1px dashed var(--panel-br); color: var(--ink2);
}
.param-item .param-note { font-size: 10px; color: var(--ink3); margin-top: 3px; display: block; }

.radar-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 12px; }
.radar {
  width: 150px; height: 150px; border-radius: 50%; position: relative;
  border: 1px solid rgba(111, 211, 255, 0.25);
  background:
    radial-gradient(circle, transparent 62%, rgba(111, 211, 255, 0.05) 63%, transparent 64%),
    radial-gradient(circle, transparent 38%, rgba(111, 211, 255, 0.07) 39%, transparent 40%),
    radial-gradient(circle, rgba(111, 211, 255, 0.06), transparent 70%);
}
.radar .sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(111, 211, 255, 0.4), transparent 18%);
  animation: radarSpin 3.2s linear infinite; opacity: 0;
}
.radar.live .sweep { opacity: 1; }
@keyframes radarSpin { to { transform: rotate(360deg) } }
.radar .blip {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 8px var(--gold); animation: blipPulse 2s ease-in-out infinite;
}
@keyframes blipPulse { 50% { opacity: 0.3 } }
.radar-center-label { text-align: center; }
.radar-center-label b { font-size: 15px; display: block; }
.radar-center-label span { font-size: 11.5px; color: var(--ink3); }

.scan-controls { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.progress-track { height: 7px; border-radius: 4px; background: rgba(139, 156, 255, 0.12); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 4px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  box-shadow: 0 0 10px rgba(246, 179, 82, 0.5); transition: width 0.5s var(--ease);
}

.loc-toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.loc-toolbar input[type="search"] { max-width: 230px; }
.realm-group { margin-bottom: 6px; }
.realm-head {
  display: flex; align-items: center; gap: 9px; padding: 8px 6px; cursor: pointer;
  font-size: 12.5px; color: var(--ink2); border-radius: var(--r-sm); user-select: none;
}
.realm-head:hover { background: rgba(139, 156, 255, 0.06); }
.realm-head b { color: var(--ink); }
.realm-head .realm-count { color: var(--ink3); font-size: 11px; }
.loc-list { display: flex; flex-direction: column; }
.loc-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 26px; border-radius: var(--r-sm);
  font-size: 12.5px; transition: background 0.18s; position: relative;
}
.loc-item:hover { background: rgba(139, 156, 255, 0.05); }
.loc-item .loc-id { font-family: var(--mono); font-size: 11px; color: var(--ink3); width: 24px; flex: none; }
.loc-item .loc-cat { color: var(--ink); }
.loc-item .loc-map { color: var(--ink3); font-size: 11px; font-family: var(--mono); }
.loc-item .loc-coord { color: var(--ink3); font-size: 11px; font-family: var(--mono); margin-left: auto; }
.loc-item.loc-current { background: rgba(246, 179, 82, 0.1); box-shadow: 0 0 0 1px rgba(246, 179, 82, 0.4) inset; }
.loc-item.loc-current::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: blipPulse 1.2s infinite;
}
.loc-item.loc-ok .loc-state { color: var(--green); }
.loc-item.loc-error .loc-state { color: var(--red); }
.loc-state { font-size: 10.5px; font-family: var(--mono); width: 64px; text-align: right; flex: none; color: var(--ink3); }
.loc-dup { font-size: 10px; color: var(--orange); border: 1px solid rgba(255, 176, 32, 0.4); padding: 0 5px; border-radius: 4px; }

/* ---------------- 发现页 ---------------- */
.filter-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.filter-bar select, .filter-bar input { width: auto; min-width: 120px; }
.filter-bar input[type="search"] { min-width: 200px; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 13px; }
.feed-card {
  display: flex; flex-direction: column; gap: 10px; padding: 15px 16px; cursor: pointer;
  transition: all 0.24s var(--ease); position: relative; overflow: hidden;
}
.feed-card:hover { transform: translateY(-2px); border-color: var(--panel-br-strong); box-shadow: var(--shadow); }
.feed-card.is-new::after {
  content: "NEW"; position: absolute; top: 12px; right: -24px; transform: rotate(38deg);
  background: var(--gold); color: #241300; font-size: 9px; font-weight: 800; padding: 2px 26px; letter-spacing: 1px;
}
.feed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-msg { font-size: 14px; color: var(--ink); line-height: 1.5; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 11px; color: var(--ink3); font-family: var(--mono); }
.feed-reactions { display: flex; gap: 12px; font-size: 11.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.feed-reactions b { color: var(--ink); }
.feed-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed rgba(139, 156, 255, 0.12); padding-top: 9px; flex-wrap: wrap; }
.feed-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- 详情抽屉 ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(3, 5, 12, 0.62);
  backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.24s;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.overlay.show { opacity: 1; }
.overlay.side { justify-content: flex-end; padding: 0; }
.dialog {
  width: 520px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: #0d1330; border: 1px solid var(--panel-br-strong); border-radius: var(--r-lg);
  padding: 20px 22px; box-shadow: var(--shadow); transform: translateY(12px) scale(0.98);
  transition: transform 0.24s var(--ease);
}
.overlay.show .dialog { transform: none; }
.dialog-wide { width: 720px; }
.overlay.side .dialog {
  height: 100vh; max-height: none; border-radius: 0; width: 560px;
  border-top: none; border-bottom: none; border-right: none;
  transform: translateX(40px);
}
.overlay.show.side .dialog { transform: none; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; gap: 10px; }
.dialog-head h3 { font-size: 16px; }
.dialog-section { margin-bottom: 16px; }
.dialog-section h4 { font-size: 11.5px; color: var(--ink3); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; }
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 12.5px; }
.kv-grid dt { color: var(--ink3); white-space: nowrap; }
.kv-grid dd { color: var(--ink); word-break: break-all; font-variant-numeric: tabular-nums; }
.kv-grid dd code { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }

.comment-item { border: 1px solid var(--panel-br); border-radius: var(--r-md); padding: 10px 13px; margin-bottom: 8px; background: rgba(5, 8, 18, 0.4); }
.comment-item .c-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.comment-item .c-msg { font-size: 13px; color: var(--ink); }
.comment-item .c-meta { font-size: 10.5px; color: var(--ink3); margin-top: 5px; font-family: var(--mono); }

/* ---------------- ID 详情卡 ---------------- */
.idcard { display: flex; flex-direction: column; gap: 13px; }
.idcard-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.idcard-row > span:first-child { color: var(--ink3); width: 190px; flex: none; }
.idcard-full { font-family: var(--mono); font-size: 11px; color: var(--cyan); word-break: break-all; }

/* ---------------- 追踪页 ---------------- */
.track-grid { display: flex; flex-direction: column; gap: 13px; }
.track-card { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.track-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.track-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.track-title-row h3 { font-size: 15px; }
.track-history { border-left: 2px solid rgba(139, 156, 255, 0.18); padding-left: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.track-history .th-item { position: relative; font-size: 11.5px; color: var(--ink2); }
.track-history .th-item::before {
  content: ""; position: absolute; left: -19.5px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--panel-solid); border: 2px solid var(--ink3);
}
.th-item.th-seen::before { border-color: var(--green); }
.th-item.th-missing::before { border-color: var(--violet); background: var(--violet); }
.th-item.th-expired::before { border-color: var(--slate); background: var(--slate); }
.th-item .mono { color: var(--ink3); font-size: 10.5px; }
.judge-box {
  border: 1px solid rgba(183, 140, 255, 0.35); background: rgba(183, 140, 255, 0.06);
  border-radius: var(--r-md); padding: 11px 13px; font-size: 12px; color: var(--ink2);
  display: flex; flex-direction: column; gap: 5px;
}
.judge-box b { color: var(--violet); }
.rule-note {
  border: 1px solid rgba(111, 211, 255, 0.3); background: rgba(111, 211, 255, 0.05);
  border-radius: var(--r-md); padding: 13px 15px; font-size: 12.5px; color: var(--ink2);
  margin-bottom: 15px; line-height: 1.8;
}
.rule-note b { color: var(--cyan); }

/* ---------------- 举报目标页 ---------------- */
.target-card { display: flex; flex-direction: column; gap: 12px; }
.target-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.target-head h3 { font-size: 15px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hits-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hits-table th { text-align: left; color: var(--ink3); font-weight: 500; font-size: 11px; padding: 7px 9px; border-bottom: 1px solid var(--panel-br); letter-spacing: 0.5px; }
.hits-table td { padding: 8px 9px; border-bottom: 1px dashed rgba(139, 156, 255, 0.1); color: var(--ink2); vertical-align: top; }
.hits-table tr:last-child td { border-bottom: none; }
.hits-table code { font-family: var(--mono); font-size: 11px; color: var(--cyan); }

/* ---------------- 能力矩阵 ---------------- */
.cap-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cap-table th { text-align: left; color: var(--ink3); font-weight: 500; font-size: 11px; padding: 9px 11px; border-bottom: 1px solid var(--panel-br-strong); letter-spacing: 0.5px; }
.cap-table td { padding: 10px 11px; border-bottom: 1px dashed rgba(139, 156, 255, 0.1); vertical-align: top; color: var(--ink2); }
.cap-table td code { font-family: var(--mono); font-size: 11px; color: var(--cyan); word-break: break-all; }
.cap-table tr:hover td { background: rgba(139, 156, 255, 0.03); }
.cap-group-head td { padding: 14px 11px 6px; color: var(--gold); font-size: 12px; letter-spacing: 2px; border-bottom: none; }

/* ---------------- 举报确认 ---------------- */
.report-warn {
  border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.07);
  border-radius: var(--r-md); padding: 12px 14px; font-size: 12.5px; color: var(--ink2);
  display: flex; gap: 10px; margin-bottom: 14px; line-height: 1.7;
}
.report-warn b { color: var(--red); }
.report-form { display: flex; flex-direction: column; gap: 12px; }
.report-form label { font-size: 12px; color: var(--ink2); display: block; margin-bottom: 5px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

/* ---------------- 后台服务状态（普通前台 · 只读脱敏） ---------------- */
.svc-status {
  display: flex; align-items: flex-start; gap: 13px;
  border-radius: var(--r-md); padding: 14px 16px; border: 1px solid;
}
.svc-ico {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.svc-ok { border-color: rgba(88, 214, 163, 0.4); background: rgba(88, 214, 163, 0.07); }
.svc-ok .svc-ico { background: rgba(88, 214, 163, 0.2); color: var(--green); }
.svc-connecting, .svc-gate, .svc-maintenance, .svc-unknown {
  border-color: rgba(255, 176, 32, 0.4); background: rgba(255, 176, 32, 0.06);
}
.svc-connecting .svc-ico, .svc-gate .svc-ico, .svc-maintenance .svc-ico, .svc-unknown .svc-ico {
  background: rgba(255, 176, 32, 0.18); color: var(--orange);
}
.svc-down { border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.07); }
.svc-down .svc-ico { background: rgba(255, 107, 107, 0.2); color: var(--red); }
.svc-text b { font-size: 14.5px; }
.svc-text p { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.svc-meta { display: block; font-size: 10.5px; color: var(--ink3); margin-top: 6px; }

/* ---------------- 核心账号管理（管理员后台） ---------------- */
.ca-card { margin-bottom: 16px; }
.ca-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.ca-row {
  border: 1px solid var(--panel-br); border-radius: var(--r-md); padding: 10px 13px;
  background: rgba(5, 8, 18, 0.4); display: flex; flex-direction: column; gap: 3px;
}
.ca-row > span:first-child { font-size: 10.5px; color: var(--ink3); letter-spacing: 1px; }
.ca-row b { font-size: 14px; }
.ca-row code { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }
.ca-sub { font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; line-height: 1.6; }
.ca-pending p { font-size: 12.5px; color: var(--ink2); margin: 10px 0 12px; }
.ca-error {
  border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.07);
  border-radius: var(--r-md); padding: 10px 13px; font-size: 12px; color: var(--ink2);
  margin-bottom: 12px; word-break: break-all;
}
.ca-error b { color: var(--red); }
.ca-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.ca-cred {
  border: 1px dashed rgba(246, 179, 82, 0.4); background: rgba(246, 179, 82, 0.04);
  border-radius: var(--r-md); padding: 13px 15px; margin-top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.ca-cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ca-audit { margin-top: 14px; border-top: 1px dashed var(--panel-br); padding-top: 10px; }
.ca-audit-title { font-size: 11px; color: var(--ink3); letter-spacing: 1px; margin-bottom: 6px; }
.ca-audit-item { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink2); padding: 3px 0; }
.ca-audit-time { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); flex: none; padding-top: 1px; }
.ca-spin {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid rgba(111, 211, 255, 0.25); border-top-color: var(--cyan);
  animation: caSpin 0.8s linear infinite;
}
@keyframes caSpin { to { transform: rotate(360deg) } }
@media (max-width: 860px) {
  .ca-rows, .ca-cred-grid { grid-template-columns: 1fr; }
}

/* ---------------- 共享表单片段（管理员凭据表单等） ---------------- */
.lc-readonly {
  font-size: 12px; color: var(--ink3); border: 1px dashed var(--panel-br-strong);
  border-radius: var(--r-md); padding: 8px 13px;
}
.lc-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--ink3); }
.lc-field input {
  background: rgba(5, 8, 18, 0.6); border: 1px solid var(--panel-br-strong); color: var(--ink);
  border-radius: var(--r-sm); padding: 8px 11px; font-family: var(--sans); font-size: 13px;
  outline: none; transition: border-color 0.2s; width: 100%;
}
.lc-field input:focus { border-color: var(--gold); }
.lc-cred-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.lc-cred-err { color: var(--red); font-size: 12px; }

/* ---------------- 管理后台（页签 / 用户与审计表格） ---------------- */
.tag-real { color: #062b1c; background: var(--green); border-color: var(--green); font-size: 9.5px; padding: 1px 6px; }
.muted { color: var(--ink3); font-size: 12.5px; }
.view-head { margin-bottom: 16px; }
.view-head h2 { font-size: 21px; letter-spacing: 0.5px; }
.view-head .view-sub { color: var(--ink3); font-size: 12.5px; margin-top: 5px; line-height: 1.8; max-width: 860px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-tabs .btn.active { border-color: var(--gold); color: var(--gold); background: rgba(246, 179, 82, 0.08); }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--panel-br); border-radius: var(--r-md); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th { text-align: left; color: var(--ink3); font-weight: 500; font-size: 11px; padding: 9px 11px; border-bottom: 1px solid var(--panel-br-strong); letter-spacing: 0.5px; white-space: nowrap; }
.admin-table td { padding: 9px 11px; border-bottom: 1px dashed rgba(139, 156, 255, 0.1); vertical-align: top; color: var(--ink2); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(139, 156, 255, 0.03); }
.admin-edit h3 { font-size: 16px; margin-bottom: 12px; }
.admin-edit h4 { font-size: 11.5px; color: var(--ink3); letter-spacing: 1.5px; text-transform: uppercase; margin: 16px 0 8px; }
.admin-row { display: flex; gap: 14px; flex-wrap: wrap; }
.admin-row label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--ink3); }
.admin-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.admin-perm { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--panel-br); border-radius: var(--r-sm); padding: 7px 10px; font-size: 11.5px; color: var(--ink2); }
.admin-perm em { font-style: normal; color: var(--ink3); }

/* ---------------- 服务号池（第八轮 · 管理员专属） ---------------- */
.pool-card { margin-bottom: 16px; }
.pool-table td { font-size: 12px; }
.pool-masked { font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.pool-label { font-size: 11px; color: var(--ink2); margin-top: 3px; }
.pool-label-none { color: var(--ink3); }
.pool-sub { font-size: 10.5px; color: var(--ink3); font-family: var(--mono); }
.pool-err { font-size: 10.5px; color: var(--red); margin-top: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-num { font-variant-numeric: tabular-nums; text-align: right; }
.pool-locked {
  border: 1px dashed var(--panel-br-strong); border-radius: var(--r-md); padding: 16px 18px;
  font-size: 12.5px; color: var(--ink3); line-height: 1.8;
}
.pool-edit-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pool-edit-row input[type="text"] {
  flex: 1; min-width: 220px; background: rgba(5, 8, 18, 0.6); border: 1px solid var(--panel-br-strong);
  color: var(--ink); border-radius: var(--r-sm); padding: 8px 11px; font-size: 13px; outline: none;
}
.pool-edit-row input[type="text"]:focus { border-color: var(--gold); }
.ca-spin-xs { width: 10px; height: 10px; border-width: 1.5px; display: inline-block; vertical-align: -1px; }

/* 追踪历史补充：reactions 判定（第八轮） */
.th-item.th-confirmed::before { border-color: var(--violet); background: var(--violet); box-shadow: 0 0 8px rgba(183, 140, 255, 0.7); }
.th-item.th-absent::before { border-color: var(--ink3); }

/* ---------------- Toast ---------------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--r-md);
  background: rgba(13, 19, 48, 0.95); border: 1px solid var(--panel-br-strong); font-size: 12.5px;
  transform: translateX(30px); opacity: 0; transition: all 0.32s var(--ease); box-shadow: var(--shadow);
  max-width: 380px;
}
.toast.show { transform: none; opacity: 1; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--cyan); }
.toast-ok .toast-dot { background: var(--green); }
.toast-warn .toast-dot { background: var(--orange); }
.toast-alert .toast-dot { background: var(--red); }

/* ---------------- 页头 ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; letter-spacing: 0.5px; }
.page-head .page-sub { color: var(--ink3); font-size: 12.5px; margin-top: 3px; }
.page-head-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .hero, .overview-cols { grid-template-columns: 1fr; }
  .scan-layout { grid-template-columns: 1fr; }
  .track-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: 74px; padding: 18px 10px; }
  .brand-text, .nav-item span:not(.nav-ico):not(.nav-badge), .demo-box, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
