/* GOFINPRO CMS theme. The initial theme is set in index.html before CSS loads. */
html[data-admin-theme="dark"] {
  color-scheme: dark;
  --admin-primary: #f04452;
  --admin-primary-hover: #ff6974;
  --admin-success: #30c397;
  --admin-danger: #ff6674;
  --admin-warning: #f4bb57;
  --admin-bg: #111317;
  --admin-surface: #1b1f26;
  --admin-border: #343a45;
  --admin-text: #f1f3f6;
  --admin-text-muted: #a4acb9;
  --admin-sidebar-bg: #15181e;
  --admin-sidebar-bg-sub: #111317;
  --admin-sidebar-active-bg: rgba(240, 68, 82, .2);
  --admin-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

html[data-admin-theme="light"] { color-scheme: light; }

.admin-theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface);
  color: var(--admin-text);
  box-shadow: 0 5px 20px rgba(0, 0, 0, .22);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}
.admin-theme-toggle:hover { border-color: var(--admin-primary); }
.admin-theme-toggle:focus-visible { outline: 2px solid var(--admin-primary); outline-offset: 3px; }

html[data-admin-theme="dark"] body,
html[data-admin-theme="dark"] .gx-app-layout,
html[data-admin-theme="dark"] .ant-layout,
html[data-admin-theme="dark"] .gx-layout-content,
html[data-admin-theme="dark"] .admin-route-overlay,
html[data-admin-theme="dark"] .ant-pro-page-container,
html[data-admin-theme="dark"] .ant-pro-grid-content { background: var(--admin-bg) !important; color: var(--admin-text); }

html[data-admin-theme="dark"] .gx-header,
html[data-admin-theme="dark"] .gx-app-layout .ant-layout-header,
html[data-admin-theme="dark"] .gx-inside-header,
html[data-admin-theme="dark"] .gx-topbar { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .gx-header .gx-icon-btn,
html[data-admin-theme="dark"] .gx-topbar .gx-icon-btn,
html[data-admin-theme="dark"] .gx-header-notifications .icon { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .gx-header .gx-icon-btn:hover,
html[data-admin-theme="dark"] .gx-topbar .gx-icon-btn:hover { background: #303540 !important; }

html[data-admin-theme="dark"] .gx-app-sidebar.ant-layout-sider,
html[data-admin-theme="dark"] .gx-app-sidebar.ant-layout-sider:not(.gx-layout-sider-dark),
html[data-admin-theme="dark"] .gx-app-sidebar .ant-layout-sider-children,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-drawer-body,
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-light,
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-light .ant-menu-sub,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-light,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-light .ant-menu-sub,
html[data-admin-theme="dark"] .gx-app-sidebar:not(.gx-layout-sider-dark) .gx-user-profile { background: var(--admin-sidebar-bg) !important; border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-item,
html[data-admin-theme="dark"] .gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-submenu-title,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-item,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-submenu-title,
html[data-admin-theme="dark"] .gx-app-sidebar .gx-avatar-name { color: #c8cfdb !important; }
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-item:hover,
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-submenu-title:hover,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-item:hover,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-submenu-title:hover { background: #292f3a !important; color: #fff !important; }
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-item-selected,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-item-selected { background: var(--admin-sidebar-active-bg) !important; color: #fff !important; }
html[data-admin-theme="dark"] .gx-app-sidebar .ant-menu-submenu-arrow,
html[data-admin-theme="dark"] .gx-drawer-sidebar .ant-menu-submenu-arrow { color: #9da8b8 !important; }

/* Legacy Ant Design pages, including customer, deposit, withdrawal and VIP. */
html[data-admin-theme="dark"] .ant-card,
html[data-admin-theme="dark"] .ant-pro-card,
html[data-admin-theme="dark"] .ant-pro-table,
html[data-admin-theme="dark"] .ant-pro-table-search,
html[data-admin-theme="dark"] .ant-pro-table-list-toolbar,
html[data-admin-theme="dark"] .ant-table,
html[data-admin-theme="dark"] .ant-table-container,
html[data-admin-theme="dark"] .ant-table-content,
html[data-admin-theme="dark"] .ant-table-thead > tr > th,
html[data-admin-theme="dark"] .ant-table-tbody > tr > td,
html[data-admin-theme="dark"] .ant-table-tbody > tr.ant-table-placeholder > td,
html[data-admin-theme="dark"] .ant-descriptions-view,
html[data-admin-theme="dark"] .ant-descriptions-bordered .ant-descriptions-item-label,
html[data-admin-theme="dark"] .ant-descriptions-bordered .ant-descriptions-item-content,
html[data-admin-theme="dark"] .ant-collapse,
html[data-admin-theme="dark"] .ant-collapse-item,
html[data-admin-theme="dark"] .ant-collapse-content,
html[data-admin-theme="dark"] .ant-list,
html[data-admin-theme="dark"] .ant-tabs-content,
html[data-admin-theme="dark"] .ant-drawer-content,
html[data-admin-theme="dark"] .ant-modal-content,
html[data-admin-theme="dark"] .ant-modal-header,
html[data-admin-theme="dark"] .ant-modal-footer,
html[data-admin-theme="dark"] .ant-popover-inner,
html[data-admin-theme="dark"] .ant-dropdown-menu,
html[data-admin-theme="dark"] .ant-select-dropdown,
html[data-admin-theme="dark"] .ant-picker-panel-container,
html[data-admin-theme="dark"] .ant-picker-panel,
html[data-admin-theme="dark"] .ant-notification-notice,
html[data-admin-theme="dark"] .ant-message-notice-content { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }

html[data-admin-theme="dark"] .ant-table-thead > tr > th,
html[data-admin-theme="dark"] .ant-pro-table-search,
html[data-admin-theme="dark"] .ant-descriptions-bordered .ant-descriptions-item-label,
html[data-admin-theme="dark"] .ant-picker-header,
html[data-admin-theme="dark"] .ant-picker-content th { background: #252a33 !important; }
html[data-admin-theme="dark"] .ant-table-tbody > tr:hover > td,
html[data-admin-theme="dark"] .ant-table-row-selected > td,
html[data-admin-theme="dark"] .ant-dropdown-menu-item:hover,
html[data-admin-theme="dark"] .ant-select-item-option-active,
html[data-admin-theme="dark"] .ant-picker-cell:hover .ant-picker-cell-inner { background: #303641 !important; }

html[data-admin-theme="dark"] .ant-typography,
html[data-admin-theme="dark"] .ant-form-item-label > label,
html[data-admin-theme="dark"] .ant-table-cell,
html[data-admin-theme="dark"] .ant-modal-title,
html[data-admin-theme="dark"] .ant-drawer-title,
html[data-admin-theme="dark"] .ant-tabs-tab-btn,
html[data-admin-theme="dark"] .ant-select-selection-item,
html[data-admin-theme="dark"] .ant-picker-input > input { color: var(--admin-text); }
html[data-admin-theme="dark"] .intro-display,
html[data-admin-theme="dark"] .intro-display::before,
html[data-admin-theme="dark"] .intro-display::after,
html[data-admin-theme="dark"] .intro-display-content,
html[data-admin-theme="dark"] .intro-display-text { background: #292e38 !important; color: #d9e0e9 !important; border-color: #46505e !important; }
html[data-admin-theme="dark"] .ant-typography-secondary,
html[data-admin-theme="dark"] .ant-form-item-extra,
html[data-admin-theme="dark"] .ant-form-item-explain,
html[data-admin-theme="dark"] .ant-empty-description,
html[data-admin-theme="dark"] .ant-table-pagination { color: var(--admin-text-muted) !important; }
html[data-admin-theme="dark"] .ant-pro-card-title,
html[data-admin-theme="dark"] .ant-pro-table-list-toolbar-title,
html[data-admin-theme="dark"] .ant-page-header-heading-title { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .ant-pro-table-list-toolbar-title *,
html[data-admin-theme="dark"] .ant-pro-table-list-toolbar .ant-badge > span:not(.ant-badge-count),
html[data-admin-theme="dark"] .ant-badge > span:not(.ant-badge-count):not(.ant-scroll-number),
html[data-admin-theme="dark"] .ant-badge-status-text { color: #cbd3de !important; }
html[data-admin-theme="dark"] .gx-layout-footer-content { color: #9ca6b5 !important; }
html[data-admin-theme="dark"] a:not(.ant-btn) { color: #76aaff; }
html[data-admin-theme="dark"] a:not(.ant-btn):hover { color: #a9c8ff; }

html[data-admin-theme="dark"] .ant-input,
html[data-admin-theme="dark"] .ant-input-affix-wrapper,
html[data-admin-theme="dark"] .ant-input-number,
html[data-admin-theme="dark"] .ant-select-selector,
html[data-admin-theme="dark"] .ant-picker,
html[data-admin-theme="dark"] .ant-cascader-picker,
html[data-admin-theme="dark"] .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous),
html[data-admin-theme="dark"] textarea,
html[data-admin-theme="dark"] select { background: #232831 !important; border-color: #424956 !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .ant-input::placeholder,
html[data-admin-theme="dark"] textarea::placeholder { color: #9099a8 !important; }
html[data-admin-theme="dark"] .ant-btn-primary { background: var(--admin-primary) !important; border-color: var(--admin-primary) !important; color: #fff !important; }
html[data-admin-theme="dark"] .ant-btn-primary span { color: #fff !important; }
html[data-admin-theme="dark"] .ant-btn-primary:hover { background: var(--admin-primary-hover) !important; border-color: var(--admin-primary-hover) !important; }
html[data-admin-theme="dark"] .ant-pagination-item,
html[data-admin-theme="dark"] .ant-pagination-prev .ant-pagination-item-link,
html[data-admin-theme="dark"] .ant-pagination-next .ant-pagination-item-link { background: #232831 !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }

html[data-admin-theme="dark"] .admin-dw-header,
html[data-admin-theme="dark"] .admin-deposit-type-filter,
html[data-admin-theme="dark"] .admin-deposit-type-filter--inline,
html[data-admin-theme="dark"] .admin-deposit-type-filter--prominent,
html[data-admin-theme="dark"] body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search,
html[data-admin-theme="dark"] body.admin-deposit-page .deposit-status-container,
html[data-admin-theme="dark"] .admin-deposit-detail-dialog { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .admin-dw-header__text h2,
html[data-admin-theme="dark"] body.admin-deposit-page .deposit-tabs-title,
html[data-admin-theme="dark"] .admin-deposit-type-filter__label,
html[data-admin-theme="dark"] .admin-deposit-type-filter--prominent .admin-deposit-type-filter__label,
html[data-admin-theme="dark"] .admin-tx-user__nick,
html[data-admin-theme="dark"] .deposit-fin-box,
html[data-admin-theme="dark"] .deposit-fin-box__total { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .admin-deposit-type-filter__btn,
html[data-admin-theme="dark"] .admin-deposit-type-filter__input,
html[data-admin-theme="dark"] .admin-deposit-type-filter__clear,
html[data-admin-theme="dark"] .deposit-status-tabs .ant-tabs-tab,
html[data-admin-theme="dark"] .deposit-status-container .ant-tabs-tab { background: #252a33 !important; border-color: #424956 !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .admin-deposit-type-filter__btn.is-active,
html[data-admin-theme="dark"] .deposit-status-tabs .ant-tabs-tab-active,
html[data-admin-theme="dark"] .deposit-status-container .ant-tabs-tab-active { background: #672733 !important; border-color: var(--admin-primary) !important; color: #fff !important; }
html[data-admin-theme="dark"] .deposit-status-tabs .ant-tabs-tab-btn,
html[data-admin-theme="dark"] .deposit-status-container .ant-tabs-tab-btn { color: inherit !important; }
html[data-admin-theme="dark"] body.admin-deposit-page .ant-table-thead th,
html[data-admin-theme="dark"] body.admin-withdraw-page .ant-table-thead th { background: #252a33 !important; }
html[data-admin-theme="dark"] .admin-deposit-detail-dialog__head,
html[data-admin-theme="dark"] .admin-deposit-filter-slot { border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] [class*="deposit-tabs-title"],
html[data-admin-theme="dark"] [class*="withdraw-tabs-title"] { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .ant-tabs-tab,
html[data-admin-theme="dark"] .ant-tabs-card .ant-tabs-tab,
html[data-admin-theme="dark"] [class*="Withdraw_tab"] { background: #252a33 !important; border-color: #424956 !important; color: #cbd3de !important; }
html[data-admin-theme="dark"] .ant-tabs-tab-active,
html[data-admin-theme="dark"] .ant-tabs-card .ant-tabs-tab-active { background: #672733 !important; border-color: var(--admin-primary) !important; color: #fff !important; }
html[data-admin-theme="dark"] .ant-tabs-tab-active [class*="tab-label"],
html[data-admin-theme="dark"] .ant-tabs-tab-active .ant-tabs-tab-btn { color: #fff !important; }
html[data-admin-theme="dark"] [class*="Withdraw_tab-label"] { background: transparent !important; border: 0 !important; color: inherit !important; }
html[data-admin-theme="dark"] .tab-count { background: #323a46 !important; color: #f0f3f6 !important; }
html[data-admin-theme="dark"] .admin-auto-wd-panel { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .admin-auto-wd-panel__title { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .admin-auto-wd-panel__toggle,
html[data-admin-theme="dark"] .admin-auto-wd-panel__max,
html[data-admin-theme="dark"] .admin-auto-wd-panel__hint { color: #bec7d3 !important; }
html[data-admin-theme="dark"] .admin-auto-wd-panel__max input { background: #232831 !important; border-color: #424956 !important; color: var(--admin-text) !important; }

/* Hand-built dashboard and game panels have their own light palette. */
html[data-admin-theme="dark"] .adm-dash,
html[data-admin-theme="dark"] .gm-root { color: var(--admin-text); }
html[data-admin-theme="dark"] .adm-dash h2.adm-section__title,
html[data-admin-theme="dark"] .adm-section__title,
html[data-admin-theme="dark"] .adm-kpi__value,
html[data-admin-theme="dark"] .adm-panel__head strong,
html[data-admin-theme="dark"] .adm-vol-sum__item strong,
html[data-admin-theme="dark"] .gm-pred strong,
html[data-admin-theme="dark"] .gm-ohlc strong,
html[data-admin-theme="dark"] .gm-side-card__title,
html[data-admin-theme="dark"] .gm-user__name,
html[data-admin-theme="dark"] .gm-orders__title,
html[data-admin-theme="dark"] .gm-config h3,
html[data-admin-theme="dark"] .gm-autobreak__head h3 { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .adm-section__desc,
html[data-admin-theme="dark"] .adm-kpi__label,
html[data-admin-theme="dark"] .adm-kpi__hint,
html[data-admin-theme="dark"] .adm-kpi__hint-line,
html[data-admin-theme="dark"] .adm-panel__head small,
html[data-admin-theme="dark"] .adm-vol-sum__item em,
html[data-admin-theme="dark"] .adm-table th,
html[data-admin-theme="dark"] .gm-preview__card span,
html[data-admin-theme="dark"] .gm-kpi-hint,
html[data-admin-theme="dark"] .gm-user__nick,
html[data-admin-theme="dark"] .gm-user__id { color: #b2bdca !important; }
html[data-admin-theme="dark"] .adm-chart svg text { fill: #bec7d4 !important; }
html[data-admin-theme="dark"] .adm-kpi,
html[data-admin-theme="dark"] .adm-panel,
html[data-admin-theme="dark"] .gm-pred,
html[data-admin-theme="dark"] .gm-preview__card,
html[data-admin-theme="dark"] .gm-table-wrap,
html[data-admin-theme="dark"] .gm-toolbar,
html[data-admin-theme="dark"] .gm-live-main,
html[data-admin-theme="dark"] .gm-side-card,
html[data-admin-theme="dark"] .gm-config,
html[data-admin-theme="dark"] .gm-autobreak { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text); }
html[data-admin-theme="dark"] .adm-vol-sum,
html[data-admin-theme="dark"] .gm-ohlc div,
html[data-admin-theme="dark"] .gm-autobreak__kpi,
html[data-admin-theme="dark"] .gm-filter-chip,
html[data-admin-theme="dark"] .gm-filter-mkt,
html[data-admin-theme="dark"] .gm-preview__card--muted { background: #252a33 !important; border-color: var(--admin-border) !important; color: var(--admin-text); }
html[data-admin-theme="dark"] .adm-table thead,
html[data-admin-theme="dark"] .gm-table thead,
html[data-admin-theme="dark"] .adm-table tbody tr:hover { background: #252a33 !important; }
html[data-admin-theme="dark"] .adm-table-wrap,
html[data-admin-theme="dark"] .adm-table th,
html[data-admin-theme="dark"] .adm-table td,
html[data-admin-theme="dark"] .gm-table th,
html[data-admin-theme="dark"] .gm-table td,
html[data-admin-theme="dark"] .adm-section__head { border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .adm-select,
html[data-admin-theme="dark"] .adm-vol-filter input,
html[data-admin-theme="dark"] .gm-config input,
html[data-admin-theme="dark"] .gm-config select,
html[data-admin-theme="dark"] .gm-btn--ghost { background: #232831 !important; border-color: #424956 !important; color: var(--admin-text) !important; }

/* Customer detail was built as a separate light page. Keep every structural
   surface in the CMS palette, while retaining semantic badge colours. */
html[data-admin-theme="dark"] #admin-2fa-detail-bar,
html[data-admin-theme="dark"] .customer-detail,
html[data-admin-theme="dark"] .house-wallet-page { background: var(--admin-bg) !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] #admin-2fa-detail-bar,
html[data-admin-theme="dark"] .customer-header,
html[data-admin-theme="dark"] .status-bar,
html[data-admin-theme="dark"] .financial-summary__metric,
html[data-admin-theme="dark"] .tab-container,
html[data-admin-theme="dark"] .section-block,
html[data-admin-theme="dark"] .quick-actions,
html[data-admin-theme="dark"] .customer-detail .ant-card,
html[data-admin-theme="dark"] .customer-detail .ant-card-body,
html[data-admin-theme="dark"] .house-wallet-page .ant-card,
html[data-admin-theme="dark"] .admin-customer-ops-dialog,
html[data-admin-theme="dark"] .admin-customer-ops-password-box,
html[data-admin-theme="dark"] .admin-create2fa-box { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .customer-detail .ant-breadcrumb,
html[data-admin-theme="dark"] .customer-header,
html[data-admin-theme="dark"] .status-bar,
html[data-admin-theme="dark"] .financial-summary__metric,
html[data-admin-theme="dark"] .tab-container,
html[data-admin-theme="dark"] .section-block,
html[data-admin-theme="dark"] .house-wallet-page { border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .customer-detail :is(h1,h2,h3,h4,h5),
html[data-admin-theme="dark"] .house-wallet-page :is(h1,h2,h3,h4,h5),
html[data-admin-theme="dark"] .customer-header__name,
html[data-admin-theme="dark"] .customer-header__title,
html[data-admin-theme="dark"] .quick-actions__section-title,
html[data-admin-theme="dark"] .customer-detail .ant-card-head-title,
html[data-admin-theme="dark"] .house-wallet-page .ant-card-head-title,
html[data-admin-theme="dark"] #admin-2fa-detail-bar .admin-2fa-detail-label { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .customer-detail .ant-breadcrumb-link,
html[data-admin-theme="dark"] .customer-header__meta,
html[data-admin-theme="dark"] .financial-summary__label,
html[data-admin-theme="dark"] .house-wallet-page .ant-statistic-title,
html[data-admin-theme="dark"] .house-wallet-page .amount-display.zero,
html[data-admin-theme="dark"] .house-wallet-page p { color: #b2bdca !important; }
html[data-admin-theme="dark"] .customer-header__meta-divider { color: #657080 !important; }
html[data-admin-theme="dark"] .customer-detail .ant-breadcrumb-separator { color: #8793a4 !important; }
html[data-admin-theme="dark"] .customer-detail .ant-statistic-title,
html[data-admin-theme="dark"] .customer-detail .section-block__subtitle,
html[data-admin-theme="dark"] .customer-detail .account-info-field__label { color: #b2bdca !important; }
html[data-admin-theme="dark"] .customer-detail .ant-statistic-content,
html[data-admin-theme="dark"] .customer-detail .ant-statistic-content-value,
html[data-admin-theme="dark"] .customer-detail .ant-statistic-content-value-int,
html[data-admin-theme="dark"] .customer-detail .ant-statistic-content-value-decimal,
html[data-admin-theme="dark"] .customer-detail .ant-statistic-content-suffix,
html[data-admin-theme="dark"] .customer-detail .account-info-field__value { color: #f1f3f6 !important; }
html[data-admin-theme="dark"] .customer-detail .ant-tag-success span { color: #2e7118 !important; }
html[data-admin-theme="dark"] .customer-detail .account-info-field__value--mono { background: #29303a !important; border: 1px solid #455061 !important; color: #f1f3f6 !important; }
html[data-admin-theme="dark"] .customer-detail .quick-actions__current span { color: #b2bdca !important; }
html[data-admin-theme="dark"] .customer-detail .quick-actions__current strong { color: #c6a5ff !important; }
html[data-admin-theme="dark"] .customer-detail .ant-tabs-tab,
html[data-admin-theme="dark"] .customer-detail .tab-container [role="tab"] { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .customer-detail .ant-tabs-tab-active,
html[data-admin-theme="dark"] .customer-detail .tab-container [aria-selected="true"] { background: #672733 !important; color: #fff !important; }
html[data-admin-theme="dark"] .admin-customer-ops-btn--danger,
html[data-admin-theme="dark"] .admin-customer-ops-btn--primary { background: #b92c43 !important; border-color: #b92c43 !important; color: #fff !important; }
html[data-admin-theme="dark"] .admin-customer-ops-btn:not(.admin-customer-ops-btn--danger):not(.admin-customer-ops-btn--primary),
html[data-admin-theme="dark"] .admin-customer-ops-input,
html[data-admin-theme="dark"] .admin-customer-ops-textarea,
html[data-admin-theme="dark"] .admin-create2fa-secret { background: #232831 !important; border-color: #424956 !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .admin-customer-ops-dialog__head,
html[data-admin-theme="dark"] .admin-customer-ops-dialog__foot { border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .admin-customer-ops-hint,
html[data-admin-theme="dark"] .admin-customer-ops-label { color: #d4dbe5 !important; }
html[data-admin-theme="dark"] .admin-customer-ops-sub,
html[data-admin-theme="dark"] .admin-create2fa-secretlabel { color: #aeb8c7 !important; }
html[data-admin-theme="dark"] .admin-create2fa-qr,
html[data-admin-theme="dark"] .admin-customer-ops-captcha-img { background: #fff !important; }

/* The house-wallet dashboard supplies its own page wrapper and labels. */
html[data-admin-theme="dark"] .house-wallet-page .ant-statistic-title,
html[data-admin-theme="dark"] .house-wallet-page .ant-card-head-title,
html[data-admin-theme="dark"] .house-wallet-page .ant-tabs-tab-btn { color: #d4dbe5 !important; }
html[data-admin-theme="dark"] .house-wallet-page .ant-table-tbody > tr > td,
html[data-admin-theme="dark"] .house-wallet-page .ant-table-thead > tr > th { border-color: var(--admin-border) !important; }

/* Customer list: keep balance figures and supporting labels readable. */
html[data-admin-theme="dark"] body.admin-customer-list-page .ant-pro-table-list-toolbar-title,
html[data-admin-theme="dark"] body.admin-customer-list-page .ant-table-thead > tr > th,
html[data-admin-theme="dark"] body.admin-customer-list-page .ant-table-tbody > tr > td {
  color: #edf2f8 !important;
}
html[data-admin-theme="dark"] body.admin-customer-list-page .admin-customer-user-meta {
  color: #bac5d4 !important;
}
html[data-admin-theme="dark"] body.admin-customer-list-page .admin-kyc-empty {
  color: #aeb9c8 !important;
}
html[data-admin-theme="dark"] body.admin-customer-list-page .admin-mkt-badge--no {
  background: #303744 !important;
  border-color: #536071 !important;
  color: #e2e8f0 !important;
}
html[data-admin-theme="dark"] body.admin-customer-list-page .ant-table-tbody td:nth-child(6) > div[style*="gradient"] {
  background: #26384e !important;
  border: 1px solid #54749a !important;
  border-left: 3px solid #68a6ff !important;
  border-radius: 6px !important;
  color: #f8fbff !important;
  padding: 5px 9px !important;
  font-variant-numeric: tabular-nums;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
html[data-admin-theme="dark"] body.admin-customer-list-page .ant-table-tbody td:nth-child(6) > div[style*="gradient"] * {
  color: #f8fbff !important;
}

@media (max-width: 768px) {
  html[data-admin-theme="dark"] body.admin-mobile-customer-list .ant-table-tbody > tr.ant-table-row {
    background: #20252e !important;
    border: 1px solid #465161 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .2) !important;
  }
  html[data-admin-theme="dark"] body.admin-mobile-customer-list .ant-table-tbody > tr.ant-table-row > td.ant-table-cell {
    background: transparent !important;
    color: #eef2f7 !important;
    font-size: 13px !important;
    line-height: 1.4;
  }
  html[data-admin-theme="dark"] body.admin-mobile-customer-list .ant-table-tbody > tr.ant-table-row > td.ant-table-cell::before {
    color: #b8c4d4 !important;
    font-size: 12px;
  }
  html[data-admin-theme="dark"] body.admin-mobile-customer-list .ant-table-tbody > tr.ant-table-row > td:last-child {
    border-top-color: #465161 !important;
  }
}

/* VIP/downline widget injects its own late light stylesheet. */
html[data-admin-theme="dark"] .avd-panel,
html[data-admin-theme="dark"] .avd-filters,
html[data-admin-theme="dark"] .avd-tree,
html[data-admin-theme="dark"] .avd-table-wrap { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .avd-kpis span,
html[data-admin-theme="dark"] .avd-node-row:hover,
html[data-admin-theme="dark"] .avd-table th { background: #252a33 !important; border-color: var(--admin-border) !important; }
html[data-admin-theme="dark"] .avd-head strong,
html[data-admin-theme="dark"] .avd-kpis b,
html[data-admin-theme="dark"] .avd-tree-title,
html[data-admin-theme="dark"] .avd-table th,
html[data-admin-theme="dark"] .avd-table td { color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .avd-head small,
html[data-admin-theme="dark"] .avd-kpis em,
html[data-admin-theme="dark"] .avd-filters label,
html[data-admin-theme="dark"] .avd-meta,
html[data-admin-theme="dark"] .avd-note,
html[data-admin-theme="dark"] .avd-empty { color: #b2bdca !important; }
html[data-admin-theme="dark"] .avd-filters input,
html[data-admin-theme="dark"] .avd-filters button:not(.avd-primary),
html[data-admin-theme="dark"] .avd-toggle { background: #232831 !important; border-color: #424956 !important; color: var(--admin-text) !important; }
html[data-admin-theme="dark"] .avd-filters .avd-primary { background: #b92c43 !important; border-color: #b92c43 !important; color: #fff !important; }
html[data-admin-theme="dark"] .avd-range-tag { background: #25354a !important; color: #a8ceff !important; }
html[data-admin-theme="dark"] .avd-table td,
html[data-admin-theme="dark"] .avd-children { border-color: var(--admin-border) !important; }

/* Keep the mobile dashboard consistent when the user selects light mode. */
@media (max-width: 768px) {
  html[data-admin-theme="light"] body.admin-lock-dashboard .gx-app-layout .gx-layout-content,
  html[data-admin-theme="light"] body.admin-lock-dashboard .admin-route-overlay,
  html[data-admin-theme="light"] .adm-dash { background: var(--admin-bg) !important; color: var(--admin-text); }
  html[data-admin-theme="light"] .adm-mobile-metric,
  html[data-admin-theme="light"] .adm-mobile-table,
  html[data-admin-theme="light"] .adm-mobile-row span { background: #fff; border-color: #d9dde5; color: #242832; }
  html[data-admin-theme="light"] .adm-mobile-overview h2,
  html[data-admin-theme="light"] .adm-mobile-metric span,
  html[data-admin-theme="light"] .adm-mobile-metric strong,
  html[data-admin-theme="light"] .adm-mobile-row strong { color: #242832 !important; }
  html[data-admin-theme="light"] .adm-mobile-row { border-color: #d9dde5; }
  .admin-theme-toggle { right: 12px; bottom: 12px; }
}
