/* NoHarm Data Agent — Chat UI */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* ── Login screen ──────────────────────────────────────────────── */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #e7e1cf 0%, #ffffff 100%);
}

[data-theme="dark"] .login-screen {
  background: linear-gradient(160deg, #1a2236 0%, #151d2e 100%);
}

.login-box {
  background: var(--bg-card);
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.12);
  text-align: center;
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  width: 100%;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.30),
              0 1px 3px rgba(60, 64, 67, 0.15);
}

[data-theme="dark"] .btn-google {
  border-color: var(--border);
  color: var(--text-body);
}

[data-theme="dark"] .btn-google:hover {
  background: var(--bg-input);
}

/* ── App screen ────────────────────────────────────────────────── */
.app-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-page);
}

.app-screen.visible {
  display: flex;
}

/* ── Header ────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
  box-shadow: 0 1px 0 var(--border);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pill badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-body);
  white-space: nowrap;
}

.pill a {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.pill a:hover { text-decoration: underline; }

/* Notification bell button */
.notif-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}

.notif-btn:hover {
  background: var(--bg-input);
  border-color: var(--accent);
}

.notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e53e3e;
  border: 1.5px solid var(--bg-card);
  display: none;
}

.notif-dot.visible { display: block; }

/* Notification modal */
.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notif-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.notif-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notif-badge-new {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--nh-grad-from), var(--nh-grad-to));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.notif-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.notif-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.12s;
}

.notif-close:hover { color: var(--text-primary); }

.notif-modal-body {
  overflow-y: auto;
  padding: 20px;
  flex: 1;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notif-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
}

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-list strong { color: var(--text-primary); }

.notif-list code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-code);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-code);
}

.notif-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.notif-ok-btn {
  padding: 8px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.12s;
}

.notif-ok-btn:hover { background: var(--accent-hover); }

/* Theme toggle button */
.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
  color: var(--text-body);
}

.theme-toggle:hover {
  background: var(--bg-input);
  border-color: var(--accent);
}

/* ── Body: chat + sidebar ──────────────────────────────────────── */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Chat area ─────────────────────────────────────────────────── */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  min-width: 0;
}

#messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-area::-webkit-scrollbar { width: 6px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ── Messages ──────────────────────────────────────────────────── */
.msg-row {
  display: flex;
  gap: 10px;
  max-width: 100%;
}

.msg-row.user { justify-content: flex-end; }
.msg-row.ai   { justify-content: flex-start; }

/* Bubble base */
.bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* User bubble */
.bubble.user {
  max-width: 70%;
  background: var(--bg-user-bubble);
  color: var(--text-on-dark);
  border-radius: 12px 12px 3px 12px;
  font-size: 14px;
}

/* AI bubble */
.bubble.ai {
  max-width: 92%;
  background: var(--bg-ai-bubble);
  border: 1px solid var(--border);
  border-radius: 3px 12px 12px 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  color: var(--text-body);
}

/* AI bubble content blocks */
.bubble-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
}

.bubble-text strong { color: var(--text-primary); }
.bubble-text em { font-style: italic; }

/* ── SQL code block ────────────────────────────────────────────── */
.code-block-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-table-head);
  color: rgba(255,255,255,0.8);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.code-block-copy {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.8);
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}

.code-block-copy:hover { background: rgba(255,255,255,0.15); }

pre.code-block {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-code);
  border-left: 3px solid var(--accent);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-code);
  tab-size: 2;
}

pre.code-block::-webkit-scrollbar { height: 4px; }
pre.code-block::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Data table ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.data-table th {
  background: var(--bg-table-head);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-right: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
}

.data-table th:last-child { border-right: none; }

.data-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  border-right: 1px solid var(--border);
}

.data-table td:last-child { border-right: none; }

.data-table tr:nth-child(even) td { background: var(--bg-table-stripe); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-input); }

.table-meta {
  padding: 7px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-code);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── Chart container ───────────────────────────────────────────── */
.chart-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  min-height: 320px;
}

/* Plotly overrides for dark mode */
[data-theme="dark"] .chart-container .plotly-graph-div .bg {
  fill: transparent !important;
}

/* ── Artifact (HTML content) ───────────────────────────────────── */
.artifact-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.artifact-iframe {
  width: 100%;
  border: none;
  min-height: 360px;
  background: #fff;
}

/* ── Export chip (inline in AI bubble) ─────────────────────────── */
.export-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-export-chip);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
  align-self: flex-start;
}

.export-chip:hover {
  background: rgba(112, 189, 195, 0.22);
}

.export-chip svg { flex-shrink: 0; }

.export-chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.12s, color 0.12s;
  margin-left: 2px;
}

.export-chip-del:hover {
  opacity: 1;
  color: var(--nh-error);
}

/* ── Loading dots ──────────────────────────────────────────────── */
.loading-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}

.loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 1.4s infinite ease-in-out both;
}

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

@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0.55); opacity: 0.55; }
  40%            { transform: scale(1);    opacity: 1; }
}

/* ── Conversations sidebar ─────────────────────────────────────── */
.conversations-panel {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  overflow: hidden;
}

.conv-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 8px;
}

.conv-panel-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.btn-new-conv {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.12s;
  white-space: nowrap;
}

.btn-new-conv:hover { background: var(--accent-hover); }

.conv-list {
  flex: 1;
  overflow-y: auto;
}

.conv-list::-webkit-scrollbar { width: 4px; }
.conv-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.conv-empty {
  padding: 20px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.conv-item {
  display: flex;
  align-items: center;
  padding: 9px 10px 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  gap: 6px;
  transition: background 0.1s;
  border-left: 3px solid transparent;
}

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

.conv-item.active {
  background: var(--bg-export-chip);
  border-left-color: var(--accent);
}

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

.conv-item-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.conv-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.conv-item-del {
  flex-shrink: 0;
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 4px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.12s, color 0.12s;
}

.conv-item:hover .conv-item-del { opacity: 1; }
.conv-item-del:hover { color: var(--nh-error); }

/* ── Limit warning (inline bubble) ─────────────────────────────── */
.limit-warning {
  padding: 14px 16px;
  background: var(--nh-warning-bg);
  border: 1px solid rgba(250,173,20,0.4);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
  max-width: 92%;
}

.limit-warning strong { color: var(--text-primary); }

.limit-warning-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-limit-delete {
  padding: 6px 14px;
  background: var(--nh-warning);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: opacity 0.12s;
}

.btn-limit-delete:hover { opacity: 0.85; }

.btn-limit-view {
  padding: 6px 14px;
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-family);
  transition: border-color 0.12s;
}

.btn-limit-view:hover { border-color: var(--accent); color: var(--accent); }

/* ── Exports sidebar ───────────────────────────────────────────── */
.exports-panel {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-sidebar);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex-shrink: 0;
}

.btn-clear-exports {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  font-family: var(--font-family);
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
}

.btn-clear-exports:hover {
  border-color: var(--nh-error);
  color: var(--nh-error);
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.exports-list {
  flex: 1;
  overflow-y: auto;
}

.exports-list::-webkit-scrollbar { width: 4px; }
.exports-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.exports-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.export-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.export-item:hover { background: var(--bg-input); }
.export-item:last-child { border-bottom: none; }

.export-item-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.export-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.export-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.export-item-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 500;
  transition: background 0.12s;
}

.export-item-download:hover { background: var(--bg-export-chip); }

.export-item-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.12s, color 0.12s;
}

.export-item-del:hover {
  border-color: var(--nh-error);
  color: var(--nh-error);
}

/* ── Chat footer / input ───────────────────────────────────────── */
.chat-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-header);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.message-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-body);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  min-height: 52px;
  max-height: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.message-input::placeholder { color: var(--text-muted); }

.message-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(112, 189, 195, 0.18);
}

.message-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  resize: none;
}

/* Shared styles for action buttons (mic + send) */
.mic-btn,
.send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.send-btn { background: var(--accent); }

.send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.send-btn:active:not(:disabled) { transform: scale(0.97); }

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Mic button — idle */
.mic-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.mic-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.04);
}

/* Mic button — recording state */
.mic-btn.recording {
  background: #e53e3e;
  border-color: #e53e3e;
  color: #fff;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(229, 62, 62, 0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(229, 62, 62, 0); }
}

.input-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Welcome message ───────────────────────────────────────────── */
.welcome-bubble {
  max-width: 680px;
}

.welcome-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.welcome-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.welcome-subtitle {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
}

.welcome-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-page);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.welcome-tip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
}

.tip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.welcome-tip strong { color: var(--text-primary); }

.welcome-examples-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.welcome-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.example-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  line-height: 1.4;
}

.example-chip:hover {
  border-color: var(--accent);
  background: var(--bg-export-chip);
  color: var(--text-primary);
}

/* ── Error alert ───────────────────────────────────────────────── */
.alert-error {
  padding: 10px 14px;
  background: var(--nh-error-bg);
  border: 1px solid rgba(245, 34, 45, 0.3);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--nh-error);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .conversations-panel { display: none; }
  .exports-panel { display: none; }
  .chat-area { padding: 16px; }
  .bubble.ai { max-width: 100%; }
  .bubble.user { max-width: 86%; }
  .chat-footer { padding: 12px 16px 16px; }
}
