/* =======================================================
   Orchestrator — Settings ▸ Internal Agents
   Reuses shared tokens, .orch-card, .sect-h, .tog, .orch-btn.
   §4: status "running" = neutral-positive blue (--info), NEVER green.
   Amber (--warn) for attention; indigo (--ai) for propose-only.
   ======================================================= */

.ia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  padding-top: 2px;
}

.ia-card {
  padding: 15px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity .15s;
}
.ia-card.off { opacity: 0.62; }

/* ---- header row ---- */
.ia-top { display: flex; align-items: flex-start; gap: 12px; }
.ia-ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.ia-card.off .ia-ic { background: var(--sunken); color: var(--dim); }
.ia-id { flex: 1; min-width: 0; padding-top: 1px; }
.ia-nm { font-size: 13.5px; font-weight: 700; color: var(--fg-strong); letter-spacing: -0.01em; }
.ia-role { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* ---- status pill (no green) ---- */
.ia-status {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 9px 0 8px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.01em; white-space: nowrap;
}
.ia-status .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ia-status.run    { background: var(--info-bg); color: var(--info); }
.ia-status.run .dot    { background: var(--info); box-shadow: 0 0 0 0 color-mix(in oklch, var(--info) 55%, transparent); animation: ia-pulse 1.8s ease-out infinite; }
.ia-status.sched  { background: var(--sunken); color: var(--muted); }
.ia-status.sched .dot  { background: var(--dim); }
.ia-status.paused { background: var(--sunken); color: var(--dim); }
.ia-status.paused .dot { background: var(--faint); }
.ia-status.attn   { background: var(--warn-bg); color: var(--warn); }
.ia-status.attn .dot   { background: var(--warn); }

@keyframes ia-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--info) 55%, transparent); }
  70%  { box-shadow: 0 0 0 5px color-mix(in oklch, var(--info) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--info) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .ia-status.run .dot { animation: none; }
}

/* ---- trigger / schedule bar ---- */
.ia-runbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px;
  border-radius: var(--r-md);
  background: var(--sunken);
}
.ia-run-ic { color: var(--brand); display: inline-flex; flex-shrink: 0; }
.ia-card.off .ia-run-ic { color: var(--dim); }
.ia-run-trig { font-size: 11.5px; font-weight: 600; color: var(--fg-strong); }
.ia-runbar .spacer { flex: 1; }
.ia-run-meta { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- scope chips + posture ---- */
.ia-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ia-scope {
  font-size: 10.5px; font-weight: 600;
  color: var(--muted);
  background: var(--sunken);
  border: 1px solid var(--hairline);
  padding: 2px 8px; border-radius: 999px;
}
.ia-posture {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: 0.01em; white-space: nowrap;
}
.ia-posture .spk { font-size: 9px; line-height: 1; }
.ia-posture.propose {
  color: var(--ai);
  background: var(--ai-bg);
  border: 1px solid color-mix(in oklch, var(--ai) 22%, transparent);
}
.ia-posture.internal {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

/* ---- footer: stats + actions ---- */
.ia-foot {
  display: flex; align-items: flex-end; gap: 22px;
  padding-top: 12px; margin-top: 1px;
  border-top: 1px solid var(--hairline);
}
.ia-stat .v {
  font-size: 17px; font-weight: 700; color: var(--fg-strong);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ia-stat .k {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); margin-top: 3px;
}
.ia-foot .spacer { flex: 1; }
.ia-foot-acts { display: flex; align-items: center; gap: 10px; }

/* ---- section head with live counts ---- */
.ia-section-head {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0 12px;
}
.ia-counts { display: inline-flex; align-items: center; gap: 14px; }
.ia-count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ia-count i { width: 7px; height: 7px; border-radius: 50%; }
.ia-count.run i  { background: var(--info); }
.ia-count.attn   { color: var(--warn); }
.ia-count.attn i { background: var(--warn); }
