Fried dimmer turns lights on/off but new dimmer won't
Try swapping LINE and LOAD on the dimmer

Older analog-triac dimmers were like single pole switches in that they didn't care which way around in the circuit they were connected.  However, you have a newer dimmer that is more sophisticated (and has to be, in order to dim LEDs properly without a neutral reference), and thus cares about the distinction between its LINE side and its LOAD side; in your case, the black screw is LINE, and the red screw that isn't covered by the label on the dimmer is LOAD.

As to the wiring in the ceiling box, the white wire in the /3 cable is neutral going to the fixture (the fixture's blue wire), while the red and black wires are always-hots, along with the black wire in the /2 cable to the switch box.  The white wire in that /2 cable, then becomes the switched-hot returning from the switch in an old-style switch loop configuration, going to the brown wire on the fixture, and needs to be flagged with a wrap of electrical tape at each end as a result.  Of course, all the grounds need to be connected together as well.

With the ceiling box wired as above, we then move to the switch box, where the black wire goes to the black screw and the taped white wire goes to the red screw that isn't covered by the label.  The green screw, of course, gets connected to the grounds in the box.