/* ============================================================
   洁净室数字化运维管理平台 · 视觉样式层  V2
   ------------------------------------------------------------------
   设计基准：1920 × 1080 触控大屏（向下自适应）
   命名规范：BEM（block__element--modifier）
   层级：tokens → base → shell → module → interaction → responsive
   ============================================================ */

/* ============================================================
   1. 设计令牌
   ============================================================ */
:root {
  /* ---- 底色：四段式深空蓝，越靠上越冷 ---- */
  --bg-0: #02060c;
  --bg-1: #06121f;
  --bg-2: #0a1f31;
  --bg-3: #0d2a41;

  /* ---- 表面：玻璃拟态三层结构 ---- */
  --surface-1: rgba(14, 40, 62, 0.62);
  --surface-2: rgba(19, 52, 79, 0.72);
  --surface-3: rgba(24, 64, 96, 0.55);
  --surface-sunk: rgba(5, 18, 29, 0.55);

  /* ---- 描边：统一冷蓝低对比 ---- */
  --line-1: rgba(126, 196, 240, 0.09);
  --line-2: rgba(126, 196, 240, 0.16);
  --line-3: rgba(56, 214, 255, 0.42);
  --line-sunk: rgba(2, 10, 18, 0.85);

  /* ---- 语义色：主色降饱和，状态色提亮度 ---- */
  --cyan: #38d6ff;
  --cyan-soft: rgba(56, 214, 255, 0.14);
  --cyan-deep: #1787a8;
  --blue: #4a8cff;
  --green: #2ee08a;
  --orange: #ffb454;
  --red: #ff6b6b;
  --purple: #9b8cff;

  /* ---- 文字：四级层级 ---- */
  --t1: #eef7ff;
  --t2: #a6c3d8;
  --t3: #6d8ea6;
  --t4: #4a6779;

  /* ---- 尺寸节奏（4px 基准） ---- */
  --r-card: 6px;
  --r-sm: 4px;
  --r-xs: 3px;
  --gap: 16px;
  --pad-card: 16px;
  --topbar-h: 64px;
  --status-h: 28px;

  /* ---- 字体 ---- */
  --font-sans: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Arial Narrow", sans-serif;

  /* ---- 光影 ---- */
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 10px 28px -10px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, 0.8);
  --glow-cyan: 0 0 14px rgba(56, 214, 255, 0.4);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   2. 基础重置
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--t1);
  background: var(--bg-0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, li, table { margin: 0; padding: 0; }
ul, li { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
b, strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* 数字统一：等宽、紧凑、无光学偏差 */
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

/* ============================================================
   3. 背景层：网格 + 双光晕 + 暗角 + 扫描线
   ============================================================ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1400px 780px at 50% -18%, #103c5c 0%, transparent 62%),
    radial-gradient(900px 560px at 88% 108%, rgba(74, 140, 255, 0.14) 0%, transparent 60%),
    radial-gradient(760px 460px at 6% 92%, rgba(56, 214, 255, 0.08) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 42%, var(--bg-0) 100%);
}

/* 精细网格 */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 196, 240, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 196, 240, 0.052) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 78% 66% at 50% 38%, #000 10%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse 78% 66% at 50% 38%, #000 10%, transparent 88%);
  opacity: 0.9;
}

/* 顶部暖色微光，避免全屏冷调发灰 */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.85;
}
.bg-glow--top {
  width: 780px;
  height: 380px;
  top: -230px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(56, 214, 255, 0.13);
}
.bg-glow--bottom {
  width: 1000px;
  height: 320px;
  bottom: -260px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(74, 140, 255, 0.1);
}

/* 缓慢扫描线，工业监控感 */
.bg-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(180deg, transparent, rgba(56, 214, 255, 0.045), transparent);
  animation: scan 14s linear infinite;
}
@keyframes scan {
  0%   { top: -220px; }
  100% { top: 100%; }
}

/* ============================================================
   4. 应用骨架
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gap);
  min-height: 0;
}

/* ============================================================
   5. 顶部导航栏
   ============================================================ */
.topbar {
  position: relative;
  flex: none;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 214, 255, 0.42), rgba(126, 196, 240, 0.1) 32%, rgba(126, 196, 240, 0.04) 72%, transparent);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(56, 214, 255, 0.35));
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text { display: flex; flex-direction: column; justify-content: center; }

.brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2.4px;
  line-height: 1.15;
  background: linear-gradient(96deg, #ffffff 0%, #ffffff 42%, #8fd8f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  margin-top: 3px;
  font-family: var(--font-num);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 2.7px;
  color: var(--t4);
}

/* ---- 主导航 ---- */
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.nav-item {
  position: relative;
  padding: 8px 15px;
  font-size: 13.5px;
  letter-spacing: 0.6px;
  color: var(--t3);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}
.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.nav-item:hover { color: var(--t1); }
.nav-item:hover::before { opacity: 1; }

.nav-item.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.2), rgba(56, 214, 255, 0.04));
  box-shadow:
    0 0 0 1px rgba(56, 214, 255, 0.32) inset,
    0 0 18px -4px rgba(56, 214, 255, 0.45) inset;
}
.nav-item.is-active::before { opacity: 0; }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* ---- 右侧工具区 ---- */
.topbar__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.sys-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  padding-right: 2px;
}
.sys-clock__time {
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #ffffff;
}
.sys-clock__date {
  margin-top: 2px;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--t4);
}

.net-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  font-size: 11.5px;
  color: var(--t2);
  border: 1px solid var(--line-1);
  border-radius: 999px;
  background: rgba(6, 22, 35, 0.6);
}

.tool-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--t3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: rgba(6, 22, 35, 0.6);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tool-btn:hover {
  color: var(--cyan);
  border-color: var(--line-3);
  background: rgba(16, 52, 78, 0.8);
}
.tool-btn svg { width: 17px; height: 17px; }
.tool-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-family: var(--font-num);
  font-size: 9.5px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
  color: #1a0505;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.75);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 4px;
  border: 1px solid var(--line-1);
  border-radius: 999px;
  background: rgba(6, 22, 35, 0.6);
}
.user-chip__avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: var(--cyan);
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.24), rgba(56, 214, 255, 0.08));
  border: 1px solid rgba(56, 214, 255, 0.3);
  border-radius: 50%;
}
.user-chip__name { font-size: 12px; color: var(--t2); }

/* ============================================================
   6. 三栏工作区
   ============================================================ */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr) 460px;
  gap: var(--gap);
  padding: 14px 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
  min-width: 0;
}

/* ============================================================
   7. 卡片基础
   ============================================================ */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: var(--pad-card);
  background:
    linear-gradient(168deg, rgba(31, 78, 112, 0.5) 0%, rgba(14, 40, 62, 0.62) 46%, rgba(7, 22, 35, 0.72) 100%);
  border: 1px solid var(--line-1);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  isolation: isolate;
}

/* 顶部高光细线：让卡片有"玻璃"厚度 */
.card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 230, 255, 0.28) 22%, rgba(180, 230, 255, 0.28) 78%, transparent);
  pointer-events: none;
}

/* 左上角标记：唯一的装饰，克制 */
.card::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--line-3);
  border-left: 1px solid var(--line-3);
  border-top-left-radius: var(--r-card);
  pointer-events: none;
  opacity: 0.75;
}

.card__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-1);
}
.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  color: var(--t1);
  white-space: nowrap;
}
.card__title::before {
  content: "";
  width: 3px;
  height: 14px;
  flex: none;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--cyan), rgba(56, 214, 255, 0.12));
  box-shadow: 0 0 10px rgba(56, 214, 255, 0.5);
}
.card__meta {
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--t4);
  white-space: nowrap;
}
.card__meta b {
  font-family: var(--font-num);
  font-size: 11.5px;
  color: var(--t2);
  font-weight: 600;
}
.card__head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- 状态点 ---- */
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--t4);
}
.dot--cyan   { background: var(--cyan);   box-shadow: 0 0 7px rgba(56, 214, 255, 0.9); }
.dot--green  { background: var(--green);  box-shadow: 0 0 7px rgba(46, 224, 138, 0.85); }
.dot--orange { background: var(--orange); box-shadow: 0 0 7px rgba(255, 180, 84, 0.85); }
.dot--red    { background: var(--red);    box-shadow: 0 0 8px rgba(255, 107, 107, 0.9); animation: pulse 1.6s ease-in-out infinite; }
.dot--purple { background: var(--purple); box-shadow: 0 0 7px rgba(155, 140, 255, 0.85); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  font-size: 9.5px;
  letter-spacing: 0.3px;
  color: var(--cyan);
  border: 1px solid rgba(56, 214, 255, 0.22);
  border-radius: 999px;
  background: rgba(56, 214, 255, 0.07);
  white-space: nowrap;
}
.live-tag .dot { animation: pulse 2s ease-in-out infinite; }

.legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--t3);
}

.icon-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--t4);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.icon-btn:hover {
  color: var(--cyan);
  border-color: var(--line-2);
  background: rgba(56, 214, 255, 0.08);
}
.icon-btn svg { width: 13px; height: 13px; }

/* ---- 分段控件 ---- */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
}
.seg__item {
  padding: 2px 9px;
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--t4);
  border-radius: 2px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.seg__item:hover { color: var(--t2); }
.seg__item.is-active {
  color: var(--cyan);
  background: rgba(56, 214, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(56, 214, 255, 0.22) inset;
}

/* ============================================================
   8. 核心指标卡
   ============================================================ */
.card--kpi { flex: none; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 11px 12px 10px;
  background: linear-gradient(165deg, rgba(24, 63, 94, 0.72) 0%, rgba(10, 30, 47, 0.6) 100%);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.kpi:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.8);
}

/* 左侧状态条：唯一的状态承载，替代原进度条 */
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
  opacity: 0.9;
}
.kpi--ok::before     { background: rgba(46, 224, 138, 0.55); }
.kpi--warn::before   { background: var(--orange); box-shadow: 0 0 8px rgba(255, 180, 84, 0.45); }
.kpi--danger::before { background: var(--red); box-shadow: 0 0 9px rgba(255, 107, 107, 0.55); }

.kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kpi__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi__tag {
  flex: none;
  padding: 1px 5px;
  font-size: 9.5px;
  line-height: 1.5;
  border-radius: 2px;
  white-space: nowrap;
}
.kpi__tag--ok     { color: var(--green);  background: rgba(46, 224, 138, 0.12); box-shadow: 0 0 0 1px rgba(46, 224, 138, 0.16) inset; }
.kpi__tag--warn   { color: var(--orange); background: rgba(255, 180, 84, 0.13); box-shadow: 0 0 0 1px rgba(255, 180, 84, 0.18) inset; }
.kpi__tag--danger { color: var(--red);    background: rgba(255, 107, 107, 0.13); box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.18) inset; }

.kpi__value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 7px;
}
.kpi__num {
  font-family: var(--font-num);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(56, 214, 255, 0.3);
}
.kpi__unit {
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--t3);
  letter-spacing: 0.04em;
}

.kpi__spark {
  height: 24px;
  margin: 6px -2px 0;
  opacity: 0.75;
}
.kpi__spark svg { display: block; }

.kpi__foot {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--t4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   9. 图表通用
   ============================================================ */
.chart-box { position: relative; min-height: 0; }
.chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; }

.card--trend { flex: 1; }

.chart-box--trend {
  flex: 1;
  min-height: 120px;
  margin-top: 8px;
}

.chart-box--donut {
  width: 100%;
  height: 100%;
  flex: none;
}
.donut-shell {
  position: relative;
  width: 184px;
  height: 184px;
  flex: none;
}

.trend-legend {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  color: var(--t3);
}
.trend-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.trend-legend i {
  display: inline-block;
  width: 10px;
  height: 2px;
  border-radius: 1px;
}
.trend-legend b {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: 0.02em;
}

/* ============================================================
   10. 洁净度分级
   ============================================================ */
.card--iso { flex: none; }

.iso-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.iso-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}
.iso-item__name {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--t2);
}
.iso-item__track {
  position: relative;
  height: 4px;
  background: rgba(4, 16, 26, 0.75);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(126, 196, 240, 0.06) inset;
}
.iso-item__fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(56, 214, 255, 0.35), var(--cyan));
  box-shadow: 0 0 10px rgba(56, 214, 255, 0.5);
  transition: width 0.7s var(--ease);
}
.iso-item:nth-child(2) .iso-item__fill { background: linear-gradient(90deg, rgba(46, 224, 138, 0.3), var(--green)); box-shadow: 0 0 10px rgba(46, 224, 138, 0.45); }
.iso-item:nth-child(3) .iso-item__fill { background: linear-gradient(90deg, rgba(155, 140, 255, 0.3), var(--purple)); box-shadow: 0 0 10px rgba(155, 140, 255, 0.45); }
.iso-item:nth-child(4) .iso-item__fill { background: linear-gradient(90deg, rgba(255, 180, 84, 0.3), var(--orange)); box-shadow: 0 0 10px rgba(255, 180, 84, 0.45); }
.iso-item__val {
  font-family: var(--font-num);
  font-size: 11.5px;
  color: var(--t2);
  text-align: right;
  letter-spacing: 0.02em;
}

/* ============================================================
   11. 洁净区平面监控
   ============================================================ */
.card--plan { flex: 1.5; }

.plan-wrap {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 16px;
}

.plan-canvas {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 214, 255, 0.07), transparent 68%),
    linear-gradient(180deg, rgba(4, 15, 24, 0.7), rgba(3, 11, 18, 0.55));
  overflow: hidden;
}
.plan-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(126, 196, 240, 0.03) 0 1px, transparent 1px 2px);
  pointer-events: none;
  opacity: 0.35;
}
.plan-canvas svg { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }

/* ---- 分区 ---- */
.zone { cursor: pointer; }
.zone__rect {
  fill: rgba(56, 214, 255, 0.055);
  stroke: rgba(126, 196, 240, 0.38);
  stroke-width: 1;
  transition: fill 0.25s var(--ease), stroke 0.25s var(--ease);
}
.zone:hover .zone__rect,
.zone.is-active .zone__rect {
  fill: rgba(56, 214, 255, 0.17);
  stroke: var(--cyan);
}
.zone--warn .zone__rect {
  fill: rgba(255, 180, 84, 0.1);
  stroke: rgba(255, 180, 84, 0.6);
}
.zone--warn:hover .zone__rect,
.zone--warn.is-active .zone__rect {
  fill: rgba(255, 180, 84, 0.22);
  stroke: var(--orange);
}
.zone--danger .zone__rect {
  fill: rgba(255, 107, 107, 0.12);
  stroke: rgba(255, 107, 107, 0.75);
  animation: zonePulse 2.2s ease-in-out infinite;
}
.zone--danger:hover .zone__rect,
.zone--danger.is-active .zone__rect {
  fill: rgba(255, 107, 107, 0.26);
  stroke: var(--red);
}
@keyframes zonePulse {
  0%, 100% { stroke-opacity: 0.95; }
  50%      { stroke-opacity: 0.4; }
}

.zone__label {
  font-size: 12px;
  fill: #d3e9f7;
  font-family: var(--font-sans);
  pointer-events: none;
  letter-spacing: 0.04em;
}
.zone__val {
  font-size: 12px;
  fill: #ffffff;
  font-family: var(--font-num);
  pointer-events: none;
  letter-spacing: 0.02em;
}
.zone--warn .zone__val   { fill: var(--orange); }
.zone--danger .zone__val { fill: var(--red); }

.zone__pulse { animation: zoneBlink 1.8s ease-in-out infinite; }
@keyframes zoneBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.plan-tip {
  position: absolute;
  z-index: 5;
  min-width: 158px;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--t1);
  background: rgba(3, 13, 21, 0.96);
  border: 1px solid var(--line-3);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transform: translate(-50%, -112%);
}
.plan-tip b {
  font-family: var(--font-num);
  color: var(--cyan);
  font-weight: 600;
}

/* ---- 右侧分区详情面板 ---- */
.plan-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

/* 分区标题 */
.p-head { flex: none; }
.p-head__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.p-head__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-head__cls {
  flex: none;
  padding: 0 6px;
  font-family: var(--font-num);
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--cyan);
  border: 1px solid rgba(56, 214, 255, 0.3);
  border-radius: 2px;
  background: rgba(56, 214, 255, 0.07);
}
.p-head__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--t4);
}
.p-head__cnt { color: var(--t2); }
.p-head__hint {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--t4);
  white-space: nowrap;
}

/* 关键参数行 */
.p-list {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p-row__top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.p-row__name {
  font-size: 11px;
  color: var(--t3);
  white-space: nowrap;
}
.p-row__ref {
  flex: 1;
  padding-right: 10px;
  font-family: var(--font-num);
  font-size: 9.5px;
  color: var(--t4);
  text-align: right;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}
.p-row__val {
  flex: none;
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.p-row__val em {
  margin-left: 2px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 400;
  color: var(--t4);
}
.p-row__flag { margin-left: 3px; font-size: 10px; }

.p-row--low  .p-row__val,
.p-row--low  .p-row__flag { color: var(--orange); }
.p-row--high .p-row__val,
.p-row--high .p-row__flag { color: var(--red); }

/* 阈值区间 + 当前值 */
.p-row__bar {
  position: relative;
  height: 4px;
  margin-top: 5px;
  background: rgba(4, 16, 26, 0.85);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(126, 196, 240, 0.05) inset;
}
.p-row__band {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(46, 224, 138, 0.22);
  border-radius: 1px;
}
.p-row__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(56, 214, 255, 0.22), var(--cyan));
  transition: width 0.5s var(--ease);
}
.p-row--low .p-row__fill  { background: linear-gradient(90deg, rgba(255, 180, 84, 0.22), var(--orange)); }
.p-row--high .p-row__fill { background: linear-gradient(90deg, rgba(255, 107, 107, 0.22), var(--red)); }
.p-row__dot {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}
.p-row--low .p-row__dot  { background: var(--orange); box-shadow: 0 0 7px rgba(255, 180, 84, 0.9); }
.p-row--high .p-row__dot { background: var(--red);    box-shadow: 0 0 8px rgba(255, 107, 107, 0.95); }

/* 迷你走势 */
.p-trend {
  flex: none;
  padding: 7px 10px 6px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: rgba(8, 26, 40, 0.55);
}
.p-trend__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--t4);
}
.p-trend__top b {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t2);
}
.p-trend__chart { height: 30px; margin-top: 5px; }
.p-trend__chart svg { display: block; }

/* 阈值告警提示 */
.p-alert {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: rgba(8, 26, 40, 0.55);
}
.p-alert--danger { border-color: rgba(255, 107, 107, 0.28); background: rgba(48, 15, 17, 0.4); }
.p-alert--warn   { border-color: rgba(255, 180, 84, 0.28);  background: rgba(42, 31, 13, 0.36); }
.p-alert--ok {
  border-color: rgba(46, 224, 138, 0.2);
  background: rgba(9, 34, 25, 0.34);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.p-alert__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--t2);
}
.p-alert__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  overflow-y: auto;
}
.p-alert__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  font-size: 10px;
  color: var(--t3);
}
.p-alert__list span { color: var(--t2); }
.p-alert__list b {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  color: var(--t1);
}
.p-alert__list em {
  flex-basis: 100%;
  font-style: normal;
  font-size: 9.5px;
  color: var(--t4);
}
.p-alert--danger .p-alert__list em { color: rgba(255, 107, 107, 0.8); }
.p-alert--warn .p-alert__list em   { color: rgba(255, 180, 84, 0.8); }
.p-alert__empty {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.65;
  color: var(--t4);
}

/* ============================================================
   12. 设备运行状态
   ============================================================ */
.card--device-run { flex: 1; }

.run-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.run-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  align-self: center;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center__num {
  font-family: var(--font-num);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.donut-center__num small {
  font-size: 11px;
  color: var(--t4);
  letter-spacing: 0;
}
.donut-center__txt {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--t4);
}

.run-legend {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 3px 12px;
  font-size: 10px;
  color: var(--t4);
}
.run-legend li { display: inline-flex; align-items: center; gap: 4px; }
.run-legend b {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
}

.run-kpi {
  display: flex;
  gap: 14px;
  padding-top: 2px;
  font-size: 10px;
  color: var(--t4);
  white-space: nowrap;
}
.run-kpi b {
  margin-left: 3px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
}

/* 设备单元 */
.run-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 9px;
  min-width: 0;
  min-height: 0;
}

.dev-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: linear-gradient(160deg, rgba(20, 54, 80, 0.55), rgba(8, 26, 40, 0.5));
  overflow: hidden;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.dev-cell:hover { border-color: var(--line-2); }
.dev-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--green);
  opacity: 0.6;
}
.dev-cell--idle::before  { background: var(--t4); }
.dev-cell--warn::before  { background: var(--orange); opacity: 0.9; }
.dev-cell--fault::before { background: var(--red); opacity: 1; box-shadow: 0 0 8px rgba(255, 107, 107, 0.55); }
.dev-cell--warn  { border-color: rgba(255, 180, 84, 0.18); }
.dev-cell--fault { border-color: rgba(255, 107, 107, 0.24); background: linear-gradient(160deg, rgba(52, 18, 20, 0.55), rgba(12, 24, 34, 0.5)); }

.dev-cell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dev-cell__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11.5px;
  color: var(--t1);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-cell__metrics {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 9.5px;
  color: var(--t4);
  white-space: nowrap;
}
.dev-cell__metrics b {
  margin-left: 3px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
}
.dev-cell__bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(4, 16, 26, 0.85);
  overflow: hidden;
}
.dev-cell__bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(56, 214, 255, 0.25), var(--cyan));
  box-shadow: 0 0 8px rgba(56, 214, 255, 0.35);
  transition: width 0.7s var(--ease);
}
.dev-cell--warn .dev-cell__bar i { background: linear-gradient(90deg, rgba(255, 180, 84, 0.25), var(--orange)); box-shadow: 0 0 8px rgba(255, 180, 84, 0.4); }
.dev-cell--fault .dev-cell__bar i,
.dev-cell--idle .dev-cell__bar i { background: rgba(109, 142, 166, 0.35); box-shadow: none; }

.dev-cell__note {
  font-size: 9.5px;
  color: var(--t4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-cell__note--warn   { color: rgba(255, 180, 84, 0.9); }
.dev-cell__note--danger { color: rgba(255, 107, 107, 0.92); }

/* ============================================================
   13. 实时告警
   ============================================================ */
.card--alarm { flex: 1; }

.alarm-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--t4);
}
.alarm-stat b {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
}

.alarm-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 3px;
}

.alarm-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 13px;
  background: rgba(8, 26, 40, 0.55);
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.alarm-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
}
.alarm-item:hover {
  background: rgba(17, 48, 72, 0.85);
  border-color: var(--line-2);
  transform: translateX(2px);
}
.alarm-item--critical { background: rgba(48, 14, 16, 0.42); }
.alarm-item--critical:hover { background: rgba(62, 18, 20, 0.6); }
.alarm-item--critical::before { background: var(--red); }
.alarm-item--major::before    { background: var(--orange); }
.alarm-item--minor::before    { background: var(--cyan); }

.alarm-item__level {
  padding: 2px 0;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-align: center;
  border-radius: 2px;
  white-space: nowrap;
}
.alarm-item--critical .alarm-item__level { color: var(--red);    background: rgba(255, 107, 107, 0.15); }
.alarm-item--major .alarm-item__level    { color: var(--orange); background: rgba(255, 180, 84, 0.15); }
.alarm-item--minor .alarm-item__level    { color: var(--cyan);   background: rgba(56, 214, 255, 0.13); }

.alarm-item__main { min-width: 0; }
.alarm-item__text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alarm-item__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--t4);
  white-space: nowrap;
  overflow: hidden;
}
.alarm-item__sub i { font-style: normal; opacity: 0.5; }
.alarm-item__time {
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--t3);
  letter-spacing: 0.04em;
}
.alarm-item__handle {
  flex: none;
  padding: 3px 9px;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--cyan);
  border: 1px solid rgba(56, 214, 255, 0.3);
  border-radius: var(--r-xs);
  background: rgba(56, 214, 255, 0.06);
  transition: all 0.2s var(--ease);
}
.alarm-item__handle:hover {
  color: #02141c;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(56, 214, 255, 0.5);
}

/* ============================================================
   14. 设备清单表格
   ============================================================ */
.card--device-list { flex: none; height: 314px; }

.table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-right: -4px;
  padding-right: 4px;
}

.dev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.dev-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 8px 8px;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--t4);
  text-align: left;
  white-space: nowrap;
  background: linear-gradient(180deg, #0b2234 70%, rgba(11, 34, 52, 0.9));
  border-bottom: 1px solid var(--line-1);
}
.dev-table tbody td {
  padding: 6px 8px;
  color: var(--t3);
  border-bottom: 1px solid rgba(126, 196, 240, 0.05);
  white-space: nowrap;
}
.dev-table tbody tr { transition: background 0.18s var(--ease); }
.dev-table tbody tr:last-child td { border-bottom: 0; }
.dev-table tbody tr:hover td { background: rgba(56, 214, 255, 0.05); }
.dev-table .ta-r { text-align: right; }
.dev-table td:first-child { color: var(--t1); letter-spacing: 0.2px; }
.dev-table td.num {
  font-family: var(--font-num);
  color: var(--t2);
  letter-spacing: 0.02em;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px 1px 5px;
  font-size: 10px;
  line-height: 1.6;
  border-radius: 2px;
  white-space: nowrap;
}
.state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.state--run    { color: var(--green);  background: rgba(46, 224, 138, 0.1); }
.state--danger { color: var(--red);    background: rgba(255, 107, 107, 0.12); }
.state--idle  { color: var(--t3);     background: rgba(126, 196, 240, 0.08); }
.state--idle i { box-shadow: none; }
.state--warn  { color: var(--orange); background: rgba(255, 180, 84, 0.11); }
.state--fault { color: var(--red);    background: rgba(255, 107, 107, 0.11); }

/* ============================================================
   15. 运维快捷入口
   ============================================================ */
.card--quick { flex: none; }

.quick-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(70px, 1fr);
  align-content: center;
  gap: 10px;
}

.quick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 6px;
  background: linear-gradient(170deg, rgba(22, 58, 88, 0.6), rgba(8, 25, 39, 0.5));
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease),
              transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.quick:hover,
.quick:focus-visible {
  border-color: var(--line-3);
  background: linear-gradient(170deg, rgba(30, 78, 115, 0.85), rgba(11, 34, 52, 0.7));
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.9), 0 0 16px -6px rgba(56, 214, 255, 0.5);
}
.quick:active { transform: translateY(0); }

.quick__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.16), rgba(56, 214, 255, 0.05));
  border: 1px solid rgba(56, 214, 255, 0.22);
  border-radius: var(--r-xs);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.quick:hover .quick__icon {
  border-color: rgba(56, 214, 255, 0.55);
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.28), rgba(56, 214, 255, 0.1));
}
.quick__icon svg { width: 15px; height: 15px; }
.quick__label {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--t2);
  white-space: nowrap;
}
.quick:hover .quick__label { color: var(--t1); }

.quick__badge {
  position: absolute;
  top: 5px;
  right: 7px;
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--orange);
}

/* ============================================================
   16. 底部状态条
   ============================================================ */
.statusbar {
  flex: none;
  height: var(--status-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-1);
  font-size: 11px;
  color: var(--t4);
}
.statusbar__left,
.statusbar__right { display: flex; align-items: center; gap: 18px; }
.statusbar span { display: inline-flex; align-items: center; gap: 5px; }
.statusbar b {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  color: var(--t3);
  letter-spacing: 0.04em;
}

/* ============================================================
   17. 滚动条 / 动效降级
   ============================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(126, 196, 240, 0.2);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(56, 214, 255, 0.42); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   18. 响应式
   ============================================================ */

/* 1600 ~ 1760：收窄左右栏 */
@media (max-width: 1760px) {
  .workspace { grid-template-columns: 322px minmax(0, 1fr) 424px; }
  .kpi__num  { font-size: 25px; }
  .plan-wrap { grid-template-columns: minmax(0, 1fr) 212px; }
}

/* 1200 ~ 1600：双列，右栏下移 */
@media (max-width: 1600px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-rows: minmax(620px, 1fr);
  }
  .col--right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .card--alarm { grid-row: span 2; height: 520px; }
  .card--device-list { height: 300px; }
  .card--quick { height: 210px; }
}

/* < 1200：单列堆叠 */
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .col--right { grid-template-columns: minmax(0, 1fr); }
  .card--alarm { grid-row: auto; height: 420px; }
  .card--plan { min-height: 460px; }
  .card--device-run { min-height: 300px; }
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }
  .topbar__nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .plan-wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) auto;
  }
  .plan-side { overflow: visible; }
  .run-body { grid-template-columns: 150px minmax(0, 1fr); }
  .run-list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
}

/* 触屏：取消 hover 位移，改为按下反馈 */
@media (hover: none) {
  .alarm-item:hover { transform: none; }
  .quick:hover { transform: none; }
  .kpi:hover { transform: none; }
}

@media print {
  .bg-scan { display: none; }
}
