:root {
  --bg: #05080f;
  --bg-soft: #080d18;
  --panel: #0b1424;
  --panel-2: #0e1a2e;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(212,168,75,0.22);
  --gold: #d4a84b;
  --blue: #4db8ff;
  --green: #5cdb9a;
  --red: #ff6b6b;
  --purple: #b48cff;
  --text: #dbe5f2;
  --muted: #7d8fb0;
  --sidebar-w: 216px;
  --header-h: 54px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.6 "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  overflow: hidden;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 布局 ============ */
#app { display: flex; height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-soft);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.brand { height: var(--header-h); display: flex; align-items: center; gap: 9px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.brand .logo { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; flex: none; }
.brand .logo img, .h-brand .logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand .name, .h-brand .name { font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.brand .name span { color: var(--gold); }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-group { padding: 10px 10px 4px; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 7px;
  color: #a9b8d0; cursor: pointer; font-size: 13px; margin-bottom: 2px; border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav-item.active { background: rgba(212,168,75,0.12); color: var(--gold); border-color: rgba(212,168,75,0.28); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; opacity: .9; }
.nav-item .num { margin-left: auto; font-size: 10px; color: var(--muted); }
.sidebar-foot { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.header {
  height: var(--header-h); flex-shrink: 0; display: flex; align-items: center; gap: 16px;
  padding: 0 18px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
/* 顶栏系统名：态势总览无侧边栏时显示，配置视角由侧边栏品牌承担，避免重复 */
.h-brand { display: none; align-items: center; gap: 9px; }
#app.mode-situation .h-brand { display: flex; }
.h-brand .logo { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; flex: none; }
.h-brand .name span { color: var(--gold); }

.speed { display: flex; gap: 4px; }
.speed button {
  padding: 3px 9px; font-size: 11px; border-radius: 5px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted);
}
.speed button.active { background: var(--gold); color: #05080f; border-color: var(--gold); font-weight: 600; }
/* 顶栏仿真时钟：倍速按钮之后，配置中心视角查看当前仿真时刻 */
.hclock {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.15; padding: 0 12px; margin-left: 2px;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.hclock-t { font-size: 23px; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.hclock-d { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* 顶栏版权声明（紧跟仿真时钟，必须显眼） */
.h-copy {
  display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  padding: 4px 10px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.18), rgba(255, 107, 107, 0.06));
  border: 1px solid rgba(255, 107, 107, 0.42);
  animation: hc-glow 2.6s ease-in-out infinite;
}
.h-copy-ico {
  width: 19px; height: 19px; flex: none; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--red); box-shadow: 0 0 8px rgba(255, 107, 107, 0.55);
}
.h-copy-t { font-size: 12.5px; font-weight: 700; color: #ffb3b3; letter-spacing: .3px; }
@keyframes hc-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
  50% { box-shadow: 0 0 10px 1px rgba(255, 107, 107, 0.22); }
}
/* 版权声明下方的「关注公众号」按钮 + 二维码弹窗 */
.h-wx {
  display: flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 600; color: #7ce0ad;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(42, 187, 122, 0.16); border: 1px solid rgba(42, 187, 122, 0.45);
}
.h-wx:hover { background: rgba(42, 187, 122, 0.28); color: #a5f0c8; }
.h-wx .wx-ico { font-size: 11px; }
.wx-box { text-align: center; padding: 4px 0 2px; }
.wx-qr {
  width: 240px; margin: 0 auto 10px; padding: 8px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line);
}
.wx-qr img { width: 100%; height: auto; display: block; border-radius: 4px; }
.wx-t { font-size: 14px; font-weight: 700; }
.wx-s { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 1280px) { #app .h-brand { display: none; } }
.hstat { display: flex; gap: 14px; margin-left: auto; align-items: center; font-size: 12px; }
.hstat .k { color: var(--muted); }
.hstat .v { font-weight: 600; }

.task-bar .tb-ctr-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.task-bar .tb-time { font-family: Consolas, monospace; font-size: 13px; font-weight: 600; color: var(--gold); letter-spacing: .5px; }

/* 视角切换：态势总览 / 配置中心 */
#app.mode-situation .sidebar { display: none; }
.mode-switch { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.mode-switch button {
  padding: 4px 12px; font-size: 12px; border: none; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--muted); font-family: inherit;
}
.mode-switch button:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.mode-switch button.active { background: rgba(212,168,75,0.16); color: var(--gold); font-weight: 600; }

.view { flex: 1; overflow-y: auto; padding: 16px 18px 40px; }
.view-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.view-head h2 { font-size: 17px; font-weight: 700; }
.view-head .sub { color: var(--muted); font-size: 12px; }
.view-head .spacer { flex: 1; }

/* ============ 组件 ============ */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-size: 13px; font-weight: 600; }
.panel-head .spacer { flex: 1; }
.panel-head .hint { font-size: 11px; color: var(--muted); }
.panel-body { padding: 14px; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1400px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.intro {
  display: flex; gap: 14px; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(212,168,75,0.1), rgba(212,168,75,0.02));
  border: 1px solid rgba(212,168,75,0.22); border-left: 3px solid var(--gold);
}
.intro .txt { font-size: 12px; line-height: 1.75; color: #c3d0e2; }
.intro .txt b { color: var(--gold); }
.intro .mods { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 5px; max-width: 470px; align-content: flex-start; }
.intro .mods span { font-size: 11px; padding: 2px 8px; border-radius: 11px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: #b6c4da; }

.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
}
.stat .label { font-size: 11px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 3px; font-family: Consolas, monospace; }
.stat .foot { font-size: 11px; color: var(--muted); margin-top: 3px; }
.stat.gold .value { color: var(--gold); }
.stat.blue .value { color: var(--blue); }
.stat.green .value { color: var(--green); }
.stat.red .value { color: var(--red); }

.btn {
  padding: 6px 13px; font-size: 12px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line);
  background: rgba(255,255,255,0.05); color: #c3d0e2; transition: all .15s; font-family: inherit;
}
.btn:hover { background: rgba(255,255,255,0.1); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #05080f; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(255,107,107,0.4); background: rgba(255,107,107,0.1); }
.btn.blue { color: var(--blue); border-color: rgba(77,184,255,0.4); background: rgba(77,184,255,0.1); }
.btn.sm { padding: 3px 9px; font-size: 11px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: #b6c4da; }
.tag.ok { color: var(--green); border-color: rgba(92,219,154,0.35); background: rgba(92,219,154,0.1); }
.tag.warn { color: var(--gold); border-color: rgba(212,168,75,0.35); background: rgba(212,168,75,0.1); }
.tag.err { color: var(--red); border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.1); }
.tag.info { color: var(--blue); border-color: rgba(77,184,255,0.35); background: rgba(77,184,255,0.1); }
.tag.mute { color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--gold); }
.dot.err { background: var(--red); }
.dot.off { background: #4a5876; }

table.tb { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tb th {
  text-align: left; padding: 9px 12px; color: var(--muted); font-weight: 500; font-size: 11px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); white-space: nowrap;
}
table.tb td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
table.tb tbody tr:hover { background: rgba(255,255,255,0.03); }
table.tb tbody tr.sel { background: rgba(212,168,75,0.08); }
table.tb td.num { font-family: Consolas, monospace; }
.tb-wrap { overflow-x: auto; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); }
input, select, textarea {
  padding: 6px 9px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line);
  background: rgba(0,0,0,0.3); color: var(--text); font-family: inherit; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type=checkbox] { width: auto; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 130px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tab { padding: 7px 14px; font-size: 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width .3s; }
.bar.green > i { background: var(--green); }
.bar.gold > i { background: var(--gold); }

.log {
  font-family: Consolas, monospace; font-size: 11px; line-height: 1.8; background: rgba(0,0,0,0.35);
  border-radius: 8px; padding: 10px 12px; height: 240px; overflow-y: auto;
}
.log div { white-space: pre-wrap; word-break: break-all; }
.log .t { color: #5c6f90; }
.log .up { color: var(--blue); }
.log .down { color: var(--green); }
.log .warn { color: var(--gold); }
.log .err { color: var(--red); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12px; }
.kv .k { color: var(--muted); }
.kv .v { font-family: Consolas, monospace; }

.chart { width: 100%; height: 220px; display: block; }
.chart-box { background: rgba(0,0,0,0.25); border-radius: 8px; padding: 8px; }

/* 甘特图 */
.gantt { overflow-x: auto; }
.gantt-row { display: flex; align-items: center; height: 26px; }
.gantt-label { width: 130px; flex-shrink: 0; font-size: 11px; color: var(--muted); padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; flex: 1; height: 18px; background: rgba(255,255,255,0.03); border-radius: 3px; }
.gantt-bar { position: absolute; top: 2px; height: 14px; border-radius: 3px; font-size: 10px; line-height: 14px; padding: 0 5px; color: #05080f; font-weight: 600; overflow: hidden; white-space: nowrap; }
.gantt-bar.ttc { background: var(--blue); }
.gantt-bar.dt { background: var(--green); }
.gantt-bar.img { background: var(--gold); }
.gantt-bar.run { box-shadow: 0 0 0 1px #fff inset; }

/* 模态 */
.mask { position: fixed; inset: 0; background: rgba(2,4,10,0.72); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { width: 560px; max-width: 92vw; max-height: 86vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; }
.modal-head { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.modal-head .mh-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 16px; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.toast-wrap { position: fixed; top: 66px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 9px 16px; border-radius: 8px; font-size: 12px; background: var(--panel-2);
  border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  animation: slidein .2s ease;
}
.toast.ok { border-color: rgba(92,219,154,0.5); color: var(--green); }
.toast.err { border-color: rgba(255,107,107,0.5); color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }

/* 3D 容器 */
.earth-wrap { position: relative; height: 420px; background: radial-gradient(circle at 50% 45%, #0a1428, #04070e); border-radius: 10px; overflow: hidden; }
.earth-wrap canvas { display: block; }
.earth-legend { position: absolute; left: 12px; bottom: 12px; font-size: 11px; color: var(--muted); line-height: 1.9; }
.earth-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.earth-tip { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--muted); text-align: right; line-height: 1.8; }

.sat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 12px; font-size: 11px; background: rgba(77,184,255,0.1); border: 1px solid rgba(77,184,255,0.3); }
.link-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; }
.link-row:last-child { border-bottom: none; }
.link-row .nm { font-weight: 600; }
.link-row .sp { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.tm-val { font-family: Consolas, monospace; font-weight: 600; }
.tm-val.warn { color: var(--gold); }
.tm-val.err { color: var(--red); }
.tm-val.ok { color: var(--green); }
.tm-val.off { color: #4a5876; }

.para-list { max-height: 300px; overflow-y: auto; }
.para-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; cursor: pointer; }
.para-item:hover { background: rgba(255,255,255,0.03); }
.para-item.sel { background: rgba(212,168,75,0.08); }

.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.flow-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-align: center; }
.flow-cell .n { font-size: 11px; color: var(--muted); }
.flow-cell .v { font-size: 19px; font-weight: 700; font-family: Consolas, monospace; margin-top: 2px; }
/* 设备拓扑 */
.topo {
  position: relative; height: 560px; border-radius: 8px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(77,184,255,0.08), rgba(8,16,30,0.6) 70%);
  border: 1px solid #16283f;
  background-image: linear-gradient(rgba(77,184,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,184,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
}
.topo svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.tnode {
  position: absolute; transform: translate(-50%, -50%); width: 158px; padding: 8px 10px; cursor: default;
  background: rgba(13,30,52,0.94); border: 1px solid #2b5b8a; border-radius: 8px; text-align: center;
}
.tnode.core { background: rgba(212,168,75,0.12); border-color: var(--gold); }
.tnode .nm { font-size: 12px; font-weight: 600; line-height: 1.3; }
.tnode .ip { font-size: 10px; color: var(--muted); font-family: Consolas, monospace; margin-top: 3px; }
.tnode .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.ok { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.err { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot.off { background: #54637d; }
.tnode.ok { border-color: var(--green); }
.tnode.err { border-color: var(--red); }
.tnode.off { border-color: #54637d; opacity: 0.78; }
.tnode[data-id] { cursor: pointer; }
.tnode.sel { box-shadow: 0 0 0 2px var(--blue); }
/* 卡片式拓扑（参考地面站管理系统布局）：分层列标 + 设备卡片 + 图例 */
/* 固定布局拓扑节点（tn2） */
.tn2 { position: absolute; transform: translate(-50%, -50%); cursor: default; }
.tn2.card {
  width: 172px; text-align: left; padding: 7px 9px;
  background: rgba(13,30,52,0.94); border: 1px solid #2b5b8a; border-radius: 8px;
}
.tn2.card .hd { display: flex; align-items: center; gap: 6px; }
.tn2.card .hd .ico {
  width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; font-size: 11px; color: #8fd0ff;
  background: rgba(77,184,255,0.14); border: 1px solid rgba(77,184,255,0.35);
  display: flex; align-items: center; justify-content: center;
}
.tn2.card .hd .tt { flex: 1; font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.tn2.card .hd .dot { margin: 0 0 0 4px; }
.tn2.card .ln {
  font-size: 10px; color: var(--muted); font-family: Consolas, monospace; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn2.gray {
  width: 116px; padding: 9px 6px; text-align: center; font-size: 11px; font-weight: 600; color: #b6c4da;
  background: rgba(20,38,62,0.9); border: 1px solid #33507a; border-radius: 8px;
}
.tn2.gray .gtt { line-height: 1.3; }
.tn2.chip {
  padding: 2px 9px; border-radius: 10px; font-size: 10px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
}
.tn2.chip.b { background: rgba(77,184,255,0.16); border: 1px solid rgba(77,184,255,0.5); color: #8fd0ff; }
.tn2.chip.o { background: rgba(232,162,63,0.16); border: 1px solid rgba(232,162,63,0.55); color: #ffcf8a; }
.tn2.rail, .tn2.vbar {
  writing-mode: vertical-rl; text-orientation: upright; white-space: nowrap;
  border-radius: 12px; color: #9fc3e8; letter-spacing: 3px;
  background: rgba(77,184,255,0.1); border: 1px solid rgba(77,184,255,0.3);
}
.tn2.rail { padding: 12px 5px; font-size: 11px; }
.tn2.vbar {
  padding: 9px 4px; font-size: 10px; letter-spacing: 2px; border-radius: 8px; color: #8fd0ff;
  background: rgba(77,184,255,0.14); border-color: rgba(77,184,255,0.4);
}
.tn2.vbar.big { padding: 30px 7px; font-size: 12px; font-weight: 700; background: rgba(77,184,255,0.2); }
.tn2.ant { text-align: center; }
.tn2.ant .ip { font-size: 11px; color: #9fc3e8; margin-top: 2px; }
.tn2.off { opacity: 0.7; }
.tn2.card.err, .tn2.gray.err { border-color: var(--red); }
.tn2.card.off, .tn2.gray.off { border-color: #54637d; }
.tn2.sel { box-shadow: 0 0 0 2px var(--blue); }
.tn2[data-id] { cursor: pointer; }
.topo-legend2 { position: absolute; left: 12px; top: 73%; font-size: 11px; color: var(--muted); line-height: 2; }
.topo-legend2 .dot { margin-right: 5px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 12px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); }

/* 总览：顶部任务条 */
.task-bar {
  position: relative;
  display: flex; align-items: center; gap: 16px; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(212,168,75,0.12), rgba(212,168,75,0.02));
  border: 1px solid rgba(212,168,75,0.26); border-left: 3px solid var(--gold);
}
.task-bar .tb-main { min-width: 0; }
.task-bar .tb-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.task-bar .tb-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.task-bar .tb-sub .mono { color: #b6c4da; }
/* 当前任务：名称居中放大显示 + 图标式切换下拉 */
.task-bar .tb-ctr { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; }
.task-bar .tb-tname { font-size: 19px; font-weight: 700; letter-spacing: .5px; color: var(--text); white-space: nowrap; }
.task-bar .btn[disabled] { opacity: .35; cursor: not-allowed; }
.task-bar .btn[disabled]:hover { background: rgba(255, 255, 255, 0.05); color: var(--muted); }

/* 轻量下拉选择（聚焦卫星） */
.pick-menu {
  position: fixed; z-index: 80; min-width: 240px; max-width: 320px; padding: 6px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.pick-menu .pick-item { padding: 8px 10px; border-radius: 6px; font-size: 13px; color: #b6c4da; cursor: pointer; white-space: nowrap; }
.pick-menu .pick-item:hover { background: rgba(77, 184, 255, 0.12); color: var(--text); }

/* 任务抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(3, 6, 12, 0.55); z-index: 60; display: none; }
.drawer-mask.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 61; width: 460px; max-width: 92vw; height: 100vh;
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: -14px 0 36px rgba(0, 0, 0, 0.5); transform: translateX(100%); transition: transform .22s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 15px; font-weight: 700; }
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 14px 26px; }
.dr-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02); cursor: pointer;
}
.dr-row:hover { border-color: rgba(77, 184, 255, 0.45); background: rgba(77, 184, 255, 0.06); }
.dr-row.sel { border-color: var(--gold); background: rgba(212, 168, 75, 0.08); }
.dr-row .dr-l { flex: 1; min-width: 0; }
.dr-row .dr-nm { font-size: 13px; font-weight: 600; }
.dr-row .dr-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dr-row .dr-r { text-align: right; }
.dr-row .dr-cd { font-family: Consolas, monospace; font-size: 17px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.dr-row .dr-lab { font-size: 11px; color: var(--muted); }
.task-bar .spacer { flex: 1; }
.task-bar .tb-mid { display: flex; gap: 18px; font-size: 12px; }
.task-bar .tb-mid .k { color: var(--muted); margin-right: 5px; }
.cd-box { text-align: right; min-width: 150px; }
.cd-box .cd { font-family: Consolas, monospace; font-size: 25px; font-weight: 700; color: var(--gold); line-height: 1.15; }
.cd-box .cd.over { color: var(--muted); }
.cd-box .cd.run { color: var(--green); }
.cd-box .cd-lab { font-size: 11px; color: var(--muted); }
.cd-box .bar { margin-top: 4px; }

/* 总览：三维地球铺满 */
.view.dash-fill { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 16px; }
.dash-earth { flex: 1; min-height: 0; margin-bottom: 0; display: flex; flex-direction: column; }
.dash-earth .panel-body { flex: 1; min-height: 0; }
.earth-wrap.fill { height: 100%; }
/* 总览：过站快捷操作浮层（三维地球右上） */
.dash-earth .panel-body { position: relative; }
.dash-quick {
  position: absolute; top: 12px; right: 12px; width: 252px; z-index: 5;
  background: rgba(10, 20, 34, 0.9); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px; padding: 10px 11px;
}
.dash-quick .qc-title { font-size: 12px; font-weight: 700; color: var(--gold); }
.dash-quick .qc-hint { font-size: 11px; color: var(--muted); margin: 3px 0 8px; }
.dash-quick .qc-row { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.dash-quick .qc-row:first-of-type { border-top: none; }
.dash-quick .qc-nm { font-size: 12px; font-weight: 600; }
.dash-quick .qc-sub { font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.dash-quick .qc-btns { display: flex; gap: 6px; }
.dash-quick .qc-empty { font-size: 11px; color: var(--muted); padding: 6px 0; }
/* 数据传输与处理：端点卡片 / 卫星多选 / L0~L4 处理卡片 */
.ep-card { border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.02); }
.ep-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.ep-hd b { flex: 1; }
.ep-kv { display: flex; gap: 10px; font-size: 11px; margin-bottom: 4px; }
.ep-kv > span { color: var(--muted); width: 66px; flex-shrink: 0; }
.ep-kv > b { font-weight: 600; word-break: break-all; }
.ep-sat { font-size: 11px; margin: 8px 0 6px; }
.ep-sat > span { color: var(--muted); display: block; margin-bottom: 4px; }
.ep-sat .tag { margin: 0 4px 4px 0; }
.ep-op { display: flex; gap: 6px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.sat-pick { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.25); }
.chk { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
/* 影像处理模拟：L0~L4 步骤进度条 */
.pc-wrap { padding-top: 2px; }
.pc-steps { position: relative; margin: 4px 0 10px; }
.pc-track { position: absolute; left: 10%; right: 10%; top: 15px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.pc-track i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #2f7fd8, var(--gold)); transition: width .12s linear; }
.pc-row { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pc-node { text-align: center; padding: 0 6px; }
.pc-dot {
  width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #16233a; border: 2px solid rgba(255, 255, 255, 0.16); color: var(--muted);
}
.pc-node.done .pc-dot { background: rgba(42, 187, 122, 0.16); border-color: #2abb7a; color: #7ce0ad; }
.pc-node.next .pc-dot { background: rgba(212, 168, 74, 0.16); border-color: var(--gold); color: var(--gold); }
.pc-node.run .pc-dot { background: rgba(47, 127, 216, 0.2); border-color: #2f7fd8; color: #9ec8ff; animation: pc-pulse 1s infinite; }
@keyframes pc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 127, 216, .45); } 50% { box-shadow: 0 0 0 7px rgba(47, 127, 216, 0); } }
.pc-tt { font-size: 12.5px; font-weight: 600; margin: 8px 0 4px; }
.pc-desc { font-size: 11px; color: var(--muted); line-height: 1.55; min-height: 34px; }
.pc-node .btn { margin: 4px 0 5px; }
.pc-st { font-size: 11px; color: var(--muted); }
.pc-st.done { color: #7ce0ad; }
.pc-st.next { color: var(--gold); }
.pc-st.warn { color: #9ec8ff; }
.pc-preview { margin-top: 4px; min-height: 300px; }
.pc-pv { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; background: rgba(255, 255, 255, 0.02); }
.pc-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.pc-tabs .hint { margin-right: 2px; }
.pc-pv-body { display: flex; gap: 16px; align-items: flex-start; }
/* 左侧影像：竖幅 3:4（1773×2364），等比缩放不裁切 */
.pc-shot { flex: 0 0 318px; max-width: 318px; }
.pc-frame {
  width: 318px; height: 424px;                       /* 3:4 竖幅比例 */
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pc-frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.pc-shot.raw .lv-raw { height: 380px; }
.pc-cap { margin-top: 6px; font-size: 11px; color: var(--muted); text-align: center; }
/* 右侧元信息 */
.pc-mt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.pc-md { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 6px 0 10px; }
.pc-kv { display: flex; gap: 10px; font-size: 11.5px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.pc-kv span { width: 96px; flex: none; color: var(--muted); }
.pc-kv b { font-weight: 600; color: #e8f1ff; }
/* 详细说明：这一级做了什么处理 / 成果用途 */
.pc-meta { flex: 1; min-width: 0; max-height: 438px; overflow-y: auto; padding-right: 6px; }
.pc-sec { margin-top: 11px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 9px; }
.pc-sec-t { font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.pc-ul { margin: 0; padding-left: 16px; }
.pc-ul li { font-size: 11.5px; line-height: 1.75; color: #c9d6ea; margin-bottom: 3px; }
.pc-ul.use li { color: #a9bcd8; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; color: #9ec8ff;
  background: rgba(47, 127, 216, 0.14); border: 1px solid rgba(47, 127, 216, 0.35);
}
.pc-empty { border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 34px 0; text-align: center; }
.pc-empty .ph-t { font-size: 13px; color: var(--muted); font-weight: 600; }
.pc-empty .ph-s { font-size: 11px; color: #4d5a72; margin-top: 5px; }
.proc-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.proc-bar .bar { flex: 1; }
.proc-bar .mono { font-size: 12px; color: var(--gold); min-width: 42px; text-align: right; }
.lv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lv-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: rgba(255, 255, 255, 0.02); }
.lv-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lv-hd b { flex: 1; }
.lv-d { font-size: 11px; color: var(--muted); margin: 5px 0 8px; line-height: 1.6; }
.lv-img { height: 150px; border-radius: 7px; overflow: hidden; background: rgba(0, 0, 0, 0.35); display: flex; align-items: center; justify-content: center; }
.lv-img img { width: 100%; height: 100%; object-fit: cover; }
.lv-img.ph { border: 1px dashed rgba(255, 255, 255, 0.22); flex-direction: column; gap: 5px; text-align: center; }
.lv-img.ph .ph-t { font-size: 13px; color: var(--muted); font-weight: 600; }
.lv-img.ph .ph-s { font-size: 11px; color: #4d5a72; }
.lv-raw { font-family: Consolas, monospace; font-size: 11px; line-height: 1.5; color: #7fd3a3; background: rgba(0, 0, 0, 0.4); border-radius: 7px; padding: 8px 9px; height: 122px; overflow: hidden; word-break: break-all; }
.lv-aux { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px 10px; margin-top: 7px; font-size: 11px; }
.lv-aux > div { display: flex; gap: 6px; }
.lv-aux span { color: var(--muted); }
.lv-aux b { font-weight: 600; }

/* 总览：成像作业（拍照过程）浮层（三维地球左下） */
.dash-img {
  position: absolute; left: 12px; bottom: 12px; width: 312px; max-height: 52%; overflow-y: auto; z-index: 5;
  background: rgba(10, 20, 34, 0.9); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px; padding: 10px 11px;
}
.dash-img .qc-title { font-size: 12px; font-weight: 700; color: var(--gold); }
.dash-img .qc-hint { font-size: 11px; color: var(--muted); margin: 3px 0 8px; }
.dash-img .qc-row { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.dash-img .qc-row:first-of-type { border-top: none; }
.dash-img .qc-nm { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dash-img .qc-sub { font-size: 11px; color: var(--muted); margin: 3px 0 5px; }
.dash-img .qc-kv { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 5px; }
.dash-img .qc-kv b { color: #e8f1ff; font-family: Consolas, monospace; font-weight: 600; }
.dash-img .qc-empty { font-size: 11px; color: var(--muted); padding: 6px 0; }
.dash-img .bar { margin: 4px 0 0; }

.earth-hud { position: absolute; top: 12px; left: 12px; font-size: 11px; color: var(--muted); line-height: 1.9; }
.earth-hud b { color: var(--text); font-family: Consolas, monospace; }

.link { color: var(--blue); cursor: pointer; text-decoration: none; border-bottom: 1px dashed rgba(77,184,255,0.45); }
.link:hover { color: #9ad4ff; border-bottom-style: solid; }
.mono { font-family: Consolas, monospace; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.mb8 { margin-bottom: 8px; }
.flex { display: flex; gap: 8px; align-items: center; }
.scroll-list { max-height: 320px; overflow-y: auto; }

/* 遥控：协议配置 */
.proto-grid { display: grid; grid-template-columns: 250px 1fr; gap: 12px; align-items: start; }
.ptree-root { font-size: 12px; font-weight: 600; color: var(--blue); padding: 4px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ptree-item { font-size: 12px; color: var(--muted); padding: 6px 8px 6px 18px; cursor: pointer; border-left: 2px solid transparent; border-radius: 0 5px 5px 0; }
.ptree-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.ptree-item.sel { background: rgba(77,184,255,0.1); border-left-color: var(--blue); color: var(--text); }
table.tb input, table.tb select {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 5px; color: var(--text); font-size: 12px; padding: 5px 8px; font-family: inherit;
}
table.tb input.mono { font-family: Consolas, monospace; }
table.tb input:focus, table.tb select:focus { outline: none; border-color: var(--blue); }
table.tb td .btn { margin-right: 4px; }

/* ============ 演示指南页 ============ */
.gd { max-width: 1280px; margin: 0 auto; }
.gd-hero {
  display: flex; gap: 18px; align-items: stretch; padding: 16px 18px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid rgba(212, 168, 75, 0.22); border-left: 3px solid var(--gold);
  background: linear-gradient(100deg, rgba(212, 168, 75, 0.12), rgba(212, 168, 75, 0.02) 55%, rgba(77, 184, 255, 0.06));
}
.gd-hero-l { flex: 1; min-width: 0; }
.gd-kicker { font-size: 10px; letter-spacing: 2px; color: var(--gold); opacity: .85; }
.gd-hero h2 { font-size: 20px; font-weight: 700; margin: 4px 0 6px; }
.gd-sub { font-size: 12.5px; color: #a9bcd8; line-height: 1.75; max-width: 760px; }
.gd-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gd-stat {
  min-width: 108px; padding: 7px 12px; border-radius: 8px; background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
}
.gd-stat b { display: block; font-size: 15px; color: var(--gold); font-family: Consolas, monospace; }
.gd-stat span { font-size: 11px; color: var(--muted); }
.gd-hero-r { width: 226px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.gd-act-t { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.gd-act { width: 100%; text-align: left; }
.gd-act-h { font-size: 10.5px; color: #4d5a72; line-height: 1.6; margin-top: 4px; }

.gd-body { display: flex; gap: 18px; align-items: flex-start; }
.gd-toc { width: 186px; flex: none; position: sticky; top: 0; }
.gd-toc-t { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); padding: 0 0 6px 10px; }
.gd-toc-i {
  padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 4px;
  border: 1px solid transparent; border-left: 2px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.02);
}
.gd-toc-i:hover { background: rgba(255, 255, 255, 0.05); border-left-color: var(--gold); }
.gd-toc-i b { display: block; font-size: 12px; font-weight: 600; }
.gd-toc-i span { font-size: 10.5px; color: var(--muted); }
.gd-main { flex: 1; min-width: 0; }

.gd-sec { margin-bottom: 22px; scroll-margin-top: 8px; }
.gd-sec-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.gd-sec-h i { width: 3px; height: 15px; border-radius: 2px; background: var(--gold); }
.gd-sec-h h3 { font-size: 14px; font-weight: 700; }
.gd-sec-h span { font-size: 11px; color: var(--muted); }
.gd-grid { display: grid; gap: 10px; }
.gd-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.gd-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--panel); }
.gd-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.gd-card-h i {
  width: 20px; height: 20px; flex: none; border-radius: 5px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  background: rgba(212, 168, 75, 0.14); border: 1px solid rgba(212, 168, 75, 0.32);
}
.gd-card-h b { font-size: 12.5px; }
.gd-card-d { font-size: 11.5px; color: #a9bcd8; line-height: 1.7; }

.gd-stop { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--panel); }
.gd-stop.focus { border-color: rgba(212, 168, 75, 0.4); box-shadow: 0 0 0 1px rgba(212, 168, 75, 0.14) inset; }
.gd-stop-hd { display: flex; align-items: center; gap: 10px; }
.gd-stop-n {
  width: 26px; height: 26px; flex: none; border-radius: 50%; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #9ec8ff;
  background: rgba(47, 127, 216, 0.16); border: 1px solid rgba(77, 184, 255, 0.35);
}
.gd-stop.focus .gd-stop-n { color: var(--gold); background: rgba(212, 168, 75, 0.16); border-color: rgba(212, 168, 75, 0.45); }
.gd-stop-t { flex: 1; min-width: 0; }
.gd-stop-t b { font-size: 13px; }
.gd-stop-t span { font-size: 11px; color: var(--muted); margin-left: 8px; }
.gd-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 9px 0 10px; }
.gd-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px; color: #c9d6ea;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.gd-arrow { color: var(--muted); font-size: 12px; }
.gd-stop-b { display: flex; gap: 16px; align-items: flex-start; }
.gd-col { flex: 1; min-width: 0; }
.gd-col.point { flex: 0 0 268px; }
.gd-col-t { font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 5px; }
.gd-ul { margin: 0; padding-left: 16px; }
.gd-ul li { font-size: 11.5px; line-height: 1.75; color: #c9d6ea; margin-bottom: 3px; }
.gd-point {
  font-size: 11.5px; line-height: 1.8; color: #c9d6ea; padding: 9px 11px; border-radius: 8px;
  background: rgba(212, 168, 75, 0.07); border: 1px dashed rgba(212, 168, 75, 0.28);
}
.gd-note {
  margin-top: 12px; padding: 11px 13px; border-radius: 9px;
  background: rgba(255, 107, 107, 0.05); border: 1px dashed rgba(255, 107, 107, 0.28);
}
.gd-note-t { font-size: 11.5px; font-weight: 700; color: #ff9b9b; margin-bottom: 6px; }
@media (max-width: 1240px) {
  .gd-hero { flex-direction: column; }
  .gd-hero-r { width: 100%; }
  .gd-stop-b { flex-direction: column; }
  .gd-col.point { flex: 1 1 auto; width: 100%; }
}
