/* ==========================================================================
   NUART INTERNATIONAL DESIGN SYSTEM — 基础兼容层
   --------------------------------------------------------------------------
   依据用户提供的 10 张国际高端 SaaS 控制台参考图（Finsera / Ledgerix /
   Nodus / Clerio / Hotel Serenity / Lurn / Dexa / CRM 等）重新设计的
   企业级运维控制台：
   - 布局骨架：顶部细工具条 + 左侧竖排导航栏 + 设备树栏 + 干净内容区
   - 视觉语言：克制中性灰阶；发丝线边框；无装饰渐变
   - 排版：Manrope 正文与标题 / JetBrains Mono 数值
   - 组件：小圆角、极浅阴影、等宽数字、大写眉题（kicker）
   本文件最后加载，覆盖全部历史视觉层；不修改任何业务逻辑。
   ========================================================================== */

/* ============ 1. TOKENS — LIGHT（默认） ============ */
:root, html[data-theme="light"] {
  /* 基底：暖纸白，艺术馆质感 */
  --bg-app: #F5F4F1;
  --bg-mesh: none;
  --surface-base: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-card-hover: #FAFAF7;
  --surface-elevated: #FBFBF8;
  --surface-glass: rgba(255,255,255,.92);
  --surface-glass-border: rgba(26,26,26,.08);

  /* 文本：墨黑 + 暖灰阶 */
  --text-main: #191918;
  --text-sub: #54504A;
  --text-tertiary: #7A756C;
  --text-muted: #A9A39A;

  /* 线条：暖发丝线 */
  --line-hairline: #E8E5DE;
  --line-subtle: #D6D2C8;
  --line-medium: #A9A39A;
  --line-focus: #0B7A6E;

  /* 品牌：深青绿（唯一交互强调色，能源+艺术语义） */
  --brand-blue: #0B7A6E;
  --brand-blue-hover: #09685E;
  --brand-blue-soft: rgba(11,122,110,.08);
  --brand-blue-glow: rgba(11,122,110,.16);
  --brand-emerald: #1E9E62;
  --brand-emerald-soft: rgba(30,158,98,.08);
  --brand-emerald-glow: rgba(30,158,98,.15);
  --brand-indigo: #4F6BED;
  --brand-indigo-soft: rgba(79,107,237,.08);
  --brand-amber: #B05E10;
  --brand-amber-soft: rgba(176,94,16,.09);
  --brand-amber-glow: rgba(176,94,16,.16);
  --brand-rose: #C0392B;
  --brand-rose-soft: rgba(192,57,43,.07);
  --brand-rose-glow: rgba(192,57,43,.13);
  --brand-purple: #7B3FA0;
  --brand-purple-soft: rgba(123,63,160,.08);

  /* 状态语义色：仅真实设备状态 */
  --status-on-bg: #E9F6EF;
  --status-on-fg: #0F7A4D;
  --status-on-border: #B5E3C7;
  --status-wait-bg: #FDF6E8;
  --status-wait-fg: #9A6207;
  --status-wait-border: #F0D9A2;
  --status-off-bg: #F3F2EE;
  --status-off-fg: #8B867D;
  --status-off-border: #E0DDD4;
  --status-fault-bg: #FCEFED;
  --status-fault-fg: #C0392B;
  --status-fault-border: #F2C3BD;

  /* 图表 12 色 */
  --chart-1: #0B7A6E;
  --chart-2: #4F6BED;
  --chart-3: #B4529A;
  --chart-4: #D98E2B;
  --chart-5: #3E7CB1;
  --chart-6: #8A63D2;
  --chart-7: #C94F4F;
  --chart-8: #2FA3A0;
  --chart-9: #A67C1E;
  --chart-10: #D95D39;
  --chart-11: #6E6A64;
  --chart-12: #7B3FA0;

  /* 阴影：克制的暖色微偏 */
  --shadow-card: 0 0 0 1px var(--line-hairline);
  --shadow-card-hover: 0 0 0 1px var(--line-subtle), 0 4px 14px -6px rgba(25,25,24,.12);
  --shadow-modal: 0 24px 52px -14px rgba(25,25,24,.22), 0 0 0 1px var(--line-hairline);
  --shadow-pop: 0 12px 26px -10px rgba(25,25,24,.14), 0 0 0 1px var(--line-hairline);

  /* 圆角 */
  --radius-card: 12px;
  --radius-control: 8px;
  --radius-tag: 6px;
  --radius-pill: 999px;

  /* 布局标尺 */
  --np-nav-w: 216px;
  --np-nav-w-collapsed: 60px;
  --np-header-h: 48px;
  --np-gutter: 20px;
  --np-gap: 14px;
}

/* ============ 1. TOKENS — DARK ============ */
html[data-theme="dark"] {
  --bg-app: #0A0B0C;
  --bg-mesh: none;
  --surface-base: #151618;
  --surface-card: #151618;
  --surface-card-hover: #1C1E21;
  --surface-elevated: #101112;
  --surface-glass: rgba(10,11,12,.92);
  --surface-glass-border: rgba(255,255,255,.09);

  --text-main: #F4F4F2;
  --text-sub: #A8A29A;
  --text-tertiary: #7E7870;
  --text-muted: #56524C;

  --line-hairline: rgba(255,255,255,.085);
  --line-subtle: rgba(255,255,255,.15);
  --line-medium: rgba(255,255,255,.26);
  --line-focus: #2FE0B2;

  --brand-blue: #2FE0B2;
  --brand-blue-hover: #5AE9C4;
  --brand-blue-soft: rgba(47,224,178,.12);
  --brand-blue-glow: rgba(47,224,178,.24);
  --brand-emerald: #3DD68C;
  --brand-emerald-soft: rgba(61,214,140,.12);
  --brand-emerald-glow: rgba(61,214,140,.22);
  --brand-indigo: #7C93FF;
  --brand-indigo-soft: rgba(124,147,255,.12);
  --brand-amber: #F2B83D;
  --brand-amber-soft: rgba(242,184,61,.12);
  --brand-amber-glow: rgba(242,184,61,.22);
  --brand-rose: #FF7A7A;
  --brand-rose-soft: rgba(255,122,122,.12);
  --brand-rose-glow: rgba(255,122,122,.22);
  --brand-purple: #B18CFF;
  --brand-purple-soft: rgba(177,140,255,.12);

  --status-on-bg: rgba(61,214,140,.12);
  --status-on-fg: #3DD68C;
  --status-on-border: rgba(61,214,140,.3);
  --status-wait-bg: rgba(242,184,61,.12);
  --status-wait-fg: #F2B83D;
  --status-wait-border: rgba(242,184,61,.3);
  --status-off-bg: rgba(255,255,255,.06);
  --status-off-fg: #8B867D;
  --status-off-border: rgba(255,255,255,.15);
  --status-fault-bg: rgba(255,122,122,.12);
  --status-fault-fg: #FF8A8A;
  --status-fault-border: rgba(255,138,138,.3);

  --chart-1: #2FE0B2;
  --chart-2: #7C93FF;
  --chart-3: #D78AC9;
  --chart-4: #F2B83D;
  --chart-5: #5FA8E8;
  --chart-6: #B18CFF;
  --chart-7: #FF7A7A;
  --chart-8: #3DD6C4;
  --chart-9: #E8C445;
  --chart-10: #F98E4F;
  --chart-11: #8B867D;
  --chart-12: #C084FC;

  --shadow-card: 0 0 0 1px var(--line-hairline);
  --shadow-card-hover: 0 0 0 1px var(--line-subtle), 0 6px 18px -6px rgba(0,0,0,.55);
  --shadow-modal: 0 28px 60px -14px rgba(0,0,0,.78), 0 0 0 1px var(--line-hairline);
  --shadow-pop: 0 16px 30px -10px rgba(0,0,0,.66), 0 0 0 1px var(--line-hairline);
}

/* 旧令牌别名对齐（让历史规则跟随新色板） */
:root, html[data-theme="light"] {
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", sans-serif;
  --font-sans: var(--font-body);
  --font-s: var(--font-body);
  --font-m: var(--font-mono);
  --color-ink: #191918; --color-ink-2: #54504A;
  --color-neutral: #7A756C; --color-muted: #A9A39A;
  --color-rule: #E8E5DE; --color-rule-subtle: #F3F2EE; --color-rule-strong: #D6D2C8;
  --color-accent: #0B7A6E; --color-focus: #0B7A6E; --color-focus-soft: rgba(11,122,110,.08);
  --color-success: #1E9E62; --color-warning: #B05E10; --color-danger: #C0392B;
  --color-paper: #FFFFFF; --color-paper-2: #FBFBF8; --color-paper-3: #F5F4F1;
  --color-overlay: rgba(25,25,24,.42);
  --bg-page: #F5F4F1; --bg-surface: #FFFFFF; --bg-surface-raised: #FFFFFF;
  --bg-surface-sunken: #F0EEE9; --bg-hover: #FAFAF7; --bg-active: #ECEAE4;
  --brand-primary: #0B7A6E; --brand-primary-hover: #09685E;
  --brand-primary-soft: rgba(11,122,110,.08); --brand-primary-glow: rgba(11,122,110,.16);
  --action-solid-bg: #0B7A6E; --action-solid-fg: #FFFFFF; --action-solid-hover: #09685E;
  --nav-active-bg: #0B7A6E; --nav-active-fg: #FFFFFF;
  --insight-surface: rgba(11,122,110,.05);
}
html[data-theme="dark"] {
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", sans-serif;
  --font-sans: var(--font-body);
  --font-s: var(--font-body);
  --font-m: var(--font-mono);
  --color-ink: #F4F4F2; --color-ink-2: #A8A29A;
  --color-neutral: #7E7870; --color-muted: #56524C;
  --color-rule: rgba(255,255,255,.085); --color-rule-subtle: rgba(255,255,255,.05); --color-rule-strong: rgba(255,255,255,.15);
  --color-accent: #2FE0B2; --color-focus: #2FE0B2; --color-focus-soft: rgba(47,224,178,.12);
  --color-success: #3DD68C; --color-warning: #F2B83D; --color-danger: #FF8A8A;
  --color-paper: #151618; --color-paper-2: #101112; --color-paper-3: #1C1E21;
  --color-overlay: rgba(0,0,0,.74);
  --bg-page: #0A0B0C; --bg-surface: #151618; --bg-surface-raised: #1C1E21;
  --bg-surface-sunken: #101112; --bg-hover: rgba(255,255,255,.05); --bg-active: rgba(255,255,255,.09);
  --brand-primary: #2FE0B2; --brand-primary-hover: #5AE9C4;
  --brand-primary-soft: rgba(47,224,178,.12); --brand-primary-glow: rgba(47,224,178,.24);
  --action-solid-bg: #2FE0B2; --action-solid-fg: #0A241E; --action-solid-hover: #5AE9C4;
  --nav-active-bg: #2FE0B2; --nav-active-fg: #0A241E;
  --insight-surface: rgba(47,224,178,.1);
}

/* ============ 2. FOUNDATIONS ============ */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-muted) 60%, transparent) transparent; }

body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand-blue-soft); color: var(--text-main); }

:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-muted) 50%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-tertiary) 70%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ============ 3. LAYOUT SKELETON ============ */
/* 整体布局保持原样：顶栏 | 顶部标签导航 | 设备树 + 内容（只改配色与组件质感） */

/* ============ 4. HEADER（顶部细工具条） ============ */
.site-header.hd {
  position: relative;
  z-index: 40;
  height: var(--np-header-h);
  min-height: var(--np-header-h);
  flex: 0 0 var(--np-header-h);
  padding: 0 16px 0 14px;
  gap: 12px;
  background: var(--surface-base);
  border-bottom: 1px solid var(--line-hairline);
}

/* 品牌区 */
.site-header .brand-matrix.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.site-header .luxury-btn.sidebar-command {
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-control);
  background: transparent; color: var(--text-tertiary);
  cursor: pointer; transition: all .13s ease; flex-shrink: 0;
}
.site-header .luxury-btn.sidebar-command:hover { background: var(--surface-card-hover); color: var(--text-main); }
.site-header .luxury-btn.sidebar-command svg { width: 15px; height: 15px; }

.site-header .brand-emblem {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-blue); color: #FFFFFF;
}
.site-header .brand-emblem-inner { display: flex; }
.site-header .brand-emblem svg { width: 14px; height: 14px; }

.site-header .brand-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.site-header .brand-logo-text {
  font-family: var(--font-display);
  font-size: 13.5px; font-weight: 800; letter-spacing: -.01em;
  color: var(--text-main); white-space: nowrap; line-height: 1;
}
.site-header .brand-spec-badge {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8px; font-weight: 600; letter-spacing: .1em;
  color: var(--text-muted);
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  padding: 2px 7px; background: var(--surface-elevated); white-space: nowrap;
}
.site-header .brand-subtitle {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 仪表簇：紧凑数据点 */
.header-instrument-cluster {
  display: flex; align-items: center; gap: 0;
  margin-left: auto;
}
.header-instrument-cluster .instrument-capsule {
  display: flex; align-items: baseline; gap: 5px;
  padding: 4px 12px; position: relative;
  background: transparent; border: 0;
}
.header-instrument-cluster .instrument-capsule + .instrument-capsule::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px;
  background: var(--line-hairline);
}
.header-instrument-cluster .instrument-label {
  font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted);
}
.header-instrument-cluster .instrument-metric {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 13px; font-weight: 700; color: var(--text-main);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.header-instrument-cluster .instrument-unit { font-size: 9px; font-weight: 500; color: var(--text-tertiary); }

/* 状态徽标 */
#offline-badge, #pend-badge-h {
  display: none; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
#offline-badge { background: var(--status-on-bg); color: var(--status-on-fg); border: 1px solid var(--status-on-border); }
#pend-badge-h { background: var(--status-wait-bg); color: var(--status-wait-fg); border: 1px solid var(--status-wait-border); }
#pend-badge-h strong { font-family: var(--font-mono); }

/* 头部右侧工具 */
.header-utilities { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.theme-switch-pill {
  display: flex; padding: 2px; gap: 2px;
  background: var(--surface-elevated); border: 1px solid var(--line-hairline);
  border-radius: var(--radius-pill);
}
.theme-switch-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-tertiary);
  font-size: 10px; font-weight: 600; cursor: pointer; transition: all .13s ease;
}
.theme-switch-btn svg { width: 11px; height: 11px; }
.theme-switch-btn:hover { color: var(--text-main); }
.theme-switch-btn.active {
  background: var(--surface-card); color: var(--text-main);
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
}

/* 头部通用按钮 */
.luxury-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 11px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .13s ease; white-space: nowrap; text-decoration: none;
}
.luxury-btn:hover { border-color: var(--line-medium); color: var(--text-main); background: var(--surface-card-hover); }
.luxury-btn:active { transform: scale(.97); }
.luxury-btn svg { width: 12px; height: 12px; }
.luxury-btn.primary {
  background: var(--brand-blue); border-color: var(--brand-blue); color: #FFFFFF;
}
.luxury-btn.primary:hover { background: var(--brand-blue-hover); border-color: var(--brand-blue-hover); color: #FFFFFF; }

.header-more-menu { position: relative; }
.header-more-menu summary { list-style: none; }
.header-more-menu summary::-webkit-details-marker { display: none; }
.header-more-popover {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 90;
  min-width: 176px; padding: 5px;
  background: var(--surface-card); border: 1px solid var(--line-hairline);
  border-radius: 10px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 1px;
}
.header-more-popover button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-sub);
  font-size: 11.5px; font-weight: 500; cursor: pointer; text-align: left;
  transition: all .1s ease;
}
.header-more-popover button:hover { background: var(--surface-card-hover); color: var(--text-main); }
.header-more-popover button svg { width: 13px; height: 13px; color: var(--text-tertiary); }

/* 错误条 */
.herr {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%);
  display: none; align-items: center; gap: 8px;
  background: var(--status-fault-bg); color: var(--status-fault-fg);
  border: 1px solid var(--status-fault-border);
  font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-control);
  box-shadow: var(--shadow-pop); z-index: 50;
}
.herr.show { display: flex; }
.herr button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; }
.herr svg { width: 12px; height: 12px; }

/* ============ 5. NAV（顶部标签导航 · 原布局） ============ */
.site-nav.nav-wrap {
  position: relative;
  z-index: 30;
  height: 44px !important;
  min-height: 44px !important;
  flex: 0 0 44px !important;
  width: 100% !important;
  background: var(--surface-base);
  border-bottom: 1px solid var(--line-hairline);
  display: flex;
  align-items: stretch;
  padding: 0 14px;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.site-nav.nav-wrap::-webkit-scrollbar { display: none; }
.site-nav.nav-wrap > .nav-visible-items {
  display: flex; align-items: stretch; gap: 2px;
  overflow: hidden; flex: 1;
}
.site-nav.nav-wrap > .nav-visible-items > .nav-tab {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 0;
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 500;
  color: var(--text-tertiary); text-decoration: none;
  position: relative;
  transition: color .13s ease, background-color .13s ease;
  white-space: nowrap; cursor: pointer; line-height: 1.2;
  flex-shrink: 0;
}
.site-nav.nav-wrap > .nav-visible-items > .nav-tab::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  border-radius: 2px 2px 0 0; background: transparent;
  transition: background-color .15s ease;
}
.site-nav.nav-wrap > .nav-visible-items > .nav-tab svg { width: 14px; height: 14px; opacity: .8; flex-shrink: 0; }
.site-nav.nav-wrap > .nav-visible-items > .nav-tab:hover { color: var(--text-main); background: var(--surface-card-hover); }
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.on,
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.active {
  color: var(--brand-blue); font-weight: 600;
  background: var(--brand-blue-soft);
}
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.on svg,
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.active svg { opacity: 1; }
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.on::after,
.site-nav.nav-wrap > .nav-visible-items > .nav-tab.active::after { background: var(--brand-blue); }

/* 更多（溢出菜单） */
.site-nav.nav-wrap > .nav-overflow { position: relative; display: flex; align-items: stretch; flex-shrink: 0; }
.site-nav.nav-wrap > .nav-overflow > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 500; color: var(--text-tertiary);
  cursor: pointer; transition: all .13s ease;
}
.site-nav.nav-wrap > .nav-overflow > summary::-webkit-details-marker { display: none; }
.site-nav.nav-wrap > .nav-overflow > summary:hover { color: var(--text-main); background: var(--surface-card-hover); }
.site-nav.nav-wrap > .nav-overflow > summary svg { width: 14px; height: 14px; }
.site-nav.nav-wrap > .nav-overflow[open] > summary { color: var(--brand-blue); background: var(--brand-blue-soft); }
.nav-overflow-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 90;
  min-width: 200px; padding: 5px;
  background: var(--surface-card); border: 1px solid var(--line-hairline);
  border-radius: 10px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 1px;
}
.nav-overflow-menu .nav-overflow-routes { display: flex; flex-direction: column; gap: 1px; }
.nav-overflow-menu .nav-tab {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 500; color: var(--text-sub);
  text-decoration: none; transition: all .1s ease;
}
.nav-overflow-menu .nav-tab svg { width: 13px; height: 13px; color: var(--text-tertiary); }
.nav-overflow-menu .nav-tab:hover { background: var(--surface-card-hover); color: var(--text-main); }
.nav-overflow-menu .nav-tab.on { background: var(--brand-blue-soft); color: var(--brand-blue); }
.header-menu-command {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-sub);
  font-size: 11.5px; font-weight: 500; cursor: pointer; text-align: left;
  transition: all .1s ease;
}
.header-menu-command:hover { background: var(--surface-card-hover); color: var(--text-main); }
.header-menu-command svg { width: 13px; height: 13px; color: var(--text-tertiary); }
.header-menu-divider {
  margin: 4px 9px 2px; padding-top: 8px;
  border-top: 1px solid var(--line-hairline);
  font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.nav-sep { display: none !important; }

/* ============ 6. DEVICE TREE PANEL（设备树栏） ============ */
.workbench-container.body {
  flex: 1;
  min-width: 0;
  background: var(--bg-app);
}

.circuit-sidebar.side {
  width: var(--side-width, 280px);
  background: var(--surface-elevated);
  border-right: 1px solid var(--line-hairline);
}

/* 栏眉 */
.circuit-sidebar .sidebar-headline.s-hd {
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--line-hairline);
  padding: 10px 12px;
  min-height: 38px;
}
.circuit-sidebar .sidebar-headline-text {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-tertiary);
  display: flex; align-items: center; gap: 6px;
}
.circuit-sidebar .sidebar-headline-text svg { width: 11px; height: 11px; color: var(--brand-blue); }
.circuit-sidebar .sidebar-node-counter {
  font-family: var(--font-mono); font-size: 8.5px; color: var(--text-muted);
}

/* 搜索 */
.sidebar-search-dock {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line-hairline);
  background: var(--surface-elevated);
  display: flex; flex-direction: column; gap: 8px;
}
.precision-search-box { position: relative; display: flex; align-items: center; }
.precision-search-box .search-glow-icon {
  position: absolute; left: 9px; width: 12px; height: 12px; color: var(--text-muted); pointer-events: none;
}
.precision-search-input {
  width: 100%; height: 30px; padding: 0 9px 0 28px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main);
  font-size: 11px; transition: all .14s ease;
}
.precision-search-input:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.precision-search-input::placeholder { color: var(--text-muted); }

/* 楼层条 */
.floor-nav-strip { display: flex; gap: 3px; flex-wrap: wrap; }
.floor-tag-btn {
  min-height: 22px; padding: 0 8px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-tertiary);
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 9px; font-weight: 600;
  cursor: pointer; transition: all .12s ease;
}
.floor-tag-btn:hover { border-color: var(--line-medium); color: var(--text-main); }
.floor-tag-btn.active {
  background: var(--brand-blue); color: #FFFFFF; border-color: var(--brand-blue);
}

/* 树工具行 */
.tree-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tree-master { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 10px; color: var(--text-sub); font-weight: 500; }
.tree-master input { width: 13px; height: 13px; accent-color: var(--brand-blue); cursor: pointer; }
.tree-selected { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); margin-left: auto; }
.tree-filter-return {
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-hairline); border-radius: 6px;
  background: var(--surface-card); color: var(--text-tertiary); cursor: pointer; transition: all .12s ease;
}
.tree-filter-return:hover:not(:disabled) { color: var(--text-main); border-color: var(--line-medium); }
.tree-filter-return:disabled { opacity: .4; cursor: default; }
.tree-filter-return svg { width: 10px; height: 10px; }
.tree-actions { display: inline-flex; gap: 2px; }
.tree-actions button {
  border: 0; background: transparent; color: var(--brand-blue);
  font-size: 9.5px; font-weight: 600; cursor: pointer; padding: 2px 5px; border-radius: 5px;
  transition: background .12s ease;
}
.tree-actions button:hover { background: var(--brand-blue-soft); }

/* 筛选折叠面板 */
.dashboard-filter-panel { border-top: 1px solid var(--line-hairline); }
.dashboard-filter-panel > summary {
  list-style: none; display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; cursor: pointer; user-select: none;
  font-size: 10px; font-weight: 600; color: var(--text-sub);
  transition: background .12s ease;
}
.dashboard-filter-panel > summary::-webkit-details-marker { display: none; }
.dashboard-filter-panel > summary::before {
  content: ''; width: 4px; height: 4px; border-radius: 2px;
  background: var(--brand-blue); flex-shrink: 0;
}
.dashboard-filter-panel > summary:hover { background: var(--surface-card-hover); }
.dashboard-filter-panel > summary small { margin-left: auto; font-weight: 500; color: var(--text-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.dashboard-filters { padding: 2px 12px 10px; display: flex; flex-direction: column; gap: 10px; }

.filter-facet { display: flex; flex-direction: column; gap: 5px; }
.filter-facet > span {
  font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.filter-facet-options { display: flex; gap: 3px; flex-wrap: wrap; }
.filter-chip {
  min-height: 21px; padding: 0 8px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 9px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.filter-chip b { font-family: var(--font-mono); font-weight: 600; opacity: .65; }
.filter-chip:hover:not(:disabled) { border-color: var(--line-medium); color: var(--text-main); }
.filter-chip.on { background: var(--brand-blue); border-color: var(--brand-blue); color: #FFF; }
.filter-chip:disabled { opacity: .35; cursor: default; }

.dashboard-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-field > span { font-size: 8.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-tertiary); }
.filter-field select, .filter-field input {
  height: 29px; padding: 0 8px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main);
  font-size: 10.5px; width: 100%; transition: all .13s ease;
}
.filter-field select:focus, .filter-field input:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.filter-feedback {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: var(--radius-control);
  background: var(--brand-blue-soft);
  font-size: 9.5px; color: var(--text-sub); font-weight: 600;
}
.filter-feedback .filter-reset {
  border: 0; background: transparent; color: var(--brand-blue);
  font-size: 9.5px; font-weight: 700; cursor: pointer; padding: 2px 4px;
}
.filter-feedback .filter-reset:disabled { opacity: .4; cursor: default; }

/* 树列表 */
.sidebar-tree-viewport.s-list { padding: 4px 0 8px; }
.ti {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 12px 3px 10px;
  min-height: 26px; border-left: 2px solid transparent;
  font-size: 10.5px;
}
.ti:hover { background: color-mix(in srgb, var(--text-main) 4%, transparent); }
.ti.on { border-left-color: var(--brand-blue); background: var(--brand-blue-soft); }
.ti.on label { color: var(--text-main); font-weight: 600; }
.ti .ta { font-size: 7px; width: 12px; color: var(--text-muted); }
.ti input[type=checkbox] { width: 13px; height: 13px; accent-color: var(--brand-blue); cursor: pointer; }
.ti label { color: var(--text-sub); }
.ti .tp { font-family: var(--font-mono); font-size: 8px; color: var(--text-muted); }
.ti .te { font-size: 9px; color: var(--text-tertiary); }
.l1 { padding-left: 10px; font-weight: 700; font-size: 11px; color: var(--text-main); }
.l2 { padding-left: 27px; font-weight: 600; font-size: 10.5px; color: var(--text-sub); }
.l3 { padding-left: 44px; font-size: 10.5px; color: var(--text-sub); }
.tc { display: none; } .ti.exp + .tc, .tc.open { display: block; }

/* 推演面板 */
.simulator-dock.s-run {
  border-top: 1px solid var(--line-hairline);
  background: var(--surface-elevated);
  padding: 9px 12px 11px;
}
.simulator-title-bar.run-hd {
  font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 7px;
}
.simulator-title-bar.run-hd svg { width: 10px; height: 10px; color: var(--brand-blue); }
.run-reset { border: 0; background: transparent; color: var(--brand-blue); font-size: 8.5px; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.segmented-unit-bar.run-tabs {
  display: flex; gap: 2px; padding: 2px;
  background: var(--surface-card); border: 1px solid var(--line-hairline);
  border-radius: var(--radius-control); margin-bottom: 7px;
}
.segmented-unit-bar .segmented-tab {
  flex: 1; padding: 4px 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-tertiary);
  font-size: 9.5px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.segmented-unit-bar .segmented-tab:hover { color: var(--text-main); }
.segmented-unit-bar .segmented-tab.on, .segmented-unit-bar .segmented-tab.active {
  background: var(--brand-blue); color: #FFF;
}
.simulator-pill-grid.run-presets { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 5px; }
.run-presets button {
  min-height: 22px; padding: 0 8px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 9px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.run-presets button:hover { border-color: var(--line-medium); color: var(--text-main); }
.run-presets button.on { background: var(--brand-blue); color: #FFF; border-color: var(--brand-blue); }
.run-custom input {
  height: 29px; padding: 0 9px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main); font-size: 10.5px; width: 100%;
}
.run-custom input:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.run-unit-label { font-size: 8.5px; color: var(--text-muted); }
.run-meta { font-size: 7.5px; color: var(--text-muted); text-align: center; }
.simulator-output-card.run-result {
  margin-top: 4px; padding: 9px 11px;
  background: var(--surface-card); border: 1px solid var(--line-hairline);
  border-radius: var(--radius-control);
  display: flex; justify-content: space-between; gap: 8px;
}
.sim-output-label { font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.sim-energy-readout, .sim-cost-readout {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 14px; font-weight: 700; color: var(--text-main);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.sim-cost-readout { color: var(--brand-emerald); }

/* 分隔条 */
.workbench-resizer, .side-run-resizer {
  background: var(--line-hairline); transition: background .12s ease; position: relative;
}
.workbench-resizer:hover, .side-run-resizer:hover, .workbench-resizer.active, .side-run-resizer.active { background: var(--brand-blue); }

.mobile-side-toggle {
  display: none; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 11px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 10.5px; font-weight: 600; box-shadow: var(--shadow-card); cursor: pointer;
}
.mobile-side-toggle svg { width: 12px; height: 12px; }

/* ============ 7. MAIN CANVAS ============ */
.main-canvas.main {
  flex: 1;
  min-width: 0;
  padding: clamp(14px, 1.8vw, 22px);
  gap: clamp(12px, 1.4vw, 16px);
  overflow-y: auto;
  background: var(--bg-app);
}

/* ============ 8. PAGE HEADS（眉题 + 标题 + 说明，非卡片） ============ */
.page-head, .integration-page-head, .workspace-page-head, .metering-page-head {
  position: relative;
  min-height: 0;
  padding: 2px 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.page-head::before, .integration-page-head::before, .workspace-page-head::before, .metering-page-head::before { content: none; display: none; }

.page-head h2, .integration-page-head h2, .workspace-page-head h2, .metering-page-head h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 1.8vw, 27px);
  font-weight: 800; letter-spacing: -.02em;
  color: var(--text-main); line-height: 1.2;
}
.page-head p, .integration-page-head p, .workspace-page-head p, .metering-page-head p {
  margin-top: 6px; color: var(--text-tertiary); font-size: 12px; max-width: 64ch; line-height: 1.55;
}

/* 眉题 kicker */
.main-canvas.main[data-page="live"] .page-head h2::before,
.main-canvas.main[data-page="dashboard"] .page-head h2::before,
.main-canvas.main[data-page="metering"] .page-head h2::before,
.main-canvas.main[data-page="integrations"] .page-head h2::before {
  display: block;
  content: 'OPERATIONS · BUILDING 05';
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8.5px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand-blue);
  margin-bottom: 8px;
}
.main-canvas.main[data-page="live"] .page-head h2::before { content: 'LIVE TELEMETRY · REAL-TIME'; }
.main-canvas.main[data-page="dashboard"] .page-head h2::before { content: 'ENERGY OVERVIEW · CONSOLIDATED'; }
.main-canvas.main[data-page="metering"] .page-head h2::before { content: 'SUB-METERING · TOPOLOGY'; }
.main-canvas.main[data-page="integrations"] .page-head h2::before { content: 'DEVICE ONBOARDING · IOT'; }

.workspace-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-blue); margin-bottom: 8px;
}
.workspace-kicker::before { content: ''; width: 12px; height: 2px; border-radius: 2px; background: var(--brand-blue); }

.page-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0;
}
.page-tools .bt { height: 30px; }

/* ============ 9. KPI CARDS（独立统计卡） ============ */
.kr {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.kc {
  background: var(--surface-card); padding: 15px 17px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 4px;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.kc:hover { border-color: var(--line-subtle); box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.kc .kl {
  font-size: 8.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-tertiary); order: 1;
}
.kc .kv {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 23px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-main); font-variant-numeric: tabular-nums; order: 2; line-height: 1.15;
}
.kc .ku { font-size: 9px; color: var(--text-muted); order: 3; }
.kc.dark {
  background: var(--text-main); border-color: var(--text-main); color: var(--surface-card);
}
.kc.dark .kl { color: color-mix(in srgb, var(--surface-card) 60%, transparent); }
.kc.dark .kv { color: var(--surface-card); }
.kc.dark .ku { color: color-mix(in srgb, var(--surface-card) 55%, transparent); }

/* 实时页 KPI 独立卡 */
.main-canvas.main[data-page="live"] .kpi-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
.main-canvas.main[data-page="live"] .kpi-card {
  min-height: 106px; padding: 15px 17px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card);
  position: relative; display: flex; flex-direction: column; gap: 2px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.main-canvas.main[data-page="live"] .kpi-card:hover { border-color: var(--line-subtle); box-shadow: var(--shadow-card-hover); }
.main-canvas.main[data-page="live"] .kpi-card.kpi-primary { background: var(--brand-blue-soft); border-color: color-mix(in srgb, var(--brand-blue) 22%, var(--line-hairline)); }
.main-canvas.main[data-page="live"] .kpi-label {
  font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-tertiary); order: 1;
}
.main-canvas.main[data-page="live"] .kpi-value {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: clamp(21px, 1.9vw, 27px); font-weight: 700; letter-spacing: -.03em;
  color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1.1;
  margin-top: 6px; order: 2;
}
.main-canvas.main[data-page="live"] .kpi-unit { font-size: 10px; font-weight: 600; color: var(--text-tertiary); margin-left: 3px; }
.main-canvas.main[data-page="live"] .kpi-note { font-size: 9.5px; color: var(--text-muted); order: 4; margin-top: 4px; }
.main-canvas.main[data-page="live"] .kpi-dot {
  position: absolute; top: 14px; right: 14px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-emerald); box-shadow: 0 0 0 3px var(--brand-emerald-soft);
}
.main-canvas.main[data-page="live"] .kpi-dot.is-off { background: var(--text-muted); box-shadow: 0 0 0 3px var(--status-off-bg); }
.main-canvas.main[data-page="live"] .kpi-dot.is-bad { background: var(--brand-rose); box-shadow: 0 0 0 3px var(--brand-rose-soft); }
.main-canvas.main[data-page="live"] .kpi-dot.is-warn { background: var(--brand-amber); box-shadow: 0 0 0 3px var(--brand-amber-soft); }

/* ============ 10. PANELS ============ */
.pn {
  background: var(--surface-card);
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.pn-h {
  padding: 12px 16px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--line-hairline);
  font-size: 12px; font-weight: 700; color: var(--text-main);
  font-family: var(--font-display);
  letter-spacing: .01em;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pn-b { padding: 16px; }
.pn-b.c0 { padding: 0; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ch { width: 100%; height: 260px; }

/* 图表卡头 */
.chart-header-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.chart-heading { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-main); font-family: var(--font-display); }
.chart-subheading { font-size: 10px; color: var(--text-muted); margin-left: 3px; font-weight: 500; }
.panel-meta { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); }

/* 可缩放面板装饰 */
.panel-drag-handle { color: var(--text-muted); opacity: .6; }
.panel-drag-handle:hover { color: var(--text-tertiary); opacity: 1; }
.panel-height-resizer, .chart-col-resizer, .dashboard-column-resizer {
  background: var(--line-hairline); border-radius: 2px; transition: background .12s ease;
}
.panel-height-resizer:hover, .chart-col-resizer:hover, .dashboard-column-resizer:hover { background: var(--brand-blue); }
.panel-resize-handle { color: var(--text-muted); }

.btn-panel-collapse, .section-collapse {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text-tertiary); cursor: pointer; transition: all .12s ease;
}
.btn-panel-collapse:hover, .section-collapse:hover { background: var(--surface-card-hover); color: var(--text-main); }
.btn-panel-collapse svg, .section-collapse svg { width: 12px; height: 12px; }

/* ============ 11. TABLES ============ */
.tbw {
  overflow-x: auto;
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  background: var(--surface-elevated);
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-tertiary); padding: 9px 12px; text-align: left;
  border-bottom: 1px solid var(--line-hairline); white-space: nowrap;
}
.tbl td {
  padding: 8px 12px; border-bottom: 1px solid var(--line-hairline);
  color: var(--text-sub); font-size: 11.5px; vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n { text-align: right; font-family: var(--font-mono, 'JetBrains Mono'); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-main); }
.tbl tr:hover td { background: var(--surface-card-hover); }
.tbl tr.tt td { font-weight: 700; background: var(--brand-blue-soft); color: var(--text-main); }
.tbl a, .tbl .table-action {
  cursor: pointer; color: var(--brand-blue); text-decoration: none;
  font-size: 10.5px; font-weight: 600; transition: opacity .12s ease; background: none; border: 0; padding: 0;
}
.tbl a:hover, .tbl .table-action:hover { opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.table-device-id { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); }
.table-edit-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 7px;
  border: 1px solid var(--line-hairline); border-radius: 6px;
  background: var(--surface-card); color: var(--text-sub);
  font-size: 9.5px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.table-edit-btn:hover { border-color: var(--line-medium); color: var(--text-main); }
.table-edit-btn svg { width: 10px; height: 10px; }
.list-meta { font-size: 9.5px; color: var(--text-muted); }

/* 状态 */
.status-text { font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.status-text::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-text.is-on { color: var(--status-on-fg); }
.status-text.is-wait { color: var(--status-wait-fg); }
.status-text.is-off { color: var(--status-off-fg); }

.quality-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 700; padding: 2.5px 8px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-hairline); background: var(--surface-elevated); color: var(--text-tertiary);
}
.quality-verified { background: var(--status-on-bg); color: var(--status-on-fg); border-color: var(--status-on-border); }
.quality-estimated, .quality-reference { background: var(--status-wait-bg); color: var(--status-wait-fg); border-color: var(--status-wait-border); }
.quality-unverified { background: var(--status-off-bg); color: var(--status-off-fg); border-color: var(--status-off-border); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: var(--radius-pill);
  font-size: 8.5px; font-weight: 700; letter-spacing: .03em;
  border: 1px solid var(--line-hairline); background: var(--surface-elevated); color: var(--text-tertiary);
}
.tag-p { background: var(--status-wait-bg); color: var(--status-wait-fg); border-color: var(--status-wait-border); }
.tag-o { background: var(--status-on-bg); color: var(--status-on-fg); border-color: var(--status-on-border); }
.tag-r { background: var(--status-fault-bg); color: var(--status-fault-fg); border-color: var(--status-fault-border); }
.tag-sup { background: var(--text-main); color: var(--surface-card); border-color: var(--text-main); }
.tag-adm { background: var(--brand-blue-soft); color: var(--brand-blue); border-color: color-mix(in srgb, var(--brand-blue) 28%, transparent); }
.tag-vwr { background: var(--surface-elevated); color: var(--text-tertiary); }

.bulk-bar {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  border: 1px solid var(--brand-blue); border-radius: var(--radius-control);
  background: var(--brand-blue-soft); font-size: 10.5px; color: var(--text-sub); font-weight: 600;
}

/* ============ 12. BUTTONS ============ */
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 13px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all .13s ease; text-decoration: none; line-height: 1;
}
.bt:hover { border-color: var(--line-medium); color: var(--text-main); background: var(--surface-card-hover); }
.bt:active { transform: scale(.97); }
.bt svg { width: 12px; height: 12px; }
.bt-p { background: var(--brand-blue); border-color: var(--brand-blue); color: #FFF; }
.bt-p:hover { background: var(--brand-blue-hover); border-color: var(--brand-blue-hover); color: #FFF; }
.bt-d { border-color: color-mix(in srgb, var(--brand-rose) 40%, var(--line-hairline)); color: var(--brand-rose); background: var(--surface-card); }
.bt-d:hover { background: var(--brand-rose); border-color: var(--brand-rose); color: #FFF; }
.bt-g { border-color: color-mix(in srgb, var(--brand-emerald) 40%, var(--line-hairline)); color: var(--brand-emerald); background: var(--surface-card); }
.bt-g:hover { background: var(--brand-emerald); border-color: var(--brand-emerald); color: #FFF; }
.bt-s { height: 24px; padding: 0 9px; font-size: 9.5px; border-radius: 6px; }
.bt:disabled { opacity: .4; pointer-events: none; transform: none; }

/* ============ 13. FORMS ============ */
.fr { display: flex; gap: 12px; margin-bottom: 10px; }
.fr > div { flex: 1; min-width: 0; }
.fr label {
  display: block; margin-bottom: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: .05em;
  color: var(--text-tertiary);
}
.fr input, .fr select, .fr textarea {
  height: 33px; padding: 0 11px; width: 100%;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main);
  font-size: 11.5px; font-family: var(--font-body); transition: all .14s ease;
}
.fr textarea { height: auto; padding: 8px 11px; }
.fr input:focus, .fr select:focus, .fr textarea:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.fr input::placeholder, .fr textarea::placeholder { color: var(--text-muted); }
.fr select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2399a1af' fill='none' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 27px;
}

/* ============ 14. MODAL ============ */
.mo { background: var(--color-overlay); backdrop-filter: blur(2px); }
.mb {
  background: var(--surface-card);
  padding: 20px 22px; width: min(540px, 94vw);
  border-radius: 14px; border: 1px solid var(--line-hairline);
  box-shadow: var(--shadow-modal);
}
.mb h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800; color: var(--text-main); letter-spacing: -.01em;
  margin-bottom: 14px;
}
.mb .br { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.at { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line-hairline); }
.at-t {
  flex: 1; text-align: center; padding: 8px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: var(--text-tertiary); border-bottom: 2px solid transparent;
  transition: all .14s ease; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.at-t:hover { color: var(--text-sub); }
.at-t.on { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.modal-note { font-size: 10.5px; color: var(--text-tertiary); margin-bottom: 10px; }

/* ============ 15. TOAST / LOADING ============ */
.tst {
  bottom: 26px; padding: 9px 16px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; box-shadow: var(--shadow-modal);
  border: 1px solid var(--line-hairline);
}
.tst.i { background: var(--text-main); color: var(--surface-card); }
.tst.o { background: var(--brand-blue); color: #FFF; }
.tst.e { background: var(--brand-rose); color: #FFF; }
.empt { color: var(--text-muted); font-size: 11.5px; }
.loading-state { color: var(--text-sub); }
.loading-state strong { color: var(--text-main); }
.spinner { border-color: var(--line-hairline); border-top-color: var(--brand-blue); }
.chart-empty { color: var(--text-muted); }
.chart-empty strong { color: var(--text-sub); }
.fx {
  background: var(--surface-elevated); border: 1px solid var(--line-hairline);
  color: var(--text-sub); border-radius: 8px;
}

/* ============ 16. ADMIN BAR ============ */
.adm {
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--line-hairline);
  box-shadow: none;
  color: var(--text-tertiary);
}
.adm button {
  background: var(--surface-card); color: var(--text-sub);
  border: 1px solid var(--line-hairline); border-radius: 6px;
  padding: 3px 11px; font-size: 9.5px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.adm button:hover { border-color: var(--line-medium); color: var(--text-main); }
.adm .adm-user { font-weight: 600; color: var(--text-sub); }

/* ============ 17. DASHBOARD — 运行总览 ============ */
.hero-instrument-band {
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  position: relative;
}
.instrument-title-column { display: flex; flex-direction: column; gap: 5px; }
.instrument-hero-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 25px); font-weight: 800; letter-spacing: -.02em;
  color: var(--text-main); line-height: 1.2;
}
.instrument-hero-sub { color: var(--text-tertiary); font-size: 11.5px; max-width: 56ch; line-height: 1.55; }
.instrument-badge-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-status-badge {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 8px; font-weight: 700; letter-spacing: .12em;
  padding: 3px 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-hairline); background: var(--surface-elevated); color: var(--text-tertiary);
  text-transform: uppercase;
}
.hero-status-badge.is-on { background: var(--status-on-bg); color: var(--status-on-fg); border-color: var(--status-on-border); }
.hero-status-badge.is-off { background: var(--status-off-bg); color: var(--status-off-fg); border-color: var(--status-off-border); }
.hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 遥测单元带 */
.telemetry-band .live-meter-cell {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 16px; border-left: 1px solid var(--line-hairline);
  min-width: 0;
}
.telemetry-band .live-meter-cell:first-child { border-left: 0; padding-left: 0; }
.meter-cell-tag {
  font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted);
}
.meter-cell-number {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 20px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.meter-cell-number.is-primary { color: var(--brand-blue); }
.meter-cell-number.is-status { color: var(--brand-emerald); }
.meter-cell-unit { font-size: 10px; font-weight: 600; color: var(--text-tertiary); margin-left: 3px; }

/* ============ 18. DASHBOARD — Bento 指标卡 ============ */
.bento-kpi-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
}
.bento-metric-card {
  position: relative;
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  padding: 15px 16px 13px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 118px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.bento-metric-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-subtle);
  box-shadow: var(--shadow-card-hover);
}
.bento-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bento-icon-halo {
  width: 27px; height: 27px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-elevated); color: var(--text-tertiary); flex-shrink: 0;
}
.bento-icon-halo svg { width: 13px; height: 13px; }
.bento-icon-halo.halo-blue { background: var(--brand-blue-soft); color: var(--brand-blue); }
.bento-icon-halo.halo-emerald { background: var(--brand-emerald-soft); color: var(--brand-emerald); }
.bento-icon-halo.halo-amber { background: var(--brand-amber-soft); color: var(--brand-amber); }
.bento-icon-halo.halo-indigo { background: var(--brand-indigo-soft); color: var(--brand-indigo); }
.bento-icon-halo.halo-purple { background: var(--brand-purple-soft); color: var(--brand-purple); }
.bento-card-label {
  font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-tertiary); line-height: 1.4;
}
.bento-metric-value {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 23px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1.05;
}
.bento-metric-unit { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); margin-left: 3px; }
.bento-card-bottom { margin-top: auto; }
.bento-bottom-note { font-size: 9.5px; color: var(--text-muted); line-height: 1.45; }

/* ============ 19. DASHBOARD — 图表坞 / 明细 / HVAC ============ */
.resizable-charts-dock .chart-half-box { border-radius: var(--radius-card); overflow: hidden; }
.chart-half-left, .chart-half-right { border-color: var(--line-hairline); }
.chart-display-canvas { border-color: var(--line-hairline); border-radius: 0 0 var(--radius-card) var(--radius-card); }
.dashboard-detail-panel, .engineering-table-card, .system-link-panel, .hvac-staging-panel {
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dashboard-detail-scroll { background: var(--surface-card); }
.hvac-stat-block {
  background: var(--surface-elevated); border: 1px solid var(--line-hairline);
  border-radius: var(--radius-control); padding: 9px 11px;
}
.hvac-stat-label { font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.hvac-stat-val {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.hvac-summary-meta, .system-capacity-warning, .system-link-note { color: var(--text-muted); font-size: 10px; }
.hvac-calibration-panel {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card);
}
.hvac-calibrate-toggle {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 9.5px; font-weight: 600; padding: 3px 9px; cursor: pointer; transition: all .12s ease;
}
.hvac-calibrate-toggle:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.share-list, .share-layout { border-color: var(--line-hairline); border-radius: var(--radius-control); background: var(--surface-elevated); }
.share-swatch { border-radius: 5px; }
.share-name { font-size: 10.5px; color: var(--text-sub); font-weight: 600; }

/* ============ 20. LIVE — 工具栏与趋势 ============ */
.live-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-toolbar input, .live-toolbar select {
  height: 30px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main); font-size: 11px; padding: 0 10px;
}
.live-toolbar input:focus, .live-toolbar select:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.live-chart-panel {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.live-chart-heading {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--text-main);
  font-family: var(--font-display);
}
.live-trend-toolbar {
  border: 0; border-bottom: 1px solid var(--line-hairline); border-radius: 0;
  background: var(--surface-elevated); padding: 9px 16px;
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
}
.live-trend-field { display: flex; flex-direction: column; gap: 4px; }
.live-trend-field span { font-size: 8.5px; font-weight: 700; letter-spacing: .05em; color: var(--text-tertiary); }
.live-trend-field input {
  height: 29px; padding: 0 9px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main); font-size: 10.5px;
  font-family: var(--font-mono, 'JetBrains Mono');
}
.live-trend-field input:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.live-trend-summary { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

/* ============ 21. LIVE — 设备卡 ============ */
.live-meters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.meter-card {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card);
  padding: 16px; min-height: 220px;
  display: flex; flex-direction: column; gap: 9px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}
.meter-card:hover { transform: translateY(-1px); border-color: var(--line-subtle); box-shadow: var(--shadow-card-hover); }
.meter-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.meter-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-main); }
.meter-card-sub { font-size: 9.5px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.meter-main { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; }
.meter-main .value {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 25px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-main); font-variant-numeric: tabular-nums;
}
.meter-main .unit { font-size: 10px; color: var(--text-tertiary); font-weight: 600; }
.meter-subline { font-size: 10px; color: var(--text-muted); }
.meter-subline strong { color: var(--text-sub); font-family: var(--font-mono); font-weight: 600; }
.meter-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  border-top: 1px solid var(--line-hairline); padding-top: 9px; margin-top: auto;
}
.meter-stats > div { display: flex; flex-direction: column; gap: 2px; }
.meter-stats dt { font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.meter-stats dd { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-main); font-variant-numeric: tabular-nums; }
.meter-card-action {
  font-size: 9.5px; font-weight: 700; color: var(--brand-blue);
  border-top: 1px dashed var(--line-hairline); padding-top: 8px;
}
.meter-spark { width: 100%; height: 26px; }
.meter-spark polygon { fill: var(--brand-blue-soft); }
.meter-spark polyline { stroke: var(--brand-blue); }

/* ============ 22. METERING ============ */
.integration-metrics, .metering-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card);
  overflow: hidden; margin: 0;
}
.integration-metrics > div, .metering-metrics > div {
  display: flex; flex-direction: column; gap: 4px;
  padding: 13px 17px; border-right: 1px solid var(--line-hairline);
}
.integration-metrics > div:last-child, .metering-metrics > div:last-child { border-right: 0; }
.integration-metrics dt, .metering-metrics dt {
  font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-tertiary);
}
.integration-metrics dd, .metering-metrics dd {
  font-family: var(--font-mono, 'JetBrains Mono');
  font-size: 20px; font-weight: 700; color: var(--text-main);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15;
}
.metric-text { font-size: 9.5px; color: var(--text-muted); font-family: var(--font-mono); }

.metering-scope-builder, .metering-panel {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.scope-builder-head, .metering-panel-head {
  padding: 11px 16px; border-bottom: 1px solid var(--line-hairline);
  background: var(--surface-elevated);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.scope-builder-head h3, .metering-panel-head h3, .integration-section-head h3 {
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 700; color: var(--text-main);
}
.metering-title-line { display: flex; align-items: center; gap: 8px; }
.metering-title-line h3 { font-size: 12.5px; }
.metering-scope-grid {
  display: grid; grid-template-columns: 1fr 1.2fr 1.6fr;
  border-top: 1px solid var(--line-hairline);
}
.scope-member-pane, .scope-device-pane {
  padding: 13px; border-right: 1px solid var(--line-hairline);
  min-width: 0;
}
.scope-member-pane:last-child, .scope-device-pane:last-child { border-right: 0; }
.scope-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.scope-pane-head h4 { font-size: 10.5px; font-weight: 700; color: var(--text-sub); letter-spacing: .03em; }
.scope-member-list, .scope-device-list { display: flex; flex-direction: column; gap: 4px; }
.scope-device-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); font-size: 10.5px; cursor: pointer;
  transition: all .13s ease;
}
.scope-device-row:hover { border-color: var(--line-medium); background: var(--surface-card-hover); }
.scope-device-row.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.scope-device-row input { accent-color: var(--brand-blue); }
.scope-device-copy { font-size: 9.5px; color: var(--text-muted); font-family: var(--font-mono); }
.scope-device-search, .scope-device-select-all {
  height: 29px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main); font-size: 10.5px; padding: 0 9px;
}
.scope-device-search:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.scope-device-counts, .scope-device-selected-count, .scope-device-result-count {
  font-size: 9.5px; color: var(--text-muted); font-family: var(--font-mono);
}
.scope-empty {
  border: 1px dashed var(--line-medium); border-radius: var(--radius-control);
  background: var(--surface-elevated); color: var(--text-muted);
  font-size: 10.5px; padding: 20px 14px; text-align: center;
}
.scope-preview {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-elevated); padding: 9px 11px; font-size: 10px; color: var(--text-sub);
}
.scope-preview-warnings { color: var(--brand-amber); font-size: 10px; }
.metering-empty, .integration-empty {
  border: 1px dashed color-mix(in srgb, var(--brand-blue) 30%, var(--line-hairline));
  border-radius: var(--radius-card); background: var(--surface-card);
  padding: 26px; text-align: center; box-shadow: var(--shadow-card);
}
.metering-empty h3, .integration-empty h3 { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; color: var(--text-main); margin: 7px 0 4px; }
.metering-empty p, .integration-empty p { color: var(--text-sub); font-size: 11px; max-width: 46ch; margin: 0 auto; }
.integration-empty-index {
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .2em;
  color: var(--brand-blue); text-transform: uppercase;
}
.integration-inline-empty {
  border: 1px dashed var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-elevated); color: var(--text-muted);
  font-size: 10.5px; padding: 16px 13px; text-align: center;
}

/* ============ 23. INTEGRATIONS ============ */
.catalog-section {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.integration-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-hairline);
  background: var(--surface-elevated);
}
.integration-section-head p { color: var(--text-tertiary); font-size: 10.5px; margin-top: 3px; max-width: 70ch; }
.integration-section-head > span { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); }
.integration-metrics { margin: 13px 16px; }
.integration-table { border: 1px solid var(--line-hairline); border-radius: var(--radius-control); overflow: hidden; margin: 13px 16px; }
.gateway-list-head, .imported-gateway-head { padding: 13px 16px; }

.integration-mode-choice {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-card);
  background: var(--surface-card); padding: 15px; cursor: pointer;
  transition: all .15s ease; text-align: left;
}
.integration-mode-choice:hover { border-color: var(--line-medium); }
.integration-mode-choice.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.integration-mode-mark { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-medium); flex-shrink: 0; }
.integration-mode-choice.is-selected .integration-mode-mark { border-color: var(--brand-blue); background: radial-gradient(circle, var(--brand-blue) 45%, transparent 46%); }
.integration-choice-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); padding: 9px 11px; cursor: pointer;
  transition: all .13s ease;
}
.integration-choice-row:hover { border-color: var(--line-medium); }
.integration-choice-row.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.integration-choice-row input { accent-color: var(--brand-blue); }
.iot-import-row { border-color: var(--line-hairline); }
.iot-import-row.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }

.manual-add-form {
  padding: 15px;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px;
}
.manual-add-form label { display: flex; flex-direction: column; gap: 5px; font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--text-tertiary); }
.manual-add-form input, .manual-add-form select, .manual-add-form textarea {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-main); font-size: 11px;
  transition: all .14s ease;
}
.manual-add-form textarea { height: auto; padding: 8px 10px; }
.manual-add-form input:focus, .manual-add-form select:focus, .manual-add-form textarea:focus {
  outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.manual-add-wide { grid-column: 1 / -1; }
.manual-add-pairing { grid-column: 1 / -1; border-top: 1px dashed var(--line-hairline); padding-top: 11px; }
.manual-add-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.integration-add-toggle {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 10.5px; font-weight: 600; padding: 5px 11px; cursor: pointer; transition: all .13s ease;
}
.integration-add-toggle:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.integration-back-link {
  border: 0; background: transparent; color: var(--brand-blue);
  font-size: 10.5px; font-weight: 700; cursor: pointer; padding: 0; margin-bottom: 7px;
  display: inline-flex; align-items: center; gap: 5px;
}
.integration-back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.main-canvas.main[data-page="imports"] > section[style] {
  margin-bottom: 14px !important; padding: 16px 18px !important;
  border: 1px solid var(--line-hairline) !important; border-radius: var(--radius-card) !important;
  background: var(--surface-card) !important; box-shadow: var(--shadow-card) !important;
}
.main-canvas.main[data-page="imports"] > section[style] h3 { color: var(--text-main); font-size: 13px; font-family: var(--font-display); }
.upload-channel-row {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-elevated); padding: 9px 11px;
}
.upload-channel-row.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.hb-hour-row, .hb-target-row, .ee-device-row { border: 1px solid var(--line-hairline); border-radius: var(--radius-control); }
.hb-hour-row.is-selected, .hb-target-row.is-selected, .ee-device-row.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); }

/* ============ 24. AI 助手 ============ */
.ai-fab {
  width: 46px; height: 46px;
  border: 1px solid var(--line-subtle); border-radius: 50%;
  background: var(--text-main); color: var(--surface-card);
  box-shadow: 0 14px 28px -12px rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 32px -12px rgba(0,0,0,.5); }
.ai-fab svg { width: 18px; height: 18px; }
.ai-fab-dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-emerald); border: 2px solid var(--surface-base);
}
.ai-panel {
  border: 1px solid var(--line-hairline);
  border-radius: 14px; background: var(--surface-card);
  box-shadow: var(--shadow-modal); overflow: hidden;
  display: flex; flex-direction: column;
}
.ai-head {
  min-height: 50px; padding: 0 14px;
  border-bottom: 1px solid var(--line-hairline);
  background: var(--surface-elevated);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ai-head-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-main); font-family: var(--font-display); }
.ai-head-title > i { color: var(--brand-blue); width: 14px; height: 14px; }
.ai-online { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 600; color: var(--brand-emerald); }
.ai-online i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ai-head-actions { display: flex; gap: 2px; }
.ai-head-actions button {
  width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-tertiary); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: all .12s ease;
}
.ai-head-actions button:hover { background: var(--surface-card-hover); color: var(--text-main); }
.ai-head-actions svg { width: 12px; height: 12px; }
.ai-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 11px 13px 0; }
.ai-chips button {
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 9.5px; font-weight: 600; padding: 4px 10px; cursor: pointer; transition: all .12s ease;
}
.ai-chips button:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--brand-blue-soft); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.ai-msg { max-width: 86%; padding: 9px 12px; font-size: 11px; line-height: 1.6; border-radius: 11px; }
.ai-msg.user {
  align-self: flex-end; background: var(--brand-blue); color: #FFF;
  border-bottom-right-radius: 3px;
}
.ai-msg.ai {
  align-self: flex-start; background: var(--surface-elevated); color: var(--text-sub);
  border: 1px solid var(--line-hairline); border-bottom-left-radius: 3px;
}
.ai-input {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px; border-top: 1px solid var(--line-hairline);
  background: var(--surface-card);
}
.ai-input input {
  flex: 1; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-elevated); color: var(--text-main); font-size: 11px;
}
.ai-input input:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.ai-send {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--brand-blue); color: #FFF; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .14s ease; flex-shrink: 0;
}
.ai-send:hover { background: var(--brand-blue-hover); transform: scale(1.05); }
.ai-send svg { width: 13px; height: 13px; }
.ai-resize { background: var(--line-hairline); }

/* ============ 25. 导航排版对话框 ============ */
.navigation-layout-dialog {
  border: 1px solid var(--line-hairline); border-radius: 14px;
  background: var(--surface-card); color: var(--text-main);
  box-shadow: var(--shadow-modal); padding: 0; width: min(540px, 94vw);
}
.navigation-layout-dialog::backdrop { background: var(--color-overlay); backdrop-filter: blur(2px); }
.navigation-layout-shell { padding: 18px 20px; }
.navigation-layout-shell header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.navigation-layout-shell header h2 { font-family: var(--font-display); font-size: 15px; font-weight: 800; }
.navigation-layout-shell header p { color: var(--text-tertiary); font-size: 11px; margin-top: 3px; }
.dialog-icon-button { width: 26px; height: 26px; border: 1px solid var(--line-hairline); border-radius: 7px; background: var(--surface-card); color: var(--text-tertiary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dialog-icon-button:hover { color: var(--text-main); border-color: var(--line-medium); }
.dialog-icon-button svg { width: 12px; height: 12px; }
.navigation-layout-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 13px; }
.navigation-layout-presets button {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line-hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-sub);
  font-size: 10px; font-weight: 600; padding: 5px 10px; cursor: pointer; transition: all .12s ease;
}
.navigation-layout-presets button:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--brand-blue-soft); }
.navigation-layout-presets svg { width: 11px; height: 11px; }
.navigation-layout-list { display: flex; flex-direction: column; gap: 4px; max-height: 290px; overflow-y: auto; }
.navigation-layout-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line-hairline); border-radius: var(--radius-control);
  background: var(--surface-card); font-size: 11px;
}
.navigation-layout-row > svg { width: 12px; height: 12px; color: var(--text-tertiary); }
.navigation-layout-rank { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); width: 20px; }
.navigation-layout-name { font-weight: 600; color: var(--text-sub); flex: 1; }
.navigation-layout-placement { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); }
.navigation-layout-row button {
  width: 23px; height: 23px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-tertiary); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: all .12s ease;
}
.navigation-layout-row button:hover:not(:disabled) { background: var(--brand-blue-soft); color: var(--brand-blue); }
.navigation-layout-row button:disabled { opacity: .3; cursor: default; }
.navigation-layout-row button svg { width: 11px; height: 11px; }
.navigation-layout-shell footer { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line-hairline); }
.navigation-layout-shell footer span { font-size: 10px; color: var(--text-muted); }

/* ============ 26. 其他 ============ */
.auth-box { width: min(400px, 94vw); }
.auth-status { font-size: 10.5px; font-weight: 600; border-radius: var(--radius-control); padding: 7px 11px; margin-bottom: 9px; }
.auth-status:not([hidden]) { background: var(--status-wait-bg); color: var(--status-wait-fg); border: 1px solid var(--status-wait-border); }
.measurement-copy { font-size: 9.5px; color: var(--text-muted); }
.system-link-field { font-size: 10.5px; color: var(--text-sub); }
.brand-spec-badge { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; color: var(--text-muted); border: 1px solid var(--line-subtle); border-radius: var(--radius-pill); padding: 2px 7px; background: var(--surface-elevated); white-space: nowrap; }

/* ============ 27. RESPONSIVE ============ */
@media (max-width: 1300px) {
  .header-instrument-cluster { display: none !important; }
  .bento-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .integration-metrics, .metering-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .integration-metrics > div:nth-child(2), .metering-metrics > div:nth-child(2) { border-right: 0; }
  .integration-metrics > div:nth-child(-n+2), .metering-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-hairline); }
  .live-meters { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .main-canvas.main[data-page="live"] .kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .kr { grid-template-columns: repeat(2, 1fr); }
  .metering-scope-grid { grid-template-columns: 1fr; }
  .scope-member-pane, .scope-device-pane { border-right: 0; border-bottom: 1px solid var(--line-hairline); }
}
@media (max-width: 960px) {
  /* 回到顶部导航模式 */
  .layout-row { flex-direction: column; }
  .site-nav.nav-wrap {
    width: 100% !important;
    flex: none !important;
    height: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0;
    flex-direction: row; align-items: stretch;
    overflow-x: auto; overflow-y: hidden;
    padding: 0 8px; gap: 2px;
    border-right: 0; border-bottom: 1px solid var(--line-hairline);
  }
  .site-nav.nav-wrap > .nav-visible-items {
    flex-direction: row; align-items: stretch; gap: 2px;
    overflow-x: auto; overflow-y: hidden; flex: 1;
  }
  .site-nav.nav-wrap > .nav-visible-items > .nav-tab { min-height: 40px; padding: 0 12px; flex-shrink: 0; }
  .site-nav.nav-wrap > .nav-overflow > summary { min-height: 40px; }
  .nav-overflow-menu { top: calc(100% + 2px); left: auto; right: 0; }
  .page-head, .integration-page-head, .workspace-page-head { flex-direction: column; align-items: flex-start; }
  .page-tools { width: 100%; }
  .telemetry-band .live-meter-cell { border-left: 0; border-top: 1px solid var(--line-hairline); padding-left: 0; padding-top: 9px; }
  .manual-add-form { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .main-canvas.main { padding: 10px; gap: 10px; }
  .circuit-sidebar.side { border-radius: 0; }
  .bento-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .live-meters { grid-template-columns: 1fr; }
  .main-canvas.main[data-page="live"] .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .mobile-side-toggle { display: inline-flex; }
  .kr { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header .brand-subtitle { display: none; }
  .site-header .brand-spec-badge { display: none; }
  .header-utilities .luxury-btn span, .header-utilities .header-more-menu summary span { display: none; }
  .header-utilities .luxury-btn { padding: 0 9px; }
  .main-canvas.main[data-page="live"] .kpi-grid, .bento-kpi-grid, .integration-metrics, .metering-metrics, .kr { grid-template-columns: 1fr; }
  .integration-metrics > div, .metering-metrics > div { border-right: 0 !important; border-bottom: 1px solid var(--line-hairline); }
  .integration-metrics > div:last-child, .metering-metrics > div:last-child { border-bottom: 0; }
  .g2 { grid-template-columns: 1fr; }
}

/* ============ 28. 动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ============ 29. 旧层镇压（关键 !important 对齐） ============ */
/* 页头：非卡片化 */
.workspace-page-head, .integration-page-head, .page-head {
  min-height: 0 !important;
  padding: 2px 2px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.workspace-page-head h2, .integration-page-head h2, .page-head h2 {
  font-size: clamp(21px, 1.8vw, 27px) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  line-height: 1.2 !important;
  color: var(--text-main) !important;
}
.hero-instrument-band {
  min-height: 0 !important;
  padding: 20px 22px !important;
  border: 1px solid var(--line-hairline) !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface-card) !important;
  box-shadow: var(--shadow-card) !important;
}

/* Bento */
.bento-kpi-grid {
  gap: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.bento-metric-card, .bento-metric-card:first-child {
  min-height: 118px !important;
  padding: 15px 16px 13px !important;
  border: 1px solid var(--line-hairline) !important;
  border-radius: var(--radius-card) !important;
  background: var(--surface-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}
.bento-metric-card:first-child { background: var(--brand-blue-soft) !important; }
.bento-metric-card:last-child { border-right: 1px solid var(--line-hairline) !important; }
.bento-metric-card:hover {
  transform: translateY(-1px) !important;
  border-color: var(--line-subtle) !important;
  box-shadow: var(--shadow-card-hover) !important;
  background: var(--surface-card) !important;
}
.bento-card-label {
  color: var(--text-tertiary) !important;
  font-size: 9px !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-weight: 700 !important;
}
.bento-metric-value { font-size: 23px !important; font-weight: 700 !important; letter-spacing: -.03em !important; }

/* KPI 实时带：独立卡 */
.main-canvas.main[data-page="live"] .kpi-grid {
  gap: 12px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.main-canvas.main[data-page="live"] .kpi-card {
  border: 1px solid var(--line-hairline) !important;
  border-radius: var(--radius-card) !important;
  border-right: 1px solid var(--line-hairline) !important;
  background: var(--surface-card) !important;
  box-shadow: var(--shadow-card) !important;
}
.main-canvas.main[data-page="live"] .kpi-card.kpi-primary { background: var(--brand-blue-soft) !important; }
.main-canvas.main[data-page="live"] .kpi-card:hover { background: var(--surface-card-hover) !important; }
.main-canvas.main[data-page="live"] .kpi-card:last-child { border-right: 1px solid var(--line-hairline) !important; }
.main-canvas.main[data-page="live"] .kpi-value {
  font-size: clamp(21px, 1.9vw, 27px) !important;
  font-weight: 700 !important;
}

/* 表格 */
.tbl th, .tbl thead th, .luxury-data-table th {
  background: var(--surface-elevated) !important;
  color: var(--text-tertiary) !important;
  font-family: var(--font-mono, 'JetBrains Mono') !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  height: 38px !important;
  border-bottom: 1px solid var(--line-hairline) !important;
}

/* 选中态统一蓝色 */
.filter-chip.on, .floor-chip.on, .device-nav-choice.on,
.floor-tag-btn.active, .segmented-tab.active, .export-chip.is-on, .status-tabs button.on {
  border-color: var(--brand-blue) !important;
  background: var(--brand-blue) !important;
  color: #FFFFFF !important;
}

/* AI 面板 */
.ai-panel {
  border-radius: 14px !important;
  border-color: var(--line-hairline) !important;
  background: var(--surface-card) !important;
}
.ai-head {
  background: var(--surface-elevated) !important;
  color: var(--text-main) !important;
  min-height: 50px !important;
}
.ai-head-title, .ai-head-title > i { color: var(--text-main) !important; }
.ai-head-title > i { color: var(--brand-blue) !important; }
.ai-msg.user { background: var(--brand-blue) !important; color: #FFFFFF !important; }
.ai-msg.ai {
  border: 1px solid var(--line-hairline) !important;
  background: var(--surface-elevated) !important;
  color: var(--text-sub) !important;
}
.ai-send { background: var(--brand-blue) !important; border-color: var(--brand-blue) !important; color: #FFFFFF !important; }
.ai-fab {
  background: var(--text-main) !important;
  color: var(--surface-card) !important;
  border-color: var(--line-subtle) !important;
}

/* 主按钮 */
.bt-p, .bt.bt-p {
  border-color: var(--brand-blue) !important;
  background: var(--brand-blue) !important;
  color: #FFFFFF !important;
}
.bt-p:hover, .bt.bt-p:hover {
  border-color: var(--brand-blue-hover) !important;
  background: var(--brand-blue-hover) !important;
  color: #FFFFFF !important;
}

/* 面板圆角 */
.scope-member-pane, .scope-device-pane,
.metering-scope-grid, .metering-scope-builder, .metering-panel,
.integration-table, .live-detail-identity, .live-detail-section,
.live-chart-panel, .meter-card { border-radius: var(--radius-card) !important; }

/* 折叠态 */
.resizable-panel.is-collapsed > :not(.panel-head-dock):not(.pn-h):not(.metering-panel-head):not(.scope-builder-head):not(.integration-section-head):not(.scope-pane-head):not(.panel-resize-handle) { display: none !important; }

/* Provider import: an operational worksheet with a distinct studio accent. */
.provider-import-panel {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 22px 18px;
  border: 1px solid color-mix(in srgb, var(--brand-blue) 30%, var(--line-hairline));
  border-radius: 14px;
  background: var(--surface-card);
  box-shadow: 0 8px 22px -18px color-mix(in srgb, var(--brand-blue) 55%, transparent);
}
.provider-import-head,
.provider-import-foot { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.provider-import-head h3 { margin: 3px 0 4px; font-size: 18px; letter-spacing: -.02em; }
.provider-import-head p { max-width: 720px; color: var(--text-sub); font-size: 12px; line-height: 1.65; }
.provider-kicker { color: var(--brand-blue); font: 700 10px/1 var(--font-mono); letter-spacing: .12em; }
.provider-state { flex:0 0 auto; padding:6px 9px; border:1px solid color-mix(in srgb, var(--brand-blue) 35%, var(--line-hairline)); border-radius:999px; color:var(--brand-blue); font:700 10px/1 var(--font-mono); white-space:nowrap; }
.provider-import-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:18px; }
.provider-import-grid label { display:flex; flex-direction:column; gap:6px; min-width:0; }
.provider-import-grid label.field-wide { grid-column: span 2; }
.provider-import-grid label > span { color:var(--text-tertiary); font-size:11px; font-weight:700; }
.provider-import-grid input,
.provider-import-grid select { min-height:38px; padding:0 11px; border:1px solid var(--line-subtle); border-radius:8px; background:var(--surface-base); color:var(--text-main); }
.provider-import-grid input:focus,
.provider-import-grid select:focus { border-color:var(--brand-blue); box-shadow:0 0 0 3px var(--brand-blue-soft); outline:0; }
.provider-import-foot { align-items:center; margin-top:16px; padding-top:14px; border-top:1px solid var(--line-hairline); }
.provider-import-foot > span { color:var(--text-tertiary); font-size:11px; }
.provider-import-status { min-height:18px; margin-top:8px; color:var(--brand-blue); font-size:11px; }
.provider-import-panel .bt-p.is-busy { opacity:.65; pointer-events:none; }

@media (max-width: 960px) {
  .provider-import-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .provider-import-grid label.field-wide { grid-column:span 2; }
}
@media (max-width: 620px) {
  .provider-import-panel { padding:16px; }
  .provider-import-head, .provider-import-foot { flex-direction:column; align-items:stretch; }
  .provider-import-grid { grid-template-columns:1fr; }
  .provider-import-grid label.field-wide { grid-column:span 1; }
  .provider-import-foot .bt { width:100%; justify-content:center; }
}
