
/*
FutureScope Nexus LOCK 12 — Unified Theme Runtime & Button System Fix
© 2026 FutureScope Systems, Inc. All Rights Reserved.
Confidential & Proprietary.
FSN-LOCK12-UX-PROVENANCE: THEME-BUTTON-CONSOLIDATED-2026
*/

:root,
html[data-theme="dark"] {
    --fs-bg-primary:#07111f;
    --fs-bg-secondary:#0c1729;
    --fs-surface:#111f36;
    --fs-surface-2:#142742;
    --fs-card-bg:#101d33;
    --fs-header-bg:rgba(7,17,31,.96);
    --fs-border:rgba(120,165,255,.22);
    --fs-border-strong:rgba(126,170,255,.38);
    --fs-text-primary:#f8fbff;
    --fs-text-secondary:#c7d6f3;
    --fs-text-muted:#8fa4c5;
    --fs-accent:#4e8cff;
    --fs-accent-contrast:#ffffff;
    --fs-secondary-btn-bg:#16243b;
    --fs-secondary-btn-text:#e9f1ff;
    --fs-ghost-btn-bg:transparent;
    --fs-ghost-btn-text:#c7d6f3;
    --fs-accent-2:#00b894;
    --fs-success:#00c27f;
    --fs-warning:#ffcc00;
    --fs-danger:#ff6b6b;
    --fs-danger-contrast:#ffffff;
    --fs-shadow:rgba(0,0,0,.34);
    --fs-radius:18px;
}

html[data-theme="light"] {
    --fs-bg-primary:#f4f7fb;
    --fs-bg-secondary:#ffffff;
    --fs-surface:#ffffff;
    --fs-surface-2:#eef4ff;
    --fs-card-bg:#ffffff;
    --fs-header-bg:rgba(255,255,255,.96);
    --fs-border:rgba(36,77,130,.18);
    --fs-border-strong:rgba(36,77,130,.32);
    --fs-text-primary:#101828;
    --fs-text-secondary:#344054;
    --fs-text-muted:#667085;
    --fs-accent:#155eef;
    --fs-accent-contrast:#ffffff;
    --fs-secondary-btn-bg:#ffffff;
    --fs-secondary-btn-text:#1d2939;
    --fs-ghost-btn-bg:transparent;
    --fs-ghost-btn-text:#344054;
    --fs-accent-2:#087f5b;
    --fs-success:#07845f;
    --fs-warning:#b77900;
    --fs-danger:#c33b3b;
    --fs-danger-contrast:#ffffff;
    --fs-shadow:rgba(16,24,40,.10);
    --fs-radius:18px;
}

html[data-theme="cyber-defense"] {
    --fs-bg-primary:#02052d;
    --fs-bg-secondary:#060b3d;
    --fs-surface:#08114a;
    --fs-surface-2:#10184e;
    --fs-card-bg:#090f39;
    --fs-header-bg:rgba(2,5,45,.96);
    --fs-border:rgba(255,212,0,.26);
    --fs-border-strong:rgba(255,212,0,.48);
    --fs-text-primary:#ffffff;
    --fs-text-secondary:#d9e1ff;
    --fs-text-muted:#9aa7dc;
    --fs-accent:#ffd400;
    --fs-accent-contrast:#050716;
    --fs-secondary-btn-bg:#10184e;
    --fs-secondary-btn-text:#ffffff;
    --fs-ghost-btn-bg:transparent;
    --fs-ghost-btn-text:#d9e1ff;
    --fs-accent-2:#47d7ff;
    --fs-success:#00d989;
    --fs-warning:#ffd400;
    --fs-danger:#ff4d4d;
    --fs-danger-contrast:#ffffff;
    --fs-shadow:rgba(0,0,0,.45);
    --fs-radius:18px;
}

html[data-theme="enterprise-insight"] {
    --fs-bg-primary:#f3f9fb;
    --fs-bg-secondary:#ffffff;
    --fs-surface:#ffffff;
    --fs-surface-2:#e7f4f8;
    --fs-card-bg:#ffffff;
    --fs-header-bg:rgba(255,255,255,.96);
    --fs-border:rgba(10,91,120,.20);
    --fs-border-strong:rgba(10,91,120,.35);
    --fs-text-primary:#102833;
    --fs-text-secondary:#284d60;
    --fs-text-muted:#607d8a;
    --fs-accent:#0a5b78;
    --fs-accent-contrast:#ffffff;
    --fs-secondary-btn-bg:#ffffff;
    --fs-secondary-btn-text:#102833;
    --fs-ghost-btn-bg:transparent;
    --fs-ghost-btn-text:#284d60;
    --fs-accent-2:#0f9aaf;
    --fs-success:#087f5b;
    --fs-warning:#b77900;
    --fs-danger:#c33b3b;
    --fs-danger-contrast:#ffffff;
    --fs-shadow:rgba(10,91,120,.14);
    --fs-radius:18px;
}

* { box-sizing:border-box; }

body.fs-nexus-enabled {
    margin:0;
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb,var(--fs-accent) 12%,transparent), transparent 34%),
        linear-gradient(180deg, color-mix(in srgb,var(--fs-bg-primary) 92%,#fff 8%), var(--fs-bg-primary)) !important;
    color:var(--fs-text-primary) !important;
    font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif !important;
    font-size:15px;
}

/* Hide legacy website theme controls. Lock 12 keeps one theme selector only. */
.fs-legacy-theme-hidden,
.theme-toggle,
.theme-switch,
.themeControls,
.theme-controls,
#themeToggle,
#darkModeToggle,
#darkToggle,
#lightToggle,
#themeSelect,
#languageSelect,
.language-select,
select[aria-label="Theme"]:not(.fs-nexus-theme-select) {
    display:none !important;
}

/* Avoid hiding useful form selects inside portals. Only hide old website language/select pairs in legacy header zones. */
header:not(.fs-nexus-header) select,
nav:not(.fs-nexus-nav) select {
    display:none !important;
}

.fs-nexus-enabled h1,
.fs-nexus-enabled h2,
.fs-nexus-enabled h3 {
    color:var(--fs-text-primary) !important;
    letter-spacing:-.02em;
}

.fs-nexus-enabled p,
.fs-nexus-enabled label,
.fs-nexus-enabled span,
.fs-nexus-enabled td,
.fs-nexus-enabled th {
    color:inherit;
}

.fs-nexus-enabled a {
    color:var(--fs-accent) !important;
    text-decoration:none;
}

.fs-nexus-enabled a:hover { text-decoration:underline; }

.fs-nexus-header {
    position:sticky;
    top:0;
    z-index:9999;
    min-height:74px;
    display:flex;
    align-items:center;
    padding:0 28px;
    gap:22px;
    background:var(--fs-header-bg);
    border-bottom:1px solid var(--fs-border);
    backdrop-filter:blur(18px);
    box-shadow:0 10px 28px var(--fs-shadow);
}

.fs-nexus-brand {
    display:flex;
    align-items:center;
    gap:13px;
    min-width:260px;
}

.fs-nexus-mark {
    width:42px;
    height:42px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,var(--fs-accent),var(--fs-accent-2));
    color:var(--fs-accent-contrast);
    font-weight:900;
    box-shadow:0 10px 22px var(--fs-shadow);
    letter-spacing:-.04em;
}

.fs-nexus-brand-text { line-height:1.05; }

.fs-nexus-brand-title {
    display:block;
    font-size:18px;
    font-weight:850;
    color:var(--fs-text-primary);
}

.fs-nexus-brand-subtitle {
    display:block;
    margin-top:4px;
    font-size:12px;
    font-weight:650;
    color:var(--fs-text-muted);
}

.fs-nexus-nav {
    display:flex;
    align-items:center;
    gap:6px;
    flex:1;
    min-width:0;
}

.fs-nexus-nav a {
    padding:9px 12px;
    border-radius:999px;
    color:var(--fs-text-secondary) !important;
    font-weight:700;
    font-size:13px;
    white-space:nowrap;
}

.fs-nexus-nav a:hover {
    background:color-mix(in srgb,var(--fs-accent) 12%,transparent);
    text-decoration:none;
}

.fs-nexus-context-pill {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 13px;
    border-radius:999px;
    background:color-mix(in srgb,var(--fs-accent) 12%,var(--fs-surface));
    border:1px solid var(--fs-border);
    color:var(--fs-text-secondary);
    font-weight:750;
    font-size:13px;
    white-space:nowrap;
}

.fs-nexus-theme-wrap {
    display:flex;
    align-items:center;
    gap:8px;
}

.fs-nexus-theme-label {
    font-size:12px;
    color:var(--fs-text-muted);
    font-weight:700;
}

.fs-nexus-theme-select {
    width:190px !important;
    max-width:190px !important;
    height:38px !important;
    padding:0 38px 0 12px !important;
    border-radius:999px !important;
    background:var(--fs-surface) !important;
    color:var(--fs-text-primary) !important;
    border:1px solid var(--fs-border-strong) !important;
    font-size:13px !important;
    font-weight:700 !important;
    outline:none !important;
}

.fs-nexus-enabled main,
.fs-nexus-enabled .container,
.fs-nexus-enabled .wrap {
    max-width:1180px;
    margin-left:auto;
    margin-right:auto;
}

.fs-nexus-enabled section,
.fs-nexus-enabled .card,
.fs-nexus-enabled .panel,
.fs-nexus-enabled .box {
    background:var(--fs-card-bg) !important;
    color:var(--fs-text-primary) !important;
    border:1px solid var(--fs-border) !important;
    border-radius:var(--fs-radius) !important;
    box-shadow:0 18px 44px var(--fs-shadow) !important;
}

/* Forms */
.fs-nexus-enabled input,
.fs-nexus-enabled select,
.fs-nexus-enabled textarea {
    background:color-mix(in srgb,var(--fs-surface) 92%,#000 8%) !important;
    color:var(--fs-text-primary) !important;
    border:1px solid var(--fs-border-strong) !important;
    border-radius:12px !important;
    outline:none !important;
}

.fs-nexus-enabled input::placeholder,
.fs-nexus-enabled textarea::placeholder {
    color:var(--fs-text-muted) !important;
}

/* Lock 12 button system: no more blanket gradient on every button. */
.fs-nexus-enabled button,
.fs-nexus-enabled .btn,
.fs-nexus-enabled input[type="button"],
.fs-nexus-enabled input[type="submit"],
.fs-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:38px;
    padding:10px 16px;
    border-radius:12px !important;
    border:1px solid var(--fs-border-strong) !important;
    background:var(--fs-secondary-btn-bg) !important;
    color:var(--fs-secondary-btn-text) !important;
    font-weight:800 !important;
    box-shadow:0 6px 16px color-mix(in srgb,var(--fs-shadow) 70%,transparent) !important;
    transition:transform .15s ease,filter .2s ease,box-shadow .2s ease,background .2s ease !important;
    cursor:pointer;
    text-decoration:none !important;
}

.fs-nexus-enabled button:hover,
.fs-nexus-enabled .btn:hover,
.fs-btn:hover {
    transform:translateY(-1px);
    filter:brightness(1.04);
    text-decoration:none !important;
}

.fs-nexus-enabled button.primary,
.fs-nexus-enabled .btn-primary,
.fs-btn-primary,
.fs-nexus-enabled [data-variant="primary"] {
    background:var(--fs-accent) !important;
    color:var(--fs-accent-contrast) !important;
    border-color:color-mix(in srgb,var(--fs-accent) 70%,#fff 30%) !important;
}

.fs-nexus-enabled button.secondary,
.fs-nexus-enabled .btn-secondary,
.fs-btn-secondary,
.fs-nexus-enabled [data-variant="secondary"] {
    background:var(--fs-secondary-btn-bg) !important;
    color:var(--fs-secondary-btn-text) !important;
}

.fs-nexus-enabled button.ghost,
.fs-nexus-enabled .btn-ghost,
.fs-btn-ghost,
.fs-nexus-enabled [data-variant="ghost"] {
    background:var(--fs-ghost-btn-bg) !important;
    color:var(--fs-ghost-btn-text) !important;
    box-shadow:none !important;
}

.fs-nexus-enabled button.danger,
.fs-nexus-enabled .btn-danger,
.fs-btn-danger,
.fs-nexus-enabled button[id*="logout" i],
.fs-nexus-enabled button[onclick*="logout" i] {
    background:var(--fs-danger) !important;
    color:var(--fs-danger-contrast) !important;
    border-color:color-mix(in srgb,var(--fs-danger) 70%,#fff 30%) !important;
}

/* Tables */
.fs-nexus-enabled table {
    width:100%;
    border-collapse:collapse;
    background:var(--fs-card-bg);
    color:var(--fs-text-primary);
    border-radius:14px;
    overflow:hidden;
}

.fs-nexus-enabled th,
.fs-nexus-enabled td {
    border-bottom:1px solid var(--fs-border);
    padding:12px 14px;
}

.fs-nexus-enabled th {
    background:color-mix(in srgb,var(--fs-accent) 15%,var(--fs-card-bg));
    color:var(--fs-text-primary);
    font-weight:800;
}

.fs-nexus-footer {
    margin:42px auto 18px;
    padding:18px 24px;
    max-width:1180px;
    color:var(--fs-text-muted);
    border-top:1px solid var(--fs-border);
    text-align:center;
    font-size:12px;
}

.fs-card {
    background:var(--fs-card-bg);
    border:1px solid var(--fs-border);
    border-radius:var(--fs-radius);
    padding:22px;
    box-shadow:0 18px 44px var(--fs-shadow);
}

.fs-grid { display:grid; gap:18px; }
.fs-grid-3 { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }

.fs-pill {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 11px;
    border-radius:999px;
    background:color-mix(in srgb,var(--fs-accent) 12%,var(--fs-surface));
    border:1px solid var(--fs-border);
    color:var(--fs-text-secondary);
    font-size:12px;
    font-weight:800;
}

.fs-muted { color:var(--fs-text-muted) !important; }
.fs-nexus-hidden-provenance { display:none !important; }

@media (max-width:1100px) {
    .fs-nexus-header { height:auto; flex-wrap:wrap; padding:14px 18px; }
    .fs-nexus-brand { min-width:auto; flex:1; }
    .fs-nexus-nav { order:3; width:100%; overflow:auto; padding-bottom:4px; }
    .fs-nexus-theme-wrap { margin-left:auto; }
}

@media (max-width:720px) {
    .fs-nexus-context-pill { display:none; }
    .fs-nexus-theme-select { width:160px !important; }
}

/* LOCK31Q — Enterprise UX & Theme Contrast Stabilization
   Cosmetic-only safety layer. Preserves all workflows and backend behavior. */
:root,
html[data-theme="dark"]{
  --fs-control-bg:#172a49;
  --fs-control-text:#ffffff;
  --fs-control-border:rgba(164,190,255,.44);
  --fs-control-hover:#203b63;
  --fs-outline:#93c5fd;
  --fs-status-success-bg:#047857;
  --fs-status-success-text:#ffffff;
  --fs-status-warning-bg:#facc15;
  --fs-status-warning-text:#111827;
  --fs-status-danger-bg:#dc2626;
  --fs-status-danger-text:#ffffff;
  --fs-status-info-bg:#2563eb;
  --fs-status-info-text:#ffffff;
  --fs-input-bg:#091527;
  --fs-input-text:#ffffff;
  --fs-table-head-text:#ffffff;
}
html[data-theme="light"]{
  --fs-control-bg:#0f172a;
  --fs-control-text:#ffffff;
  --fs-control-border:#334155;
  --fs-control-hover:#1e293b;
  --fs-outline:#1d4ed8;
  --fs-status-success-bg:#047857;
  --fs-status-success-text:#ffffff;
  --fs-status-warning-bg:#facc15;
  --fs-status-warning-text:#111827;
  --fs-status-danger-bg:#b91c1c;
  --fs-status-danger-text:#ffffff;
  --fs-status-info-bg:#1d4ed8;
  --fs-status-info-text:#ffffff;
  --fs-input-bg:#ffffff;
  --fs-input-text:#0f172a;
  --fs-table-head-text:#0f172a;
  --fs-card-bg:#ffffff;
  --fs-surface:#ffffff;
  --fs-surface-2:#f1f7ff;
}
html[data-theme="cyber-defense"]{
  --fs-control-bg:#07112f;
  --fs-control-text:#ffffff;
  --fs-control-border:rgba(255,212,0,.65);
  --fs-control-hover:#10184e;
  --fs-outline:#ffd400;
  --fs-status-success-bg:#00a86b;
  --fs-status-success-text:#ffffff;
  --fs-status-warning-bg:#ffd400;
  --fs-status-warning-text:#050716;
  --fs-status-danger-bg:#e11d48;
  --fs-status-danger-text:#ffffff;
  --fs-status-info-bg:#0369a1;
  --fs-status-info-text:#ffffff;
  --fs-input-bg:#050a2a;
  --fs-input-text:#ffffff;
  --fs-table-head-text:#ffffff;
}
html[data-theme="enterprise-insight"]{
  --fs-control-bg:#083344;
  --fs-control-text:#ffffff;
  --fs-control-border:#0f5f76;
  --fs-control-hover:#0f4a5f;
  --fs-outline:#0e7490;
  --fs-status-success-bg:#047857;
  --fs-status-success-text:#ffffff;
  --fs-status-warning-bg:#facc15;
  --fs-status-warning-text:#102833;
  --fs-status-danger-bg:#b91c1c;
  --fs-status-danger-text:#ffffff;
  --fs-status-info-bg:#0e7490;
  --fs-status-info-text:#ffffff;
  --fs-input-bg:#ffffff;
  --fs-input-text:#102833;
  --fs-table-head-text:#102833;
}
html[data-theme="sovereign-blue"],
html[data-theme="executive-slate"],
html[data-theme="secure-emerald"],
html[data-theme="boardroom-gold"]{
  --fs-control-bg:color-mix(in srgb,var(--fs-surface-2) 86%,#000 14%);
  --fs-control-text:var(--fs-text-primary);
  --fs-control-border:var(--fs-border-strong);
  --fs-control-hover:color-mix(in srgb,var(--fs-accent) 18%,var(--fs-surface-2));
  --fs-outline:var(--fs-accent);
  --fs-status-success-bg:#047857;
  --fs-status-success-text:#ffffff;
  --fs-status-warning-bg:#facc15;
  --fs-status-warning-text:#111827;
  --fs-status-danger-bg:#b91c1c;
  --fs-status-danger-text:#ffffff;
  --fs-status-info-bg:#2563eb;
  --fs-status-info-text:#ffffff;
  --fs-input-bg:color-mix(in srgb,var(--fs-surface) 92%,#000 8%);
  --fs-input-text:var(--fs-text-primary);
  --fs-table-head-text:var(--fs-text-primary);
}

/* Global readability guardrails */
html[data-theme] body,
html[data-theme] .fs-nexus-enabled,
html[data-theme] .fs-nexus-enabled .card,
html[data-theme] .fs-nexus-enabled .panel,
html[data-theme] .fs-nexus-enabled .box,
html[data-theme] .fs-nexus-enabled .admin-section,
html[data-theme] .fs-nexus-enabled .workspace-panel,
html[data-theme] .fs-nexus-enabled .modal,
html[data-theme] .fs-nexus-enabled .quote-modal,
html[data-theme] .fs-nexus-enabled .fs-card{
  color:var(--fs-text-primary)!important;
}

html[data-theme] .fs-nexus-enabled p,
html[data-theme] .fs-nexus-enabled li,
html[data-theme] .fs-nexus-enabled td,
html[data-theme] .fs-nexus-enabled label,
html[data-theme] .fs-nexus-enabled .body-text,
html[data-theme] .fs-nexus-enabled .content-text{
  color:var(--fs-text-primary)!important;
}

html[data-theme] .fs-nexus-enabled .small,
html[data-theme] .fs-nexus-enabled small,
html[data-theme] .fs-nexus-enabled .muted,
html[data-theme] .fs-nexus-enabled .fs-muted,
html[data-theme] .fs-nexus-enabled .hint,
html[data-theme] .fs-nexus-enabled .subtext{
  color:var(--fs-text-muted)!important;
}

/* Buttons and button-like links must never inherit unreadable text colors. */
html[data-theme] .fs-nexus-enabled button,
html[data-theme] .fs-nexus-enabled .btn,
html[data-theme] .fs-nexus-enabled a.btn,
html[data-theme] .fs-nexus-enabled .fs-btn,
html[data-theme] .fs-nexus-enabled input[type="button"],
html[data-theme] .fs-nexus-enabled input[type="submit"],
html[data-theme] .fs-nexus-enabled [role="button"],
html[data-theme] .fs-nexus-enabled .workspace-tab,
html[data-theme] .fs-nexus-enabled .admin-tab-btn,
html[data-theme] .fs-nexus-enabled .ss-mini{
  background:var(--fs-control-bg)!important;
  color:var(--fs-control-text)!important;
  border-color:var(--fs-control-border)!important;
  text-shadow:none!important;
}
html[data-theme] .fs-nexus-enabled button *,
html[data-theme] .fs-nexus-enabled .btn *,
html[data-theme] .fs-nexus-enabled .fs-btn *,
html[data-theme] .fs-nexus-enabled [role="button"] *{
  color:inherit!important;
}
html[data-theme] .fs-nexus-enabled button:hover,
html[data-theme] .fs-nexus-enabled .btn:hover,
html[data-theme] .fs-nexus-enabled a.btn:hover,
html[data-theme] .fs-nexus-enabled .fs-btn:hover,
html[data-theme] .fs-nexus-enabled [role="button"]:hover{
  background:var(--fs-control-hover)!important;
  color:var(--fs-control-text)!important;
}
html[data-theme] .fs-nexus-enabled .btn-primary,
html[data-theme] .fs-nexus-enabled .primary,
html[data-theme] .fs-nexus-enabled [data-variant="primary"]{
  background:linear-gradient(135deg,var(--fs-accent),var(--fs-accent-2))!important;
  color:var(--fs-accent-contrast)!important;
  border-color:transparent!important;
}
html[data-theme] .fs-nexus-enabled .btn-danger,
html[data-theme] .fs-nexus-enabled .btn-delete,
html[data-theme] .fs-nexus-enabled .btn-reject,
html[data-theme] .fs-nexus-enabled .danger,
html[data-theme] .fs-nexus-enabled button[onclick*="logout" i]{
  background:var(--fs-status-danger-bg)!important;
  color:var(--fs-status-danger-text)!important;
  border-color:transparent!important;
}

/* Form controls and dropdowns must remain readable in every theme. */
html[data-theme] .fs-nexus-enabled input,
html[data-theme] .fs-nexus-enabled textarea,
html[data-theme] .fs-nexus-enabled select,
html[data-theme] .fs-nexus-theme-select,
html[data-theme] .fs-nexus-language-select,
html[data-theme] #fsThemeSelect,
html[data-theme] #fsLanguageSelect{
  background:var(--fs-input-bg)!important;
  color:var(--fs-input-text)!important;
  border-color:var(--fs-control-border)!important;
  caret-color:var(--fs-input-text)!important;
}
html[data-theme] .fs-nexus-enabled option,
html[data-theme] .fs-nexus-theme-select option,
html[data-theme] .fs-nexus-language-select option{
  background:var(--fs-input-bg)!important;
  color:var(--fs-input-text)!important;
}
html[data-theme] .fs-nexus-enabled input::placeholder,
html[data-theme] .fs-nexus-enabled textarea::placeholder{
  color:color-mix(in srgb,var(--fs-text-muted) 78%,transparent)!important;
  opacity:1!important;
}

/* Table and workspace contrast */
html[data-theme] .fs-nexus-enabled table,
html[data-theme] .fs-nexus-enabled .table-wrap{
  color:var(--fs-text-primary)!important;
  background:var(--fs-card-bg)!important;
}
html[data-theme] .fs-nexus-enabled th{
  color:var(--fs-table-head-text)!important;
  background:color-mix(in srgb,var(--fs-accent) 18%,var(--fs-card-bg))!important;
}
html[data-theme="light"] .fs-nexus-enabled th,
html[data-theme="enterprise-insight"] .fs-nexus-enabled th{
  color:#0f172a!important;
  background:#eaf2ff!important;
}

/* Status badges and common state labels */
html[data-theme] .fs-nexus-enabled .pill,
html[data-theme] .fs-nexus-enabled .badge,
html[data-theme] .fs-nexus-enabled .status-badge{
  color:var(--fs-control-text)!important;
  background:var(--fs-control-bg)!important;
  border-color:var(--fs-control-border)!important;
}
html[data-theme] .fs-nexus-enabled .ok,
html[data-theme] .fs-nexus-enabled .success,
html[data-theme] .fs-nexus-enabled .fully-executed,
html[data-theme] .fs-nexus-enabled [class*="success" i],
html[data-theme] .fs-nexus-enabled [class*="executed" i]{
  color:var(--fs-status-success-text)!important;
  background-color:var(--fs-status-success-bg)!important;
  border-color:color-mix(in srgb,var(--fs-status-success-bg) 70%,#fff 30%)!important;
}
html[data-theme] .fs-nexus-enabled .warning,
html[data-theme] .fs-nexus-enabled [class*="pending" i],
html[data-theme] .fs-nexus-enabled [class*="warning" i]{
  color:var(--fs-status-warning-text)!important;
  background-color:var(--fs-status-warning-bg)!important;
  border-color:color-mix(in srgb,var(--fs-status-warning-bg) 70%,#000 30%)!important;
}
html[data-theme] .fs-nexus-enabled .error,
html[data-theme] .fs-nexus-enabled .danger,
html[data-theme] .fs-nexus-enabled [class*="error" i],
html[data-theme] .fs-nexus-enabled [class*="reject" i]{
  color:var(--fs-status-danger-text)!important;
}

/* Some existing cards use inline colors; this protects text on dark/elevated panels without modifying logic. */
html[data-theme] .fs-nexus-enabled [style*="background:#000"],
html[data-theme] .fs-nexus-enabled [style*="background: #000"],
html[data-theme] .fs-nexus-enabled [style*="background-color:#000"],
html[data-theme] .fs-nexus-enabled [style*="background-color: #000"],
html[data-theme] .fs-nexus-enabled [style*="background: black"],
html[data-theme] .fs-nexus-enabled [style*="background-color: black"]{
  color:#ffffff!important;
}
html[data-theme] .fs-nexus-enabled [style*="background:#fff"],
html[data-theme] .fs-nexus-enabled [style*="background: #fff"],
html[data-theme] .fs-nexus-enabled [style*="background-color:#fff"],
html[data-theme] .fs-nexus-enabled [style*="background-color: #fff"],
html[data-theme] .fs-nexus-enabled [style*="background: white"],
html[data-theme] .fs-nexus-enabled [style*="background-color: white"]{
  color:#0f172a!important;
}

/* Keyboard/focus accessibility */
html[data-theme] .fs-nexus-enabled button:focus-visible,
html[data-theme] .fs-nexus-enabled a:focus-visible,
html[data-theme] .fs-nexus-enabled input:focus-visible,
html[data-theme] .fs-nexus-enabled select:focus-visible,
html[data-theme] .fs-nexus-enabled textarea:focus-visible{
  outline:3px solid var(--fs-outline)!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--fs-outline) 25%,transparent)!important;
}
