Court OKs 'mind-numbingly complex' pay averaging plan