/* Árbol completo (lienzo) · v3: solo piel sobre carguio_palas.css / transporte.css.
   Las tarjetas siguen a los nodos de la vista Camino (.ds-node): blanco, filete, punto de estado,
   cifra grande en Inter y sin franja de color a la izquierda. */

body.ds-v3 .cp-canvas-viewport { background: var(--ds-bg-app); background-image: radial-gradient(var(--ds-grid) 1px, transparent 1px); background-size: 20px 20px; font-family: var(--ds-font); }

body.ds-v3 .cp-node-card { padding: 12px 14px; border: 1px solid var(--ds-border); border-left: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--ds-surface); box-shadow: var(--ds-shadow-card); font-family: var(--ds-font); color: var(--ds-text); transition: border-color .12s ease, box-shadow .12s ease; }
body.ds-v3 .cp-node-card:hover { transform: none; border-color: var(--ds-border-strong); box-shadow: var(--ds-shadow-card); }
body.ds-v3 .cp-node-card.selected { border-color: var(--ds-accent) !important; box-shadow: 0 0 0 3px var(--ds-accent-soft); }
body.ds-v3 .cp-node-card:is(.status-green, .status-yellow, .status-red, .status-gray) { border-left-color: var(--ds-border); }
body.ds-v3 .cp-node-card.selected:is(.status-green, .status-yellow, .status-red, .status-gray) { border-left-color: var(--ds-accent); }
body.ds-v3 .cp-node-card.is-mock { background: var(--ds-surface-subtle); }

/* Nombre con punto de estado; la desviación como chip de delta */
body.ds-v3 .cp-node-card .cp-node-header { margin-bottom: 6px; }
body.ds-v3 .cp-node-card .cp-node-title { position: relative; padding-left: 14px; font-size: var(--ds-fs-sm); font-weight: var(--ds-fw-regular); color: var(--ds-text-body); }
body.ds-v3 .cp-node-card .cp-node-title::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ds-neutral-dot); }
body.ds-v3 .cp-node-card.status-green .cp-node-title::before { background: var(--ds-success); }
body.ds-v3 .cp-node-card.status-yellow .cp-node-title::before { background: var(--ds-warning); }
body.ds-v3 .cp-node-card.status-red .cp-node-title::before { background: var(--ds-danger); }
body.ds-v3 .cp-node-sem-badge { height: 20px; padding: 0 7px; border: 0; border-radius: var(--ds-radius-xs); font-size: 11px; font-weight: var(--ds-fw-medium); font-variant-numeric: tabular-nums; }
body.ds-v3 .cp-node-sem-badge .cp-sem-dot { display: none; }
body.ds-v3 .cp-node-sem-badge.green { border: 0; background: var(--ds-success-bg); color: var(--ds-success); }
body.ds-v3 .cp-node-sem-badge.yellow { border: 0; background: var(--ds-warning-bg); color: var(--ds-warning); }
body.ds-v3 .cp-node-sem-badge.red { border: 0; background: var(--ds-danger-bg); color: var(--ds-danger); }
body.ds-v3 .cp-node-sem-badge.gray { border: 0; background: var(--ds-surface-subtle); color: var(--ds-text-muted); }

/* Valor y meta: sin caja gris ni rótulos en mayúsculas */
body.ds-v3 .cp-node-contrast-grid { gap: 10px; margin-top: 0; padding: 0; border: 0; border-radius: 0; background: transparent; align-items: end; }
body.ds-v3 .cp-contrast-lbl { font-size: var(--ds-fs-2xs); font-weight: var(--ds-fw-regular); letter-spacing: 0; text-transform: none; color: var(--ds-text-muted); }
body.ds-v3 .cp-contrast-num { font-family: var(--ds-font); font-size: 18px; font-weight: var(--ds-fw-semibold); letter-spacing: var(--ds-tracking-num); font-variant-numeric: tabular-nums; color: var(--ds-text); }
body.ds-v3 .cp-contrast-num.target-num { font-size: var(--ds-fs-sm); font-weight: var(--ds-fw-regular); color: var(--ds-text-muted); }
body.ds-v3 .cp-contrast-cell.col-target { text-align: right; align-items: flex-end; }
body.ds-v3 .cp-cell-unit { margin-left: 3px; font-size: var(--ds-fs-xs); font-weight: var(--ds-fw-regular); color: var(--ds-text-muted); letter-spacing: 0; }
body.ds-v3 :is(.cp-node-values-row, .cp-node-actual-val, .cp-node-target-chip) { font-family: var(--ds-font); font-variant-numeric: tabular-nums; }

/* Botón de ramas: círculo neutro como en Camino */
body.ds-v3 .cp-node-collapse-btn,
body.ds-v3 .cp-node-collapse-btn.is-collapsed,
body.ds-v3 .cp-node-collapse-btn.is-expanded { min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-full); background: var(--ds-surface); color: var(--ds-text-muted); font-size: 10.5px; font-weight: var(--ds-fw-medium); box-shadow: none; }
body.ds-v3 .cp-node-collapse-btn:hover { border-color: var(--ds-border-strong); background: var(--ds-surface-subtle); color: var(--ds-text); }

/* Conectores: filete gris; el estado ya lo dice el punto de cada tarjeta */
body.ds-v3 .cp-svg-connector { stroke: var(--ds-border-strong); stroke-width: 1.25; }
body.ds-v3 .cp-svg-connector:is(.conn-green, .conn-yellow, .conn-red, .conn-gray) { stroke: var(--ds-border-strong); }
body.ds-v3 .cp-svg-connector.trace-highlight { stroke: var(--ds-accent); stroke-width: 2; }
