* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f172a; color: #e2e8f0; height: 100vh; }

.app { display: flex; height: 100vh; }

/* Sidebar */
.sidebar { width: 240px; background: #1e293b; border-right: 1px solid #334155; display: flex; flex-direction: column; padding: 16px; }
.sidebar-header { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.sidebar-header .logo { font-size: 24px; }
.sidebar-header h1 { font-size: 16px; font-weight: 700; }
.nav-btn { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: transparent; color: #94a3b8; border-radius: 8px; font-size: 14px; cursor: pointer; margin-bottom: 4px; }
.nav-btn:hover { background: #334155; color: #e2e8f0; }
.nav-btn.active { background: #334155; color: #e2e8f0; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background: #22c55e; }

/* Chat */
.chat-area { flex: 1; display: flex; flex-direction: column; }
.chat-header { padding: 16px 24px; border-bottom: 1px solid #334155; }
.chat-header h2 { font-size: 16px; font-weight: 600; }

.messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.message { display: flex; gap: 10px; max-width: 80%; }
.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: #334155; }
.message.user .avatar { background: #3b82f6; }
.bubble { background: #1e293b; border: 1px solid #334155; padding: 12px 16px; border-radius: 4px 16px 16px 16px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.message.user .bubble { background: #1e3a5f; border-color: #2563eb; border-radius: 16px 4px 16px 16px; }
.bubble strong { color: #f8fafc; }

/* Input */
.input-area { padding: 16px 24px; border-top: 1px solid #334155; display: flex; gap: 10px; }
#input { flex: 1; background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 12px 16px; color: #e2e8f0; font-size: 14px; outline: none; }
#input:focus { border-color: #3b82f6; }
#send { background: #3b82f6; color: white; border: none; border-radius: 10px; padding: 12px 20px; font-size: 14px; font-weight: 600; cursor: pointer; }
#send:hover { background: #2563eb; }
#send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Loading */
.typing { display: flex; gap: 4px; padding: 8px 0; }
.typing span { width: 6px; height: 6px; background: #64748b; border-radius: 50%; animation: bounce 1.4s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 768px) {
  .sidebar { display: none; }
}
