/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sidebar-brand.clickable {
    cursor: pointer;
}

.logo {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* Sidebar Large Profile Avatar */
.sidebar-avatar-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 12px;
}

.sidebar-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--ekho-purple));
    border: 3px solid rgba(99, 102, 241, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-avatar:hover {
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.35);
    transform: scale(1.03);
}

.sidebar-avatar-initial {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.sidebar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-avatar-img:not(.hidden) ~ .sidebar-avatar-initial {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent);
    color: white;
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-footer .settings-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.ask-ekho-sidebar-btn {
    position: relative;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 16px !important;
    margin-bottom: 8px;
    border-radius: 14px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s ease !important;
}

.ask-ekho-sidebar-gif {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(147, 78, 134, 0.4));
}

.ask-ekho-sidebar-btn span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.ask-ekho-sidebar-btn:hover {
    background: var(--bg-card-hover) !important;
    border-color: rgba(147, 78, 134, 0.4) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(147, 78, 134, 0.2);
}

.ask-ekho-sidebar-btn:hover .ask-ekho-sidebar-gif {
    filter: drop-shadow(0 6px 16px rgba(147, 78, 134, 0.5));
}

.ask-ekho-mobile-nav {
    display: none;
}

/* ── Responsive: sidebar avatar ── */

/* Smaller desktops - reduce avatar size */
@media (max-width: 1024px) {
    .sidebar-avatar-section {
        padding: 14px 14px 8px;
    }
    .sidebar-avatar {
        width: 90px;
        height: 90px;
        border-width: 2px;
    }
    .sidebar-avatar-initial {
        font-size: 32px;
    }
}

/* Tablets - sidebar becomes horizontal, hide large avatar */
@media (max-width: 768px) {
    .sidebar-avatar-section {
        display: none;
    }
}


.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-top: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

