.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width-0);
    height: 100vh;
    background-color: var(--sidebar-color);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-menu {
    flex: 1;
    padding-top: 5rem;
    overflow-y: auto;
}

.nav-item {
    position: relative;
    padding: 0.1rem 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
    color: rgb(115, 115, 116);
    border-radius: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(220, 232, 249, 0.25);
    color: rgb(132, 149, 197);
}

.nav-link:hover svg {
    fill: rgb(132, 149, 197);
}

.nav-link.active {
    background-color: rgba(220, 232, 249, 0.4);
    color: rgb(44, 77, 161);
}

.nav-link.active svg {
    fill: rgb(44, 77, 161, 0.8);
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

/* 圆角三角形指示器样式 */
.arrow {
    width: 0.8rem;
    height: 0.7rem;
    margin-left: auto;
    transition: transform 0.3s ease;
    position: relative;
}

.arrow:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(202, 211, 233);
    clip-path: polygon(50% 70%, 20% 30%, 80% 30%);
}

.nav-item.active .arrow {
    transform: rotate(180deg);
}

.nav-item.active .arrow:before {
    background-color: rgb(130, 152, 207);
}

/* 二级菜单样式 */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 1rem;
    padding-top: 0.1rem;
}

.nav-item.active .submenu {
    max-height: 900px;
}

.submenu .nav-link {
    font-size: 0.85rem;
    border-left: none;
    padding: 0.7rem 0;
    padding-left: 2.2rem;
    padding-right: 2.2rem;
    margin-top: 0.1rem;
    margin-left: 0.7rem;
}

.submenu .nav-link.active {
    background-color: rgba(226, 237, 252, 0.28);
    color: rgb(44, 77, 161, 0.9);
}



/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-1);
    }
    
    .logo h1, .nav-link span, .arrow {
        display: none;
    }
    
    .logo {
        justify-content: center;
        padding: 20px 10px;
    }
    
    .logo i {
        margin-right: 0;
    }
    
    .nav-link {
        justify-content: center;
        padding: 16px 10px;
    }
    
    .nav-link i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .submenu .nav-link {
        padding-left: 0.66rem;
        font-size: 0.7rem;
        justify-content: flex-start;
    }
    
    .submenu .nav-link:before {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        flex-direction: column;
    }

    .logout-text {
        display: none;
    }

    .logout-svg {
        margin-top: 0.29rem; 
        margin-left: -0.3rem;

    }
}