/* BB40 Final Hardcoded Color Hardening
   Purpose: keep Tabler layout while preventing Tabler color utilities, old blue fallbacks,
   and standalone module islands from overriding the active panel theme. */
:root{
  --bb40-safe-accent:var(--nxt-panel-accent,var(--panel-accent,#8ea0b8));
  --bb40-safe-accent-2:var(--nxt-panel-accent-2,#b6c2d2);
  --bb40-safe-card:var(--nxt-panel-card,var(--panel-card,#111827));
  --bb40-safe-border:var(--nxt-panel-border,var(--panel-card-border,rgba(148,163,184,.22)));
  --bb40-safe-text:var(--nxt-panel-text,var(--panel-text,#e5edf8));
  --bb40-safe-muted:var(--nxt-panel-muted,var(--panel-muted,#94a3b8));
  --bb40-success:var(--nxt-state-success,#34f5a2);
  --bb40-danger:var(--nxt-state-danger,#ff6b6b);
  --bb40-warning:var(--nxt-state-warning,#ffb347);
  --bb40-info:var(--nxt-state-info,var(--bb40-safe-accent));
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-blue,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-primary,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-blue,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-primary{color:var(--bb40-safe-accent)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-green,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-success,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-green,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-success{color:var(--bb40-success)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-red,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-danger,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-red,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-danger{color:var(--bb40-danger)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-yellow,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .text-warning,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-yellow,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-text-warning{color:var(--bb40-warning)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-blue-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-primary-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-bg-blue,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-state-info{background:color-mix(in srgb,var(--bb40-info) 11%,transparent)!important;border-color:color-mix(in srgb,var(--bb40-info) 45%,var(--bb40-safe-border))!important;color:var(--bb40-info)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-green-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-success-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-bg-green,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-state-success{background:color-mix(in srgb,var(--bb40-success) 11%,transparent)!important;border-color:color-mix(in srgb,var(--bb40-success) 45%,var(--bb40-safe-border))!important;color:var(--bb40-success)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-red-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-danger-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-bg-red,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-state-danger{background:color-mix(in srgb,var(--bb40-danger) 10%,transparent)!important;border-color:color-mix(in srgb,var(--bb40-danger) 45%,var(--bb40-safe-border))!important;color:var(--bb40-danger)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-yellow-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bg-warning-lt,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-bg-yellow,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-state-warning{background:color-mix(in srgb,var(--bb40-warning) 10%,transparent)!important;border-color:color-mix(in srgb,var(--bb40-warning) 45%,var(--bb40-safe-border))!important;color:var(--bb40-warning)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .btn-primary,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-info,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-outline-primary,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-outline-info{color:var(--bb40-safe-text)!important;border-color:color-mix(in srgb,var(--bb40-safe-accent) 55%,var(--bb40-safe-border))!important;background:color-mix(in srgb,var(--bb40-safe-accent) 13%,transparent)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-success,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-outline-success{color:var(--bb40-success)!important;border-color:color-mix(in srgb,var(--bb40-success) 52%,var(--bb40-safe-border))!important;background:color-mix(in srgb,var(--bb40-success) 9%,transparent)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-danger,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-outline-danger{color:var(--bb40-danger)!important;border-color:color-mix(in srgb,var(--bb40-danger) 52%,var(--bb40-safe-border))!important;background:color-mix(in srgb,var(--bb40-danger) 9%,transparent)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-warning,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-btn-outline-warning{color:var(--bb40-warning)!important;border-color:color-mix(in srgb,var(--bb40-warning) 52%,var(--bb40-safe-border))!important;background:color-mix(in srgb,var(--bb40-warning) 9%,transparent)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-success,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-danger,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-warning,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-info{border-radius:1rem!important;border:1px solid var(--bb40-safe-border)!important;background:color-mix(in srgb,var(--bb40-safe-card) 88%,transparent)!important;color:var(--bb40-safe-text)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-success{border-color:color-mix(in srgb,var(--bb40-success) 38%,var(--bb40-safe-border))!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-danger{border-color:color-mix(in srgb,var(--bb40-danger) 38%,var(--bb40-safe-border))!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-warning{border-color:color-mix(in srgb,var(--bb40-warning) 38%,var(--bb40-safe-border))!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .theme-alert-info{border-color:color-mix(in srgb,var(--bb40-info) 38%,var(--bb40-safe-border))!important}
/* Neutralize old blue-only chips/links without touching layout. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .nxt-visitor-chip:not(.green):not(.gray),
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .admin-security-link{color:var(--bb40-safe-accent)!important;border-color:color-mix(in srgb,var(--bb40-safe-accent) 42%,var(--bb40-safe-border))!important;background:color-mix(in srgb,var(--bb40-safe-accent) 10%,transparent)!important}
