Designing sustainable cropping systems: a general framework