/* Compact workflow cards share one hierarchy across both Dashboard groups. */
.dash-workflow-items,.dash-workflow-list {display:grid;gap:10px}
.dash-rail-card {container-type:inline-size}
.dashboard:is([data-layout=collapsed],[data-layout=focus]) .dash-workflow-items {grid-template-columns:repeat(2,minmax(0,1fr))}
.dash-workflow-card {display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;padding:12px;border:0;border-radius:10px;background:var(--surface)}
.dash-workflow-card>header {display:flex;align-items:center;gap:8px;min-width:0}
.dash-workflow-card>header>.icon {width:18px;height:18px;flex:none;color:var(--muted)}
.dash-workflow-card h3 {min-width:0;margin:0;font-size:var(--font-control);font-weight:600;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-workflow-meta {display:flex;flex-wrap:wrap;gap:4px;margin:0;font-size:var(--font-caption);line-height:18px;color:var(--muted)}
.dash-workflow-meta .is-complete {color:var(--success)}
.dash-workflow-card>footer {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:4px;min-height:34px}
.dash-workflow-card .dash-workflow-action {flex:none;min-height:30px;padding:5px 10px;line-height:20px;font-size:var(--font-control);border:0;background:var(--surface-soft)}
.dash-workflow-card .dash-workflow-action:hover {background:var(--selected)}
.dash-workflow-owner {flex:1;display:flex;align-items:center;gap:6px;min-width:0;color:var(--muted);font-size:var(--font-caption);line-height:18px}
.dash-workflow-owner>.icon {width:14px;height:14px;flex:none}
.dash-workflow-owner>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-workflow-flow {display:flex;align-items:center;gap:4px;list-style:none;padding:0;margin:0;flex:none}
.dash-workflow-flow>li {display:flex;align-items:center;gap:4px;padding:0;margin:0}
.dash-workflow-flow .dash-flow-arrow {width:10px;height:10px;color:var(--muted);flex:none}
.dash-flow-node {position:relative;display:inline-flex;align-items:center;gap:2px;border-radius:6px;cursor:help}
.dash-flow-avatar {display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;border-radius:50%;background:var(--selected);color:var(--text);font-size:10px;font-weight:500}
.dash-flow-avatar>.icon {width:14px;height:14px;color:var(--muted)}
.dash-flow-state {display:inline-flex;align-items:center;justify-content:center;width:12px;height:12px;flex:none;color:var(--muted);border-radius:50%}
.dash-flow-state>.icon {width:12px;height:12px}
.dash-flow-state.done {color:var(--success);background:var(--success-bg)}
.dash-flow-state.current {color:var(--warning);background:var(--warning-bg)}
.dash-flow-node::after {content:attr(data-tooltip);position:absolute;left:0;bottom:calc(100% + 8px);z-index:26;max-width:230px;width:max-content;padding:7px 9px;border-radius:7px;background:var(--primary);color:var(--on-primary);font-size:12px;font-weight:400;line-height:18px;box-shadow:0 3px 12px var(--shadow-color);opacity:0;visibility:hidden;pointer-events:none;transition:opacity 120ms ease}
.dash-flow-node:hover::after,.dash-flow-node:focus-visible::after {opacity:1;visibility:visible}
.dash-workflow-flow>li:not(:first-child) .dash-flow-node::after {left:auto;right:0}
.dash-flow-node:focus-visible {outline:2px solid var(--focus-ring);outline-offset:3px}
.dash-workflow-list {padding:4px;background:var(--surface-soft);border-radius:12px}
@container(max-width:410px){.dashboard:is([data-layout=collapsed],[data-layout=focus]) .dash-workflow-items {grid-template-columns:1fr}}
@media(max-width:450px){.dashboard:is([data-layout=collapsed],[data-layout=focus]) .dash-workflow-items {grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.dash-flow-node::after {transition:none}}

/* Compact circular progress shares the footer row with the owner and action. */
.dash-progress-compact {display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:none;vertical-align:middle;color:var(--chart)}
.dash-progress-circle {display:block;width:20px;height:20px;overflow:visible}
.dash-progress-compact.waiting {color:var(--chart-waiting)}
.dash-progress-compact.complete {color:var(--chart-success)}
.dash-focus-copy .dash-focus-meta {display:flex;align-items:center;gap:12px;min-width:0}
.dash-focus-meta>span:first-child {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-step-progress {display:inline-flex;align-items:center;gap:12px}

/* In the desktop split view, the Agent fills the rail's row without messages
   increasing the row height. Narrow screens keep their independent stacked layout. */
@media(min-width:1001px){
  .dashboard[data-layout="two-thirds"] .dash-agent {height:auto;min-height:clamp(540px,calc(100dvh - 300px),760px);align-self:stretch;contain:size}
  .dashboard[data-layout="two-thirds"] .dash-composer {flex-shrink:0}
}
