/* CMZPAY V4.5.23 — calm shared light/dark presentation.
 * Loaded after the shared presentation styles. Scoped specificity intentionally
 * wins over older inline page styles. No sizing, visibility, or layout rules.
 * Logos, payment slips, QR images, and terminal output keep their own colors.
 */
/* Neutral slate surfaces keep the same hierarchy in either theme. Semantic
 * colors are accents on quiet surfaces, never a substitute for status text. */
:root {
  color-scheme: light;
  --cmz-ui-bg: #f3f5f8;
  --cmz-ui-surface: #ffffff;
  --cmz-ui-soft: #f7f9fc;
  --cmz-ui-head: #edf2f7;
  --cmz-ui-hover: #edf3fb;
  --cmz-ui-border: #dbe3ed;
  --cmz-ui-text: #243247;
  --cmz-ui-muted: #596b82;
  --cmz-ui-placeholder: #65758a;
  --cmz-ui-input: #ffffff;
  --cmz-ui-blue: #285fb2;
  --cmz-ui-link: #275ea8;
  --cmz-ui-blue-soft: #edf3fc;
  --cmz-ui-positive: #17734f;
  --cmz-ui-positive-bg: #eef8f3;
  --cmz-ui-positive-border: #c4e3d2;
  --cmz-ui-negative: #b83e50;
  --cmz-ui-negative-bg: #fdf1f2;
  --cmz-ui-negative-border: #edd0d6;
  --cmz-ui-warning: #815d19;
  --cmz-ui-warning-bg: #fbf6e9;
  --cmz-ui-warning-border: #e8d9b4;
  --cmz-ui-purple: #72529e;
  --cmz-ui-overlay: rgba(19, 29, 44, .52);
  --cmz-ui-shadow: 0 2px 8px rgba(26, 44, 69, .035);
  --cmz-ui-nav: #1b2e47;
  --cmz-ui-nav-hover: #283e59;
  --cmz-ui-nav-active: #304967;
  --cmz-ui-nav-text: #e4ebf4;
  --cmz-ui-nav-muted: #b2c2d7;
  --cmz-ui-nav-line: #394b63;
  --cmz-ui-nav-accent: #a4c4ef;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --cmz-ui-bg: #151c27;
  --cmz-ui-surface: #1c2634;
  --cmz-ui-soft: #222e3e;
  --cmz-ui-head: #283547;
  --cmz-ui-hover: #2a394d;
  --cmz-ui-border: #36465b;
  --cmz-ui-text: #e5ebf3;
  --cmz-ui-muted: #a8b6c8;
  --cmz-ui-placeholder: #9baabe;
  --cmz-ui-input: #182230;
  --cmz-ui-blue: #3566ad;
  --cmz-ui-link: #a8c8f2;
  --cmz-ui-blue-soft: #283b53;
  --cmz-ui-positive: #82d3ad;
  --cmz-ui-positive-bg: #203a34;
  --cmz-ui-positive-border: #395c50;
  --cmz-ui-negative: #efa3ad;
  --cmz-ui-negative-bg: #3b2b34;
  --cmz-ui-negative-border: #65414f;
  --cmz-ui-warning: #dfc38c;
  --cmz-ui-warning-bg: #393426;
  --cmz-ui-warning-border: #60563e;
  --cmz-ui-purple: #c3afe2;
  --cmz-ui-overlay: rgba(4, 9, 17, .72);
  --cmz-ui-shadow: 0 2px 8px rgba(0, 0, 0, .10);
  --cmz-ui-nav: #182433;
  --cmz-ui-nav-hover: #263649;
  --cmz-ui-nav-active: #2d425c;
  --cmz-ui-nav-text: #e0e8f2;
  --cmz-ui-nav-muted: #aabbd0;
  --cmz-ui-nav-line: #33465c;
  --cmz-ui-nav-accent: #a4c4ef;
}

/* Resolve old variable families through the same palette, including declarations
 * attached to body by earlier releases. Keep button fills separate from text. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] {
  --navy-1: var(--cmz-ui-bg);
  --navy-2: var(--cmz-ui-soft);
  --panel: var(--cmz-ui-surface);
  --surface: var(--cmz-ui-surface);
  --surface-2: var(--cmz-ui-soft);
  --card: var(--cmz-ui-surface);
  --card-bg: var(--cmz-ui-surface);
  --input-bg: var(--cmz-ui-input);
  --table-head: var(--cmz-ui-head);
  --line: var(--cmz-ui-border);
  --border: var(--cmz-ui-border);
  --text: var(--cmz-ui-text);
  --text-1: var(--cmz-ui-text);
  --text-2: var(--cmz-ui-muted);
  --muted: var(--cmz-ui-muted);
  --cyan: var(--cmz-ui-link);
  --success: var(--cmz-ui-positive);
  --danger: var(--cmz-ui-negative);
  --warning: var(--cmz-ui-warning);
  --cmz-bg: var(--cmz-ui-bg);
  --cmz-panel: var(--cmz-ui-surface);
  --cmz-panel-2: var(--cmz-ui-soft);
  --cmz-ink: var(--cmz-ui-text);
  --cmz-text: var(--cmz-ui-text);
  --cmz-muted: var(--cmz-ui-muted);
  --cmz-line: var(--cmz-ui-border);
  --cmz-blue-soft: var(--cmz-ui-blue-soft);
  --cmz-blue-soft-2: var(--cmz-ui-soft);
  --cmz-dark-bg: var(--cmz-ui-bg);
  --cmz-dark-panel: var(--cmz-ui-surface);
  --cmz-dark-panel-2: var(--cmz-ui-soft);
  --cmz-dark-line: var(--cmz-ui-border);
  --cmz-dark-text: var(--cmz-ui-text);
  --cmz-dark-muted: var(--cmz-ui-muted);
  background: var(--cmz-ui-bg) !important;
  color: var(--cmz-ui-text) !important;
  accent-color: var(--cmz-ui-blue);
  scrollbar-color: var(--cmz-ui-border) var(--cmz-ui-bg);
}

/* The application shell and neutral surfaces. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(.admin-main, .admin-content, .admin-content-wrap) {
  background: var(--cmz-ui-bg) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .admin-desktop-topbar, .admin-topbar, .mobile-topbar,
  .card, .panel, .box, .widget, .form-card, .settings-card, .summary-card,
  .stat-card, .dashboard-card, .dashboard-range-toolbar, .icon-stat-card,
  .prodxs-balance-card, .prodxs-balance-wrap, .summary-range, .filter-tabs,
  .member-table-card, .member-create-panel, .member-mobile-card,
  .txn-card, .log-mobile-card, .statement-mobile-card, .mobile-empty-card,
  .finance-form-card, .finance-list-card, .ref-card, .ref-stat, .agents-card,
  .wallet-stat, .wallet-filter, .wallet-history-balance, .wallet-history-back,
  .cr-provider-card, .cr-mobile-card, .ledger-mobile-card,
  .provider-statement-card, .statement-filter-card, .statement-ledger-filter,
  .slip-log-filter, .slip-log-mobile-card, .blacklist-card, .blacklist-mobile-card,
  .blacklist-card__body, .bank-list-card, .api-health-card,
  .funnel-card, .conversion-card, .activity-row, .activity-empty,
  .downline-summary-card, .downline-member-card, .audit-item, .audit-main,
  .px-chip, .px-stat, .px121-ep, .px121-stat, .lab-check, .parsed-table,
  .provider-manual-card, .network-owner-card, .commission-overview-card
) {
  background: var(--cmz-ui-surface) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .prodxs-balance-head, .member-mobile-head, .card-title-row,
  .finance-card-heading, .channel-card-head, .ref-card-head, .agents-card-head,
  .blacklist-card__head, .blacklist-modal__head, .audit-time,
  .wallet-member-cell, .txn-auto-refresh, .wallet-history-pager,
  .txn-balance-pagination, .member-credit-section, .member-network-section,
  .member-password-section, .member-commission-section, .finance-api-panel,
  .finance-channel-item, .ref-level-box, .lab-kpi, .lab-preview-wrap,
  .lab-upload-preview-box, .slip-log-auto, .slip-log-risk-note,
  .apislip-consensus-summary, .parsed-sep, .final-row, .audit-detail-box,
  .audit-raw, .integration-switch, .member-mobile-group-form,
  .downline-table-head, .downline-pagination, .downline-member-extra
) {
  background: var(--cmz-ui-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .slip-log-mobile-grid, .audit-credit-grid, .member-commission-grid,
  .network-owner-grid, .commission-overview-grid
) > div {
  background: var(--cmz-ui-soft) !important;
  border-color: var(--cmz-ui-border) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .card-title-row, .ref-card-head, .agents-card-head, .blacklist-card__head,
  .member-mobile-head, .member-mobile-grid > div, .txn-card-row,
  .ledger-mobile-top, .ledger-mobile-row, .cr-mobile-row, .cr-mobile-account,
  .slip-log-mobile-head, .parsed-row, .diag-kv, .integration-switch,
  .member-mobile-group-form, .finance-card-heading
) { border-color: var(--cmz-ui-border) !important; }

/* Readable text. These are named text roles; there is deliberately no blanket
 * a/strong rule that could erase an amount's positive/negative meaning.
 * Dashboard KPI colors belong to their semantic rules below. :where() keeps
 * this exclusion from increasing specificity for unrelated text roles. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(h1, h2, h3, h4),
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .api-health-title, .icon-stat-value:not(:where([data-cmz-page='dashboard'] .dashboard-card-grid .icon-stat-value)), .wallet-username, .wallet-stat .stat-value,
  .ref-stat strong:not(.pos):not(.neg), .txn-depositor-name, .txn-depositor-fullname,
  .txn-personal-lines strong, .txn-member-other strong, .downline-summary-card strong,
  .downline-member-identity strong, .downline-member-name strong, .downline-member-stat strong,
  .audit-title-row > strong, .audit-time strong, .audit-member, .audit-credit-grid b,
  .blacklist-value, .slip-log-member strong, .member-mobile-grid strong, .member-mobile-bank em,
  .cr-mobile-row strong, .cr-mobile-account strong, .ledger-mobile-row strong,
  .prodxs-product span, .dashboard-range-title strong, .dashboard-range-current strong,
  .network-owner-grid strong, .commission-overview-grid strong, .downline-empty strong
) { color: var(--cmz-ui-text) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  label, .text-muted, .page-description, .page-subtitle, .dash-subtitle,
  .stat-label, .icon-stat-label, .icon-stat-desc, .wallet-id,
  .wallet-history-title p, .wallet-history-count, .wallet-history-size,
  .wallet-history-page-label, .wallet-history-balance span,
  .ref-hero p, .ref-stat span, .ref-card-head span, .ref-status, .ref-sub,
  .agents-hero p, .agents-card-head span, .agents-help, .agents-api-sub,
  .agents-calc-status, .agents-api-loading, .ref-loading,
  .structured-log-head p, .reader-compare-head p, .parsed-row > span, .parsed-row > em,
  .diag-kv > span, .diag-confidence.neutral, .cr-provider-head p,
  .ledger-mobile-top small, .ledger-mobile-row > span, .ledger-mobile-row small,
  .cr-mobile-row > span, .cr-mobile-account > span, .cr-mobile-account small,
  .slip-log-mobile-head small, .slip-log-member small, .slip-log-mobile-grid small,
  .slip-log-mobile-grid > div > span:first-child, .txn-personal-lines span,
  .txn-member-other span, .txn-card-row > span:first-child, .txn-card-id,
  .member-id-note, .member-mobile-head small, .member-mobile-grid span,
  .member-create-head p, .member-create-grid label span, .form-field small,
  .prodxs-balance-range, .summary-range > label, .summary-range > div > span,
  .txn-balance-pagination span, .channel-enable-text small, .activity-main span,
  .activity-main small, .pending-action-panel span, .conversion-legend,
  .downline-member-identity span, .downline-member-name small, .downline-member-stat small,
  .audit-time span, .audit-actor, .audit-member span, .audit-member small,
  .audit-credit-grid span, .audit-detail-box summary,
  .txn-member-empty, .empty-cell, .empty-state, .ref-empty, .agents-empty,
  .wallet-history-empty, .cmz-slip-modal__loading, .blacklist-date,
  .network-owner-title span, .commission-overview-head span, .downline-summary-card span,
  .downline-filter-form label span, .downline-table-head span, .downline-empty, .blacklist-user small, .blacklist-bank small,
  .blacklist-mobile-head small, .blacklist-mobile-grid span, .member-mobile-empty
) { color: var(--cmz-ui-muted) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .card, .panel, .ref-card, .agents-card, .wallet-page, .cr-provider-card,
  .finance-form-card, .blacklist-page, .downline-member-card
) > p { color: var(--cmz-ui-muted) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .account-number, .txn-member-open strong, .member-mobile-head > div > strong,
  .blacklist-user strong, .blacklist-mobile-head strong, .wallet-history-balance strong,
  .audit-member b, .member-credit-current strong, .wallet-stat.wallet-flow .stat-value,
  .commission-overview-grid .is-claimed strong, .network-owner-grid em, .downline-back
) { color: var(--cmz-ui-link) !important; }

/* Unclassed help text and plain navigation links in older page templates. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :where(p:not([class]), small:not([class])) {
  color: var(--cmz-ui-muted) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(p, td, .ref-card) > a:not([class]):not([style]) {
  color: var(--cmz-ui-link) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='settings'] [style*='background:#0c2b20'] {
  background: var(--cmz-ui-positive-bg) !important;
  border-color: var(--cmz-ui-positive-border) !important;
  color: var(--cmz-ui-positive) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='settings'] [style*='background:#0c2b20'] strong {
  color: var(--cmz-ui-positive) !important;
}

/* Native inputs, including date pickers, respect the same theme. Checkbox/radio,
 * range controls and hidden fields keep their native geometry and behavior. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']),
  select, textarea
) {
  background: var(--cmz-ui-input) !important;
  color: var(--cmz-ui-text) !important;
  border-color: var(--cmz-ui-border) !important;
  box-shadow: none !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(input, textarea)::placeholder {
  color: var(--cmz-ui-placeholder) !important;
  opacity: 1;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(input, select, textarea):focus {
  border-color: var(--cmz-ui-link) !important;
  box-shadow: 0 0 0 3px var(--cmz-ui-blue-soft) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(input, select, textarea):disabled {
  background: var(--cmz-ui-soft) !important;
  color: var(--cmz-ui-muted) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(select option, select optgroup) {
  background: var(--cmz-ui-input);
  color: var(--cmz-ui-text);
}

/* Neutral buttons and pagination; filled actions retain white text. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .btn-secondary, .filter-tab, .admin-top-action, .cmz-theme-toggle,
  .mobile-menu-btn, .wallet-history-pager a, .wallet-history-pager span,
  .txn-balance-pagination button, .txn-member-cancel, .px-tabs a, .px121-tabs a, .px-tab, .cmz-slip-cancel
) {
  background: var(--cmz-ui-surface) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .btn-secondary, .filter-tab, .admin-top-action, .cmz-theme-toggle,
  .mobile-menu-btn, .wallet-history-back, .txn-balance-pagination button
):hover { background: var(--cmz-ui-hover) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .btn-primary, .filter-tab.active, .wallet-history-pager .is-current,
  .px-tabs a.active, .px121-tabs a.active, .px-tab.active, .log-detail-button, .cmz-slip-save
) {
  background: var(--cmz-ui-blue) !important;
  border-color: var(--cmz-ui-blue) !important;
  color: #fff !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .btn-success {
  background: #187344 !important;
  border-color: #187344 !important;
  color: #fff !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .btn-danger {
  background: #b93140 !important;
  border-color: #b93140 !important;
  color: #fff !important;
}

/* Tables share three neutral surfaces. Semantic transaction rows are restored
 * below, and amount/status descendants are never neutralized here. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .table-responsive, .member-table-scroll, .transactions-table-wrap,
  .statement-table-wrap, .wallet-table-wrap, .wallet-history-table-wrap, .blacklist-scroll
),
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table {
  background: var(--cmz-ui-surface) !important;
  color: var(--cmz-ui-text) !important;
  border-color: var(--cmz-ui-border) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table :is(th, td) {
  border-color: var(--cmz-ui-border) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table thead th {
  background: var(--cmz-ui-head) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody :is(tr, td) {
  background: var(--cmz-ui-surface) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody td {
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody tr:nth-child(even),
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody tr:nth-child(even) td {
  background: var(--cmz-ui-soft) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody tr:hover,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table tbody tr:hover td {
  background: var(--cmz-ui-hover) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table :is(.prodxs-total-row, tfoot td) {
  background: var(--cmz-ui-head) !important;
  border-color: var(--cmz-ui-border) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table td small {
  color: var(--cmz-ui-muted) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .member-data-table td:nth-child(5) strong {
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .customer-bank, .member-credit-current, .member-network-count,
  .member-downline-action, .api-health-chip, .api-health-chip-muted,
  .agent-chip, .channel-badge, .fixed-account-type-badge, .member-network-badge,
  .ref-badge, .agents-badge, .ref-code, .agents-code, .cr-code, .cr-ref,
  .ledger-mobile-row code, .cr-mobile-row code, .channel-icon, .finance-channel-icon,
  .network-status.root, .provider-step-num
) {
  background: var(--cmz-ui-blue-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-link) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .customer-bank strong, .customer-bank span, .api-health-chip b,
  .txn-card-row > strong:not([class]):not([style])
) { color: var(--cmz-ui-text) !important; }

/* Dialogs keep their existing focus, open/closed state and intrinsic height. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .cmz-modal-dialog, .cmz-modal-header, .cmz-modal-footer,
  .cmz-slip-modal__dialog, .cmz-slip-modal__header, .cmz-slip-modal__actions,
  .member-edit-dialog, .txn-member-dialog, .txn-member-head, .txn-member-content,
  .m3-slip-modal-dialog, .blacklist-modal__panel, .blacklist-modal__body
) {
  background: var(--cmz-ui-surface) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .txn-member-nav, .txn-personal-card, .m3-slip-modal-body,
  .cmz-modal-close, .m3-slip-modal-close, .cmz-slip-modal__body, .cmz-slip-modal__close
) {
  background: var(--cmz-ui-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .cmz-modal-header h2, .txn-member-head h2, .m3-slip-modal-title,
  .member-edit-dialog h2, .member-edit-dialog h3, .blacklist-modal__head h2,
  .blacklist-modal__close, .cmz-slip-modal__header strong
) { color: var(--cmz-ui-text) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .cmz-modal-backdrop, .txn-member-backdrop, .m3-slip-modal-backdrop,
  .blacklist-modal, .sidebar-overlay, .cmz-slip-modal__backdrop
) { background: var(--cmz-ui-overlay) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] dialog::backdrop {
  background: var(--cmz-ui-overlay) !important;
}

/* Semantic feedback is explicit and identical across pages. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .form-success, .status-active, .status-badge.approved, .type-badge.deposit,
  .ledger-type.deposit, .log-chip.ok, .diag-chip.ok, .source-check-chip.ok,
  .api-health-success .api-health-status, .provider-status[style],
  .live-badge, .agents-status.active, .deposit-qr-state.is-on,
  .channel-enable-control.is-on, .member-network-badge.has-downline,
  .px-read, .source-apislip, .lab-local, .network-status.connected, .level-badge
) {
  background: var(--cmz-ui-positive-bg) !important;
  border-color: var(--cmz-ui-positive-border) !important;
  color: var(--cmz-ui-positive) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .form-error, .status-badge.rejected, .type-badge.withdraw, .ledger-type.withdraw,
  .log-chip.bad, .diag-chip.bad, .api-health-danger .api-health-status,
  .cr-provider-error, .member-note.watch, .blacklist-count, .blacklist-lock,
  .px121-pill.write
) {
  background: var(--cmz-ui-negative-bg) !important;
  border-color: var(--cmz-ui-negative-border) !important;
  color: var(--cmz-ui-negative) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .alert-warning, .status-badge.pending, .log-chip.warn, .auto-status-chip,
  .api-health-warning .api-health-status, .queue-id, .queue-working-chip,
  .pending-action-panel, .member-note.vip, .px-write, .px-warning, .provider-status:not([style]), .provider-warning,
  .source-easyslip, .lab-note, .parsed-note, .audit-note, .channel-icon-wallet
) {
  background: var(--cmz-ui-warning-bg) !important;
  border-color: var(--cmz-ui-warning-border) !important;
  color: var(--cmz-ui-warning) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .status-inactive, .agents-status.inactive, .log-chip.neutral, .diag-chip.neutral,
  .api-health-unknown .api-health-status, .deposit-qr-state.is-off,
  .channel-enable-control.is-off, .px121-pill:not(.write), .network-status:not(.connected):not(.root)
) {
  background: var(--cmz-ui-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-muted) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .notice-banner, .txn-source-site, .source-ocr, .source-parser, .lab-ai-option
) {
  background: var(--cmz-ui-blue-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-link) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .lab-ai-option strong {
  color: var(--cmz-ui-link) !important;
}

/* Amounts are last and more specific than generic table/strong rules. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(
  .amount.plus, .text-success, .profile-status-on, .wl-pos, .prodxs-winloss.pos, .ref-money.pos,
  .ref-stat strong.pos, .agents-api-value.pos, .wallet-balance,
  .wallet-stat.wallet-total .stat-value, .member-mobile-balance,
  .member-data-table td:nth-child(6) strong, .member-status-active,
  .activity-deposit .activity-amount, .lab-pass, .lab-preview-status strong,
  .diag-confidence.ok, .commission-overview-grid .is-available strong, .channel-enable-text b, .account-status-switch.is-on .switch-label,
  [style*='color:var(--success)'], [style*='color: var(--success)']
) { color: var(--cmz-ui-positive) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(
  .amount.minus, .text-danger, .profile-status-off, .wl-neg, .prodxs-winloss.neg, .ref-money.neg,
  .ref-stat strong.neg, .agents-api-value.neg, .activity-withdraw .activity-amount,
  .lab-fail, .diag-confidence.bad, .blacklist-delete, .link-danger,
  [style*='color:var(--danger)'], [style*='color: var(--danger)'],
  [style*='color:#ef4444'], [style*='color:#dc2626']
) { color: var(--cmz-ui-negative) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(
  .lab-unknown, .diag-confidence.warn, .auto-fail-stage, .blacklist-credit,
  [style*='color:#e67e22'], [style*='color:#f59e0b']
) { color: var(--cmz-ui-warning) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main :is(
  .ref-money.zero, .agents-api-value.zero, .channel-enable-control.is-off .channel-enable-text b,
  .account-status-switch.is-off .switch-label
) { color: var(--cmz-ui-muted) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main .transactions-table tbody tr.txn-row.txn-deposit,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main .transactions-table tbody tr.txn-row.txn-deposit td {
  background: var(--cmz-ui-positive-bg) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main .transactions-table tbody tr.txn-row.txn-withdraw,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main .transactions-table tbody tr.txn-row.txn-withdraw td {
  background: var(--cmz-ui-negative-bg) !important;
}

/* Sign-in branding remains legible on its intentional navy panel. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui.cmz-auth-page .auth-box {
  background: var(--cmz-ui-surface) !important;
  color: var(--cmz-ui-text) !important;
  border-color: var(--cmz-ui-border) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui.cmz-auth-page[data-cmz-page] .admin-main .cmz-login-brand h2 {
  color: #fff !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui.cmz-auth-page[data-cmz-page] .admin-main .cmz-login-brand p {
  color: #c3d2e3 !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui.cmz-auth-page :is(.cmz-login-description, .cmz-login-help) {
  color: var(--cmz-ui-muted) !important;
}

/* Summary totals use tinted semantic surfaces, matching the corresponding rows. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .summary-deposit {
  background: var(--cmz-ui-positive-bg) !important;
  border-color: var(--cmz-ui-positive-border) !important;
  color: var(--cmz-ui-positive) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .summary-withdraw {
  background: var(--cmz-ui-negative-bg) !important;
  border-color: var(--cmz-ui-negative-border) !important;
  color: var(--cmz-ui-negative) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .summary-box :is(.summary-label, .summary-value, small) {
  color: inherit !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .transactions-table td > strong:not([class]):not([style]) {
  color: var(--cmz-ui-text) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .transactions-table tr.txn-deposit td:nth-child(6) > strong,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .txn-card.txn-card-deposit .txn-card-amount {
  color: var(--cmz-ui-positive) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .transactions-table tr.txn-withdraw td:nth-child(6) > strong,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .txn-card.txn-card-withdraw .txn-card-amount {
  color: var(--cmz-ui-negative) !important;
}

/* Label text in existing mobile table cards follows the muted text token. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .admin-main table td::before {
  color: var(--cmz-ui-muted) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='game-wheel-settings'] [style*='background:#111827'] {
  background: var(--cmz-ui-soft) !important;
  color: var(--cmz-ui-text) !important;
  border-color: var(--cmz-ui-border) !important;
}

/* A theme change must update a toggle's fill and icon in the same frame. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] [data-cmz-theme-toggle] {
  background: var(--cmz-ui-surface) !important;
  color: var(--cmz-ui-text) !important;
  border-color: var(--cmz-ui-border) !important;
  transition: none !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] [data-cmz-theme-toggle] :is(i, svg) {
  color: inherit !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dev-terminal'] #devLive {
  color: var(--cmz-ui-positive) !important;
}

html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] a.btn:not(.btn-primary):not(.btn-success):not(.btn-danger) {
  background: var(--cmz-ui-surface) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
}

/* V4.5.23 shell: one restrained navy family for the drawer and sign-in brand.
 * The mobile header keeps a neutral surface and its logo uses the active theme. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .admin-sidebar.cmz-navigation, .cmz-navigation .sidebar-brand,
  .cmz-navigation .sidebar-user, .cmz-login-brand, .admin-topbar-simple
) {
  background: var(--cmz-ui-nav) !important;
  border-color: var(--cmz-ui-nav-line) !important;
  color: var(--cmz-ui-nav-text) !important;
  box-shadow: none !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation :is(
  .sidebar-nav > a, .sidebar-menu-toggle, .sidebar-submenu a,
  .sidebar-user-name, .sidebar-logout
) { color: var(--cmz-ui-nav-text) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation :is(
  .sidebar-section-heading, .sidebar-menu-arrow, .sidebar-user-role,
  .sidebar-nav > a i, .sidebar-menu-title > i
) { color: var(--cmz-ui-nav-muted) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation :is(
  .sidebar-nav > a, .sidebar-menu-toggle, .sidebar-submenu a, .sidebar-logout
):hover {
  background: var(--cmz-ui-nav-hover) !important;
  color: #fff !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation :is(
  .sidebar-nav > a.active, .sidebar-menu-group.active > .sidebar-menu-toggle,
  .sidebar-submenu a.active
) {
  background: var(--cmz-ui-nav-active) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--cmz-ui-nav-accent) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation :is(.sidebar-submenu, .sidebar-logout) {
  border-color: var(--cmz-ui-nav-line) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .cmz-navigation .sidebar-logout {
  background: var(--cmz-ui-nav-hover) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .sidebar-brand .cmz-logo-cmz, .admin-topbar-simple .cmz-logo-cmz
) { color: #f1f5fa !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .sidebar-brand .cmz-logo-pay, .sidebar-brand > i,
  .admin-topbar-simple .cmz-logo-pay, .cmz-login-brand-note
) { color: var(--cmz-ui-nav-accent) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .mobile-topbar-brand, .mobile-topbar-brand .cmz-logo-cmz
) { color: var(--cmz-ui-text) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .mobile-topbar-brand .cmz-logo-pay, .mobile-topbar-brand > i
) { color: var(--cmz-ui-link) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .prodxs-topbar-links a, .prodxs-admin-user, .admin-top-status
) { color: var(--cmz-ui-muted) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .mobile-notify-link, .prodxs-notify-link
) {
  background: var(--cmz-ui-soft) !important;
  border-color: var(--cmz-ui-border) !important;
  color: var(--cmz-ui-text) !important;
  box-shadow: none !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .mobile-notify-link, .prodxs-notify-link
):hover { background: var(--cmz-ui-hover) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .mobile-notify-link i, .prodxs-topbar-links a i, .prodxs-admin-user > i,
  .dashboard-card-grid .stat-icon
) { color: var(--cmz-ui-link) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .admin-desktop-topbar, .mobile-topbar
) { box-shadow: 0 1px 0 var(--cmz-ui-border) !important; }

/* Eliminate legacy glows/gradients on controls and metric cards without changing
 * sizes, visibility, event targets, or the distinctive colors of bank artwork. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .btn-primary, .btn-secondary, .btn-success, .btn-danger, .filter-tab,
  .admin-top-action, .mobile-menu-btn, .cmz-theme-toggle, .slip-button
) {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .card, .panel, .stat-card, .icon-stat-card, .dashboard-range-toolbar,
  .member-table-card, .member-mobile-card, .wallet-stat, .ref-stat, .ref-card,
  .agents-card, .finance-form-card, .finance-list-card, .bank-list-card,
  .cmz-insights-card, .api-health-card
) { box-shadow: var(--cmz-ui-shadow) !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .icon-stat-card::before,
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .icon-stat-card::after { background: transparent !important; box-shadow: none !important; }
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(
  .btn-primary, .slip-button, .log-detail-button, .cmz-slip-save
) {
  background: var(--cmz-ui-blue) !important;
  border-color: var(--cmz-ui-blue) !important;
  color: #fff !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .btn-success {
  background: #256b50 !important;
  border-color: #256b50 !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] .btn-danger {
  background: #a83b4b !important;
  border-color: #a83b4b !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] :is(a, button, input, select, textarea):focus-visible {
  outline-color: var(--cmz-ui-link) !important;
}
/* Native dark color-scheme already paints the calendar glyph; the old invert
 * rule inverted it a second time and made it disappear in dark date fields. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page] input[type='date']::-webkit-calendar-picker-indicator {
  filter: none !important;
  opacity: .85;
}

/* Dashboard totals/charts retain signs and meaning in the quieter palette. */
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] {
  --cmz-number-positive: var(--cmz-ui-positive);
  --cmz-number-negative: var(--cmz-ui-negative);
  --cmz-number-info: var(--cmz-ui-link);
  --cmz-number-bonus: var(--cmz-ui-purple);
  --cmz-number-pending: var(--cmz-ui-warning);
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] .cmz-dashboard-insights {
  --cmz-insights-deposit: var(--cmz-ui-positive);
  --cmz-insights-withdraw: var(--cmz-ui-negative);
  --cmz-insights-soft: var(--cmz-ui-soft);
  --cmz-insights-grid: var(--cmz-ui-border);
  --cmz-insights-blue-soft: var(--cmz-ui-blue-soft);
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] :is(.cmz-kpi-in, .cmz-number-positive) {
  color: var(--cmz-ui-positive) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] :is(.cmz-kpi-out, .cmz-number-negative) {
  color: var(--cmz-ui-negative) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] .cmz-kpi-info {
  color: var(--cmz-ui-link) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] .cmz-kpi-bonus {
  color: var(--cmz-ui-purple) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] .cmz-kpi-pending {
  color: var(--cmz-ui-warning) !important;
}
html body.admin-body.prodxs-admin-ui.cmz-professional-ui[data-cmz-page='dashboard'] .cmz-number-zero {
  color: var(--cmz-ui-muted) !important;
}
