/* Nexora Pulse / static application theme.
   Geometry: supplied admin specimen. Identity: supplied Nexora logo master.
   Loaded after legacy styles; native data, permissions and component behavior stay native. */
@import url('../fonts/nexora/fonts.css');

:root,
html[data-nexora-theme="light"] {
  --pulse-night: #0b1020;
  --pulse-cyan: #22d3ee;
  --pulse-indigo: #6366f1;
  --pulse-violet: #a855f7;
  --pulse-paper: #f5f6fa;
  --pulse-header-height: 60px;
  --pulse-sidebar-width: 256px;
  --pulse-font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --nx-bg: #f5f6fa;
  --nx-surface: #fff;
  --nx-surface-2: #f0f2f8;
  --nx-border: #e1e5ef;
  --nx-border-strong: #c4ccde;
  --nx-text: #171c35;
  --nx-text-muted: #59627b;
  --nx-text-subtle: #68738d;
  --nx-primary-50: #eef0ff;
  --nx-primary-100: #e2e5ff;
  --nx-primary-200: #c9ceff;
  --nx-primary-300: #a5acf9;
  --nx-primary-400: #8188f5;
  --nx-primary-500: #6366f1;
  --nx-primary-600: #4f46d6;
  --nx-primary-700: #4338b9;
  --nx-primary-800: #35308d;
  --nx-primary-900: #242253;
  --nx-accent-50: #e8fbfe;
  --nx-accent-100: #cff6fc;
  --nx-accent-500: #22d3ee;
  --nx-accent-600: #087f96;
  --nx-accent-700: #09677c;
  --nx-neutral-50: #f7f8fc;
  --nx-neutral-100: #f0f2f8;
  --nx-neutral-200: #e1e5ef;
  --nx-neutral-300: #c4ccde;
  --nx-neutral-400: #8892aa;
  --nx-neutral-500: #68738d;
  --nx-neutral-600: #59627b;
  --nx-neutral-700: #3f4964;
  --nx-neutral-800: #242d49;
  --nx-neutral-900: #171c35;
  --nx-radius-sm: 8px;
  --nx-radius-md: 10px;
  --nx-radius-lg: 20px;
  --nx-radius-xl: 24px;
  --nx-shadow-sm: 0 2px 8px rgb(11 16 32 / 3%);
  --nx-shadow: 0 4px 20px rgb(11 16 32 / 3%);
  --nx-shadow-md: 0 8px 28px rgb(11 16 32 / 7%);
  --nx-shadow-lg: 0 16px 40px rgb(11 16 32 / 12%);
  --nx-shadow-ring: 0 0 0 3px rgb(99 102 241 / 20%);
  --nx-control-border: #b5bed1;
  --nx-focus: #4f46d6;
  --nx-dur: 0ms;
  --pulse-space-1: 4px;
  --pulse-space-2: 8px;
  --pulse-space-3: 12px;
  --pulse-space-4: 16px;
  --pulse-space-5: 20px;
  --pulse-space-6: 24px;
  --pulse-space-7: 32px;
  --pulse-control-height: 36px;
  --pulse-button-height: 34px;
  --pulse-table-cell-y: 9px;
}
html[data-nexora-theme="dark"] {
  --nx-bg: #0b1020;
  --nx-surface: #141c33;
  --nx-surface-2: #1b2540;
  --nx-border: #303d59;
  --nx-border-strong: #506283;
  --nx-text: #f2f4ff;
  --nx-text-muted: #b7c1d9;
  --nx-text-subtle: #9facc8;
  --nx-neutral-50: #172038;
  --nx-neutral-100: #1b2540;
  --nx-neutral-200: #303d59;
  --nx-neutral-300: #506283;
  --nx-neutral-400: #9facc8;
  --nx-neutral-500: #b7c1d9;
  --nx-neutral-600: #c9d1e6;
  --nx-neutral-700: #dce2f2;
  --nx-neutral-800: #edf0ff;
  --nx-neutral-900: #f7f8ff;
  --nx-primary-50: #222653;
  --nx-primary-100: #2d3267;
  --nx-primary-200: #777fe0;
  --nx-primary-300: #a5acf9;
  --nx-primary-600: #a5acf9;
  --nx-primary-700: #c4c9ff;
  --nx-accent-50: #123642;
  --nx-accent-700: #79e7f7;
  --nx-focus: #22d3ee;
}

/* Motion is disabled for every application appearance, not just reduced-motion users.
   Do not reset transforms globally: dialogs, workflow zoom and editors use them. */
html { scroll-behavior: auto !important; }
body:is(.admin,.customers,.authentication),
body:is(.admin,.customers,.authentication) *,
body:is(.admin,.customers,.authentication) *::before,
body:is(.admin,.customers,.authentication) *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
body:is(.admin,.customers,.authentication) { font-family: var(--pulse-font) !important; background: var(--nx-bg); color: var(--nx-text); }
body:is(.admin,.customers,.authentication) :is(h1,h2,h3,h4,h5,h6,input,textarea,select,button,.btn,.table,.nx-eyebrow,.nx-op,.nx-page-subtitle) { font-family: var(--pulse-font); }
body:is(.admin,.customers,.authentication) :is(h1,h2,h3,h4) { letter-spacing: -.035em; font-weight: 700; }
body:is(.admin,.customers,.authentication) :is(h5,h6) { font-weight: 700; }
body:is(.admin,.customers,.authentication) :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 2px solid var(--nx-focus) !important; outline-offset: 3px; }
body:is(.admin,.customers,.authentication) .nx-lift:hover,
body:is(.admin,.customers,.authentication) .nx-pressable:active { transform: none; }
body.js-motion-ready :is(.nx-reveal,.nx-reveal-up,.nx-reveal-fade,.nx-reveal-scale),
body.js-motion-ready .nx-stagger > * { opacity: 1 !important; transform: none !important; will-change: auto; }
body:is(.admin,.customers,.authentication) :is(.nx-pagebar,.nx-skeleton::after) { display: none !important; }
body:is(.admin,.customers) :is(#wrapper,.modal)::before { content: none !important; }

/* Shared controls and surfaces: tables remain real tables, and overflow is local. */
body:is(.admin,.customers) :is(.panel,.panel_s,.nx-card,.nx-section,.nx-kpi) { border-radius: 16px; border-color: var(--nx-border); box-shadow: var(--nx-shadow); background: var(--nx-surface); }
body:is(.admin,.customers) .panel_s > .panel-body { border: 1px solid var(--nx-border); border-radius: 16px; background: var(--nx-surface); padding: var(--pulse-space-5); box-shadow: var(--nx-shadow); }
body:is(.admin,.customers) :is(.panel-heading,.panel-footer) { border-color: var(--nx-border); background: var(--nx-surface); padding: 16px 20px; }
body:is(.admin,.customers) .panel-heading { border-radius: 16px 16px 0 0; }
body:is(.admin,.customers) .panel-footer { border-radius: 0 0 16px 16px; }
body:is(.admin,.customers) .btn { min-height: var(--pulse-button-height); border-radius: 9px; font-size: 12px; font-weight: 650; padding: 7px 12px; box-shadow: none; letter-spacing: 0; line-height: 1.4; }
body:is(.admin,.customers,.authentication) .btn-primary:not(.pulse-action--send,.pulse-action--save,.pulse-action--import,.pulse-action--run) { background: #4f46d6 !important; border-color: #4f46d6 !important; color: #fff !important; }
body:is(.admin,.customers,.authentication) .btn-primary:not(.pulse-action--send,.pulse-action--save,.pulse-action--import,.pulse-action--run):is(:hover,:focus) { background: #4338b9 !important; border-color: #4338b9 !important; color: #fff !important; }
body:is(.admin,.customers) .btn-default { color: var(--nx-text); border-color: var(--nx-border-strong); background: var(--nx-surface); }
body:is(.admin,.customers) :is(.form-control,.bootstrap-select > .dropdown-toggle) { min-height: var(--pulse-control-height); border: 1px solid var(--nx-control-border); border-radius: 9px; background-color: var(--nx-surface); color: var(--nx-text); box-shadow: none; font-size: 13px; }
body:is(.admin,.customers) textarea.form-control { min-height: 90px; }
body:is(.admin,.customers) .form-control:focus { border-color: var(--nx-focus); box-shadow: var(--nx-shadow-ring); }
body:is(.admin,.customers) label { font-size: 12px; font-weight: 650; color: var(--nx-text-muted); }
body:is(.admin,.customers) .table > thead > tr > th { background: var(--nx-surface-2); color: var(--nx-text-muted); border-color: var(--nx-border); font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; padding: 10px 12px; }
body:is(.admin,.customers) .table > tbody > tr > td { border-color: var(--nx-border); padding: var(--pulse-table-cell-y) 12px; font-size: 12px; vertical-align: middle; color: var(--nx-text); line-height: 1.5; }
body:is(.admin,.customers) .table-hover > tbody > tr:hover { background: var(--nx-surface-2); }
body:is(.admin,.customers) .label { border-radius: 7px; padding: 4px 8px; font-size: 10px; font-weight: 650; }
body:is(.admin,.customers) .nav-tabs { border-color: var(--nx-border); }
body:is(.admin,.customers) .nav-tabs > li > a { color: var(--nx-text-muted); font-size: 12px; font-weight: 650; border-radius: 8px 8px 0 0; }
body:is(.admin,.customers) .nav-tabs > li.active > a { color: var(--nx-primary-600); border-bottom: 2px solid var(--pulse-indigo); background: var(--nx-surface); }
body:is(.admin,.customers) :is(.dropdown-menu,.popover,.modal-content) { border: 1px solid var(--nx-border); border-radius: 14px; background: var(--nx-surface); box-shadow: var(--nx-shadow-lg); }
body:is(.admin,.customers) :is(.dropdown-menu > li > a,.dropdown-menu li a) { font-size: 12px; color: var(--nx-text); }
body:is(.admin,.customers) .modal-header { border-color: var(--nx-border); border-radius: 14px 14px 0 0; background: var(--nx-surface-2); }
body:is(.admin,.customers) .modal-footer { border-color: var(--nx-border); border-radius: 0 0 14px 14px; }
body:is(.admin,.customers) .nx-page-header { padding: 0 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--nx-border); background: none; }
body:is(.admin,.customers) .nx-page-header::before { content: none; }
body:is(.admin,.customers) .nx-page-title { font-size: 26px; line-height: 1.2; font-weight: 750; color: var(--nx-text); }
body:is(.admin,.customers) .nx-page-subtitle { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--nx-text-muted); }
body:is(.admin,.customers) .nx-kpi { padding: 20px; }
body:is(.admin,.customers) .nx-kpi:hover { transform: none; }
body:is(.admin,.customers) .nx-kpi-value { font-family: var(--pulse-font); letter-spacing: -.05em; }
body:is(.admin,.customers) .nx-kpi--primary { background: linear-gradient(120deg,#161d48,#252866); color: #fff; }
body:is(.admin,.customers) .nx-kpi--primary .nx-kpi-value { color: #79e7f7 !important; }

/* Compact application rhythm and semantic actions. This is deliberately not
   applied to every .btn as flex: Selectpicker and input-group geometry is native. */
@media screen {
  body:is(.admin,.customers) .form-group { margin-bottom: var(--pulse-space-4); }
  body:is(.admin,.customers) .modal-body .form-group { margin-bottom: 14px; }
  body:is(.admin,.customers) fieldset > legend { padding-bottom: 10px; margin-bottom: 16px; font-size: 14px; font-weight: 650; color: var(--nx-text); border-color: var(--nx-border); }
  body:is(.admin,.customers) .modal-body { padding: 20px; }
  body:is(.admin,.customers) .row-options { margin-top: 3px; font-size: 11px; line-height: 1.5; }
  body:is(.admin,.customers) table.dataTable .btn { min-height: 28px; padding: 4px 8px; font-size: 11px; }
  body:is(.admin,.customers) .btn.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; line-height: 1; }
  body:is(.admin,.customers) .btn.btn-icon > :is(i,svg) { margin: 0; line-height: 1; }
  body:is(.admin,.customers) .btn-default:is(:hover,:focus) { color: var(--nx-text); background: var(--nx-surface-2); border-color: var(--nx-border-strong); }
  body:is(.admin,.customers,.authentication) :is(.btn-info,.pulse-action--send,.pulse-action--run):not(.pulse-action--save,.pulse-action--import) { background: #22d3ee !important; border-color: #22d3ee !important; color: #0b1020 !important; }
  body:is(.admin,.customers,.authentication) :is(.btn-info,.pulse-action--send,.pulse-action--run):not(.pulse-action--save,.pulse-action--import):is(:hover,:focus) { background: #67e8f9 !important; border-color: #67e8f9 !important; color: #0b1020 !important; }
  body:is(.admin,.customers,.authentication) :is(.btn-info,.pulse-action--send,.pulse-action--run):not(.pulse-action--save,.pulse-action--import):is(:active,.active) { background: #06b6d4 !important; border-color: #06b6d4 !important; color: #0b1020 !important; }
  body:is(.admin,.customers,.authentication) .btn.btn-success { background: #15803d; border-color: #15803d; color: #fff; }
  body:is(.admin,.customers,.authentication) .btn.btn-success:is(:hover,:focus) { background: #166534; border-color: #166534; color: #fff; }
  body:is(.admin,.customers,.authentication) .btn.btn-success:is(:active,.active) { background: #14532d; border-color: #14532d; color: #fff; }
  body:is(.admin,.customers,.authentication) .btn.btn-warning { background: #facc15; border-color: #facc15; color: #0b1020; }
  body:is(.admin,.customers,.authentication) .btn.btn-warning:is(:hover,:focus) { background: #eab308; border-color: #eab308; color: #0b1020; }
  body:is(.admin,.customers,.authentication) .btn.btn-danger { background: #b42332; border-color: #b42332; color: #fff; }
  body:is(.admin,.customers,.authentication) .btn.btn-danger:is(:hover,:focus) { background: #961b29; border-color: #961b29; color: #fff; }
  body:is(.admin,.customers,.authentication) .btn-primary:not(.pulse-action--send,.pulse-action--save,.pulse-action--import,.pulse-action--run):is(:active,.active) { background: #3730a3 !important; border-color: #3730a3 !important; color: #fff !important; }

  .pulse-page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; margin-bottom: 20px; }
  .pulse-page-heading { flex: 1 1 220px; min-width: 0; }
  .pulse-page-header .pulse-page-title { margin-block: 0; }
  .pulse-page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
  body:is(.admin,.customers) .pulse-page-actions > .btn { margin: 0; }
  body:is(.admin,.customers) .pulse-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; vertical-align: middle; text-decoration: none; }
  body:is(.admin,.customers) .pulse-action-glyph { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0; font-size: 14px; line-height: 1; }
  body:is(.admin,.customers) .pulse-action-icon { width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; gap: 0; line-height: 1; border-radius: 8px; }
  body:is(.admin,.customers) .row-options .pulse-action-icon { width: 28px; min-width: 28px; height: 28px; min-height: 28px; }
  body:is(.admin,.customers) :is(#wrapper,.modal) :is(.pulse-action--edit,.pulse-action--copy,.pulse-action--export) { color: var(--nx-primary-700); background: var(--nx-primary-50); border-color: var(--nx-primary-200); }
  body:is(.admin,.customers) :is(#wrapper,.modal) :is(.pulse-action--view,.pulse-action--filter) { color: var(--nx-accent-700); background: var(--nx-accent-50); border-color: var(--nx-border); }
  body:is(.admin,.customers) :is(#wrapper,.modal) :is(.pulse-action--delete,.pulse-action--stop,.pulse-action--reset) { color: var(--pulse-bad); background: var(--pulse-bad-bg); border-color: var(--pulse-bad); }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--cancel { color: var(--nx-text-muted); background: var(--nx-surface); border-color: var(--nx-border-strong); }
  body:is(.admin,.customers) :is(#wrapper,.modal) :is(.pulse-action--edit,.pulse-action--copy,.pulse-action--export,.pulse-action--view,.pulse-action--filter):hover { border-color: var(--nx-primary-400); }

  .pulse-theme-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--nx-border); border-radius: 10px; background: var(--nx-surface-2); vertical-align: middle; }
  .pulse-theme-option { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; color: var(--nx-text-muted); background: transparent; line-height: 1; }
  .pulse-theme-option > :is(i,svg) { margin: 0; font-size: 14px; line-height: 1; }
  .pulse-theme-option:hover { color: var(--nx-primary-700); background: var(--nx-primary-50); }
  .pulse-theme-option[aria-pressed="true"] { color: var(--nx-primary-700); background: var(--nx-surface); box-shadow: var(--nx-shadow-sm); }
  .pulse-theme-option:focus-visible { outline: 2px solid var(--nx-focus); outline-offset: 2px; }
  body.admin #header .nexora-appearance { width: auto; margin-inline: 6px; }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--create { background: #4f46d6; border-color: #4f46d6; color: #fff; }
  body:is(.admin,.customers) .pulse-page-actions > :is(.btn,.btn-group,.dropdown,.form-group) { float: none; margin: 0; }
  body:is(.admin,.customers) .pulse-record-cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 240px; }
  body:is(.admin,.customers) .pulse-record-label { flex: 1 1 auto; min-width: 120px; max-width: 420px; overflow-wrap: break-word; }
  body:is(.admin,.customers) .row-options.pulse-row-actions { display: inline-flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 4px; position: static; left: auto; right: auto; margin: 0; padding: 0; opacity: 1; visibility: visible; vertical-align: middle; }
  body:is(.admin,.customers) table.dataTable td :is(.text-has-action,.text-nowrap,.relative.date) { white-space: nowrap; }
  body:is(.admin,.customers) table.dataTable thead th { white-space: nowrap; }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--save { background: #15803d; border-color: #15803d; color: #fff; }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--save:is(:hover,:focus) { background: #166534; border-color: #166534; color: #fff; }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--import { background: var(--nx-accent-50); border-color: var(--nx-accent-700); color: var(--nx-accent-700); }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--save:is(:active,.active) { background: #14532d !important; border-color: #14532d !important; color: #fff !important; }
  body:is(.admin,.customers) :is(#wrapper,.modal) .pulse-action--import:is(:active,.active) { background: var(--nx-accent-50) !important; border-color: var(--nx-accent-700) !important; color: var(--nx-accent-700) !important; }
}

/* Header and navigation geometry is screen-only; print keeps native documents. */
@media screen {
  body.admin #header { height: var(--pulse-header-height) !important; min-height: 60px; position: fixed; inset: 0 0 auto; z-index: 99; border-bottom: 1px solid var(--nx-border); background: var(--nx-surface); box-shadow: none; padding-inline: 18px; }
  body.admin #header > nav { height: 60px; margin-inline-start: 0 !important; }
  body.admin #header > nav > .tw-flex { height: 60px; align-items: center; gap: 16px; }
  body.admin #header #logo { width: 202px; height: 60px !important; min-width: 145px; margin: 0; }
  body.admin #header #logo img { width: 157px !important; height: auto !important; max-height: 42px; }
  body.admin #header #top_search { margin: 0; align-self: center; width: min(28vw,420px); }
  body.admin #header #search_input { height: 38px; border: 1px solid var(--nx-border) !important; border-radius: 9px !important; background: var(--nx-bg) !important; color: var(--nx-text); }
  body.admin #header #top_search_button { top: 2px; }
  body.admin #header .navbar-nav > li > a { padding-block: 19px; color: var(--nx-text-muted); background: transparent; }
  body.admin #header .hide-menu { display: inline-flex; position: relative; float: inline-start; margin: 13px 12px 0 0 !important; width: 34px; height: 34px; align-items: center; justify-content: center; color: var(--nx-text-muted); }
  body.admin #header .hide-menu svg { width: 20px; height: 20px; }
  body.admin #wrapper { margin-top: 60px !important; margin-inline-start: 256px !important; margin-inline-end: 0 !important; padding: 24px !important; min-height: calc(100vh - 60px); background: var(--nx-bg); border: 0; }
  body.admin.show-sidebar #wrapper::after { display: none !important; }
  body.admin #wrapper > .content { padding: 0 !important; margin: 0 auto; max-width: 1600px; }
  body.admin.hide-sidebar #wrapper { margin-inline-start: 0 !important; }
  body.admin #menu { position: fixed !important; top: 60px !important; inset-inline-start: 0 !important; bottom: 0; width: 256px !important; height: calc(100dvh - 60px) !important; min-height: 0 !important; margin: 0 !important; display: flex !important; flex-direction: column; z-index: 98; background: radial-gradient(ellipse at 0 0,#242754 0,transparent 55%),linear-gradient(165deg,#141b34,#0b1020); border: 0; box-shadow: none; overflow: visible; }
  body.admin.hide-sidebar #menu { display: none !important; }
  body.admin #side-menu { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 !important; padding: 0 12px 18px; scrollbar-width: thin; scrollbar-color: #3e4765 transparent; order: 2; }
  body.admin #side-menu > li { border: 0 !important; margin: 0 0 4px; padding: 0; }
  body.admin #side-menu > li > a { min-height: 44px; display: flex; gap: 9px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 11px; color: #e1e5f6 !important; background: transparent; box-shadow: none; font-size: 12px; font-weight: 600; }
  body.admin #side-menu > li:has(.nav-second-level) { border: 0 !important; border-radius: 9px; background: transparent; }
  body.admin #side-menu > li:has(.nav-second-level) > a { min-height: 44px; border: 0; }
  body.admin #side-menu > li > a .menu-icon { width: 28px; min-width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; margin: 0; background: #22d3ee12; color: #67def0 !important; font-size: 13px; }
  body.admin #side-menu > li:nth-of-type(3n) > a .menu-icon { color: #b7a4ff !important; background: #a855f714; }
  body.admin #side-menu > li:nth-of-type(3n + 1) > a .menu-icon { color: #a8b6ff !important; background: #6366f11f; }
  body.admin .pulse-nav-labels { min-width: 0; flex: 1; }
  body.admin #side-menu .menu-text { display: block; line-height: 1.4; white-space: normal; }
  body.admin .pulse-nav-description { display: block; margin-top: 4px; color: #a6b0cd; font-size: 10px; font-weight: 400; line-height: 1.45; letter-spacing: 0; }
  body.admin #side-menu > li > a .arrow { margin: 0; color: #9da8c9; font-size: 10px; }
  body.admin #side-menu > li > a:is(:hover,:focus) { background: #ffffff0b; }
  body.admin #side-menu > li.active:has(.nav-second-level) { border-color: transparent !important; background: transparent; }
  body.admin #side-menu > li.active:has(.nav-second-level) > a { background: #6366f112; color: #fff !important; }
  body.admin #side-menu > li.active:not(:has(.nav-second-level)) > a,
  body.admin #side-menu > li > a[aria-current="page"] { background: linear-gradient(110deg,#83e7f5,#54d9f0); color: #0b1732 !important; box-shadow: none; }
  body.admin #side-menu > li.active:not(:has(.nav-second-level)) > a .menu-icon { color: #112447 !important; background: #ffffff45; }
  body.admin #side-menu .nav-second-level { border-inline-start: 1px solid #ffffff20; margin-block: 0 10px; margin-inline: 27px 10px; padding: 0; padding-inline-start: 6px; background: none; }
  body.admin #side-menu .nav-second-level > li > a { padding: 8px 9px; margin: 2px 0; min-height: 34px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; color: #c5cde6 !important; background: transparent; font-size: 11px; line-height: 1.4; box-shadow: none; }
  body.admin #side-menu .nav-second-level .menu-icon { color: #8f9cbd; font-size: 12px; }
  body.admin #side-menu .nav-second-level > li.active > a { background: #22d3ee18 !important; color: #7be5f5 !important; font-weight: 650; }
  body.admin #side-menu .nav-second-level > li > a:is(:hover,:focus) { background: #ffffff09; color: #fff !important; }
  body.admin #side-menu [hidden] { display: none !important; }
  body.admin #side-menu .pulse-search-open > .nav-second-level { display: block !important; height: auto !important; }
  body.admin .pulse-nav-intro { padding: 18px 22px 12px; order: 0; }
  .pulse-eyebrow { display: block; font-size: 9px; font-weight: 700; letter-spacing: .17em; line-height: 1.5; text-transform: uppercase; }
  body.admin .pulse-nav-intro .pulse-eyebrow { color: #88a1cf; }
  body.admin .pulse-nav-intro strong { display: block; margin: 7px 0 5px; color: #fff; font-size: 18px; letter-spacing: -.035em; font-weight: 700; }
  body.admin .pulse-nav-intro > span:last-child { display: block; font-size: 11px; color: #a6b0cd; }
  body.admin .pulse-nav-search { order: 1; position: relative; margin: 0 18px 14px; }
  body.admin .pulse-nav-search input { width: 100%; min-width: 0; height: 38px; padding: 0 28px 0 33px; background: #ffffff07; border: 1px solid #ffffff24; border-radius: 9px; color: #fff; font-size: 11px; }
  body.admin .pulse-nav-search input::placeholder { color: #a6b0cd; opacity: 1; }
  body.admin .pulse-nav-search > i { position: absolute; top: 13px; left: 12px; color: #99a7c9; font-size: 11px; }
  .pulse-search-hint { position: absolute; top: 10px; right: 12px; color: #99a7c9; font-size: 11px; }
  body.admin .pulse-menu-empty { order: 1; color: #c5cde6; padding: 0 22px; font-size: 12px; }
  body.admin .pulse-menu-empty[hidden] { display: none; }
  body.admin #menu .sidebar-user-profile { order: 3; margin: 0 !important; padding: 12px; border-top: 1px solid #ffffff16; }
  body.admin #menu .sidebar-user-profile > .profile { margin: 0; background: #ffffff06 !important; border: 1px solid #ffffff1c !important; border-radius: 11px !important; padding: 10px !important; box-shadow: none !important; }
  body.admin #menu .sidebar-user-profile .tw-text-neutral-800 { color: #eef1ff !important; font-size: 11px; }
  body.admin #menu .sidebar-user-profile .tw-text-xs { color: #a6b0cd !important; font-size: 10px; }
  body.admin #menu .sidebar-user-profile .dropdown-menu { bottom: calc(100% - 5px); top: auto; margin: 0; width: calc(100% - 24px); }
  body.admin .nexora-appearance { margin-inline: 12px; }
  body.admin .nexora-appearance .form-control { min-height: 32px; height: 32px; font-size: 11px; width: 116px; }
  .pulse-nav-backdrop[hidden] { display: none !important; }
  .pulse-nav-backdrop { position: fixed; inset: 60px 0 0; z-index: 97; border: 0; background: #0b102099; padding: 0; }
  html[data-nexora-theme="dark"] body.admin #header { background: #141c33; }
  html[data-nexora-theme="dark"] body.admin #header #logo img { content: url('../img/nexora/nexora-lockup-on-dark.svg'); }
}

/* Workspace landing: real authorized destinations, no invented business metrics. */
.pulse-home { padding-bottom: 24px; }
.pulse-home-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 5px 0 26px; }
.pulse-home-heading .pulse-eyebrow { color: var(--nx-primary-600); }
.pulse-home-heading h1 { color: var(--nx-text); margin: 9px 0 0; font-size: 32px; line-height: 1.2; }
.pulse-home-heading p { color: var(--nx-text-muted); font-size: 12px; margin: 0 0 3px; }
.pulse-home-hero { position: relative; border-radius: 18px; background: radial-gradient(ellipse at 85% 0,#383b85 0,transparent 65%),linear-gradient(110deg,#111831,#1b224b); color: #fff; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 160px; margin-bottom: 20px; }
.pulse-home-hero .pulse-eyebrow { color: #79e7f7; }
.pulse-home-hero h2 { color: #fff; font-size: 28px; line-height: 1.16; margin: 10px 0; max-width: 650px; }
.pulse-home-hero p { color: #c1cae9; font-size: 12px; line-height: 1.6; max-width: 500px; margin: 0; }
.pulse-home-hero img { width: 96px; height: 96px; margin-inline: 0; flex-shrink: 0; }
.pulse-home-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.pulse-home-card { display: flex; flex-direction: column; min-width: 0; gap: 12px; padding: 20px; border-radius: 16px; border: 1px solid var(--nx-border); background: var(--nx-surface); box-shadow: var(--nx-shadow); color: var(--nx-text); }
.pulse-home-card:hover { color: var(--nx-text); border-color: var(--nx-primary-300); text-decoration: none; }
.pulse-home-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--nx-primary-50); color: var(--nx-primary-600); font-size: 16px; }
.pulse-home-card:nth-child(2) .pulse-home-icon { background: #e6f8fb; color: #08788e; }
.pulse-home-card:nth-child(3) .pulse-home-icon { background: #f2eafa; color: #7b38b1; }
.pulse-home-card strong { font-size: 14px; font-weight: 700; }
.pulse-home-card small { color: var(--nx-text-muted); line-height: 1.65; font-size: 11px; }
.pulse-home-card .pulse-card-footer { color: var(--nx-primary-600); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pulse-home-directory { border: 1px solid var(--nx-border); border-radius: 20px; padding: 26px; background: var(--nx-surface); box-shadow: var(--nx-shadow); }
.pulse-home-directory h2 { color: var(--nx-text); font-size: 19px; margin: 0 0 8px; }
.pulse-home-directory > p { color: var(--nx-text-muted); font-size: 12px; margin-bottom: 22px; }
.pulse-directory-row { display: grid; grid-template-columns: minmax(170px,1fr) minmax(0,2fr); gap: 24px; padding: 17px 0; border-top: 1px solid var(--nx-border); }
.pulse-directory-row h3 { font-size: 12px; margin: 5px 0 0; font-weight: 700; color: var(--nx-text); letter-spacing: 0; }
.pulse-directory-row h3 i { color: var(--nx-primary-600); margin-inline-end: 9px; width: 18px; }
.pulse-directory-links { display: flex; flex-wrap: wrap; gap: 7px; }
.pulse-directory-links a { color: var(--nx-text-muted); background: var(--nx-surface-2); border: 1px solid var(--nx-border); border-radius: 7px; padding: 7px 10px; font-size: 10px; font-weight: 600; }
.pulse-directory-links a:hover { color: var(--nx-primary-600); border-color: var(--nx-primary-300); text-decoration: none; }

/* Auth and customer surfaces share the identity without adopting admin navigation. */
body.authentication { background: var(--pulse-paper); }
body:is(.admin,.customers,.authentication) input:is([type="checkbox"],[type="radio"],[type="range"]) { accent-color: var(--pulse-indigo); }
body:is(.login_admin,.customers_login) :is(.tw-grid) > aside { background: radial-gradient(ellipse at top right,#363a80,transparent 65%),linear-gradient(145deg,#0b1020,#171d43) !important; }
body:is(.login_admin,.customers_login) :is(.tw-grid) > aside > div[class*="tw-absolute"] { display: none; }
body:is(.login_admin,.customers_login) :is(.tw-grid) > aside h2 { font-family: var(--pulse-font); font-weight: 700; letter-spacing: -.04em; font-size: 38px; color: #fff; }
body:is(.login_admin,.customers_login) :is(.tw-grid) > aside h2 span { color: #79e7f7; }
body:is(.login_admin,.customers_login) :is(.tw-grid) > aside p { color: #c1cae9; }
body.authentication :is(input,button,.btn) { font-family: var(--pulse-font); border-radius: 9px; }
body:is(.authentication,.customers_login) main > div > .tw-bg-white { border-radius: 20px; border-color: #e1e5ef; box-shadow: var(--nx-shadow); }
.pulse-auth-logo { width: 200px; height: auto; }
html[data-nexora-theme="dark"] body.customers .navbar-brand.logo img { content: url('../img/nexora/nexora-lockup-on-dark.svg'); }
body.customers .navbar-default { background: var(--nx-surface); border-color: var(--nx-border); box-shadow: none; }
body.customers .nexora-appearance .bootstrap-select.form-control { border: 0; padding: 0 !important; box-shadow: none; background: transparent; }
body.customers .nexora-appearance .bootstrap-select > .dropdown-toggle { height: 36px; min-height: 36px; }
body.customers .navbar-default .navbar-nav > li > a { color: var(--nx-text-muted); font-size: 12px; font-weight: 600; }
body.customers .navbar-default .navbar-nav > li.active > a { background: var(--nx-primary-50); color: var(--nx-primary-600); border-radius: 8px; }

/* Dark mode module surfaces and links; preserve semantic statuses and editor canvases. */
html[data-nexora-theme="dark"] body:is(.admin,.customers) :is(a:not(.btn):not(.label):not(.badge),.pagination > li > a) { color: #aeb8ff; }
html[data-nexora-theme="dark"] body:is(.admin,.customers) :is(a:not(.btn):hover,.nav-tabs > li.active > a) { color: #d3d8ff; }
html[data-nexora-theme="dark"] body:is(.admin,.customers) :is(.form-control,.bootstrap-select > .dropdown-toggle) { border-color: #506283; background-color: var(--nx-surface); color: var(--nx-text); }
html[data-nexora-theme="dark"] body:is(.admin,.customers) :is(.well,.list-group-item,.panel-body,.panel-footer,.nx-card,.nx-section) { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
html[data-nexora-theme="dark"] body:is(.admin,.customers) :is(.nexora-wf-node,.nexora-batches .batch-card,.nexora-batches .batch-shell,.nexora-batches .batch-form,.nexora-batches .segment-panel) { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
html[data-nexora-theme="dark"] .pulse-home-card { color: var(--nx-text) !important; }
html[data-nexora-theme="dark"] .pulse-home-card:nth-child(2) .pulse-home-icon { background: #123642; color: #79e7f7; }
html[data-nexora-theme="dark"] .pulse-home-card:nth-child(3) .pulse-home-icon { background: #382449; color: #d5a6ff; }

@media screen and (max-width: 1250px) {
  .pulse-home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.admin .panel_s > .panel-body { padding: 20px; }
  body.admin #header #logo { width: 175px; }
}
@media screen and (max-width: 1180px) {
  body.admin #wrapper, body.admin.hide-sidebar #wrapper { margin-inline-start: 0 !important; padding: 20px !important; }
  body.admin #menu { width: 280px !important; display: none !important; }
  body.admin.show-sidebar #menu { display: flex !important; }
  body.admin #header #logo { width: 180px; display: flex !important; }
  body.admin #header .hide-menu { display: inline-flex !important; }
  body.admin #header #top_search { width: min(25vw,300px); }
  .pulse-home-heading h1 { font-size: 29px; }
}
@media screen and (max-width: 800px) {
  .pulse-home-heading { display: block; }
  .pulse-home-heading p { margin-top: 10px; }
  .pulse-home-hero { padding: 22px; min-height: 0; gap: 24px; margin-bottom: 20px; border-radius: 18px; }
  .pulse-home-hero h2 { font-size: 26px; line-height: 1.16; margin: 10px 0; }
  .pulse-home-hero img { width: 80px; height: 80px; margin-inline: 0; }
  .pulse-directory-row { grid-template-columns: 1fr; gap: 12px; }
  body.admin #header #logo { width: 150px; }
  body.admin #header #logo img { width: 130px !important; }
}
@media screen and (max-width: 700px) {
  body.admin #wrapper, body.admin.hide-sidebar #wrapper { padding: 16px !important; }
  body.admin #header { padding-inline: 10px; }
  body.admin #header #top_search { display: none !important; }
  body.admin #header > nav > .tw-flex { gap: 0; }
  body.admin #header .nexora-appearance { margin-inline: 4px; }
  body.admin #header .nexora-appearance .form-control { width: 90px; font-size: 10px; padding-inline: 5px; }
  body.admin #header .navbar-nav > li > a { padding-inline: 9px; }
  body.admin .panel_s > .panel-body { padding: 16px; }
  .pulse-home-directory { padding: 20px; }
}
@media screen and (max-width: 480px) {
  body.admin #header #logo { width: 124px; min-width: 124px; }
  body.admin #header #logo img { width: 112px !important; }
  body.admin #header .hide-menu { margin-inline-end: 5px !important; }
  body.admin #header .nexora-command-trigger { display: none; }
  .pulse-home-heading h1 { font-size: 27px; }
  .pulse-home-hero { padding: 20px; min-height: 160px; gap: 24px; margin-bottom: 20px; border-radius: 18px; }
  .pulse-home-hero img { display: none; width: 96px; height: 96px; margin-inline: 0; }
  .pulse-home-hero h2 { font-size: 24px; line-height: 1.16; margin: 10px 0; }
  .pulse-home-grid { gap: 16px; }
  .pulse-home-card { padding: 20px; gap: 12px; }
  .pulse-home-card strong { font-size: 12px; }
  .pulse-home-card:first-child { grid-column: 1 / -1; }
  .pulse-home-card small { font-size: 10px; }
}
@media screen and (prefers-reduced-motion: reduce) {
  body:is(.admin,.customers,.authentication) * { animation: none !important; transition: none !important; }
}
@media print {
  :root,html[data-nexora-theme="dark"] { --nx-bg: #fff; --nx-surface: #fff; --nx-surface-2: #fff; --nx-text: #000; --nx-text-muted: #333; --nx-border: #ccc; color-scheme: light; }
  .pulse-nav-backdrop,.pulse-nav-intro,.pulse-nav-search,.pulse-menu-empty { display: none !important; }
  .pulse-home-hero { background: #fff; border: 1px solid #ccc; color: #000; }
  .pulse-home-hero :is(h2,p,.pulse-eyebrow) { color: #000; }
}

/* Native component layer. Screen-only: authored documents and print keep their
   own canvases. No positioning, visibility, z-index or transform overrides. */
@media screen {
  body:is(.admin,.customers) {
    --pulse-editor-chrome: #f0f2f8;
    --pulse-editor-ink: #171c35;
    --pulse-good: #067647;
    --pulse-good-bg: #ecfdf3;
    --pulse-bad: #b42332;
    --pulse-bad-bg: #fff0f1;
    --pulse-warn: #955300;
    --pulse-warn-bg: #fff6dc;
  }
  html[data-nexora-theme="dark"] body:is(.admin,.customers) {
    --nx-control-border: #506283;
    --nx-focus: #22d3ee;
    --pulse-editor-chrome: #1b2540;
    --pulse-editor-ink: #f2f4ff;
    --pulse-good: #86efac;
    --pulse-good-bg: #143b31;
    --pulse-bad: #fda4af;
    --pulse-bad-bg: #48242d;
    --pulse-warn: #fde68a;
    --pulse-warn-bg: #493718;
  }

  /* A secondary heading is distinct from the page title. Exclude dashboard,
     calendar, dialogs and editor/drawer content with its own type hierarchy. */
  body.admin #wrapper .content h2:not(.pulse-page-title,.fc-toolbar-title):not(:where(.pulse-home *,.modal *,.fc *,.tox *,.mce-container *,.sc2-drawer *,.va2-drawer *,.tt2-drawer *)) { margin: 24px 0 12px; font-size: 20px; line-height: 1.4; }
  body.admin #wrapper .content h3:not(.pulse-page-title):not(:where(.pulse-home *,.modal *,.fc *,.tox *,.mce-container *,.sc2-drawer *,.va2-drawer *,.tt2-drawer *)) { margin: 20px 0 10px; font-size: 18px; line-height: 1.4; }
  body.admin #wrapper .content h4:not(.pulse-page-title):not(:where(.pulse-home *,.modal *,.fc *,.tox *,.mce-container *,.sc2-drawer *,.va2-drawer *,.tt2-drawer *)) { margin: 16px 0 10px; font-size: 16px; line-height: 1.4; }
  body.admin .content .pulse-form-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; margin-block: 20px; }
  body.admin .content .pulse-form-section { min-width: 0; padding: 20px; border: 1px solid var(--nx-border); border-radius: 14px; background: var(--nx-surface); }
  body.admin #wrapper .content .pulse-form-section > :is(h2,h3,h4):first-child { margin-top: 0; }
  body.admin .content .pulse-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 20px; align-items: start; }
  body.admin .content .pulse-form-grid > * { min-width: 0; }
  body.admin .content .pulse-form-grid > .form-group { margin-bottom: 0; }
  body.admin .content .pulse-form-section :is(.form-group > label,fieldset > label,fieldset > div > label) { display: block; margin-bottom: 6px; }
  body.admin .content .pulse-form-section fieldset > .form-control + div:not(:empty) { margin-top: 14px; }

  /* Inputs, validation and native checkbox/radio behavior. */
  body:is(.admin,.customers) .form-control::placeholder { color: var(--nx-text-subtle); opacity: 1; }
  body:is(.admin,.customers) :is(.help-block,.form-text,.text-muted,.form-control-static) { color: var(--nx-text-muted); }
  body:is(.admin,.customers) :is(.has-error .form-control,.form-control[aria-invalid="true"]) { border-color: var(--pulse-bad); }
  body:is(.admin,.customers) :is(.has-error .help-block,label.error) { color: var(--pulse-bad); font-size: 12px; }
  body:is(.admin,.customers) .has-success .form-control { border-color: var(--pulse-good); }
  body:is(.admin,.customers) :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: var(--pulse-indigo); }
  body:is(.admin,.customers) :is(.checkbox label::before,.radio label::before) { background-color: var(--nx-surface); border-color: var(--nx-control-border); }
  body:is(.admin,.customers) .checkbox input:focus-visible + label::before,
  body:is(.admin,.customers) .radio input:focus-visible + label::before { outline: 2px solid var(--nx-focus); outline-offset: 3px; }
  body:is(.admin,.customers) :is(.input-group-addon,.input-group-btn > .btn-default) { background: var(--nx-surface-2); color: var(--nx-text-muted); border-color: var(--nx-control-border); }
  body:is(.admin,.customers) .input-group-addon { font-size: 13px; }
  body:is(.admin,.customers) :is(.input-group .form-control,.input-group-addon) { border-radius: 0; }
  body:is(.admin,.customers) .input-group > :first-child { border-start-start-radius: 9px; border-end-start-radius: 9px; }
  body:is(.admin,.customers) .input-group > :last-child { border-start-end-radius: 9px; border-end-end-radius: 9px; }
  body:is(.admin,.customers) :is(fieldset,hr,.well,.list-group-item) { border-color: var(--nx-border); }
  body:is(.admin,.customers) :is(.well,.list-group-item) { background: var(--nx-surface); color: var(--nx-text); }
  body:is(.admin,.customers) .well { border-radius: 12px; box-shadow: none; }

  /* Bootstrap Select's menu may be detached into a body-level .bs-container. */
  body:is(.admin,.customers) .bootstrap-select .filter-option { color: inherit; }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .dropdown-menu { border-color: var(--nx-border); background: var(--nx-surface); color: var(--nx-text); }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .dropdown-menu.inner { border: 0; box-shadow: none; }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .dropdown-menu li a { color: var(--nx-text); padding-block: 8px; }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .dropdown-menu li:not(.disabled) a:is(:hover,:focus) { color: var(--nx-primary-700); background: var(--nx-primary-50); }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .dropdown-menu li.selected a { background: var(--nx-primary-50); color: var(--nx-primary-700); }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) :is(.disabled a,.dropdown-header,.no-results,.notify) { color: var(--nx-text-muted); background-color: var(--nx-surface-2); }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) :is(.bs-searchbox,.bs-actionsbox,.bs-donebutton) { padding: 8px; }
  body:is(.admin,.customers) :is(.bootstrap-select,.bs-container) .bs-searchbox .form-control { background: var(--nx-bg); }
  body:is(.admin,.customers) :is(.dropdown-menu .divider,.modal-header,.modal-footer,.popover-title) { border-color: var(--nx-border); }
  body:is(.admin,.customers) .dropdown-menu .divider { background: var(--nx-border); }
  body:is(.admin,.customers) .dropdown-menu > li.active > a { background: var(--nx-primary-50); color: var(--nx-primary-700); }
  body:is(.admin,.customers) :is(.leads-filter-control,.filters-modal) .btn-default.active { border-color: var(--pulse-indigo); color: var(--nx-primary-700); background: var(--nx-primary-50); }
  body:is(.admin,.customers) .filters-modal .modal-body { background: var(--nx-surface); }

  /* DataTables controls, responsive child rows, empty and processing states. */
  body:is(.admin,.customers) .dataTables_wrapper :is(.dataTables_length,.dataTables_filter,.dataTables_info) { color: var(--nx-text-muted); font-size: 12px; }
  body:is(.admin,.customers) .dataTables_wrapper :is(.dataTables_filter input,.dataTables_length select) { background: var(--nx-surface); color: var(--nx-text); border: 1px solid var(--nx-control-border); border-radius: 8px; min-height: 34px; padding: 6px 9px; }
  body:is(.admin,.customers) .dataTables_wrapper .dataTables_processing { color: var(--nx-primary-700); background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 10px; box-shadow: var(--nx-shadow-md); }
  body:is(.admin,.customers) :is(.dataTables_empty,.dataTables_wrapper td.child) { color: var(--nx-text-muted); background: var(--nx-surface-2); }
  body:is(.admin,.customers) .table tbody td.dataTables_empty { padding-block: 36px; text-align: center; }
  body:is(.admin,.customers) .dataTables_wrapper .dtr-title { color: var(--nx-text); font-weight: 650; }
  body:is(.admin,.customers) .dataTables_wrapper .dt-button { border-color: var(--nx-border-strong); border-radius: 8px; color: var(--nx-text); background: var(--nx-surface); box-shadow: none; }
  body:is(.admin,.customers) .pagination > li > :is(a,span) { background: var(--nx-surface); border-color: var(--nx-border); color: var(--nx-text-muted); font-size: 12px; }
  body:is(.admin,.customers) .pagination > li.active > :is(a,span) { background: #4f46d6; border-color: #4f46d6; color: #fff; }
  body:is(.admin,.customers) .pagination > li.disabled > :is(a,span) { color: var(--nx-text-subtle); background: var(--nx-surface-2); }
  body:is(.admin,.customers) .table :is(tfoot th,tfoot td) { background: var(--nx-surface-2); border-color: var(--nx-border); color: var(--nx-text); }

  /* jQuery DateTimePicker: explicit html scope supersedes the old white island. */
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker.xdsoft_noselect { background: var(--nx-surface); color: var(--nx-text); border: 1px solid var(--nx-border-strong); border-radius: 12px; box-shadow: var(--nx-shadow-lg); padding: 10px; color-scheme: normal; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker :is(.xdsoft_datepicker,.xdsoft_timepicker,.xdsoft_monthpicker,.xdsoft_label,.xdsoft_time_box,.xdsoft_time) { background-color: var(--nx-surface); color: var(--nx-text); }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar :is(td,th) { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar th { color: var(--nx-text-muted); font-weight: 600; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker :is(.xdsoft_select,.xdsoft_select .xdsoft_option) { background: var(--nx-surface); color: var(--nx-text); }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker :is(.xdsoft_select,.xdsoft_time_box) { border-color: var(--nx-border); }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today { color: var(--nx-primary-700); font-weight: 700; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_time_variant .xdsoft_time.xdsoft_current { background: #4f46d6; color: #fff; box-shadow: none; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td:not(.xdsoft_disabled):hover,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_select .xdsoft_option:hover,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_time_variant .xdsoft_time:not(.xdsoft_disabled):hover { background: var(--nx-primary-50); color: var(--nx-primary-700); box-shadow: none; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled { color: var(--nx-text-subtle); opacity: .5; }
  html[data-nexora-theme="dark"] body:is(.admin,.customers) .xdsoft_datetimepicker :is(.xdsoft_prev,.xdsoft_next,.xdsoft_today_button) { filter: brightness(0) invert(1); }

  /* FullCalendar v5 native grids, agenda/time-grid/list views and controls. */
  html[data-nexora-theme] body:is(.admin,.customers) .fc {
    --fc-border-color: var(--nx-border);
    --fc-page-bg-color: var(--nx-surface);
    --fc-neutral-bg-color: var(--nx-surface-2);
    --fc-neutral-text-color: var(--nx-text-muted);
    --fc-today-bg-color: rgb(99 102 241 / 9%);
    --fc-non-business-color: rgb(99 102 241 / 5%);
    --fc-list-event-hover-bg-color: var(--nx-surface-2);
    --fc-button-bg-color: var(--nx-surface);
    --fc-button-border-color: var(--nx-border-strong);
    --fc-button-text-color: var(--nx-text);
    --fc-button-hover-bg-color: var(--nx-primary-50);
    --fc-button-hover-border-color: var(--pulse-indigo);
    --fc-button-active-bg-color: #4f46d6;
    --fc-button-active-border-color: #4f46d6;
    --fc-event-bg-color: #4f46d6;
    --fc-event-border-color: #4f46d6;
    --fc-event-text-color: #fff;
    color: var(--nx-text);
  }
  html[data-nexora-theme] body:is(.admin,.customers) .fc :is(.fc-scrollgrid,.fc-list,.fc-popover) { border-color: var(--nx-border); background: var(--nx-surface); }
  html[data-nexora-theme] body:is(.admin,.customers) .fc :is(.fc-col-header-cell,.fc-list-day-cushion,.fc-popover-header) { background: var(--nx-surface-2); color: var(--nx-text-muted); }
  html[data-nexora-theme] body:is(.admin,.customers) .fc :is(.fc-daygrid-day-number,.fc-col-header-cell-cushion,.fc-timegrid-axis-cushion,.fc-timegrid-slot-label-cushion) { color: var(--nx-text-muted); font-size: 12px; }
  html[data-nexora-theme] body:is(.admin,.customers) .fc .fc-toolbar-title { color: var(--nx-text); font-size: 21px; letter-spacing: -.025em; }
  html[data-nexora-theme] body:is(.admin,.customers) .fc .fc-button { border-radius: 8px; font-size: 12px; padding: 7px 11px; box-shadow: none; }
  html[data-nexora-theme] body:is(.admin,.customers) .fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
  html[data-nexora-theme] body:is(.admin,.customers) .fc .fc-button:focus-visible { outline: 2px solid var(--nx-focus); outline-offset: 3px; box-shadow: none; }
  html[data-nexora-theme] body:is(.admin,.customers) .fc .fc-list-empty { background: var(--nx-surface-2); color: var(--nx-text-muted); }

  /* TinyMCE chrome follows the theme; the authored iframe/content stays native.
     No iframe, .mce-content-body, CodeMirror token or document recoloring. */
  body:is(.admin,.customers) :is(.tox-tinymce,.mce-tinymce) { border: 1px solid var(--nx-control-border); border-radius: 10px; }
  body:is(.admin,.customers) .tox :is(.tox-editor-header,.tox-menubar,.tox-toolbar,.tox-toolbar__primary,.tox-toolbar-overlord,.tox-statusbar) { background: var(--pulse-editor-chrome); color: var(--pulse-editor-ink); border-color: var(--nx-border); box-shadow: none; }
  body:is(.admin,.customers) .tox :is(.tox-mbtn,.tox-tbtn,.tox-statusbar a,.tox-statusbar__wordcount,.tox-statusbar__path-item) { color: var(--pulse-editor-ink); }
  body:is(.admin,.customers) .tox :is(.tox-mbtn:hover,.tox-tbtn:hover,.tox-tbtn--enabled) { background: var(--nx-primary-50); color: var(--nx-primary-700); }
  body:is(.admin,.customers) .tox .tox-tbtn svg { fill: currentColor; }
  body:is(.admin,.customers) .tox .tox-toolbar__group { border-color: var(--nx-border); }

  /* Dialogs, previews, uploads and kanban surfaces retain native geometry. */
  body:is(.admin,.customers) .modal-title { color: var(--nx-text); font-size: 17px; font-weight: 700; }
  body:is(.admin,.customers) .modal-body { color: var(--nx-text); }
  body:is(.admin,.customers) .modal-footer { background: var(--nx-surface-2); }
  body:is(.admin,.customers) .close { color: var(--nx-text-muted); text-shadow: none; opacity: .85; }
  body:is(.admin,.customers) .popover-title { color: var(--nx-text); background: var(--nx-surface-2); }
  body:is(.admin,.customers) .popover-content { color: var(--nx-text); font-size: 12px; line-height: 1.6; }
  body:is(.admin,.customers) .preview-tabs-top { background: var(--nx-surface); border-color: var(--nx-border); }
  body:is(.admin,.customers) .dropzone { background: var(--nx-surface); border: 1px dashed var(--nx-control-border); border-radius: 12px; color: var(--nx-text-muted); }
  body:is(.admin,.customers) .dropzone .dz-preview { background: var(--nx-surface-2); border-radius: 10px; }
  body:is(.admin,.customers) :is(.kan-ban-content,.kanban-load-more) { background: var(--nx-surface-2); color: var(--nx-text); border-color: var(--nx-border); border-radius: 12px; }
  body:is(.admin,.customers) #kan-ban .panel-body { background-color: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); border-radius: 10px; }
  body:is(.admin,.customers) .kan-ban-content .kanban-empty { color: var(--nx-text-muted); border: 1px dashed var(--nx-border-strong); border-radius: 10px; padding: 24px 12px; }
  body:is(.admin,.customers) .kan-ban-content .kanban-empty h4 { color: var(--nx-text-muted); }

  /* Actual ElevenLabs tab namespaces. Inline view styles define layouts and
     status meaning; these more-specific rules replace only neutral paint. */
  body.admin :is(.sc2-title,.sc2-section-title,.sc2-toggle-label,.sc2-guardrail-name,.sc2-card-label,.sc2-postcall-label,.sc2-postcall-card-name strong,.sc2-limit-label,.sc2-drawer-title,.sc2-drawer-field label,.sc2-h-name,
    .va2-page-title,.va2-card-title,.va2-section-title,.va2-row-title,.va2-drawer-title,.va2-block-body,.va2-dc-card-value,.va2-meta-row dd,
    .tt2-page-title,.tt2-row-name,.tt2-drawer-title,.tt2-side-usage-num,.tt2-wh-modal-title,.tt2-wh-card-title,.tt2-wh-field > label,.tt2-wh-inline-text label,.tt2-wh-mock-title,.tt2-block-title,.tt2-form-block .form-control-static,.tt2-sys-title,.tt2-sys-name,.tt2-sys-checkbox,
    .kb2-title,.kb2-summary-value,.kb2-storage-percent,.kb2-row-name-text strong,.kb2-add-existing-name) { color: var(--nx-text); }
  body.admin :is(.sc2-section-desc,.sc2-guardrail-icon,.sc2-postcall-option-url,.sc2-postcall-option-auth,.sc2-postcall-card-url,.sc2-postcall-card-auth,.sc2-limit-help,.sc2-limit-suffix,.sc2-icon-btn,.sc2-drawer-header-row .sc2-h-name,
    .va2-card-desc,.va2-card-help,.va2-search .fa,.va2-col-date,.va2-col-duration,.va2-col-messages,.va2-col-status,.va2-row-title.is-untitled,.va2-drawer-subtitle,.va2-side-header h6,.va2-block-title,.va2-dc-card-key,.va2-dc-card-rationale,.va2-meta-row dt,
    .tt2-search .fa,.tt2-row-id,.tt2-drawer-subtitle,.tt2-side-block-title,.tt2-side-id-value,.tt2-stats-chart-label,.tt2-stats-empty,.tt2-wh-card-sub,.tt2-wh-card-help,.tt2-wh-field-sub,.tt2-wh-field-help,.tt2-wh-slider-out,.tt2-wh-header-row label,.tt2-wh-assignment-row label,.tt2-wh-mock-grip,.tt2-wh-mock-returns-label,.tt2-pe-req,.tt2-pe-nested-label,.tt2-header-value,.tt2-form-block label,.tt2-sys-form label,.tt2-sys-empty,
    .kb2-subtitle,.kb2-summary-label,.kb2-summary-subtext,.kb2-storage-meta,.kb2-search-icon,.kb2-row-substatus,.kb2-add-existing-meta,.kb2-staged-size) { color: var(--nx-text-muted); }
  body.admin :is(.sc2-learn-card,.sc2-guardrail-row,.sc2-webhook-card,.sc2-postcall-card,.sc2-drawer-panel,.sc2-drawer-header-row,
    .va2-card,.va2-chip,.va2-list-wrap,.va2-drawer-panel,
    .tt2-chip,.tt2-list-wrap,.tt2-drawer-panel,.tt2-side-deps a,.tt2-stats-chart-block,.tt2-wh-card-body,.tt2-wh-header-row,.tt2-wh-assignment-row,.tt2-wh-mock-row,.tt2-pe-row,.tt2-sys,
    .kb2-chip,.kb2-list-wrap,.kb2-add-existing-list,.kb2-staged-list li) { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
  body.admin :is(.sc2-alpha-pill,.sc2-learn-thumb,.sc2-postcall-default-badge,.sc2-drawer-method,.sc2-segment,
    .sc2-guardrail-status.is-off,.va2-pill,.va2-page-badge,.va2-card-counter,.va2-card-row,.va2-config,.va2-drawer-header,.va2-drawer-side,.va2-conv-id,.va2-dc-card,.va2-dc-type,
    .tt2-page-badge,.tt2-type-other,.tt2-legacy,.tt2-drawer-header,.tt2-drawer-side,.tt2-drawer-id,.tt2-wh-modal-icon,.tt2-wh-card-outer,.tt2-header-edit-row,.tt2-header-row,.tt2-assignment-row,.tt2-mock-row,.tt2-test-result,.tt2-pe-nested,.tt2-sys-count,.tt2-sys-multi-row,
    .kb2-summary-card,.kb2-rag-pill:not([data-on="1"]),.kb2-prompt-badge,.kb2-format-pill) { background: var(--nx-surface-2); color: var(--nx-text-muted); border-color: var(--nx-border); }
  body.admin :is(.sc2-divider,.sc2-drawer-header,.sc2-drawer-footer,.sc2-drawer-url-row,.sc2-drawer-add-header,.va2-drawer-header,.va2-drawer-side,.tt2-drawer-header,.tt2-drawer-side,.tt2-pe-add,.tt2-sys-add-row,.kb2-dropzone,.kb2-segment) { border-color: var(--nx-border-strong); }
  body.admin :is(.sc2-learn-card,.sc2-guardrail-row,.sc2-webhook-card,.sc2-drawer-header-row,.va2-card-row,.tt2-side-deps a,.tt2-pe-add,.tt2-sys-add-row,.kb2-dropzone):hover { background: var(--nx-surface-2); border-color: var(--nx-border-strong); }
  body.admin :is(.va2-table,.tt2-table,.kb2-table) thead th { color: var(--nx-text-muted); background: var(--nx-surface-2); border-color: var(--nx-border); }
  body.admin :is(.va2-table,.tt2-table,.kb2-table) tbody :is(td,th) { border-color: var(--nx-border); }
  body.admin :is(.va2-table,.tt2-table,.kb2-table) tbody tr:hover { background: var(--nx-surface-2); }
  body.admin :is(.va2-card-add,.sc2-link,.sc2-webhook-card-url,.tt2-wh-link,.tt2-header-name,.tt2-wh-mock-add-condition) { color: var(--nx-primary-700); }
  body.admin :is(.va2-subnav,.tt2-subnav,.kb2-add-tabs) > li > a { color: var(--nx-text-muted); }
  body.admin :is(.va2-subnav,.tt2-subnav,.kb2-add-tabs) > li.active > a,
  body.admin :is(.va2-subnav,.tt2-subnav,.kb2-add-tabs) > li.active > a:is(:hover,:focus) { color: var(--nx-primary-700); background: transparent; border-color: var(--pulse-indigo); }
  body.admin :is(.tt2-chip,.kb2-chip)[data-active]:not([data-active=""]),
  body.admin .kb2-add-existing-row.selected { background: var(--nx-primary-50); color: var(--nx-primary-700); border-color: var(--pulse-indigo); }
  body.admin .kb2-storage-bar { background: var(--nx-border); }
  body.admin .kb2-storage-fill { background: linear-gradient(90deg,var(--pulse-cyan),var(--pulse-indigo),var(--pulse-violet)); }
  body.admin :is(.sc2-toggle-slider,.tt2-switch-slider) { background: var(--nx-border-strong); }
  body.admin .sc2-toggle input:checked + .sc2-toggle-slider,
  body.admin .tt2-switch input:checked + .tt2-switch-slider { background: #4f46d6; }
  body.admin .sc2-toggle input:focus-visible + .sc2-toggle-slider,
  body.admin .tt2-switch input:focus-visible + .tt2-switch-slider { outline: 2px solid var(--nx-focus); outline-offset: 3px; }
  body.admin :is(.va2-pill.s-success,.sc2-guardrail-status.is-active,.kb2-rag-pill[data-on="1"],.kb2-row-icon.t-text,.kb2-text-icon,.tt2-type-client) { color: var(--pulse-good); background: var(--pulse-good-bg); }
  body.admin .va2-pill.s-failure { color: var(--pulse-bad); background: var(--pulse-bad-bg); }
  body.admin :is(.tt2-type-system,.tt2-header-secret,.tt2-sys-badge,.kb2-row-icon.t-file,.kb2-hint) { color: var(--pulse-warn); background: var(--pulse-warn-bg); }
  body.admin :is(.tt2-type-webhook,.tt2-dyn-var-pill,.kb2-row-icon.t-url) { color: var(--nx-primary-700); background: var(--nx-primary-50); }
  body.admin .tt2-test-result pre { color: var(--nx-text); background: var(--nx-surface); border-color: var(--nx-border); }
  body.admin :is(.tt2-test-result-status.s-err,.tt2-sys-json-error) { color: var(--pulse-bad); }
  body.admin .tt2-test-result-status.s-ok { color: var(--pulse-good); }
  body.admin .content .pulse-field-action { display: flex; align-items: center; gap: 8px; }
  body.admin .content .pulse-field-action > .form-control { flex: 1 1 auto; min-width: 0; }
  body.admin .content .pulse-field-action > .btn { flex-shrink: 0; margin: 0; }
  body.admin .content .pulse-environment-row label { display: block; margin-bottom: 6px; }
  body.admin .content .pulse-environment-row > .form-group:last-child { margin-bottom: 0; }
}
@media screen and (max-width: 999px) {
  body.admin .content .pulse-form-sections { grid-template-columns: minmax(0,1fr); }
}
@media screen and (max-width: 700px) {
  body.admin .content .pulse-form-grid { grid-template-columns: minmax(0,1fr); }
  .pulse-page-header { align-items: flex-start; gap: 12px; }
  .pulse-page-actions { justify-content: flex-start; }
  body.admin .content .pulse-field-action { flex-wrap: wrap; }
}

/* Native confirmation top-layer dialog; behavior and safe text belong to shell JS. */
@media screen {
  body:is(.admin,.customers) dialog.pulse-confirm { width: min(460px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 0; border: 1px solid var(--nx-border-strong); border-radius: 18px; background: var(--nx-surface); color: var(--nx-text); box-shadow: var(--nx-shadow-lg); }
  body:is(.admin,.customers) dialog.pulse-confirm::backdrop { background: rgb(11 16 32 / 64%); }
  body:is(.admin,.customers) .pulse-confirm-head { display: flex; align-items: center; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid var(--nx-border); }
  body:is(.admin,.customers) .pulse-confirm-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; color: var(--pulse-bad); background: var(--pulse-bad-bg); font-size: 18px; }
  body:is(.admin,.customers) .pulse-confirm-title { margin: 0; color: var(--nx-text); font-size: 18px; font-weight: 700; line-height: 1.4; }
  body:is(.admin,.customers) .pulse-confirm-body { padding: 20px 24px; color: var(--nx-text-muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
  body:is(.admin,.customers) .pulse-confirm-body > :last-child { margin-bottom: 0; }
  body:is(.admin,.customers) .pulse-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 24px; background: var(--nx-surface-2); border-top: 1px solid var(--nx-border); }
  body:is(.admin,.customers) .pulse-confirm-cancel { color: var(--nx-text); background: var(--nx-surface); border-color: var(--nx-border-strong); }
  body:is(.admin,.customers) .pulse-confirm-accept { color: #fff; background: #b42332; border-color: #b42332; }
  body:is(.admin,.customers) .pulse-confirm-accept:is(:hover,:focus) { color: #fff; background: #961b29; border-color: #961b29; }
  body:is(.admin,.customers) .pulse-confirm :is(.pulse-confirm-cancel,.pulse-confirm-accept):focus-visible { outline: 2px solid var(--nx-focus); outline-offset: 3px; }

  /* Authenticated dashboard work cards show actual assigned work/events only. */
  .pulse-work { margin-top: 20px; margin-bottom: 20px; }
  .pulse-work-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
  .pulse-work-heading :is(h2,h3) { margin: 0; color: var(--nx-text); font-size: 20px; font-weight: 700; }
  .pulse-work-heading p { margin: 0; color: var(--nx-text-muted); font-size: 12px; }
  .pulse-work-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; }
  .pulse-work-card { min-width: 0; padding: 20px; background: var(--nx-surface); color: var(--nx-text); border: 1px solid var(--nx-border); border-radius: 16px; box-shadow: var(--nx-shadow); }
  .pulse-work-card > :is(h2,h3,h4) { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--nx-text); }
  .pulse-work-list { list-style: none; margin: 0; padding: 0; }
  .pulse-work-list > li { padding: 13px 0; overflow-wrap: anywhere; }
  .pulse-work-list > li:first-child { padding-top: 0; }
  .pulse-work-list > li:last-child { padding-bottom: 0; }
  .pulse-work-list > li + li { border-top: 1px solid var(--nx-border); }
  .pulse-work-list a { font-size: 13px; font-weight: 650; }
  .pulse-work-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 6px; color: var(--nx-text-muted); font-size: 11px; line-height: 1.6; }
  .pulse-work-empty { padding: 24px 16px; border: 1px dashed var(--nx-border-strong); border-radius: 12px; background: var(--nx-surface-2); color: var(--nx-text-muted); text-align: center; font-size: 12px; line-height: 1.7; }
}

@media screen {
  body.admin .sc2-segment-btn { color: var(--nx-text-muted); }
  body.admin .sc2-segment-btn.active { background: var(--nx-surface); color: var(--nx-text); box-shadow: var(--nx-shadow-sm); }
  body.admin .sc2-postcall-menu > li.is-selected > a { background: var(--nx-primary-50); }
  body.admin .sc2-postcall-option strong { color: var(--nx-text); }
  body.admin .tt2-header-edit-row.is-masked .tt2-h-value { background: var(--pulse-warn-bg); }
  body.admin .tt2-type-mcp { color: #7e22ce; background: #faf0ff; }
  html[data-nexora-theme="dark"] body.admin .tt2-type-mcp { color: #e9c4ff; background: #382449; }
  body.admin :is(.sc2-postcall-clear,.tt2-row-delete,.tt2-wh-row-delete,.tt2-pe-del,.tt2-h-remove,.tt2-sys-row-remove,.tt2-chip-clear,.kb2-chip-clear,.kb2-staged-remove):is(:hover,:focus-visible) { color: var(--pulse-bad); }
  /* These two view classes ship color/border !important in their own \3c style>.
     The narrowly scoped exceptions keep their text readable in dark mode. */
  body.admin .sc2-postcall-create { color: var(--nx-primary-700) !important; }
  body.admin .tt2-wh-card-add-block { color: var(--nx-text-muted) !important; border-color: var(--nx-border-strong) !important; }
}

@media screen {
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_label .xdsoft_select .xdsoft_option.xdsoft_current,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default { background: #4f46d6; color: #fff; box-shadow: none; }
  /* DateTimePicker's distributed skin uses !important for these hover states.
     Limit the exception to picker cells; no other control geometry is touched. */
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td:not(.xdsoft_disabled):hover,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_time_variant .xdsoft_time:not(.xdsoft_disabled):hover { background: var(--nx-primary-50) !important; color: var(--nx-primary-700) !important; }
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
  html[data-nexora-theme] body:is(.admin,.customers) .xdsoft_datetimepicker .xdsoft_time_variant .xdsoft_time.xdsoft_current.xdsoft_disabled:hover { background: #4f46d6 !important; color: #fff !important; box-shadow: none !important; }
}

/* Follow-up from the finite native dark-page audit: explicit module controls,
   not generic input/button paint that could affect hidden or embedded editors. */
@media screen {
  body.admin .nexora-settings-nav a { background: var(--nx-surface); color: var(--nx-text-muted); border-color: var(--nx-border-strong); border-radius: 9px; font-size: 12px; font-weight: 600; }
  body.admin .nexora-settings-nav a:hover { background: var(--nx-primary-50); color: var(--nx-primary-700); border-color: var(--pulse-indigo); }
  html[data-nexora-theme] body.admin .content .nexora-settings-nav a[aria-current="page"] { background: #4f46d6; color: #fff; border-color: #4f46d6; }
  body.admin #provider-workspace .nav-tabs > li > a { background: transparent; border-color: transparent; }
  body.admin #provider-workspace .nav-tabs > li.active > a { background: var(--nx-surface-2); border-bottom-color: var(--pulse-indigo); }

  body.admin .nexora-batches :is(.batch-search,.dark-field) { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-control-border); box-shadow: none; font-family: var(--pulse-font); }
  body.admin .nexora-batches .batch-search::placeholder { color: var(--nx-text-subtle); opacity: 1; }
  body.admin .nexora-batches :is(.batch-search,.dark-field):focus { outline: 2px solid var(--nx-focus); outline-offset: 2px; border-color: var(--nx-focus); }
  body.admin .nexora-batches :is(.batch-btn,.template-btn,.ghost-btn) { background: var(--nx-surface-2); color: var(--nx-text); border-color: var(--nx-border-strong); box-shadow: none; font-family: var(--pulse-font); }
  body.admin .nexora-batches :is(.batch-btn,.template-btn,.ghost-btn):hover { background: var(--nx-primary-50); color: var(--nx-primary-700); border-color: var(--pulse-indigo); }
  body.admin .nexora-batches :is(.upload-box,.timing-option,.recipient-source) { background: var(--nx-surface-2); color: var(--nx-text); border-color: var(--nx-border-strong); }
  body.admin .nexora-batches .upload-preview { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
  body.admin .nexora-batches .upload-btn { background: var(--nx-primary-50); color: var(--nx-primary-700); border-color: var(--pulse-indigo); }
  body.admin .nexora-batches .primary-btn { background: #4f46d6; color: #fff; box-shadow: none; }
  body.admin .nexora-batches :is(.batch-heading,.batch-card h5,.field-label) { color: var(--nx-text); }
  body.admin .nexora-batches :is(.batch-subtle,.batch-meta,.upload-hint,.preview-empty,.preview-missing,.subdued,.segment-count) { color: var(--nx-text-muted); }
  body.admin .nexora-batches :is(.preview-pill,.pill-muted,.pill-dark) { background: var(--nx-surface-2); color: var(--nx-text); }
  body.admin .nexora-batches .preview-table thead th { background: var(--nx-surface-2); color: var(--nx-text-muted); border-color: var(--nx-border); }
  body.admin .nexora-batches .preview-table tbody td { color: var(--nx-text); border-color: var(--nx-border); }
  body.admin .nexora-batches .preview-table tbody tr:nth-child(even) { background: var(--nx-surface-2); }
  body.admin .nexora-batches :is(.pill-success,.status-ok) { background: var(--pulse-good-bg); color: var(--pulse-good); border-color: var(--pulse-good); }
  body.admin .nexora-batches .status-warn { background: var(--nx-accent-50); color: var(--nx-accent-700); border-color: var(--nx-accent-700); }
  body.admin .nexora-batches .status-bad { background: var(--pulse-bad-bg); color: var(--pulse-bad); border-color: var(--pulse-bad); }

  body.admin .telephony-billing .telephony-card { background: var(--nx-surface-2); color: var(--nx-text); border-color: var(--nx-border); border-radius: 16px; box-shadow: none; }
  body.admin .telephony-billing :is(.telephony-card__label,.telephony-card__meta) { color: var(--nx-text-muted); }
  body.admin .telephony-billing .telephony-card__value { color: var(--nx-text); letter-spacing: -.035em; }
  body.admin .telephony-billing .telephony-card__link { color: var(--nx-primary-700); }

  /* The existing device preview has a dark OLED surface in both appearances.
     Scope local tokens to its shell; native options/search stay readable there. */
  body.admin .twilio-phone-shell {
    --nx-bg: #0b1020;
    --nx-surface: #141c33;
    --nx-surface-2: #1b2540;
    --nx-text: #f2f4ff;
    --nx-text-muted: #b7c1d9;
    --nx-text-subtle: #9facc8;
    --nx-border: #303d59;
    --nx-border-strong: #506283;
    --nx-control-border: #506283;
    --nx-focus: #22d3ee;
    --nx-primary-50: #222653;
    --nx-primary-700: #c4c9ff;
    color-scheme: dark;
  }
  body.admin .twilio-phone-body :is(.form-control,.bootstrap-select > .dropdown-toggle,.btn-default) { background: var(--nx-surface-2); color: var(--nx-text); border-color: var(--nx-control-border); }
  body.admin .twilio-phone-body .form-control::placeholder,
  body.admin .twilio-phone-body :is(.help-block,.form-group label) { color: var(--nx-text-muted); }
  body.admin .twilio-phone-body .bootstrap-select .dropdown-menu { background: var(--nx-surface); color: var(--nx-text); border-color: var(--nx-border); }
  body.admin .twilio-phone-body .bootstrap-select .dropdown-menu li a { color: var(--nx-text); }
  body.admin .twilio-phone-body .bootstrap-select .dropdown-menu li:not(.disabled) a:is(:hover,:focus),
  body.admin .twilio-phone-body .bootstrap-select .dropdown-menu li.selected a { background: var(--nx-primary-50); color: var(--nx-primary-700); }

  .pulse-page-title { display: flex; align-items: center; gap: 12px; color: var(--nx-text); font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -.035em; }
  .pulse-page-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--nx-primary-50); color: var(--nx-primary-700); font-size: 16px; letter-spacing: normal; }
  .pulse-page-context { margin-block: 0 8px; color: var(--nx-text-muted); font-size: 10px; line-height: 1.5; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
}
@media screen and (max-width: 700px) {
  .pulse-page-title { font-size: 24px; }
}

/* Rendered form/calendar follow-up: native tab rails and action contrast. */
@media screen {
  body:is(.admin,.customers) .horizontal-scrollable-tabs .horizontal-tabs .nav-tabs-horizontal,
  body:is(.admin,.customers) .horizontal-tabs .nav-tabs,
  body:is(.admin,.customers) .nav-tabs.nav-tabs-horizontal { background-color: var(--nx-surface-2); border-color: var(--nx-border); }
  body:is(.admin,.customers) .horizontal-scrollable-tabs .horizontal-tabs .nav-tabs-horizontal > li > a { background-color: transparent; }
  body:is(.admin,.customers) .horizontal-scrollable-tabs .horizontal-tabs .nav-tabs-horizontal > li.active > a { background-color: var(--nx-surface); }
  /* The compiled Tailwind calendar skin marks header ink !important. */
  html[data-nexora-theme] body:is(.admin,.customers) .fc :is(.fc-col-header-cell-cushion,.fc-day-header) { color: var(--nx-text) !important; }
}

@media screen {
  /* Staff member form explicitly puts !tw-bg-white on this tablist and its
     anchors. Override that utility only on native full-width form tab rails. */
  body.admin .panel-full-width-tabs > ul.nav.nav-tabs.nav-tabs-horizontal[role="tablist"] { background-color: var(--nx-surface-2) !important; }
  body.admin .panel-full-width-tabs > ul.nav.nav-tabs.nav-tabs-horizontal[role="tablist"] > li > a { background-color: transparent !important; }
  body.admin .panel-full-width-tabs > ul.nav.nav-tabs.nav-tabs-horizontal[role="tablist"] > li.active > a { background-color: var(--nx-surface) !important; }
}

/* render_datatable() emits the native loading class before initComplete wraps
   the table responsively. Contain that brief mobile phase, then release it so
   ready-table dropdowns and dialogs retain their original overflow behavior. */
@media screen and (max-width: 767px) {
  body.admin .panel-table-full:has(table.dt-table-loading) { overflow-x: auto; }
}
