.voice-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.2s ease;
}

.voice-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-ready {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}
.status-ready::before {
  background: #6c757d;
}

.status-listening {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}
.status-listening::before {
  background: #198754;
  animation: pulseDot 1s infinite;
}

.status-thinking {
  background: rgba(255, 193, 7, 0.16);
  color: #b78103;
}
.status-thinking::before {
  background: #ffc107;
  animation: pulseDot 1s infinite;
}

.status-speaking {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}
.status-speaking::before {
  background: #0d6efd;
  animation: pulseDot 1s infinite;
}

.status-error {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
.status-error::before {
  background: #dc3545;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-glow-primary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  font-weight: 600;
}

.suggestion {
  border-radius: 999px;
  transition: all 0.2s ease;
}

.suggestion:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-1px);
}


.card {
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}


:root {
  --bg-main: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --border-soft: rgba(148, 163, 184, 0.25);
  --chat-bg: radial-gradient(circle at top left, #eff6ff, #f8fafc);
  --bot-bubble: #e2e8f0;
  --user-bubble: linear-gradient(135deg, #4f46e5, #2563eb);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg-main: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  --card-bg: #111827;
  --text-main: #f8fafc;
  --text-soft: #94a3b8;
  --border-soft: rgba(148, 163, 184, 0.18);
  --chat-bg: linear-gradient(180deg, #111827, #0f172a);
  --bot-bubble: #1f2937;
  --user-bubble: linear-gradient(135deg, #6366f1, #2563eb);
  --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.35);
}

body {
  background: var(--bg-main) !important;
  color: var(--text-main);
  transition: background 0.25s ease, color 0.25s ease;
}

.card {
  background: var(--card-bg) !important;
  box-shadow: var(--shadow-soft) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card-header,
.card-body,
.preview-table-wrapper,
.chat-box,
.form-control,
.alert {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.card-header {
  color: var(--text-main) !important;
  border-bottom: 1px solid var(--border-soft) !important;
}

.text-muted,
.small.text-muted,
#chartHint,
.chat-meta,
.empty-chat-subtitle,
.drop-zone-subtitle,
.kpi-label,
.hero-subtitle,
.eyebrow-label {
  color: var(--text-soft) !important;
}

.hero-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.eyebrow-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.hero-subtitle {
  max-width: 700px;
  font-size: 0.98rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(99, 102, 241, 0.05);
}

.kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.drop-zone {
  border: 1.5px dashed rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  background: rgba(99, 102, 241, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.drop-zone-active {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  transform: scale(1.01);
}

.drop-zone-icon {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.drop-zone-title {
  font-weight: 700;
  color: var(--text-main);
}

.drop-zone-subtitle {
  font-size: 0.86rem;
}

.empty-chat-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-chat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.empty-chat-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.chat-box {
  background: var(--chat-bg) !important;
  border: 1px solid var(--border-soft) !important;
}

.chat-bubble-bot {
  background: var(--bot-bubble) !important;
  color: var(--text-main) !important;
}

.chat-bubble-user {
  background: var(--user-bubble) !important;
  color: #ffffff !important;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px 2px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  animation: typingBounce 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1.15); opacity: 1; }
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  transition: all 0.18s ease;
}

.suggestion-chip:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
}

.form-control {
  background: var(--card-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--border-soft) !important;
}

.form-control::placeholder {
  color: var(--text-soft);
}

.preview-table-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border-soft) !important;
}

.preview-table-wrapper table {
  color: var(--text-main);
}

.alert-info {
  background: rgba(59, 130, 246, 0.12) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  color: var(--text-main) !important;
}

@media (max-width: 991px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 1.6rem;
  }
}