/* Conference-ready blue theme */
:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --blue-950: #172554;
  --surface: #f8fafc;
  --surface-card: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --error: #b91c1c;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(30, 64, 175, 0.08);
  --shadow-lg: 0 4px 12px rgba(30, 64, 175, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
}

.app.layout {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* ===== Header ===== */
.header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--blue-200);
  background: var(--surface-card);
  box-shadow: var(--shadow);
}

.header--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1.25rem;
  text-align: left;
}

.header-brand {
  min-width: 0;
}

.header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue-800);
  letter-spacing: -0.03em;
}

.tagline {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-700);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: 100px;
}

/* ===== Main chat layout ===== */
.main--chatbot {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}

.main-layout {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  width: 100%;
}

/* ===== Sidebar ===== */
.chat-sidebar {
  flex: 0 0 15.5rem;
  max-width: 40vw;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--surface-card);
  box-shadow: var(--shadow);
}

.chat-sidebar-header {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.btn-sidebar-new {
  width: 100%;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.35rem 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-list-row {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-width: 0;
}

.chat-list-row:hover {
  background: var(--blue-50);
}

.chat-list-row.is-active {
  background: var(--blue-100);
  border-color: var(--blue-200);
}

.chat-list-row.is-active .chat-list-item {
  font-weight: 600;
}

.chat-list-item {
  flex: 1;
  min-width: 0;
  display: block;
  text-align: left;
  padding: 0.5rem 0.35rem 0.5rem 0.6rem;
  font-size: 0.88rem;
  line-height: 1.3;
  border: none;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  word-break: break-word;
}

.chat-list-delete {
  flex-shrink: 0;
  width: 1.85rem;
  margin: 0.2rem 0.15rem 0.2rem 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.chat-list-delete:hover,
.chat-list-delete:focus-visible {
  color: var(--error);
  background: rgba(185, 28, 28, 0.08);
  opacity: 1;
}

.chat-list-row:hover .chat-list-delete,
.chat-list-row:focus-within .chat-list-delete {
  opacity: 0.55;
}

@media (hover: hover) {
  .chat-list-row:hover .chat-list-delete,
  .chat-list-row:focus-within .chat-list-delete {
    opacity: 1;
  }
}

@media (hover: none) {
  .chat-list-delete {
    opacity: 0.5;
  }
}

/* ===== Main column ===== */
.main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem 1rem;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
    var(--surface);
}

.output-placeholder {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  padding: 1.5rem 1rem;
}

.output-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: min-content;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Welcome Panel ===== */
.welcome-panel {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.welcome-hero {
  margin-bottom: 1.25rem;
}

.welcome-hero h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}

.welcome-hero p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.welcome-domains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.welcome-domains > .domain-card {
  display: flex;
  flex-direction: column;
}

.domain-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.domain-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.domain-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.domain-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.domain-card-icon--healthcare {
  background: #fce7f3;
  color: #db2777;
}

.domain-card-icon--retail {
  background: #dbeafe;
  color: #2563eb;
}

.domain-card-icon--finance {
  background: #dcfce7;
  color: #16a34a;
}

.domain-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.domain-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.domain-card-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
}

.table-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: 'SF Mono', Consolas, monospace;
  background: var(--blue-50);
  color: var(--blue-700);
  border-radius: 4px;
  border: 1px solid var(--blue-100);
}

.table-tag--more {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.domain-card-examples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
}

.domain-card-examples li {
  font-size: 0.82rem;
}

.example-question-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--blue-100);
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
  line-height: 1.3;
}

.example-question-btn:hover {
  background: var(--blue-100);
  border-color: var(--blue-300);
  transform: translateX(2px);
}

.domain-card-icon--healthcare + .domain-card-title ~ .domain-card-examples .example-question-btn,
.domain-card:nth-child(1) .example-question-btn {
  background: #fdf2f8;
  border-color: #fce7f3;
  color: #9d174d;
}
.domain-card:nth-child(1) .example-question-btn:hover {
  background: #fce7f3;
  border-color: #fbcfe8;
}

.domain-card:nth-child(2) .example-question-btn {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1e40af;
}
.domain-card:nth-child(2) .example-question-btn:hover {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.domain-card:nth-child(3) .example-question-btn {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #166534;
}
.domain-card:nth-child(3) .example-question-btn:hover {
  background: #dcfce7;
  border-color: #bbf7d0;
}

.example-question-btn::before {
  content: "\201C";
  opacity: 0.5;
}

.example-question-btn::after {
  content: "\201D";
  opacity: 0.5;
}

/* How it works */
.welcome-how {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.pipeline-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.pipeline-diagram-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.pipeline-diagram-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  border: 2px solid var(--blue-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--blue-700);
}

.pipeline-diagram-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.pipeline-diagram-arrow {
  width: 28px;
  height: 2px;
  background: var(--blue-200);
  position: relative;
  margin: 0 0.15rem;
  margin-bottom: 1.2rem;
}

.pipeline-diagram-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 5px solid var(--blue-300);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* ===== Pipeline progress indicator (during processing) ===== */
.pipeline-progress {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: var(--surface-card);
  border-top: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator */
.typing-indicator {
  padding: 0.75rem 1rem;
  width: auto !important;
  max-width: auto !important;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 1.2rem;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-400);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 100px;
  transition: background 0.2s;
}

.pipeline-step.is-active {
  background: var(--blue-100);
}

.pipeline-step.is-done {
  background: var(--green-100);
}

.pipeline-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, box-shadow 0.2s;
}

.pipeline-step.is-active .pipeline-step-dot {
  background: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  animation: pulse-dot 1.2s infinite;
}

.pipeline-step.is-done .pipeline-step-dot {
  background: var(--green-500);
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1); }
}

.pipeline-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pipeline-step.is-active .pipeline-step-label {
  color: var(--blue-700);
}

.pipeline-step.is-done .pipeline-step-label {
  color: #16a34a;
}

.pipeline-connector {
  width: 16px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

.pipeline-step.is-done + .pipeline-connector {
  background: var(--green-500);
}

/* ===== Domain selector buttons ===== */
.domain-selector {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.domain-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.domain-btn:hover {
  border-color: var(--blue-300);
  color: var(--blue-700);
  background: var(--blue-50);
}

.domain-btn.is-selected {
  border-color: var(--blue-500);
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.domain-btn-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.domain-btn-icon svg {
  width: 14px;
  height: 14px;
}

/* ===== Composer ===== */
.composer {
  flex-shrink: 0;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0));
  background: var(--surface-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(30, 64, 175, 0.06);
}

.composer-row {
  --composer-control-h: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.composer-use-case {
  flex: 0 0 auto;
  min-width: 8.5rem;
  max-width: 100%;
  box-sizing: border-box;
  height: var(--composer-control-h);
  min-height: var(--composer-control-h);
  max-height: var(--composer-control-h);
  padding: 0 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  color: var(--text);
}

.composer-use-case:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.composer-message {
  flex: 1 1 12rem;
  min-width: 0;
  box-sizing: border-box;
  height: var(--composer-control-h);
  min-height: var(--composer-control-h);
  max-height: var(--composer-control-h);
  resize: none;
  overflow-y: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.3;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-card);
  color: var(--text);
}

.composer-message:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.composer-send {
  flex: 0 0 auto;
  align-self: center;
  box-sizing: border-box;
  width: var(--composer-control-h);
  height: var(--composer-control-h);
  min-height: var(--composer-control-h);
  max-height: var(--composer-control-h);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.composer-status {
  margin: 0.35rem auto 0;
  padding: 0 1rem;
  max-width: 1200px;
  font-size: 0.78rem;
  color: var(--blue-600);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--blue-600);
  color: white;
  align-self: flex-start;
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-primary:disabled {
  background: var(--blue-300);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--blue-600);
  color: white;
}

.btn-secondary:hover {
  background: var(--blue-700);
}

.btn-secondary-muted {
  background: #64748b;
}

.btn-secondary-muted:hover {
  background: #475569;
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-modal-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-modal-secondary:hover {
  background: var(--blue-50);
  border-color: var(--blue-200);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.modal-dialog {
  width: 100%;
  max-width: 22rem;
  padding: 1.35rem 1.4rem 1.25rem;
  background: var(--surface-card);
  color: var(--text);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--blue-200);
  box-shadow: var(--shadow-lg);
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -0.02em;
}

.modal-body {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ===== Utility ===== */
.output-content.hidden,
.output-error.hidden,
.hidden {
  display: none !important;
}

/* ===== Chat bubbles ===== */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: flex-end;
  min-height: 100%;
}

.chat-item--intent-prompt {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92%, 65vw);
  max-width: min(92%, 65vw);
  min-width: 0;
}

.chat-item--intent-prompt .chat-bubble-assistant {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-item--intent-prompt .intent-actions {
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.chat-bubble {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  animation: bubbleIn 0.25s ease;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble-user {
  align-self: flex-end;
  max-width: 70%;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  border-color: var(--blue-700);
  border-radius: 12px 12px 4px 12px;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.chat-bubble-assistant {
  align-self: flex-start;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: min(92%, 65vw);
  max-width: min(92%, 65vw);
  min-width: 0;
  background: var(--blue-50);
  color: var(--text);
  border-color: var(--blue-200);
}

.chat-bubble-meta {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-bubble-user .chat-bubble-meta {
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble-assistant .chat-bubble-meta {
  color: var(--blue-800);
}

.chat-bubble-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.94rem;
}

/* ===== Assistant detail block (rich response) ===== */
.chat-details {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--blue-200);
}

.detail-interpreted {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.detail-label {
  font-weight: 600;
  color: var(--blue-700);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  color: var(--text);
  font-style: italic;
}

/* SQL block with highlighting */
.out-sql-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
  align-self: stretch;
}

.out-sql-wrap .out-sql {
  flex: 1;
  min-width: 0;
}

.out-sql {
  margin: 0;
  padding: 0.7rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.out-sql code {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  font-size: inherit;
  color: inherit;
}

.sql-keyword { color: #93c5fd; font-weight: 600; }
.sql-function { color: #c4b5fd; }
.sql-string { color: #86efac; }
.sql-number { color: #fcd34d; }
.sql-comment { color: #64748b; font-style: italic; }

.copy-sql-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: 0.3rem;
  padding: 0;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #334155;
  color: #94a3b8;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.copy-sql-btn:hover {
  background: #475569;
  color: #e2e8f0;
  border-color: #475569;
}

.copy-sql-btn:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.copy-sql-btn--done {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

/* ===== Intent actions ===== */
.intent-actions {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--blue-200);
  background: linear-gradient(135deg, var(--blue-50), #f0f4ff);
}

.intent-actions-label {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
}

.intent-actions-buttons {
  display: flex;
  gap: 0.5rem;
}

.intent-actions-buttons .btn {
  padding: 0.45rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* ===== Output misc ===== */
.output-error {
  flex-shrink: 0;
  margin: 0 1rem 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: var(--error);
  font-size: 0.85rem;
}

.output-error--composer {
  margin-top: 0.35rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.out-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.out-error {
  margin: 0;
  font-size: 0.95rem;
  color: #b91c1c;
}

/* ===== In-chat suggestions (contextual placeholder) ===== */
.chat-suggestions {
  text-align: center;
  padding: 2rem 1rem;
  max-width: 32rem;
  margin: 0 auto;
}

.chat-suggestions h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.chat-suggestions p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.suggestion-pill {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--blue-200);
  border-radius: 100px;
  background: var(--surface-card);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}

.suggestion-pill:hover {
  background: var(--blue-100);
  border-color: var(--blue-400);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .chat-sidebar {
    flex: 0 0 3rem;
    min-width: 3rem;
  }

  .chat-sidebar-header {
    padding: 0.4rem;
  }

  .btn-sidebar-new {
    font-size: 0;
    padding: 0.45rem;
  }

  .btn-sidebar-new::before {
    content: "+";
    font-size: 1.2rem;
  }

  .chat-list-item {
    font-size: 0;
  }

  .welcome-domains {
    grid-template-columns: 1fr;
  }

  .domain-selector {
    flex-wrap: wrap;
  }

  .pipeline-diagram {
    gap: 0.25rem;
  }

  .pipeline-diagram-arrow {
    width: 16px;
  }
}
