/* 运维平台原型共享样式 */

:root {
  --c-green: #10b981;
  --c-green-bg: #d1fae5;
  --c-yellow: #f59e0b;
  --c-yellow-bg: #fef3c7;
  --c-red: #ef4444;
  --c-red-bg: #fee2e2;
  --c-gray: #9ca3af;
  --c-gray-bg: #f3f4f6;

  --c-primary: #4f46e5;
  --c-primary-hover: #4338ca;
  --c-primary-bg: #eef2ff;

  --c-bg: #f8fafc;
  --c-card: #ffffff;
  --c-border: #e5e7eb;
  --c-text: #111827;
  --c-text-2: #4b5563;
  --c-text-3: #9ca3af;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.55;
}

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* 顶栏 */
.topbar {
  grid-column: 1 / 3;
  background: #1e293b;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 13px;
  border-bottom: 1px solid #0f172a;
}
.topbar .brand {
  font-weight: 600;
  font-size: 15px;
  margin-right: 16px;
}
.topbar .site-info { color: #94a3b8; font-size: 12px; }
.topbar .right { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.topbar .time-cursor {
  background: #334155;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.topbar .user {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
}
.topbar .user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-primary); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}

/* 侧栏 v2 — 分组可折叠 */
.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
  padding: 6px 0;
}
.sidebar .nav-group {
  border-bottom: 1px solid #f3f4f6;
}
.sidebar .nav-group .group-header {
  display: flex; align-items: center;
  padding: 9px 14px 9px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  user-select: none;
}
.sidebar .nav-group .group-icon { font-size: 14px; margin-right: 8px; opacity: 0.85; }
.sidebar .nav-group .group-label { flex: 1; }
.sidebar .nav-group .group-caret {
  font-size: 10px; color: var(--c-text-3);
  transition: transform 0.15s;
}
.sidebar .nav-group:not(.open) .group-caret { transform: rotate(-90deg); }
.sidebar .nav-group .group-items {
  display: none;
  padding: 2px 0 6px 0;
}
.sidebar .nav-group.open .group-items { display: block; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px 7px 36px;
  color: var(--c-text-2);
  text-decoration: none;
  font-size: 12.5px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s;
}
.sidebar .nav-item .nav-bullet { color: var(--c-text-3); margin-right: -2px; }
.sidebar .nav-item .nav-label { flex: 1; }
.sidebar .nav-item:hover {
  background: var(--c-primary-bg);
  color: var(--c-primary);
}
.sidebar .nav-item.active {
  background: var(--c-primary-bg);
  color: var(--c-primary);
  border-left-color: var(--c-primary);
  font-weight: 600;
}
.sidebar .nav-item.dim { color: var(--c-text-3); }
.sidebar .nav-item.dim:hover { color: var(--c-text-2); background: #f9fafb; }
.sidebar .nav-tag {
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 500;
  line-height: 14px;
  vertical-align: middle;
}
.sidebar .nav-tag.new    { background: var(--c-green-bg); color: var(--c-green); }
.sidebar .nav-tag.change { background: var(--c-yellow-bg); color: #b45309; }
.sidebar .nav-note {
  font-size: 10px; color: var(--c-text-3);
}
.sidebar .nav-badge {
  margin-left: auto;
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
}
.sidebar .nav-badge.warn { background: var(--c-yellow); }

/* 主内容 */
.main {
  overflow-y: auto;
  padding: 20px 24px;
}
.page-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--c-text);
}
.page-subtitle {
  font-size: 13px;
  color: var(--c-text-3);
}
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-text-3);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--c-primary); text-decoration: none; }
.breadcrumb .sep { color: var(--c-text-3); }

/* 卡片 */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .more {
  margin-left: auto;
  color: var(--c-primary);
  font-size: 12px;
  font-weight: normal;
  cursor: pointer;
  text-decoration: none;
}
.card-subtitle {
  font-size: 12px;
  color: var(--c-text-3);
  margin: -8px 0 12px 0;
}

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 12px 16px;
}
.kpi-label {
  font-size: 12px;
  color: var(--c-text-3);
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.kpi-value .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-3);
  margin-left: 2px;
}
.kpi-delta {
  font-size: 12px;
  margin-top: 4px;
}
.kpi-delta.up   { color: var(--c-green); }
.kpi-delta.down { color: var(--c-red); }
.kpi-delta.flat { color: var(--c-text-3); }
.kpi-spark {
  height: 30px;
  margin-top: 4px;
}

/* 业务能力卡片 — v3 降噪：正常项中性灰，异常项才上色 */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cap-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-left: 4px solid #d1d5db; /* 正常项用浅灰 */
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cap-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.cap-card.cap-warn { border-left-color: var(--c-yellow); }
.cap-card.cap-crit { border-left-color: var(--c-red); }
.cap-card.cap-off  { border-left-color: var(--c-gray); opacity: 0.55; }
.cap-card-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.cap-card-name {
  font-size: 14px;
  font-weight: 600;
}
.cap-card-status {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.cap-card-status.ok   { background: var(--c-green-bg); color: var(--c-green); }
.cap-card-status.warn { background: var(--c-yellow-bg); color: var(--c-yellow); }
.cap-card-status.crit { background: var(--c-red-bg); color: var(--c-red); }
.cap-card-status.off  { background: var(--c-gray-bg); color: var(--c-text-3); }
.cap-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.cap-metric-label {
  font-size: 10px;
  color: var(--c-text-3);
  margin-bottom: 2px;
}
.cap-metric-value {
  font-size: 13px;
  font-weight: 600;
}
.cap-metric-value.up   { color: var(--c-green); }
.cap-metric-value.down { color: var(--c-red); }

/* 状态点 — v3: 正常项用浅灰，仅异常上色 */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-gray);
  margin-right: 4px;
}
.dot.ok   { background: #d1d5db; }
.dot.warn { background: var(--c-yellow); }
.dot.crit { background: var(--c-red); }
.dot.off  { background: var(--c-gray); }

/* 严重度徽章 — v3: 正常项中性灰 */
.sev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.sev.crit { background: var(--c-red-bg); color: var(--c-red); }
.sev.warn { background: var(--c-yellow-bg); color: #b45309; }
.sev.info { background: var(--c-primary-bg); color: var(--c-primary); }
.sev.ok   { background: #f3f4f6; color: #6b7280; }  /* 正常项用中性灰 */
.sev.off  { background: var(--c-gray-bg); color: var(--c-text-2); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.1s;
}
.btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn.primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn.primary:hover {
  background: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
  color: #fff;
}
.btn.danger {
  background: var(--c-red);
  color: #fff;
  border-color: var(--c-red);
}
.btn.sm { padding: 4px 8px; font-size: 11px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: #f9fafb;
  border-bottom: 1px solid var(--c-border);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--c-text-2);
  font-size: 12px;
}
.table td {
  border-bottom: 1px solid var(--c-border);
  padding: 10px 12px;
  vertical-align: middle;
}
.table tr:hover td { background: #fafafa; }
.table a { color: var(--c-primary); text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table-link { cursor: pointer; }

/* 容量进度条 */
.progress {
  background: var(--c-gray-bg);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: var(--c-primary);
  transition: width 0.3s;
}
.progress-fill.warn { background: var(--c-yellow); }
.progress-fill.crit { background: var(--c-red); }
.progress-label {
  font-size: 11px;
  color: var(--c-text-2);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

/* 事件 / 告警卡片 */
.event-card {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-red);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.event-card.sev-warn { border-left-color: var(--c-yellow); }
.event-card.sev-info { border-left-color: var(--c-primary); }
.event-card.sev-ok   { border-left-color: var(--c-green); }
.event-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.event-title { font-size: 14px; font-weight: 600; }
.event-id { color: var(--c-text-3); font-size: 11px; }
.event-meta {
  font-size: 11px; color: var(--c-text-3);
  margin-bottom: 8px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.event-meta span { display: inline-flex; align-items: center; gap: 4px; }
.event-content { font-size: 12px; color: var(--c-text-2); margin-bottom: 8px; }
.event-actions {
  display: flex; gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--c-border);
}

/* 根因路径 */
.rca-tree {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  background: #f9fafb;
  border-radius: 6px;
  padding: 10px 12px;
  line-height: 1.7;
  margin: 8px 0;
}
.rca-tree .root { color: var(--c-red); font-weight: 600; }
.rca-tree .child { color: var(--c-text-2); padding-left: 16px; position: relative; }
.rca-tree .child::before {
  content: "↳"; position: absolute; left: 4px; color: var(--c-text-3);
}

/* 处理建议列表 */
.action-list {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.action-list li {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text);
}
.action-list .tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--c-red-bg);
  color: var(--c-red);
  font-weight: 500;
}
.action-list .tag.now { background: var(--c-red-bg); color: var(--c-red); }
.action-list .tag.soon { background: var(--c-yellow-bg); color: #b45309; }
.action-list .tag.later { background: var(--c-gray-bg); color: var(--c-text-2); }

/* 拓扑 */
.topo-canvas {
  width: 100%;
  height: 580px;
  background: #fafbfc;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  position: relative;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--c-border);
}
.timeline-item {
  position: relative;
  padding: 8px 0 12px 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px; top: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--c-primary);
}
.timeline-item.crit::before { background: var(--c-red); box-shadow: 0 0 0 1px var(--c-red); }
.timeline-item.warn::before { background: var(--c-yellow); box-shadow: 0 0 0 1px var(--c-yellow); }
.timeline-time { font-size: 11px; color: var(--c-text-3); }
.timeline-title { font-size: 13px; font-weight: 500; }
.timeline-desc { font-size: 12px; color: var(--c-text-2); }

/* Grid 布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.grid-aside-right { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-aside-left { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }

/* 工具类 */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-md { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-2 { color: var(--c-text-2); }
.text-3 { color: var(--c-text-3); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-red { color: var(--c-red); }
.text-yellow { color: var(--c-yellow); }
.text-green { color: var(--c-green); }
.text-primary { color: var(--c-primary); }
.bg-card { background: var(--c-card); }

/* 标签 */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--c-gray-bg);
  color: var(--c-text-2);
  margin-right: 4px;
}
.tag.primary { background: var(--c-primary-bg); color: var(--c-primary); }
.tag.green { background: var(--c-green-bg); color: var(--c-green); }
.tag.yellow { background: var(--c-yellow-bg); color: #b45309; }
.tag.red { background: var(--c-red-bg); color: var(--c-red); }
.tag.purple { background: #ede9fe; color: #6d28d9; }
.tag.gray { background: #f3f4f6; color: #4b5563; }

/* 筛选条 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--c-card);
  border-radius: 6px;
  border: 1px solid var(--c-border);
  font-size: 12px;
  flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input {
  padding: 4px 8px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}
.filter-bar .seg {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  overflow: hidden;
}
.filter-bar .seg button {
  padding: 4px 10px;
  background: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
}
.filter-bar .seg button.active {
  background: var(--c-primary);
  color: #fff;
}

/* ===== v2 新增组件 ===== */

/* 业务能力卡片 - 双状态徽章 */
.cap-card-status-row {
  display: flex; gap: 6px;
  margin-bottom: 8px;
  font-size: 10px;
}
.lic-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
}
.lic-badge.ok      { background: var(--c-green-bg); color: var(--c-green); }
.lic-badge.warn    { background: var(--c-yellow-bg); color: #b45309; }
.lic-badge.crit    { background: var(--c-red-bg); color: var(--c-red); }
.lic-badge.off     { background: var(--c-gray-bg); color: var(--c-text-3); }

/* 实体关系 5 块流式视图 - 参考博睿 */
.entity-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}
.flow-block {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flow-block:hover {
  border-color: var(--c-primary);
  box-shadow: 0 2px 6px rgba(79,70,229,0.12);
}
.flow-block.current {
  background: var(--c-primary-bg);
  border-color: var(--c-primary);
}
.flow-arrow {
  display: flex; align-items: center;
  padding: 0 8px;
  color: var(--c-text-3);
  font-size: 18px;
  font-weight: 300;
}
.flow-label {
  font-size: 11px; color: var(--c-text-3);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.flow-main {
  font-size: 16px; font-weight: 700;
  color: var(--c-text);
}
.flow-sub {
  font-size: 11px; color: var(--c-text-2);
  display: flex; gap: 8px;
}
.flow-sub .crit  { color: var(--c-red); font-weight: 500; }
.flow-sub .warn  { color: #b45309; font-weight: 500; }
.flow-sub .ok    { color: var(--c-green); font-weight: 500; }

/* 质量分布环形图（CSS conic gradient） */
.quality-ring {
  width: 110px; height: 110px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.quality-ring::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--c-card);
}
.quality-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  text-align: center;
}
.quality-ring-inner .num { font-size: 22px; font-weight: 700; color: var(--c-text); }
.quality-ring-inner .lbl { font-size: 10px; color: var(--c-text-3); }

/* 质量分布图例 */
.quality-legend {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
}
.quality-legend-item { display: flex; align-items: center; gap: 6px; }
.quality-legend-item .sw {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
}
.quality-legend-item .lbl { flex: 1; color: var(--c-text-2); }
.quality-legend-item .pct { font-weight: 600; }

/* KPI 紧凑型（横排） */
.kpi-compact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 4px 0;
}
.kpi-compact {
  flex: 1;
  min-width: 130px;
  padding: 10px 14px;
  border-right: 1px solid var(--c-border);
}
.kpi-compact:last-child { border-right: none; }
.kpi-compact .lbl { font-size: 11px; color: var(--c-text-3); }
.kpi-compact .val { font-size: 18px; font-weight: 700; color: var(--c-text); margin-top: 2px; }
.kpi-compact .val .unit { font-size: 11px; font-weight: 500; color: var(--c-text-3); margin-left: 1px; }
.kpi-compact .dlt { font-size: 11px; margin-top: 2px; }
.kpi-compact .dlt.up { color: var(--c-green); }
.kpi-compact .dlt.down { color: var(--c-red); }
.kpi-compact .dlt.flat { color: var(--c-text-3); }

/* 子系统折叠分组 */
.subsystem-group {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.subsystem-header {
  display: flex; align-items: center;
  padding: 10px 14px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--c-border);
}
.subsystem-header .ss-icon { margin-right: 6px; }
.subsystem-header .ss-count { color: var(--c-text-3); font-weight: 400; margin-left: 8px; font-size: 12px; }
.subsystem-header .ss-caret { margin-left: auto; color: var(--c-text-3); font-size: 11px; }
.subsystem-group:not(.open) .subsystem-body { display: none; }
.subsystem-group:not(.open) .subsystem-header { border-bottom: none; }
.subsystem-group:not(.open) .ss-caret { transform: rotate(-90deg); }
.subsystem-group.open .ss-caret { transform: rotate(0); }
.subsystem-body table { margin: 0; }
.subsystem-body .table tr:last-child td { border-bottom: none; }

/* ===== v3 新增组件 ===== */

/* 综合健康判定（首屏顶部用） */
.health-verdict {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 18px 22px;
  align-items: center;
  margin-bottom: 14px;
}
.health-verdict.crit { border-left: 6px solid var(--c-red); }
.health-verdict.warn { border-left: 6px solid var(--c-yellow); }
.health-verdict.ok   { border-left: 6px solid #d1d5db; }
.verdict-label { font-size: 13px; color: var(--c-text-3); margin-bottom: 4px; }
.verdict-headline { font-size: 22px; font-weight: 700; color: var(--c-text); }
.verdict-headline.crit { color: var(--c-red); }
.verdict-headline.warn { color: #b45309; }
.verdict-sub { font-size: 13px; color: var(--c-text-2); margin-top: 4px; }
.verdict-actions { display: flex; gap: 8px; flex-direction: column; }

/* Tab 组件 */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 16px;
  gap: 0;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--c-text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  user-select: none;
}
.tab:hover { color: var(--c-primary); }
.tab.active {
  color: var(--c-primary);
  font-weight: 600;
  border-bottom-color: var(--c-primary);
}
.tab-badge {
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 500;
}
.tab-badge.gray { background: var(--c-gray); }

/* 横向时间线（swim lane） */
.swim-lane {
  position: relative;
  height: 120px;
  background: #fafbfc;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 12px 0;
}
.swim-lane-axis {
  position: absolute;
  left: 30px; right: 30px;
  top: 50%;
  height: 2px;
  background: #e5e7eb;
  transform: translateY(-50%);
}
.swim-lane-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: var(--c-text-3);
  padding-top: 18px;
}
.swim-lane-tick::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 1px; height: 8px;
  background: #d1d5db;
  transform: translateX(-50%);
}
.swim-event {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-primary);
  cursor: pointer;
  z-index: 2;
}
.swim-event.crit { background: var(--c-red); box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
.swim-event.warn { background: var(--c-yellow); box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.swim-event.ok   { background: #9ca3af; }
.swim-event:hover { transform: translate(-50%, -50%) scale(1.4); }
.swim-event-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
  color: var(--c-text-2);
  margin-top: 6px;
  background: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--c-border);
  pointer-events: none;
}

/* 操作菜单（替代多链接挤一起） */
.action-menu {
  position: relative;
  display: inline-block;
}
.action-trigger {
  cursor: pointer;
  font-size: 12px;
  color: var(--c-primary);
  padding: 2px 6px;
}

/* 危险按钮 */
.btn.danger-action {
  background: #fff;
  border-color: var(--c-red);
  color: var(--c-red);
}
.btn.danger-action::before {
  content: "⚠ ";
}
.btn.danger-action:hover {
  background: var(--c-red-bg);
}

/* 自指 banner — 当前页提示用浅蓝色不可点 */
.banner.self {
  background: #f0f9ff;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* 卡片去重叠 - 正常项 dim 化 */
.cap-card.cap-ok .cap-card-status { display: none; }
.cap-card.cap-ok .cap-card-status-row { opacity: 0.7; }

/* 紧凑 KPI 行 - 字号修正 */
.kpi-compact .lbl { font-size: 12px; }
.kpi-compact .val { font-size: 20px; }
.kpi-compact .dlt { font-size: 11px; }

/* 业务能力卡 metric 字号 */
.cap-metric-label { font-size: 11px; }
.cap-metric-value { font-size: 14px; }

/* 实体流式视图 - "当前页"块的明确高亮 */
.flow-block.current {
  background: linear-gradient(135deg, var(--c-primary) 0%, #6366f1 100%);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.flow-block.current .flow-label { color: rgba(255,255,255,0.85); }
.flow-block.current .flow-main { color: #fff; }
.flow-block.current .flow-sub { color: rgba(255,255,255,0.9); }
.flow-block.current::before {
  content: "当前位置";
  position: absolute;
  top: -10px; right: 8px;
  background: #fff;
  color: var(--c-primary);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--c-primary);
}
.flow-block { position: relative; }

/* 空状态 / 提示横幅 */
.banner {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner.info { background: var(--c-primary-bg); color: var(--c-primary); border: 1px solid #c7d2fe; }
.banner.warn { background: var(--c-yellow-bg); color: #b45309; border: 1px solid #fcd34d; }
.banner.crit { background: var(--c-red-bg); color: var(--c-red); border: 1px solid #fca5a5; }
