// ==================== 品牌色变量 ====================
$brand-color: #0055AA;
$brand-color-light: #EBF5FF;
$brand-color-hover: #004488;

.sidebar-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
}

// ==================== 侧边栏 ====================
.sidebar {
    width: 256px;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    color: #333;
    flex-shrink: 0;
    transition: width 0.3s ease;
    border-right: 1px solid #f1f5f9;
    z-index: 50;
    
    &.collapsed {
        width: 80px;
        overflow: visible;
        
        .sidebar-header {
            padding: 16px 0;
            justify-content: center;
        }
        
        .nav-item {
            justify-content: center;
            padding: 12px;
            border-radius: 8px;
            margin: 0 12px;
            
            span {
                display: none;
            }
        }
        
        .user-section {
            justify-content: center;
            padding: 16px;
            
            .user-name {
                display: none;
            }
        }
    }
}

.sidebar-header {
    height: 64px;
    padding: 0 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.collapse-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    background: transparent;
    border: none;
    transition: all 0.2s;
    flex-shrink: 0;
    
    &:hover {
        background: #f1f5f9;
        color: #64748b;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    
    .logo-img {
        height: 32px;
        width: auto;
        border-radius: 8px;
        object-fit: contain;
    }
    
    .logo-text {
        font-size: 16px;
        font-weight: 600;
        color: #1e293b;
        letter-spacing: -0.02em;
    }
}

// 导航菜单
.nav-menu {
    flex: 1;
    padding: 8px 12px;
}

.nav-section {
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    
    &:hover {
        background: $brand-color-light;
        color: $brand-color;
    }
    
    &.active {
        background: $brand-color;
        color: #fff;
        box-shadow: 0 4px 12px rgba($brand-color, 0.25);
    }
    
    span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

// 用户信息
.user-section {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s;
    
    &:hover {
        background: #f1f5f9;
    }
    
    .user-info-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .user-avatar {
        position: relative;
        flex-shrink: 0;
    }
    
    .user-name {
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

// ==================== 主内容区 ====================
.main-content {
    flex: 1;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
}
