Refining Lagrange's four-square theorem