In perfect inductors the current lags the voltage by 90°. In a perfect capacitor the current leads the voltage by 90°. So the formulas for Xc & Xl don't rely on the current and voltage being in phase because that's not going to happen. If it did it wouldn't be a capacitor or inductor.
Chris