:root {

    --sidebar-width: 260px;

    --sidebar-width-large: 280px;

    --sidebar-width-mobile: 70px;

}



.sidebar {

    width: var(--sidebar-width);

    height: 100vh;

    min-height: 100vh;

    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    padding: 20px 0;

    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);

    position: fixed;

    left: 0;

    top: 0;

    z-index: 100;

    border-right: 1px solid rgba(0, 0, 0, 0.04);

    box-sizing: border-box;

}



.sidebar .logo {

    margin-bottom: 24px;

    width: 100%;

    display: flex;

    justify-content: center;

}



.sidebar .logo-icon {
    width: calc(100% - 16px);
    max-width: 200px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12px;
}

.sidebar .logo-icon img {
    width: 100%;
    height: auto;
}

.sidebar .logo-icon:hover {
    transform: rotate(10deg) scale(1.05);
}



.sidebar .nav-menu {

    display: flex;

    flex-direction: column;

    gap: 4px;

    width: 100%;

    padding: 0 8px;

    align-items: center;

    flex: 1;

    overflow-y: auto;

}



.sidebar .nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: calc(100% - 24px) !important;
    max-width: 240px !important;
    padding: 10px 15px !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    border-radius: 14px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
}



.sidebar .nav-item:hover {

    background: #f3f4f6;

    color: #374151;

}



.sidebar .nav-item.active {

    background: #fef3f2;

    color: #374151;

}



.sidebar .nav-item svg {

    width: 20px;

    height: 20px;

    flex-shrink: 0;

}



.sidebar .nav-divider {

    height: 1px;

    background: #e5e7eb;

    margin: 12px 0;

    width: 100%;

}



.sidebar .user-section {

    margin-top: auto;

    padding: 16px 14px;

    margin: auto 0 8px;

    box-sizing: border-box;

    background: linear-gradient(180deg, rgba(247,84,68,0.05) 0%, rgba(255,120,117,0.05) 100%);

    border-radius: 16px;

    width: calc(100% - 16px);

    max-width: 220px;

}



.sidebar .user-avatar {

    margin-bottom: 12px;

    display: flex;

    justify-content: center;

}



.sidebar .avatar {

    width: 52px;

    height: 52px;

    border-radius: 50%;

    background: linear-gradient(135deg, #f75444 0%, #ff7875 100%);

    display: flex;

    align-items: center;

    justify-content: center;

    color: #ffffff;

    font-size: 20px;

    font-weight: 600;

}



.sidebar .avatar.guest {

    background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 100%);

}



.sidebar .user-info {

    text-align: center;

}



.sidebar .user-name {

    font-size: 14px;

    font-weight: 500;

    color: #1f2937;

    margin-bottom: 4px;

}



.sidebar .user-role {

    font-size: 12px;

    color: #9ca3af;

}



.sidebar .login-btn {

    width: 100%;

    padding: 10px;

    background: linear-gradient(135deg, #f75444 0%, #ff7875 100%);

    border: none;

    border-radius: 12px;

    color: #ffffff;

    cursor: pointer;

    font-size: 14px;

    font-weight: 500;

    margin-top: 12px;

    transition: all 0.3s ease;

}



.sidebar .login-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(247, 84, 68, 0.4);

}



.sidebar .logout-btn {

    width: 100%;

    padding: 10px;

    background: #f3f4f6;

    border: none;

    border-radius: 12px;

    color: #6b7280;

    cursor: pointer;

    font-size: 14px;

    font-weight: 500;

    margin-top: 12px;

    transition: all 0.3s ease;

}



.sidebar .logout-btn:hover {

    background: #e5e7eb;

}



.sidebar .recharge-link {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 14px 16px;

    background: transparent;

    border-radius: 12px;

    color: #6b7280;

    text-decoration: none;

    transition: all 0.3s ease;

    margin: 4px 0;

    cursor: pointer;

    box-sizing: border-box;

    width: calc(100% - 16px);

    max-width: 220px;

}

.sidebar .recharge-link:hover {

    background: #f3f4f6;

    color: #374151;

}

.sidebar .recharge-link svg {

    width: 20px;

    height: 20px;

    flex-shrink: 0;

}

.sidebar .recharge-link span {

    font-size: 15px;

    font-weight: 500;

}



@media (min-width: 1920px) and (max-width: 2559px) {

    .sidebar {

        width: var(--sidebar-width-large);

        padding: 24px 0;

    }



    .sidebar .logo-icon {
        width: calc(100% - 32px);
        max-width: 170px;
    }

    .sidebar .logo-icon img {
        width: 100%;
        height: auto;
    }



    .sidebar .nav-item {

        padding: 14px 16px;

        font-size: 15px;

        max-width: 170px;

    }



    .sidebar .nav-item svg {

        width: 20px;

        height: 20px;

    }



    .sidebar .avatar {

        width: 52px;

        height: 52px;

        font-size: 20px;

    }



    .sidebar .user-section {

        max-width: 170px;

        padding: 20px 16px;

    }



    .sidebar .recharge-link {

        padding: 14px 16px;

        max-width: 170px;

    }



    .sidebar .recharge-link svg {

        width: 20px;

        height: 20px;

    }



    .sidebar .recharge-link span {

        font-size: 15px;

    }

}



@media (min-width: 2560px) {

    .sidebar {

        width: calc(var(--sidebar-width) * 1.3);

        padding: 28px 0;

    }



    .sidebar .logo-icon {
        width: calc(100% - 36px);
        max-width: 190px;
    }

    .sidebar .logo-icon img {
        width: 100%;
        height: auto;
    }



    .sidebar .nav-item {

        padding: 16px 18px;

        font-size: 16px;

        max-width: 190px;

        gap: 14px;

    }



    .sidebar .nav-item svg {

        width: 22px;

        height: 22px;

    }



    .sidebar .avatar {

        width: 56px;

        height: 56px;

        font-size: 22px;

    }



    .sidebar .user-section {

        max-width: 190px;

        padding: 24px 18px;

    }



    .sidebar .user-name {

        font-size: 15px;

    }



    .sidebar .user-role {

        font-size: 13px;

    }



    .sidebar .login-btn,

    .sidebar .logout-btn {

        padding: 12px;

        font-size: 15px;

    }



    .sidebar .recharge-link {

        padding: 16px 18px;

        max-width: 190px;

        gap: 14px;

    }



    .sidebar .recharge-link svg {

        width: 22px;

        height: 22px;

    }



    .sidebar .recharge-link span {

        font-size: 16px;

    }

}



@media (max-width: 768px) {

    .sidebar {

        width: var(--sidebar-width-mobile);

        padding: 20px 0;

    }



    .sidebar .nav-item span {

        display: none;

    }



    .sidebar .recharge-link span {

        display: none;

    }



    .sidebar .user-section {

        display: none;

    }



    .sidebar .nav-item {

        justify-content: center;

        max-width: 48px;

    }



    .sidebar .recharge-link {

        justify-content: center;

        max-width: 48px;

    }

    .sidebar .logo-icon {
        width: 48px;
        max-width: 48px;
    }

    .sidebar .logo-icon img {
        width: 100%;
        height: auto;
    }

}