.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    padding: 16px;
    gap: 16px;
    flex-shrink: 0;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    padding-bottom: 8px;
}

.new-chat {
    width: 100%;
    background-color: #2b2c2f;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.new-chat:hover {
    background-color: var(--btn-hover);
    border-color: #4a4d51;
}

#history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}


/* History Items (JS Generated) */

.chat-history-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s ease;
}

.chat-history-item:hover {
    background-color: var(--user-msg-bg);
}

.chat-history-item.active {
    background-color: #333538;
}