/* Agent console and Case run history use the workspace theme tokens. */
.agent-demo-note {
 display:flex;
 align-items:center;
 gap:10px;
 margin-bottom:18px;
}
.agent-demo-note .icon { flex:none; color:var(--link); }
.agent-filter {
 display:grid;
 grid-template-columns:minmax(8rem,14%) minmax(8rem,14%) minmax(10rem,1fr) auto;
 align-items:end;
 gap:12px;
 padding:16px 18px;
 margin-bottom:16px;
}
.agent-filter label {
 display:grid;
 gap:5px;
 min-width:0;
 color:var(--text);
 font-size:var(--ui-meta);
 font-weight:600;
}
.agent-filter input,.agent-filter .choice-trigger {
 width:100%;
 min-width:0;
 max-width:none;
 height:38px;
 padding:7px 10px;
 border:1px solid var(--line-strong);
 border-radius:8px;
 background:var(--surface);
 color:var(--ink);
 font:inherit;
 font-size:var(--ui-label);
 font-weight:400;
}
.agent-filter .button { min-height:38px; }
.agent-filter-actions { display:flex; align-items:center; gap:10px; }
.agent-metrics {
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 margin:0 0 16px;
 overflow:hidden;
}
.agent-metrics > div { padding:14px 18px; }
.agent-metrics > div + div { border-inline-start:1px solid var(--line); }
.agent-metrics dt { color:var(--muted); font-size:var(--ui-meta); }
.agent-metrics dd {
 margin:5px 0 0;
 color:var(--ink);
 font-size:1.7rem;
 line-height:1.15;
 font-weight:650;
 font-variant-numeric:tabular-nums;
 overflow-wrap:anywhere;
}
.agent-metrics small {
 display:block;
 margin-top:5px;
 color:var(--muted);
 font-size:var(--ui-meta);
 font-weight:400;
}
.agent-roster { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.agent-summary { padding:15px 17px; }
.agent-summary-heading { display:flex; gap:10px; align-items:center; }
.agent-summary-heading .task-symbol,.agent-case-steps .task-symbol { flex:none; }
.agent-summary-heading h2,.agent-case-title h2,.agent-case-run-title { margin:0; font-size:var(--ui-section); }
.agent-summary-heading p,.agent-summary-stats,.agent-case-title p {
 margin:3px 0 0;
 color:var(--muted);
 font-size:var(--ui-meta);
}
.agent-summary-stats { margin-top:12px; font-variant-numeric:tabular-nums; }
.agent-run-section,.agent-run-section .table-wrap { min-width:0; }
.agent-run-section .card-head { min-height:56px; padding:12px 18px; gap:10px; }
.agent-result-count { color:var(--muted); font-size:var(--ui-meta); }
.agent-run-table { width:100%; min-width:840px; }
.agent-run-table th,.agent-run-table td { padding:10px 14px; white-space:nowrap; }
.agent-run-table th:first-child,.agent-run-table td:first-child { padding-inline-start:18px; }
.agent-run-table small,.agent-case-steps small {
 display:block;
 margin-top:3px;
 color:var(--muted);
 font-size:var(--ui-meta);
}
.agent-run-table .agent-number { text-align:right; font-variant-numeric:tabular-nums; }
.agent-run-table .button.quiet { color:var(--link); min-height:32px; }
.agent-empty { padding:36px 20px; text-align:center; }
.agent-empty p { margin:6px 0 0; color:var(--muted); }
.agent-case-title { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.agent-case-steps { list-style:none; margin:16px 0 22px; padding:0; border-block-start:1px solid var(--line); }
.agent-case-steps li {
 display:grid;
 grid-template-columns:auto minmax(0,1fr) auto auto;
 align-items:center;
 gap:10px;
 padding:11px 0;
 border-block-end:1px solid var(--line);
}
.agent-case-steps .quiet { color:var(--link); }
.agent-case-run-title { margin-bottom:12px; }
.agent-case-run-title + .table-wrap { border:1px solid var(--line); border-radius:8px; }
.agent-detail-summary {
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:12px;
 margin:0 0 14px;
 padding:12px;
 background:var(--surface-2);
 border-radius:8px;
}
.agent-detail-summary dt { color:var(--muted); font-size:var(--ui-meta); }
.agent-detail-summary dd { margin:4px 0 0; font-weight:600; overflow-wrap:anywhere; }
.agent-detail-state { display:flex; flex-wrap:wrap; gap:6px; }
.agent-detail-block { margin-top:16px; padding-top:12px; border-block-start:1px solid var(--line); }
.agent-detail-block h3,.agent-detail-block p { margin:0 0 6px; }
.agent-detail-block h3 { font-size:var(--ui-label); }
.agent-detail-block ol,.agent-detail-block ul { margin:6px 0 0; padding-inline-start:20px; }
.agent-detail-block li + li { margin-top:5px; }
.agent-detail-block time { margin-inline-end:10px; color:var(--muted); font-variant-numeric:tabular-nums; }
.agent-run-fields { list-style:none; padding-inline-start:0!important; }
.agent-run-fields li { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#agent-run-detail-actions { margin-top:14px; }
@container workspace (max-width:700px) {
 .agent-filter { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .agent-filter .agent-search { grid-column:1 / -1; }
 .agent-filter-actions { grid-column:1 / -1; justify-content:flex-end; }
 .agent-summary { padding:12px; }
}
@container workspace (max-width:480px) {
 .agent-filter { grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:10px; }
 .agent-filter input,.agent-filter .choice-trigger,.agent-filter .button { height:44px; }
 .agent-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .agent-metrics > div { padding:12px; }
 .agent-metrics > div:nth-child(3) { border-inline-start:0; }
 .agent-metrics > div:nth-child(n+3) { border-block-start:1px solid var(--line); }
 .agent-roster { grid-template-columns:1fr; gap:8px; }
 .agent-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
 .agent-summary-stats { margin:0; }
 .agent-run-table :is(th,td):last-child {
  position:sticky;
  right:0;
  z-index:1;
  background:var(--surface);
  box-shadow:-1px 0 var(--line);
 }
 .agent-run-table th:last-child { background:var(--surface-2); }
 .agent-run-table .button.quiet { min-height:44px; }
 .agent-case-steps li { grid-template-columns:auto minmax(0,1fr) auto; }
 .agent-case-steps .button { grid-column:2 / -1; justify-self:start; min-height:44px; }
 .agent-detail-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.agent-filter[hidden] { display:none; }
.agent-view-nav {
 display:flex;
 flex-direction:row;
 flex-wrap:wrap;
 align-items:center;
 gap:22px;
 margin-bottom:16px;
 border-bottom:1px solid var(--line);
}
.agent-view-nav .button.quiet {
 flex:none;
 min-height:40px;
 padding:8px 2px 10px;
 margin-bottom:-1px;
 border:0;
 border-radius:0;
 border-bottom:2px solid transparent;
 background:transparent;
 color:var(--muted);
 font-size:var(--ui-label);
 font-weight:500;
}
.agent-view-nav .button.quiet:hover {
 background:transparent;
 color:var(--ink);
}
.agent-view-nav [role=tab]::after { display:none; }
.agent-view-nav .button[aria-selected=true] {
 border-bottom-color:var(--focus);
 background:transparent;
 color:var(--ink);
 font-weight:650;
}
.agent-node-filter {
 display:flex;
 align-items:center;
 gap:8px;
 padding:6px 18px;
 color:var(--muted);
 border-block-start:1px solid var(--line);
}
.agent-node-filter .button { color:var(--link); }
.agent-queue-table { min-width:700px; }
.agent-queue-table .agent-queue-condition { white-space:normal; min-width:180px; }
.agent-queue-table .agent-queue-mobile-counts { display:none; }
@media (max-width:640px) {
 .agent-view-nav .button.quiet { min-height:44px; padding-inline:9px; }
 .agent-queue-table { min-width:0; table-layout:fixed; }
 .agent-queue-table :is(th,td) {
  padding-inline:9px;
  white-space:normal;
  overflow-wrap:anywhere;
 }
 .agent-queue-table :is(th,td):nth-child(n+3):nth-child(-n+5) { display:none; }
 .agent-queue-table :is(th,td):last-child { position:static; width:85px; box-shadow:none; }
 .agent-queue-table .agent-queue-condition { min-width:0; }
 .agent-queue-table .agent-queue-mobile-counts { display:block; }
}
