How to overrule the themes set through the "Use Operating System theme" option

The "Use Operating System theme" option makes sure an Web Application responds to the light or dark theme settings of the operating system, which is really a bonus. However, in some cases a single control may need a specific (color) setting, which doesn't seem possible.

In my case, I have a TWebPanel, which must show a particular color, depending on a status. Without the "Use Operating System theme" option, this is simply done by setting the color. With the "Use Operating System theme" option, I though I had to define an elementClassName and define the color as a CSS class.

However, I can't change the color of a TWebPanel through CSS, with or without setting the "Use Operating System theme". I can do this for buttons and I wonder if this is possible for panels too, as a panel is a container control. However, when checking the "Elements" of my user interface, I see a panel has a background-color attribute?

Attached a small program showing the differences: click the change button to see a difference between active and passive status. Nothing is happening on the panels when setting the Use Operating System theme" option.
OSTheme.zip (7.1 KB)

The panel uses a DIV HTML element and not a HTML panel element (which doesn't exist).
So, change the CSS for the class you want to apply to the Panel to:

      .PnlStatusPassive {
        background-color: fuchsia;
      }
      .PnlStatusActive {
        background-color: cyan;
      }

With this change, this works here.