/* ============================================
 * 尚华咨询 · 全球 AI 智能体业务指挥中心
 * 主题: 浅色商务风 / 专业 BI 大屏
 * 配色: 青绿主色 + 蓝色辅色 + 橙红状态色
 * ============================================ */

:root {
  /* ===== 品牌色板 ===== */
  --b-teal: #0d9488;
  --b-teal-light: #10b981;
  --b-teal-soft: #ccfbf1;
  --b-teal-bg: #f0fdfa;

  --b-blue: #3b82f6;
  --b-blue-soft: #dbeafe;
  --b-sky: #0ea5e9;

  --b-orange: #f59e0b;
  --b-orange-soft: #fef3c7;
  --b-red: #ef4444;
  --b-red-soft: #fee2e2;

  /* ===== 灰阶 ===== */
  --b-bg: #f8fafc;
  --b-bg-sunken: #f1f5f9;
  --b-card: #ffffff;
  --b-border: #e2e8f0;
  --b-border-light: #f1f5f9;
  --b-text-1: #1e293b;
  --b-text-2: #475569;
  --b-text-3: #64748b;
  --b-text-4: #94a3b8;

  /* ===== 字体 ===== */
  --b-font: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --b-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  /* ===== 间距 ===== */
  --b-sp-1: 4px;
  --b-sp-2: 8px;
  --b-sp-3: 12px;
  --b-sp-4: 16px;
  --b-sp-5: 20px;
  --b-sp-6: 24px;

  /* ===== 圆角 ===== */
  --b-r-sm: 6px;
  --b-r-md: 10px;
  --b-r-lg: 14px;

  /* ===== 阴影 ===== */
  --b-shadow-sm: 0 1px 2px rgba(30, 41, 59, 0.04);
  --b-shadow: 0 1px 3px rgba(30, 41, 59, 0.08), 0 1px 2px rgba(30, 41, 59, 0.04);
  --b-shadow-md: 0 4px 12px rgba(30, 41, 59, 0.08);
  --b-shadow-lg: 0 12px 32px rgba(30, 41, 59, 0.12);

  /* ===== 动效 ===== */
  --b-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --b-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --b-dur-fast: 180ms;
  --b-dur-base: 320ms;
}

/* ============================================
 * 全局重置
 * ============================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
.biz-dashboard {
  position: relative;
  min-height: 100vh;
  background: var(--b-bg);
  color: var(--b-text-1);
  font-family: var(--b-font);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ============================================
 * 顶部标题 + KPI 栏
 * ============================================ */
.biz-header {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 20px;
  background: var(--b-card);
  border-bottom: 1px solid var(--b-border);
  box-shadow: var(--b-shadow-sm);
  min-height: 68px;
}

.biz-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; text-decoration: none; color: inherit; }
.biz-brand:hover { opacity: 0.9; }
.biz-brand-logo {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--b-teal), var(--b-teal-light));
  border-radius: var(--b-r-md);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  font-size: 20px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em;
}
.biz-brand-text { line-height: 1.2; }
.biz-brand-name { font-size: 17px; font-weight: 700; color: var(--b-text-1); letter-spacing: 0.02em; }
.biz-brand-sub { font-size: 11px; color: var(--b-text-3); margin-top: 3px; }

/* KPI */
.biz-kpis { display: flex; gap: 12px; flex: 1; justify-content: center; max-width: 900px; position: relative; }
.biz-kpi-demo-badge {
  position: absolute; top: -14px; left: 2px;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 8px; border-radius: 999px;
  background: #FFF7ED; border: 1px dashed #F59E0B; color: #B45309;
  cursor: help; z-index: 2;
}
.biz-kpi {
  position: relative; flex: 1; min-width: 140px;
  padding: 10px 14px;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-md);
  box-shadow: var(--b-shadow-sm);
  transition: all var(--b-dur-base) var(--b-ease);
}
.biz-kpi:hover { box-shadow: var(--b-shadow-md); transform: translateY(-2px); border-color: var(--b-teal-soft); }
.biz-kpi-label {
  font-size: 11px; color: var(--b-text-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 5px;
  display: flex; align-items: center; gap: 6px;
}
.biz-kpi-label::before {
  content: ''; width: 5px; height: 5px; background: var(--b-teal);
  border-radius: 50%;
}
.biz-kpi-value {
  font-size: 24px; font-weight: 800;
  color: var(--b-teal); letter-spacing: -0.01em; line-height: 1;
  white-space: nowrap;
}
.biz-kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  margin-top: 6px; padding: 2px 8px; border-radius: 999px;
}
.biz-kpi-trend.up { color: var(--b-teal); background: var(--b-teal-bg); }
.biz-kpi-trend.dn { color: var(--b-red); background: var(--b-red-soft); }
.biz-kpi-trend::before {
  content: ''; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.biz-kpi-trend.up::before { border-bottom: 5px solid var(--b-teal); }
.biz-kpi-trend.dn::before { border-top: 5px solid var(--b-red); }

/* 右侧工具 */
.biz-header-tools { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.biz-clock { text-align: right; line-height: 1.1; }
.biz-clock-time { font-size: 22px; font-weight: 700; color: var(--b-text-1); letter-spacing: 0.04em; }
.biz-clock-date { font-size: 11px; color: var(--b-text-3); margin-top: 3px; }
.biz-sync {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: #FFF7ED;
  border: 1px dashed #F59E0B;
  border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #B45309;
  cursor: help;
}
.biz-sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #F59E0B;
  animation: biz-pulse 1.6s ease-in-out infinite;
}
@keyframes biz-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.25); } }
.biz-sync-time { color: var(--b-text-2); font-weight: 500; }

/* 区域切换 tab */
.biz-tabs {
  display: inline-flex; gap: 2px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-sm);
  padding: 3px;
}
.biz-tab {
  padding: 5px 14px; font-size: 12px; font-weight: 500;
  color: var(--b-text-3); background: transparent; border: none;
  border-radius: 5px;
  cursor: pointer; transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-tab:hover { color: var(--b-text-1); }
.biz-tab.active { color: #fff; background: var(--b-teal); font-weight: 600; }

/* 区域筛选联动 */
body[data-region="cn"] .biz-node[data-region="intl"],
body[data-region="intl"] .biz-node[data-region="cn"],
body[data-region="cn"] .biz-table tbody tr[data-region="intl"],
body[data-region="intl"] .biz-table tbody tr[data-region="cn"] {
  display: none;
}

body[data-region="cn"] .city-group:not([data-tag="hub"]):not([data-tag="cn"]),
body[data-region="intl"] .city-group[data-tag="cn"]:not([data-tag="hub"]) {
  opacity: 0.12;
  pointer-events: none;
  filter: grayscale(0.8);
}
.city-group { transition: opacity 0.25s ease, filter 0.25s ease; }

/* 工具箱按钮 */
.biz-tool-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--b-card); border: 1px solid var(--b-border);
  border-radius: var(--b-r-sm);
  color: var(--b-text-3); cursor: pointer;
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-tool-btn:hover { color: var(--b-teal); border-color: var(--b-teal); box-shadow: var(--b-shadow); }

/* ============================================
 * 三栏主舞台
 * ============================================ */
.biz-stage {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 12px; padding: 12px;
  min-height: calc(100vh - 68px);
}
.biz-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.biz-col > .biz-card { flex: 0 0 auto; }
.biz-col > .biz-card.biz-stretch { flex: 1 1 auto; min-height: 0; }
.biz-card:not(.biz-stretch) .biz-card-body { flex: 0 0 auto; }
.biz-card:not(.biz-stretch) .biz-chart-wrap { height: 130px; min-height: 130px; }
.biz-core { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; }

/* ============================================
 * 商务卡片
 * ============================================ */
.biz-card {
  position: relative;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-lg);
  box-shadow: var(--b-shadow-sm);
  transition: all var(--b-dur-base) var(--b-ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.biz-card:hover { box-shadow: var(--b-shadow-md); border-color: var(--b-border); }

.biz-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--b-border-light);
  flex-shrink: 0; gap: 8px; min-height: 44px;
}
.biz-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.biz-title-bar {
  width: 4px; height: 18px;
  background: var(--b-teal);
  border-radius: 2px;
}
.biz-title-bar-accent { background: var(--b-blue); }
.biz-title-bar-warn { background: var(--b-orange); }
.biz-title-text { display: flex; flex-direction: column; gap: 1px; }
.biz-title-zh { font-size: 14px; font-weight: 700; color: var(--b-text-1); }
.biz-title-en { font-size: 10px; color: var(--b-text-3); letter-spacing: 0.08em; text-transform: uppercase; }
.biz-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* 标签 */
.biz-tag {
  font-size: 10px; font-weight: 600; padding: 3px 9px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: 999px;
  color: var(--b-text-2);
  display: inline-flex; align-items: center; gap: 5px;
}
.biz-tag.live { color: var(--b-teal); background: var(--b-teal-bg); border-color: var(--b-teal-soft); padding-left: 12px; }
.biz-tag.live::before {
  content: ''; width: 5px; height: 5px; background: var(--b-teal-light);
  border-radius: 50%; animation: biz-pulse 1.6s ease-in-out infinite;
}
.biz-tag.up { color: var(--b-teal); background: var(--b-teal-bg); border-color: var(--b-teal-soft); }
.biz-tag.warn { color: var(--b-orange); background: var(--b-orange-soft); border-color: #fde68a; }
.biz-tag.cn { color: var(--b-teal); background: var(--b-teal-bg); border-color: var(--b-teal-soft); }
.biz-tag.intl { color: var(--b-blue); background: var(--b-blue-soft); border-color: #bfdbfe; }
.biz-tag.us { color: var(--b-blue); background: var(--b-blue-soft); border-color: #bfdbfe; }
.biz-tag.eu { color: #0ea5e9; background: #e0f2fe; border-color: #bae6fd; }
.biz-tag.jp { color: #8b5cf6; background: #ede9fe; border-color: #ddd6fe; }
.biz-tag.sg { color: #06b6d4; background: #cffafe; border-color: #a5f3fc; }
.biz-tag.br { color: #ec4899; background: #fce7f3; border-color: #fbcfe8; }
.biz-tag.hub { color: var(--b-orange); background: var(--b-orange-soft); border-color: #fde68a; }

.biz-card-body { flex: 1; padding: 14px; min-height: 0; position: relative; }
.biz-chart-wrap { position: relative; width: 100%; height: 100%; min-height: 120px; }
.biz-chart { width: 100%; height: 100%; display: block; }

/* 指标行 */
.biz-metric-row { display: flex; gap: 16px; margin-bottom: 10px; }
.biz-metric { flex: 1; }
.biz-metric-label { font-size: 11px; color: var(--b-text-3); margin-bottom: 2px; }
.biz-metric-value { font-size: 20px; font-weight: 700; color: var(--b-text-1); }

/* 指标网格 */
.biz-metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.biz-metric-card {
  padding: 12px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border-light);
  border-radius: var(--b-r-md);
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-metric-card:hover { background: var(--b-card); box-shadow: var(--b-shadow); border-color: var(--b-border); }
.biz-metric-card-label { font-size: 11px; color: var(--b-text-3); margin-bottom: 4px; }
.biz-metric-card-value { font-size: 22px; font-weight: 800; color: var(--b-teal); }
.biz-metric-card-value.warn { color: var(--b-orange); }
.biz-metric-card-value span { font-size: 11px; color: var(--b-text-3); font-weight: 500; margin-left: 3px; }
.biz-spark { height: 22px; margin-top: 8px; }

/* ============================================
 * 中央：世界地图
 * ============================================ */
.biz-map-card { flex: 1; display: flex; flex-direction: column; min-height: 420px; }
.biz-map-head { border-bottom: 1px solid var(--b-border-light); }
.biz-map-stats { display: flex; gap: 12px; }
.biz-map-stat {
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-md);
  padding: 6px 12px;
}
.biz-map-stat-label { font-size: 10px; color: var(--b-text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1px; }
.biz-map-stat-value { font-size: 15px; font-weight: 700; color: var(--b-teal); }

.biz-map-body {
  flex: 1; position: relative; padding: 4px;
  display: flex; flex-direction: column;
}
.biz-world-map {
  flex: 1; position: relative; min-height: 320px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-md);
  overflow: hidden;
}
.biz-world-map svg { display: block; width: 100%; height: 100%; }
.biz-world-map .land { fill: url(#bizLandGrad); stroke: var(--b-teal); stroke-width: 0.5px; }
.biz-world-map .land:hover { filter: brightness(1.02); }
.biz-world-map .boundary { fill: none; stroke: rgba(13, 148, 136, 0.35); stroke-width: 0.4px; stroke-linejoin: round; }
.biz-world-map .graticule { fill: none; stroke: rgba(148, 163, 184, 0.15); stroke-width: 0.5px; }
.biz-world-map .city { fill: var(--b-teal); stroke: #fff; stroke-width: 1.5px; cursor: pointer; }
.biz-world-map .city.hub { fill: var(--b-orange); }
.biz-world-map .city-pulse { fill: none; stroke: var(--b-teal); stroke-width: 1.5px; opacity: 0.6; }
.biz-world-map .city-pulse.hub { stroke: var(--b-orange); }
.biz-world-map .arc { fill: none; stroke: var(--b-teal); stroke-width: 1.2px; opacity: 0.55; }
.biz-world-map .arc-particle { fill: var(--b-teal); }
.biz-world-map .city-label {
  font-size: 12px; font-weight: 700; fill: #1e293b;
  text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 0 4px rgba(255,255,255,0.9);
  pointer-events: none;
}

/* 区域语义色：枢纽金、国内青、海外蓝、亚太紫、南美玫红 */
.biz-world-map .city-group[data-tag="hub"] .city { fill: var(--b-orange); }
.biz-world-map .city-group[data-tag="hub"] .city-pulse { stroke: var(--b-orange); }
.biz-world-map .city-group[data-tag="cn"] .city { fill: var(--b-teal); }
.biz-world-map .city-group[data-tag="cn"] .city-pulse { stroke: var(--b-teal); }
.biz-world-map .city-group[data-tag="us"] .city,
.biz-world-map .city-group[data-tag="eu"] .city { fill: var(--b-blue); }
.biz-world-map .city-group[data-tag="us"] .city-pulse,
.biz-world-map .city-group[data-tag="eu"] .city-pulse { stroke: var(--b-blue); }
.biz-world-map .city-group[data-tag="jp"] .city,
.biz-world-map .city-group[data-tag="sg"] .city { fill: var(--b-sky); }
.biz-world-map .city-group[data-tag="jp"] .city-pulse,
.biz-world-map .city-group[data-tag="sg"] .city-pulse { stroke: var(--b-sky); }
.biz-world-map .city-group[data-tag="br"] .city { fill: #8b5cf6; }
.biz-world-map .city-group[data-tag="br"] .city-pulse { stroke: #8b5cf6; }

.biz-map-legend {
  display: flex; gap: 16px; margin-top: 10px;
  font-size: 11px; color: var(--b-text-2);
}
.biz-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.biz-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.biz-legend-dot.hub { background: var(--b-orange); }
.biz-legend-dot.cn { background: var(--b-teal); }
.biz-legend-dot.intl { background: var(--b-blue); }

/* 地图 tooltip */
.biz-map-tooltip {
  position: absolute; z-index: 100;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.92);
  color: #fff; font-size: 11px;
  border-radius: var(--b-r-sm);
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
  box-shadow: var(--b-shadow-lg);
  max-width: 220px;
}
.biz-map-tooltip.visible { opacity: 1; }
.biz-map-tooltip strong { color: var(--b-teal-light); display: block; margin-bottom: 2px; }

/* ============================================
 * 右栏：环形图 / 区域列表 / 进度条
 * ============================================ */
.biz-region-body { display: flex; align-items: center; gap: 16px; }
.biz-donut-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.biz-donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.biz-donut-value { font-size: 30px; font-weight: 800; color: var(--b-teal); line-height: 1; }
.biz-donut-label { font-size: 10px; color: var(--b-text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.biz-region-list { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.biz-region-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--b-text-2); }
.biz-region-item span { flex: 1; }
.biz-region-item b { color: var(--b-text-1); font-weight: 700; }
.biz-region-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ============================================
 * 数据日志
 * ============================================ */
.biz-log {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 260px; overflow-y: auto; padding-right: 4px;
}
.biz-log::-webkit-scrollbar { width: 5px; }
.biz-log::-webkit-scrollbar-track { background: var(--b-border-light); border-radius: 3px; }
.biz-log::-webkit-scrollbar-thumb { background: var(--b-border); border-radius: 3px; }
.biz-log-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  background: var(--b-bg-sunken);
  border-left: 3px solid var(--b-teal);
  border-radius: 0 var(--b-r-sm) var(--b-r-sm) 0;
  font-size: 11px;
  animation: biz-fade-in 0.35s var(--b-ease-out);
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-log-item:hover { background: var(--b-teal-bg); transform: translateX(2px); }
@keyframes biz-fade-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.biz-log-item.info { border-left-color: var(--b-blue); }
.biz-log-item.ok { border-left-color: var(--b-teal); }
.biz-log-item.warn { border-left-color: var(--b-orange); }
.biz-log-item.err { border-left-color: var(--b-red); }
.biz-log-time { color: var(--b-text-4); white-space: nowrap; flex-shrink: 0; font-family: var(--b-mono); }
.biz-log-msg { color: var(--b-text-2); flex: 1; }
.biz-log-icon {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-right: -4px;
  display: grid; place-items: center; font-size: 8px; font-weight: 800; color: #fff;
}
.biz-log-icon.ok { background: var(--b-teal); }
.biz-log-icon.info { background: var(--b-blue); }
.biz-log-icon.warn { background: var(--b-orange); }
.biz-log-icon.err { background: var(--b-red); }
.biz-log-item.latest { background: #f0fdfa; box-shadow: inset 2px 0 0 var(--b-teal); }

.biz-log-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; gap: 8px;
}
.biz-log-filter {
  display: inline-flex; gap: 4px;
  padding: 2px; background: var(--b-bg-sunken);
  border: 1px solid var(--b-border); border-radius: var(--b-r-sm);
}
.biz-log-filter button {
  padding: 3px 8px; font-size: 10px; font-weight: 600;
  color: var(--b-text-3); background: transparent; border: none;
  border-radius: 4px; cursor: pointer; transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-log-filter button:hover { color: var(--b-text-1); }
.biz-log-filter button.active { color: #fff; background: var(--b-teal); }

/* ============================================
 * 智能体矩阵
 * ============================================ */
.biz-matrix { position: relative; z-index: 10; padding: 0 12px 12px; }
.biz-matrix-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  padding: 12px 16px;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-lg);
  box-shadow: var(--b-shadow-sm);
}
.biz-matrix-title { font-size: 14px; font-weight: 700; color: var(--b-text-1); display: flex; align-items: center; gap: 10px; }
.biz-matrix-icon {
  width: 8px; height: 8px; border-radius: 50%; background: var(--b-teal);
  box-shadow: 0 0 0 4px var(--b-teal-soft);
}
.biz-matrix-stats { display: flex; gap: 18px; font-size: 12px; color: var(--b-text-3); }
.biz-matrix-stats b { color: var(--b-teal); font-weight: 700; font-size: 13px; margin-left: 4px; }
#bizMatrixCn { color: var(--b-teal); }
#bizMatrixIntl { color: var(--b-blue); }

.biz-matrix-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.biz-node {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-md);
  box-shadow: var(--b-shadow-sm);
  cursor: pointer;
  transition: all var(--b-dur-base) var(--b-ease);
  overflow: hidden;
}
.biz-node:hover { box-shadow: var(--b-shadow-md); transform: translateY(-2px); border-color: var(--b-teal-soft); }
.biz-node.ok { border-left: 3px solid var(--b-teal); }
.biz-node.warn { border-left: 3px solid var(--b-orange); }
.biz-node.err { border-left: 3px solid var(--b-red); }
.biz-node-head { display: flex; align-items: center; gap: 10px; }
.biz-node-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--b-teal-bg);
  border-radius: var(--b-r-md);
  color: var(--b-teal); font-size: 15px; font-weight: 800;
  flex-shrink: 0;
}
.biz-node-info { flex: 1; min-width: 0; line-height: 1.2; }
.biz-node-name { font-size: 13px; font-weight: 700; color: var(--b-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.biz-node-region { font-size: 9px; padding: 1px 5px; flex-shrink: 0; }
.biz-node-vendor { font-size: 10px; color: var(--b-text-3); margin-top: 2px; }
.biz-node-rate { font-size: 20px; font-weight: 700; text-align: right; flex-shrink: 0; line-height: 1; }
.biz-node-rate.ok { color: var(--b-teal); }
.biz-node-rate.warn { color: var(--b-orange); }
.biz-node-rate.err { color: var(--b-red); }
.biz-node-rate span { font-size: 10px; color: var(--b-text-3); font-weight: 500; margin-left: 2px; }

.biz-node-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--b-text-3); }
.biz-node-meta b { color: var(--b-text-1); font-weight: 600; }

/* ============================================
 * Token 用量表
 * ============================================ */
.biz-table-wrap { overflow-x: auto; margin: 0 12px 12px; position: relative; z-index: 10; }
.biz-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 12px;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-lg);
  box-shadow: var(--b-shadow-sm);
  overflow: hidden;
}
.biz-table th {
  padding: 10px 12px; text-align: left;
  background: var(--b-bg-sunken);
  color: var(--b-text-3);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--b-border);
}
.biz-table td { padding: 9px 12px; border-bottom: 1px solid var(--b-border-light); color: var(--b-text-2); }
.biz-table tr { transition: all var(--b-dur-fast) var(--b-ease); }
.biz-table tr:hover { background: var(--b-teal-bg); }
.biz-table tr:hover td { color: var(--b-text-1); }
.biz-table .num { color: var(--b-text-1); font-weight: 600; text-align: right; font-family: var(--b-mono); }
.biz-table .rev { color: var(--b-teal); font-weight: 700; text-align: right; font-family: var(--b-mono); }

.biz-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.biz-status.ok { color: var(--b-teal); background: var(--b-teal-bg); }
.biz-status.ok::before { content: ''; width: 5px; height: 5px; background: var(--b-teal); border-radius: 50%; }
.biz-status.busy { color: var(--b-orange); background: var(--b-orange-soft); }
.biz-status.busy::before { content: ''; width: 5px; height: 5px; background: var(--b-orange); border-radius: 50%; }

/* ============================================
 * 加载动画
 * ============================================ */
.biz-loading {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: var(--b-bg);
  transition: opacity 0.5s var(--b-ease-out), visibility 0.5s;
}
.biz-loading.hide { opacity: 0; visibility: hidden; }
.biz-loading-content { text-align: center; }
.biz-loading-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 20px; }
.biz-loading-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.biz-loading-track { stroke: var(--b-border); }
.biz-loading-fill {
  stroke: var(--b-teal);
  stroke-dasharray: 339; stroke-dashoffset: 339;
  animation: biz-load-fill 1.8s ease-out forwards;
}
@keyframes biz-load-fill { to { stroke-dashoffset: 0; } }
.biz-loading-logo {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 900; color: var(--b-teal);
}
.biz-loading-title { font-size: 13px; color: var(--b-text-2); margin-bottom: 14px; letter-spacing: 0.05em; }
.biz-loading-bar { width: 180px; height: 4px; background: var(--b-border-light); margin: 0 auto; border-radius: 2px; overflow: hidden; }
.biz-loading-bar-fill { height: 100%; background: linear-gradient(90deg, var(--b-teal), var(--b-teal-light)); width: 0; transition: width 0.3s var(--b-ease-out); }
.biz-loading-pct { font-size: 11px; color: var(--b-text-3); margin-top: 8px; }

/* ============================================
 * 工具箱弹出层
 * ============================================ */
.biz-toolbox { position: relative; }
.biz-toolbox-panel {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  width: 260px; padding: 14px;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-lg);
  box-shadow: var(--b-shadow-lg);
  display: none; flex-direction: column; gap: 12px;
  z-index: 100;
}
.biz-toolbox.open .biz-toolbox-panel { display: flex; }
.biz-toolbox-section { display: flex; flex-direction: column; gap: 6px; }
.biz-toolbox-label { font-size: 10px; color: var(--b-text-3); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.biz-toolbox-input {
  width: 100%; padding: 7px 10px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-sm);
  color: var(--b-text-1); font-size: 12px; outline: none;
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-toolbox-input:focus { border-color: var(--b-teal); box-shadow: 0 0 0 3px var(--b-teal-soft); }
.biz-toolbox-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.biz-toolbox-btn {
  flex: 1; padding: 6px 8px;
  background: var(--b-bg-sunken);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-sm);
  color: var(--b-text-2); cursor: pointer;
  font-size: 11px; font-weight: 500;
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-toolbox-btn:hover { background: var(--b-teal-bg); color: var(--b-teal); border-color: var(--b-teal-soft); }

/* ============================================
 * 智能体详情弹窗
 * ============================================ */
.biz-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.biz-modal.show { display: flex; }
.biz-modal-bg { position: absolute; inset: 0; background: rgba(30, 41, 59, 0.45); backdrop-filter: blur(4px); }
.biz-modal-box {
  position: relative; width: min(560px, 92vw); max-height: 80vh;
  background: var(--b-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--b-shadow-lg);
  animation: biz-modal-in 0.3s var(--b-ease);
}
@keyframes biz-modal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.biz-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--b-border-light);
  background: var(--b-bg-sunken);
}
.biz-modal-title { font-size: 15px; font-weight: 700; color: var(--b-text-1); }
.biz-modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--b-border);
  border-radius: var(--b-r-sm);
  color: var(--b-text-3); cursor: pointer;
  transition: all var(--b-dur-fast) var(--b-ease);
}
.biz-modal-close:hover { color: var(--b-red); border-color: var(--b-red-soft); background: var(--b-red-soft); }
.biz-modal-body { padding: 18px; overflow-y: auto; flex: 1; }

/* ============================================
 * 实用类
 * ============================================ */
.biz-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.biz-stretch { flex: 1; min-height: 0; }

/* ============================================
 * 骨架屏与加载态
 * ============================================ */
.biz-skeleton {
  position: relative; overflow: hidden;
  background: var(--b-bg-sunken);
  border-radius: var(--b-r-md);
}
.biz-skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: translateX(-100%);
  animation: biz-skeleton-shimmer 1.6s infinite;
}
@keyframes biz-skeleton-shimmer { to { transform: translateX(100%); } }
.biz-map-skeleton {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: var(--b-bg-sunken);
}
.biz-map-skeleton.hide { opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.biz-map-error {
  position: absolute; inset: 0; z-index: 6;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: var(--b-bg-sunken); color: var(--b-text-2);
}
.biz-map-error.show { display: flex; }
.biz-map-error button {
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  color: #fff; background: var(--b-teal); border: none;
  border-radius: var(--b-r-sm); cursor: pointer;
}
.biz-map-error button:hover { background: var(--b-teal-light); }

/* ============================================
 * 运动偏好与无障碍
 * ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .biz-sync-dot, .biz-tag.live::before { animation: none; }
  .biz-loading-fill { animation: none; stroke-dashoffset: 0; }
}

/* ============================================
 * 响应式
 * ============================================ */
@media (max-width: 1560px) and (min-width: 1281px) {
  .biz-header { padding: 12px 16px; gap: 14px; }
  .biz-kpis { gap: 8px; flex-wrap: wrap; }
  .biz-kpi { min-width: 118px; padding: 8px 10px; }
  .biz-kpi-value { font-size: 20px; }
  .biz-header-tools { gap: 10px; min-width: 0; }
  .biz-clock-time { font-size: 19px; }
  .biz-sync { padding: 6px 10px; }
}

@media (max-width: 1280px) {
  .biz-stage { grid-template-columns: 280px 1fr 280px; gap: 12px; padding: 12px; }
  .biz-header { padding: 12px 16px; }
  .biz-kpis { gap: 8px; }
  .biz-kpi { min-width: 120px; padding: 8px 12px; }
  .biz-kpi-value { font-size: 20px; }
  .biz-matrix-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .biz-stage { grid-template-columns: 1fr; }
  .biz-col-left, .biz-col-right { flex-direction: row; flex-wrap: wrap; }
  .biz-col { flex-direction: row; flex-wrap: wrap; }
  .biz-card { flex: 1 1 260px; min-width: 260px; }
  .biz-map-card { flex: 1 1 100%; min-height: 360px; }
  .biz-matrix-grid { grid-template-columns: repeat(2, 1fr); }
  .biz-kpis { display: none; }
}

/* 兼容旧 v17 导航 */
.v17-navbar { display: none; }

/* ========== 移动端溢出修复（2026-08-03 部署前巡检） ========== */
/* 1. 加载层隐藏后彻底脱离布局（保留淡出动画，动画结束后 display:none） */
.biz-loading {
  transition: opacity 0.5s var(--b-ease-out), visibility 0.5s, display 0.5s allow-discrete;
}
.biz-loading.hide { display: none; opacity: 0; visibility: hidden; }

/* 2. 小屏头部：时钟/同步时间让位，允许换行 */
@media (max-width: 768px) {
  .biz-header { flex-wrap: wrap; row-gap: 10px; }
  .biz-clock { display: none; }
  .biz-sync-time { display: none; }
  .biz-header-tools { flex-wrap: wrap; }
  /* KPI 卡片两列换行，防止 5×140px 撑破 375px 视口 */
  .biz-kpis { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .biz-kpi { flex: 1 1 calc(50% - 8px); min-width: calc(50% - 8px); }
  /* 工具条独占一行，导出按钮靠右 */
  .biz-header-tools { width: 100%; }
  .biz-export-group { margin-left: auto; }
}

/* 3. 地图 SVG 不超宽 */
.biz-map-card svg { max-width: 100%; height: auto; }
.biz-map-card { overflow: hidden; }
