/* 3D agent poppetjes — full-width portrait met headset */
.agent-soul-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}
.agent-soul-card > *:not(.agent-char-wrap) {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}
.agent-soul-card > strong { padding-top: 0.65rem; }
.agent-soul-card > .agent-meta-row { padding-bottom: 0.75rem; }

.agent-char-wrap {
  position: relative;
  width: 100%;
  height: 132px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #0c1929 0%, #152238 50%, #0a1020 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}
.agent-char-wrap.large {
  width: 120px;
  height: 148px;
  border-radius: 14px;
  border: 2px solid rgba(56, 189, 248, 0.25);
}
.agent-char-wrap img.agent-char-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.agent-char-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.agent-char-portrait {
  width: 100%;
  height: 100%;
}

.agent-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  max-width: 100%;
  margin-top: 0.25rem;
}
.agent-status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.agent-status-pill.busy .dot { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.agent-status-pill.active .dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.agent-status-pill.idle .dot { background: #64748b; }
.agent-status-pill.error .dot { background: #ef4444; }
.agent-current-task {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0.35rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agent-role-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
  margin: 0.25rem 0;
}
.agents-neo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.agent-soul-card.selected {
  outline: 2px solid #ffd700;
  outline-offset: -2px;
}
.agents-viz-compact.page-viz-panel { min-height: 200px; }
.agents-viz-compact .page-viz-body { min-height: 160px; }
.agents-viz-compact .page-viz-canvas { min-height: 140px; max-height: 180px; }
.agents-viz-compact.viz-mode-rings .page-viz-canvas { min-height: 120px; max-height: 160px; }
.agents-viz-compact.viz-mode-rings .page-viz-body { min-height: 140px; }

.agent-events-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.72rem;
  color: #38bdf8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.agent-events-link:hover { color: #7dd3fc; }

.agent-event-clickable {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  width: 100%;
  text-align: left;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  color: inherit;
}
.agent-event-clickable:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(30, 58, 95, 0.35);
}
.agent-event-time { font-size: 0.7rem; color: #64748b; }
.agent-event-title { flex: 1; font-size: 0.82rem; }

.agent-events-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1200;
}
.agent-events-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid rgba(56, 189, 248, 0.2);
  z-index: 1201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
}
.agent-events-drawer.open { transform: translateX(0); }
.agent-events-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.agent-events-head h3 { margin: 0; font-size: 1.05rem; }
.agent-events-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}
.agent-event-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.6);
  transition: border-color 0.15s;
}
.agent-event-card:hover,
.agent-event-card.expanded {
  border-color: rgba(56, 189, 248, 0.35);
}
.agent-event-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.agent-event-card time { font-size: 0.7rem; color: #64748b; }
.agent-event-card strong { display: block; font-size: 0.88rem; line-height: 1.35; }
.agent-event-meta {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.agent-event-detail {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
}
.badge-sm { font-size: 0.62rem; padding: 0.12rem 0.4rem; }
