/* The product workbench (spec §5.1). */
.wb { display: flex; flex-direction: column; gap: 16px; }
.wb-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.wb-head .spacer { flex: 1; }
.wb-title { margin: 2px 0 2px; font-size: var(--fs-20); font-weight: 600; letter-spacing: -.01em; }
.wb-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.wb-kpis .kpi[role="button"] { cursor: pointer; }
.wb-kpis .kpi[role="button"]:hover { border-color: var(--accent); }
.wb-kpis .kpi.active { box-shadow: var(--selection-glow); }
.wb-kpis .kpi-foot .label-chip { margin-left: auto; }

.pipe { display: flex; gap: 6px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.pipe-seg { flex: 1; min-width: 118px; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative; }
.pipe-seg:hover { border-color: var(--line-strong); text-decoration: none; }
.pipe-seg.active { border-color: var(--accent); box-shadow: var(--selection-glow); }
.pipe-seg.terminal { opacity: .7; }
.pipe-seg::after { content: "›"; position: absolute; right: -8px; top: 12px; color: var(--text-3); font-size: 14px; }
.pipe-seg:last-child::after { display: none; }
.pipe-label { font-size: var(--fs-11); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--text-3); font-weight: 600; white-space: nowrap; }
.pipe-count { font-size: var(--fs-20); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pipe-seg .slabar { margin-top: 2px; }
.pipe-branch { display: inline-flex; gap: 5px; align-items: center; margin-top: 6px; padding: 2px 8px; border-radius: var(--radius-pill); border: 1px dashed var(--line-strong); font-size: var(--fs-11); color: var(--text-2); width: fit-content; }
.pipe-branch b { color: var(--text); }
.slabar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.slabar span { display: block; height: 100%; }
.slabar .c { background: var(--good); } .slabar .a { background: var(--warn); } .slabar .b { background: var(--critical); }

.wb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wb-filters .spacer { flex: 1; }
.wb-search { width: 240px; padding: 6px 12px; border-radius: var(--radius-pill); }
table.queue { font-size: var(--fs-13); }
table.queue tbody tr { cursor: pointer; }
table.queue tr.cursor td { background: var(--surface-3); }
table.queue tr.leaving { animation: leave var(--dur-slow) var(--ease) both; }
@keyframes leave { to { opacity: 0; transform: translateX(16px); } }
table.queue .ref { font-family: var(--font-mono); font-weight: 600; border-left: 3px solid var(--p, var(--accent)); padding-left: 8px; }
table.queue .sla-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
table.queue .sla-cell .t { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-12); min-width: 44px; }
table.queue .sla-cell .t[data-state="at-risk"] { color: var(--warn); } table.queue .sla-cell .t[data-state="breached"] { color: var(--critical); }
table.queue .consumed { width: 48px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
table.queue .consumed b { display: block; height: 100%; background: var(--good); }
table.queue .consumed[data-state="at-risk"] b { background: var(--warn); } table.queue .consumed[data-state="breached"] b { background: var(--critical); }
table.queue .client { font-weight: 500; } table.queue .client .tier { margin-left: 6px; }
table.queue .flags { display: flex; gap: 4px; flex-wrap: wrap; }
table.queue .next { white-space: nowrap; }
html[data-layout="page"] .drawer-host { top: var(--topbar-h); }
@media (max-width: 1440px) { .wb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wb-kpis .kpi[data-kpi="cutoff"] .kpi-value { font-size: var(--fs-16); line-height: 1.2; }
table.queue td.num { white-space: nowrap; }
