Mesoscopic theory of granular fluids