/* Host overrides for the Standout Filament theme (the open items in filament-theme.css). Loaded last.
 * Unlayered, so these beat Filament's @layer rules without !important. Colours only from var(--app-*). */

/* Item 1: Filament picks one text shade for both modes, which fails on the dark filled button. */
.fi-btn.fi-color-primary:not(.fi-outlined) {
  --dark-text: var(--app-on-primary);
  --dark-hover-text: var(--app-on-primary);
}
.fi-btn.fi-color-danger:not(.fi-outlined) {
  --dark-text: var(--app-on-error);
  --dark-hover-text: var(--app-on-error);
}

/* Item 2: surfaces Filament hard-codes (white, or white alpha in dark) take the warm surface roles in dark mode.
 * Not the uncontained sections: they only group (e.g. a row of stat cards) and must stay transparent. */
[data-theme='dark'] :is(
  .fi-section:not(.fi-aside):not(.fi-secondary):not(.fi-section-not-contained),
  .fi-section.fi-aside > .fi-section-content-ctn,
  .fi-wi-stats-overview-stat,
  .fi-ta-ctn,
  .fi-simple-main,
  .fi-topbar,
  .fi-modal-window,
  .fi-no-notification:not(.fi-inline)
) {
  background-color: var(--app-surface-container);
}
[data-theme='dark'] .fi-dropdown-panel {
  background-color: var(--app-surface-container-high);
}
[data-theme='dark'] .fi-input-wrp:not(.fi-disabled) {
  background-color: var(--app-surface-container-lowest);
}
[data-theme='dark'] .fi-body {
  color: var(--app-on-surface);
}
