/* ════════════════════════════════════════════════════════════════
   KALPANĀ CHAT — Design System
   Matches the GitHub PWA aesthetic: dark glassmorphism + sky/indigo gradients
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --bg-deep: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-sky: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;
  --gradient-primary: linear-gradient(135deg, #38bdf8, #818cf8);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.1);
  --sidebar-width: 280px;
  --input-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-sky); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Utility Classes ───────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-sky { background: rgba(56,189,248,0.15); color: var(--accent-sky); }
.badge-emerald { background: rgba(52,211,153,0.15); color: var(--accent-emerald); }
.badge-indigo { background: rgba(129,140,248,0.15); color: var(--accent-indigo); }
.badge-amber { background: rgba(251,191,36,0.15); color: var(--accent-amber); }

/* ── App Layout ────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base);
  z-index: 50;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.sidebar-logo h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-logo .version {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.new-chat-btn {
  width: 100%;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  color: var(--accent-sky);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: 8px;
}
.new-chat-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-sky);
}

/* Conversation List */
.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.conv-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  position: relative;
}
.conv-item:hover { background: rgba(255,255,255,0.05); }
.conv-item.active { background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.2); }
.conv-item .conv-title {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.conv-item.active .conv-title { color: var(--text-primary); }
.conv-item .conv-delete {
  opacity: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}
.conv-item:hover .conv-delete { opacity: 1; }
.conv-item .conv-delete:hover { color: var(--accent-rose); }

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}

.model-selector {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.model-selector:focus { outline: none; border-color: var(--accent-sky); }

.usage-meter {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(15,23,42,0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}
.usage-meter .usage-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 6px;
}
.usage-meter .usage-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-deep);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.usage-meter .usage-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.sidebar-nav {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.sidebar-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,23,42,0.8);
  backdrop-filter: blur(8px);
  min-height: 56px;
}
.top-bar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.top-bar-actions button:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
}

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

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

/* Welcome State */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}
.welcome-state .welcome-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  opacity: 0.8;
  filter: drop-shadow(0 0 20px rgba(56,189,248,0.3));
}
.welcome-state h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.welcome-state p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 400px;
  margin-bottom: 32px;
}
.welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 500px;
}
.welcome-chip {
  padding: 10px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
}
.welcome-chip:hover {
  border-color: var(--accent-sky);
  color: var(--text-primary);
  background: rgba(56,189,248,0.08);
}

/* Message Bubbles */
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: messageIn 0.3s ease;
}
@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.message-avatar.user {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: white;
}
.message-avatar.assistant {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--glass-border);
}
.message-avatar.assistant img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.message-body { flex: 1; min-width: 0; }
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.message-sender {
  font-size: 13px;
  font-weight: 700;
}
.message-time {
  font-size: 10px;
  color: var(--text-muted);
}

.message-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong { color: var(--accent-sky); font-weight: 600; }
.message-content em { color: var(--accent-indigo); }
.message-content code {
  background: rgba(15,23,42,0.8);
  color: var(--accent-emerald);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}
.message-content pre {
  background: rgba(15,23,42,0.9);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 8px 0;
}
.message-content pre code {
  background: none;
  padding: 0;
  color: var(--accent-sky);
}
.message-content ul, .message-content ol {
  padding-left: 20px;
  margin: 8px 0;
}
.message-content li { margin-bottom: 4px; }
.message-content h1, .message-content h2, .message-content h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin: 12px 0 6px;
}

/* Cost Comparison Badge */
.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--accent-emerald);
  font-weight: 600;
}
.cost-badge svg { width: 12px; height: 12px; }

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-sky);
  border-radius: 50%;
  animation: typingBounce 1s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Input Bar ─────────────────────────────────────────────── */
.input-bar {
  padding: 16px 24px 24px;
  background: linear-gradient(to top, var(--bg-deep) 60%, transparent);
}
.input-wrapper {
  max-width: 768px;
  margin: 0 auto;
  position: relative;
}
.input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 8px 8px 8px 20px;
  transition: border-color var(--transition-base);
}
.input-container:focus-within {
  border-color: rgba(56,189,248,0.4);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08);
}

#chat-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 120px;
  line-height: 1.5;
  padding: 8px 0;
}
#chat-input::placeholder { color: var(--text-muted); }

.input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.input-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.input-action-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.input-action-btn.send {
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-lg);
}
.input-action-btn.send:hover { box-shadow: 0 4px 12px rgba(56,189,248,0.3); }
.input-action-btn.send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.input-footer {
  text-align: center;
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
}
.input-footer .model-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(129,140,248,0.1);
  border-radius: var(--radius-full);
  color: var(--accent-indigo);
  font-weight: 600;
}

/* ── Pages ─────────────────────────────────────────────────── */
.page { display: none; height: 100%; overflow-y: auto; }
.page.active { display: flex; flex-direction: column; }

/* ── Pricing Page ──────────────────────────────────────────── */
.pricing-page {
  padding: 48px 24px;
  overflow-y: auto;
}
.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}
.pricing-header h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
}
.pricing-header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.pricing-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow);
}
.pricing-card.featured {
  border-color: rgba(56,189,248,0.3);
  box-shadow: 0 0 60px rgba(56,189,248,0.1);
}
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: 16px;
  right: -28px;
  background: var(--gradient-primary);
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 32px;
  transform: rotate(45deg);
}
.pricing-card .plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pricing-card .plan-price {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 4px;
}
.pricing-card .plan-price span { font-size: 16px; color: var(--text-muted); font-weight: 500; }
.pricing-card .plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.pricing-card .plan-features {
  list-style: none;
  margin-bottom: 32px;
}
.pricing-card .plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-card .plan-features li svg { width: 16px; height: 16px; color: var(--accent-emerald); flex-shrink: 0; }
.pricing-card .plan-features li.disabled { color: var(--text-muted); }
.pricing-card .plan-features li.disabled svg { color: var(--text-muted); }
.pricing-card .plan-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

.savings-banner {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 24px 32px;
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.15);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--accent-emerald);
}
.savings-banner svg { width: 32px; height: 32px; flex-shrink: 0; }
.savings-banner .savings-text h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.savings-banner .savings-text p { font-size: 12px; color: var(--text-secondary); }

/* ── Knowledge Packs Page ──────────────────────────────────── */
.packs-page { padding: 48px 24px; overflow-y: auto; }
.packs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 768px;
  margin: 0 auto 32px;
}
.packs-header h2 { font-size: 24px; font-weight: 800; }
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 768px;
  margin: 0 auto;
}
.pack-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  transition: all var(--transition-base);
  cursor: pointer;
}
.pack-card:hover { border-color: rgba(52,211,153,0.3); }
.pack-card.active { border-color: var(--accent-emerald); box-shadow: 0 0 30px rgba(52,211,153,0.1); }
.pack-card .pack-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pack-card .pack-spec { font-size: 11px; color: var(--accent-emerald); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.pack-card .pack-meta {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
}
.pack-card .pack-meta span { display: flex; align-items: center; gap: 4px; }
.pack-card .pack-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.pack-card .pack-actions button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pack-card .pack-actions button:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.upload-zone {
  border: 2px dashed rgba(52,211,153,0.3);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  max-width: 768px;
  margin: 0 auto 24px;
}
.upload-zone:hover { border-color: var(--accent-emerald); background: rgba(52,211,153,0.04); }
.upload-zone svg { width: 40px; height: 40px; color: var(--accent-emerald); margin-bottom: 12px; }
.upload-zone h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.upload-zone p { font-size: 12px; color: var(--text-muted); }

/* ── Active Pack Indicator ─────────────────────────────────── */
.active-pack-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.active-pack-pill .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Mobile Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 100;
    box-shadow: 10px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .sidebar-overlay.active { display: block; }
  .hamburger-btn { display: block; }
  .chat-container { padding: 0 16px; }
  .input-bar { padding: 12px 16px 16px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .welcome-state h2 { font-size: 22px; }
}

/* ── Loading Spinner ───────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--accent-sky);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast Notification ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }
