/* ============================================================
   大聚 X9 屏端 HMI · 核心数据页样式（hmi-core 维护）
   仅补充声明：公共组件见 hmi.css / shared/css/base.css
   ============================================================ */

/* ---------- 通用小工具 ---------- */
.fill { flex: 1; min-height: 0; }
.flex-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.flex-row { display: flex; gap: 14px; min-width: 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }
.sub-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); display: inline-block; margin: 0 8px; vertical-align: middle; }

/* ---------- 页面二级页签 ---------- */
.subtabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subtab {
  height: 38px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-3); font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.subtab:hover { background: var(--panel-3); color: var(--ink); }
.subtab.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.subtab i { font-style: normal; }

/* ---------- 过滤 / 工具栏 ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar .fl { display: flex; align-items: center; gap: 6px; }
.filter-bar .fl > label { font-size: 12.5px; color: var(--muted); }

/* 日期导航 */
.date-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-3); border-radius: 9px; padding: 4px; }
.date-nav .dn-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 0; background: transparent; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.date-nav .dn-btn:hover { background: #fff; box-shadow: var(--shadow-1); }
.date-nav .dn-btn:disabled { opacity: .3; cursor: not-allowed; }
.date-nav .dn-date {
  min-width: 122px; text-align: center; font-family: var(--font-num); font-size: 15px; font-weight: 700;
  letter-spacing: .4px; padding: 0 6px; white-space: nowrap;
}
.date-nav .dn-today {
  height: 30px; padding: 0 10px; border-radius: 7px; border: 0; background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); white-space: nowrap;
}
.date-nav .dn-today:hover { background: var(--blue-soft); color: var(--blue-deep); }

/* 分页器 */
.x9-pager { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.x9-pager .pg-info b { font-family: var(--font-num); color: var(--ink); font-size: 14px; }
.x9-pager .pg-btns { display: inline-flex; gap: 5px; }
.x9-pager .pg-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2);
  padding: 0;
}
.x9-pager .pg-btn:hover:not(:disabled) { background: var(--panel-3); }
.x9-pager .pg-btn:disabled { opacity: .32; cursor: not-allowed; }
.x9-pager.dark { color: #aeb4bc; }
.x9-pager.dark .pg-info b { color: #fff; }
.x9-pager.dark .pg-btn { background: transparent; border-color: rgba(255, 255, 255, .22); color: #fff; }
.x9-pager.dark .pg-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }

/* ---------- 数据表格增强 ---------- */
.tbl.tbl--dense thead th { padding: 9px 6px; font-size: 13px; }
.tbl.tbl--dense tbody td { padding: 6px 6px; font-size: 13.5px; }
.tbl.tbl--dense .fan-dot { width: 28px; height: 28px; font-size: 13px; }
.tbl .t-num { font-family: var(--font-num); letter-spacing: .3px; }
.tbl th .th-sub { display: block; font-size: 10.5px; font-weight: 500; color: rgba(255, 255, 255, .55); letter-spacing: 0; margin-top: 1px; }
.tbl tbody tr.cur-row td { background: var(--blue-soft) !important; }
.tbl tbody tr.cur-row td:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.tbl tbody tr.cur-row .lv-cell b { color: var(--blue-deep); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: var(--panel-3); }
.tbl tbody tr.row-red td { background: var(--red-soft) !important; }
.tbl tbody tr.row-warn td { background: var(--amber-soft) !important; }
.tbl tbody tr.row-red:hover td, .tbl tbody tr.row-warn:hover td { filter: brightness(.985); }
.tbl .cell-strong { font-weight: 700; color: var(--ink); }
.tbl .empty-cell { padding: 46px 10px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* 可编辑单元格 */
.tbl td.cell-edit { cursor: pointer; }
.tbl td.cell-edit .ed-val {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 54px;
  padding: 4px 8px; border-radius: 6px; font-family: var(--font-num); font-size: 15px; font-weight: 700;
  color: var(--blue-deep); line-height: 1.2;
}
.tbl td.cell-edit:hover { background: var(--blue-soft) !important; }
.tbl td.cell-edit:hover .ed-val { background: #fff; box-shadow: 0 0 0 1px var(--blue-2) inset; }
.tbl td.cell-edit .ed-val u { text-decoration: none; font-family: var(--font-sans); font-size: 11px; color: var(--muted); font-weight: 500; }
.tbl td.cell-edit.fixed { cursor: default; }
.tbl td.cell-edit.fixed .ed-val { color: var(--ink-3); }
.tbl td.cell-edit.fixed:hover { background: transparent !important; }
.tbl td.cell-edit.fixed:hover .ed-val { background: transparent; box-shadow: none; }

/* 表格内等级/状态点 */
.tbl .dot-run { color: var(--red); font-weight: 700; }

/* ---------- 风机圆点（半红=变频运行） ---------- */
.fan-dot.half {
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 50%, #eef0f2 50%, #eef0f2 100%);
  color: var(--ink-2); box-shadow: none;
}
.fan-dot.half::selection { background: transparent; }
.fan-dot { transition: transform .12s, box-shadow .12s; }
.fan-dot:hover { transform: scale(1.06); }
.fan-dot.ring { box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }

/* ---------- 指标块 ---------- */
.mini-metrics { display: grid; gap: 10px; min-width: 0; }
.mini-metrics.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-metrics.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-metrics.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini-metrics.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mini-metrics.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mini-metrics .metric { height: 100%; }
.mini-metrics .metric .v.sm { font-size: 21px; }
.mini-metrics .metric .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-metrics .metric .v u { font-size: 12px; }

/* 大号主指标 */
.hero-metric { display: flex; align-items: center; gap: 22px; padding: 6px 4px 10px; }
.hero-metric .hm-ic {
  width: 74px; height: 74px; border-radius: 20px; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.hero-metric .hm-val { font-family: var(--font-num); font-size: 56px; font-weight: 800; line-height: 1; color: var(--blue-deep); }
.hero-metric .hm-val u { text-decoration: none; font-size: 20px; font-weight: 600; color: var(--muted); font-family: var(--font-sans); margin-left: 4px; }
.hero-metric .hm-k { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.hero-metric .hm-s { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------- 图表容器 ---------- */
.chart-box { position: relative; width: 100%; min-width: 0; }
.chart-box .x9-chart-legend { padding-right: 10px; }
.chart-empty {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
  color: var(--muted); font-size: 13px;
}

/* ---------- 键值行增强 ---------- */
.kv-row .k .mini-tag { margin-left: 2px; }
.kv-row .v.editable { cursor: pointer; color: var(--blue-deep); padding: 3px 8px; border-radius: 6px; }
.kv-row .v.editable:hover { background: var(--blue-soft); }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 26px; }

/* ---------- 设置行（开关/下拉） ---------- */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; min-height: 44px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .sr-k { color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.setting-row .sr-k b { color: var(--ink); font-weight: 600; }
.setting-row .sr-v { display: flex; align-items: center; gap: 10px; }
.setting-row .sr-v .num-v { font-family: var(--font-num); font-size: 18px; font-weight: 700; color: var(--blue-deep); }
.setting-row .sr-v .unit { font-size: 12px; color: var(--muted); margin-left: -4px; }
.setting-row .sr-v.editable { cursor: pointer; padding: 3px 8px; border-radius: 7px; }
.setting-row .sr-v.editable:hover { background: var(--blue-soft); }
.setting-row .sr-v.editable:hover .num-v { color: var(--blue); }

/* ---------- 列表型（报警/事件/历史） ---------- */
.list-head {
  display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 42px;
  background: var(--dark); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .3px;
  flex: 0 0 auto;
}
.list-head > span { text-align: center; }
.list-scroll { flex: 1; min-height: 0; overflow: auto; }
.alarm-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line);
  min-height: 56px; font-size: 13.5px;
}
.alarm-row:hover { background: var(--panel-3); }
.alarm-row .ar-ic {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; background: var(--amber-soft); color: #a86a00;
}
.alarm-row.critical .ar-ic { background: var(--red-soft); color: var(--red); }
.alarm-row.info .ar-ic { background: var(--blue-soft); color: var(--blue); }
.alarm-row .ar-main { flex: 1; min-width: 0; }
.alarm-row .ar-main b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.alarm-row .ar-main span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alarm-row .ar-val { font-family: var(--font-num); font-size: 17px; font-weight: 700; color: var(--red); min-width: 90px; text-align: right; }
.alarm-row .ar-time { font-family: var(--font-num); font-size: 12.5px; color: var(--muted); min-width: 108px; text-align: right; }
.alarm-row .ar-act { flex: 0 0 auto; }

/* 序号列表（历史记录） */
.seq-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px;
  padding: 0 7px; border-radius: 6px; background: var(--panel-3); color: var(--ink-3);
  font-family: var(--font-num); font-size: 12.5px; font-weight: 700;
}

/* ---------- 参数排序（表格设置） ---------- */
.param-order { display: flex; flex-direction: column; gap: 6px; }
.param-order .po-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  background: var(--panel-3); border: 1px solid transparent; font-size: 13.5px;
}
.param-order .po-row.off { opacity: .5; }
.param-order .po-row .po-chk { display: flex; align-items: center; }
.param-order .po-row .po-name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink-2); }
.param-order .po-row .po-unit { font-size: 12px; color: var(--muted); }
.param-order .po-row .po-actions { display: flex; gap: 3px; }
.po-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.po-btn:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue-2); }
.po-btn:disabled { opacity: .3; cursor: not-allowed; }
.po-btn.danger:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* ---------- 模式条扩展 ---------- */
.ctrl-strip .mode-btn { min-width: 96px; }
.ctrl-strip .mode-btn .mk.round { border-radius: 50%; background: #fff; opacity: 1; }
.ctrl-strip .mode-btn .mk.half {
  border-radius: 50%; background: linear-gradient(90deg, #fff 0%, #fff 50%, rgba(255,255,255,.18) 50%);
  opacity: 1;
}
.ctrl-strip .mode-btn.on .mk { background: var(--ink); }
.ctrl-strip .mode-btn.on .mk.half { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 50%, #cdd0d5 50%); }
.ctrl-strip .mode-btn.on.red .mk { background: #fff; }
.ctrl-strip .strip-label { font-size: 12.5px; color: #aeb4bc; letter-spacing: .5px; }
.ctrl-strip .strip-sep { width: 1px; height: 34px; background: rgba(255, 255, 255, .14); }
.ctrl-strip .strip-btn {
  height: 46px; padding: 0 18px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .22);
  background: transparent; color: #e8eaee; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.ctrl-strip .strip-btn:hover { background: rgba(255, 255, 255, .1); }

/* ---------- 通风级别表 ---------- */
.vent-tbl-wrap { flex: 1; min-height: 0; overflow: auto; }
.vent-tbl { table-layout: fixed; }
.vent-tbl thead th { position: sticky; top: 0; z-index: 2; padding: 9px 6px; font-size: 13px; }
.vent-tbl thead th .th-sub { display: block; font-size: 10.5px; font-weight: 500; color: rgba(255, 255, 255, .55); letter-spacing: 0; margin-top: 1px; }
.vent-tbl .c-lv { width: 72px; }
.vent-tbl .c-diff { width: 88px; }
.vent-tbl .fan-th { width: 62px; font-weight: 600; }
.vent-tbl tbody tr { height: 54px; }
.vent-tbl tbody tr.cur-row { background: var(--blue-soft); }
.vent-tbl .lv-cell b {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--panel-3); color: var(--ink); font-size: 15px; font-weight: 800;
}
.vent-tbl .cur-row .lv-cell b { background: var(--blue); color: #fff; }
.vent-tbl .cell-edit .ed-val { font-size: 15px; }

/* ---------- 模式条补充 ---------- */
.ctrl-strip .pager .pg-no { font-family: var(--font-num); font-size: 16px; font-weight: 700; min-width: 44px; text-align: center; }
.ctrl-strip .mode-btn .mk { width: 12px; height: 12px; }
.ctrl-strip .mode-btn .mk.round { background: currentColor; }
.ctrl-strip .mode-btn .mk.cross { background: currentColor; display: inline-flex; align-items: center; justify-content: center; }
.ctrl-strip .mode-btn .mk.cross::after { content: '✕'; font-size: 8px; font-weight: 900; line-height: 1; color: var(--dark); }
.ctrl-strip .mode-btn.on .mk { background: var(--ink); }
.ctrl-strip .mode-btn.on .mk.round { background: var(--ink); }
.ctrl-strip .mode-btn.on .mk.cross { background: var(--ink); }
.ctrl-strip .mode-btn.on .mk.cross::after { color: #fff; }
.ctrl-strip .mode-btn.on .mk.half { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 50%, #d5d7dc 50%, #d5d7dc 100%); }
.ctrl-strip .mode-btn.on.red .mk { background: #fff; }
.ctrl-strip .mode-btn.on.red .mk.cross::after { color: var(--red); }

/* ---------- 面板内单列弹性布局 ---------- */
.panel-body.body-flex { display: flex; flex-direction: column; min-height: 0; }
.panel-body.body-flex > .fill { flex: 1; min-height: 0; }

/* ---------- 日龄曲线 ---------- */
.da-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.da-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px 0; border-top: 1px solid var(--line); margin-top: 6px;
}
.da-tbl thead th { font-size: 12.5px; padding: 8px 6px; }
.da-tbl tbody td { font-size: 13px; }
.da-tbl tbody tr { height: 44px; }
.da-tbl .cell-edit .ed-val { min-width: 58px; font-size: 14px; }

/* ---------- 图表容器增强 ---------- */
.chart-box { position: relative; width: 100%; min-width: 0; display: flex; flex-direction: column; }
.chart-box svg { max-width: 100%; }
.chart-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 2px 0; gap: 10px; flex-wrap: wrap; }

/* ---------- 进风联动 ---------- */
.inlet-link { flex: 0 0 auto; border-top: 1px solid var(--line); padding-top: 10px; }
.inlet-link .kv-row { padding: 6px 2px; }
.inlet-link .kv-row .v { font-size: 15px; }
.inlet-link .kv-row .v.editable { color: var(--blue-deep); cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.inlet-link .kv-row .v.editable:hover { background: var(--blue-soft); }

/* ---------- 报警统一设置表 ---------- */
.alarm-set-tbl { table-layout: fixed; }
.alarm-set-tbl th:first-child, .alarm-set-tbl td:first-child {
  width: 132px; text-align: left; padding-left: 18px; font-weight: 600; color: var(--ink-2); background: var(--panel-2);
}
.alarm-set-tbl tbody td { font-size: 14px; }
.alarm-set-tbl tbody tr.row-on td:first-child { color: var(--ink); }
.alarm-set-tbl .as-cur { font-family: var(--font-num); font-size: 17px; font-weight: 700; color: var(--blue-deep); }
.alarm-set-tbl .as-cur u { text-decoration: none; font-size: 11px; color: var(--muted); margin-left: 1px; font-family: var(--font-sans); }
.alarm-set-tbl .as-val {
  display: inline-flex; align-items: center; justify-content: center; min-width: 62px; padding: 4px 8px;
  border-radius: 6px; font-family: var(--font-num); font-size: 15px; font-weight: 700; cursor: pointer;
  color: var(--ink);
}
.alarm-set-tbl .as-val:hover { background: var(--blue-soft); color: var(--blue-deep); }
.alarm-set-tbl .as-val.disabled { color: var(--muted); }

/* ---------- 报表 ---------- */
.report-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.report-kpi .metric { background: #fff; box-shadow: var(--shadow-1); border-radius: 12px; padding: 12px 14px; }

/* ---------- 空状态 / 骨架 ---------- */
.loading-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; flex: 1; color: var(--muted); font-size: 13.5px; }
.loading-box .spinner { width: 26px; height: 26px; border-width: 3px; }
.err-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; flex: 1; padding: 40px; }
.err-box .eb-ic { width: 62px; height: 62px; border-radius: 16px; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; }
.err-box .eb-t { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.err-box .eb-m { font-size: 13px; color: var(--muted); text-align: center; max-width: 560px; line-height: 1.7; }

/* 图例点 */
.legend-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.legend-inline i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* 只读提示 */
.readonly-hint { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

/* 悬停高亮行用于图表联动 */
.hl-row { background: var(--blue-soft) !important; }

/* ---------- 报警记录 ---------- */
.alarm-stat-strip {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.alarm-stat-strip .mini-metrics { width: 430px; flex: 0 0 auto; }
.alarm-stat-strip .metric { padding: 6px 12px; }
.alarm-stat-strip .metric .v { font-size: 21px; margin-top: 0; }
.alarm-mute-info { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.alarm-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.alarm-tbl { table-layout: fixed; }
.alarm-tbl thead th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; }
.alarm-tbl tbody td { padding: 8px; vertical-align: middle; }
.alarm-tbl tbody tr { height: 56px; }
.alarm-tbl .t-red { font-size: 14.5px; }
.list-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 18px; border-top: 1px solid var(--line);
}
.alarm-set-tbl tbody tr { height: 50px; }
.alarm-set-tbl .as-cur.t-red { color: var(--red); }
.alarm-set-tbl .as-label { font-size: 13.5px; }

/* ---------- 报表 ---------- */
.toolbar-bar {
  flex: 0 0 auto; min-height: 58px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-1);
  display: flex; align-items: center; gap: 18px; padding: 0 18px; flex-wrap: wrap;
}
.toolbar-bar .tb-title { font-size: 15px; font-weight: 700; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.toolbar-bar .spacer { flex: 1; }
.report-range-note { font-size: 12.5px; color: var(--muted); }
.report-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.report-kpi .metric { background: var(--panel-3); }
.report-kpi .metric .v { font-size: 22px; }
.report-tbl-wrap { flex: 1; min-height: 0; overflow: auto; }
.report-tbl thead th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; font-size: 12.5px; }
.report-tbl tbody td { padding: 8px; font-size: 13.5px; }

/* ---------- 事件 / 历史列表 ---------- */
.filter-strip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.event-tbl { table-layout: fixed; }
.event-tbl thead th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; }
.event-tbl tbody td { padding: 9px 8px; font-size: 13.5px; vertical-align: middle; }
.event-tbl tbody tr { height: 52px; cursor: pointer; }
.event-tbl .ev-main b { color: var(--ink); }
.event-tbl .ev-main span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 历史记录 ---------- */
.history-stat-strip { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.history-stat-strip .mini-metrics { flex: 1; }
.history-stat-strip .metric { padding: 6px 12px; }
.history-stat-strip .metric .v { font-size: 20px; margin-top: 0; }

/* ---------- 表格设置 ---------- */
.ts-list { display: flex; flex-direction: column; gap: 6px; }
.ts-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 9px;
  background: var(--panel-3); border: 1px solid transparent; min-height: 44px;
}
.ts-row.on { background: var(--blue-soft); border-color: #d5e0ff; }
.ts-row .ts-name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.ts-row .ts-unit { font-size: 12px; color: var(--muted); min-width: 40px; text-align: right; }
.ts-row .ts-actions { display: flex; gap: 3px; }
.ts-row .switch { transform: scale(.9); transform-origin: right center; }
.ts-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-preview .tag { height: 24px; font-size: 12px; }
.ts-refresh-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ts-refresh-row .lbl { font-size: 13.5px; color: var(--ink-3); }
.ts-refresh-row .val-chip-light {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px; border-radius: 9px;
  background: var(--panel-3); cursor: pointer; font-family: var(--font-num); font-size: 20px; font-weight: 700; color: var(--blue-deep);
  border: 1px solid var(--line-strong);
}
.ts-refresh-row .val-chip-light u { text-decoration: none; font-family: var(--font-sans); font-size: 12px; color: var(--muted); }
.ts-refresh-row .val-chip-light:hover { background: var(--blue-soft); }
