Firstly, the default shift settings can be configured in the Admin Console under Settings => Shifts => Defaults, as shown in the following screenshot. The relevant setting field is called "Work shift". The original default settings is for flexible shifts up to 15 hours, so that should already allow working past midnight, but you can still adjust the length if you like.
When choosing a maximum shift length, you should greatly not overestimate this value, because if the value is too high, then an employee who forgot to clock OUT one day may show up the next day and find that they are still clocked IN! It would be best to set this value slightly higher than the longest amount of time you would normally expect any employee to work.
Alternatively, you can set up more complex shift classes that can be configured to your suiting with an option to work through midnight. Check out our article on shift scheduling for more on that: How to set up scheduling
Next, you'll want to configure how cross-midnight shifts are broken down in reports. You can now specify how you would like to allocate hours for shifts which cross midnight. You can configure it either for your entire organization or per pay class, as follows:
When you run a Time Cards, Payroll or Totals report, it will apply that setting. For example, if you configure the setting to "Actual hours worked", a punch from 8 pm - 4 am across pay periods will split into an 8 pm - 12 midnight punch for the first pay period, and 12 am - 4 am for the second pay period. Overtime will also reset at midnight in this configuration.
If you configure the setting to "Start of shift", then the entire shift will applied to the date it starts. For example, if an employee works 7:30 pm to 11:30 pm, and then 12:30 am to 4:30 am, then the entire shift including overtime will be awarded to the first pay period. If you configure the setting to "End of shift", the hours will be applied to the following pay period.