/**
 * @fileoverview Versioning Workflow CSS
 * Gitflow-like infographic visualization following ISO 19650 CDE standards
 * Design reference: docs/CDE_Flow_v5.html
 * Updated: Professional, muted color palette with smooth transitions
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   Using design system variables with muted overrides
   ============================================ */
:root {
  /* Base colors - muted, professional */
  --vw-bg: var(--bg-light, #f5f6f8);
  --vw-surface: var(--bg-surface, #ffffff);
  --vw-sf: var(--gray-50, #f8f9fa);
  --vw-canvas: var(--bg-surface, #ffffff);
  --vw-bd: var(--border-color, #e5e7eb);
  --vw-bd2: var(--gray-300, #d1d5db);
  --vw-text: var(--text-color, #1f2937);
  --vw-text2: var(--text-secondary, #4b5563);
  --vw-muted: var(--text-muted, #6b7280);
  --vw-muted2: var(--gray-400, #9ca3af);

  /* Zone colors - SUBTLE, not flashy */
  /* PUBLISHED: Muted emerald green */
  --vw-published: var(--cde-publish, #15803d);
  --vw-published-light: #d1ede2;
  --vw-published-bg: #f0f9f5;

  /* SHARED: Muted teal blue */
  --vw-shared: var(--cde-shared, #2563eb);
  --vw-shared-light: #d0e8f2;
  --vw-shared-bg: #eef6fa;

  /* WIP: Muted slate blue */
  --vw-wip: var(--cde-wip, #7c3aed);
  --vw-wip-light: #d9dfe8;
  --vw-wip-bg: #f2f4f7;

  /* ARCHIVE: Muted gray-purple */
  --vw-archive: var(--gray-500, #6b7280);
  --vw-archive-light: #e2e3e7;
  --vw-archive-bg: #f3f4f6;

  /* Status colors - subdued */
  --vw-warn: #b8860b;
  --vw-blocked: #a85454;
  --vw-success: #4a9d6b;
  --vw-info: #3b82a8;

  /* Role colors - more muted */
  --vw-role-kt: #5b6b8c;
  --vw-role-kc: #2563eb;
  --vw-role-mep: #a67c3b;
  --vw-role-tc: #3b8a8a;
  --vw-role-rel: #a67c3b;
  --vw-role-cdt: #4a9d6b;
  --vw-role-bim: #3b82a8;
  --vw-role-sys: #7c7f8c;

  /* Edge colors - muted tones */
  --vw-edge-spine: var(--cde-shared, #2563eb);
  --vw-edge-branch: var(--text-secondary, #4b5563);
  --vw-edge-merge: var(--cde-publish, #15803d);
  --vw-edge-archive: var(--gray-500, #6b7280);

  /* Status states */
  --vw-status-s0: #5b6b8c;
  --vw-status-s1: #3b82a8;
  --vw-status-s2: #3b82a8;
  --vw-status-s3: #3b82a8;
  --vw-status-s4: #b8860b;
  --vw-status-a1: #4a9d6b;
  --vw-status-b1: #a85454;

  /* Typography - use design system variables */
  --vw-font: var(--font-family-primary, 'FZ Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --vw-font-mono: var(--font-family-mono, 'FZ Poppins', monospace);
  --vw-radius: 4px;
  --vw-radius-lg: 8px;

  /* Layout */
  --vw-sidebar-width: 220px;
  --vw-panel-width: 300px;
  --vw-topbar-height: 48px;

  /* Transitions */
  --vw-transition: 0.2s ease;
  --vw-transition-slow: 0.3s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
.vw-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--vw-bg);
  font-family: var(--vw-font);
  font-size: var(--font-size-base, 13px);
  color: var(--vw-text);
}

/* ============================================
   TOPBAR
   ============================================ */
.vw-topbar {
  height: var(--vw-topbar-height);
  position: relative;
  z-index: 5;
  background: var(--vw-surface);
  border-bottom: 1px solid var(--vw-bd);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vw-proj-name {
  font: 600 var(--font-size-base) var(--vw-font);
  color: var(--vw-text);
}

.vw-badge {
  font: 600 var(--font-size-xs) var(--vw-font);
  color: #fff;
  background: var(--vw-wip);
  padding: 3px 8px;
  border-radius: var(--vw-radius);
  letter-spacing: 0.03em;
}

.vw-sep {
  width: 1px;
  height: 20px;
  background: var(--vw-bd2);
  flex-shrink: 0;
}

.vw-meta {
  font: 400 var(--font-size-sm) var(--vw-font);
  color: var(--vw-muted);
}

.vw-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button styles */
.vw-btn {
  border: 1px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  padding: 6px 12px;
  font: 500 var(--font-size-sm) var(--vw-font);
  background: var(--vw-surface);
  color: var(--vw-text2);
  cursor: pointer;
  transition: all var(--vw-transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vw-btn:hover {
  background: var(--vw-bd);
  color: var(--vw-text);
  border-color: var(--vw-muted2);
}

.vw-btn:active {
  transform: scale(0.98);
}

/* Segment control */
.vw-seg {
  display: inline-flex;
  border: 1px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  overflow: hidden;
  background: var(--vw-surface);
}

.vw-seg button {
  border: none;
  border-right: 1px solid var(--vw-bd2);
  padding: 5px 12px;
  font: 500 var(--font-size-sm) var(--vw-font);
  background: transparent;
  color: var(--vw-text2);
  cursor: pointer;
  transition: all var(--vw-transition);
  white-space: nowrap;
}

.vw-seg button:last-child {
  border-right: none;
}

.vw-seg button.on {
  background: var(--vw-text);
  color: #fff;
}

.vw-seg button:not(.on):hover {
  background: var(--vw-bd);
}

/* ============================================
   LAYOUT
   ============================================ */
.vw-layout {
  display: flex;
  height: calc(100vh - var(--vw-topbar-height));
  padding-top: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.vw-version-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vw-version-view {
  flex: 1;
  overflow: hidden;
}

.vw-tabs {
  border-bottom: 1px solid var(--border-color, var(--vw-bd));
}

.vw-dashboard-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  background: var(--vw-sf);
  height: 100%;
  overflow-y: auto;
}

.vw-dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vw-dashboard-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vw-dashboard-title {
  font-size: var(--font-size-lg, 16px);
  font-weight: 600;
  color: var(--vw-text);
}

.vw-dashboard-sub {
  font-size: var(--font-size-sm, 12px);
  color: var(--vw-muted);
}

.vw-dashboard-board {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr 1.15fr;
  gap: 12px;
  padding: 0 12px 12px;
}

.vw-dash-panel {
  border: 1px solid var(--border-color, var(--vw-bd));
  border-radius: 8px;
  background: var(--bg-surface, var(--vw-surface));
  padding: 12px;
  min-width: 0;
}

.vw-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 0;
}

.vw-kpi-card.alert {
  border-color: #f0b0a8;
}

.vw-mini-activity {
  min-height: 100%;
}

.vw-dash-table {
  width: 100%;
}

.vw-dash-empty {
  color: var(--text-muted, var(--vw-muted));
  font-size: var(--font-size-sm, 12px);
  padding: 10px 0;
}

.vw-kpi-card {
  text-align: left;
  cursor: pointer;
}

.vw-chart-host {
  margin-top: 10px;
}

.vw-metric-row {
  display: grid;
  grid-template-columns: 86px 1fr 38px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.vw-metric-row:last-child {
  margin-bottom: 0;
}

.vw-metric-label,
.vw-metric-value {
  font-size: var(--font-size-sm, 12px);
  color: var(--vw-text2);
}

.vw-metric-track {
  height: 8px;
  border-radius: 999px;
  background: var(--gray-100, #f3f4f6);
  overflow: hidden;
}

.vw-metric-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary, #2563eb);
}

.vw-zone-chart-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
}

.vw-donut {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto;
}

.vw-donut-track,
.vw-donut-segment {
  fill: none;
  stroke-width: 12;
}

.vw-donut-track {
  stroke: var(--gray-200, #e5e7eb);
}

.vw-donut-segment {
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  stroke-linecap: butt;
}

.vw-donut-total {
  font-family: var(--font-family-mono);
  font-size: 18px;
  font-weight: 700;
  fill: var(--vw-text);
}

.vw-donut-caption {
  font-size: 10px;
  fill: var(--vw-muted);
}

.vw-alert-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 18px;
  min-height: 180px;
}

.vw-alert-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vw-alert-bar-wrap {
  height: 130px;
  width: 46px;
  display: flex;
  align-items: flex-end;
}

.vw-alert-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: var(--gray-300, #d1d5db);
}

.vw-alert-bar.danger {
  background: var(--color-danger, #dc2626);
}

.vw-alert-bar.warning {
  background: var(--color-warning, #d97706);
}

.vw-alert-bar-value {
  font-family: var(--font-family-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--vw-text);
}

.vw-alert-bar-label {
  font-size: 11px;
  color: var(--vw-text2);
  text-align: center;
}

/* ============================================
   LEFT SIDEBAR (FILTER TREE)
   ============================================ */
.vw-sidebar {
  width: var(--vw-sidebar-width);
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--vw-surface);
  border-right: 1px solid var(--vw-bd);
  display: flex;
  flex-direction: column;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.vw-sidebar::-webkit-scrollbar {
  width: 4px;
}

.vw-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.vw-sidebar::-webkit-scrollbar-thumb {
  background: var(--vw-bd2);
  border-radius: 2px;
}

.vw-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--vw-muted2);
}

.vw-sb-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--vw-bd);
  font: 600 11px var(--vw-font);
  color: var(--vw-text);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  text-transform: uppercase;
  background: var(--vw-sf);
}

.vw-sb-filters {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--vw-bd);
  background: var(--vw-sf);
}

.vw-sb-lbl {
  font-size: var(--font-size-xs, 11px);
  font-weight: 600;
  color: var(--vw-text2);
}

.vw-sb-select,
.vw-sb-search {
  height: 32px;
  border: 1px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  padding: 0 8px;
  font: 500 var(--font-size-sm) var(--vw-font);
  color: var(--vw-text);
  background: #fff;
}

.vw-sb-search:focus,
.vw-sb-select:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.vw-sb-skeleton {
  padding: 12px;
}

.vw-skel-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef1f5 0%, #dfe5ec 50%, #eef1f5 100%);
  background-size: 240px 100%;
  animation: vw-skel-move 1.2s linear infinite;
  margin-bottom: 8px;
}

.vw-skel-line.short {
  width: 60%;
}

.vw-sb-error {
  margin: 12px;
  padding: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: var(--vw-radius);
  font-size: var(--font-size-sm, 12px);
}

.vw-sb-head-acts {
  display: flex;
  gap: 4px;
}

.vw-sb-act {
  font: 500 10px var(--vw-font);
  color: var(--vw-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  border: none;
  background: transparent;
  transition: all var(--vw-transition);
}

.vw-sb-act:hover {
  color: var(--vw-text);
  background: var(--vw-bd);
}

.vw-sb-section {
  border-bottom: 1px solid var(--vw-bd);
}

.vw-sb-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background var(--vw-transition);
  border-left: 3px solid transparent;
}

.vw-sb-zone:hover {
  background: var(--vw-bd);
}

.vw-sb-zone.active {
  background: var(--vw-wip-bg);
  border-left-color: var(--vw-wip);
}

.vw-sb-zone-chv {
  font-size: 10px;
  color: var(--vw-muted);
  transition: transform var(--vw-transition);
  line-height: 1;
  flex-shrink: 0;
}

.vw-sb-zone-chv.collapsed {
  transform: rotate(-90deg);
}

.vw-sb-zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.vw-sb-zone-dot.published { background: var(--vw-published); }
.vw-sb-zone-dot.shared { background: var(--vw-shared); }
.vw-sb-zone-dot.wip { background: var(--vw-wip); }
.vw-sb-zone-dot.archive { background: var(--vw-archive); }

.vw-sb-zone-lbl {
  font: 500 12px var(--vw-font);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--vw-text);
}

.vw-sb-zone-cnt {
  font: 400 11px var(--vw-font);
  color: var(--vw-muted);
  flex-shrink: 0;
}

.vw-sb-zone-cb {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--vw-wip);
}

.vw-sb-sub {
  padding-left: 20px;
  background: var(--vw-sf);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--vw-transition-slow);
}

.vw-sb-sub.expanded {
  max-height: 500px;
}

.vw-sb-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  cursor: pointer;
  user-select: none;
  transition: background var(--vw-transition);
}

.vw-sb-sub-item:hover {
  background: var(--vw-bd);
}

.vw-sb-sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vw-sb-sub-lbl {
  font: 400 12px var(--vw-font);
  flex: 1;
  color: var(--vw-text2);
}

.vw-sb-sub-cnt {
  font: 400 11px var(--vw-font);
  color: var(--vw-muted);
  flex-shrink: 0;
}

.vw-sb-sub-cb {
  width: 13px;
  height: 13px;
  cursor: pointer;
  accent-color: var(--vw-wip);
}

.vw-sb-empty {
  font: 400 9px var(--vw-font-mono);
  color: var(--vw-muted2);
  padding: 4px 12px 4px 22px;
  font-style: italic;
}

/* Group-by at bottom of sidebar */
.vw-sb-footer {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--vw-bd);
  flex-shrink: 0;
}

.vw-sb-footer-lbl {
  font: 600 9px var(--vw-font-mono);
  color: var(--vw-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.vw-sb-grp-btn {
  width: 100%;
  text-align: left;
  padding: 4px 8px;
  margin-bottom: 3px;
  font: 500 10px var(--vw-font-mono);
  border: 1px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  background: var(--vw-sf);
  color: var(--vw-text2);
  cursor: pointer;
}

.vw-sb-grp-btn.on {
  background: var(--vw-wip);
  border-color: var(--vw-wip);
  color: #fff;
}

.vw-sb-grp-btn:not(.on):hover {
  background: var(--vw-bd);
  color: var(--vw-text);
}

/* ============================================
   CANVAS AREA
   ============================================ */
.vw-canvas {
  flex: 1;
  position: relative;
  overflow: auto;
  cursor: default;
  height: 100%;
  box-sizing: border-box;
  background: var(--bg-surface, #fff);
}

.vw-viewport {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.vw-wf-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  z-index: 10;
}

.vw-wf-skeleton {
  width: min(520px, 70%);
}

.vw-wf-skel {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef1f5 0%, #dfe5ec 50%, #eef1f5 100%);
  background-size: 260px 100%;
  animation: vw-skel-move 1.2s linear infinite;
  margin-bottom: 10px;
}

.vw-wf-skel.short {
  width: 55%;
}

.vw-wf-error,
.vw-wf-empty {
  padding: 10px 12px;
  border-radius: var(--vw-radius);
  border: 1px solid var(--vw-bd2);
  background: #fff;
  color: var(--vw-text2);
  font-size: var(--font-size-sm, 12px);
}

.vw-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

/* Timeline controls - positioned at top right, outside the chart */
.vw-tl-bar {
  position: absolute;
  top: 10px;
  right: 80px;
  background: var(--vw-surface);
  border: 1px solid var(--vw-bd);
  border-radius: var(--vw-radius-lg);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vw-tl-lbl {
  font: 500 11px var(--vw-font);
  color: var(--vw-muted);
  flex-shrink: 0;
}

/* Zoom bar */
.vw-zbar {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 50;
  background: var(--vw-sf);
  border: 1px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
}

.vw-zbar button {
  border: none;
  background: transparent;
  padding: 2px 7px;
  font-size: 14px;
  cursor: pointer;
  color: var(--vw-text2);
  border-radius: 2px;
}

.vw-zbar button:hover {
  background: var(--vw-bd);
  color: var(--vw-text);
}

.vw-zlbl {
  font: 400 10px var(--vw-font-mono);
  color: var(--vw-muted);
  min-width: 38px;
  text-align: center;
}

/* Minimap */
.vw-minimap {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 50;
  background: var(--vw-surface);
  border: 1px solid var(--vw-bd);
  border-radius: var(--vw-radius-lg);
  width: 160px;
  height: 80px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.vw-minimap-vp {
  position: absolute;
  border: 2px solid var(--vw-wip);
  border-radius: 2px;
  pointer-events: none;
  top: 0;
  left: 0;
  background: rgba(91, 107, 140, 0.1);
}

/* Edge Legend */
.vw-legend {
  position: absolute;
  bottom: 12px;
  left: 190px;
  z-index: 50;
  background: var(--vw-surface);
  border: 1px solid var(--vw-bd);
  border-radius: var(--vw-radius-lg);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.vw-legend-title {
  font: 600 10px var(--vw-font);
  color: var(--vw-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vw-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vw-legend-line {
  width: 32px;
  height: 12px;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.vw-legend-lbl {
  font: 400 11px var(--vw-font);
  color: var(--vw-text2);
}

/* ============================================
   CANVAS ELEMENTS - NODES
   ============================================ */
.vw-node {
  position: absolute;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 9px var(--vw-font);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  z-index: 10;
  transition: all var(--vw-transition);
}

.vw-node:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.vw-node.selected {
  outline: 3px solid var(--vw-text2);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(91, 107, 140, 0.3);
}

.vw-node-badge {
  position: absolute;
  z-index: 20;
  font: 500 9px var(--vw-font);
  padding: 2px 6px;
  border-radius: var(--vw-radius);
  background: var(--vw-blocked);
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.vw-version-tag {
  position: absolute;
  font: 500 9px var(--vw-font);
  padding: 2px 6px;
  border-radius: var(--vw-radius);
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Lane header */
.vw-lane-header {
  position: absolute;
  left: 0;
  z-index: 15;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: stretch;
}

.vw-lane-header-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-right: 2px solid;
  border-top: 1px solid var(--vw-bd);
  border-bottom: 1px solid var(--vw-bd);
  background: var(--vw-surface);
  transition: background var(--vw-transition);
}

.vw-lane-header-inner:hover {
  background: var(--vw-sf);
}

.vw-lane-chv {
  font-size: 10px;
  color: var(--vw-muted);
  transition: transform var(--vw-transition);
  flex-shrink: 0;
  line-height: 1;
}

.vw-lane-chv.collapsed {
  transform: rotate(-90deg);
}

.vw-lane-tag {
  font: 600 10px var(--vw-font);
}

.vw-lane-name {
  font: 400 11px var(--vw-font);
  color: var(--vw-text2);
}

.vw-lane-cnt {
  font: 400 10px var(--vw-font);
  color: var(--vw-muted);
}

/* Phase labels */
.vw-phase-label {
  position: absolute;
  font: 400 10px var(--vw-font);
  color: var(--vw-muted2);
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================
   RIGHT PANEL
   ============================================ */
.vw-panel {
  width: 0;
  flex-shrink: 0;
  overflow: hidden;
  border-left: 1.5px solid var(--cde-border, var(--vw-bd));
  background: var(--cde-surface, var(--vw-surface));
  transition: width var(--vw-transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.vw-panel.open {
  width: var(--vw-panel-width);
}

.vw-panel-header {
  padding: 16px 18px 14px;
  border-bottom: 1.5px solid var(--cde-border, var(--vw-bd));
  background: var(--cde-s2, var(--vw-sf));
  flex-shrink: 0;
}

.vw-ph-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.vw-ph-zone {
  font: 700 10px var(--vw-font);
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}

.vw-ph-title {
  font: 600 13px var(--vw-font);
  line-height: 1.4;
  flex: 1;
  color: var(--vw-text);
}

.vw-ph-close {
  border: 1.5px solid var(--cde-border, var(--vw-bd2));
  border-radius: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  font: 500 11px var(--vw-font);
  background: var(--cde-surface, transparent);
  color: var(--cde-muted, var(--vw-text2));
  cursor: pointer;
  transition: all var(--vw-transition);
}

.vw-ph-close:hover {
  background: var(--vw-bd);
  color: var(--vw-text);
}

.vw-ph-sub {
  font: 400 12px var(--vw-font);
  color: var(--vw-muted);
  line-height: 1.5;
}

.vw-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
}

.vw-panel-body::-webkit-scrollbar {
  width: 4px;
}

.vw-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.vw-panel-body::-webkit-scrollbar-thumb {
  background: var(--vw-bd2);
  border-radius: 2px;
}

/* Panel sections */
.vw-ps {
  margin-bottom: 16px;
}

.vw-ps-h {
  font-size: var(--cde-fs-xs, 11px);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cde-muted, var(--vw-muted));
  border-bottom: 1px solid var(--cde-border, var(--vw-bd));
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.vw-pg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.vw-pc {
  background: var(--cde-s2, var(--vw-surface));
  border: 1px solid var(--cde-border, var(--vw-bd));
  border-radius: 5px;
  padding: 9px 11px;
}

.vw-pc.full {
  grid-column: 1 / -1;
}

.vw-pl {
  font: 400 11px var(--vw-font);
  color: var(--vw-muted);
  margin-bottom: 4px;
}

.vw-pv {
  font: 500 12px var(--vw-font);
  color: var(--vw-text);
}

.vw-psb {
  font: 400 12px var(--vw-font);
  color: var(--vw-text2);
  margin-top: 4px;
}

/* Status chips - muted colors */
.vw-chip {
  display: inline-flex;
  font: 500 10px var(--vw-font);
  padding: 3px 8px;
  border-radius: var(--vw-radius);
  border: 1px solid;
}

.vw-chip-s0 {
  color: var(--vw-status-s0);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.vw-chip-s1,
.vw-chip-s2,
.vw-chip-s3 {
  color: var(--vw-status-s1);
  border-color: #cbd5e1;
  background: #f8fafc;
}

.vw-chip-s4 {
  color: var(--vw-status-s4);
  border-color: #e2d5a3;
  background: #fdfbf3;
}

.vw-chip-a1 {
  color: var(--vw-status-a1);
  border-color: #b4dcc4;
  background: #f4faf7;
}

.vw-chip-b1 {
  color: var(--vw-status-b1);
  border-color: #e2b4b4;
  background: #fdf5f5;
}

/* Version history row */
.vw-vrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.vw-vn {
  display: flex;
  align-items: center;
}

.vw-vdot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 7px var(--vw-font-mono);
}

.vw-vline {
  width: 7px;
  height: 1.5px;
  background: var(--vw-bd);
}

.vw-vp-s .vw-vdot {
  border-color: var(--vw-bd2);
  color: var(--vw-muted);
  background: var(--vw-bg);
}

.vw-vc-s .vw-vdot {
  border-color: var(--vw-wip);
  color: var(--vw-wip);
  background: #eff6ff;
}

.vw-vf-s .vw-vdot {
  border-color: var(--vw-published);
  color: var(--vw-published);
  background: #f0fdf4;
}

/* Access roles */
.vw-ar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--vw-bd);
  font-size: 10px;
}

.vw-ar:last-child {
  border: none;
}

.vw-ar-role {
  flex: 1;
  color: var(--vw-text2);
}

.vw-ar-p {
  font: 600 9px var(--vw-font-mono);
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid;
}

.vw-pf {
  color: var(--vw-published);
  border-color: #86efac;
  background: #f0fdf4;
}

.vw-pe {
  color: var(--vw-wip);
  border-color: #93c5fd;
  background: #eff6ff;
}

.vw-pvc {
  color: var(--vw-text2);
  border-color: var(--vw-bd2);
  background: var(--vw-bg);
}

.vw-pa {
  color: var(--vw-warn);
  border-color: #fcd34d;
  background: #fffbeb;
}

.vw-pn {
  color: var(--vw-blocked);
  border-color: #fca5a5;
  background: #fef2f2;
}

.vw-pu {
  color: #6d28d9;
  border-color: #c4b5fd;
  background: #f5f3ff;
}

/* Connection items */
.vw-ci {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  border-radius: var(--vw-radius);
  cursor: pointer;
  font-size: 10px;
  color: var(--vw-text2);
  margin-bottom: 2px;
}

.vw-ci:hover {
  background: var(--vw-bd);
  color: var(--vw-text);
}

.vw-ci-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vw-ci-lbl {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vw-ci-tp {
  font: 400 8px var(--vw-font-mono);
  color: var(--vw-muted);
  flex-shrink: 0;
}

/* Warning box */
.vw-bwarn {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--vw-radius);
  padding: 7px 9px;
  font-size: 10px;
  color: var(--vw-blocked);
  margin-bottom: 8px;
}

/* Note box */
.vw-notebox {
  background: var(--vw-bg);
  border: 1px solid var(--vw-bd);
  border-left: 2px solid var(--vw-bd2);
  border-radius: var(--vw-radius);
  padding: 7px 10px;
  font-size: 11px;
  color: var(--vw-text2);
  line-height: 1.6;
}

.vw-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vw-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: var(--vw-radius);
  font-size: var(--font-size-sm, 12px);
  color: #1d4ed8;
  text-decoration: none;
}

.vw-link:hover {
  background: #dbeafe;
}

.vw-extra {
  border: 1px solid var(--cde-border, var(--vw-bd));
  border-radius: 5px;
  background: var(--cde-surface, var(--vw-surface));
  margin-bottom: 10px;
}

.vw-extra summary {
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vw-text2);
}

.vw-extra[open] summary {
  border-bottom: 1px solid var(--cde-border, var(--vw-bd));
}

@media (max-width: 1280px) {
  .vw-dashboard-board {
    grid-template-columns: 1fr 1fr;
  }

  .vw-zone-chart-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .vw-dashboard-board {
    grid-template-columns: 1fr;
  }
}

@keyframes vw-skel-move {
  0% { background-position: 240px 0; }
  100% { background-position: -240px 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .vw-sidebar {
    width: 180px;
  }
  
  .vw-panel.open {
    width: 240px;
  }
}

@media (max-width: 900px) {
  .vw-sidebar {
    width: 160px;
  }
  
  .vw-panel {
    display: none;
  }
  
  .vw-panel.open {
    display: flex;
    position: absolute;
    right: 0;
    height: calc(100vh - var(--vw-topbar-height));
  }
}

