/* ============================================================
   满血验真台 — 深色专业控制台
   ============================================================ */
:root {
  --bg: #0a0c11;
  --panel: #10141c;
  --panel-2: #151a24;
  --panel-3: #1a2030;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #e7eaf0;
  --dim: #8a94a8;
  --dim-2: #5f6a80;
  --pass: #35d39a;
  --warn: #f2b544;
  --fail: #ff5c6c;
  --accent: #6f8cff;
  --accent-soft: rgba(111, 140, 255, .12);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

code, .mono { font-family: var(--mono); font-size: 11.5px; }

.dim { color: var(--dim); }
.spacer { flex: 1; }

/* ---------------- 骨架 ---------------- */
.app {
  height: 100%;
  display: grid;
  grid-template-rows: 52px 1fr;
}

.body {
  display: grid;
  grid-template-columns: 288px 1fr;
  min-height: 0;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0d1119, #0a0c11);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 14px; color: var(--text); letter-spacing: .2px; }
.brand-text span {
  font-size: 9.5px;
  color: var(--dim-2);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sampler-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 100px;
  background: rgba(53, 211, 154, .09);
  border: 1px solid rgba(53, 211, 154, .22);
  color: #62e0b4;
  font-size: 11.5px;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dim-2);
  display: inline-block;
  flex: none;
}
.dot.live {
  background: var(--pass);
  box-shadow: 0 0 0 0 rgba(53, 211, 154, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 211, 154, .55); }
  70% { box-shadow: 0 0 0 6px rgba(53, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 211, 154, 0); }
}

/* ---------------- 按钮 ---------------- */
.btn {
  font: inherit;
  font-size: 12.5px;
  border-radius: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { background: var(--panel-3); border-color: rgba(255,255,255,.18); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0c11;
  font-weight: 600;
}
.btn.primary:hover { background: #8199ff; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.tiny { padding: 3px 9px; font-size: 11.5px; }
.btn.danger { color: var(--fail); border-color: rgba(255,92,108,.35); }
.btn.danger:hover { background: rgba(255,92,108,.1); }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0b0e14;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 8px;
}
.side-head h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.count {
  display: inline-block;
  min-width: 17px;
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--dim);
  font: 600 10.5px/1.4 var(--mono);
  text-align: center;
}

.relay-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 10px;
  min-height: 0;
}

.relay {
  position: relative;
  padding: 9px 10px 9px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background .12s, border-color .12s;
}
.relay::before {
  content: "";
  position: absolute;
  left: 5px; top: 12px; bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--dim-2);
  opacity: .5;
}
.relay:hover { background: var(--panel); border-color: var(--line); }
.relay.selected { background: var(--accent-soft); border-color: rgba(111,140,255,.28); }
.relay[data-level="PASS"]::before { background: var(--pass); opacity: 1; }
.relay[data-level="WARN"]::before { background: var(--warn); opacity: 1; }
.relay[data-level="FAIL"]::before { background: var(--fail); opacity: 1; }
.relay[data-level="ERROR"]::before { background: var(--fail); opacity: 1; }

.relay-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.relay-name {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relay-host {
  font: 10.5px/1.4 var(--mono);
  color: var(--dim-2);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relay-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.relay-model {
  font: 10.5px/1 var(--mono);
  color: var(--dim);
  background: rgba(255,255,255,.04);
  padding: 2px 5px;
  border-radius: 4px;
}
.relay-score {
  font: 700 10.5px/1 var(--mono);
  padding: 2px 5px;
  border-radius: 4px;
  cursor: default;
}
.relay-score.ga { color: var(--pass); background: rgba(53,211,154,.12); }
.relay-score.gb { color: #93a8ff; background: rgba(111,140,255,.14); }
.relay-score.gc { color: var(--warn); background: rgba(242,181,68,.12); }
.relay-score.gd { color: var(--fail); background: rgba(255,92,108,.12); }
.relay-score.gu { color: var(--dim-2); background: rgba(255,255,255,.04); }
.relay-score.na { color: var(--dim-2); background: rgba(255,255,255,.04); }
.key-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pass);
}
.key-dot.missing { background: var(--fail); }
.relay-del {
  position: absolute;
  right: 6px; top: 6px;
  width: 18px; height: 18px;
  border: none;
  background: transparent;
  color: var(--dim-2);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.relay:hover .relay-del { opacity: 1; }
.relay-del:hover { background: rgba(255,92,108,.15); color: var(--fail); }
.relay-edit {
  position: absolute;
  right: 26px; top: 6px;
  width: 18px; height: 18px;
  border: none;
  background: transparent;
  color: var(--dim-2);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.relay:hover .relay-edit { opacity: 1; }
.relay-edit:hover { background: rgba(120,160,255,.15); color: var(--accent, #7aa2ff); }
.relay-copy {
  position: absolute;
  right: 46px; top: 6px;
  width: 18px; height: 18px;
  border: none;
  background: transparent;
  color: var(--dim-2);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.relay:hover .relay-copy { opacity: 1; }
.relay-copy:hover { background: rgba(120,160,255,.15); color: var(--accent, #7aa2ff); }

.empty-hint {
  padding: 22px 8px;
  text-align: center;
  color: var(--dim-2);
  font-size: 12px;
  line-height: 1.8;
}
.empty-hint span { font-size: 11px; opacity: .75; }

.side-foot { padding: 10px 12px 14px; border-top: 1px solid var(--line); }

.baseline-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}
.bl-head {
  font-size: 10.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 5px;
}
.bl-body { font: 11px/1.6 var(--mono); color: var(--dim); }
.bl-body .warn-t { color: var(--warn); }
.bl-body .ok-t { color: var(--pass); }

.foot-note {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--dim-2);
}
.foot-note code { font-size: 10px; color: var(--dim); }

/* ---------------- 主区 ---------------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
  height: 42px;
}
.tab {
  font: inherit;
  font-size: 12.5px;
  color: var(--dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 12px 10px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-spacer { flex: 1; }

.pane {
  display: none;
  padding: 16px 18px 28px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}
.pane.active { display: block; }

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.seg {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
}
.seg-btn {
  font: inherit;
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--dim);
  padding: 4px 11px;
  border-radius: 5px;
  cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel-3); color: var(--text); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dim);
  cursor: pointer;
  user-select: none;
}
.check input { accent-color: var(--accent); }

.hint { font-size: 11.5px; color: var(--dim-2); }
.hint code { color: var(--dim); }

/* ---------------- 进度 ---------------- */
.progress-wrap { margin-bottom: 14px; }
.progress-bar {
  height: 3px;
  background: var(--panel-3);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #8fa6ff);
  border-radius: 2px;
  transition: width .3s ease;
}
.progress-text {
  margin-top: 6px;
  font: 11px/1.5 var(--mono);
  color: var(--dim);
}

/* ---------------- 审计结果 ---------------- */
.results { display: flex; flex-direction: column; gap: 10px; }

.empty-state {
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
}
.es-title { font-size: 13.5px; margin-bottom: 6px; }
.es-sub { font-size: 11.5px; line-height: 1.9; color: var(--dim-2); }

.result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
}
.result-head:hover { background: var(--panel-2); }
.result-head .rname { font-weight: 600; font-size: 12.5px; }
.result-head .rhost { font: 11px var(--mono); color: var(--dim-2); }
.result-open { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rcost { font: 11px var(--mono); color: var(--dim-2); }

/* 评分徽章：先看分数和结论，细节折叠在后 */
.score-box {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  line-height: 1;
}
.score-num { font: 700 20px/1 var(--mono); letter-spacing: -.5px; }
.score-num.na { color: var(--dim-2); }
.score-of { font: 9px/1 var(--mono); color: var(--dim-2); margin-top: 3px; }
.score-box.ga { border-color: rgba(53,211,154,.4); background: rgba(53,211,154,.09); }
.score-box.ga .score-num { color: var(--pass); }
.score-box.gb { border-color: rgba(111,140,255,.4); background: rgba(111,140,255,.1); }
.score-box.gb .score-num { color: #93a8ff; }
.score-box.gc { border-color: rgba(242,181,68,.4); background: rgba(242,181,68,.09); }
.score-box.gc .score-num { color: var(--warn); }
.score-box.gd { border-color: rgba(255,92,108,.4); background: rgba(255,92,108,.09); }
.score-box.gd .score-num { color: var(--fail); }
.score-box.gu .score-num { color: var(--dim-2); }

.score-main { min-width: 0; flex: 1 1 auto; }
.score-name { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.score-headline { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.score-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.grade-chip {
  font: 600 10px/1 var(--mono);
  letter-spacing: .3px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--dim);
}
.grade-chip.ga { color: var(--pass); border-color: rgba(53,211,154,.32); background: rgba(53,211,154,.08); }
.grade-chip.gb { color: #93a8ff; border-color: rgba(111,140,255,.32); background: rgba(111,140,255,.08); }
.grade-chip.gc { color: var(--warn); border-color: rgba(242,181,68,.32); background: rgba(242,181,68,.08); }
.grade-chip.gd { color: var(--fail); border-color: rgba(255,92,108,.32); background: rgba(255,92,108,.08); }
.tag {
  font: 10.5px/1 var(--mono);
  color: var(--dim);
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--panel-3);
  white-space: nowrap;
}
.hs { font: 700 12px var(--mono); }
.hs.ga { color: var(--pass); }
.hs.gb { color: #93a8ff; }
.hs.gc { color: var(--warn); }
.hs.gd { color: var(--fail); }
.hs.gu { color: var(--dim-2); }
.dim2 { color: var(--dim-2); }

.audit-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 10px 13px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font: 11.5px var(--mono);
  color: var(--dim-2);
}
.sum-item.ga { color: var(--pass); }
.sum-item.gb { color: #93a8ff; }
.sum-item.gc { color: var(--warn); }
.sum-item.gd { color: var(--fail); }
.sum-item.gu { color: var(--dim); }

.badge {
  font: 600 10px/1 var(--mono);
  letter-spacing: .6px;
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.PASS { color: var(--pass); background: rgba(53,211,154,.1); border-color: rgba(53,211,154,.24); }
.badge.WARN { color: var(--warn); background: rgba(242,181,68,.1); border-color: rgba(242,181,68,.24); }
.badge.FAIL { color: var(--fail); background: rgba(255,92,108,.1); border-color: rgba(255,92,108,.24); }
.badge.ERROR { color: var(--fail); background: rgba(255,92,108,.1); border-color: rgba(255,92,108,.24); }

.probe-list {
  border-top: 1px solid var(--line);
  padding: 5px 0;
  background: #0c1017;
  display: none;
}
.result.expanded .probe-list { display: block; }
.probe-list .caret { transition: transform .15s; }
.result.expanded .caret { transform: rotate(90deg); }

.probe {
  display: grid;
  grid-template-columns: 16px 40px 178px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 4px 13px 4px 15px;
  font-size: 11.5px;
}
.probe:hover { background: rgba(255,255,255,.02); }
.pv { font-size: 11px; text-align: center; }
.pv.pass { color: var(--pass); }
.pv.warn { color: var(--warn); }
.pv.fail { color: var(--fail); }
.pv.skip { color: var(--dim-2); }
.player { font: 10px var(--mono); color: var(--dim-2); }
.pname { font: 10.5px var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.pdetail { color: var(--dim); line-height: 1.55; }
.pdetail.bad { color: #ffa8b0; }

.verdict-line {
  padding: 9px 13px;
  font-size: 12px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  background: #0c1017;
}

/* ---------------- 历史 ---------------- */
.history { margin-top: 22px; }
.history h3 {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim-2);
  margin: 0 0 8px;
  font-weight: 600;
}

/* ---------------- 指标 ---------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}
.metric label {
  display: block;
  font-size: 10.5px;
  color: var(--dim-2);
  letter-spacing: .4px;
  margin-bottom: 3px;
}
.metric b {
  font: 600 19px/1.2 var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stream-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.stream-head h3, .card h3 {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
  font-weight: 600;
}

/* ---------------- 表格 ---------------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--panel);
}
.table-wrap.short { max-height: 260px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.tbl th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--dim-2);
  font-weight: 600;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  white-space: nowrap;
}
.tbl td {
  padding: 6px 11px;
  border-bottom: 1px solid rgba(255,255,255,.035);
  color: var(--dim);
  white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.02); }
.tbl .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl td.host { color: var(--text); font-family: var(--mono); font-size: 11px; }
.empty-row { text-align: center; color: var(--dim-2); padding: 18px !important; }
.ok-t { color: var(--pass); }
.warn-t { color: var(--warn); }
.fail-t { color: var(--fail); }

/* ---------------- 图表 ---------------- */
.chart-card, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.chart-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.chart-head h3 {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
  font-weight: 600;
}
.legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 10.5px var(--mono);
  color: var(--dim);
}
.legend i {
  width: 8px; height: 2px; border-radius: 2px; display: inline-block;
}
.chart { height: 190px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 1180px) { .grid2 { grid-template-columns: 1fr; } }

.card h3 { margin-bottom: 10px; }
.card > .count { margin-left: 2px; }

/* ---------------- 告警 ---------------- */
.alarm-list { display: flex; flex-direction: column; gap: 6px; max-height: 236px; overflow-y: auto; }
.alarm {
  display: flex;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(255,255,255,.022);
  border-left: 2px solid var(--warn);
  border-radius: 0 5px 5px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}
.alarm.hard { border-left-color: var(--fail); }
.alarm .a-host { font-family: var(--mono); font-size: 10.5px; color: var(--text); flex: none; }

.layer-note {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.layer-note div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 11px;
  color: var(--dim-2);
  line-height: 1.6;
}
.layer-note b { color: var(--accent); font-family: var(--mono); }

/* ---------------- 模态 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 11, .72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-card {
  width: 420px;
  max-width: calc(100vw - 40px);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 18px 20px 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.modal-card h3 { margin: 0 0 4px; font-size: 14px; }
.modal-note {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--dim);
  margin: 0 0 14px;
}
.modal-note code { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: 11px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 11px; color: var(--dim); }
.field em { font-size: 10.5px; color: var(--dim-2); font-style: normal; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline > span { white-space: nowrap; }
.field input, .field select {
  font: inherit;
  font-size: 12.5px;
  font-family: var(--mono);
  background: #0c1017;
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 9px;
  outline: none;
}
.field select { font-family: inherit; }
.field input:focus, .field select:focus { border-color: var(--accent); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
  z-index: 80;
  max-width: 70vw;
}
.toast.err { border-color: rgba(255,92,108,.5); color: #ffb3ba; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #232a38; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2e3748; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   使用指南 pane
   ============================================================ */
.pane#pane-guide { overflow-y: auto; }

.guide {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  max-width: 1060px;
}

.guide-toc {
  position: sticky;
  top: 0;
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}

.guide-toc a {
  color: var(--dim);
  text-decoration: none;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.guide-toc a:hover {
  color: var(--text);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.guide-body { flex: 1; min-width: 0; padding-bottom: 60px; }

.guide-body h2 {
  font-size: 16px;
  margin: 34px 0 12px;
  padding-top: 10px;
  letter-spacing: .02em;
}

.guide-body h2:first-child { margin-top: 8px; }

.g-lead { color: var(--dim); margin: 0 0 10px; }
.g-lead b { color: var(--text); }

.g-tip {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(242, 181, 68, .08);
  border: 1px solid rgba(242, 181, 68, .18);
  color: #d8c29a;
  font-size: 12.5px;
}

.g-steps { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.g-steps li {
  position: relative;
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--dim);
}
.g-steps li b { color: var(--text); margin-right: 6px; }
.g-steps li::before {
  content: counter(g-step, decimal-leading-zero);
  counter-increment: g-step;
  position: absolute;
  left: 13px; top: 12px;
  font: 700 11px/1 var(--mono);
  color: var(--accent);
}
.g-steps { counter-reset: g-step; }

.g-table .tbl { width: 100%; }
.gc-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font: 700 11px/1.6 var(--mono);
  white-space: nowrap;
}
.gc-chip.ga { color: var(--pass); background: rgba(53, 211, 154, .12); }
.gc-chip.gb { color: #93a8ff; background: rgba(111, 140, 255, .14); }
.gc-chip.gc { color: var(--warn); background: rgba(242, 181, 68, .12); }
.gc-chip.gd { color: var(--fail); background: rgba(255, 92, 108, .12); }
.gc-chip.gu { color: var(--dim-2); background: rgba(255, 255, 255, .04); }

.g-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.g-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.g-card b {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 12.5px;
}
.g-card span { color: var(--dim); font-size: 12.5px; line-height: 1.6; }
.g-card span b { color: var(--warn); display: inline; font-size: 12.5px; }

.g-faq {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.g-faq summary {
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 600;
  font-size: 13px;
  user-select: none;
  list-style-position: inside;
}
.g-faq summary:hover { background: rgba(255, 255, 255, .03); }
.g-faq p {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--dim);
  line-height: 1.7;
}
.g-faq p code {
  background: var(--panel-3);
  padding: 1px 5px;
  border-radius: 4px;
}

.g-list { margin: 0; padding-left: 18px; color: var(--dim); }
.g-list li { margin-bottom: 8px; line-height: 1.7; }
.g-list b { color: var(--text); }

/* 空状态三步引导 */
.es-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin: 18px auto 0;
  text-align: left;
}

.es-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
}

.es-step i {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 11px/22px var(--mono);
  text-align: center;
  font-style: normal;
  margin-top: 1px;
}

.es-step b { display: block; font-size: 13px; margin-bottom: 2px; }
.es-step span { color: var(--dim); font-size: 12px; line-height: 1.55; }

.es-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-size: 12.5px;
}
.es-link:hover { text-decoration: underline; }

.empty-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 11.5px;
}
.empty-link:hover { text-decoration: underline; }

/* 归属：AI 算力超市旗下产品 */
.brand-from {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px 2px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2px;
  text-decoration: none;
  vertical-align: 1px;
  transition: color .15s, border-color .15s, background .15s;
}
.brand-from:hover {
  color: var(--accent);
  border-color: rgba(111, 140, 255, .5);
  background: var(--accent-soft);
}

.foot-brand {
  display: inline-block;
  margin-top: 8px;
  color: var(--dim-2);
  font-size: 11px;
  text-decoration: none;
}
.foot-brand:hover { color: var(--accent); }

.g-footer {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--dim-2);
  font-size: 12px;
}
.g-footer a { color: var(--accent); text-decoration: none; }
.g-footer a:hover { text-decoration: underline; }
