* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f0f4f8;
    color: #1a2b3c;
    height: 100vh;
    display: flex;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e8ecf0;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.tagline {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4px;
    margin-left: 46px;
    margin-bottom: 32px;
}

.sidebar-nav { flex: 1; }

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 600;
}

.topic-list { list-style: none; }

.topic-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
}

.topic-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-footer {
    border-top: 1px solid #e8ecf0;
    padding-top: 16px;
}

.clear-btn {
    width: 100%;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.clear-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.disclaimer {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 12px;
    line-height: 1.4;
}

/* ===== CHAT AREA ===== */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f8fafc;
}

.chat-header {
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #e8ecf0;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.chat-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.status-text {
    font-size: 0.75rem;
    color: #22c55e;
}

/* Messages */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    max-width: 75%;
    animation: fadeIn 0.3s ease;
}

.message.user { align-self: flex-end; }
.message.assistant { align-self: flex-start; }

.message-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
    background: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.message-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 6px;
    opacity: 0.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Welcome */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 40px;
}

.welcome-icon { font-size: 3.5rem; margin-bottom: 16px; }

.welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.welcome p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.suggestion-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-chips button {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.suggestion-chips button:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

/* Input */
.input-area {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #e8ecf0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-area input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.input-area input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.input-area input::placeholder { color: #94a3b8; }

.input-area button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hidden { display: none !important; }

/* Streaming cursor */
.cursor {
    animation: blink 0.8s infinite;
    font-weight: 300;
    color: #0ea5e9;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.stream-text {
    margin: 0;
}
