/* MonAssist Dashboard Styles */

:root {
  /* Colors */
  --bg-primary: #0f0f10;
  --bg-secondary: #1a1a1d;
  --bg-tertiary: #242428;
  --bg-hover: #2a2a2f;

  --text-primary: #ffffff;
  --text-secondary: #a0a0a5;
  --text-muted: #6b6b70;

  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);

  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  --border-color: #2a2a2f;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Spacing */
  --sidebar-width: 240px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
}

/* App Layout */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-secondary);
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.disconnected {
  background: var(--error);
}

.status-dot.connecting {
  background: var(--warning);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Main Content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.header {
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.header-title h1 {
  font-size: 24px;
  font-weight: 600;
}

.header-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.public-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
}

.url-label {
  color: var(--text-secondary);
}

.url-value {
  color: var(--accent-secondary);
  font-family: 'SF Mono', Monaco, monospace;
}

/* Views */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.view.active {
  display: block;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.stat-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Activity Feed */
.activity-feed {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px 24px;
}

.activity-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.activity-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Quick Test */
.quick-test {
  padding: 24px;
}

.quick-test textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.quick-test textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.quick-test-response {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  display: none;
}

.quick-test-response.visible {
  display: block;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-text:hover {
  color: var(--accent-secondary);
}

.btn-icon {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  opacity: 1;
}

/* Chat View */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 64px);
  max-width: 800px;
  margin: 0 auto;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
}

.chat-welcome {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.chat-welcome h2 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-message.assistant .chat-avatar {
  background: var(--accent-glow);
}

.chat-message.user .chat-avatar {
  background: var(--bg-tertiary);
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 14px;
  line-height: 1.6;
}

.chat-message.assistant .chat-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.chat-message.user .chat-bubble {
  background: var(--accent-primary);
  color: white;
}

/* Streaming Animation */
.chat-message.streaming .chat-bubble {
  min-height: 44px;
}

.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.chat-message.streaming .chat-bubble::after {
  content: '';
}

.chat-input-container {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}

.chat-input-container textarea {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  transition: var(--transition-fast);
}

.chat-input-container textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.btn-send {
  padding: 12px 32px;
}

/* Activity Table */
.activity-table-container {
  overflow-x: auto;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.activity-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-tertiary);
}

.activity-table td {
  font-size: 13px;
}

.activity-table .empty-row td {
  text-align: center;
  padding: 48px;
  color: var(--text-secondary);
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.settings-content {
  padding: 24px;
}

.setting-item {
  margin-bottom: 24px;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.setting-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-value code {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  color: var(--accent-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
}

.endpoint .method {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.endpoint .method.post {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-secondary);
}

.endpoint .method.get {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.endpoint code {
  flex: 1;
  font-family: 'SF Mono', Monaco, monospace;
}

.endpoint .desc {
  color: var(--text-secondary);
  flex: 1;
}

.endpoint .params {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shortcut Guide */
.shortcut-guide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-secondary);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.step-content code {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  color: var(--accent-secondary);
  word-break: break-all;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Loading State */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Quick Actions Grid */
.quick-actions-card {
  margin-bottom: 24px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 20px 24px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.quick-action-btn .action-icon {
  font-size: 24px;
}

.quick-action-btn .action-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.quick-action-btn:hover .action-label {
  color: var(--text-primary);
}

/* Usage Stats Card */
.usage-card {
  margin-bottom: 24px;
}

.usage-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time-range {
  font-size: 12px;
  color: var(--text-muted);
}

.usage-content {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 2fr;
  gap: 24px;
}

@media (max-width: 1200px) {
  .usage-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .usage-content {
    grid-template-columns: 1fr;
  }
}

.usage-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.usage-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.usage-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.usage-fill.tokens {
  background: var(--warning);
}

.usage-fill.success {
  background: var(--success);
}

.response-sparkline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sparkline-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.sparkline {
  width: 100%;
  height: 40px;
}

.sparkline-line {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
}

.sparkline-area {
  fill: var(--accent-glow);
}

/* Tool Execution Panel */
.tool-execution-card {
  margin-bottom: 24px;
  overflow: hidden;
}

.tool-execution-card .card-header {
  cursor: pointer;
  user-select: none;
}

.tool-execution-card .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-count {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.collapse-icon {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.tool-execution-card.collapsed .collapse-icon,
.thinking-card.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.tool-execution-content,
.thinking-content {
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

.tool-execution-card.collapsed .tool-execution-content,
.thinking-card.collapsed .thinking-content {
  max-height: 0;
  overflow: hidden;
}

.tool-list {
  padding: 16px 24px;
}

.tool-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.tool-item:last-child {
  border-bottom: none;
}

.tool-status-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

.tool-status-icon.pending {
  background: var(--warning);
  animation: pulse 1.5s infinite;
}

.tool-status-icon.success {
  background: var(--success);
}

.tool-status-icon.error {
  background: var(--error);
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-args {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', Monaco, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-duration {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Thinking/Reasoning Panel */
.thinking-card {
  margin-bottom: 24px;
}

.thinking-card .card-header {
  cursor: pointer;
  user-select: none;
}

.thinking-content {
  padding: 16px 24px;
}

.thinking-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-style: italic;
}

.thinking-text.active {
  color: var(--text-primary);
}

.thinking-text.active::after {
  content: '▌';
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

/* Saved Prompts */
.saved-prompts-card {
  max-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.saved-prompts-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.saved-prompt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.saved-prompt-item:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.saved-prompt-item:last-child {
  margin-bottom: 0;
}

.prompt-icon {
  font-size: 16px;
}

.prompt-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: var(--transition-fast);
}

.saved-prompt-item:hover .prompt-delete {
  opacity: 1;
}

.prompt-delete:hover {
  color: var(--error);
}

/* Webhook Playground */
.webhook-playground-card {
  margin-top: 24px;
}

.playground-content {
  padding: 24px;
}

.playground-row {
  margin-bottom: 16px;
}

.playground-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.playground-row select,
.playground-row textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  transition: var(--transition-fast);
}

.playground-row select:focus,
.playground-row textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.playground-row textarea {
  resize: vertical;
  min-height: 80px;
}

.playground-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.playground-response {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-hover);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.response-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.response-status.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.response-status.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.playground-response pre {
  padding: 16px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
}

/* Conversation Manager */
.conversation-manager-card {
  margin-top: 24px;
}

.conversations-list {
  padding: 16px 24px;
  max-height: 400px;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.conversation-item:hover {
  background: var(--bg-hover);
}

.conversation-item:last-child {
  margin-bottom: 0;
}

.conversation-icon {
  font-size: 18px;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-id {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.conversation-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.conversation-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: var(--transition-fast);
}

.conversation-item:hover .conversation-actions {
  opacity: 1;
}

.conversation-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.conversation-actions button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.conversation-actions button.delete:hover {
  color: var(--error);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 13px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
}

.modal-body textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
}

.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.modal-response {
  padding: 0 24px 24px;
  display: none;
}

.modal-response.visible {
  display: block;
}

.modal-response-content {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}