Optimizing rates and sources of nutrient input to mitigate nitrogen, phosphorus, and carbon losses from rice paddies