.agent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 48px 9px 10px;
  min-height: 46px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.agent-item:hover {
  background-color: var(--hover-bg);
  border-color: var(--panel-border);
}

.agent-item.active {
  background-color: var(--active-bg);
  border-color: transparent;
  border-left: 3.5px solid var(--agent-color, var(--brand));
  border-radius: 0 var(--radius-sm, 10px) var(--radius-sm, 10px) 0;
}

.agent-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 2px;
}

.agent-icon svg {
  width: 20px;
  height: 20px;
}

.agent-item.active .agent-icon {
  background: transparent;
  border: none;
}

.agent-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  justify-content: center;
}

.agent-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.agent-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-top: 1px;
}

.agent-status-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.agent-item.active .agent-status-badge {
  color: var(--agent-color, var(--brand));
  background-color: color-mix(in srgb, var(--agent-color, var(--brand)) 12%, transparent);
  border-color: color-mix(in srgb, var(--agent-color, var(--brand)) 25%, transparent);
}

.active-agent-card {
  background: #0F1A2B;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 8, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.active-agent-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.active-agent-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.active-agent-icon svg {
  width: 24px;
  height: 24px;
}

.active-agent-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.active-agent-status {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.active-agent-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
  display: inline-block;
}

.active-agent-status .dot.responding {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: agentDotPulse 1.1s ease-in-out infinite;
}

@keyframes agentDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.active-agent-domain {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.active-agent-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
  padding-top: 12px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Light Theme Overrides for Active Agent Card */
:root[data-theme="light"] .active-agent-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .active-agent-icon {
  background: transparent;
  border: none;
}

:root[data-theme="light"] .active-agent-stats {
  border-top-color: #f1f5f9;
}
