/* ═══════════════════════════════════════════════════════════
   AI Voice Assistant — Demo Hub Styles
   Premium dark theme with glassmorphism accents
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.5);
  --text-primary: #f0f0f5;
  --text-secondary: #8b8b9e;
  --text-muted: #55556a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.kb-upload input[type='file'] {
  padding: 0.35rem 0.45rem;
}

.kb-upload input[type='file']::file-selector-button {
  margin-right: 0.45rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  padding: 0.16rem 0.5rem;
  cursor: pointer;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════ LANDING ═══════════ */
.landing {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(139,92,246,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.landing-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  padding: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

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

.logo-mark {
  margin-bottom: 1.5rem;
  display: inline-block;
  filter: drop-shadow(0 0 24px var(--accent-glow));
}

.landing-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.profile-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.profile-auth select,
.profile-auth button {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 0.75rem;
}

.profile-auth select {
  min-width: 260px;
}

.profile-auth button {
  cursor: pointer;
}

.profile-auth button:hover {
  border-color: var(--border-active);
}

.profile-auth-hint {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-bottom: 1.4rem;
}

/* ── Demo Cards ────────────────────────────────────────── */
.demo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.demo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--accent-glow));
  opacity: 0;
  transition: opacity var(--transition);
}

.demo-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 40px var(--accent-glow);
}

.demo-card:hover::before { opacity: 1; }

.demo-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.demo-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  position: relative;
}

.demo-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
}

/* ═══════════ WORKSPACE ═══════════ */
.workspace {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  animation: fadeInUp 0.4s ease-out;
}

/* ── Header ────────────────────────────────────────────── */
.ws-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
}
.btn-back:hover { color: var(--text-primary); background: var(--bg-card); }

.ws-header-info { flex: 1; }

.ws-sessions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ws-sessions select,
.ws-sessions button {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 0.6rem;
  font-size: 0.78rem;
}

.ws-sessions select {
  min-width: 240px;
  max-width: 360px;
}

.ws-sessions button {
  cursor: pointer;
}

.ws-sessions button:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.ws-mode-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  background: rgba(99,102,241,0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.15rem;
}

.ws-title {
  font-size: 1rem;
  font-weight: 600;
}

.ws-profile {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.ws-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

.ws-status[data-state="listening"] .status-dot { background: var(--error); animation: pulse 1s infinite; }
.ws-status[data-state="thinking"] .status-dot { background: var(--warning); animation: pulse 0.6s infinite; }
.ws-status[data-state="speaking"] .status-dot { background: var(--accent); animation: pulse 0.8s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

@media (max-width: 980px) {
  .ws-sessions {
    display: none;
  }
}

/* ── Chat Area ─────────────────────────────────────────── */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.chat-messages {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Message bubbles */
.msg {
  display: flex;
  gap: 0.6rem;
  animation: msgIn 0.3s ease-out;
}

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

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.msg.user .msg-avatar { background: var(--accent); color: #fff; }
.msg.assistant .msg-avatar { background: rgba(139,92,246,0.2); color: var(--accent-light); }
.msg.system .msg-avatar { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.msg-body { flex: 1; min-width: 0; }

.msg-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msg-content {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.msg.user .msg-content {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.2);
}

.msg.assistant .msg-content {
  background: var(--bg-glass);
}

/* Action chips */
.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  border: 1px solid;
}

.action-chip.crm { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.action-chip.calendar { color: #3b82f6; border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.action-chip.rag { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.action-chip.db { color: #8b5cf6; border-color: rgba(139,92,246,0.3); background: rgba(139,92,246,0.08); }
.action-chip.error { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }

/* Audio play button in message */
.msg-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.msg-audio-btn:hover { background: rgba(99,102,241,0.2); }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.9rem;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ── Help & KB Panel ───────────────────────────────────── */
.help-panel {
  border-top: 1px solid var(--border);
  background: rgba(14, 14, 24, 0.92);
  flex-shrink: 0;
}

.help-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}
.help-toggle:hover { color: var(--text-primary); }
.help-toggle .chevron { transition: transform var(--transition); margin-left: auto; }
.help-toggle.open .chevron { transform: rotate(180deg); }

.help-content {
  padding: 0 1.25rem 0.9rem;
  border-top: 1px solid var(--border);
  max-height: 46vh;
  overflow-y: auto;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.help-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
}

.help-card h4 {
  font-size: 0.77rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.help-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.help-card li {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
  position: relative;
  padding-left: 0.72rem;
}

.help-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-light);
}

.kb-docs {
  margin-top: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
}

.kb-docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.kb-docs-header h4 {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kb-refresh {
  font-size: 0.7rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  padding: 0.22rem 0.55rem;
  cursor: pointer;
}
.kb-refresh:hover { background: rgba(99, 102, 241, 0.2); }

.kb-upload {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.kb-upload input,
.kb-upload textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  padding: 0.45rem 0.6rem;
  font-size: 0.73rem;
  font-family: var(--font);
}

.kb-upload textarea {
  min-height: 70px;
  resize: vertical;
  line-height: 1.4;
}

.kb-upload-actions {
  display: flex;
  justify-content: flex-end;
}

.amo-preview-box {
  margin-bottom: 0.55rem;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(99, 102, 241, 0.06);
}

.amo-preview-btn {
  font-size: 0.7rem;
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  padding: 0.22rem 0.65rem;
  cursor: pointer;
}

.amo-preview-btn:hover {
  background: rgba(99, 102, 241, 0.24);
}

.amo-preview-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.amo-preview-hint {
  margin-top: 0.32rem;
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.amo-preview-hint code {
  color: var(--accent-light);
  font-size: 0.64rem;
}

.kb-upload-btn,
.kb-open-btn,
.kb-doc-preview-head button {
  font-size: 0.68rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

.kb-upload-btn:hover,
.kb-open-btn:hover,
.kb-doc-preview-head button:hover {
  background: rgba(99, 102, 241, 0.2);
}

.kb-docs-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.kb-filter-input {
  width: 100%;
  margin-bottom: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  padding: 0.42rem 0.55rem;
  font-size: 0.72rem;
  font-family: var(--font);
}

.kb-docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.4rem;
}

.kb-doc-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.48rem 0.55rem;
}

.kb-doc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.kb-doc-source {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-doc-chunks {
  font-size: 0.66rem;
  color: var(--warning);
  white-space: nowrap;
}

.kb-doc-meta {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.kb-doc-actions {
  margin-top: 0.35rem;
  display: flex;
  justify-content: flex-end;
}

.kb-doc-empty {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.kb-doc-preview {
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.kb-doc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

.kb-doc-preview-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.kb-doc-preview-head strong {
  font-size: 0.73rem;
  color: var(--text-primary);
}

.kb-doc-preview-body {
  max-height: 260px;
  overflow: auto;
  padding: 0.45rem;
  display: grid;
  gap: 0.4rem;
}

.kb-chunk-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.kb-chunk-head {
  padding: 0.3rem 0.45rem;
  font-size: 0.66rem;
  color: var(--accent-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-chunk-content {
  padding: 0.35rem 0.45rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ── Help Meta (model + pipeline) ─────────────────────── */
.help-meta {
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
}
.help-meta-row {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.help-meta-row strong {
  color: var(--accent-light);
  font-weight: 600;
}
.help-card-wide {
  grid-column: 1 / -1;
}

/* ── Confidence Bar in Messages ───────────────────────── */
.msg-confidence {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 0.7rem;
}
.conf-bar {
  flex: 0 0 80px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.conf-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.conf-high .conf-fill { background: var(--success); }
.conf-mid .conf-fill { background: var(--warning); }
.conf-low .conf-fill { background: var(--error); }
.conf-label { color: var(--text-muted); }
.conf-model {
  margin-left: auto;
  color: var(--accent-light);
  font-weight: 500;
  font-size: 0.65rem;
  background: rgba(99,102,241,0.12);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

/* ── Agent Pipeline in Messages ───────────────────────── */
.msg-pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
.pipe-agent {
  font-size: 0.62rem;
  background: rgba(99,102,241,0.1);
  color: var(--accent-light);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,0.2);
  white-space: nowrap;
}
.pipe-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* ── Citations in Messages ────────────────────────────── */
.msg-citations {
  margin-top: 0.4rem;
  padding: 0.4rem 0.55rem;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm);
}
.citations-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 0.25rem;
}
.citation-item {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 0.6rem;
  position: relative;
}
.citation-item::before {
  content: '📄';
  position: absolute;
  left: 0;
  font-size: 0.55rem;
}

/* ── Suggested Follow-ups ─────────────────────────────── */
.msg-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.followup-btn {
  font-size: 0.7rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.08);
  color: var(--accent-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.followup-btn:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--accent);
}

/* ── Voice Bar ─────────────────────────────────────────── */
.voice-bar {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 0.75rem 1.25rem;
  flex-shrink: 0;
}

.voice-bar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-voice {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(99,102,241,0.1);
  color: var(--accent-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}
.btn-voice:hover { background: rgba(99,102,241,0.2); transform: scale(1.05); }
.btn-voice.recording {
  border-color: var(--error);
  background: rgba(239,68,68,0.15);
  color: var(--error);
  animation: recordPulse 1.5s infinite;
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

.text-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  transition: border-color var(--transition);
}
.text-input-wrap:focus-within { border-color: var(--accent); }

.text-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
}
.text-input-wrap input::placeholder { color: var(--text-muted); }

.btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-send:hover { background: var(--accent-light); transform: scale(1.05); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.voice-visualizer {
  max-width: 720px;
  margin: 0.5rem auto 0;
}

/* ── Welcome message ───────────────────────────────────── */
.welcome-msg {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.welcome-msg h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.welcome-msg p {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .landing-title { font-size: 1.8rem; }
  .demo-cards { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .help-content { max-height: 58vh; }
  .kb-docs-list { grid-template-columns: 1fr; }
  .ws-header { padding: 0.6rem 0.75rem; }
  .chat-area { padding: 0.75rem; }
  .voice-bar { padding: 0.5rem 0.75rem; }
}
