/* ==========================================================================
   Texvian IT — DARK MODE (supplementary rules)
   Color TOKENS are already redefined in base/variables.css under
   [data-bs-theme="dark"], so most components adapt automatically. This
   file only holds rules that can't be expressed as a token swap.
   ========================================================================== */

[data-bs-theme="dark"] {
  color-scheme: dark;
}

/* Slightly dim photographic imagery so bright stock photos don't clash
   with the dark ink surfaces. Illustrations/icons using currentColor are
   unaffected since they already inherit theme tokens. */
[data-bs-theme="dark"] .nx-media-card img,
[data-bs-theme="dark"] .nx-img-dim {
  filter: brightness(0.88) saturate(1.05);
}

/* Logos: templates typically ship a light + dark logo variant, swapped
   via the .nx-header__brand-mark--light/--dark classes in header.css.
   For third-party client-logo strips (grayscale, single-color file)
   invert them instead so a single asset works in both themes. */
[data-bs-theme="dark"] .nx-logo-invert {
  filter: invert(1) brightness(1.4);
  opacity: 0.7;
}

/* Reduce shadow intensity on dark surfaces — large soft shadows read as
   muddy haze on near-black backgrounds, so cards lean on border contrast
   instead once dark mode is active. */
[data-bs-theme="dark"] .nx-card,
[data-bs-theme="dark"] .nx-stat-card,
[data-bs-theme="dark"] .nx-form-card {
  box-shadow: none;
}

[data-bs-theme="dark"] .nx-card:hover {
  box-shadow: var(--nx-shadow-md);
}

/* Form controls: browser-native date/time/select affordances need an
   explicit dark color-scheme hint (set above) to render dark chrome. */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  color-scheme: dark;
}

/* Theme-toggle transition guard: applied briefly by theme-switcher.js to
   disable transitions during the swap so colors don't visibly "wipe"
   across the page; removed again after one animation frame. */
.nx-theme-transition-lock,
.nx-theme-transition-lock * {
  transition: none !important;
}

/* Inner-page title banner: --nx-surface-inverse flips to a light colour in
   dark mode, which left white heading text on a white banner. Keep the
   banner a dark band in both themes. */
[data-bs-theme="dark"] .nx-page-title {
  background: linear-gradient(180deg, var(--nx-ink-800), var(--nx-ink-900));
  color: var(--nx-white);
  border-bottom: 1px solid var(--nx-border-color);
}