I'm currently in the process of transitioning a legacy app to Nextjs. This app consists of two distinct layouts: one for the public facing aspect and another for the admin section. Each layout has its own set of CSS files. However, due to Nextjs limitations that only allow CSS imports in the custom _app.js file, I am unable to separate the layouts as intended. I want to avoid mixing the admin CSS with the public layout and vice versa. How should I proceed in this scenario?
I attempted to use styled-jsx, but it ended up causing more challenges. Wrapping the entire CSS file with thousands of lines using css.global caused a multitude of errors, such as not supporting nesting, among others.