/* Shared Tradestone palette for account and administration screens.
   Dark is the base palette; the matching light palette follows the device setting. */
:root, body {
 --color-bg:#030508; --color-bg-secondary:#0e1217;
 --color-surface:#05090c; --color-surface-medium:#0e1217; --color-surface-strong:#0e1217;
 --color-glass:#05090c; --color-glass-strong:#0e1217;
 --color-stroke:rgba(148,163,184,.24); --color-stroke-strong:rgba(5,171,206,.36);
 --color-primary:#05abce; --color-primary-strong:#048fb0; --color-primary-soft:rgba(5,171,206,.12);
 --color-accent:#05abce; --color-text:#f8fafc; --color-text-secondary:#cbd5e1; --color-text-tertiary:#a3a8b3;
 --gradient-hero:radial-gradient(900px 420px at 76% -8%,rgba(5,171,206,.14),transparent 62%),linear-gradient(#05070a,#030508);
 --gradient-glass:linear-gradient(#05090c,#05090c); --gradient-glass-hover:linear-gradient(#0e1217,#0e1217);
 --gradient-cta:linear-gradient(135deg,#05abce,#048fb0);
 --glass-border:1px solid rgba(148,163,184,.24); --glass-shadow:0 14px 30px rgba(0,0,0,.28); --glass-shadow-strong:0 28px 80px rgba(0,0,0,.48);
 --bs-body-bg:#030508; --bs-body-color:#cbd5e1; --bs-emphasis-color:#f8fafc; --bs-secondary-color:#a3a8b3;
 --bs-primary:#05abce; --bs-primary-rgb:5,171,206; --bs-link-color:#05abce; --bs-link-hover-color:#048fb0;
 --bs-border-color:rgba(148,163,184,.24); --bs-tertiary-bg:#0e1217;
 color-scheme:light dark;
}
html,
body {
 scrollbar-width:none;
 -ms-overflow-style:none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
 width:0;
 height:0;
 display:none;
}
html, html body { background:#030508 !important; color:#cbd5e1 !important; }
body::before { background:var(--gradient-hero) !important; }
body :is(h1,h2,h3,h4,h5,h6,label,legend,th,.page-title,.card-title,.modal-title,.auth-card__title) { color:#f8fafc !important; -webkit-text-fill-color:currentColor; text-shadow:none; }
body :is(p,dt,dd,.text-secondary,.text-gray-300,.help-block,.form-text) { color:#cbd5e1; }
body :is(.text-muted,small,.text-gray-400,.text-gray-500) { color:#a3a8b3 !important; }
body :is(a,.text-primary,.text-info) { color:#05abce; }
body a:hover { color:#048fb0; }
body :is(.main-content,.page-wrapper,.page-content,.main-panel,.content-wrapper,.dashboard-main,.gh-page,#page-wrapper,.sticky-header) { background:#030508 !important; color:#cbd5e1; }
body :is(.card,.panel,.well,.modal-content,.dropdown-menu,.popover,.auth-card,.glass-card,.metric-card,.metric-card-small,.stat-card,.stats-card,.summary-card,.balance-card,.account-card,.pricing-card,.payment-card,.transaction-card,.settings-card,.table-responsive,.widget,.widget-body,.widget-shadow,.agile-grids,.tables,.form-body,.form-grids,.inbox-page,.gh-card,.gh-panel,.ai-insights,.regime-indicator,.action-btn,.telemetry-card) {
 background:#05090c !important; background-image:none !important; border-color:rgba(148,163,184,.24) !important; color:#cbd5e1; box-shadow:0 14px 30px rgba(0,0,0,.28);
}
body :is(header,.header,.header-section,.dashboard-header,.navbar,.sidebar,.sidebar-menu,.sidebar-left,.sidebar-mobile,.left-side,.main-sidebar,.nav-menu-panel,.nav-modal-content,.topbar,.top-nav,.sidebar-nav) { background:#05090c !important; border-color:rgba(5,171,206,.28) !important; color:#f8fafc; }
body :is(.sidebar,.sidebar-menu,.sidebar-nav,.navbar,.nav-menu-panel,.dropdown-menu) a { color:#cbd5e1; }
body :is(.sidebar,.sidebar-menu,.sidebar-nav,.navbar,.nav-menu-panel,.dropdown-menu) a:hover,
body :is(.nav-link.active,.sidebar-menu .active > a,.sidebar-nav .active > a,.nav-menu-item:hover) { background:rgba(5,171,206,.12) !important; color:#05abce !important; }
body :is(.card-header,.card-footer,.panel-heading,.panel-footer,.modal-header,.modal-footer,.input-group-text,.breadcrumb,.list-group-item,.accordion-item,.accordion-button,.pagination a,.page-link) { background:#0e1217 !important; color:#cbd5e1 !important; border-color:rgba(148,163,184,.24) !important; }
body :is(.form-control,.form-select,.auth-input,textarea,select,input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="color"]):not([type="hidden"])) {
 background:#05090c !important; color:#f8fafc !important; border-color:rgba(148,163,184,.32) !important; box-shadow:none;
}
body :is(input,textarea)::placeholder { color:#a3a8b3 !important; opacity:1; }
body :is(input,textarea,select,.form-control):focus { border-color:#05abce !important; outline-color:#05abce; box-shadow:0 0 0 3px rgba(5,171,206,.14); }
body :is(input,select,textarea):disabled, body input[readonly] { background:#0e1217 !important; color:#a3a8b3 !important; }
body :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color:#05abce; }
body :is(.btn-primary,.btn-info,.btn-success,.auth-submit,button[type="submit"],input[type="submit"]) { background:linear-gradient(135deg,#05abce,#048fb0) !important; color:#fff !important; border-color:#05abce !important; }
body :is(.btn-default,.btn-secondary,.btn-light,.btn-outline-primary,.btn-outline-light,.btn-outline-info,.btn-outline-success) { background:#0e1217 !important; color:#05abce !important; border-color:rgba(5,171,206,.5) !important; }
body :is(.btn-primary,.btn-info,.btn-success):hover { background:#048fb0 !important; }
body :is(.table,table) { --bs-table-bg:#05090c; --bs-table-color:#cbd5e1; --bs-table-striped-bg:#0e1217; --bs-table-striped-color:#cbd5e1; --bs-table-hover-bg:rgba(5,171,206,.1); --bs-table-hover-color:#f8fafc; background:#05090c !important; color:#cbd5e1 !important; }
body :is(th,td) { border-color:rgba(148,163,184,.24) !important; }
body :is(thead,thead th) { background:#0e1217 !important; color:#f8fafc !important; }
body :is(tbody tr,tbody td) { background:transparent; color:#cbd5e1; }
body .table-striped tbody tr:nth-of-type(odd) { background:#0e1217 !important; }
body tbody tr:hover { background:rgba(5,171,206,.08) !important; }
body :is(.bg-white,.bg-light,.bg-black,.bg-dark) { background-color:#05090c !important; }
body :is(.text-dark,.text-black) { color:#f8fafc !important; }
body :is(.bg-primary,.bg-info,.bg-success,.badge-primary,.badge-info,.badge-success,.progress-bar) { background:#05abce !important; color:#fff !important; }
body :is(.alert-info,.alert-success) { background:rgba(5,171,206,.12) !important; color:#05abce !important; border-color:rgba(5,171,206,.36) !important; }
body :is(.text-success,.positive,.profit) { color:#05abce !important; }
body :is(.alert-danger,.alert-error) { background:rgba(220,38,38,.14) !important; color:#f87171 !important; border-color:rgba(220,38,38,.4) !important; }
body :is(.btn-danger,.bg-danger,.badge-danger) { background:#dc2626 !important; color:#fff !important; border-color:#dc2626 !important; }
body :is(.text-danger,.negative,.loss) { color:#f87171 !important; }
body :is(.alert-warning,.bg-warning,.badge-warning) { background:rgba(245,158,11,.14) !important; color:#fbbf24 !important; border-color:rgba(245,158,11,.4) !important; }
body :is(footer,.footer,.copyright,.footer-meta) { background:#030508 !important; color:#a3a8b3 !important; border-color:rgba(148,163,184,.24) !important; }
body :is(.select2-dropdown,.select2-selection,.select2-results,.iti__country-list,.datepicker,.dataTables_wrapper) { background:#05090c !important; color:#cbd5e1 !important; border-color:rgba(148,163,184,.24) !important; }
body .orb { background:radial-gradient(circle,rgba(5,171,206,.14),transparent 65%) !important; }
body :focus-visible { outline-color:#05abce; }
/* Older admin forms and the AI Core use their own token names. */
:root, body { --glass-bg:#05090c; --accent:#05abce; --accent-strong:#048fb0; --text-primary:#f8fafc; --text-muted:#a3a8b3; --input-bg:#05090c; --input-border:rgba(148,163,184,.32); --input-focus:#05abce; --success:#05abce; }
body :is(.deposit-card,.withdraw-card,.wallet-item,.wallet-frame,.wallet-timer,.amount-display,.glass-table-wrapper,.glass-frame,.pricing .box,.pricing .btn-wrap,.hero-stat,.success-content,.promo-popup__card,.gh-history-row,.gh-history-detail,.gh-select,.gh-input,.gh-status-card,.gh-feature-card,.gh-summary-card,.gh-chart-container,.panel-body,.compose-left,.compose-right,.inbox-right,.inbox-left,.activity_box,.work-progres,.stats-info,.chrt-page-grids,.widget_1) { background:#05090c !important; background-image:none !important; color:#cbd5e1; border-color:rgba(148,163,184,.24) !important; }
body :is(.deposit-card h1,.withdraw-card h1,.form-title,.market-title) { background:none !important; color:#f8fafc !important; -webkit-text-fill-color:currentColor !important; }
body :is(.submit-btn,.continue-btn,.deposit-btn,.transaction-submit-btn,.promo-popup__cta,.gh-primary-btn) { background:linear-gradient(135deg,#05abce,#048fb0) !important; color:#fff !important; border-color:#05abce !important; }
body :is(.back-button,.nav-button,.history-tab,.gh-secondary-btn,.gh-history-row__summary,.settings-input) { background:#0e1217 !important; color:#cbd5e1 !important; border-color:rgba(148,163,184,.24) !important; }
body :is(.history-tab.active,.status-badge--success,.status-badge--info,.success-icon,.robot-icon,.pricing .advanced) { background:rgba(5,171,206,.12) !important; color:#05abce !important; }
body :is(.toast,.toast-notification,.inline-toast,.promo-popup,.success-modal) { background:#0e1217 !important; color:#cbd5e1; border-color:rgba(5,171,206,.36) !important; }
body :is(.loading-overlay,.modal-backdrop) { background:rgba(3,5,8,.8) !important; }
body .wallet-qr { background:#fff !important; } /* Keep QR codes scannable. */
/* Page-specific surfaces used across the dashboard and admin modules. */
body :is(.no-data-card,.glass-panel,.account-shell,.widget1,.kycv2-upload-card,.broker-card,.section-card,.price-card,.transactions-card,.transaction-reject-card,.deposit-panel,.withdraw-panel,.history-card__panel,.market-panel,.chart-panel,.glass-surface,.promo-card,.kyc-admin-card,.kyc-reject-card,.user-management-card,.promo-expired-card,.search-result-card,.payments-card,.codes-card,.history-card,.info-card,.kycv2-shell,.kycv2-steps-card,.user-status-card,.add-card,.ai-analysis-panel,.ai-panel-body,.analysis-upgrade-modal__card,.purchases-card) { background:#05090c !important; background-image:none !important; border-color:rgba(148,163,184,.24) !important; color:#cbd5e1; }
body :is(.ai-panel-tab,.history-card__tabs,.price-card__header,.promo-card__header,.search-result-card__header,.history-card__header,.purchases-card__header) { background:#0e1217 !important; color:#f8fafc; border-color:rgba(148,163,184,.24) !important; }
body :is(.ai-panel-tab.active,.ai-panel-tab[aria-selected="true"]) { background:rgba(5,171,206,.12) !important; color:#05abce !important; }

/* Site-wide brand color for requested headings and icons. */
html body :is(h2, h3, i) {
 color:#05BBEE !important;
 -webkit-text-fill-color:#05BBEE !important;
}

/* Make legacy and modern account screens adapt safely at every viewport size. */
html { width:100%; max-width:100%; overflow-x:hidden; }
body { width:100%; max-width:100%; min-width:0; overflow-x:hidden; }
body *, body *::before, body *::after { box-sizing:border-box; }
body :is(img,svg,video,canvas,iframe) { max-width:100%; }
body img { height:auto; }
body .background-orbs {
 width:100vw;
 max-width:100%;
 overflow:hidden !important;
 contain:paint;
}
body .optimization-container { overflow:hidden; }
body :is(.container,.container-fluid,.row,[class*="col-"]) { min-width:0; }
body :is(.table-responsive,.table-scroll,.dataTables_wrapper,.glass-table-wrapper) {
 max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch;
}
body :is(input,select,textarea,button,.form-control,.form-select) { max-width:100%; }
body :is(.modal-dialog,.popover,.dropdown-menu) { max-width:calc(100vw - 24px); }
body :is(h1,h2,h3,h4,h5,h6,p,td,th,label,legend,.card-title) { overflow-wrap:anywhere; }

/* Dashboard's inline Auto Trading card follows the same automatic palette. */
body .auto-trading-switch-card__title,
body .auto-trading-switch-card__title span { color:#f8fafc !important; }

@media (max-width:767.98px) {
 body .background-orbs .orb {
  width:min(420px,80vw) !important;
  height:min(420px,80vw) !important;
  left:50% !important;
  right:auto !important;
  transform:translateX(-50%) !important;
  animation:none !important;
 }
 body :is(.container,.container-fluid,.page-content,.main-content,.content-wrapper,.dashboard-main,.gh-page) {
  width:100%; max-width:100%; margin-left:0; margin-right:0;
 }
 body :is(.container,.container-fluid,.page-content,.main-content,.content-wrapper,.dashboard-main,.gh-page) {
  padding-left:max(12px,env(safe-area-inset-left));
  padding-right:max(12px,env(safe-area-inset-right));
 }
 body :is(.card,.panel,.well,.glass-card,.gh-card,.gh-panel) { max-width:100%; }
 body :is(.form-row,.form-group.row,.button-row,.action-row,.card-actions) { min-width:0; }
 body :is(.btn,button,input[type="submit"],input[type="button"]) { min-height:44px; }
 body .table-responsive > table,
 body .table-scroll > table,
 body .dataTables_wrapper table { width:max-content; min-width:100%; }
 body :is(.modal-dialog,.modal-content) { width:auto; margin-left:12px; margin-right:12px; }
}

/* Tradestone's native app uses this same automatic, OS-driven light palette. */
@media (prefers-color-scheme: light) {
 :root, body {
  --color-bg:#F3FCFE; --color-bg-secondary:#EAFBFF;
  --color-surface:#FFFFFF; --color-surface-medium:#F5FBFC; --color-surface-strong:#EAFBFF;
  --color-glass:#FFFFFF; --color-glass-strong:#F5FBFC;
  --color-stroke:#CDEFF5; --color-stroke-strong:#9EDFEA;
  --color-primary:#05ABCE; --color-primary-strong:#048FB0; --color-primary-soft:rgba(5,171,206,.10);
  --color-accent:#05ABCE; --color-text:#0B1220; --color-text-secondary:#465568; --color-text-tertiary:#5F6B7A;
  --gradient-hero:radial-gradient(900px 420px at 76% -8%,rgba(5,171,206,.12),transparent 62%),linear-gradient(#F3FCFE,#FFFFFF);
  --gradient-glass:linear-gradient(#FFFFFF,#FFFFFF); --gradient-glass-hover:linear-gradient(#F5FBFC,#F5FBFC);
  --glass-border:1px solid #CDEFF5; --glass-shadow:0 14px 30px rgba(8,49,60,.10); --glass-shadow-strong:0 28px 80px rgba(8,49,60,.14);
  --bs-body-bg:#F3FCFE; --bs-body-color:#465568; --bs-emphasis-color:#0B1220; --bs-secondary-color:#5F6B7A;
  --bs-primary:#05ABCE; --bs-primary-rgb:5,171,206; --bs-link-color:#048FB0; --bs-link-hover-color:#036F8A;
  --bs-border-color:#CDEFF5; --bs-tertiary-bg:#EAFBFF;
  --glass-bg:#FFFFFF; --accent:#05ABCE; --accent-strong:#048FB0; --text-primary:#0B1220; --text-muted:#5F6B7A;
  --input-bg:#FFFFFF; --input-border:#B9E6EE; --input-focus:#05ABCE; --success:#048FB0;
 }
 html, html body { background:#F3FCFE !important; color:#465568 !important; }
 body::before { background:var(--gradient-hero) !important; }
 body :is(h1,h2,h3,h4,h5,h6,label,legend,th,.page-title,.card-title,.modal-title,.auth-card__title) { color:#0B1220 !important; }
 body :is(p,dt,dd,.text-secondary,.text-gray-300,.help-block,.form-text) { color:#465568; }
 body :is(.text-muted,small,.text-gray-400,.text-gray-500) { color:#5F6B7A !important; }
 body :is(a,.text-primary,.text-info) { color:#048FB0; }
 body a:hover { color:#036F8A; }
 body :is(.main-content,.page-wrapper,.page-content,.main-panel,.content-wrapper,.dashboard-main,.gh-page,#page-wrapper,.sticky-header) { background:#F3FCFE !important; color:#465568; }
 body :is(.card,.panel,.well,.modal-content,.dropdown-menu,.popover,.auth-card,.glass-card,.metric-card,.metric-card-small,.stat-card,.stats-card,.summary-card,.balance-card,.account-card,.pricing-card,.payment-card,.transaction-card,.settings-card,.table-responsive,.widget,.widget-body,.widget-shadow,.agile-grids,.tables,.form-body,.form-grids,.inbox-page,.gh-card,.gh-panel,.ai-insights,.regime-indicator,.action-btn,.telemetry-card) {
  background:#FFFFFF !important; background-image:none !important; border-color:#CDEFF5 !important; color:#465568; box-shadow:0 14px 30px rgba(8,49,60,.10);
 }
 body :is(header,.header,.header-section,.dashboard-header,.navbar,.sidebar,.sidebar-menu,.sidebar-left,.sidebar-mobile,.left-side,.main-sidebar,.nav-menu-panel,.nav-modal-content,.topbar,.top-nav,.sidebar-nav) { background:#FFFFFF !important; border-color:#CDEFF5 !important; color:#0B1220; }
 body :is(.sidebar,.sidebar-menu,.sidebar-nav,.navbar,.nav-menu-panel,.dropdown-menu) a { color:#465568; }
 body :is(.card-header,.card-footer,.panel-heading,.panel-footer,.modal-header,.modal-footer,.input-group-text,.breadcrumb,.list-group-item,.accordion-item,.accordion-button,.pagination a,.page-link) { background:#F5FBFC !important; color:#465568 !important; border-color:#CDEFF5 !important; }
 body :is(.form-control,.form-select,.auth-input,textarea,select,input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="color"]):not([type="hidden"])) { background:#FFFFFF !important; color:#0B1220 !important; border-color:#B9E6EE !important; }
 body :is(input,textarea)::placeholder { color:#758194 !important; }
 body :is(input,select,textarea):disabled, body input[readonly] { background:#EAFBFF !important; color:#5F6B7A !important; }
 body :is(.btn-default,.btn-secondary,.btn-light,.btn-outline-primary,.btn-outline-light,.btn-outline-info,.btn-outline-success) { background:#FFFFFF !important; color:#048FB0 !important; border-color:#9EDFEA !important; }
 body :is(.table,table) { --bs-table-bg:#FFFFFF; --bs-table-color:#465568; --bs-table-striped-bg:#F5FBFC; --bs-table-striped-color:#465568; --bs-table-hover-bg:#EAFBFF; --bs-table-hover-color:#0B1220; background:#FFFFFF !important; color:#465568 !important; }
 body :is(th,td) { border-color:#CDEFF5 !important; }
 body :is(thead,thead th) { background:#EAFBFF !important; color:#0B1220 !important; }
 body :is(tbody tr,tbody td) { color:#465568; }
 body .table-striped tbody tr:nth-of-type(odd) { background:#F5FBFC !important; }
 body tbody tr:hover { background:#EAFBFF !important; }
 body :is(.bg-white,.bg-light) { background-color:#FFFFFF !important; }
 body :is(.bg-black,.bg-dark) { background-color:#EAFBFF !important; }
 body :is(.text-dark,.text-black) { color:#0B1220 !important; }
 body :is(footer,.footer,.copyright,.footer-meta) { background:#F3FCFE !important; color:#5F6B7A !important; border-color:#CDEFF5 !important; }
 body :is(.select2-dropdown,.select2-selection,.select2-results,.iti__country-list,.datepicker,.dataTables_wrapper) { background:#FFFFFF !important; color:#465568 !important; border-color:#CDEFF5 !important; }
 body :is(.deposit-card,.withdraw-card,.wallet-item,.wallet-frame,.wallet-timer,.amount-display,.glass-table-wrapper,.glass-frame,.pricing .box,.pricing .btn-wrap,.hero-stat,.success-content,.promo-popup__card,.gh-history-row,.gh-history-detail,.gh-select,.gh-input,.gh-status-card,.gh-feature-card,.gh-summary-card,.gh-chart-container,.panel-body,.compose-left,.compose-right,.inbox-right,.inbox-left,.activity_box,.work-progres,.stats-info,.chrt-page-grids,.widget_1,.no-data-card,.glass-panel,.account-shell,.widget1,.kycv2-upload-card,.broker-card,.section-card,.price-card,.transactions-card,.transaction-reject-card,.deposit-panel,.withdraw-panel,.history-card__panel,.market-panel,.chart-panel,.glass-surface,.promo-card,.kyc-admin-card,.kyc-reject-card,.user-management-card,.promo-expired-card,.search-result-card,.payments-card,.codes-card,.history-card,.info-card,.kycv2-shell,.kycv2-steps-card,.user-status-card,.add-card,.ai-analysis-panel,.ai-panel-body,.analysis-upgrade-modal__card,.purchases-card) { background:#FFFFFF !important; background-image:none !important; color:#465568; border-color:#CDEFF5 !important; }
 body :is(.ai-panel-tab,.history-card__tabs,.price-card__header,.promo-card__header,.search-result-card__header,.history-card__header,.purchases-card__header,.back-button,.nav-button,.history-tab,.gh-secondary-btn,.gh-history-row__summary,.settings-input) { background:#F5FBFC !important; color:#465568 !important; border-color:#CDEFF5 !important; }
 body :is(.toast,.toast-notification,.inline-toast,.promo-popup,.success-modal) { background:#FFFFFF !important; color:#465568; border-color:#9EDFEA !important; }
 body :is(.loading-overlay,.modal-backdrop) { background:rgba(11,18,32,.48) !important; }
 body .auto-trading-switch-card { background:#FFFFFF !important; background-image:none !important; color:#0B1220 !important; border-color:#CDEFF5 !important; box-shadow:0 12px 30px rgba(8,49,60,.09) !important; }
 body .auto-trading-switch-card__title,
 body .auto-trading-switch-card__title span { color:#0B1220 !important; }
 body .auto-trading-switch input:not(:checked) + .auto-trading-switch__track { background:#DDEFF3; border-color:#9EDFEA; box-shadow:inset 0 0 12px rgba(8,49,60,.08); }
}

/* Phone dashboard hierarchy: cards rest directly on the page canvas. */
@media (max-width:991.98px) {
 body:is(.dashboard-whitelisted,.dashboard-standard),
 body:is(.dashboard-whitelisted,.dashboard-standard) .dashboard-main:not(#page-wrapper) {
  background:#040D14 !important;
  background-image:none !important;
 }
 body:is(.dashboard-whitelisted,.dashboard-standard) .sidebar-mobile {
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
 }
 body:is(.dashboard-whitelisted,.dashboard-standard) :is(
  .metrics-grid .metric-card-small,
  .sidebar-mobile .account-switcher,
  .sidebar-mobile .ai-insights,
  .sidebar-mobile .action-btn
 ) {
  background:#05080A !important;
  background-image:none !important;
  border-color:rgba(148,163,184,.24) !important;
  box-shadow:0 14px 30px rgba(0,0,0,.28) !important;
 }
}

@media (max-width:991.98px) and (prefers-color-scheme:light) {
 body:is(.dashboard-whitelisted,.dashboard-standard),
 body:is(.dashboard-whitelisted,.dashboard-standard) .dashboard-main:not(#page-wrapper) {
  background:#E1EFF2 !important;
 }
 body:is(.dashboard-whitelisted,.dashboard-standard) :is(
  .metrics-grid .metric-card-small,
  .sidebar-mobile .account-switcher,
  .sidebar-mobile .ai-insights,
  .sidebar-mobile .action-btn
 ) {
  background:#F8F9F9 !important;
  border-color:#CDEFF5 !important;
  box-shadow:0 14px 30px rgba(8,49,60,.10) !important;
 }
}

/* Admin dialogs use the same compact footprint as the dashboard payment
   reminder. Keep the page visible and sharp behind a simple dim overlay. */
html.gh-admin-interface body .modal:not(#mobileNavModal) .modal-dialog {
 width:min(520px,calc(100vw - 24px)) !important;
 max-width:520px !important;
 margin-left:auto !important;
 margin-right:auto !important;
}
html.gh-admin-interface body .modal:not(#mobileNavModal),
html.gh-admin-interface body .modal-backdrop {
 backdrop-filter:none !important;
 -webkit-backdrop-filter:none !important;
}

/* Keep the Connected Accounts heading and plan badge together at every width. */
body .account-switcher .account-switcher-title {
 display:flex;
 flex-wrap:nowrap !important;
 min-width:0;
 gap:.5rem !important;
}
body .account-switcher .account-switcher-title__label {
 flex:1 1 auto;
 min-width:0;
 white-space:nowrap;
}
body .account-switcher .account-switcher-title__status {
 flex:0 0 auto;
 margin-left:auto !important;
 white-space:nowrap;
}

@media (max-width:575.98px) {
 body .account-switcher .account-switcher-title { gap:.4rem !important; }
 body .account-switcher .account-switcher-title__label,
 body .ai-insights .recent-trades-title__label {
  gap:.35rem !important;
  font-size:clamp(.75rem,3.8vw,1.025rem);
  letter-spacing:-.015em;
 }
 body .account-switcher .account-switcher-title__label i,
 body .ai-insights .recent-trades-title__label i { font-size:inherit; }
 body .account-switcher .account-switcher-title__status {
  gap:.32rem;
  padding:.14rem .42rem;
  font-size:clamp(.62rem,2.8vw,.72rem);
 }
}

@media (prefers-color-scheme:light) {
 body:is(.dashboard-whitelisted,.dashboard-standard) .account-switcher .account-item-equity .dashboard-live-equity {
  color:#0B1320 !important;
  -webkit-text-fill-color:#0B1320 !important;
 }
}

/* Light-mode completion pass for user dashboard workflows. Dark declarations
   remain the source of truth outside this media query. */
@media (prefers-color-scheme:light) {
 body {
  --pill-bg:#FFFFFF;
  --pill-border:#CDEFF5;
  --frame-bg:#FFFFFF;
  --frame-border:#CDEFF5;
  --glow-primary:0 0 24px rgba(5,171,206,.12);
  --glow-accent:0 0 18px rgba(5,171,206,.1);
 }

 body :is(
  .deposit-security,
  .deposit-summary__details,
  .optimization-container,
  .optimization-subtitle,
  .setting-item,
  .vps-panel,
  .transactions-hero,
  .purchases-hero,
  .hero-stat,
  .no-history,
  .empty-state,
  .reject-card,
  .progress-container
 ) {
  background:#FFFFFF !important;
  background-image:none !important;
  border-color:#CDEFF5 !important;
  color:#465568 !important;
  box-shadow:0 14px 30px rgba(8,49,60,.1) !important;
 }

 body :is(.optimization-container,.transactions-hero,.purchases-hero) {
  border-color:#CDEFF5 !important;
 }

 body :is(.optimization-subtitle,.history-card__tabs,.reference-code,.deposit-summary__details,.no-history,.empty-state) {
  background:#F5FBFC !important;
 }

 body :is(
  .deposit-header__subtitle,
  .deposit-card__subtitle,
  .deposit-security__copy,
  .deposit-summary__row,
  .deposit-summary__meta,
  .deposit-summary__redirect,
  .optimization-subtitle,
  .setting-description,
  .transactions-hero p,
  .purchases-hero p,
  .hero-stat span,
  .history-card__meta,
  .purchases-card__meta,
  .user-cell span,
  .item-cell span,
  .no-history,
  .empty-state
 ) { color:#465568 !important; }

 body :is(
  .deposit-security__title,
  .deposit-security__shield,
  .deposit-summary__meta i,
  .eyebrow,
  .reference-code
 ) {
  color:#048FB0 !important;
  -webkit-text-fill-color:#048FB0 !important;
 }

 body :is(
  .deposit-summary__row strong,
  .setting-title,
  .status-text,
  .transactions-hero h1,
  .purchases-hero h1,
  .history-table td,
  .history-table th,
  .history-card h2,
  .purchases-card h2
 ) {
  color:#0B1220 !important;
  -webkit-text-fill-color:#0B1220 !important;
 }

 body .form-title {
  background:none !important;
  color:#0B1220 !important;
  -webkit-text-fill-color:#0B1220 !important;
  text-shadow:none !important;
 }

 body .deposit-amount-field__prefix,
 body .deposit-amount-field__currency { color:#5F6B7A !important; }

 body .deposit-quick-option:not(.is-selected) {
  background:#F5FBFC !important;
  border-color:#CDEFF5 !important;
  color:#0B1220 !important;
  box-shadow:none !important;
 }

 body .deposit-quick-option:not(.is-selected):is(:hover,:focus-visible) {
  background:#EAFBFF !important;
  border-color:#9EDFEA !important;
  color:#048FB0 !important;
 }

 body .history-tab { color:#465568 !important; }
 body .history-tab:is(:hover,:focus-visible) { color:#048FB0 !important; }
 body .history-tab--active {
  background:#EAFBFF !important;
  color:#048FB0 !important;
  box-shadow:inset 0 0 0 1px #9EDFEA !important;
 }

 body .history-table :is(th,td),
 body .history-table tbody tr { border-color:#CDEFF5 !important; }

 body .reference-code {
  background:#EAFBFF !important;
  border-color:#CDEFF5 !important;
 }

 body .transactions-pagination .page-link {
  background:#FFFFFF !important;
  border-color:#9EDFEA !important;
  color:#048FB0 !important;
 }

 body .transactions-pagination .page-link:is(:hover,:focus),
 body .transactions-pagination .page-item.active .page-link {
  background:#EAFBFF !important;
  color:#036F8A !important;
  border-color:#05ABCE !important;
 }

 body .transactions-pagination .page-item.disabled .page-link {
  background:#F5FBFC !important;
  color:#5F6B7A !important;
 }

 body :is(.glass-frame,.setting-item,.vps-panel):hover {
  border-color:#9EDFEA !important;
  box-shadow:0 18px 42px rgba(8,49,60,.12) !important;
 }
}
