/* ==========================================================================
   AI agents: node card, status dot, switch, channel chip
   ========================================================================== */
.node-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.node-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
}

/* The one recurring signature motif: a small glowing, gently pulsing dot means
   "this is live right now" everywhere it appears — a running AI listener, an
   active account, a mass-action mid-flight. Consistent across the whole app so
   scanning a page of many rows tells you at a glance what's actually running. */
.node-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  position: relative;
}
.node-dot-on {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}
.node-dot-on::after {
  content: '';
  position: absolute;
  inset: -0.2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-accent);
  animation: node-pulse 2.2s var(--ease) infinite;
}
.node-dot-off { background: var(--color-text-faint); }
@keyframes node-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .node-dot-on::after { animation: none; display: none; }
}

.switch-btn {
  position: relative;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: var(--radius-full);
  background: var(--color-border);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast) var(--ease);
}
.switch-btn.switch-on { background: var(--color-primary); }
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: var(--radius-full);
  background: white;
  transition: transform var(--transition-fast) var(--ease);
}
.switch-btn.switch-on .switch-knob { transform: translateX(1.1rem); }

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.channel-chip-off { opacity: 0.55; }
.connector-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}
.chip-btn:hover { opacity: 1; }
.chip-btn .icon { width: 0.7rem; height: 0.7rem; }

/* ==========================================================================
   Agent summary card (click to open drawer)
   ========================================================================== */
.agent-summary {
  cursor: pointer;
  transition: box-shadow var(--transition-fast) var(--ease), border-color var(--transition-fast) var(--ease);
}
.agent-summary:hover {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
}
.agent-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

