﻿/* ============================================================================
   纾愯　 路 娣遍儴鐭夸簳鏅鸿兘寮€閲囦笌鐡︽柉闃叉不涓灑 鈥斺€?璁捐绯荤粺
   鐗堝紡璇█锛氳摑鏅掔熆鍥撅紙cyanotype锛夈€傛繁鏅瞾澹摑搴?+ 鐧借壊缁樺浘绾?+ 鐭跨伅鐞ョ弨鏍囨敞锛?   鍓栭潰鍥句笌缃戠粶鍥炬寜宸ョ▼鍥剧焊缁樺埗锛屽崱鐗囦繚鐣欏浘妗嗚鏍囦笌鍥惧彿銆?   绾潤鎬侊細鏃?CDN銆佹棤澶栭儴瀛椾綋銆佹棤鏋勫缓銆?   ============================================================================ */

:root {
  --paper: #07182b;
  --paper-2: #0a2440;
  --panel: #0d3050;
  --panel-2: #10395d;
  --panel-3: #14456d;
  --ink: #e9f2f9;
  --ink-2: #c2d5e4;
  --muted: #8ba8c0;
  --faint: #61809a;
  --line: rgba(233, 242, 249, .14);
  --line-2: rgba(233, 242, 249, .24);
  --line-3: rgba(233, 242, 249, .42);
  --amber: #f2b544;
  --amber-2: #ffd27a;
  --amber-dim: rgba(242, 181, 68, .16);
  --red: #f06a55;
  --red-2: #ff9b86;
  --red-dim: rgba(240, 106, 85, .14);
  --green: #48cfa6;
  --green-dim: rgba(72, 207, 166, .13);
  --cyan: #63b7e6;
  --cyan-dim: rgba(99, 183, 230, .13);
  --violet: #a99cf0;
  --coal: #16222c;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", Arial, sans-serif;
  --shadow: 0 22px 48px -34px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 1460px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  background:
    radial-gradient(1400px 760px at 14% -12%, rgba(99, 183, 230, .13), transparent 62%),
    radial-gradient(900px 520px at 92% 4%, rgba(242, 181, 68, .07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(150, 200, 235, .065) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(150, 200, 235, .065) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(150, 200, 235, .05) 0 1px, transparent 1px 160px),
    repeating-linear-gradient(90deg, rgba(150, 200, 235, .05) 0 1px, transparent 1px 160px),
    linear-gradient(180deg, #0a2440 0%, #081d33 62%, #071629 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, dt, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
b, strong { font-weight: 600; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 楠ㄦ灦 */
.shell {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(7, 24, 43, .96), rgba(9, 30, 50, .92));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 14px;
  z-index: 20;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-2);
  width: 54px;
}
.rail-code {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--amber);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 0;
  flex: 1;
}
.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 2px 8px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  position: relative;
  transition: color .16s, background .16s;
}
.rail-item svg { width: 21px; height: 21px; }
.rail-item span { font-size: 10.5px; letter-spacing: .02em; }
.rail-item:hover { color: var(--ink); background: rgba(99, 183, 230, .07); }
.rail-item.on { color: var(--ink); background: rgba(242, 181, 68, .1); }
.rail-item.on::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--amber);
}
.rail-item.on svg { color: var(--amber); }

.rail-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed var(--line-2);
  padding-top: 10px;
  width: 54px;
}
.rail-scale { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: .06em; }
.rail-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.stage { display: flex; flex-direction: column; min-width: 0; }

/* ---------------------------------------------------------------- 鍥剧 */
.titleblock {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(12, 42, 70, .92), rgba(8, 26, 45, .86));
  padding: 0 22px;
  min-height: 62px;
}
.tb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 0;
  border-right: 1px solid var(--line);
  min-width: 300px;
}
.tb-mark {
  width: 3px; height: 32px;
  background: linear-gradient(180deg, var(--amber), rgba(242, 181, 68, .15));
}
.tb-name b { display: block; font-size: 17px; letter-spacing: .06em; line-height: 1.2; }
.tb-name b em { font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: .18em; color: var(--amber); margin-left: 6px; vertical-align: 2px; }
.tb-name span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .02em; margin-top: 2px; }

.tb-cells { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.tb-cell {
  padding: 9px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.tb-cell dt { font-size: 9.5px; letter-spacing: .18em; color: var(--faint); }
.tb-cell dd { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.tb-cell.state { min-width: 128px; }

.tb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
}
.role-pick { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--faint); }
.role-pick select {
  background: rgba(7, 24, 43, .9);
  color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 5px 8px;
  font: 11.5px/1.4 var(--sans);
  min-width: 132px;
  cursor: pointer;
}
.role-pick select:focus { outline: 1px solid var(--amber); }

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.state-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-badge.ok { color: var(--green); border-color: rgba(72, 207, 166, .42); background: var(--green-dim); }
.state-badge.warn { color: var(--amber); border-color: rgba(242, 181, 68, .45); background: var(--amber-dim); }
.state-badge.bad { color: var(--red); border-color: rgba(240, 106, 85, .45); background: var(--red-dim); }

/* ---------------------------------------------------------------- 涓诲尯 */
.main { padding: 14px 22px 0; flex: 1; }
.view { display: none; }
.view.active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.static .view.active { animation: none; }

.view-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--amber);
  margin-bottom: 6px;
}
.view-head h1 {
  font-size: 29px;
  line-height: 1.22;
  letter-spacing: -.01em;
  font-weight: 700;
}
.view-head h1 span { color: var(--amber-2); }
.view-head p {
  margin-top: 6px;
  max-width: 1000px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.62;
}
.vh-r { display: flex; gap: 22px; align-items: flex-end; padding-bottom: 4px; }
.vh-stat { text-align: right; border-left: 1px solid var(--line-2); padding-left: 16px; }
.vh-stat b { display: block; font-family: var(--mono); font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.vh-stat span { font-size: 10px; color: var(--faint); letter-spacing: .08em; }

/* ---------------------------------------------------------------- 闈㈡澘 */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 54, 88, .9), rgba(11, 37, 61, .9));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(233, 242, 249, .05);
  min-width: 0;
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  border: 0 solid rgba(242, 181, 68, .8);
  pointer-events: none;
}
.panel::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.panel::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px dashed var(--line-2);
  min-height: 32px;
}
.panel-head .pno {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--amber);
  border: 1px solid rgba(242, 181, 68, .32);
  padding: 1px 4px;
  flex: none;
}
.panel-head h2 { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.ph-hint { margin-left: auto; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-body { padding: 14px; }
.panel-body.tight { padding: 10px 12px; }

/* ---------------------------------------------------------------- 鎬昏甯冨眬 */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 388px; gap: 12px; align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ov-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.panel-section .panel-body { padding: 8px 10px 6px; }
.sec-wrap { position: relative; }
.sec-svg { display: block; width: 100%; height: auto; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
.kpi {
  background: linear-gradient(180deg, rgba(16, 54, 88, .96), rgba(10, 34, 56, .96));
  padding: 9px 11px 8px;
  position: relative;
}
.kpi span { display: block; font-size: 10px; color: var(--faint); letter-spacing: .08em; }
.kpi b {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -.03em;
  margin-top: 3px;
}
.kpi b u { text-decoration: none; font-size: 11px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi i { font-style: normal; font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }
.kpi.ok b { color: var(--green); }
.kpi.warn b { color: var(--amber); }
.kpi.bad b { color: var(--red); }
.kpi.warn::after, .kpi.bad::after {
  content: "";
  position: absolute; right: 8px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.kpi.warn::after { background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.kpi.bad::after { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* 闂ㄧ */
.gate {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.gate:last-child { border-bottom: 0; }
.gate-flag {
  width: 14px; height: 14px;
  border: 1px solid var(--line-3);
  display: grid; place-items: center;
  font-size: 9px;
  font-family: var(--mono);
}
.gate.ok .gate-flag { border-color: rgba(72, 207, 166, .6); color: var(--green); background: var(--green-dim); }
.gate.warn .gate-flag { border-color: rgba(242, 181, 68, .6); color: var(--amber); background: var(--amber-dim); }
.gate.bad .gate-flag { border-color: rgba(240, 106, 85, .6); color: var(--red); background: var(--red-dim); }
.gate-name { font-size: 11.5px; color: var(--ink-2); }
.gate-name i { font-style: normal; display: block; font-size: 10px; color: var(--faint); }
.gate-val { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.gate.ok .gate-val { color: var(--green); }
.gate.warn .gate-val { color: var(--amber); }
.gate.bad .gate-val { color: var(--red); }
.gate-val em { font-style: normal; font-size: 9.5px; color: var(--faint); display: block; }

/* AI 鍗?*/
.ai-item { border-bottom: 1px dashed var(--line); padding: 7px 0; }
.ai-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.ai-top { display: flex; gap: 7px; align-items: baseline; }
.ai-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; margin-top: 6px; }
.ai-dot.ok { background: var(--green); }
.ai-dot.warn { background: var(--amber); }
.ai-dot.bad { background: var(--red); }
.ai-title { font-size: 12px; font-weight: 600; line-height: 1.45; }
.ai-body { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin: 2px 0 4px 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-ev { display: flex; flex-wrap: wrap; gap: 4px; margin-left: 12px; }
.ai-ev span {
  font-size: 9.5px;
  border: 1px solid var(--line);
  padding: 1px 5px;
  color: var(--faint);
  font-family: var(--mono);
}
.ai-ev span b { color: var(--ink-2); font-weight: 500; margin-right: 3px; }
.ai-link {
  margin-left: 12px;
  margin-top: 6px;
  background: none; border: 0; padding: 0;
  color: var(--cyan);
  font-size: 10.5px;
  cursor: pointer;
  border-bottom: 1px dashed rgba(99, 183, 230, .45);
}
.ai-link:hover { color: var(--amber-2); }

/* 鐝 */
.shift-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11px;
}
.shift-row:last-child { border-bottom: 0; }
.shift-row b { font-weight: 600; }
.shift-row .sr-bar { height: 5px; background: rgba(233, 242, 249, .1); position: relative; }
.shift-row .sr-bar i { position: absolute; inset: 0 auto 0 0; background: var(--cyan); }
.shift-row.running .sr-bar i { background: var(--amber); }
.shift-row .sr-val { font-family: var(--mono); text-align: right; color: var(--ink-2); }
.shift-row .sr-val em { font-style: normal; color: var(--faint); font-size: 9.5px; display: block; }

/* ---------------------------------------------------------------- 浼犳劅鍣ㄦ潯 */
.sensor-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.sensor {
  border: 1px solid var(--line);
  background: rgba(9, 32, 53, .55);
  padding: 5px 8px 4px;
}
.sensor-top { display: flex; align-items: baseline; gap: 6px; }
.sensor-id { font-family: var(--mono); font-size: 10px; color: var(--amber); }
.sensor-name { font-size: 10.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sensor-val { margin-left: auto; font-family: var(--mono); font-size: 13px; }
.sensor.ok .sensor-val { color: var(--green); }
.sensor.warn .sensor-val { color: var(--amber); }
.sensor.bad .sensor-val { color: var(--red); }
.sensor svg { display: block; width: 100%; height: 20px; margin-top: 2px; }
.sensor-foot { display: flex; justify-content: space-between; font-size: 9px; color: var(--faint); font-family: var(--mono); }

/* ---------------------------------------------------------------- 宸ヤ綔闈?*/
.fc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .86fr);
  gap: 14px;
  align-items: start;
}
.panel-plan { grid-column: 1 / 3; grid-row: 1; }
.panel-fcsliders { grid-column: 3; grid-row: 1; }
.panel-fcout { grid-column: 1; grid-row: 2; }
.panel-fcshift { grid-column: 2 / 4; grid-row: 2; }
.fc-formula { border-top: 1px dashed var(--line-2); padding: 8px 12px 10px; }
.fc-formula div {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.7;
}
.fc-formula div em { font-style: normal; color: var(--faint); }
.fc-formula div b { color: var(--amber-2); font-weight: 500; }
.fc-grid .wide { grid-column: 1 / -1; }

.plan-svg { display: block; width: 100%; height: auto; }

/* 婊戝潡 */
.slider { padding: 9px 0 11px; border-bottom: 1px dashed var(--line); }
.slider:last-child { border-bottom: 0; padding-bottom: 0; }
.slider-top { display: flex; align-items: baseline; gap: 8px; }
.slider-top label { font-size: 11.5px; color: var(--ink-2); }
.slider-top label i { font-style: normal; color: var(--faint); font-size: 10px; margin-left: 5px; }
.slider-top b { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--amber-2); }
.slider-top b u { text-decoration: none; font-size: 9.5px; color: var(--faint); margin-left: 2px; }
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 3px 0 0;
  background: transparent;
  cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 3px;
  background:
    linear-gradient(90deg, rgba(242, 181, 68, .65), rgba(242, 181, 68, .18)),
    repeating-linear-gradient(90deg, rgba(233, 242, 249, .35) 0 1px, transparent 1px 12px);
  border-top: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 15px;
  margin-top: -6px;
  background: var(--amber);
  border: 1px solid #2a1c06;
  box-shadow: 0 0 0 3px rgba(242, 181, 68, .16), 0 0 12px rgba(242, 181, 68, .5);
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
}
input[type=range]:focus-visible { outline: 1px dashed var(--amber); outline-offset: 3px; }
.slider-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--faint); margin-top: -2px; }

/* 杈撳嚭琛?*/
.out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.out-cell { background: rgba(10, 34, 56, .72); padding: 8px 10px; }
.out-cell span { display: block; font-size: 10px; color: var(--faint); }
.out-cell b { display: block; font-family: var(--mono); font-size: 17px; letter-spacing: -.02em; margin-top: 1px; }
.out-cell b u { text-decoration: none; font-size: 10px; color: var(--muted); margin-left: 2px; }
.out-cell.span2 { grid-column: 1 / -1; }
.out-cell i { font-style: normal; font-size: 9.5px; color: var(--faint); display: block; margin-top: 1px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.amber { color: var(--amber-2); }

/* 琛?*/
table.tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
table.tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: .06em;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
table.tbl td { padding: 5px 8px; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.num, table.tbl th.num { text-align: right; font-family: var(--mono); }
table.tbl td.num { color: var(--ink); }
table.tbl tr.sel td { background: rgba(242, 181, 68, .08); }

/* 鍙樻洿鍗?*/
.doc-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.field { min-width: 0; }
.field label { display: block; font-size: 10px; color: var(--faint); letter-spacing: .06em; margin-bottom: 3px; }
.field .val {
  font-family: var(--mono);
  font-size: 13px;
  border-bottom: 1px dashed var(--line-2);
  padding: 3px 0;
  color: var(--ink);
}
.field .val.amber { color: var(--amber-2); }
.field.wide { grid-column: 1 / -1; }
.field textarea, .field input[type=text] {
  width: 100%;
  background: rgba(7, 24, 43, .72);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font: 12px/1.6 var(--sans);
  padding: 6px 8px;
  resize: vertical;
  min-height: 32px;
}
.field textarea:focus, .field input[type=text]:focus { outline: 1px solid var(--amber); }

.check-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.check {
  border: 1px solid var(--line-2);
  padding: 7px 9px;
  position: relative;
  background: rgba(9, 32, 53, .5);
}
.check span { font-size: 9.5px; color: var(--faint); display: block; letter-spacing: .04em; }
.check b { font-family: var(--mono); font-size: 14px; display: block; margin-top: 2px; }
.check em { font-style: normal; font-size: 9.5px; color: var(--faint); }
.check.ok { border-color: rgba(72, 207, 166, .4); }
.check.ok b { color: var(--green); }
.check.warn { border-color: rgba(242, 181, 68, .45); }
.check.warn b { color: var(--amber); }
.check.bad { border-color: rgba(240, 106, 85, .45); background: var(--red-dim); }
.check.bad b { color: var(--red); }

/* 鎸夐挳 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(233, 242, 249, .06);
  border: 1px solid var(--line-3);
  color: var(--ink);
  font-size: 11.5px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: rgba(233, 242, 249, .13); border-color: var(--ink-2); }
.btn.sm { padding: 4px 9px; font-size: 10.5px; }
.btn.primary { background: rgba(242, 181, 68, .16); border-color: rgba(242, 181, 68, .62); color: var(--amber-2); }
.btn.primary:hover { background: rgba(242, 181, 68, .28); }
.btn.danger { background: rgba(240, 106, 85, .14); border-color: rgba(240, 106, 85, .6); color: var(--red-2); }
.btn.danger:hover { background: rgba(240, 106, 85, .26); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--muted); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- 閫氶缃戠粶 */
.gs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.06fr);
  gap: 14px;
  align-items: start;
}
.panel-net { grid-column: 1 / -1; }
.panel-gasin { grid-column: 1; }
.panel-judge { grid-column: 2; }
.panel-predict { grid-column: 3; }
.gs-grid .wide { grid-column: 1 / -1; }
.gs-net-table { border-top: 1px dashed var(--line-2); padding: 8px 12px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.gs-net-table table.tbl td { padding: 4px 6px; font-size: 10.5px; }
.gs-net-table table.tbl th { padding: 4px 6px; }
.net-svg { display: block; width: 100%; height: auto; max-width: 940px; max-height: 330px; margin: 0 auto; }

.judge { display: flex; flex-direction: column; }
.judge-row { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.judge-row:last-child { border-bottom: 0; }
.judge-top { display: flex; align-items: baseline; gap: 6px; }
.judge-top b { font-size: 11.5px; font-weight: 600; }
.judge-top span { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.judge-row.ok .judge-top span { color: var(--green); }
.judge-row.warn .judge-top span { color: var(--amber); }
.judge-row.bad .judge-top span { color: var(--red); }
.judge-sub { font-size: 9.5px; color: var(--faint); margin-top: 1px; }

/* 鏂规鍗?*/
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan {
  border: 1px solid var(--line-2);
  background: rgba(9, 32, 53, .55);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan.rec { border-color: rgba(242, 181, 68, .55); box-shadow: inset 0 0 0 1px rgba(242, 181, 68, .12); }
.plan-head { display: flex; align-items: center; gap: 8px; }
.plan-head b { font-size: 12.5px; }
.plan-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--amber);
  border: 1px solid rgba(242, 181, 68, .4);
  padding: 0 4px;
}
.plan-desc { font-size: 10.5px; color: var(--muted); line-height: 1.6; min-height: 34px; }
.plan-rows { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 10.5px; }
.plan-rows span { color: var(--faint); }
.plan-rows b { font-family: var(--mono); text-align: right; font-weight: 500; }
.plan-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.plan-foot .cost { font-size: 10px; color: var(--faint); }

/* 璇佹嵁閾?*/
.ev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ev { border-left: 2px solid var(--line-3); padding: 2px 0 2px 10px; }
.ev span { font-size: 9.5px; color: var(--faint); letter-spacing: .06em; display: block; }
.ev b { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.ev.hl { border-left-color: var(--amber); }
.ev.hl b { color: var(--amber-2); }

/* ---------------------------------------------------------------- 浜哄憳 */
.cw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .8fr) minmax(0, .85fr);
  gap: 14px;
  align-items: start;
}
.cw-grid .wide { grid-column: 1 / -1; }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.region {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.region-name { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; flex-wrap: wrap; gap: 2px; min-height: 10px; }
.dot { width: 6px; height: 6px; background: var(--cyan); opacity: .85; }
.dot.off { background: transparent; border: 1px solid var(--red); opacity: 1; }
.region.over .dot { background: var(--amber); }
.region.over .region-name { color: var(--amber-2); }
.region-val { font-family: var(--mono); font-size: 11px; text-align: right; }
.region-val em { font-style: normal; color: var(--faint); font-size: 9.5px; }
.region.over .region-val { color: var(--amber); }

.belt-gauge { position: relative; height: 8px; background: rgba(233, 242, 249, .1); margin: 8px 0 4px; }
.belt-gauge i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.belt-gauge i.hot { background: linear-gradient(90deg, var(--amber), var(--red)); }
.belt-gauge u {
  position: absolute; top: -4px; bottom: -4px; width: 1px;
  background: var(--red); text-decoration: none;
}

.evac-stage {
  border: 1px solid var(--line-2);
  background: rgba(7, 24, 43, .5);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.evac-stage .big { font-family: var(--mono); font-size: 26px; letter-spacing: -.03em; }
.evac-stage .cap { font-size: 10px; color: var(--faint); }
.evac-log { font-family: var(--mono); font-size: 10px; color: var(--muted); line-height: 1.8; max-height: 96px; overflow: auto; }

/* ---------------------------------------------------------------- 鐣欑棔 */
.lg-grid {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.7fr);
  gap: 14px;
  align-items: start;
}
.lg-grid .wide { grid-column: 1 / -1; }

.doc-card {
  border: 1px solid var(--line-2);
  background: rgba(9, 32, 53, .5);
  padding: 9px 11px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.doc-card:hover { border-color: var(--line-3); }
.doc-card.on { border-color: rgba(242, 181, 68, .6); background: rgba(242, 181, 68, .08); }
.doc-card.done { opacity: .62; }
.doc-top { display: flex; align-items: baseline; gap: 7px; }
.doc-id { font-family: var(--mono); font-size: 9.5px; color: var(--amber); }
.doc-kind { font-size: 9.5px; color: var(--faint); border: 1px solid var(--line); padding: 0 4px; }
.doc-st { margin-left: auto; font-size: 9.5px; }
.doc-st.pending { color: var(--amber); }
.doc-st.done { color: var(--green); }
.doc-st.stop { color: var(--red); }
.doc-title { font-size: 11.5px; line-height: 1.5; margin-top: 3px; }
.doc-sub { font-size: 10px; color: var(--faint); margin-top: 2px; }

.doc-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 10px; }
.doc-meta .field .val { font-size: 12px; }
.steps { display: flex; gap: 0; margin: 10px 0 12px; }
.step {
  flex: 1;
  border-top: 2px solid var(--line-2);
  padding: 7px 8px 0 0;
  position: relative;
}
.step::before {
  content: "";
  position: absolute; top: -5px; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-3);
}
.step b { font-size: 10.5px; display: block; }
.step span { font-size: 9.5px; color: var(--faint); display: block; margin-top: 1px; }
.step.done { border-top-color: var(--green); }
.step.done::before { background: var(--green); border-color: var(--green); }
.step.cur { border-top-color: var(--amber); }
.step.cur::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px var(--amber); }
.step.cur b { color: var(--amber-2); }
.step.rej { border-top-color: var(--red); }
.step.rej::before { background: var(--red); border-color: var(--red); }

.checks { display: flex; flex-direction: column; gap: 4px; }
.check-line {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 7px;
  font-size: 10.5px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.check-line:last-child { border-bottom: 0; }
.check-line .ck { font-family: var(--mono); font-size: 10px; }
.check-line.ok .ck { color: var(--green); }
.check-line.bad .ck { color: var(--red); }
.check-line.warn .ck { color: var(--amber); }
.check-line b { font-family: var(--mono); font-weight: 500; }

.chain { display: flex; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.blk {
  flex: none;
  width: 126px;
  border: 1px solid var(--line-2);
  border-right: 0;
  padding: 7px 8px;
  background: rgba(9, 32, 53, .55);
  position: relative;
}
.blk:last-child { border-right: 1px solid var(--line-2); }
.blk.now { background: rgba(242, 181, 68, .1); border-color: rgba(242, 181, 68, .4); }
.blk .b-seq { font-family: var(--mono); font-size: 9px; color: var(--amber); }
.blk .b-act { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0; }
.blk .b-hash { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: .02em; }
.blk .b-prev { font-family: var(--mono); font-size: 8.5px; color: rgba(139, 168, 192, .6); }
.blk.broken { border-color: var(--red); background: var(--red-dim); }
.chain-legend { font-family: var(--mono); font-size: 9.5px; color: var(--faint); padding: 6px 2px 0; display: flex; gap: 14px; }

.matrix table.tbl td, .matrix table.tbl th { padding: 4px 6px; font-size: 10px; }
.matrix .yes { color: var(--green); font-family: var(--mono); }
.matrix .no { color: var(--faint); font-family: var(--mono); }
.matrix tr.cur td { background: rgba(242, 181, 68, .09); }

.trace { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.trace:last-child { border-bottom: 0; }
.trace-h { font-size: 10.5px; color: var(--ink-2); display: flex; gap: 6px; }
.trace-h b { font-family: var(--mono); color: var(--amber); font-weight: 500; }
.trace p { font-size: 9.5px; color: var(--faint); margin-top: 2px; line-height: 1.6; }

/* ---------------------------------------------------------------- 椤佃剼 */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px 16px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--faint);
}
.foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- 鎻愮ず */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 18px);
  background: rgba(8, 28, 48, .97);
  border: 1px solid rgba(242, 181, 68, .5);
  border-left: 3px solid var(--amber);
  color: var(--ink);
  padding: 9px 16px;
  font-size: 12px;
  max-width: 640px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 90;
  box-shadow: 0 18px 40px -18px #000;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(240, 106, 85, .55); border-left-color: var(--red); }
.noscript { padding: 40px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- SVG 閫氱敤 */
svg text { font-family: var(--sans); }
svg .mono { font-family: var(--mono); }
svg .lbl { font-size: 10px; fill: var(--muted); }
svg .lbl-b { font-size: 10px; fill: var(--ink-2); }
svg .lbl-s { font-size: 8.5px; fill: var(--faint); letter-spacing: .04em; }
svg .lbl-a { fill: var(--amber-2); }
svg .frame { fill: none; stroke: var(--line-2); stroke-width: 1; }
svg .grid-l { stroke: rgba(233, 242, 249, .07); stroke-width: .6; }
svg .rock { stroke: rgba(233, 242, 249, .22); stroke-width: .8; }
svg .coal { fill: rgba(242, 181, 68, .16); stroke: rgba(242, 181, 68, .55); stroke-width: 1; }
svg .air { stroke: var(--cyan); fill: none; stroke-width: 1.4; stroke-dasharray: 5 4; }
svg .ret { stroke: var(--amber); fill: none; stroke-width: 1.4; stroke-dasharray: 2 4; }
svg .pipe { stroke: var(--violet); fill: none; stroke-width: 1.2; stroke-dasharray: 6 5; opacity: .85; }
svg .flow { animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
body.static svg .flow { animation: none; }
svg .tick { stroke: rgba(233, 242, 249, .35); stroke-width: .8; }
svg .dim { stroke: rgba(233, 242, 249, .3); stroke-width: .7; }
svg .sensor-chip rect { fill: rgba(7, 24, 43, .92); stroke-width: 1; }
svg .sensor-chip text { font-family: var(--mono); font-size: 9px; }
svg .person { fill: var(--cyan); opacity: .9; }
svg .person.off { fill: none; stroke: var(--red); }

/* 妯悜婊氬姩鏉?*/
.chain::-webkit-scrollbar { height: 6px; }
.chain::-webkit-scrollbar-thumb { background: var(--line-2); }
.chain::-webkit-scrollbar-track { background: transparent; }

/* 待办 */
.todo { display: flex; flex-direction: column; }
.todo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  gap: 0 8px;
  align-items: center;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line);
  padding: 6px 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.todo-row:last-child { border-bottom: 0; }
.todo-k { grid-column: 1; grid-row: 1; font-size: 10.5px; color: var(--faint); }
.todo-row b { grid-column: 2; grid-row: 1; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.todo-row em { grid-column: 1 / 3; grid-row: 2; font-style: normal; font-size: 9.5px; color: var(--faint); }
.todo-row b .u { font-size: 9.5px; color: var(--muted); margin-left: 2px; }
.todo-row i { grid-column: 3; grid-row: 1 / 3; font-style: normal; color: var(--faint); font-size: 11px; }
.todo-row.warn b { color: var(--amber); }
.todo-row.bad b { color: var(--red); }
.todo-row.ok b { color: var(--green); }
.todo-row:hover .todo-k { color: var(--ink-2); }

.ai-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0 0;
  border: 0;
  border-top: 1px dashed var(--line);
  background: none;
  color: var(--cyan);
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}
.ai-more:hover { color: var(--amber-2); }

/* 参数敏感度 */
.sens { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.sens-h { font-size: 9.5px; letter-spacing: .12em; color: var(--faint); margin-bottom: 4px; }
.sens-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 10.5px;
}
.sens-row:last-child { border-bottom: 0; }
.sens-row span { color: var(--muted); }
.sens-row b { font-family: var(--mono); color: var(--green); font-weight: 500; }
.sens-row em { font-style: normal; font-size: 9.5px; color: var(--faint); }

.cw-tables { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 26px; }
.cw-tables table.tbl td, .cw-tables table.tbl th { padding: 4px 7px; }
