Top-to-bottom Ekman layer and its implications for shallow rotating flows