/**
 * 数据大屏 v4 — 深蓝+青发光 / Deep-Navy Neon
 * Design ref: design-assets/bigscreen-concept.jpg
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ── 深蓝底 + 青发光色板（建筑可视化最优底色） ── */
  --bs-bg: #060a18;
  --bs-bg-2: #0d1530;
  --bs-panel: rgba(10, 20, 52, 0.85);
  --bs-panel-solid: #0a1430;

  /* 主色：青发光（建筑描边/焦点） */
  --bs-accent: #22d3ee;
  --bs-accent-strong: #67e8f9;
  --bs-accent-deep: #0891b2;

  /* 辅色：电光紫（保留为点缀/标题渐变） */
  --bs-purple: #a855f7;
  --bs-purple-strong: #c084fc;
  --bs-purple-deep: #7c3aed;

  /* 科技蓝（次级数据色） */
  --bs-blue: #3b82f6;
  --bs-blue-strong: #60a5fa;
  --bs-blue-cyan: #22d3ee;

  /* 功能色 */
  --bs-warn: #fb923c;
  --bs-gold: #fcd34d;
  --bs-success: #34d399;

  /* 文字 */
  --bs-text: #e0f2fe;
  --bs-text-dim: #94a3b8;
  --bs-muted: #64748b;
  --bs-dim: #475569;

  /* 边框 / 发光（青色为主，紫色点缀） */
  --bs-line: rgba(34, 211, 238, 0.35);
  --bs-line-strong: rgba(34, 211, 238, 0.65);
  --bs-line-purple: rgba(168, 85, 247, 0.5);
  --bs-glow: 0 0 20px rgba(34, 211, 238, 0.35);
  --bs-glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);

  /* 渐变 */
  --bs-grad-accent: linear-gradient(135deg, #0891b2, #22d3ee);
  --bs-grad-purple: linear-gradient(135deg, #7c3aed, #a855f7);
  --bs-grad-blue: linear-gradient(135deg, #3b82f6, #22d3ee);
  --bs-grad-main: linear-gradient(135deg, #0891b2, #3b82f6);
  --bs-grad-bar: linear-gradient(180deg, #22d3ee 0%, #0891b2 60%, #3b82f6 100%);
  --bs-grad-bar-now: linear-gradient(180deg, #67e8f9 0%, #22d3ee 50%, #60a5fa 100%);
  --bs-grad-border: linear-gradient(135deg, rgba(34, 211, 238, 0.6), rgba(59, 130, 246, 0.4));

  /* 字体 */
  --bs-font: 'DM Sans', 'Noto Sans SC', system-ui, sans-serif;
  --bs-mono: 'JetBrains Mono', 'Consolas', monospace;
}

/* ── 页面底色 ── */
body.bs-mode { background: var(--bs-bg); }
body.bs-mode .main-area { background: var(--bs-bg); }
body.bs-mode .topbar { display: none; }
body.bs-mode .page-content { padding: 0; background: var(--bs-bg); }
body.bs-mode .sidebar {
  background: #030612;
  border-right: 1px solid var(--bs-line);
}
body.bs-mode .sidebar .nav-item.active {
  background: rgba(34, 211, 238, 0.12);
  color: var(--bs-accent-strong);
  box-shadow: inset 3px 0 0 var(--bs-accent);
}

/* ── 主容器 ── */
.bigscreen-wrap {
  position: relative;
  min-height: calc(100vh - 40px);
  padding: 10px 16px 16px;
  font-family: var(--bs-font);
  color: var(--bs-text);
}

/* ── 背景层：径向光斑 + 网格 ── */
.bs-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bs-bg-radial {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(8, 145, 178, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(59, 130, 246, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(34, 211, 238, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #060a18 0%, #0d1530 50%, #080e22 100%);
}

.bs-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 85% at 50% 30%, black 15%, transparent 72%);
}

.bs-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 5% 95%, rgba(34, 211, 238, 0.18) 0%, transparent 30%),
    radial-gradient(circle at 95% 95%, rgba(59, 130, 246, 0.14) 0%, transparent 30%);
}

.bigscreen-wrap > *:not(.bs-bg) { position: relative; z-index: 1; }

/* ── 顶栏 ── */
.bs-header {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 540px) 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 6px 0 14px;
}

.bs-header-center { text-align: center; }

.bs-header-line {
  height: 1px;
  margin: 0 auto 12px;
  max-width: 440px;
  background: linear-gradient(90deg, transparent, var(--bs-line-strong) 30%, var(--bs-line-blue) 70%, transparent);
}

.bs-header-line--bottom { margin: 12px auto 0; opacity: 0.6; }

.bs-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #fff;
  background: linear-gradient(180deg, #fff 0%, var(--bs-accent-strong) 60%, var(--bs-purple-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(34, 211, 238, 0.4));
}

.bs-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--bs-text-dim);
  letter-spacing: 0.18em;
}

.bs-header-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bs-header-side--left { align-items: flex-start; }
.bs-header-side--right { align-items: flex-end; }

.bs-tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--bs-accent-strong);
  border: 1px solid var(--bs-line);
  border-radius: 3px;
  background: rgba(34, 211, 238, 0.08);
  text-transform: uppercase;
}

.bs-tag--ai {
  color: var(--bs-blue-strong);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.bs-tag--digital {
  color: var(--bs-purple-strong);
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.bs-date, .bs-sync {
  margin: 0;
  font-size: 11px;
  color: var(--bs-muted);
  letter-spacing: 0.06em;
}

.bs-clock {
  font-family: var(--bs-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--bs-accent-strong);
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5), 0 0 40px rgba(34, 211, 238, 0.2);
}

.bs-actions { display: flex; gap: 6px; }

.bs-btn {
  padding: 5px 14px;
  font-size: 11px;
  font-family: var(--bs-font);
  color: var(--bs-accent-strong);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid var(--bs-line);
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.bs-btn:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: var(--bs-line-strong);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.2);
}

.bs-btn--fill {
  color: #fff;
  background: var(--bs-grad-main);
  border-color: transparent;
  font-weight: 600;
  letter-spacing: 0.1em;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.35), 0 0 40px rgba(59, 130, 246, 0.2);
}

.bs-btn--fill:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.5), 0 0 50px rgba(59, 130, 246, 0.3);
}

/* ── Insight 洞察条 ── */
.bs-insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 6px;
  border: 1px solid var(--bs-line);
  background: rgba(34, 211, 238, 0.06);
  backdrop-filter: blur(8px);
}

.bs-insight.hidden { display: none; }
.bs-insight--high {
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.08);
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.12);
}
.bs-insight--low {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.12);
}
.bs-insight-icon { flex-shrink: 0; opacity: 0.95; font-size: 14px; }
.bs-insight b { color: var(--bs-accent-strong); font-weight: 600; }
.bs-insight--high b { color: var(--bs-warn); }
.bs-insight--low b { color: var(--bs-blue-strong); }

/* ── KPI 卡片 ── */
.bs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.bs-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--bs-line) !important;
  background: var(--bs-panel) !important;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.bs-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--bs-grad-main);
  opacity: 0.7;
}

.bs-kpi:hover {
  border-color: var(--bs-line-strong);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}

.bs-kpi-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(59, 130, 246, 0.25)) !important;
  border: 1px solid rgba(34, 211, 238, 0.5) !important;
  color: var(--bs-accent-strong) !important;
  box-shadow: inset 0 0 16px rgba(34, 211, 238, 0.25), 0 0 12px rgba(34, 211, 238, 0.15) !important;
}

.bs-kpi--warn .bs-kpi-icon {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(251, 146, 60, 0.15)) !important;
  border-color: rgba(251, 146, 60, 0.5) !important;
  color: var(--bs-warn) !important;
}

.bs-kpi-body { flex: 1; min-width: 0; }

.bs-kpi-label {
  display: block;
  font-size: 11px;
  color: var(--bs-muted);
  margin-bottom: 5px;
  letter-spacing: 0.08em;
}

.bs-kpi-value {
  font-family: var(--bs-mono);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.bs-kpi-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--bs-accent-strong);
  margin-left: 2px;
}

.bs-kpi-sub {
  margin-top: 5px;
  font-size: 10px;
  color: var(--bs-dim);
}

/* ── 设备在线率环形图 ── */
.bs-online-ring-wrap {
  position: relative;
  width: 100%;
  max-width: 180px;
  margin: 10px auto;
  aspect-ratio: 1;
}

.bs-online-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bs-online-ring-bg {
  fill: none;
  stroke: rgba(30, 64, 175, 0.3);
  stroke-width: 8;
}

.bs-online-ring-fg {
  fill: none;
  stroke: var(--bs-accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
  transition: stroke-dashoffset 0.8s ease-out;
}

.bs-online-ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.bs-online-ring-value {
  display: block;
  font-family: var(--bs-mono);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
  line-height: 1;
}

.bs-online-ring-label {
  display: block;
  font-size: 11px;
  color: var(--bs-muted);
  margin-top: 6px;
  letter-spacing: 0.1em;
}

.bs-online-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--bs-line);
}

.bs-online-stat-item {
  text-align: center;
}

.bs-online-stat-value {
  display: block;
  font-family: var(--bs-mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.bs-online-stat--ok {
  color: var(--bs-accent-strong);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.bs-online-stat--warn {
  color: var(--bs-warn);
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.4);
}

.bs-online-stat-label {
  display: block;
  font-size: 10px;
  color: var(--bs-dim);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* ── 三栏布局 ── */
.bs-layout {
  display: grid;
  grid-template-columns: 0.72fr 2.1fr 0.72fr;
  gap: 12px;
  align-items: start;
}

.bs-col { display: flex; flex-direction: column; gap: 12px; }

/* ── 面板 ── */
.bs-panel {
  position: relative;
  padding: 14px 16px 16px;
  border-radius: 10px;
  border: 1px solid var(--bs-line);
  background: var(--bs-panel);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.bs-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--bs-accent) 30%, var(--bs-blue) 70%, transparent 95%);
  opacity: 0.6;
}

.bs-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(34, 211, 238, 0.08), transparent 60%);
}

.bs-panel:hover {
  border-color: var(--bs-line-strong);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.12);
}

.bs-panel--hero { min-height: 340px; }

.bs-panel--compact { flex: 0; }

.bs-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bs-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-text);
  padding-left: 12px;
  border-left: 3px solid var(--bs-accent);
  letter-spacing: 0.08em;
  position: relative;
}

.bs-panel-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 3px;
  height: 8px;
  background: var(--bs-blue);
  border-radius: 2px;
}

.bs-panel-meta {
  font-family: var(--bs-mono);
  font-size: 10px;
  color: var(--bs-muted);
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--bs-line);
}

/* ── 图表 ── */
.bs-chart { min-height: 176px; position: relative; }
.bs-chart--short { min-height: 138px; }

.bs-chart-wrap {
  position: relative;
  height: 176px;
  padding: 10px 0 28px;
}

.bs-chart-wrap--short { height: 138px; }

.bs-chart-grid {
  position: absolute;
  inset: 10px 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.bs-chart-grid line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
}

.bs-chart-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 100%;
  z-index: 1;
}

.bs-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.bs-bar-stack {
  flex: 1;
  width: 100%;
  max-width: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bs-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--bs-grad-bar);
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.bs-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px 4px 0 0;
}

.bs-bar--now {
  background: var(--bs-grad-bar-now);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.5), 0 0 32px rgba(59, 130, 246, 0.2);
}

.bs-bar-val {
  position: absolute;
  top: -4px;
  font-family: var(--bs-mono);
  font-size: 10px;
  color: var(--bs-accent-strong);
  white-space: nowrap;
  transform: translateY(-100%);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
  font-weight: 600;
}

.bs-bar-label {
  margin-top: 7px;
  font-size: 9px;
  color: var(--bs-muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.bs-bar-label--now {
  color: var(--bs-accent-strong);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

.bs-avg-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(59, 130, 246, 0.5);
  z-index: 2;
  pointer-events: none;
}

.bs-avg-line span {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 9px;
  font-family: var(--bs-mono);
  color: var(--bs-blue-strong);
  text-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.bs-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--bs-dim);
  letter-spacing: 0.08em;
}

/* ── 数字孪生 ── */
.bs-twin {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  justify-content: center;
}

.bs-twin-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.bs-twin-building-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--bs-text-dim);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.bs-twin-floor-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 300px;
}

.bs-twin-connector {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bs-line-strong));
  flex-shrink: 0;
}

.bs-twin-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--bs-line);
  background: rgba(10, 8, 30, 0.6);
  font-size: 11px;
  transition: all 0.3s;
}

.bs-twin-node--live {
  border-color: rgba(34, 211, 238, 0.5);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.06));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.12), inset 0 0 20px rgba(34, 211, 238, 0.05);
}

.bs-twin-node-name {
  font-weight: 600;
  color: var(--bs-text);
  letter-spacing: 0.06em;
}

.bs-twin-node--live .bs-twin-node-name {
  color: var(--bs-accent-strong);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.bs-twin-node-stat {
  font-family: var(--bs-mono);
  font-size: 10px;
  color: var(--bs-muted);
}

.bs-twin-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 10px;
  color: var(--bs-muted);
  margin-top: 10px;
  letter-spacing: 0.06em;
}

.bs-twin-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bs-line);
  font-style: normal;
}

.bs-twin-legend i.on {
  background: var(--bs-accent);
  border-color: var(--bs-accent);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

/* ── 楼层列表 ── */
.bs-floor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

.bs-floor-list::-webkit-scrollbar { width: 4px; }
.bs-floor-list::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.3); border-radius: 2px; }

.bs-floor-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: rgba(10, 8, 30, 0.4);
  font-size: 11px;
  transition: all 0.2s;
}

.bs-floor-row:hover {
  border-color: var(--bs-line);
  background: rgba(34, 211, 238, 0.06);
}

.bs-floor-name b { display: block; font-size: 12px; color: var(--bs-text); font-weight: 600; }
.bs-floor-name span { font-size: 10px; color: var(--bs-muted); }

.bs-floor-num {
  font-family: var(--bs-mono);
  font-size: 11px;
  color: var(--bs-accent-strong);
  text-align: right;
}

.bs-floor-bar {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.bs-floor-bar i {
  display: block;
  height: 100%;
  background: var(--bs-grad-main);
  border-radius: 99px;
  font-style: normal;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

/* ── 网关 ── */
.bs-gw-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 170px;
  overflow-y: auto;
}

.bs-gw-list::-webkit-scrollbar { width: 4px; }
.bs-gw-list::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.3); border-radius: 2px; }

.bs-gw-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(10, 8, 30, 0.4);
  font-size: 11px;
  transition: background 0.2s;
}

.bs-gw-row:hover { background: rgba(34, 211, 238, 0.06); }
.bs-gw-row--off { opacity: 0.45; }

.bs-gw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e4070;
}

.bs-gw-dot.on {
  background: var(--bs-accent);
  box-shadow: 0 0 8px var(--bs-accent), 0 0 16px rgba(34, 211, 238, 0.4);
}

.bs-gw-info b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.bs-gw-info span {
  font-size: 9px;
  font-family: var(--bs-mono);
  color: var(--bs-muted);
}

.bs-gw-meta {
  text-align: right;
  font-family: var(--bs-mono);
  font-size: 10px;
  color: var(--bs-muted);
}

.bs-gw-meta em {
  display: block;
  font-style: normal;
  color: var(--bs-gold);
}

/* ── 数据流 ── */
.bs-feed {
  max-height: 110px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, black 65%, transparent);
}

.bs-feed-inner {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bs-feed-row {
  display: grid;
  grid-template-columns: 68px 48px 1fr 84px;
  gap: 6px;
  padding: 6px 10px;
  font-size: 10px;
  border-radius: 5px;
  transition: background 0.2s;
}

.bs-feed-row:nth-child(odd) { background: rgba(34, 211, 238, 0.04); }
.bs-feed-row:hover { background: rgba(34, 211, 238, 0.1); }

.bs-feed-time {
  font-family: var(--bs-mono);
  color: var(--bs-text-dim);
}

.bs-feed-type {
  color: var(--bs-blue-strong);
  font-weight: 500;
  text-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

.bs-feed-gw {
  color: var(--bs-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-feed-detail {
  color: var(--bs-muted);
  text-align: right;
  font-family: var(--bs-mono);
}

/* ── 全屏模式 ── */
body.bigscreen-fs .sidebar { display: none; }
body.bigscreen-fs .bigscreen-wrap {
  min-height: 100vh;
  padding: 16px 24px 24px;
}

/* ── 响应式 ── */
@media (max-width: 1200px) {
  .bs-layout { grid-template-columns: 1fr; }
  .bs-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .bs-header { grid-template-columns: 1fr; text-align: center; }
  .bs-header-side { align-items: center; }
}

@media (max-width: 640px) {
  .bs-kpi-grid { grid-template-columns: 1fr; }
}

/* ── Row: 设备统计环形仪表行 ── */
.bs-row--devices {
  display: grid;
  grid-template-columns: repeat(4, 140px) 1fr;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--bs-line);
  background: var(--bs-panel);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.bs-row--devices::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--bs-accent) 30%, var(--bs-blue) 70%, transparent 95%);
  opacity: 0.6;
}

/* ── 环形仪表 ── */
.bs-ring-card { display: flex; justify-content: center; }
.bs-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
}
.bs-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.bs-ring-bg {
  fill: none;
  stroke: rgba(34, 211, 238, 0.12);
  stroke-width: 6;
}
.bs-ring-fg {
  fill: none;
  stroke: var(--bs-accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.bs-ring-fg--blue { stroke: var(--bs-blue-strong); filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6)); }
.bs-ring-fg--cyan { stroke: var(--bs-blue-cyan); filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6)); }
.bs-ring-fg--gold { stroke: var(--bs-gold); filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.5)); }

.bs-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.bs-ring-value {
  font-family: var(--bs-mono);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.bs-ring-label {
  font-size: 10px;
  color: var(--bs-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ── 齿轮装饰 ── */
.bs-ring-gear {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  background: conic-gradient(from 0deg, var(--bs-accent) 0%, var(--bs-blue) 50%, var(--bs-accent) 100%);
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 38%, #000 40%, #000 60%, transparent 62%);
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 40%, #000 60%, transparent 62%);
  animation: bs-gear-spin 6s linear infinite;
  opacity: 0.8;
}
.bs-ring-gear[data-gear="2"] { animation-duration: 8s; animation-direction: reverse; background: conic-gradient(from 0deg, var(--bs-blue-strong) 0%, var(--bs-blue-cyan) 50%, var(--bs-blue-strong) 100%); }
.bs-ring-gear[data-gear="3"] { animation-duration: 10s; background: conic-gradient(from 0deg, var(--bs-blue-cyan) 0%, var(--bs-accent) 50%, var(--bs-blue-cyan) 100%); }
.bs-ring-gear[data-gear="4"] { animation-duration: 7s; animation-direction: reverse; background: conic-gradient(from 0deg, var(--bs-gold) 0%, var(--bs-accent) 50%, var(--bs-gold) 100%); }

@keyframes bs-gear-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Hero Metrics (右侧大数字) ── */
.bs-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-left: 20px;
  border-left: 1px solid var(--bs-line);
}
.bs-metric { display: flex; flex-direction: column; gap: 6px; }
.bs-metric-label {
  font-size: 10px;
  color: var(--bs-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bs-metric-value {
  font-family: var(--bs-mono);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.45);
  line-height: 1;
}
.bs-metric-value em {
  font-size: 12px;
  font-style: normal;
  color: var(--bs-accent-strong);
  margin-left: 4px;
  font-weight: 500;
}
.bs-counter { display: inline-block; }

/* ── 教室场景分布 ── */
.bs-scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bs-scene-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid var(--bs-line);
  background: rgba(10, 8, 30, 0.5);
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
}
.bs-scene-item:hover { border-color: var(--bs-line-strong); background: rgba(34, 211, 238, 0.08); }
.bs-scene-item--active {
  border-color: var(--bs-accent);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.1));
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
}
.bs-scene-item--active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid var(--bs-accent);
  animation: bs-scene-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bs-scene-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}
.bs-scene-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.12));
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.3));
}
.bs-scene-item--active .bs-scene-icon { animation: bs-scene-bounce 1.5s ease-in-out infinite; }
@keyframes bs-scene-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.bs-scene-name { font-size: 11px; color: var(--bs-text-dim); letter-spacing: 0.06em; }
.bs-scene-count {
  font-family: var(--bs-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--bs-accent-strong);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

/* ── 异常排名 ── */
.bs-anomaly-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bs-anomaly-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(10, 8, 30, 0.4);
  font-size: 11px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.bs-anomaly-row:hover { border-color: var(--bs-line); background: rgba(251, 146, 60, 0.06); }
.bs-anomaly-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--bs-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(251, 146, 60, 0.15);
  color: var(--bs-warn);
}
.bs-anomaly-row:nth-child(1) .bs-anomaly-rank { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.bs-anomaly-row:nth-child(2) .bs-anomaly-rank { background: rgba(251, 146, 60, 0.2); }
.bs-anomaly-row:nth-child(3) .bs-anomaly-rank { background: rgba(252, 211, 77, 0.2); color: var(--bs-gold); }
.bs-anomaly-name { font-weight: 600; color: var(--bs-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-anomaly-val { font-family: var(--bs-mono); font-size: 11px; color: var(--bs-warn); text-align: right; }
.bs-anomaly-bar {
  height: 3px;
  width: 40px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}
.bs-anomaly-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--bs-warn), #ef4444);
  border-radius: 99px;
  animation: bs-bar-grow 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes bs-bar-grow { from { width: 0; } }

/* ── 绿色低碳面板 ── */
.bs-panel--carbon { margin-top: 12px; }
.bs-carbon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bs-carbon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(10, 8, 30, 0.4);
  border: 1px solid var(--bs-line);
}
.bs-carbon-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  animation: bs-carbon-float 3s ease-in-out infinite;
}
.bs-carbon-icon--leaf { animation-delay: 0s; }
.bs-carbon-icon--tree { animation-delay: 1s; }
.bs-carbon-icon--save { animation-delay: 2s; }
@keyframes bs-carbon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.bs-carbon-value {
  display: block;
  font-family: var(--bs-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--bs-success);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}
.bs-carbon-label { font-size: 10px; color: var(--bs-muted); }

/* ── 数据流动画 ── */
.bs-feed-row { animation: bs-feed-slide 0.5s ease-out; }
@keyframes bs-feed-slide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── 孪生节点脉冲 ── */
.bs-twin-node--live { animation: bs-twin-pulse 2.5s ease-in-out infinite; }
@keyframes bs-twin-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(34, 211, 238, 0.12), inset 0 0 20px rgba(34, 211, 238, 0.05); }
  50% { box-shadow: 0 0 32px rgba(34, 211, 238, 0.25), inset 0 0 28px rgba(34, 211, 238, 0.1); }
}

/* ── 背景粒子 ── */
.bs-bg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.bs-bg-particles i {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--bs-accent);
  border-radius: 50%;
  opacity: 0;
  animation: bs-particle-float 6s linear infinite;
  box-shadow: 0 0 4px var(--bs-accent);
}
@keyframes bs-particle-float {
  0% { opacity: 0; transform: translateY(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh); }
}

/* ── 数字滚动动画 ── */
.bs-counter { transition: color 0.3s; }
.bs-counter--up { animation: bs-num-pop 0.3s ease-out; }
@keyframes bs-num-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); color: var(--bs-accent-strong); }
  100% { transform: scale(1); }
}

/* ── KPI 卡片保留兼容 ── */
.bs-kpi-grid { display: none; }

/* ── 响应式扩展 ── */
@media (max-width: 1400px) {
  .bs-row--devices { grid-template-columns: repeat(2, 140px) 1fr; }
}
@media (max-width: 1200px) {
  .bs-row--devices { grid-template-columns: 1fr; }
  .bs-hero-metrics { border-left: none; border-top: 1px solid var(--bs-line); padding-left: 0; padding-top: 16px; }
}

/* ── 3D 虚拟园区（视觉中心·突出版）── */
.bs-panel--3d {
  min-height: 820px;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(8, 145, 178, 0.2), rgba(5, 8, 24, 0.95) 60%),
    rgba(5, 8, 24, 0.88);
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.22),
    0 0 64px rgba(59, 130, 246, 0.12),
    inset 0 1px 0 rgba(103, 232, 249, 0.18),
    inset 0 0 60px rgba(10, 5, 30, 0.6);
  transform: translateY(0);
  transition: all 0.3s ease-out;
  overflow: hidden;
  position: relative;
  padding: 14px 16px 16px;
  /* 悬浮微动画 */
  animation: bs-3d-float 8s ease-in-out infinite;
}
@keyframes bs-3d-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* 科技发光外框 */
.bs-panel--3d::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(34, 211, 238, 0.9) 0%,
    rgba(96, 165, 250, 0.6) 25%,
    rgba(168, 85, 247, 0.35) 50%,
    rgba(96, 165, 250, 0.6) 75%,
    rgba(34, 211, 238, 0.9) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  animation: bs-3d-border-shimmer 6s linear infinite;
  background-size: 200% 200%;
}
@keyframes bs-3d-border-shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

/* 顶部高光条 */
.bs-panel--3d::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  right: -10%;
  height: 140%;
  background: linear-gradient(180deg,
    rgba(168, 85, 247, 0.08) 0%,
    transparent 50%,
    rgba(96, 165, 250, 0.05) 100%);
  pointer-events: none;
  animation: bs-3d-sheen 14s ease-in-out infinite;
}
@keyframes bs-3d-sheen {
  0%,100% { transform: translateX(-3%) skewX(-2deg); opacity: 0.7; }
  50% { transform: translateX(3%) skewX(2deg); opacity: 1; }
}

/* 四角 L 型科技装饰 */
.bs-panel--3d > .corner-deco {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid;
  border-color: var(--bs-accent-strong);
  opacity: 0.9;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.7));
}
.bs-panel--3d > .corner-deco.tl { top: 4px; left: 4px; border-right: none; border-bottom: none; border-top-left-radius: 4px; }
.bs-panel--3d > .corner-deco.tr { top: 4px; right: 4px; border-left: none; border-bottom: none; border-top-right-radius: 4px; border-color: var(--bs-accent-2); }
.bs-panel--3d > .corner-deco.bl { bottom: 4px; left: 4px; border-right: none; border-top: none; border-bottom-left-radius: 4px; border-color: var(--bs-accent-2); }
.bs-panel--3d > .corner-deco.br { bottom: 4px; right: 4px; border-left: none; border-top: none; border-bottom-right-radius: 4px; }

.bs-3d-canvas {
  flex: 1;
  position: relative;
  min-height: 720px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
  /* 深蓝暗底：让亮青/蓝楼宇从背景中跳出 */
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(8, 145, 178, 0.15), transparent 65%),
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 25% at 15% 80%, rgba(34, 211, 238, 0.06), transparent 50%),
    linear-gradient(180deg, #020410 0%, #060b1e 50%, #030614 100%);
  box-shadow:
    inset 0 0 90px rgba(2, 4, 16, 0.6),
    inset 0 0 40px rgba(8, 145, 178, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.bs-3d-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  /* 扫描线 + 四角暗角 */
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.04) 50%, transparent 50%) 0 0 / 100% 4px,
    radial-gradient(ellipse at center, transparent 55%, rgba(3, 6, 20, 0.7) 100%);
  mix-blend-mode: overlay;
  opacity: 0.55;
}
.bs-3d-canvas canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; position: relative; z-index: 1; }
.bs-3d-canvas canvas:active { cursor: grabbing; }

/* 3D 面板头标题放大发光 */
.bs-panel--3d .bs-panel-head { position: relative; z-index: 4; }
.bs-panel--3d .bs-panel-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: transparent;
  background: linear-gradient(90deg, #e0f2fe 0%, #67e8f9 30%, #60a5fa 60%, #a855f7 100%);
  -webkit-background-clip: text;
          background-clip: text;
  padding-left: 14px;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, #22d3ee, #60a5fa, #a855f7) 1;
  text-shadow: 0 0 14px rgba(103, 232, 249, 0.45);
}
.bs-panel--3d .bs-panel-title::after { display: none; }
.bs-panel--3d .bs-panel-meta {
  padding: 3px 10px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.3), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 4px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.bs-3d-controls {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.bs-3d-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 13px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--bs-line);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.bs-3d-btn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--bs-line-strong);
  transform: scale(1.05);
}
.bs-3d-btn--fs {
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.45), rgba(59, 130, 246, 0.35));
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}
.bs-3d-btn--fs:hover {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.7), rgba(59, 130, 246, 0.55));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}
.bs-3d-btn--active {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.7);
  color: #67e8f9;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6) inset;
}

/* 全屏态样式 */
#bsPanel3D.bs-panel--fs {
  position: fixed !important;
  inset: 0;
  z-index: 99999;
  min-height: 100vh;
  width: 100vw;
  border-radius: 0;
  padding: 18px 24px 20px;
  margin: 0;
}
#bsPanel3D.bs-panel--fs .bs-3d-canvas { min-height: calc(100vh - 80px); }

.bs-3d-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--bs-dim);
  letter-spacing: 0.1em;
  pointer-events: none;
  opacity: 0.6;
  z-index: 5;
}

/* 3D 画布上的浮动信息卡 */
.bs-3d-overlay {
  position: absolute;
  z-index: 2;
  width: 240px;
  padding: 8px 10px 10px;
  border-radius: 8px;
  background: rgba(5, 8, 24, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.35);
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 32px rgba(2, 4, 16, 0.6),
    inset 0 1px 0 rgba(103, 232, 249, 0.15),
    0 0 20px rgba(34, 211, 238, 0.12);
  pointer-events: auto;
  overflow: hidden;
}
.bs-3d-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.7), rgba(96, 165, 250, 0.6), transparent);
}
.bs-3d-overlay--scene {
  left: 10px;
  bottom: 12px;
}
.bs-3d-overlay--feed {
  right: 10px;
  bottom: 12px;
  width: 250px;
  max-height: 150px;
}
.bs-3d-ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bs-3d-ov-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--bs-text);
  padding-left: 8px;
  border-left: 2px solid var(--bs-accent-strong);
}
.bs-3d-ov-meta {
  font-size: 9px;
  font-family: var(--bs-mono);
  color: var(--bs-muted);
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--bs-line);
}

/* mini 场景网格（浮动卡版） */
.bs-scene-grid--mini {
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.bs-scene-grid--mini .bs-scene-item {
  padding: 6px 4px 5px;
  border-radius: 5px;
}
.bs-scene-grid--mini .bs-scene-icon {
  width: 28px; height: 28px;
  font-size: 14px;
  margin-bottom: 3px;
}
.bs-scene-grid--mini .bs-scene-name { font-size: 9px; }
.bs-scene-grid--mini .bs-scene-count { font-size: 11px; }

/* mini 数据流（浮动卡版） */
.bs-feed--mini {
  max-height: 104px;
  padding: 0;
}
.bs-feed--mini .bs-feed-item {
  padding: 3px 4px;
  font-size: 9px;
  border-radius: 3px;
  margin-bottom: 2px;
}
.bs-feed--mini .bs-feed-time { font-size: 8px; margin-right: 4px; }
.bs-feed--mini .bs-feed-tag { padding: 0 4px; font-size: 8px; }

.bs-3d-detail {
  position: absolute;
  top: 40px;
  right: 12px;
  width: 220px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--bs-line);
  background: rgba(5, 8, 24, 0.92);
  backdrop-filter: blur(12px);
  z-index: 10;
  animation: bs-detail-in 0.25s ease-out;
}
@keyframes bs-detail-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.bs-3d-detail.hidden { display: none; }
.bs-3d-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bs-line);
}
.bs-3d-detail-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-accent-strong);
  letter-spacing: 0.06em;
}
.bs-3d-detail-close {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 14px;
  color: var(--bs-muted);
  background: transparent;
  border: 1px solid var(--bs-line);
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}
.bs-3d-detail-close:hover { color: #fff; border-color: var(--bs-line-strong); }
.bs-3d-detail-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bs-3d-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.bs-3d-stat-label { color: var(--bs-muted); }
.bs-3d-stat-value {
  color: var(--bs-text);
  font-weight: 600;
  font-family: var(--bs-mono);
}
.bs-3d-room-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bs-line);
}
.bs-3d-room-list::-webkit-scrollbar { width: 3px; }
.bs-3d-room-list::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.3); border-radius: 2px; }
.bs-3d-room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  font-size: 10px;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.04);
}
.bs-3d-room-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
}
.bs-3d-room-dot.on {
  background: var(--bs-accent);
  box-shadow: 0 0 6px var(--bs-accent);
}
.bs-3d-room-dot.off { background: var(--bs-dim); }

/* ── 房间设备详情面板（点击房间展示设备数量/设备列表/在线状态）── */
.bs-3d-dev-panel {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--bs-line);
}
.bs-3d-dev-loading,
.bs-3d-dev-empty,
.bs-3d-dev-note {
  font-size: 10px;
  color: var(--bs-muted);
  padding: 6px 4px;
  text-align: center;
}
.bs-3d-dev-empty { color: var(--bs-dim); }
.bs-3d-dev-stats {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}
.bs-3d-dev-stat {
  flex: 1;
  text-align: center;
  padding: 6px 2px 5px;
  background: rgba(50, 25, 100, 0.55) !important;
  border: 1px solid rgba(168, 85, 247, 0.28) !important;
  border-radius: 8px;
}
.bs-3d-dev-stat .v {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #e9d5ff !important;
  font-family: var(--bs-mono);
  line-height: 1.2;
}
.bs-3d-dev-stat .v.on { color: #67e8f9 !important; }
.bs-3d-dev-stat .v.lit { color: #fbbf24 !important; }
.bs-3d-dev-stat .v.off { color: #7c8399 !important; font-size: 12px; }
.bs-3d-dev-stat .l {
  display: block;
  font-size: 9px;
  color: rgba(196, 181, 253, 0.78) !important;
  margin-top: 2px;
  letter-spacing: 0.06em;
}
.bs-3d-dev-title {
  margin-top: 8px;
  font-size: 10px;
  color: var(--bs-muted);
  letter-spacing: 0.08em;
}
.bs-3d-dev-sub { color: var(--bs-dim); letter-spacing: 0; margin-left: 6px; }
.bs-3d-dev-list {
  margin-top: 4px;
  max-height: 148px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 2px;
}
.bs-3d-dev-list::-webkit-scrollbar { width: 3px; }
.bs-3d-dev-list::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 2px; }
.bs-3d-dev-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 10px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.07) !important;
  border: 1px solid rgba(59, 130, 246, 0.12);
}
.bs-3d-dev-item.off {
  background: rgba(100, 116, 139, 0.06) !important;
  border-color: rgba(100, 116, 139, 0.15);
  opacity: 0.75;
}
.bs-3d-dev-name {
  color: #dbeafe !important;
  font-weight: 600;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bs-3d-dev-state {
  color: #93c5fd !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bs-3d-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bs-dim);
  display: inline-block;
}
.bs-3d-dot.on {
  background: #67e8f9 !important;
  box-shadow: 0 0 6px rgba(103, 232, 249, 0.7);
}
.bs-3d-dot.lit {
  background: #fbbf24 !important;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
}
.bs-3d-dot.off { background: #64748b !important; }

.bs-panel--3d .bs-panel-head { position: relative; z-index: 2; }

/* 面包屑 */
.bs-3d-breadcrumb {
  position: absolute;
  top: 44px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(10, 5, 30, 0.72);
  border: 1px solid var(--bs-line);
  backdrop-filter: blur(8px);
  z-index: 5;
  animation: bs-detail-in 0.2s ease-out;
}
.bs-3d-breadcrumb.hidden { display: none; }
.bs-3d-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--bs-muted);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.bs-3d-crumb:hover {
  color: var(--bs-text);
  border-color: var(--bs-line);
  background: rgba(124, 58, 237, 0.15);
}
.bs-3d-crumb.is-last {
  color: var(--bs-accent-strong);
  background: rgba(124, 58, 237, 0.22);
  border-color: var(--bs-line-strong);
  font-weight: 600;
  cursor: default;
}
.bs-3d-crumb-icon {
  font-size: 10px;
  opacity: 0.85;
}
.bs-3d-crumb-sep {
  color: var(--bs-dim);
  font-size: 12px;
  opacity: 0.55;
}

/* Tooltip */
.bs-3d-tooltip {
  position: absolute;
  pointer-events: none;
  width: 200px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(6, 2, 20, 0.92);
  border: 1px solid var(--bs-line-strong);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
  z-index: 11;
  animation: bs-tip-in 0.12s ease-out;
}
.bs-3d-tooltip.hidden { display: none; }
@keyframes bs-tip-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.bs-3d-tip-level {
  display: inline-block;
  padding: 1px 7px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #3b82f6);
  border-radius: 3px;
  margin-bottom: 6px;
}
.bs-3d-tip-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--bs-text);
  margin-bottom: 6px;
}
.bs-3d-tip-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-top: 1px dashed var(--bs-line);
  border-bottom: 1px dashed var(--bs-line);
}
.bs-3d-tip-line {
  font-size: 10px;
  color: var(--bs-muted);
  display: flex;
  justify-content: space-between;
}
.bs-3d-tip-action {
  margin-top: 6px;
  font-size: 10px;
  color: var(--bs-accent);
  text-align: right;
  opacity: 0.9;
}

/* 详情面板扩展样式 */
.bs-3d-parent-tag {
  font-size: 10px;
  color: var(--bs-muted);
  margin-bottom: 6px;
  padding: 2px 6px;
  background: rgba(96, 165, 250, 0.08);
  border-radius: 3px;
  display: inline-block;
  border-left: 2px solid var(--bs-accent-2);
}
.bs-3d-floor-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 4px;
}
.bs-3d-floor-mini-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 14px;
}
.bs-3d-floor-mini-num {
  font-size: 9px;
  font-family: var(--bs-mono);
  color: var(--bs-dim);
  width: 20px;
  flex-shrink: 0;
}
.bs-3d-floor-mini-bar {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.6), rgba(96, 165, 250, 0.4));
  border: 1px solid rgba(168, 85, 247, 0.4);
  animation: bs-mini-bar-pulse 3s ease-in-out infinite;
}
@keyframes bs-mini-bar-pulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.bs-3d-drill-hint {
  margin-top: 10px;
  padding: 6px 8px;
  font-size: 10px;
  color: var(--bs-accent);
  background: rgba(124, 58, 237, 0.08);
  border: 1px dashed var(--bs-line);
  border-radius: 4px;
  text-align: center;
  animation: bs-drill-blink 2.4s ease-in-out infinite;
}
@keyframes bs-drill-blink {
  0%,100% { opacity: 0.65; }
  50% { opacity: 1; box-shadow: 0 0 12px rgba(168, 85, 247, 0.25); }
}

/* 详情面板加大（楼宇/楼层详情更丰富）*/
.bs-3d-detail { width: 248px; max-height: 70%; overflow-y: auto; }
.bs-3d-detail::-webkit-scrollbar { width: 3px; }
.bs-3d-detail::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 2px; }
