Structural basis and dynamics of multidrug recognition in a minimal bacterial multidrug resistance system