/* ── Layout ── */
.agents-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-lg); }
.agent-map-card { min-height: 460px; }
.agent-side-col { display: flex; flex-direction: column; gap: var(--space-md); }

/* ── Map wrap — D3 goes inside here ── */
.agent-map-wrap {
  position: relative;
  background: radial-gradient(ellipse at 50% 50%, #1a1a2e 0%, #0c0c0e 70%);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 420px;
}
.agent-map-wrap svg { display: block; }

/* D3 force-link lines */
.force-link { transition: stroke-opacity 0.3s; }

/* D3 node group hover */
.force-node:hover .node-circle { filter: brightness(1.25); }

/* ── D3 Tooltip ── */
.d3-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(18,18,28,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(12px);
  font-family: 'Syne', sans-serif;
  z-index: 10;
  min-width: 160px;
  transition: opacity 0.15s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.tip-name { font-size: 0.85rem; font-weight: 600; color: #fff; margin-bottom: 6px; }
.tip-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tip-status { font-size: 0.75rem; color: #34d399; }
.tip-hint { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-top: 4px; }

/* ── Agent Registry ── */
.agent-registry {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 320px; overflow-y: auto;
}
.registry-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  animation: slideInRow 0.35s ease both;
  animation-delay: var(--delay, 0ms);
  transition: background 0.2s;
}
.registry-row:hover { background: var(--surface-3, #1f1f2e); }
.reg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.reg-name { flex: 1; font-size: 0.85rem; color: var(--text-primary); }
.reg-tasks { font-size: 0.7rem; color: var(--text-muted); font-family: 'DM Mono', monospace; }
.reg-status { font-size: 0.7rem; color: #34d399; font-family: 'DM Mono', monospace; font-weight: 600; }

@keyframes slideInRow {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Activity Log ── */
.activity-log {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 260px; overflow-y: auto;
  scrollbar-width: thin;
}
.log-entry {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1.5;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid transparent;
  transition: background 0.3s, transform 0.25s, opacity 0.25s;
}
.log-entry-new {
  background: rgba(245,166,35,0.08);
  border-left-color: var(--accent);
  transform: translateY(-4px);
  opacity: 0;
}
.log-time {
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.68rem;
}
.log-agent-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.log-agent { color: var(--accent); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.log-msg { color: var(--text-secondary, rgba(255,255,255,0.6)); }

.card-link-btn { font-size: 0.8rem; color: var(--text-muted); background: none; cursor: pointer; }
.card-link-btn:hover { color: var(--accent); }

@media (max-width: 1024px) { .agents-layout { grid-template-columns: 1fr; } }
