/* traceability 页 traceability-dashboard 模块样式（自 page-traceability.css 按业务边界抽出） */
.traceability-redesign .dashboard-section { padding: var(--wk-space-4) 0; }
.traceability-redesign .pipeline {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--wk-space-2);
  flex-wrap: wrap;
}
.traceability-redesign .dash-node {
  position: relative;
  font: inherit;
  background: var(--wk-surface);
  border: 2px solid var(--wk-border-soft);
  border-radius: var(--wk-radius-16);
  padding: var(--wk-space-2xl) var(--wk-space-1);
  min-width: 140px;
  max-width: 175px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
  flex: 1;
}
.traceability-redesign .dash-node:hover, .traceability-redesign .dash-node.active {
  border-color: var(--wk-brand);
  background: var(--wk-brand-light);
  box-shadow: 0 4px 24px var(--wk-brand-tint-sm);
  transform: translateY(-2px);
}
.traceability-redesign .dash-node-status {
  width: 10px; height: 10px;
  border-radius: var(--wk-radius-circle);
  background: var(--wk-success);
  margin: 0 auto var(--wk-space-md);
  box-shadow: 0 0 6px var(--wk-success-overlay);
  animation: dash-pulse 2s infinite;
}
.traceability-redesign .dash-node-status.warn { background: var(--wk-warning); box-shadow: 0 0 6px var(--wk-warning-overlay); }
@keyframes dash-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.traceability-redesign .dash-node-label { font-size: var(--wk-text-md); font-weight: 700; color: var(--wk-ink); margin-bottom: var(--wk-space-xs); }
.traceability-redesign .dash-node-meta { font-size: var(--wk-text-xs); color: var(--wk-text-light); }
.traceability-redesign .dash-arrow {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wk-text-light);
  font-size: var(--wk-text-lg);
  z-index: 1;
}
.traceability-redesign .dash-panel {
  background: var(--wk-gray-bg);
  border: 1.5px solid var(--wk-border-soft);
  border-radius: var(--wk-radius-20);
  padding: var(--wk-space-2);
  min-height: 380px;
  display: none;
}
.traceability-redesign .dash-panel.active { display: block; animation: dash-fadeIn 0.4s; }
@keyframes dash-fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.traceability-redesign .dash-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wk-space-3xl);
  padding-bottom: var(--wk-space-1);
  border-bottom: 1px solid var(--wk-border-soft);
  flex-wrap: wrap;
  gap: var(--wk-space-md);
}
.traceability-redesign .dash-panel-title { font-size: var(--wk-text-h2); font-weight: 700; color: var(--wk-ink); }
.traceability-redesign .dash-panel-badge {
  background: var(--wk-brand-light);
  color: var(--wk-brand-text);
  border: 1px solid var(--wk-brand-tint-lg);
  padding: var(--wk-space-sm) var(--wk-space-lg);
  border-radius: var(--wk-radius-pill);
  font-size: var(--wk-text-sm);
  font-weight: 600;
}
.traceability-redesign .dash-panel-badge.warn { background: var(--wk-warning-light); color: var(--wk-warning-text); border-color: var(--wk-cat-amber-tint-4); }
.traceability-redesign .dash-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wk-space-2xl);
}
.traceability-redesign .dash-data-card {
  background: var(--wk-surface);
  border: 1px solid var(--wk-border-soft);
  border-radius: var(--wk-radius-14);
  padding: var(--wk-space-2xl);
}
.traceability-redesign .dash-data-card h4 {
  font-size: var(--wk-text-sm);
  color: var(--wk-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--wk-space-lg);
  font-weight: 600;
}
.traceability-redesign .dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wk-text-md);
}
.traceability-redesign .dash-table th {
  text-align: left;
  padding: var(--wk-space-md) var(--wk-space-lg);
  color: var(--wk-text-light);
  font-weight: 600;
  border-bottom: 1px solid var(--wk-border-soft);
  font-size: var(--wk-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.traceability-redesign .dash-table td {
  padding: var(--wk-space-md) var(--wk-space-lg);
  border-bottom: 1px solid var(--wk-gray-bg);
  color: var(--wk-text-secondary);
}
.traceability-redesign .dash-tag {
  display: inline-block;
  padding: var(--wk-space-xs) var(--wk-space-md);
  border-radius: var(--wk-radius-6);
  font-size: var(--wk-text-xs);
  font-weight: 500;
}
.traceability-redesign .dash-tag-ok { background: var(--wk-success-light); color: var(--wk-success-text); }
.traceability-redesign .dash-tag-warn { background: var(--wk-warning-light); color: var(--wk-warning-text); }
.traceability-redesign .dash-chart-box {
  width: 100%;
  height: 200px;
  position: relative;
}
.traceability-redesign .dash-chart-box canvas { width: 100%; height: 100%; }
.traceability-redesign .dash-machine-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--wk-space-lg) 0;
  border-bottom: 1px solid var(--wk-gray-bg);
}
.traceability-redesign .dash-machine-item:last-child { border-bottom: none; }
.traceability-redesign .dash-machine-name { font-weight: 600; font-size: var(--wk-text-md); color: var(--wk-ink); }
.traceability-redesign .dash-machine-id { font-size: var(--wk-text-xs); color: var(--wk-text-light); margin-top: var(--wk-space-xs); }
.traceability-redesign .dash-machine-val { text-align: right; font-family: var(--wk-font-sans); }
.traceability-redesign .dash-val-num { font-size: var(--wk-text-h2); font-weight: 800; }
.traceability-redesign .dash-val-good { color: var(--wk-success-text); }
.traceability-redesign .dash-val-warn { color: var(--wk-warning-text); }
.traceability-redesign .dash-val-bad { color: var(--wk-danger-text); }
.traceability-redesign .dash-val-label { font-size: var(--wk-text-xs); color: var(--wk-text-light); margin-top: var(--wk-space-xs); }
.traceability-redesign .dash-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--wk-space-md);
  padding: var(--wk-space-lg) var(--wk-space-1);
  background: var(--wk-warning-light);
  border: 1px solid var(--wk-cat-amber-tint-4);
  border-radius: var(--wk-radius-12);
  margin-top: var(--wk-space-1);
}
.traceability-redesign .dash-alert-icon { font-size: var(--wk-text-h2); flex-shrink: 0; }
.traceability-redesign .dash-alert-title { font-weight: 700; font-size: var(--wk-text-md); color: var(--wk-warning-text); }
.traceability-redesign .dash-alert-desc { font-size: var(--wk-text-sm); color: var(--wk-text-secondary); margin-top: var(--wk-space-xs); line-height: var(--wk-leading); }
.traceability-redesign .dash-lineage {
  font-family: var(--wk-font-sans);
  font-size: var(--wk-text-sm);
  line-height: 2.2;
  color: var(--wk-text-secondary);
}
.traceability-redesign .dash-lineage .lt { color: var(--wk-brand-text); font-weight: 700; }
.traceability-redesign .dash-empty {
  text-align: center;
  padding: var(--wk-space-4) var(--wk-space-1);
  color: var(--wk-text-light);
  font-size: var(--wk-text-body);
}
.traceability-redesign .dash-empty-icon { font-size: var(--wk-text-display-lg); margin-bottom: var(--wk-space-lg); }
.traceability-redesign .dash-empty-hint { font-size: var(--wk-text-sm); color: var(--wk-border-mid); margin-top: var(--wk-space-sm); }
.traceability-redesign .dash-phase-label {
  display: flex;
  gap: var(--wk-space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--wk-space-2xl);
}
.traceability-redesign .dash-phase-label span {
  font-size: var(--wk-text-xs);
  font-weight: 600;
  color: var(--wk-text-secondary);
  padding: var(--wk-space-xs) var(--wk-space-lg);
  border-radius: var(--wk-radius-pill);
  background: var(--wk-surface);
  border: 1px solid var(--wk-border-soft);
}
.traceability-redesign .dash-phase-label .p-pre { border-color: var(--wk-phase-1); color: var(--wk-phase-1-text); }
.traceability-redesign .dash-phase-label .p-mid { border-color: var(--wk-phase-2); color: var(--wk-phase-2-text); }
.traceability-redesign .dash-phase-label .p-post { border-color: var(--wk-phase-3); color: var(--wk-phase-3-text); }
@media (max-width: 900px) {
.traceability-redesign .dash-data-grid { grid-template-columns: 1fr; }
.traceability-redesign .pipeline { flex-direction: column; align-items: stretch; }
.traceability-redesign .dash-node { max-width: 100%; }
.traceability-redesign .dash-arrow { transform: rotate(90deg); margin: var(--wk-space-xs) auto; }
}
.traceability-redesign .dash-chart-note { margin-top: var(--wk-space-md); font-size: var(--wk-text-xs); color: var(--wk-text-secondary); line-height: var(--wk-leading); }
.traceability-redesign .dash-chart-note--wide { line-height: var(--wk-leading); }
.traceability-redesign .dash-stat-ok { color: var(--wk-success-text); font-weight: 600; }
.traceability-redesign .dash-stat-good { color: var(--wk-success-text); font-weight: 700; }
.traceability-redesign .dash-stat-warn { color: var(--wk-warning-text); font-weight: 700; }
.traceability-redesign .dash-stat-bad { color: var(--wk-danger-text); font-weight: 700; }
.traceability-redesign .dash-r2-box { margin-top: var(--wk-space-sm); padding: var(--wk-space-sm) var(--wk-space-md); background: var(--wk-brand-light); border-radius: var(--wk-radius-6); display: inline-block; }
.traceability-redesign .dash-r2-val { color: var(--wk-brand-text); font-weight: 700; }
.traceability-redesign .dash-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; gap: var(--wk-space-lg); }
.traceability-redesign .dash-qr-code { width: 110px; height: 110px; background: var(--wk-white); /* QR 白纸：暗色下保持白色保证可扫 */ padding: var(--wk-space-sm); border-radius: var(--wk-radius-8); border: 1px solid var(--wk-border-soft); }
.traceability-redesign .dash-qr-svg { width: 100%; height: 100%; }
.traceability-redesign .dash-qr-svg rect { fill: var(--wk-navy); }
.traceability-redesign .dash-udi { font-size: var(--wk-text-xs); color: var(--wk-text-light); font-family: var(--wk-font-sans); }
.traceability-redesign .dash-lineage-note { margin-top: var(--wk-space-lg); font-size: var(--wk-text-xs); color: var(--wk-text-secondary); line-height: var(--wk-leading); }
