/*
 * Badgers Claw Panel-Wide Theme Contract Layer
 * v1.0.0
 * Purpose: force standalone/dev-tool/module CSS islands to inherit the selected panel theme.
 * Loaded last by panel_theme_runtime.php, after page/module inline CSS.
 */

body[class*="nxt-theme-"]:not(.nxt-theme-disabled),
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) *{
  --nxt-theme-bg:var(--nxt-panel-bg,#07111f);
  --nxt-theme-bg-2:var(--nxt-panel-bg-2,color-mix(in srgb,var(--nxt-panel-bg,#07111f) 82%,#fff 8%));
  --nxt-theme-card:var(--nxt-panel-card,rgba(12,28,48,.94));
  --nxt-theme-card-2:var(--nxt-panel-card-2,color-mix(in srgb,var(--nxt-panel-card,rgba(12,28,48,.94)) 86%,#fff 9%));
  --nxt-theme-side:var(--nxt-panel-side,var(--nxt-panel-bg,#07111f));
  --nxt-theme-accent:var(--nxt-panel-accent,#36a3ff);
  --nxt-theme-accent-soft:color-mix(in srgb,var(--nxt-panel-accent,#36a3ff) 18%,transparent);
  --nxt-theme-accent-mid:color-mix(in srgb,var(--nxt-panel-accent,#36a3ff) 38%,transparent);
  --nxt-theme-border:var(--nxt-panel-line,color-mix(in srgb,var(--nxt-panel-accent,#36a3ff) 32%,rgba(255,255,255,.10)));
  --nxt-theme-text:var(--nxt-panel-text,#eaf4ff);
  --nxt-theme-muted:var(--nxt-panel-muted,color-mix(in srgb,var(--nxt-panel-text,#eaf4ff) 70%,var(--nxt-panel-accent,#36a3ff) 30%));

  /* common aliases used by standalone modules */
  --nxt-accent:var(--nxt-theme-accent);
  --nxt-theme-accent:var(--nxt-theme-accent);
  --hud-accent:var(--nxt-theme-accent);
  --theme-accent:var(--nxt-theme-accent);
  --bs-primary:var(--nxt-theme-accent);
  --bs-body-color:var(--nxt-theme-text);
  --bs-body-bg:var(--nxt-theme-bg);
  --bs-card-bg:var(--nxt-theme-card);
  --tblr-primary:var(--nxt-theme-accent);
  --tblr-body-color:var(--nxt-theme-text);
  --tblr-body-bg:var(--nxt-theme-bg);

  /* custom webviews */
  --cw-accent:var(--nxt-theme-accent);
  --cw-card:var(--nxt-theme-card);
  --cw-text:var(--nxt-theme-text);
  --cw-muted:var(--nxt-theme-muted);
  --cw-border:var(--nxt-theme-border);

  /* native module aliases */
  --nx-accent:var(--nxt-theme-accent);
  --nx-text:var(--nxt-theme-text);
  --nx-muted:var(--nxt-theme-muted);
  --nx-panel:var(--nxt-theme-bg);
  --nx-card:var(--nxt-theme-card);
  --nx-border:var(--nxt-theme-border);

  /* CinemaHD / app-module aliases */
  --chd-accent:var(--nxt-theme-accent);
  --chd-accent-soft:var(--nxt-theme-accent-soft);
  --chd-accent-mid:var(--nxt-theme-accent-mid);
  --chd-accent-strong:color-mix(in srgb,var(--nxt-theme-accent) 75%,#fff 5%);

  /* TMDB Studio standalone aliases */
  --bg:var(--nxt-theme-bg);
  --rail:var(--nxt-theme-side);
  --panel:var(--nxt-theme-card);
  --surface:var(--nxt-theme-card);
  --surface2:var(--nxt-theme-card-2);
  --surface3:color-mix(in srgb,var(--nxt-theme-card-2) 82%,#fff 8%);
  --accent:var(--nxt-theme-accent);
  --accent-d:color-mix(in srgb,var(--nxt-theme-accent) 75%,#000 20%);
  --accent-g:var(--nxt-theme-accent-soft);
  --accent-b:var(--nxt-theme-accent-mid);
  --text:var(--nxt-theme-text);
  --text2:var(--nxt-theme-muted);
  --text3:color-mix(in srgb,var(--nxt-theme-muted) 72%,#000 28%);
  --bdr:var(--nxt-theme-border);
  --bdr2:color-mix(in srgb,var(--nxt-theme-accent) 42%,rgba(255,255,255,.12));
}

/* Dev Silver final values. Other themes use the variables from nxt-panel-theme-presets.css. */
body.nxt-theme-dev_silver,
body.nxt-theme-dev_silver *{
  --nxt-panel-accent:#d7dde8;
  --nxt-panel-bg:#10141b;
  --nxt-panel-bg-2:#151b24;
  --nxt-panel-card:#222833;
  --nxt-panel-card-2:#2c3440;
  --nxt-panel-side:#0b0f15;
  --nxt-panel-line:rgba(215,221,232,.34);
  --nxt-panel-text:#f6f8fb;
  --nxt-panel-muted:#b9c2cf;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled),
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.page,.page-wrapper,.main-content,.page-content,.dashboard-page,.container-fluid,#layout-wrapper,.content-page,.wrapper){
  background:
    radial-gradient(circle at top left,var(--nxt-theme-accent-soft),transparent 36%),
    linear-gradient(180deg,var(--nxt-theme-bg-2),var(--nxt-theme-bg) 52%,color-mix(in srgb,var(--nxt-theme-bg) 78%,#000 22%)) !important;
  color:var(--nxt-theme-text) !important;
}

/* Universal card/panel/shell contract */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
.card,.card-body,.card-header,.dashboard-card,.dashboard-ref-panel,.dashboard-widget-frame,.stat-card,.widget-card,
.nxt-module-shell,.nxt-module-grid,.nxt-menu-card,.nxt-section-card,.nxt-box,.nxt-box-body,.nxt-box-head,.module-card,.module-panel,
.chd-card,.chd-frame,.chd-stat,.chd-note,.chd-endpoint,.chd-table-clean,.chd-portal-table,
.pia-card,.vpn-card,.webview-card,.frame-card,.output-card,.preview-card,.source-image,.output-sizes,
.custom-webviews-menu-card,.custom-webviews-section-card,.custom-webviews-box,.custom-webviews-preview,.custom-webviews-preview-viewport,.custom-webviews-preview-box,.custom-webviews-upload-card,.custom-webviews-endpoint,
.nxt-api-helper-shell,.nxt-api-hero,.nxt-api-cats,.nxt-api-list,.nxt-api-row,.nxt-api-endpoint-drawer,.nxt-api-endpoint-item,.nxt-api-countbox,
#badgerbuilder-native .hero,#badgerbuilder-native .card,#badgerbuilder-native .pill,#badgerbuilder-native pre,
.icon-maker-shell,.icon-maker-card,.icon-maker-panel,.nxt-icon-card,.nxt-builder-card,.nxt-tool-card,
.tmdb-app,.tmdb-shell,.tmdb-card,.tmdb-panel,.tmdb-section,.panel,.section,.glass,.box,
.table-responsive,.modal-content,.dropdown-menu
){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card) 96%,transparent),color-mix(in srgb,var(--nxt-theme-bg) 92%,#000 8%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
  box-shadow:0 18px 45px rgba(0,0,0,.30),0 0 28px color-mix(in srgb,var(--nxt-theme-accent) 10%,transparent) !important;
}

/* Headers/title strips/table heads */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
.card-header,.nxt-box-head,.custom-webviews-box-head,.chd-frame-title,.module-header,.panel-header,
.table thead th,table thead th,.chd-table-clean th,.chd-portal-table th,.custom-webviews-media-table th,
.nxt-module-header,.nxt-menu-title,.nxt-api-list-head,.tmdb-tabs,.tmdb-header,.tmdb-titlebar,.topbar,.navbar,.hud-admin-controls,.bc-hud-bar,.nxt-hud-bar,header
){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card-2) 96%,transparent),color-mix(in srgb,var(--nxt-theme-card) 92%,#000 8%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
  text-shadow:none !important;
}

/* Side menus, tabs, pills, action buttons */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
.nxt-module-menu a,.nxt-module-menu button,.chd-nav,.nav-link,.nxt-menu-card a,.custom-webviews-menu a,
.btn,.button,button,.nxt-btn,.chd-btn-green,.chd-btn-outline-green,.api-copy-btn,.custom-webviews-btn,.custom-webviews-mini-btn,.custom-webviews-size-btn,
#badgerbuilder-native button,#badgerbuilder-native .download,
.tmdb-tabs a,.tmdb-tabs button,.tab,.tabs button,.nav-tabs .nav-link,.xc-tab,.portal-tab,.nxt-layout-select label,.pill,.badge
){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card-2) 92%,transparent),color-mix(in srgb,var(--nxt-theme-bg) 94%,#000 6%)) !important;
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 38%,rgba(255,255,255,.08)) !important;
  color:var(--nxt-theme-text) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.22),inset 0 0 0 1px rgba(255,255,255,.025) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
.nxt-module-menu a:hover,.nxt-module-menu a.active,.chd-nav:hover,.chd-nav.active,.custom-webviews-menu a:hover,.custom-webviews-menu a.active,
.nav-tabs .nav-link.active,.nav-link.active,.portal-tab.active,.xc-tab.active,.tab.active,.tabs button.active,.pill.active,
.btn:hover,button:hover,.nxt-btn:hover,#badgerbuilder-native button:hover
){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-accent) 22%,var(--nxt-theme-card-2)),color-mix(in srgb,var(--nxt-theme-card) 94%,#000 6%)) !important;
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 65%,#fff 0%) !important;
  color:#fff !important;
  box-shadow:0 0 22px color-mix(in srgb,var(--nxt-theme-accent) 22%,transparent) !important;
}

/* Forms and file inputs */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
input,textarea,select,.form-control,.form-select,.input-group-text,
.chd-field .form-control,.chd-field select,.nxt-field input,.nxt-field textarea,.nxt-field select,
.custom-webviews-field input,.custom-webviews-field textarea,.custom-webviews-field select,
#badgerbuilder-native input,#badgerbuilder-native select,#badgerbuilder-native textarea,
.tmdb-card input,.tmdb-card select,.tmdb-card textarea,.tmdb-panel input,.tmdb-panel select,.tmdb-panel textarea,
.tmdb-app input,.tmdb-app select,.tmdb-app textarea,.tmdb-shell input,.tmdb-shell select,.tmdb-shell textarea
){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-bg) 82%,#fff 4%),color-mix(in srgb,var(--nxt-theme-bg) 88%,#000 12%)) !important;
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 36%,rgba(255,255,255,.10)) !important;
  color:var(--nxt-theme-text) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(input,textarea,select,.form-control,.form-select)::placeholder{color:var(--nxt-theme-muted)!important;opacity:1!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(input:focus,textarea:focus,select:focus,.form-control:focus,.form-select:focus){
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 72%,#fff 8%) !important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--nxt-theme-accent) 42%,transparent),0 0 18px color-mix(in srgb,var(--nxt-theme-accent) 16%,transparent) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) input[type="file"]::file-selector-button{
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card-2) 92%,transparent),color-mix(in srgb,var(--nxt-theme-bg) 92%,#000 8%)) !important;
  color:var(--nxt-theme-text) !important;
  border:1px solid var(--nxt-theme-border) !important;
  border-radius:8px !important;
}

/* Tables */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(table,.table,.nxt-box table,.chd-table-clean,.chd-portal-table,.custom-webviews-media-table){
  background:color-mix(in srgb,var(--nxt-theme-bg) 86%,#000 14%) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(td,th,.table td,.table th,.nxt-box td,.nxt-box th,.chd-table-clean td,.chd-table-clean th,.custom-webviews-media-table td,.custom-webviews-media-table th){
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 22%,rgba(255,255,255,.08)) !important;
  color:var(--nxt-theme-text) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(tbody tr,tbody td){background:color-mix(in srgb,var(--nxt-theme-bg) 84%,transparent) !important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(tbody tr:nth-child(odd),tbody tr:nth-child(odd) td){background:color-mix(in srgb,var(--nxt-theme-card) 72%,transparent) !important}

/* Text and labels */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(h1,h2,h3,h4,h5,h6,label,strong,.card-title,.nxt-section-title,.nxt-box-head,.custom-webviews-menu-title,.custom-webviews-box-head,
.chd-kicker,.chd-title,.chd-section-title,.chd-subhead,.chd-list-title,.nxt-menu-title,.nxt-module-header h1,#badgerbuilder-native .hero h1,#badgerbuilder-native .hero span,
.tmdb-title,.tmdb-kicker,.nxt-api-title,.nxt-api-small-title){color:var(--nxt-theme-text)!important;text-shadow:none!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(a,.text-primary,.nxt-hint,.chd-mini-note,.muted,.text-secondary,small,.small,.form-text,.custom-webviews-upload-note){color:var(--nxt-theme-muted)!important}

/* Preview wrappers and iframe containers */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.preview,.preview-frame,.nxt-media-preview,.frame-preview,.tmdb-preview,.custom-webviews-slideshow-preview,.custom-webviews-slide){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card) 86%,#000 14%),color-mix(in srgb,var(--nxt-theme-bg) 88%,#000 12%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
}

/* Security/danger statuses keep their meaning but match the shell. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.btn-danger,.nxt-danger,.text-danger,.badge.bg-danger,.alert-danger,.danger,.kill-switch,.emergency){border-color:rgba(255,110,125,.55)!important}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.btn-success,.badge.bg-success,.alert-success,.ready,.status-ready){border-color:rgba(120,255,190,.42)!important}

@media(max-width:900px){
  body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.nxt-module-grid,.chd-shell,.nxt-content-grid,.custom-webviews-grid,.custom-webviews-content-grid){grid-template-columns:1fr!important}
}

/*
 * Border/Ring Refinement v1.0.1
 * Fixes the overly bright white outlines introduced by the panel-wide theme
 * contract. Borders now derive from the active theme accent instead of white.
 */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled),
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) *{
  --nxt-theme-border: color-mix(in srgb, var(--nxt-theme-accent, #36a3ff) 34%, transparent) !important;
  --nxt-theme-border-soft: color-mix(in srgb, var(--nxt-theme-accent, #36a3ff) 18%, transparent) !important;
  --nxt-theme-border-strong: color-mix(in srgb, var(--nxt-theme-accent, #36a3ff) 56%, transparent) !important;
  --nxt-panel-line: var(--nxt-theme-border) !important;
}

body.nxt-theme-dev_silver,
body.nxt-theme-dev_silver *{
  --nxt-theme-border: rgba(215,221,232,.26) !important;
  --nxt-theme-border-soft: rgba(215,221,232,.14) !important;
  --nxt-theme-border-strong: rgba(215,221,232,.42) !important;
  --nxt-panel-line: var(--nxt-theme-border) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .card,.card-body,.card-header,.dashboard-card,.dashboard-ref-panel,.dashboard-widget-frame,.stat-card,.widget-card,
  .nxt-module-shell,.nxt-module-grid,.nxt-menu-card,.nxt-section-card,.nxt-box,.nxt-box-body,.nxt-box-head,.module-card,.module-panel,
  .chd-card,.chd-frame,.chd-stat,.chd-note,.chd-endpoint,.chd-table-clean,.chd-portal-table,
  .pia-card,.vpn-card,.webview-card,.frame-card,.output-card,.preview-card,.source-image,.output-sizes,
  .custom-webviews-menu-card,.custom-webviews-section-card,.custom-webviews-box,.custom-webviews-preview,.custom-webviews-preview-viewport,.custom-webviews-preview-box,.custom-webviews-upload-card,.custom-webviews-endpoint,
  .nxt-api-helper-shell,.nxt-api-hero,.nxt-api-cats,.nxt-api-list,.nxt-api-row,.nxt-api-endpoint-drawer,.nxt-api-endpoint-item,.nxt-api-countbox,
  #badgerbuilder-native .hero,#badgerbuilder-native .card,#badgerbuilder-native .pill,#badgerbuilder-native pre,
  .icon-maker-shell,.icon-maker-card,.icon-maker-panel,.nxt-icon-card,.nxt-builder-card,.nxt-tool-card,
  .tmdb-app,.tmdb-shell,.tmdb-card,.tmdb-panel,.tmdb-section,.panel,.section,.glass,.box,
  .table-responsive,.modal-content,.dropdown-menu,
  .nxt-theme-row-btn,.nxt-shortcut-row,.shortcut-row,.theme-row,.login-theme-row,.panel-theme-row
){
  border-color: var(--nxt-theme-border) !important;
  outline-color: var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .nxt-module-menu a,.nxt-module-menu button,.chd-nav,.nav-link,.nxt-menu-card a,.custom-webviews-menu a,
  .btn,.button,button,.nxt-btn,.chd-btn-green,.chd-btn-outline-green,.api-copy-btn,.custom-webviews-btn,.custom-webviews-mini-btn,.custom-webviews-size-btn,
  #badgerbuilder-native button,#badgerbuilder-native .download,
  .tmdb-tabs a,.tmdb-tabs button,.tab,.tabs button,.nav-tabs .nav-link,.xc-tab,.portal-tab,.nxt-layout-select label,.pill,.badge,
  .nxt-theme-row-btn,.nxt-shortcut-row,.shortcut-row,.theme-row,.login-theme-row,.panel-theme-row
){
  border-color: var(--nxt-theme-border) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .nxt-module-menu a:hover,.nxt-module-menu a.active,.chd-nav:hover,.chd-nav.active,.custom-webviews-menu a:hover,.custom-webviews-menu a.active,
  .nav-tabs .nav-link.active,.nav-link.active,.portal-tab.active,.xc-tab.active,.tab.active,.tabs button.active,.pill.active,
  .btn:hover,button:hover,.nxt-btn:hover,#badgerbuilder-native button:hover,
  .nxt-theme-row.is-active .nxt-theme-row-btn,.nxt-theme-row-btn:hover,.nxt-shortcut-row:hover,.shortcut-row:hover
){
  border-color: var(--nxt-theme-border-strong) !important;
  box-shadow: 0 0 18px color-mix(in srgb, var(--nxt-theme-accent, #36a3ff) 18%, transparent), inset 0 0 0 1px var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(input,textarea,select,.form-control,.form-select,.input-group-text){
  border-color: var(--nxt-theme-border) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(table,.table,td,th,.table td,.table th,.table-responsive){
  border-color: var(--nxt-theme-border-soft) !important;
}

/*
 * BB32 Theme Engine Ring Variable Fix v1.0.2
 * Purpose: remove white/blue fallback rings caused by the global force layer.
 * Every outline/border/glow now resolves from the active theme contract.
 */
body.nxt-theme-default,
body.nxt-theme-default *{
  --nxt-theme-accent:#36a3ff !important;
  --nxt-theme-border:rgba(54,163,255,.24) !important;
  --nxt-theme-border-soft:rgba(54,163,255,.10) !important;
  --nxt-theme-border-strong:rgba(54,163,255,.46) !important;
  --nxt-theme-ring:rgba(54,163,255,.18) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}
body.nxt-theme-hud_blue,
body.nxt-theme-hud_blue *{
  --nxt-theme-accent:#22b8ff !important;
  --nxt-theme-border:rgba(34,184,255,.24) !important;
  --nxt-theme-border-soft:rgba(34,184,255,.10) !important;
  --nxt-theme-border-strong:rgba(34,184,255,.48) !important;
  --nxt-theme-ring:rgba(34,184,255,.18) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}
body.nxt-theme-neon_green,
body.nxt-theme-neon_green *{
  --nxt-theme-accent:#37ffb1 !important;
  --nxt-theme-border:rgba(55,255,177,.24) !important;
  --nxt-theme-border-soft:rgba(55,255,177,.10) !important;
  --nxt-theme-border-strong:rgba(55,255,177,.48) !important;
  --nxt-theme-ring:rgba(55,255,177,.18) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}
body.nxt-theme-stealth_ops,
body.nxt-theme-stealth_ops *{
  --nxt-theme-accent:#9aa6bd !important;
  --nxt-theme-border:rgba(154,166,189,.22) !important;
  --nxt-theme-border-soft:rgba(154,166,189,.09) !important;
  --nxt-theme-border-strong:rgba(154,166,189,.40) !important;
  --nxt-theme-ring:rgba(154,166,189,.12) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}
body.nxt-theme-midnight_purple,
body.nxt-theme-midnight_purple *{
  --nxt-theme-accent:#a78bfa !important;
  --nxt-theme-border:rgba(167,139,250,.24) !important;
  --nxt-theme-border-soft:rgba(167,139,250,.10) !important;
  --nxt-theme-border-strong:rgba(167,139,250,.48) !important;
  --nxt-theme-ring:rgba(167,139,250,.18) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}
body.nxt-theme-dev_silver,
body.nxt-theme-dev_silver *{
  --nxt-theme-accent:#d7dde8 !important;
  --nxt-theme-border:rgba(215,221,232,.24) !important;
  --nxt-theme-border-soft:rgba(215,221,232,.10) !important;
  --nxt-theme-border-strong:rgba(215,221,232,.42) !important;
  --nxt-theme-ring:rgba(215,221,232,.14) !important;
  --nxt-panel-line:var(--nxt-theme-border) !important;
}

/* Keep compatibility aliases tied to the active theme, not the old blue fallback. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled),
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) *{
  --nxt-accent:var(--nxt-theme-accent) !important;
  --hud-accent:var(--nxt-theme-accent) !important;
  --theme-accent:var(--nxt-theme-accent) !important;
  --bs-primary:var(--nxt-theme-accent) !important;
  --tblr-primary:var(--nxt-theme-accent) !important;
  --cw-accent:var(--nxt-theme-accent) !important;
  --cw-border:var(--nxt-theme-border) !important;
  --nx-accent:var(--nxt-theme-accent) !important;
  --nx-border:var(--nxt-theme-border) !important;
  --chd-accent:var(--nxt-theme-accent) !important;
  --bdr:var(--nxt-theme-border) !important;
  --bdr2:var(--nxt-theme-border-strong) !important;
  --accent:var(--nxt-theme-accent) !important;
}

/* Universal outline/ring surfaces: no pure white, no fallback blue. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .card,.card-body,.card-header,.dashboard-card,.dashboard-ref-panel,.dashboard-widget-frame,.stat-card,.widget-card,
  .nxt-module-shell,.nxt-module-grid,.nxt-menu-card,.nxt-section-card,.nxt-box,.nxt-box-body,.nxt-box-head,.module-card,.module-panel,
  .chd-card,.chd-frame,.chd-stat,.chd-note,.chd-endpoint,.chd-table-clean,.chd-portal-table,
  .pia-card,.vpn-card,.webview-card,.frame-card,.output-card,.preview-card,.source-image,.output-sizes,
  .custom-webviews-menu-card,.custom-webviews-section-card,.custom-webviews-box,.custom-webviews-preview,.custom-webviews-preview-viewport,.custom-webviews-preview-box,.custom-webviews-upload-card,.custom-webviews-endpoint,
  .nxt-api-helper-shell,.nxt-api-hero,.nxt-api-cats,.nxt-api-list,.nxt-api-row,.nxt-api-endpoint-drawer,.nxt-api-endpoint-item,.nxt-api-countbox,
  #badgerbuilder-native .hero,#badgerbuilder-native .card,#badgerbuilder-native .pill,#badgerbuilder-native pre,
  .icon-maker-shell,.icon-maker-card,.icon-maker-panel,.nxt-icon-card,.nxt-builder-card,.nxt-tool-card,
  .tmdb-app,.tmdb-shell,.tmdb-card,.tmdb-panel,.tmdb-section,.panel,.section,.glass,.box,
  .table-responsive,.modal-content,.dropdown-menu,
  .nxt-theme-row-btn,.nxt-shortcut-row,.shortcut-row,.theme-row,.login-theme-row,.panel-theme-row,
  .panel-sidebar .nav-link,.navbar-vertical .nav-link,aside.navbar .nav-link,#sidebar-menu-wrap a
){
  border-color:var(--nxt-theme-border) !important;
  outline-color:var(--nxt-theme-border-soft) !important;
  box-shadow:0 10px 26px rgba(0,0,0,.24),0 0 16px var(--nxt-theme-ring) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .nxt-module-menu a,.nxt-module-menu button,.chd-nav,.nav-link,.nxt-menu-card a,.custom-webviews-menu a,
  .btn,.button,button,.nxt-btn,.chd-btn-green,.chd-btn-outline-green,.api-copy-btn,.custom-webviews-btn,.custom-webviews-mini-btn,.custom-webviews-size-btn,
  #badgerbuilder-native button,#badgerbuilder-native .download,
  .tmdb-tabs a,.tmdb-tabs button,.tab,.tabs button,.nav-tabs .nav-link,.xc-tab,.portal-tab,.nxt-layout-select label,.pill,.badge,
  .nxt-theme-row-btn,.nxt-shortcut-row,.shortcut-row,.theme-row,.login-theme-row,.panel-theme-row
){
  border-color:var(--nxt-theme-border) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.22),inset 0 0 0 1px var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .nxt-module-menu a:hover,.nxt-module-menu a.active,.chd-nav:hover,.chd-nav.active,.custom-webviews-menu a:hover,.custom-webviews-menu a.active,
  .nav-tabs .nav-link.active,.nav-link.active,.portal-tab.active,.xc-tab.active,.tab.active,.tabs button.active,.pill.active,
  .btn:hover,button:hover,.nxt-btn:hover,#badgerbuilder-native button:hover,
  .nxt-theme-row.is-active .nxt-theme-row-btn,.nxt-theme-row-btn:hover,.nxt-shortcut-row:hover,.shortcut-row:hover,
  .panel-sidebar .nav-link.active,.panel-sidebar .nav-link:hover,.navbar-vertical .nav-link.active,.navbar-vertical .nav-link:hover,aside.navbar .nav-link.active,aside.navbar .nav-link:hover,#sidebar-menu-wrap a:hover
){
  border-color:var(--nxt-theme-border-strong) !important;
  box-shadow:0 0 18px var(--nxt-theme-ring),inset 0 0 0 1px var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  input,textarea,select,.form-control,.form-select,.input-group-text,
  table,.table,td,th,.table td,.table th,.table-responsive
){
  border-color:var(--nxt-theme-border) !important;
  outline-color:var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(input:focus,textarea:focus,select:focus,.form-control:focus,.form-select:focus){
  border-color:var(--nxt-theme-border-strong) !important;
  box-shadow:0 0 0 1px var(--nxt-theme-border-soft),0 0 16px var(--nxt-theme-ring) !important;
}

/*
 * BB32 Standalone Island Theme Completion v1.0.3
 * Purpose: finish the remaining standalone CSS islands that kept blue/dark-blue
 * backgrounds after the global theme contract: BadgerBuilder notices,
 * Stats & Logs, and Security.
 */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  #badgerbuilder-native .nxt-card,
  #badgerbuilder-native .alert,
  #badgerbuilder-native .builder-preview-wrap,
  #badgerbuilder-native .builder-preview-head,
  #badgerbuilder-native .bc-lpe-stat,
  #badgerbuilder-native .bc-lpe-preview-section,
  #badgerbuilder-native .bc-lpe-fake-input,
  #badgerbuilder-native .bc-lpe-table,
  .bc-ls-page .bc-card,
  .bc-ls-page .bc-metrics div,
  .bc-ls-page .bc-field,
  .bc-ls-page .bc-map-legend,
  .bc-ls-page .bc-recent-head input,
  .bc-ls-page .bc-api-hit code,
  .bc-ls-page .bc-table th,
  .bc-ls-page .bc-table td,
  .bc-ls-page .bc-row,
  .api-detail-card,
  .api-detail-card .endpoint-row,
  .api-detail-card .api-root-code,
  .api-detail-card .form-control.api-root-code,
  .security-status-line,
  .security-kill-row,
  .security-qr-box
){
  background:
    radial-gradient(circle at top left, color-mix(in srgb,var(--nxt-theme-accent) 10%,transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb,var(--nxt-theme-card) 96%,transparent), color-mix(in srgb,var(--nxt-theme-bg) 92%,#000 8%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.26), 0 0 18px var(--nxt-theme-ring) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  #badgerbuilder-native .nxt-card *,
  .bc-ls-page .bc-card *,
  .api-detail-card *
){
  text-shadow:none !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  #badgerbuilder-native .nxt-card strong,
  #badgerbuilder-native .builder-preview-head h3,
  #badgerbuilder-native .bc-lpe-section-head h4,
  .bc-ls-page .bc-ls-kicker,
  .bc-ls-page .bc-head,
  .bc-ls-page .bc-map-legend-title,
  .bc-ls-page .bc-metrics b,
  .bc-ls-page .bc-table th,
  .api-detail-card .api-section-title,
  .api-detail-card .api-root-label,
  .api-detail-card-head,
  .endpoint-label
){
  color:var(--nxt-theme-text) !important;
  border-color:var(--nxt-theme-border) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  #badgerbuilder-native .nxt-card span,
  #badgerbuilder-native .nxt-card p,
  .bc-ls-page .bc-ls-subtitle,
  .bc-ls-page .bc-head small,
  .bc-ls-page .bc-muted,
  .bc-ls-page .bc-map-subtitle,
  .bc-ls-page .bc-api-filter-note,
  .api-detail-card .text-secondary,
  .security-status-line
){
  color:var(--nxt-theme-muted) !important;
  opacity:1 !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .bc-ls-page .bc-head,
  .bc-ls-page .bc-list,
  .bc-ls-page .bc-row,
  .bc-ls-page .bc-api-hit,
  .bc-ls-page .bc-api-module-legend,
  .bc-ls-page .bc-table th,
  .bc-ls-page .bc-table td,
  .api-detail-card-head,
  .api-detail-card hr,
  .api-detail-card .border-top
){
  border-color:var(--nxt-theme-border-soft) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .bc-ls-page .bc-ls-btn,
  .bc-ls-page .bc-chip,
  .bc-ls-page .bc-api-live-pill,
  .bc-ls-page .bc-api-module-pill,
  .api-copy-btn,
  .api-detail-card .form-check-input,
  .api-detail-card .form-check-input:checked
){
  background:linear-gradient(180deg, color-mix(in srgb,var(--nxt-theme-accent) 16%,var(--nxt-theme-card)), color-mix(in srgb,var(--nxt-theme-bg) 94%,#000 6%)) !important;
  border-color:var(--nxt-theme-border-strong) !important;
  color:var(--nxt-theme-text) !important;
  box-shadow:0 0 14px var(--nxt-theme-ring) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .bc-ls-page .bc-live-dot,
  .bc-ls-page .bc-api-live-dot,
  .bc-ls-page .bc-api-module-pill:before,
  .bc-ls-page .bc-map-ping
){
  background:var(--nxt-theme-accent) !important;
  border-color:color-mix(in srgb,var(--nxt-theme-accent) 75%,#fff 8%) !important;
  box-shadow:0 0 16px var(--nxt-theme-ring), 0 0 24px color-mix(in srgb,var(--nxt-theme-accent) 26%,transparent) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bc-ls-page .bc-ne-grid{
  background-image:
    linear-gradient(color-mix(in srgb,var(--nxt-theme-accent) 11%,transparent) 1px,transparent 1px),
    linear-gradient(90deg,color-mix(in srgb,var(--nxt-theme-accent) 11%,transparent) 1px,transparent 1px) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bc-ls-page .bc-ne-map{
  filter:drop-shadow(0 0 18px var(--nxt-theme-ring)) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bc-ls-page .bc-ne-map .bc-country{
  fill:color-mix(in srgb,var(--nxt-theme-accent) 18%,var(--nxt-theme-card) 72%) !important;
  stroke:color-mix(in srgb,var(--nxt-theme-accent) 48%,var(--nxt-theme-text) 10%) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bc-ls-page .bc-ne-map .bc-country.active{
  fill:color-mix(in srgb,var(--nxt-theme-accent) 44%,transparent) !important;
  stroke:color-mix(in srgb,var(--nxt-theme-accent) 90%,#fff 10%) !important;
  filter:drop-shadow(0 0 8px var(--nxt-theme-ring)) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .bc-ls-page .bc-ne-map .bc-graticule{
  stroke:color-mix(in srgb,var(--nxt-theme-accent) 16%,transparent) !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .api-detail-card:before{
  background:
    linear-gradient(90deg, transparent, var(--nxt-theme-border-strong), transparent) top left / 100% 1px no-repeat,
    linear-gradient(180deg, var(--nxt-theme-border), transparent 40%) top left / 1px 100% no-repeat !important;
  opacity:.65 !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .api-detail-card :is(input,textarea,select,.form-control,.form-select){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-bg) 86%,#fff 4%),color-mix(in srgb,var(--nxt-theme-bg) 90%,#000 10%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .api-detail-card :is(input:focus,textarea:focus,select:focus,.form-control:focus,.form-select:focus){
  border-color:var(--nxt-theme-border-strong) !important;
  box-shadow:0 0 0 .16rem var(--nxt-theme-ring) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .api-detail-card .form-check-input:checked{
  background-color:var(--nxt-theme-accent) !important;
  border-color:var(--nxt-theme-accent) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .security-kill-row,
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .endpoint-row-danger{
  border-color:rgba(255,110,125,.48) !important;
  background:linear-gradient(180deg,rgba(110,18,34,.16),color-mix(in srgb,var(--nxt-theme-bg) 92%,#000 8%)) !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .security-kill-row h5{
  color:#ff7d8d !important;
}

/* Header shortcut bar should stay theme-neutral and not force old blue. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(.hud-admin-controls,.bc-hud-bar,.nxt-hud-bar,.topbar,.navbar,.navbar-custom){
  background:linear-gradient(180deg,color-mix(in srgb,var(--nxt-theme-card-2) 96%,transparent),color-mix(in srgb,var(--nxt-theme-bg) 92%,#000 8%)) !important;
  border-color:var(--nxt-theme-border) !important;
  color:var(--nxt-theme-text) !important;
}

/* BB44_DIVIDER_CASCADE_FINAL_FIX_START
   Purpose: remove phantom lined-box/divider artifacts that were being reintroduced
   by the final theme enforcer and RC normalizer after the dashboard/widget CSS loaded.
   This targets micro-status rows, metric summaries, and small status grids only;
   it keeps the main card shells intact. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .dashboard-login-watch-summary,
  .dashboard-login-watch-summary > *,
  .dashboard-login-watch-metric,
  .dashboard-login-watch-metric > *,
  .dashboard-login-watch-row,
  .dashboard-login-watch-row > *,
  .security-status-line,
  .security-status-line > *,
  .security-runtime-status,
  .security-runtime-status > *,
  .security-status-grid,
  .security-status-grid > *,
  .security-mini-status,
  .security-mini-status > *,
  .login-watch-summary,
  .login-watch-summary > *,
  .login-watch-metric,
  .login-watch-metric > *,
  .status-line,
  .status-line > *,
  .metric-line,
  .metric-line > *,
  .mini-status-line,
  .mini-status-line > *
){
  border-top:0 !important;
  border-bottom:0 !important;
  border-left:0 !important;
  border-right:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background-image:none !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .dashboard-login-watch-summary,
  .dashboard-login-watch-metric,
  .security-status-line,
  .security-runtime-status,
  .security-status-grid,
  .security-mini-status,
  .login-watch-summary,
  .login-watch-metric,
  .status-line,
  .metric-line,
  .mini-status-line
){
  background:transparent !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .dashboard-login-watch-summary::before,
  .dashboard-login-watch-summary::after,
  .dashboard-login-watch-metric::before,
  .dashboard-login-watch-metric::after,
  .dashboard-login-watch-row::before,
  .dashboard-login-watch-row::after,
  .security-status-line::before,
  .security-status-line::after,
  .security-runtime-status::before,
  .security-runtime-status::after,
  .security-status-grid::before,
  .security-status-grid::after,
  .status-line::before,
  .status-line::after,
  .metric-line::before,
  .metric-line::after
){
  content:none !important;
  display:none !important;
  border:0 !important;
  box-shadow:none !important;
  background:none !important;
}

body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .dashboard-login-watch-summary{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:10px !important;
  padding:0 !important;
}
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .dashboard-login-watch-metric{
  padding:0 !important;
  min-height:auto !important;
  border-radius:0 !important;
}

/* Stop global table dividers from painting tiny status/metric stacks as boxed rows. */
body[class*="nxt-theme-"]:not(.nxt-theme-disabled) :is(
  .dashboard-login-watch-card,
  .security-card,
  .badgersclaw-card,
  .dashboard-ref-panel
) :is(.dashboard-login-watch-summary,.security-status-line,.security-runtime-status,.status-line,.metric-line) :is(table,.table,tbody,tr,td,th){
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}

@media (max-width: 768px){
  body[class*="nxt-theme-"]:not(.nxt-theme-disabled) .dashboard-login-watch-summary{
    grid-template-columns:1fr !important;
    gap:6px !important;
  }
}
/* BB44_DIVIDER_CASCADE_FINAL_FIX_END */

