/* ============================================================
   ui-b2-console-dashboard.css — 数据看板（dashboard.html）CSS 层视觉迁移
   设计稿：UI改版效果图-v2/console/dashboard.html（苹果性格浅色）
   约束：仅 CSS 层；
        每条规则以 :root[data-theme="light"] 开头（亮色专属覆盖），暗色零变化；
        颜色仅用 taste-system.css 的 --linear-* 令牌；
        选择器以 console 根 class（body.taste-light-console）开头，绝不波及主系统页面。
   ============================================================ */

/* (0) 页面局部语义令牌：仅映射到 --linear-*，亮色下生效 */
:root[data-theme="light"] body.taste-light-console {
  --b2-canvas: var(--linear-canvas);
  --b2-surface: var(--linear-surface-1);
  --b2-surface-2: var(--linear-surface-2);
  --b2-surface-3: var(--linear-surface-3);
  --b2-hairline: var(--linear-hairline);
  --b2-hairline-strong: var(--linear-hairline-strong);
  --b2-ink: var(--linear-ink);
  --b2-ink-2: var(--linear-ink-subtle);
  --b2-ink-3: var(--linear-ink-tertiary);
  --b2-accent: var(--linear-primary);
  --b2-accent-hover: var(--linear-primary-hover);
  --b2-accent-focus: var(--linear-primary-focus);
  --b2-on-accent: var(--linear-on-primary);
  --b2-success: var(--linear-success);
  --b2-warning: var(--linear-warning);
  --b2-danger: var(--linear-danger);
  --b2-radius-ctl: var(--linear-radius-md);
  --b2-radius-card: var(--linear-radius-lg);
  --b2-radius-sm: var(--linear-radius-sm);
  --b2-shadow-soft: var(--linear-shadow);
  --b2-shadow-pop: var(--linear-shadow);
}

/* (1) 画布底色（设计稿 #F5F5F7） */
:root[data-theme="light"] body.taste-light-console {
  background: var(--b2-canvas);
}

/* (2) 顶部导航（设计稿 .topbar） */
:root[data-theme="light"] body.taste-light-console .topbar {
  background: var(--b2-surface);
  border-bottom: 1px solid var(--b2-hairline);
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .topbar .brand {
  font-weight: 600;
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .topbar .who {
  color: var(--b2-ink-3);
}

:root[data-theme="light"] body.taste-light-console .topbar .tabs a {
  color: var(--b2-ink-2);
  border-radius: var(--b2-radius-ctl);
}

:root[data-theme="light"] body.taste-light-console .topbar .tabs a:hover {
  background: var(--b2-surface-3);
  color: var(--b2-ink);
  text-decoration: none;
}

:root[data-theme="light"] body.taste-light-console .topbar .tabs a[aria-current="page"],
:root[data-theme="light"] body.taste-light-console .topbar .tabs a.active {
  background: var(--b2-surface-3);
  border-color: var(--b2-hairline-strong);
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .topbar button.link {
  background: transparent;
  border: 1px solid var(--b2-hairline-strong);
  color: var(--b2-accent-hover);
  border-radius: var(--b2-radius-ctl);
}

:root[data-theme="light"] body.taste-light-console .topbar button.link:hover {
  background: var(--b2-surface-3);
  color: var(--b2-ink);
}

/* (3) 卡片容器（设计稿 .card） */
:root[data-theme="light"] body.taste-light-console .card {
  background: var(--b2-surface);
  border: 1px solid var(--b2-hairline);
  border-radius: var(--b2-radius-card);
  box-shadow: var(--b2-shadow-soft);
}

:root[data-theme="light"] body.taste-light-console .card h2 {
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .card h3 {
  color: var(--b2-ink-2);
}

/* (4) 概览统计卡（设计稿 .stat：8 卡两行） */
:root[data-theme="light"] body.taste-light-console .grid.cols-4 {
  gap: 14px;
}

:root[data-theme="light"] body.taste-light-console .stat {
  background: var(--b2-surface-2);
  border: 1px solid var(--b2-hairline);
  border-radius: var(--b2-radius-card);
  box-shadow: var(--b2-shadow-soft);
}

:root[data-theme="light"] body.taste-light-console .stat .num {
  color: var(--b2-ink);
  font-size: 26px;
  font-weight: 600;
}

:root[data-theme="light"] body.taste-light-console .stat .lbl {
  color: var(--b2-ink-3);
}

/* (5) 表格（设计稿 .tbl） */
:root[data-theme="light"] body.taste-light-console th {
  background: var(--b2-surface-2);
  color: var(--b2-ink-2);
  border-bottom: 1px solid var(--b2-hairline);
}

:root[data-theme="light"] body.taste-light-console td {
  border-bottom: 1px solid var(--b2-hairline);
  color: var(--b2-ink-2);
}

:root[data-theme="light"] body.taste-light-console tbody tr:hover td {
  background: var(--b2-surface-3);
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .subsystem-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--b2-ink);
}

/* (6) 状态徽章 */
:root[data-theme="light"] body.taste-light-console .badge {
  background: var(--b2-surface-3);
  border: 1px solid var(--b2-hairline-strong);
  color: var(--b2-ink-2);
}

:root[data-theme="light"] body.taste-light-console .badge.online {
  background: var(--b2-surface-3);
  border-color: var(--b2-hairline-strong);
  color: var(--b2-success);
}

:root[data-theme="light"] body.taste-light-console .badge.suspended {
  background: var(--b2-surface-3);
  border-color: var(--b2-hairline-strong);
  color: var(--b2-warning);
}

:root[data-theme="light"] body.taste-light-console .badge.revoked {
  background: var(--b2-surface-3);
  border-color: var(--b2-hairline-strong);
  color: var(--b2-danger);
}

:root[data-theme="light"] body.taste-light-console .badge.draft,
:root[data-theme="light"] body.taste-light-console .badge.offline {
  color: var(--b2-ink-3);
}

:root[data-theme="light"] body.taste-light-console .badge.expired {
  color: var(--b2-ink-3);
}

/* (7) 文本/代码 */
:root[data-theme="light"] body.taste-light-console .muted {
  color: var(--b2-ink-3);
}

:root[data-theme="light"] body.taste-light-console .mono {
  color: var(--b2-ink-2);
}

:root[data-theme="light"] body.taste-light-console .meta {
  color: var(--b2-ink-3);
}

/* (8) 工具栏（设计稿 .refresh / .upd） */
:root[data-theme="light"] body.taste-light-console .toolbar {
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .toolbar h2 {
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .row .span-all {
  grid-column: 1 / -1;
}

/* (9) 图表双卡（设计稿 .cards2 / .chart-card） */
:root[data-theme="light"] body.taste-light-console .chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

:root[data-theme="light"] body.taste-light-console .chart-card {
  background: var(--b2-surface);
  border: 1px solid var(--b2-hairline);
  border-radius: var(--b2-radius-card);
  box-shadow: var(--b2-shadow-soft);
  padding: 16px 18px;
}

:root[data-theme="light"] body.taste-light-console .chart-card h3 {
  color: var(--b2-ink);
  margin-top: 0;
}

:root[data-theme="light"] body.taste-light-console .chart-card canvas {
  width: 100% !important;
  height: 280px !important;
}

/* (10) 成功率高亮（设计稿 .rate） */
:root[data-theme="light"] body.taste-light-console .rate {
  font-weight: 700;
  color: var(--b2-ink);
}

:root[data-theme="light"] body.taste-light-console .rate.low {
  color: var(--b2-danger);
}
