/* ═══════════════════════════════════════════════════════════
   AI Agents — Standalone Styles
   DO NOT edit styles.css — all agent styles live here
   ═══════════════════════════════════════════════════════════ */

/* ── Agent Grid ── */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ── Agent Card ── */
.agent-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius, 12px);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.agent-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.agent-card.featured {
  border-color: rgba(37,99,235,0.3);
  background: linear-gradient(135deg, rgba(37,99,235,0.06) 0%, rgba(255,255,255,0.03) 100%);
}
.agent-card.featured:hover { border-color: rgba(37,99,235,0.5); }
.light .agent-card { background: #fff; border-color: #e2e8f0; }
.light .agent-card:hover { border-color: #cbd5e1; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.light .agent-card.featured { background: linear-gradient(135deg, rgba(37,99,235,0.04) 0%, #fff 100%); border-color: rgba(37,99,235,0.2); }

.agent-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.agent-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.agent-card-icon.blue { background: rgba(37,99,235,0.12); }
.agent-card-icon.green { background: rgba(5,150,105,0.12); }
.agent-card-icon.yellow { background: rgba(217,119,6,0.12); }
.agent-card-icon.purple { background: rgba(124,58,237,0.12); }
.agent-card-icon.red { background: rgba(220,38,38,0.12); }

.agent-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-100, #F1F5F9);
  margin: 0;
}
.light .agent-card-title { color: var(--gray-800, #1E293B); }

.agent-card-subtitle {
  font-size: 12px;
  color: var(--gray-400, #94A3B8);
  margin-top: 2px;
}

.agent-card-desc {
  font-size: 13px;
  color: var(--gray-400, #94A3B8);
  line-height: 1.5;
  margin-bottom: 14px;
}

.agent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.light .agent-card-footer { border-top-color: #f1f5f9; }

.agent-card-stats {
  display: flex;
  gap: 14px;
}
.agent-card-stat {
  font-size: 11px;
  color: var(--gray-500, #64748b);
}
.agent-card-stat strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-200, #E2E8F0);
}
.light .agent-card-stat strong { color: var(--gray-700, #334155); }

.agent-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.agent-status-pill.active {
  background: rgba(5,150,105,0.15);
  color: var(--green, #059669);
}
.agent-status-pill.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green, #059669);
  animation: agent-pulse 2s infinite;
}
.agent-status-pill.paused {
  background: rgba(217,119,6,0.15);
  color: var(--yellow, #D97706);
}
.agent-status-pill.inactive {
  background: rgba(148,163,184,0.15);
  color: var(--gray-400, #94A3B8);
}

@keyframes agent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.agent-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(37,99,235,0.15);
  color: var(--blue, #2563EB);
}

/* ── Detail View ── */
.agent-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.agent-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}
.agent-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.agent-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(37,99,235,0.12);
}
.agent-detail-title h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-100, #F1F5F9);
}
.light .agent-detail-title h3 { color: var(--gray-800, #1E293B); }
.agent-detail-desc {
  font-size: 12px;
  color: var(--gray-400, #94A3B8);
}
.agent-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Agent Tabs ── */
.agent-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm, 8px);
  padding: 3px;
  margin-bottom: 16px;
  width: fit-content;
}
.light .agent-tabs { background: rgba(0,0,0,0.04); }

.agent-tab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--gray-400, #94A3B8);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.agent-tab:hover { color: var(--gray-100, #F1F5F9); background: rgba(255,255,255,0.06); }
.agent-tab.active { background: var(--blue, #2563EB); color: #fff; }
.light .agent-tab { color: var(--gray-600, #475569); }
.light .agent-tab:hover { color: var(--gray-800, #1E293B); background: rgba(0,0,0,0.05); }
.light .agent-tab.active { background: var(--blue, #2563EB); color: #fff; }

/* ── Chat Container ── */
.agent-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 400px;
}
.agent-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat Messages */
.agent-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  animation: agent-msg-in 0.25s ease-out;
}
@keyframes agent-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.agent-msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--gray-100, #F1F5F9);
}
.light .agent-msg.assistant { background: #f8fafc; border-color: #e2e8f0; color: var(--gray-800, #1E293B); }
.agent-msg.user {
  align-self: flex-end;
  background: var(--blue, #2563EB);
  color: #fff;
  border: none;
}
.agent-msg.system {
  align-self: center;
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.2);
  color: var(--yellow, #D97706);
  font-size: 12px;
  padding: 8px 14px;
  max-width: 90%;
  text-align: center;
}

.agent-msg-meta {
  font-size: 11px;
  color: var(--gray-500, #64748b);
  margin-top: 4px;
}
.agent-msg.user .agent-msg-meta { color: rgba(255,255,255,0.6); }

.agent-msg-content p { margin: 0 0 8px; }
.agent-msg-content p:last-child { margin-bottom: 0; }
.agent-msg-content ul, .agent-msg-content ol { margin: 4px 0 8px 16px; padding: 0; }
.agent-msg-content li { margin-bottom: 4px; }
.agent-msg-content strong { font-weight: 600; }
.agent-msg-content code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono, monospace);
  font-size: 0.9em;
}

/* RFI Data Cards inside messages */
.agent-rfi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 13px;
}
.light .agent-rfi-card { background: #fff; border-color: #e2e8f0; }

.agent-rfi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.agent-rfi-card-number {
  font-weight: 700;
  font-size: 13px;
}
.agent-rfi-card-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-400, #94A3B8);
  padding: 2px 0;
}
.agent-rfi-card-label { min-width: 60px; }

/* Typing indicator */
.agent-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
}
.agent-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-400, #94A3B8);
  animation: agent-typing-bounce 1.4s infinite ease-in-out;
}
.agent-typing-dot:nth-child(2) { animation-delay: 0.16s; }
.agent-typing-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes agent-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Chat Input ── */
.agent-chat-input-bar {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.light .agent-chat-input-bar { border-top-color: #e2e8f0; }

.agent-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.agent-quick-chip {
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  background: transparent;
  color: var(--gray-300, #CBD5E1);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.agent-quick-chip:hover {
  border-color: var(--blue, #2563EB);
  color: var(--blue, #2563EB);
  background: rgba(37,99,235,0.06);
}
.light .agent-quick-chip { color: var(--gray-600, #475569); border-color: #e2e8f0; }
.light .agent-quick-chip:hover { border-color: var(--blue, #2563EB); color: var(--blue, #2563EB); }

.agent-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
#agent-chat-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm, 8px);
  color: var(--gray-100, #F1F5F9);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s;
}
#agent-chat-input:focus { outline: none; border-color: var(--blue, #2563EB); }
.light #agent-chat-input { background: #fff; border-color: #e2e8f0; color: var(--gray-800, #1E293B); }

.agent-chat-send {
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm, 8px);
}

/* ── Insights Panel ── */
.agent-insight-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius, 12px);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.light .agent-insight-card { background: #fff; border-color: #e2e8f0; }

.agent-insight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.agent-insight-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.agent-insight-icon.red { background: rgba(220,38,38,0.12); }
.agent-insight-icon.yellow { background: rgba(217,119,6,0.12); }
.agent-insight-icon.blue { background: rgba(37,99,235,0.12); }
.agent-insight-icon.green { background: rgba(5,150,105,0.12); }

.agent-insight-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-100, #F1F5F9);
}
.light .agent-insight-title { color: var(--gray-800, #1E293B); }
.agent-insight-body {
  font-size: 13px;
  color: var(--gray-400, #94A3B8);
  line-height: 1.5;
}
.agent-insight-body ul { margin: 6px 0 0 16px; padding: 0; }
.agent-insight-body li { margin-bottom: 4px; }
.agent-insight-action {
  margin-top: 10px;
}

/* ── Activity Log ── */
.agent-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.light .agent-activity-item { border-bottom-color: #f1f5f9; }

.agent-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.agent-activity-dot.info { background: var(--blue, #2563EB); }
.agent-activity-dot.warning { background: var(--yellow, #D97706); }
.agent-activity-dot.success { background: var(--green, #059669); }
.agent-activity-dot.error { background: var(--red, #DC2626); }

.agent-activity-text { flex: 1; color: var(--gray-300, #CBD5E1); }
.light .agent-activity-text { color: var(--gray-700, #334155); }
.agent-activity-time { color: var(--gray-500, #64748b); font-size: 11px; white-space: nowrap; }

/* ── Settings Panel ── */
.agent-settings-group {
  margin-bottom: 20px;
}
.agent-settings-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400, #94A3B8);
  margin-bottom: 6px;
}
.light .agent-settings-group label { color: var(--gray-600, #475569); }

.agent-settings-group input,
.agent-settings-group select,
.agent-settings-group textarea {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm, 8px);
  color: var(--gray-100, #F1F5F9);
  font-size: 14px;
  font-family: inherit;
}
.light .agent-settings-group input,
.light .agent-settings-group select,
.light .agent-settings-group textarea {
  background: #fff; border-color: #e2e8f0; color: var(--gray-800, #1E293B);
}
.agent-settings-group input:focus,
.agent-settings-group select:focus,
.agent-settings-group textarea:focus { outline: none; border-color: var(--blue, #2563EB); }

.agent-settings-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.agent-settings-row > * { flex: 1; }

.agent-settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.light .agent-settings-toggle { border-bottom-color: #f1f5f9; }
.agent-settings-toggle-label {
  font-size: 14px;
  color: var(--gray-200, #E2E8F0);
}
.light .agent-settings-toggle-label { color: var(--gray-700, #334155); }
.agent-settings-toggle-desc {
  font-size: 12px;
  color: var(--gray-500, #64748b);
}

/* ══════════════════════════════════════
   ENHANCED SETTINGS
   ══════════════════════════════════════ */

/* ── Per-Agent API Key ── */
.agent-llm-key-hint {
  font-weight: 400;
  font-size: 11px;
  color: var(--gray-500, #64748b);
  margin-left: 6px;
}
.agent-settings-group .api-key-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.agent-settings-group .api-key-input-wrap input {
  flex: 1;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}
.agent-settings-group .api-key-toggle {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm, 6px);
  padding: 6px;
  cursor: pointer;
  color: var(--gray-500, #64748b);
  display: flex;
  align-items: center;
}
.light .agent-settings-group .api-key-toggle { border-color: #e2e8f0; }
.agent-settings-group .api-key-toggle:hover { color: var(--blue, #14b8a6); border-color: var(--blue, #14b8a6); }
.btn-xs { padding: 2px 8px; font-size: 11px; }

/* ── Settings Sections ── */
.agent-settings-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.light .agent-settings-section { border-bottom-color: #f1f5f9; }
.agent-settings-section:last-child { border-bottom: none; margin-bottom: 0; }

.agent-settings-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400, #94A3B8);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-admin-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(217,119,6,0.15);
  color: var(--yellow, #D97706);
}
.agent-custom-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(37,99,235,0.15);
  color: var(--blue, #2563EB);
}
.agent-log-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500, #64748b);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Prompt Preview ── */
.agent-prompt-preview {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm, 8px);
  padding: 14px 16px;
  max-height: 300px;
  overflow-y: auto;
}
.light .agent-prompt-preview { background: #f8fafc; border-color: #e2e8f0; }

.agent-prompt-text {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray-300, #CBD5E1);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.light .agent-prompt-text { color: var(--gray-700, #334155); }

.agent-prompt-textarea {
  font-family: var(--font-mono, monospace) !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  min-height: 280px;
  resize: vertical;
}

.agent-prompt-hint {
  font-weight: 400;
  font-size: 11px;
  color: var(--yellow, #D97706);
  margin-left: 6px;
}

/* ── Multi-Step Progress Bar ── */
.agent-prompt-step-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.agent-prompt-step {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--gray-500, #64748b);
  transition: all 0.2s;
}
.agent-prompt-step.active {
  background: rgba(37,99,235,0.15);
  color: var(--blue, #2563EB);
}
.agent-prompt-step.done {
  background: rgba(5,150,105,0.15);
  color: var(--green, #059669);
}
.light .agent-prompt-step { background: #f1f5f9; }
.light .agent-prompt-step.active { background: rgba(37,99,235,0.1); }
.light .agent-prompt-step.done { background: rgba(5,150,105,0.1); }

/* ── Diff View ── */
.agent-prompt-diff {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}
.light .agent-prompt-diff { background: #f8fafc; border-color: #e2e8f0; }

.diff-same { color: var(--gray-400, #94A3B8); padding: 1px 0; }
.diff-added {
  background: rgba(5,150,105,0.12);
  color: var(--green, #059669);
  padding: 1px 4px;
  border-radius: 2px;
}
.diff-removed {
  background: rgba(220,38,38,0.12);
  color: var(--red, #DC2626);
  padding: 1px 4px;
  border-radius: 2px;
  text-decoration: line-through;
}
.light .diff-same { color: var(--gray-600, #475569); }

.agent-prompt-note-display {
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--yellow, #D97706);
}

/* ── Confirm Box ── */
.agent-prompt-confirm-box {
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: var(--radius, 12px);
  padding: 24px;
  text-align: center;
}
.agent-prompt-confirm-icon { font-size: 32px; margin-bottom: 8px; }
.agent-prompt-confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-100, #F1F5F9);
  margin-bottom: 12px;
}
.light .agent-prompt-confirm-title { color: var(--gray-800, #1E293B); }
.agent-prompt-confirm-body {
  font-size: 13px;
  color: var(--gray-300, #CBD5E1);
  text-align: left;
  max-width: 480px;
  margin: 0 auto;
}
.light .agent-prompt-confirm-body { color: var(--gray-700, #334155); }
.agent-prompt-confirm-body ul {
  margin: 8px 0 0 16px;
  padding: 0;
}
.agent-prompt-confirm-body li { margin-bottom: 4px; }

/* ── Full Prompt Overlay ── */
.agent-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.agent-prompt-overlay-content {
  background: var(--dark-bg, #141414);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius, 12px);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.light .agent-prompt-overlay-content { background: #fff; border-color: #e2e8f0; }

.agent-prompt-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.light .agent-prompt-overlay-header { border-bottom-color: #e2e8f0; }
.agent-prompt-overlay-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-100, #F1F5F9);
}
.light .agent-prompt-overlay-header h4 { color: var(--gray-800, #1E293B); }

.agent-prompt-full-text {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray-300, #CBD5E1);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.light .agent-prompt-full-text { color: var(--gray-700, #334155); }

/* ── Change Log ── */
.agent-changelog-list {
  max-height: 320px;
  overflow-y: auto;
}
.agent-changelog-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.light .agent-changelog-item { border-bottom-color: #f1f5f9; }
.agent-changelog-item:last-child { border-bottom: none; }

.agent-changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.agent-changelog-field {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-200, #E2E8F0);
}
.light .agent-changelog-field { color: var(--gray-700, #334155); }
.agent-changelog-time {
  font-size: 11px;
  color: var(--gray-500, #64748b);
}
.agent-changelog-note {
  font-size: 12px;
  color: var(--gray-400, #94A3B8);
  margin-bottom: 4px;
}
.agent-changelog-meta {
  font-size: 11px;
  color: var(--gray-500, #64748b);
}

.btn-link {
  background: none;
  border: none;
  color: var(--blue, #2563EB);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.btn-link:hover { color: var(--blue-hover, #0d9488); }

/* ── Danger Zone ── */
.agent-settings-danger {
  border-bottom: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .agent-grid { grid-template-columns: 1fr; }
  .agent-detail-header { flex-direction: column; align-items: flex-start; }
  .agent-chat-container { height: calc(100vh - 320px); }
  .agent-msg { max-width: 95%; }
  .agent-tabs { width: 100%; overflow-x: auto; }
  .agent-settings-row { flex-direction: column; }
  .agent-prompt-overlay-content { width: 95%; max-height: 90vh; }
  .agent-prompt-step-bar { flex-direction: column; }
  .agent-prompt-confirm-box { padding: 16px; }
}
