/* 侧边导航栏美化样式 */
.sidenav,
#sidebar-nav.sidenav,
div.sidenav {
    background: linear-gradient(135deg, #e3f2fd 0%, #6ba1e2 100%) !important;
    border: none !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 侧边栏头部用户信息 */
.sidenav-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.user-info {
    color: #569aed;
}

.user-avatar {
    margin-bottom: 12px;
}

.user-avatar i {
    font-size: 60px;
    color: #569aed;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-details h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #569aed;
}

.user-details p {
    font-size: 14px;
    margin: 0;
    color: #424242;
}

/* 导航区域 */
.nav-section {
    margin-bottom: 20px;
    padding: 0 15px;
}

.nav-section-title {
    color: #569aed;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: rgba(25, 118, 210, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.nav-section-title i {
    margin-right: 10px;
    font-size: 16px;
}

/* 导航列表 */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 3px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.2);
}

.nav-item.active {
    background: rgba(25, 118, 210, 0.1);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.2);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #424242;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: #1976d2;
    background: rgba(25, 118, 210, 0.1);
    text-decoration: none;
}

.nav-link i {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

.nav-link span {
    font-weight: 500;
    font-size: 15px;
}

/* 侧边栏切换按钮美化 */
.sidebar-toggle {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.sidebar-toggle i {
    color: white;
    font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 991px) {
    .sidenav,
    #sidebar-nav.sidenav,
    div.sidenav {
        background: linear-gradient(135deg, #e3f2fd 0%, #66a0e7 100%) !important;
    }
    
    .sidenav-header {
        padding: 20px 15px;
    }
    
    .user-avatar i {
        font-size: 50px;
    }
    
    .user-details h4 {
        font-size: 16px;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .nav-link i {
        font-size: 16px;
        margin-right: 12px;
    }
    
    .nav-link span {
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slideInLeft 0.5s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }
.nav-item:nth-child(7) { animation-delay: 0.7s; }
.nav-item:nth-child(8) { animation-delay: 0.8s; }

/* 滚动条美化 */
.sidenav::-webkit-scrollbar {
    width: 6px;
}

.sidenav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidenav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidenav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
