:root {
  --bg: #0b1016;
  --panel: #121a24;
  --panel2: #172230;
  --line: #263447;
  --text: #dbe6f3;
  --muted: #7f92ab;
  --accent: #2a6df4;
  --ok: #00e5b0;
  --warn: #ffb02e;
  --bad: #ff4d5e;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#appRoot { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧栏 ---------- */
.side {
  width: 232px; flex: 0 0 232px;
  background: linear-gradient(180deg, #0f1620 0%, #0b1016 100%);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #2a6df4, #00c6ff);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.brand b { display: block; font-size: 15px; letter-spacing: .5px; }
.brand small { display: block; font-size: 9px; color: var(--muted); letter-spacing: 1.6px; margin-top: 2px; }

nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; cursor: pointer;
  color: #9db0c8; text-decoration: none;
  border-left: 3px solid transparent;
  transition: .15s;
}
.nav-item i { font-style: normal; width: 18px; text-align: center; opacity: .75; font-size: 14px; }
.nav-item span { font-size: 13.5px; }
.nav-item:hover { background: rgba(255,255,255,.04); color: #d6e4f7; }
.nav-item.on {
  background: linear-gradient(90deg, rgba(42,109,244,.18), transparent);
  border-left-color: var(--accent); color: #fff;
}
.nav-item.on i { opacity: 1; color: var(--accent); }

.side-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.side-foot small { font-size: 10px; opacity: .7; }

/* ---------- 主区 ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; border-bottom: 1px solid var(--line);
  background: #0f1620;
}
.tb-left { display: flex; align-items: center; gap: 14px; }
.tb-site { font-size: 15px; font-weight: 600; }
.tb-site em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 8px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; }
.tb-src { font-size: 11.5px; color: var(--muted); }
.tb-right { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.tb-right b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.tb-user { padding-left: 12px; border-left: 1px solid var(--line); color: #b8c8db; }

.content { flex: 1; overflow-y: auto; padding: 22px 24px 60px; }
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: #263447; border-radius: 4px; }

/* ---------- 页头 ---------- */
.page-head { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: .5px; }
.page-head p { width: 100%; font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.page-head.compact { align-items: flex-start; }
.page-head p b { color: #b8cde8; font-weight: 500; }
.head-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.card-h h3 { font-size: 14.5px; font-weight: 600; }
.muted { color: var(--muted); font-size: 11.5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.span2 { grid-column: span 1; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.kpi label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.kpi b { display: block; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi b i { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.kpi b.good { color: var(--ok); }
.kpi b.bad { color: var(--bad); }
.kpi small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* ---------- 柱状趋势 ---------- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bcol { width: 100%; background: linear-gradient(180deg, #3d82ff, #1a4fb8); border-radius: 3px 3px 0 0; min-height: 2px; transition: .3s; }
.bcol.hi { background: linear-gradient(180deg, #00e5b0, #009e7a); }
.bar em { font-style: normal; font-size: 9px; color: var(--muted); margin-top: 6px; transform: rotate(-45deg); transform-origin: center; white-space: nowrap; }

/* ---------- 排行 ---------- */
.rank { display: flex; flex-direction: column; gap: 12px; }
.rk { display: flex; align-items: center; gap: 10px; }
.rk i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--panel2); text-align: center; line-height: 20px; font-size: 11px; color: var(--muted); flex: 0 0 20px; }
.rk > div:nth-child(2) { width: 150px; flex: 0 0 150px; }
.rk b { display: block; font-size: 12.5px; font-weight: 500; }
.rk small { font-size: 10.5px; color: var(--muted); }
.rkbar { flex: 1; height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.rkbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #00c6ff); border-radius: 3px; }
.rk em { font-style: normal; font-size: 12px; width: 70px; text-align: right; color: #b8cde8; font-variant-numeric: tabular-nums; }

/* ---------- 罐卡片（小） ---------- */
.silo-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini-silo { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.mini-silo.alarm { border-color: rgba(255,77,94,.5); box-shadow: inset 0 0 20px rgba(255,77,94,.08); }
.mini-silo.warn { border-color: rgba(255,176,46,.45); }
.mini-silo.nodata { opacity: .8; }
.ms-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ms-h b { font-size: 13px; }
.ms-h em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.ms-v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ms-v i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 3px; }
.nodata-t { font-size: 15px; color: var(--muted); font-weight: 400; }
.ms-bar { height: 5px; background: #0d1520; border-radius: 3px; margin: 10px 0 8px; overflow: hidden; }
.ms-bar span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.mini-silo.warn .ms-bar span { background: var(--warn); }
.mini-silo.alarm .ms-bar span { background: var(--bad); }
.ms-f { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ---------- 引导条 ---------- */
.guide-bar {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(90deg, rgba(255,176,46,.14), rgba(255,176,46,.04));
  border: 1px solid rgba(255,176,46,.35); border-radius: 10px;
  padding: 12px 18px; margin-bottom: 14px;
}
.guide-bar b { color: var(--warn); font-size: 13px; white-space: nowrap; }
.guide-bar span { font-size: 12px; color: #c8b48f; line-height: 1.6; flex: 1; }

/* ---------- 磅房大屏 ---------- */
.board {
  background: radial-gradient(ellipse at top, #101d2e 0%, #080d13 70%);
  border: 1px solid #1c2b3f; border-radius: 14px;
  padding: 26px 30px; min-height: 560px;
  display: flex; flex-direction: column;
}
.board.has-alarm { border-color: rgba(255,77,94,.35); }
.bd-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid #1b2838; margin-bottom: 22px; }
.bd-top b { font-size: 20px; letter-spacing: 1px; }
.bd-top span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 16px; flex: 1; }
.bs {
  background: rgba(255,255,255,.025); border: 1px solid #1e2d40; border-radius: 10px;
  padding: 18px; display: flex; flex-direction: column; gap: 8px; min-height: 210px;
  position: relative; overflow: hidden;
}
.bs::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--ok); }
.bs.warn::before { background: var(--warn); }
.bs.alarm::before { background: var(--bad); animation: blinkbar 1s infinite; }
.bs.nodata::before { background: #45566d; }
@keyframes blinkbar { 50% { opacity: .3; } }
.bs-name { font-size: 17px; font-weight: 600; }
.bs-mat { font-size: 11.5px; color: var(--muted); margin-top: -4px; }
.bs-num { font-size: 42px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.bs-num small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.bs-nd { font-size: 20px; color: var(--muted); font-weight: 400; }
.bs.alarm .bs-num { color: var(--bad); }
.bs.warn .bs-num { color: var(--warn); }
.bs-bar { height: 8px; background: #0a1119; border-radius: 4px; overflow: hidden; }
.bs-bar span { display: block; height: 100%; background: var(--ok); }
.bs.warn .bs-bar span { background: var(--warn); }
.bs.alarm .bs-bar span { background: var(--bad); }
.bs.nodata .bs-bar span { background: #45566d; }
.bs-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bs-row .tone { font-weight: 600; }
.bd-foot { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 14px; border-top: 1px solid #1b2838; font-size: 12px; color: var(--muted); }
.blink { color: var(--ok); }

/* ---------- 来料流程 ---------- */
.flow { display: flex; align-items: stretch; gap: 10px; }
.flow-step { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; position: relative; }
.flow-step.done { border-color: rgba(0,229,176,.35); }
.flow-step.active { border-color: rgba(42,109,244,.6); box-shadow: 0 0 0 1px rgba(42,109,244,.2) inset; }
.flow-step > i { position: absolute; top: -9px; left: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; text-align: center; line-height: 18px; }
.flow-step b { display: block; font-size: 12.5px; margin-bottom: 8px; }
.flow-step span { display: block; font-size: 13px; margin-bottom: 6px; }
.flow-step small { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; }
.plate { display: inline-block; background: #0d3b8f; color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 13px; letter-spacing: 1px; }
.hl { color: var(--ok); }
.flow-arrow { display: flex; align-items: center; color: var(--muted); font-size: 16px; }
.fld { margin-top: 8px; }
.fld label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.fld select, .fld input { width: 100%; background: #0d1520; border: 1px solid var(--line); color: var(--text); padding: 7px 9px; border-radius: 6px; font-size: 12.5px; font-family: inherit; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-sub { font-size: 11.5px; margin-top: 8px; opacity: .7; }
.ops { display: flex; flex-direction: column; gap: 10px; }
.tip { font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 按钮 ---------- */
.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 9px 16px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: #fff; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.xs { padding: 4px 10px; font-size: 11.5px; }
.btn.danger { background: transparent; border: 1px solid rgba(255,77,94,.45); color: #ff8792; }
.btn.danger:hover { background: rgba(255,77,94,.14); border-color: var(--bad); color: #fff; }
.card-tools { display: flex; align-items: center; gap: 12px; }
.add-row td { padding: 10px 8px !important; background: rgba(42,109,244,.05); }
.cfg-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.cfg-note b { color: #b8cde8; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(38,52,71,.5); }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl.compact td, .tbl.compact th { padding: 7px 8px; font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; color: #a9bdd6; }
.strong { font-weight: 600; }
.bad { color: var(--bad); }
.good { color: var(--ok); }
.empty-row { text-align: center; color: var(--muted); padding: 28px 0 !important; }
.mini-input { background: #0d1520; border: 1px solid var(--line); color: var(--text); padding: 4px 7px; border-radius: 4px; font-size: 12px; font-family: inherit; }
.mini-input:focus { outline: none; border-color: var(--accent); }
.w50 { width: 50px; } .w60 { width: 60px; } .w70 { width: 70px; } .w90 { width: 90px; }
.w100 { width: 100px; } .w110 { width: 110px; } .w120 { width: 120px; } .w150 { width: 150px; }
.w200 { width: 200px; } .w360 { width: 360px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: rgba(255,255,255,.08); color: var(--muted); }
.tag.ok { background: rgba(0,229,176,.14); color: var(--ok); }
.tag.warn { background: rgba(255,176,46,.14); color: var(--warn); }
.tag.bad { background: rgba(255,77,94,.14); color: var(--bad); }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ---------- 筛选栏 ---------- */
.filterbar { display: flex; gap: 14px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.filterbar .fld { margin: 0; min-width: 140px; }
.filterbar .fld label { margin-bottom: 5px; }

/* ---------- chips ---------- */
.chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.chip b { display: block; font-size: 15px; color: var(--accent); }
.chip span { display: block; font-size: 11.5px; color: var(--muted); margin: 3px 0 6px; }
.chip em { font-style: normal; font-size: 13px; font-weight: 600; }

/* ---------- 排队大屏 ---------- */
.queue-board { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.qb-call {
  background: radial-gradient(ellipse at center, #10233a, #0a121c);
  border: 1px solid #1e3149; border-radius: 14px; padding: 26px; text-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
.qb-call label { font-size: 12px; color: var(--muted); letter-spacing: 3px; }
.qb-num { font-size: 76px; font-weight: 700; color: var(--ok); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.qb-none { font-size: 30px; color: #43566d; letter-spacing: 4px; font-weight: 500; }
.qb-plate { font-size: 14px; color: #b8cde8; }
.qb-ops { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.qb-list { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.qb-lh { display: flex; justify-content: space-between; margin-bottom: 12px; }
.qb-lh span { font-size: 12px; color: var(--muted); }
.qz { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid rgba(38,52,71,.5); }
.qz i { font-style: normal; width: 24px; height: 24px; border-radius: 6px; background: var(--panel2); text-align: center; line-height: 24px; font-size: 12px; color: var(--accent); }
.qz b { min-width: 100px; }
.qz span { flex: 1; font-size: 12px; color: var(--muted); }
.qz em { font-style: normal; font-size: 12px; color: #b8cde8; min-width: 70px; }

/* ---------- 地图 ---------- */
.mapbox { background: #0a121c; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.fence-svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 18px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: middle; }
.legend .dot.warn { background: #00e5b0; }
.minibar { height: 5px; background: var(--panel2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.minibar span { display: block; height: 100%; background: var(--accent); }

.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rule-grid > div { background: var(--panel2); border-radius: 8px; padding: 12px; }
.rule-grid label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.rule-grid b { font-size: 12.5px; font-weight: 500; color: #c6d7ea; line-height: 1.6; }

/* ---------- 配置 ---------- */
.cfg-wrap { display: flex; flex-direction: column; }
.cfg-card { padding: 16px 18px; }
.cfg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 18px; }
.cfg-grid.tight { grid-template-columns: repeat(5, 1fr); }
.cf label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.cin { display: flex; align-items: center; }
.cin input, .cf select {
  width: 100%; background: #0d1520; border: 1px solid var(--line); color: var(--text);
  padding: 7px 9px; border-radius: 6px; font-size: 12.5px; font-family: inherit;
}
.cin input:focus, .cf select:focus { outline: none; border-color: var(--accent); }
.cin em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }

/* ---------- 响应 ---------- */
@media (max-width: 1500px) {
  .bd-grid { grid-template-columns: repeat(4, 1fr); }
  .silo-mini { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .queue-board { grid-template-columns: 1fr; }
  .bd-grid, .silo-mini, .chips { grid-template-columns: repeat(2, 1fr); }
  .cfg-grid, .cfg-grid.tight, .rule-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ===== 磅房数据通道状态条 ===== */
.bridge{display:flex;gap:12px;align-items:flex-start;padding:14px 18px;border-radius:10px;margin:0 0 18px;border:1px solid;font-size:13px;line-height:1.6}
.bridge i{font-style:normal;font-size:16px;line-height:1.3}
.bridge b{display:block;font-size:14px;margin-bottom:3px}
.bridge span{display:block;opacity:.82}
.bridge.on{border-color:#1f6f43;background:#0e2a1d;color:#5fe3a0}
.bridge.on i{color:#2fd27a}
.bridge.wait{border-color:#7a5a1a;background:#2a2109;color:#e8c26a}
.bridge.wait i{color:#e0a93c}
.bridge.off{border-color:#3a4552;background:#161c24;color:#93a3b3}
.bridge.off i{color:#6d7c8c}

/* ===== 点位监控（红绿灯） ===== */
.pt-sec{margin-bottom:6px}
.pt-sec h4{font-size:12px;color:var(--muted);font-weight:600;letter-spacing:1px;margin:14px 0 8px;padding-left:2px}
.pt-sec:first-of-type h4{margin-top:4px}
.pt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:10px}
.pt{background:var(--panel2);border:1px solid var(--line);border-radius:var(--radius);padding:11px 13px;transition:border-color .2s}
.pt:hover{border-color:#35507a}
.pt-h{display:flex;align-items:center;gap:8px}
.pt-nm{flex:1;min-width:0;background:transparent;border:1px solid transparent;border-radius:5px;color:var(--text);font-size:13px;font-weight:600;font-family:inherit;padding:2px 4px;margin-left:-4px}
.pt-nm:hover{border-color:#2d3f57;background:#0f1720}
.pt-nm:focus{outline:none;border-color:var(--accent);background:#0f1720}
.pt-tag{font-size:10px;color:var(--muted);background:#0e141c;border:1px solid var(--line);border-radius:4px;padding:1px 5px;flex:0 0 auto}
.pt-v{font-size:19px;font-weight:700;margin:9px 0 7px;letter-spacing:.3px;min-height:24px;color:#c9d8ea}
.pt-b{display:flex;justify-content:space-between;font-size:10.5px;color:var(--muted);gap:8px}
.pt-b .mono{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 灯：绿=有值，灰=无读数，黄=等待，红=异常 */
.lamp{width:11px;height:11px;border-radius:50%;flex:0 0 auto;display:inline-block;background:#3a4757;box-shadow:inset 0 0 3px rgba(0,0,0,.6)}
.lamp.on{background:var(--ok);box-shadow:0 0 9px rgba(0,229,176,.75)}
.lamp.off{background:#3f4c5c}
.lamp.wait{background:var(--warn);box-shadow:0 0 9px rgba(255,176,46,.7);animation:lampBlink 1s ease-in-out infinite}
.lamp.bad{background:var(--bad);box-shadow:0 0 9px rgba(255,77,94,.8);animation:lampBlink .55s ease-in-out infinite}
@keyframes lampBlink{0%,100%{opacity:1}50%{opacity:.35}}

.pt-legend{display:flex;gap:22px;flex-wrap:wrap;margin-top:16px;padding-top:12px;border-top:1px dashed var(--line);font-size:12px;color:var(--muted)}
.pt-legend span{display:flex;align-items:center;gap:7px}

@media(max-width:720px){.pt-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}}
