/* === Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff;
  --surface: #f9fafb;
  --surface-2: #f3f4f6;
  --border: #e5e7eb;
  --border-light: #d1d5db;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --sales: #7c3aed;
  --sales-hover: #6d28d9;
  --sales-light: rgba(124, 58, 237, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 288px;
}
html { color-scheme: light; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }
textarea { font: inherit; }
svg { display: block; }

/* === Layout === */
#app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 50;
}
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0, 119, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.logo-icon img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.sidebar-new { padding: 12px; }
.sidebar-footer {
  border-top: 1px solid var(--border); padding: 12px;
  font-size: 12px; color: var(--text-muted); text-align: center;
}

/* === Buttons === */
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.sidebar-close { display: none; }
.btn-outline {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  font-size: 14px; transition: all 0.18s; width: 100%;
}
.btn-outline:hover { background: var(--surface-2); }

/* === Mode Switcher === */
.mode-switcher {
  display: flex; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 3px; margin-left: 8px;
}
.mode-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: all 0.2s;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active {
  background: var(--bg); color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.mode-btn[data-mode="sales"].active {
  color: var(--sales);
}

/* === Header Actions (Language + Export) === */
.header-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.lang-selector { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.18s;
}
.lang-btn:hover { color: var(--text); border-color: var(--border-light); }
.lang-label { font-size: 12px; font-weight: 500; }
.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  margin-top: 4px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 30; min-width: 140px; overflow: hidden;
}
.lang-dropdown.show { display: block; }
.lang-option {
  display: block; width: 100%; text-align: left;
  padding: 10px 14px; font-size: 13px;
  color: var(--text-muted); transition: all 0.15s;
}
.lang-option:hover { background: var(--surface-2); color: var(--text); }
.lang-option.active { color: var(--primary); font-weight: 500; }
.export-btn { color: var(--text-muted); }
.export-btn:hover { color: var(--primary); }
body.sales-mode .export-btn:hover { color: var(--sales); }

/* === Conversation List === */
.conv-list { flex: 1; overflow-y: auto; padding: 0 12px 16px; }
.conv-list::-webkit-scrollbar { width: 6px; }
.conv-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.conv-empty { text-align: center; color: var(--text-muted); font-size: 14px; padding: 32px 0; }
.conv-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer; transition: all 0.18s;
  color: var(--text-muted); margin-bottom: 2px;
}
.conv-item:hover { background: var(--surface-2); color: var(--text); }
.conv-item.active { background: var(--surface-2); color: var(--text); }
.conv-item .conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .delete-btn {
  opacity: 0; transition: opacity 0.18s;
  color: var(--text-faint); padding: 4px; border-radius: 4px;
}
.conv-item:hover .delete-btn { opacity: 1; }
.conv-item .delete-btn:hover { color: #ef4444; }

/* === Main === */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.main-header h1 { font-size: 16px; font-weight: 500; }
.menu-btn { display: none; }

/* === Messages === */
.messages {
  flex: 1; overflow-y: auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.messages::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 24px; padding-bottom: 48px; text-align: center;
}
.welcome-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(0, 119, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.welcome-icon img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.welcome h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.welcome p { font-size: 14px; color: var(--text-muted); max-width: 420px; margin-bottom: 24px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 600px; width: 100%; }
.suggestion {
  text-align: left; padding: 16px; border: 1px solid var(--border); border-radius: 12px;
  transition: all 0.18s; background: transparent;
}
.suggestion:hover { background: var(--surface-2); border-color: var(--border-light); }
.suggestion-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.suggestion-desc { font-size: 12px; color: var(--text-muted); }

.chat-container { max-width: 720px; margin: 0 auto; padding: 24px 16px 32px; }

.msg { display: flex; gap: 12px; margin-bottom: 24px; animation: msgIn 0.3s ease-out; }
.msg.user { justify-content: flex-end; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.msg-avatar.assistant { background: rgba(0, 119, 255, 0.08); }
.msg-avatar.assistant img { width: 16px; height: 16px; object-fit: contain; border-radius: 2px; }
.msg-avatar.user { background: var(--surface-2); color: var(--text-muted); }
.msg-bubble { max-width: 80%; border-radius: 16px; padding: 12px 16px; }
.msg-bubble.user { background: var(--primary); color: #fff; }
.msg-bubble.assistant { background: var(--surface); border: 1px solid var(--border); position: relative; }
.msg-bubble.user p { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

/* === Message Actions (Copy + Feedback) === */
.msg-actions {
  display: flex; align-items: center; gap: 8px;
  position: absolute; bottom: -28px; right: 0;
  opacity: 0; transition: opacity 0.18s;
}
.msg-bubble.assistant:hover .msg-actions { opacity: 1; }
.copy-btn, .feedback-btn {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
  padding: 2px; border-radius: 4px; transition: all 0.18s;
}
.copy-btn:hover, .feedback-btn:hover { color: var(--text); }
.feedback-btn.active.up { color: #16a34a; }
.feedback-btn.active.down { color: #dc2626; }

/* === Typing indicator === */
.typing { display: flex; gap: 6px; padding: 4px 0; }
.typing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted);
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* === Follow-up Suggestions === */
.suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.suggestion-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
  transition: all 0.18s; cursor: pointer;
}
.suggestion-chip:hover {
  background: var(--primary-light); border-color: var(--primary);
  color: var(--primary);
}
body.sales-mode .suggestion-chip:hover {
  background: var(--sales-light); border-color: var(--sales); color: var(--sales);
}
.suggestion-chip svg { flex-shrink: 0; opacity: 0.6; }

/* === Input === */
.input-area { border-top: 1px solid var(--border); background: var(--bg); }
.input-box {
  max-width: 720px; margin: 0 auto; padding: 16px;
}
.input-box-inner {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 8px; transition: border-color 0.18s;
  flex-wrap: wrap;
}
.input-box-inner:focus-within { border-color: var(--primary); }
body.sales-mode .input-box-inner:focus-within { border-color: var(--sales); }

/* === Upload Button === */
.upload-btn {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.18s;
}
.upload-btn:hover { color: var(--primary); background: var(--surface-2); }
body.sales-mode .upload-btn:hover { color: var(--sales); }

/* === Image Preview (in input area) === */
.image-preview {
  display: flex; flex-wrap: wrap; gap: 8px; width: 100%;
}
.image-preview:empty { display: none; }
.preview-thumb {
  position: relative; width: 64px; height: 64px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.18s;
}
.preview-remove:hover { background: rgba(0,0,0,0.8); }
.preview-remove svg { width: 10px; height: 10px; }
#input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); resize: none; font-size: 14px; line-height: 1.5;
  min-height: 24px; max-height: 200px; padding: 4px 0;
}
#input::placeholder { color: var(--text-faint); }
.send-btn {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.send-btn:hover { background: var(--primary-hover); }
body.sales-mode .send-btn { background: var(--sales); }
body.sales-mode .send-btn:hover { background: var(--sales-hover); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.input-hint { text-align: center; font-size: 12px; color: var(--text-muted); padding-bottom: 12px; }

/* === Message Images (in chat) === */
.msg-images {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.msg-images img {
  max-width: 200px; max-height: 200px;
  border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.18s;
}
.msg-images img:hover { transform: scale(1.02); }

/* === Markdown === */
.chat-markdown { font-size: 15px; line-height: 1.75; word-wrap: break-word; }
.chat-markdown p { margin-bottom: 12px; }
.chat-markdown p:last-child { margin-bottom: 0; }
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3 { font-weight: 600; margin: 20px 0 8px; line-height: 1.3; }
.chat-markdown h1 { font-size: 1.3em; }
.chat-markdown h2 { font-size: 1.15em; }
.chat-markdown h3 { font-size: 1.05em; }
.chat-markdown ul, .chat-markdown ol { margin-bottom: 12px; padding-left: 24px; }
.chat-markdown ul { list-style: disc; }
.chat-markdown ol { list-style: decimal; }
.chat-markdown li { margin-bottom: 4px; }
.chat-markdown code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 0.875em; font-family: 'JetBrains Mono', monospace; }
.chat-markdown pre { background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; margin-bottom: 12px; }
.chat-markdown pre code { background: none; padding: 0; font-size: 0.875rem; }
.chat-markdown blockquote { border-left: 3px solid var(--primary); padding-left: 16px; margin-bottom: 12px; color: var(--text-muted); }
.chat-markdown table { border-collapse: collapse; margin-bottom: 12px; width: 100%; }
.chat-markdown th, .chat-markdown td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.chat-markdown th { background: #f3f4f6; font-weight: 600; }
.chat-markdown a { color: #2563eb; text-decoration: underline; }
.chat-markdown hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* === Animations === */
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }

/* === Overlay === */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 40; }

/* === Responsive === */
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; inset-y: 0; left: 0; height: 100%;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .menu-btn { display: flex; }
  .overlay.show { display: block; }
  .suggestions { grid-template-columns: 1fr; }
  .mode-btn span { display: none; }
  .mode-btn { padding: 6px 10px; }
  .lang-btn span.lang-label { display: none; }
  .lang-btn { padding: 6px 8px; }
  /* Tablet adjustments */
  .main-header { padding: 10px 12px; gap: 8px; }
  .chat-container { padding: 16px 12px 24px; }
  .msg-bubble { max-width: 85%; }
}

/* === Mobile (Phone) === */
@media (max-width: 640px) {
  /* Prevent iOS zoom on input focus */
  #input { font-size: 16px; }
  
  /* Header: compact layout */
  .main-header { padding: 8px 10px; gap: 6px; }
  .mode-switcher { padding: 2px; gap: 2px; }
  .mode-btn { padding: 6px 8px; }
  .mode-btn svg { width: 16px; height: 16px; }
  .header-actions { gap: 4px; }
  .lang-btn { padding: 6px; }
  .lang-btn svg { width: 18px; height: 18px; }
  .export-btn { width: 32px; height: 32px; }
  .export-btn svg { width: 16px; height: 16px; }
  .menu-btn { width: 32px; height: 32px; }
  .menu-btn svg { width: 18px; height: 18px; }
  
  /* Messages: wider bubbles, less padding */
  .chat-container { padding: 12px 8px 20px; }
  .msg { gap: 8px; margin-bottom: 16px; }
  .msg-bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; }
  .msg-avatar { width: 28px; height: 28px; }
  .msg-avatar.assistant img { width: 14px; height: 14px; }
  .msg-avatar.user svg { width: 14px; height: 14px; }
  .chat-markdown { font-size: 14px; line-height: 1.65; }
  .chat-markdown p { margin-bottom: 8px; }
  .chat-markdown pre { padding: 12px; border-radius: 6px; }
  .chat-markdown th, .chat-markdown td { padding: 6px 8px; font-size: 12px; }
  
  /* Message actions: always visible on mobile (no hover) */
  .msg-actions { opacity: 1; position: relative; bottom: auto; right: auto; margin-top: 8px; }
  .copy-btn, .feedback-btn { padding: 4px 6px; }
  
  /* Suggestion chips: full width, larger touch targets */
  .suggestion-chips { gap: 6px; }
  .suggestion-chip { padding: 10px 14px; font-size: 13px; }
  
  /* Input area: optimized for touch */
  .input-box { padding: 10px 8px; }
  .input-box-inner { padding: 6px; border-radius: 14px; gap: 4px; }
  .upload-btn, .send-btn { width: 38px; height: 38px; }
  .mic-btn { width: 34px; height: 34px; }
  .upload-btn svg, .send-btn svg, .mic-btn svg { width: 20px; height: 20px; }
  .voice-status { font-size: 12px; padding: 6px 10px; }
  #input { font-size: 16px; min-height: 26px; padding: 6px 2px; }
  .input-hint { font-size: 11px; padding-bottom: 8px; }
  
  /* Image preview */
  .preview-thumb { width: 56px; height: 56px; }
  
  /* Chat images */
  .msg-images img { max-width: 160px; max-height: 160px; }
  
  /* Welcome page */
  .welcome { padding: 16px; padding-bottom: 32px; }
  .welcome-icon { width: 56px; height: 56px; margin-bottom: 12px; }
  .welcome-icon img { width: 32px; height: 32px; }
  .welcome h2 { font-size: 19px; }
  .welcome p { font-size: 13px; margin-bottom: 18px; }
  .suggestion { padding: 12px; border-radius: 10px; }
  .suggestion-title { font-size: 13px; }
  .suggestion-desc { font-size: 11px; }
  
  /* Sidebar */
  .sidebar { width: 85vw; max-width: 320px; }
  .logo { font-size: 16px; }
  .conv-item { padding: 12px; font-size: 13px; }
  
  /* Safe area for iPhone notch */
  .main-header { padding-top: max(8px, env(safe-area-inset-top)); }
  .input-area { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
  
  /* Typing indicator */
  .typing-dot { width: 7px; height: 7px; }
}

/* === Handoff Modal === */
.handoff-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 100;
  align-items: center; justify-content: center;
  padding: 16px;
}
.handoff-overlay.show { display: flex; }
.handoff-modal {
  background: var(--bg); border-radius: 16px;
  max-width: 440px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.handoff-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 12px;
}
.handoff-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.sales-mode .handoff-icon { background: var(--sales-light); color: var(--sales); }
.handoff-header h3 { flex: 1; font-size: 17px; font-weight: 600; }
.handoff-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.18s;
}
.handoff-close:hover { background: var(--surface-2); color: var(--text); }
.handoff-body { padding: 0 20px 16px; }
.handoff-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.handoff-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.handoff-field {
  display: flex; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.handoff-field:last-child { border-bottom: none; }
.handoff-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  min-width: 60px; flex-shrink: 0; padding-top: 1px;
}
.handoff-value { font-size: 14px; color: var(--text); word-break: break-word; }
.handoff-summary { line-height: 1.6; white-space: pre-wrap; }
.handoff-actions {
  display: flex; gap: 10px; padding: 16px 20px 20px;
}
.handoff-actions .btn-outline { flex: 1; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 500; transition: all 0.18s;
  flex: 1.5;
}
.btn-primary:hover { background: var(--primary-hover); }
body.sales-mode .btn-primary { background: var(--sales); }
body.sales-mode .btn-primary:hover { background: var(--sales-hover); }

/* === Handoff Banner in Chat === */
.handoff-banner {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px 14px;
  background: var(--primary-light); border: 1px solid var(--primary);
  border-radius: 10px; cursor: pointer; transition: all 0.18s;
}
body.sales-mode .handoff-banner {
  background: var(--sales-light); border-color: var(--sales);
}
.handoff-banner:hover { opacity: 0.9; }
.handoff-banner svg { color: var(--primary); flex-shrink: 0; }
body.sales-mode .handoff-banner svg { color: var(--sales); }
.handoff-banner-text { font-size: 13px; color: var(--text); flex: 1; }
.handoff-banner-arrow { color: var(--primary); font-size: 14px; }
body.sales-mode .handoff-banner-arrow { color: var(--sales); }

/* === Voice Input === */
.mic-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.2s; flex-shrink: 0;
}
.mic-btn:hover { background: var(--surface-2); color: var(--text); }
.mic-btn.recording {
  background: #ef4444; color: #fff;
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.voice-status {
  display: none; align-items: center; gap: 8px;
  padding: 8px 12px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; color: var(--text-muted);
}
.voice-status.show { display: flex; }

.voice-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444; flex-shrink: 0;
  animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.voice-status-text { flex: 1; }

.voice-cancel {
  padding: 4px 12px; border-radius: 6px;
  font-size: 12px; color: var(--text-muted);
  border: 1px solid var(--border); transition: all 0.15s;
}
.voice-cancel:hover { background: var(--surface-2); color: var(--text); }

/* === Print / Export === */
@media print {
  .sidebar, .main-header, .input-area, .msg-actions, .suggestion-chips { display: none !important; }
  .messages { overflow: visible !important; }
  .chat-container { max-width: 100% !important; padding: 0 !important; }
  .msg-bubble { max-width: 100% !important; border: 1px solid #ccc !important; }
  body { font-size: 12pt; }
}
