:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #f8fafc;
    --card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --chat-ai: #f1f5f9;
    --chat-user: #6366f1;
    --shadow: 0 4px 12px -2px rgba(0,0,0,0.05);
}

.dark-mode {
    --bg: #0f172a;
    --card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --chat-ai: #334155;
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; transition: background 0.3s, color 0.3s; }
body { 
    margin: 0; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text-main);
    height: 100dvh; overflow: hidden;
}

.app-shell { max-width: 600px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; background: var(--card); box-shadow: var(--shadow); }

.main-header { padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.05); }
.brand h1 { font-size: 1.1rem; margin: 0; font-weight: 700; color: var(--primary); }
.status { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.dot { width: 6px; height: 6px; background: #10b981; border-radius: 50%; display: inline-block; }

.chat-viewport { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; scroll-behavior: smooth; }
.chat-bubble { max-width: 85%; padding: 0.8rem 1.2rem; border-radius: 1.2rem; font-size: 0.95rem; line-height: 1.5; }
.chat-bubble.ai { background: var(--chat-ai); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble.user { background: var(--chat-user); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

.input-container { padding: 1rem; background: var(--card); border-top: 1px solid rgba(0,0,0,0.05); }
.input-wrapper { display: flex; gap: 0.8rem; background: var(--chat-ai); padding: 0.4rem; border-radius: 999px; align-items: center; }
input { flex: 1; border: none; background: transparent; padding: 0.6rem 1rem; outline: none; color: var(--text-main); font-size: 1rem; }
#sendBtn { background: var(--primary); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#sendBtn svg { width: 18px; height: 18px; }

.suggestion-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.suggestion-bar div { background: var(--chat-ai); padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; white-space: nowrap; cursor: pointer; border: 1px solid rgba(0,0,0,0.05); }

.icon-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; }
.icon-btn svg { width: 24px; height: 24px; }

.install-banner { background: var(--primary); color: white; padding: 0.8rem 1.5rem; display: none; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.install-banner button { background: white; color: var(--primary); border: none; padding: 4px 12px; border-radius: 6px; font-weight: 600; }

/* SwiftAlert Custom */
.swiftalert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.swiftalert-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center;
  animation: swiftalertFade 0.2s ease;
}

.swiftalert-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.swiftalert-text {
  font-size: 14px;
  margin-bottom: 20px;
  color: #333;
}

.swiftalert-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
}

.swiftalert-btn:hover {
  background: #1e4fd8;
}

@keyframes swiftalertFade {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}