Joint optimization of condition-based maintenance and component reallocation for phased-mission balanced systems with flexible structure considering imperfect substitution