/* ==========================================================================
   火化机教学/仿真演示系统 — ISA-101 高性能 HMI 样式
   设计依据：docs/页面设计原则汇编.md、docs/页面重构提示词.md
   核心：浅灰中性基底 · 颜色只给异常 · 3 秒可判读 · 无发光无霓虹
   ========================================================================== */
:root {
  /* ---- 中性基底（60%）---- */
  --bg-page: #f5f7fa;
  --bg-surface: #ffffff;
  --bg-sunken: #eceff4;
  --bg-hover: #e8edf4;
  --border: #d5dbe4;
  --border-strong: #b4bdcb;

  /* ---- 文字（30%）---- */
  --text-primary: #1f2a37;
  --text-secondary: #4b5969;
  --text-muted: #8494a6;

  /* ---- 状态色（10%，只给异常/可操作）---- */
  --state-normal: #8a94a3;
  --state-alarm: #c0392b;
  --state-warning: #c98a00;
  --state-off: #b6bfcc;
  --state-manual: #2f6fb3;
  --state-setpoint: #0e7c86;

  /* ---- 数据语义色（克制）---- */
  --data-main: #2f6fb3;
  --data-reburn: #0e7c86;

  /* ---- 兼容旧变量名（避免 JS/inline 样式引用断裂）---- */
  --panel: var(--bg-surface);
  --panel-solid: var(--bg-surface);
  --border-hl: #7aa0cc;
  --text: var(--text-primary);
  --text-dim: var(--text-secondary);
  --text-mute: var(--text-muted);
  --cyan: var(--state-setpoint);
  --blue: var(--state-manual);
  --fire: #b45309;
  --fire-hot: #c98a00;
  --red: var(--state-alarm);
  --green: #2e7d5b;
  --yellow: var(--state-warning);
  --purple: #6b4fa0;

  /* ---- 间距 / 形状 ---- */
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px; --space-5: 48px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(31, 42, 55, .06), 0 1px 3px rgba(31, 42, 55, .08);
  --shadow-pop: 0 4px 16px rgba(31, 42, 55, .12), 0 1px 4px rgba(31, 42, 55, .08);

  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, "SF Mono", "Courier New", monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  overflow: hidden;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3ccd8; border-radius: 5px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: #a9b5c4; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap {
  height: 100%; display: grid; place-items: center;
  background: linear-gradient(180deg, #f7f9fc 0%, #eaeef4 100%);
}
.login-card {
  width: 400px; padding: 40px 36px 30px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}
.login-logo {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--bg-sunken); border: 1px solid var(--border);
  font-size: 26px;
}
.login-title { text-align: center; font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: 1px; }
.login-sub { text-align: center; color: var(--text-muted); font-size: 11.5px; margin: 8px 0 26px; letter-spacing: .5px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 10px 12px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 14px; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--state-manual);
  box-shadow: 0 0 0 3px rgba(47, 111, 179, .12);
}
.btn-login {
  width: 100%; padding: 11px; margin-top: 8px;
  background: var(--state-manual); border: none; border-radius: var(--radius);
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer; transition: background .15s;
}
.btn-login:hover { background: #2560a0; }
.btn-login:active { background: #1e5088; }
.btn-login:disabled { opacity: .5; cursor: not-allowed; }
.login-err {
  margin-top: 14px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: #fdeceb; border: 1px solid #f0c0bb; color: var(--state-alarm);
  font-size: 12.5px; display: none;
}
.login-err.show { display: block; }
.login-demo {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); line-height: 1.9; font-family: var(--mono);
}
.login-demo b { color: var(--text-secondary); font-weight: 600; }
.login-foot {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: var(--text-muted);
}

/* ==========================================================================
   应用外壳
   ========================================================================== */
.app { height: 100%; display: none; flex-direction: column; }
.app.ready { display: flex; }

.topbar {
  height: 52px; flex: 0 0 52px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.brand .logo {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px;
  background: var(--bg-sunken); border: 1px solid var(--border); font-size: 14px;
}
.brand small { color: var(--text-muted); font-size: 10px; font-weight: 400; letter-spacing: 0; }

.nav { display: flex; gap: 2px; flex: 1; margin-left: 12px; }
.nav a {
  position: relative; padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--text-secondary); font-size: 13px;
  transition: color .12s, background .12s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav a.active {
  color: var(--text-primary); font-weight: 600;
  background: var(--bg-sunken);
}
.nav a.active::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 2px; background: var(--state-manual);
}
.nav a .star { color: var(--state-warning); margin-left: 3px; font-size: 10px; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--mono); font-size: 13px; color: var(--text-secondary); }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 20px;
  background: var(--bg-sunken); border: 1px solid var(--border);
  font-size: 12.5px;
}
.user-chip .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--state-manual); color: #fff;
}
.user-chip .role { color: var(--text-muted); font-size: 10.5px; }
.btn-ghost {
  padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px;
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-secondary);
  transition: .12s; font-family: var(--font);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-hover); }

/* ==========================================================================
   内容区 / 栅格
   ========================================================================== */
.main { flex: 1; overflow: hidden; position: relative; }
.view { display: none; height: 100%; overflow: auto; padding: var(--space-3); background: var(--bg-page); }
.view.active { display: block; }

.grid { display: grid; gap: var(--space-2); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2; }

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-2);
  box-shadow: var(--shadow-card);
}
.card-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.card-title .idx {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: var(--radius-sm); margin-right: 7px;
  background: var(--bg-sunken); color: var(--text-secondary);
  font-size: 10px; font-family: var(--mono); font-weight: 700;
  border: 1px solid var(--border);
}
.card-title .tag {
  font-size: 10.5px; font-weight: 400; padding: 2px 7px; border-radius: var(--radius-sm);
  color: var(--text-muted); background: var(--bg-sunken); border: 1px solid var(--border);
}

/* ==========================================================================
   指标卡（KPI）
   ========================================================================== */
.metric {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.metric .label { font-size: 11.5px; color: var(--text-muted); letter-spacing: .3px; }
.metric .value {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  line-height: 1.15; color: var(--text-primary);
}
/* 数值语义色：只在需要表达状态时用 */
.metric .value.fire { color: var(--text-primary); }
.metric .value.green { color: var(--text-primary); }
.metric .value.purple { color: var(--text-primary); }
.metric .value.yellow { color: var(--state-warning); }
.metric .value.alarm { color: var(--state-alarm); }
.metric .unit { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 3px; }
.metric .sub { font-size: 10.5px; color: var(--text-muted); }
.metric.is-alarm { border-color: var(--state-alarm); background: #fdf3f2; }
.metric.is-warn { border-color: #e0b34a; background: #fffaf0; }

/* ==========================================================================
   状态指示（符号 + 颜色 + 文字，冗余编码）
   ========================================================================== */
.status-line { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 12.5px; }
.status-line .name { flex: 1; color: var(--text-secondary); }
.dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px;
  background: var(--state-normal);
}
.dot.on { background: var(--state-normal); }            /* 运行 = 中灰 */
.dot.off { background: var(--state-off); }              /* 停用 = 浅灰 */
.dot.warn { background: var(--state-warning); }         /* 警告 = 琥珀 */
.dot.err { background: var(--state-alarm); }            /* 报警 = 红 */
.dot.manual { background: var(--state-manual); }        /* 手动 = 蓝 */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.status-line .val { font-family: var(--mono); font-size: 11.5px; color: var(--text-secondary); min-width: 52px; text-align: right; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.btn {
  padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12.5px; font-family: var(--font);
  transition: background .12s, border-color .12s, color .12s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.btn:active:not(:disabled) { background: #dde3ec; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.on {
  background: var(--state-manual); border-color: var(--state-manual);
  color: #fff; font-weight: 600;
}
.btn.on:hover:not(:disabled) { background: #2560a0; }
.btn.fire { color: var(--fire); border-color: #e2c4a0; background: #fdf7ef; }
.btn.fire.on { background: var(--fire); border-color: var(--fire); color: #fff; }
.btn.danger { color: var(--state-alarm); border-color: #e2b0aa; background: #fdf3f2; }
.btn.danger.on { background: var(--state-alarm); border-color: var(--state-alarm); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 11.5px; }
.btn.lg { padding: 11px 24px; font-size: 14px; letter-spacing: 1px; }

/* ==========================================================================
   阶段条
   ========================================================================== */
.phases { display: flex; gap: 0; margin-bottom: 4px; }
.phase {
  flex: 1; position: relative; padding: 9px 6px 11px;
  text-align: center; font-size: 11.5px; color: var(--text-muted);
  border-top: 2px solid var(--border); transition: .15s;
}
.phase .num { font-family: var(--mono); font-size: 10px; display: block; margin-bottom: 3px; opacity: .7; }
.phase .bar { position: absolute; top: -2px; left: 0; height: 2px; width: 0; background: var(--state-normal); transition: width .4s linear; }
.phase.done { color: var(--text-secondary); border-top-color: var(--border-strong); }
.phase.done .bar { width: 100%; background: var(--border-strong); }
.phase.current { color: var(--text-primary); border-top-color: var(--state-manual); font-weight: 600; }
.phase.current .bar { background: var(--state-manual); }
.phase.active { color: var(--state-manual); border-top-color: var(--state-manual); font-weight: 600; }
.phase.active .bar { background: var(--state-manual); }

/* ==========================================================================
   3D 视图
   ========================================================================== */
#scene3d { width: 100%; height: 100%; display: block; border-radius: var(--radius); }
.viewer {
  position: relative; height: 420px; border-radius: var(--radius); overflow: hidden;
  background: #f2f5f9; border: 1px solid var(--border);
}
.viewer.viewer-light {
  background: #f4f7fa;
  border: 1px solid var(--border);
}
.overlay-light {
  color: var(--text-secondary) !important;
  background: rgba(255, 255, 255, .9) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-card);
}
.overlay-light .hl { color: var(--text-primary) !important; font-weight: 700; }
.hint-light {
  color: var(--text-secondary) !important;
  background: #fffdf5 !important;
  border: 1px solid #e6d3a0 !important;
  box-shadow: var(--shadow-card);
}
.hint-light b { color: var(--fire) !important; }
.viewer .overlay {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-secondary);
  background: rgba(255, 255, 255, .9); padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); line-height: 1.7; pointer-events: none;
}
.viewer .overlay .hl { color: var(--text-primary); font-weight: 700; }
.viewer .hint {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .95); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); line-height: 1.65; pointer-events: none;
}
.viewer .hint b { color: var(--fire); }

.viewer-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.vt-btn {
  padding: 6px 11px; border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(255, 255, 255, .95); color: var(--text-secondary);
  border: 1px solid var(--border); font-size: 11.5px; font-family: var(--font);
  transition: .12s; box-shadow: var(--shadow-card); white-space: nowrap;
}
.vt-btn:hover { background: #fff; border-color: var(--border-strong); color: var(--text-primary); }
.vt-btn.on { background: var(--state-manual); border-color: var(--state-manual); color: #fff; font-weight: 600; }

/* 模块信息面板（浅色） */
.module-panel { position: absolute; left: 12px; bottom: 64px; right: 12px; max-width: 380px; z-index: 5; }
.mp-empty {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .92); border: 1px dashed var(--border-strong);
  color: var(--text-muted); font-size: 11.5px; line-height: 1.6;
}
.mp-empty .mp-ico { font-size: 16px; opacity: .7; }
.mp-content {
  position: relative; padding: 13px 16px 14px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
}
@keyframes mpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mp-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; padding-right: 22px; }
.mp-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.mp-en { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }
.mp-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.75; }
.mp-close {
  position: absolute; right: 9px; top: 7px; width: 20px; height: 20px; line-height: 18px;
  text-align: center; border-radius: 50%; cursor: pointer; color: var(--text-muted); font-size: 16px; transition: .12s;
}
.mp-close:hover { background: var(--bg-sunken); color: var(--text-primary); }

/* ==========================================================================
   表格
   ========================================================================== */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tbl th {
  text-align: left; padding: 9px 10px; color: var(--text-secondary); font-weight: 600;
  background: var(--bg-sunken); border-bottom: 1px solid var(--border);
  white-space: nowrap; font-size: 11.5px;
}
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
table.tbl tbody tr:nth-child(even) td { background: #fafbfd; }
table.tbl tr:hover td { background: var(--bg-hover); }
table.tbl td.mono, table.tbl .mono { font-family: var(--mono); }
table.tbl td .ok { color: #2e7d5b; }
table.tbl td .bad { color: var(--state-alarm); }
table.tbl td .warn { color: var(--state-warning); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 10.5px; background: var(--bg-sunken); color: var(--text-secondary); border: 1px solid var(--border);
}
.badge.green { background: #eef6f1; color: #2e7d5b; border-color: #c3ddce; }
.badge.red { background: #fdeceb; color: var(--state-alarm); border-color: #f0c0bb; }
.badge.yellow { background: #fff8e6; color: #9a6a00; border-color: #ecd9a6; }
.badge.gray { background: var(--bg-sunken); color: var(--text-muted); border-color: var(--border); }
.badge.purple { background: #f2eef9; color: #6b4fa0; border-color: #d9cdec; }

/* ==========================================================================
   滑块
   ========================================================================== */
.slider-row { display: flex; align-items: center; gap: 12px; margin: 11px 0; }
.slider-row label { font-size: 12px; color: var(--text-secondary); min-width: 82px; }
.slider-row input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px;
  background: #dde3ec; outline: none;
}
.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--state-manual); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(31, 42, 55, .25);
}
.slider-row .val { font-family: var(--mono); font-size: 12.5px; color: var(--text-secondary); min-width: 60px; text-align: right; }

/* ==========================================================================
   日志流
   ========================================================================== */
.logstream {
  height: 240px; overflow-y: auto; font-family: var(--mono); font-size: 11.5px;
  background: var(--bg-sunken); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 8px 10px;
}
.logstream .line { padding: 3px 0; display: flex; gap: 8px; line-height: 1.5; border-bottom: 1px solid rgba(213, 219, 228, .6); }
.logstream .line:hover { background: rgba(255, 255, 255, .6); }
.logstream .t { color: var(--text-muted); flex: 0 0 auto; }
.logstream .lvl { flex: 0 0 44px; font-size: 10px; text-transform: uppercase; }
.logstream .lvl.info { color: var(--state-manual); }
.logstream .lvl.warning { color: var(--state-warning); }
.logstream .lvl.error, .logstream .lvl.critical { color: var(--state-alarm); font-weight: 700; }
.logstream .msg { color: var(--text-secondary); flex: 1; }

/* ==========================================================================
   告警
   ========================================================================== */
.alarm-list { max-height: 240px; overflow-y: auto; }
.alarm-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px;
  border-radius: var(--radius-sm); margin-bottom: 7px; font-size: 12px;
  background: var(--bg-sunken); border-left: 3px solid var(--state-manual);
}
.alarm-item.warning { background: #fff8e6; border-left-color: var(--state-warning); }
.alarm-item.critical, .alarm-item.error { background: #fdeceb; border-left-color: var(--state-alarm); }
.alarm-item .a-t { font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); flex: 0 0 auto; }
.alarm-item .a-m { flex: 1; color: var(--text-secondary); line-height: 1.55; }
.alarm-item .a-c { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }

/* ==========================================================================
   大屏布局
   ========================================================================== */
.screen-layout { height: 100%; display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: var(--space-2); }
.screen-col { display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; overflow-y: auto; }
.screen-center { display: flex; flex-direction: column; gap: var(--space-2); min-height: 0; }
.screen-center .viewer { flex: 1; height: auto; min-height: 300px; }
.screen-header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.screen-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.chart { width: 100%; height: 150px; }
.chart.tall { height: 220px; }
.chart.short { height: 110px; }

/* 排放限值条 */
.emission-item { margin-bottom: 11px; }
.emission-head { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 5px; }
.emission-head .n { color: var(--text-secondary); }
.emission-head .v { font-family: var(--mono); color: var(--text-primary); }
.emission-bar { height: 6px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; position: relative; }
.emission-bar .fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.emission-bar .fill.ok { background: var(--state-normal); }
.emission-bar .fill.warn { background: var(--state-warning); }
.emission-bar .fill.bad { background: var(--state-alarm); }
.emission-bar .limit { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(31, 42, 55, .35); }

/* ==========================================================================
   进度环
   ========================================================================== */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 92px; height: 92px; flex: 0 0 92px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-text { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.ring-meta { flex: 1; font-size: 11.5px; color: var(--text-secondary); line-height: 1.9; }
.ring-meta b { color: var(--text-primary); font-family: var(--mono); }

/* ==========================================================================
   通知 Toast
   ========================================================================== */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 260px; max-width: 400px; padding: 11px 15px; border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.55; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-pop); display: flex; gap: 9px; align-items: flex-start;
  animation: toastIn .22s ease;
}
.toast.ok { border-left: 3px solid #2e7d5b; }
.toast.warn { border-left: 3px solid var(--state-warning); }
.toast.err { border-left: 3px solid var(--state-alarm); }
.toast.info { border-left: 3px solid var(--state-manual); }
.toast .ico { flex: 0 0 auto; font-size: 13px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   空状态 / 模态
   ========================================================================== */
.empty { text-align: center; padding: 30px 16px; color: var(--text-muted); font-size: 12.5px; }
.empty .ico { font-size: 28px; opacity: .4; margin-bottom: 9px; }

.modal-mask { position: fixed; inset: 0; background: rgba(31, 42, 55, .38); z-index: 900; display: none; place-items: center; }
.modal-mask.show { display: grid; }
.modal {
  width: 440px; max-width: 92vw; max-height: 86vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-pop);
}
.modal h3 { font-size: 15px; margin-bottom: 18px; color: var(--text-primary); }
.modal .field:last-of-type { margin-bottom: 20px; }
.modal select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border); color: var(--text-primary);
  font-size: 13.5px; font-family: var(--font);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ==========================================================================
   工具类
   ========================================================================== */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.dim { color: var(--text-secondary); }
.mute { color: var(--text-muted); }
.mono { font-family: var(--mono); }
.sm { font-size: 11.5px; }
.xs { font-size: 10.5px; }
.center { text-align: center; }
.hidden { display: none !important; }
.scroll-y { overflow-y: auto; }

/* ==========================================================================
   PLC HMI（浅色版）
   ========================================================================== */
.alarm-bar {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; margin-bottom: var(--space-2);
  border-radius: var(--radius);
  background: #eef6f1; border: 1px solid #c3ddce; font-size: 12.5px;
}
.alarm-bar.warn { background: #fff8e6; border-color: #ecd9a6; }
.alarm-bar.err { background: #fdeceb; border-color: #f0c0bb; }
.ab-ico { font-size: 14px; color: #2e7d5b; }
.alarm-bar.warn .ab-ico { color: var(--state-warning); }
.alarm-bar.err .ab-ico { color: var(--state-alarm); }
.ab-text { flex: 1; color: var(--text-secondary); }
.ab-time { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }

/* 事故后果条（仿真页） */
.fault-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid #ecd9a6; background: #fff8e6;
  flex: 0 0 auto;
}
.fault-banner.crit { border-color: #f0c0bb; background: #fdeceb; }
.fault-banner .fb-ico { font-size: 18px; color: var(--state-warning); flex: 0 0 auto; }
.fault-banner.crit .fb-ico { color: var(--state-alarm); }
.fault-banner .fb-main { flex: 1; min-width: 220px; }
.fault-banner .fb-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.fault-banner .fb-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; }
.fault-banner .fb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fault-banner .fb-dmg { font-size: 11px; color: var(--state-alarm); font-weight: 600; }
.fault-banner .fb-t { font-size: 10.5px; color: var(--text-muted); font-family: var(--mono); }
.fault-banner .fb-lock {
  font-size: 11px; color: var(--state-alarm);
  background: #fdeceb; border: 1px solid #f0c0bb;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}

.hmi-topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: var(--space-2);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.hmi-group { display: flex; align-items: center; gap: 9px; }
.hmi-label { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.hmi-divider { width: 1px; height: 24px; background: var(--border); }
.hmi-spacer { flex: 1; }
.hmi-pv { display: flex; gap: 18px; }
.pv-item { display: flex; flex-direction: column; gap: 2px; }
.pv-label { font-size: 10px; color: var(--text-muted); }
.pv-val { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pv-val.fire, .pv-val.purple, .pv-val.green { color: var(--text-primary); }
.pv-val.warn { color: var(--state-warning); }
.pv-val.alarm { color: var(--state-alarm); }

.sel-switch { display: inline-flex; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; }
.sel-btn {
  padding: 5px 14px; border: none; border-radius: 3px; cursor: pointer;
  background: transparent; color: var(--text-secondary); font-size: 12px;
  font-family: var(--font); transition: .12s;
}
.sel-btn:hover { color: var(--text-primary); }
.sel-btn.on { background: var(--state-manual); color: #fff; font-weight: 600; }

.sys-state { display: flex; align-items: center; gap: 7px; }
.ss-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--state-normal); }
.ss-dot.run { background: var(--state-normal); }
.ss-dot.stop { background: var(--state-off); }
.ss-dot.warn { background: var(--state-warning); }
.ss-dot.fault { background: var(--state-alarm); }
.ss-text { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }

.estop-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--state-alarm); border: 1px solid #a02a1e; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 1px; font-family: var(--font);
  box-shadow: 0 2px 6px rgba(192, 57, 43, .3); transition: .12s;
}
.estop-btn:hover { background: #a8291e; }
.estop-btn:active { background: #91231a; }
.release-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--radius-sm); cursor: pointer;
  background: #2e7d5b; border: 1px solid #23613f; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 1px; font-family: var(--font);
  box-shadow: 0 2px 6px rgba(46, 125, 91, .3); transition: .12s;
  animation: pulse 1.8s infinite;
}
.release-btn:hover { background: #25613f; }

.hmi-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: var(--space-2); }
.hmi-mimic { display: flex; flex-direction: column; }
.mimic-canvas {
  flex: 1; min-height: 520px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fafbfd, #f0f3f8);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.mimic-canvas svg { width: 100%; height: 100%; display: block; }
.mimic-legend { display: flex; align-items: center; gap: 16px; padding: 10px 6px 0; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.mimic-legend span { display: flex; align-items: center; gap: 5px; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lg-dot.on { background: var(--state-normal); }
.lg-dot.off { background: var(--state-off); }
.lg-dot.warn { background: var(--state-warning); }
.lg-dot.fault { background: var(--state-alarm); }
.lg-flow { color: var(--text-secondary); }

.hmi-panel { display: flex; flex-direction: column; }
.dev-list { display: flex; flex-direction: column; gap: 6px; }
.dev-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg-surface); border: 1px solid var(--border); transition: .12s;
}
.dev-item:hover { border-color: var(--border-strong); }
.dev-item.locked { opacity: .62; background: #fafbfd; }
.dev-item.fault { border-color: #f0c0bb; background: #fdf8f7; }
.dev-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dev-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.dev-dot.on { background: var(--state-normal); }
.dev-dot.off { background: var(--state-off); }
.dev-dot.moving { background: var(--state-warning); }
.dev-dot.fault { background: var(--state-alarm); }
.dev-name { font-size: 12.5px; color: var(--text-primary); white-space: nowrap; }
.dev-state { font-size: 10.5px; color: var(--text-muted); font-family: var(--mono); }
.dev-btns { display: flex; gap: 5px; }
.dev-btns button {
  padding: 5px 11px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 11px; font-family: var(--font); min-width: 42px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary);
  transition: .12s;
}
.dev-btns button:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.dev-btns button.start { border-color: #b6cde6; color: var(--state-manual); }
.dev-btns button.start:hover:not(:disabled) { background: #eaf2fb; }
.dev-btns button.stop { border-color: #e2b0aa; color: var(--state-alarm); }
.dev-btns button.stop:hover:not(:disabled) { background: #fdeceb; }
.dev-btns button:disabled { opacity: .38; cursor: not-allowed; }
.dev-lock-hint { grid-column: 1 / -1; font-size: 10px; color: var(--state-warning); margin-top: 2px; padding-left: 18px; }

.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-row { display: grid; grid-template-columns: 74px 1fr 58px; align-items: center; gap: 10px; }
.sp-row label { font-size: 11.5px; color: var(--text-secondary); }
.sp-range { -webkit-appearance: none; height: 4px; border-radius: 2px; background: #dde3ec; outline: none; }
.sp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--state-manual); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(31,42,55,.25); }
.sp-range:disabled { opacity: .4; }
.sp-val { font-family: var(--mono); font-size: 12px; color: var(--text-secondary); text-align: right; }
.auto-run { padding: 4px 0; }
.auto-hint { margin-top: 10px; font-size: 11px; color: var(--text-muted); line-height: 1.6; }

@keyframes fanSpin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -44; } }
@keyframes flowFast { to { stroke-dashoffset: -88; } }

/* ==========================================================================
   事故案例
   ========================================================================== */
.cases-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--space-2); height: 100%; }
.cases-sidebar {
  display: flex; flex-direction: column; gap: 12px; min-height: 0;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-card);
}
.cases-side-head h3 { font-size: 15px; color: var(--text-primary); }
.cases-side-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
.cases-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.cases-filter .cf-chip {
  padding: 4px 10px; border-radius: 20px; cursor: pointer; font-size: 11px;
  background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-secondary); transition: .12s;
}
.cases-filter .cf-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.cases-filter .cf-chip.on { background: var(--state-manual); border-color: var(--state-manual); color: #fff; font-weight: 600; }
.cases-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.case-card {
  padding: 12px 14px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--border); transition: .12s;
}
.case-card:hover { border-color: var(--border-strong); background: #fafbfd; }
.case-card.on { border-color: var(--state-manual); background: #f2f7fd; box-shadow: inset 3px 0 0 var(--state-manual); }
.case-card .cc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.case-card .cc-code { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: var(--bg-sunken); color: var(--text-secondary); border: 1px solid var(--border); }
.case-card .cc-sev { font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.case-card .cc-title { font-size: 12.5px; color: var(--text-primary); line-height: 1.45; font-weight: 500; }
.case-card .cc-meta { font-size: 10px; color: var(--text-muted); margin-top: 5px; font-family: var(--mono); }
.cases-disclaimer {
  font-size: 10.5px; color: var(--text-muted); line-height: 1.6; padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fffdf5; border: 1px solid #ecd9a6;
}

.cases-detail {
  overflow-y: auto; min-height: 0; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-card);
}
.cases-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-muted); font-size: 13px; text-align: center; line-height: 2; }
.cases-empty .ce-ico { font-size: 44px; opacity: .3; }

.cd-head { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.cd-title-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cd-code { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--bg-sunken); color: var(--text-secondary); border: 1px solid var(--border); flex: 0 0 auto; margin-top: 3px; }
.cd-title { font-size: 19px; font-weight: 700; color: var(--text-primary); flex: 1; min-width: 200px; }
.cd-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.cd-badge { font-size: 11px; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-secondary); }
.cd-badge.sev { font-weight: 700; }
.cd-summary {
  margin-top: 14px; font-size: 13.5px; line-height: 1.8; color: var(--text-secondary);
  padding: 14px 16px; border-radius: var(--radius-sm); background: #fdf7ef; border-left: 3px solid var(--fire);
}
.cd-section { margin-bottom: 22px; }
.cd-section h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cd-section h4 .si { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-sm); background: var(--bg-sunken); color: var(--text-secondary); font-size: 11px; font-family: var(--mono); font-weight: 700; border: 1px solid var(--border); }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--state-manual); }
.tl-item:last-child { margin-bottom: 0; }
.tl-time { font-family: var(--mono); font-size: 11px; color: var(--fire); font-weight: 600; margin-bottom: 3px; }
.tl-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.75; }

.cd-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cd-list li { position: relative; padding: 9px 14px 9px 30px; border-radius: var(--radius-sm); background: var(--bg-sunken); font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; }
.cd-list li::before { content: "▸"; position: absolute; left: 12px; top: 9px; color: var(--state-manual); font-size: 11px; }
.cd-list.lesson li::before { content: "◆"; color: var(--state-warning); }
.cd-list.prevent li::before { content: "✓"; color: #2e7d5b; font-weight: 700; }

.conseq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.conseq-item { padding: 12px 14px; border-radius: var(--radius-sm); background: #fdf8f7; border: 1px solid #f0d4d0; }
.conseq-item .ci-key { font-size: 11px; color: var(--state-alarm); font-weight: 600; margin-bottom: 6px; }
.conseq-item .ci-val { font-size: 12.5px; color: var(--text-secondary); line-height: 1.65; }

.scenario-box { padding: 16px 18px; border-radius: var(--radius-sm); background: #f2f7fd; border: 1px solid #c6dbef; }
.scenario-title { font-size: 13px; color: var(--state-manual); font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.scenario-steps { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.scenario-step { display: flex; gap: 11px; align-items: flex-start; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.scenario-step .ss-num { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; background: #dcebf8; color: var(--state-manual); }
.btn-run-scenario {
  padding: 10px 22px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--fire); border: 1px solid #8f4207; color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; font-family: var(--font); transition: .12s;
}
.btn-run-scenario:hover { background: #9a4708; }
.src-links { display: flex; flex-wrap: wrap; gap: 8px; }
.src-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12px; background: var(--bg-sunken); border: 1px solid var(--border);
  color: var(--state-manual); text-decoration: none; transition: .12s;
}
.src-link:hover { background: #eaf2fb; border-color: #b6cde6; }
.src-link::after { content: "↗"; font-size: 10px; opacity: .7; }

.sev-catastrophic { background: #fdeceb; color: var(--state-alarm); border: 1px solid #f0c0bb; }
.sev-major { background: #fff8e6; color: #9a6a00; border: 1px solid #ecd9a6; }
.sev-minor { background: #fffdf5; color: #8a6a00; border: 1px solid #ecd9a6; }

/* ==========================================================================
   总览页（Level 1）
   ========================================================================== */
.ov-banner {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px;
  border-radius: var(--radius); margin-bottom: var(--space-2);
  background: #eef6f1; border: 1px solid #c3ddce;
}
.ov-banner.warn { background: #fff8e6; border-color: #ecd9a6; }
.ov-banner.err { background: #fdeceb; border-color: #f0c0bb; }
.ov-banner .ob-icon { font-size: 20px; }
.ov-banner .ob-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.ov-banner .ob-sub { font-size: 12px; color: var(--text-secondary); margin-left: auto; }

.ov-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin-bottom: var(--space-2); }
.ov-kpi {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.ov-kpi .k-label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.ov-kpi .k-value { font-family: var(--mono); font-size: 32px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.ov-kpi .k-unit { font-size: 13px; color: var(--text-muted); margin-left: 4px; font-weight: 400; }
.ov-kpi .k-spark { height: 26px; margin-top: 8px; }
.ov-kpi.is-alarm { border-color: var(--state-alarm); background: #fdf8f7; }
.ov-kpi.is-alarm .k-value { color: var(--state-alarm); }
.ov-kpi .k-flag { position: absolute; top: 12px; right: 14px; font-size: 11px; font-weight: 700; color: var(--state-alarm); }

.ov-health { margin-bottom: var(--space-2); }
.ov-health-bar { display: flex; height: 22px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.ov-health-seg { display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 600; }
.ov-health-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 11.5px; color: var(--text-secondary); }
.ov-health-legend span { display: flex; align-items: center; gap: 6px; }

.ov-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.ov-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-2); }
.ov-area-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: .12s; box-shadow: var(--shadow-card);
}
.ov-area-card:hover { border-color: var(--state-manual); background: #f8fbfe; }
.ov-area-card .a-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.ov-area-card .a-state { font-size: 11.5px; color: var(--text-muted); }
.ov-area-card .a-state .bad { color: var(--state-alarm); font-weight: 600; }

.ov-events { display: flex; flex-direction: column; gap: 8px; }
.ov-event { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bg-sunken); font-size: 12px; border-left: 3px solid var(--state-manual); }
.ov-event.warning { border-left-color: var(--state-warning); background: #fff8e6; }
.ov-event.critical, .ov-event.error { border-left-color: var(--state-alarm); background: #fdeceb; }
.ov-event .e-t { font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); flex: 0 0 auto; }
.ov-event .e-m { flex: 1; color: var(--text-secondary); line-height: 1.5; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1280px) {
  .screen-layout { grid-template-columns: 260px minmax(0, 1fr) 280px; }
  .ov-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
  .hmi-body { grid-template-columns: 1fr; }
  .mimic-canvas { min-height: 380px; }
  .hmi-pv { display: none; }
  .ov-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .screen-layout { grid-template-columns: 1fr; grid-template-rows: auto; overflow-y: auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .cases-layout { grid-template-columns: 1fr; height: auto; }
  .cases-sidebar { max-height: 320px; }
}
