Text this: Closed-form dynamic stability criterion for elastic-plastic structures under near-fault ground motions