/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 240px;
    height: calc(100vh - 70px);
    background-color: hsl(var(--sidebar-background));
    border-right: 1px solid hsl(var(--sidebar-border));
    overflow-y: auto;
    z-index: 900;
    transition: transform 0.3s ease;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 16px 12px;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: hsl(var(--sidebar-foreground));
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-link:hover {
    background-color: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-primary));
}

.sidebar-link.active {
    background-color: hsl(var(--sidebar-primary) / 0.1);
    color: hsl(var(--sidebar-primary));
}

.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-label {
    font-size: 15px;
    font-weight: 500;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    border-top: 1px solid hsl(var(--sidebar-border));
    background-color: hsl(var(--sidebar-background));
}

.sidebar-footer-item {
    margin-bottom: 4px;
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 800;
}

.sidebar-overlay.show {
    display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        top: 0;
        height: 100vh;
        z-index: 1000;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-wrapper {
        padding-left: 0 !important;
    }
}

/* 调整主内容区域以适应侧边栏 */
@media (min-width: 769px) {
    .main-wrapper {
        margin-left: 240px;
    }
}
