.assistant-page {
    padding: 7rem 0 3rem 0;
    min-height: 100vh;
}

.assistant-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    min-height: calc(100vh - 10rem);
}

.assistant-sidebar,
.assistant-chat-panel {
    border-radius: 30px;
    padding: 1.5rem;
    min-height: 0;
}

.assistant-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.sidebar-section h1 {
    font-size: 2.2rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.sidebar-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-chip {
    width: 100%;
    text-align: left;
    padding: 1rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(49, 82, 251, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.suggestion-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(49, 82, 251, 0.08);
    border-color: rgba(49, 82, 251, 0.28);
}

.assistant-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 8rem);
    max-height: calc(100vh - 8rem);
}

.assistant-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 15, 50, 0.08);
}

.assistant-chat-header h2 {
    font-size: 2rem;
    letter-spacing: -1px;
}

.secondary-btn {
    border: 1px solid rgba(49, 82, 251, 0.18);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.message {
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.assistant-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    box-shadow: 0 10px 25px rgba(49, 82, 251, 0.08);
}

.user-message .message-bubble {
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: 8px;
}

.assistant-message .message-bubble {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    border: 1px solid rgba(49, 82, 251, 0.08);
    border-bottom-left-radius: 8px;
}

.sources-box {
    margin-top: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(49, 82, 251, 0.05);
    border: 1px solid rgba(49, 82, 251, 0.1);
    font-size: 0.9rem;
}

.sources-box h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.sources-box ul {
    margin-left: 1rem;
    color: var(--text-secondary);
}

.chat-input-area {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 15, 50, 0.08);
}

.chat-input-area textarea {
    flex: 1;
    resize: none;
    min-height: 58px;
    max-height: 160px;
    border-radius: 16px;
    border: 1px solid rgba(49, 82, 251, 0.12);
    background: rgba(255, 255, 255, 0.86);
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.chat-input-area textarea:focus {
    border-color: rgba(49, 82, 251, 0.35);
    box-shadow: 0 0 0 4px rgba(49, 82, 251, 0.08);
}

.send-btn {
    align-self: flex-end;
    border: none;
    cursor: pointer;
}

.loading-dot {
    display: inline-block;
    animation: blink 1.2s infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

@media (max-width: 980px) {
    .assistant-layout {
        grid-template-columns: 1fr;
    }

    .assistant-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .assistant-chat-panel {
        min-height: 70vh;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .assistant-page {
        padding-top: 6rem;
    }

    .assistant-chat-header h2 {
        font-size: 1.6rem;
    }

    .sidebar-section h1 {
        font-size: 1.8rem;
    }

    .chat-input-area {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
    }

    .message-bubble {
        max-width: 100%;
    }
}