How AI is reshaping middle management