why i cant rotate to close the lid
You need to change the Transform Orientation. In some case, changing to local orientation will work, but in your case, you need to create a new referential :

Create specific Transform Orientation

On edit mode, select an edge that has the correct direction for the pivot of the box. (for example the edge on the bottom of the lid )

Press n to open the right menu in the 3D view. Find the "Transform Orientations" menu and press on the little +. This will create a new orientation that you will use for your rotation.

Go back on object mode and change the transform orientation (on the bottom of the 3d view) to your newly created orientation wich should be named "Edge" or "Edge.00x". 

You can now use the 3d manipulator to rotate the top of your box along the newly referential created.