/* Final YHpay admin consistency layer. Loaded after feature modules. */
html,body,.app-shell,.main,.content{background:#f3f7fd!important;color:#10233f!important}
.mobile-page-picker{display:none}
.payout-receipt-reference,.admin-review-note{margin-top:7px;padding:8px 10px;border:1px solid #c9dff4;border-radius:9px;background:#f4f9ff;color:#173f68;overflow-wrap:anywhere}
.payout-receipt-reference span,.admin-review-note span{display:block;margin-bottom:3px;color:#67809a;font-size:11px;font-weight:750}
.payout-receipt-reference b{color:#075fb7;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

.panel,.stat,.table-wrap,.modal-card,.modal-content,.detail-modal,.admin-modal-card,
.yh-card-admin-panel,.yh-card-detail-hero,.yh-card-detail-type,.yh-card-kyc-panel,
.yh-card-kyc-image-box,.yh-card-review-admin-panel,.yh-payment-admin-shell,
.yh-payment-inner-panel,.yh-payment-status-row,.yh-payment-flow-example,
.yh-payment-biller-mini,.yh-payment-editor-card,.yh-payment-switch-row,
.yh-ad-card,.yh-ad-perm,.yh-svc-card,.yh-svc-stat,
.yh-usdt-kpi,.yh-usdt-detail-box,.yh-usdt-chain-value,.yh-usdt-readonly{
  background:#fff!important;
  background-image:none!important;
  color:#10233f!important;
  border-color:#d5e4f3!important;
  box-shadow:0 8px 24px rgba(38,82,126,.07)!important;
}

.panel h2,.panel-head h2,.modal-card h2,.admin-modal-card h2,
.yh-card-admin-header h2,.yh-card-detail-hero h2,.yh-card-detail-type strong,
.yh-payment-admin-header h2,.yh-ad-title h2,.yh-ad-card h3,
.yh-svc-head h2,.yh-svc-card h3,.yh-usdt-command-head h2{
  color:#1268ca!important;
  -webkit-text-fill-color:#1268ca!important;
}

.yh-card-small,.yh-card-detail-kicker,.yh-payment-admin-note,
.yh-payment-flow-example span,.yh-payment-biller-mini span,
.yh-ad-muted,.yh-ad-field label,.yh-svc-label,.yh-svc-muted,
.yh-usdt-eyebrow,.yh-usdt-command-head p{color:#647e99!important}

.yh-ad-tabs button,.yh-ad-btn,.yh-svc-btn,.yh-payment-tab,.action-btn,.btn.ghost{
  background:#f2f8ff!important;
  background-image:none!important;
  color:#0b63be!important;
  -webkit-text-fill-color:#0b63be!important;
  border-color:#bcd7f3!important;
}
.yh-ad-tabs button.active,.yh-ad-btn.gold,.yh-svc-btn.gold,.yh-payment-tab.active,
.btn.primary{
  background:#1677ff!important;
  background-image:linear-gradient(135deg,#1677ff,#0865d8)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border-color:#1677ff!important;
}

.admin-modal-overlay,.modal-overlay,.yh-payment-editor-overlay,.yh-usdt-modal{
  background:rgba(16,55,96,.46)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

/* Neutralize old inline black/gold blocks, including gradients not covered by the old theme. */
#content [style*="background:#07"],#content [style*="background:#08"],
#content [style*="background:#09"],#content [style*="background:#0a"],
#content [style*="background:#0b"],#content [style*="background:#0c"],
#content [style*="background:#0d"],#content [style*="background:#11"],
#content [style*="background:#15"],#content [style*="background:#16"],
#content [style*="background:#17"],#content [style*="linear-gradient(145deg,#1"]{
  background:#fff!important;
  background-image:none!important;
  color:#142a45!important;
  -webkit-text-fill-color:#142a45!important;
  border-color:#cbddef!important;
}
#content [style*="color:#e4"],#content [style*="color:#e8"],
#content [style*="color:#f4"],#content [style*="color:#f5"]{
  color:#1268ca!important;
  -webkit-text-fill-color:#1268ca!important;
}

@media(max-width:760px){
  body{min-width:0!important}
  .app-shell{display:block!important;min-width:0!important}
  .sidebar{
    display:block!important;position:sticky!important;top:0!important;z-index:80!important;
    width:100%!important;height:auto!important;padding:8px 10px!important;
    overflow:hidden!important;border:0!important;border-bottom:1px solid #dbe6f2!important;
    background:rgba(255,255,255,.97)!important;box-shadow:0 5px 18px rgba(30,73,116,.09)!important;
  }
  .side-brand,.side-footer{display:none!important}
  #sideNav{
    display:flex!important;gap:7px!important;width:100%!important;overflow-x:auto!important;
    padding:1px 0 5px!important;scroll-snap-type:x proximity!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;
  }
  #sideNav::-webkit-scrollbar{display:none!important}
  #sideNav button{
    flex:0 0 auto!important;height:38px!important;padding:0 13px!important;
    white-space:nowrap!important;scroll-snap-align:start!important;border-radius:10px!important;
    background:#f4f8fd!important;color:#526a84!important;border:1px solid #d6e5f4!important;
  }
  #sideNav button.active{background:#1677ff!important;color:#fff!important;border-color:#1677ff!important}
  .topbar{
    position:sticky!important;top:55px!important;z-index:70!important;min-height:0!important;
    padding:12px 14px!important;gap:8px!important;background:rgba(255,255,255,.96)!important;
  }
  .topbar h1{font-size:20px!important}.topbar p{font-size:11px!important}
  .mobile-page-picker{
    display:block!important;width:100%!important;margin:2px 0 0!important;
    color:#315474!important;font-size:12px!important;font-weight:800!important;
  }
  .mobile-page-picker span{display:block!important;margin-bottom:6px!important}
  .mobile-page-picker select{
    display:block!important;width:100%!important;height:44px!important;padding:0 38px 0 12px!important;
    border:1px solid #aecdee!important;border-radius:11px!important;background:#f4f9ff!important;
    color:#075fb7!important;font-size:15px!important;font-weight:800!important;
  }
  .top-actions{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;justify-content:flex-start!important}
  .top-actions>*{flex:0 0 auto!important}
  .content{padding:12px!important;min-width:0!important}
  .panel,.stat{border-radius:14px!important;padding:14px!important}
  .panel-head{align-items:flex-start!important;flex-direction:column!important}
  .toolbar{width:100%!important;display:grid!important;grid-template-columns:1fr!important}
  .toolbar input,.toolbar select,.toolbar button{width:100%!important;min-width:0!important}
  .table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .modal-overlay,.admin-modal-overlay,.yh-payment-editor-overlay,.yh-usdt-modal{padding:10px!important;align-items:flex-start!important;overflow-y:auto!important}
  .modal-card,.admin-modal-card,.yh-payment-editor-card,.yh-usdt-modal-card{
    width:100%!important;max-width:100%!important;max-height:none!important;margin:10px 0!important;
    padding:16px!important;border-radius:16px!important;overflow-x:hidden!important;
  }
  .yh-card-admin-stats,.yh-payment-admin-stats,.yh-payment-overview-grid,
  .yh-card-detail-grid,.yh-card-kyc-images,.yh-payment-editor-status-grid,
  .fee-settings-grid{grid-template-columns:1fr!important}
  .toast{left:12px!important;right:12px!important;bottom:12px!important;max-width:none!important}

  /* Mobile theme guard: feature modules inject their own legacy black/gold CSS
     after page load, so keep every admin surface in the current blue/white system. */
  #appView #content .yh-ad-wrap,#appView #content .yh-svc-wrap{color:#142a45!important}
  #appView #content .yh-ad-badge,#appView #content .yh-usdt-live-pill,
  #appView #content .yh-usdt-hash-chip,#appView #content .yh-usdt-readonly,
  #appView #content .fee-setting-card,#appView #content .fee-setting-note,
  #appView #content .rate-report-grid>*{
    background:#f4f9ff!important;background-image:none!important;color:#174f8f!important;
    -webkit-text-fill-color:#174f8f!important;border-color:#c7dcef!important;
    box-shadow:none!important;
  }
  #appView #content .yh-ad-field input,#appView #content .yh-ad-field select,
  #appView #content .yh-ad-field textarea,#appView #content .yh-svc-field input,
  #appView #content .yh-svc-field select,#appView #content .yh-svc-field textarea,
  #appView #content .fee-setting-input input,#appView #content .fee-setting-note textarea,
  #appView #content .yh-payment-editor-card input,#appView #content .yh-payment-editor-card select,
  #appView #content .yh-payment-editor-card textarea,
  #appView #content .admin-modal-card input,#appView #content .admin-modal-card select,
  #appView #content .admin-modal-card textarea{
    width:100%!important;box-sizing:border-box!important;background:#fff!important;
    background-image:none!important;color:#142a45!important;-webkit-text-fill-color:#142a45!important;
    border:1px solid #aecdee!important;border-radius:10px!important;
  }
  #appView #content input::placeholder,#appView #content textarea::placeholder{color:#8aa0b6!important}
  #appView #content .yh-ad-table,#appView #content .yh-svc-table,
  #appView #content .yh-usdt-table{background:#fff!important;color:#142a45!important}
  #appView #content .yh-ad-table th,#appView #content .yh-svc-table th,
  #appView #content .yh-usdt-table th{
    background:#eef5ff!important;color:#385a7d!important;-webkit-text-fill-color:#385a7d!important;
    border-color:#d9e6f3!important;
  }
  #appView #content .yh-ad-table td,#appView #content .yh-svc-table td,
  #appView #content .yh-usdt-table td{background:#fff!important;color:#142a45!important;border-color:#e1eaf4!important}
  #appView #content .yh-ad-title h2,#appView #content .yh-svc-head h2,
  #appView #content .yh-svc-section h3,#appView #content .yh-usdt-detail-section h3,
  #appView #content .fee-setting-card label,#appView #content .fee-setting-note label{
    color:#1268ca!important;-webkit-text-fill-color:#1268ca!important;
  }
  #appView #content .yh-ad-muted,#appView #content .yh-ad-field label,
  #appView #content .yh-svc-sub,#appView #content .yh-svc-muted,
  #appView #content .yh-svc-field label,#appView #content .yh-usdt-detail-sub,
  #appView #content .yh-usdt-kpi span,#appView #content .yh-usdt-kpi small,
  #appView #content .fee-setting-card small{color:#647e99!important;-webkit-text-fill-color:#647e99!important}
  #appView #content .yh-svc-stat,#appView #content .yh-usdt-kpi strong,
  #appView #content .yh-usdt-order-no,#appView #content .yh-usdt-gold{
    color:#0b63ce!important;-webkit-text-fill-color:#0b63ce!important;
  }
  #appView #content .yh-ad-btn.danger{background:#fff4f4!important;color:#c43d3d!important;border-color:#f0b9b9!important}
  #appView #content .yh-ad-ok,#appView #content .yh-svc-ok{color:#07866e!important}
  #appView #content .yh-ad-warn,#appView #content .yh-svc-warn{color:#9a6500!important}
  #appView #content .yh-ad-err{color:#bd3e3e!important}

  #appView #content [style*="background:#07"],#appView #content [style*="background: #07"],
  #appView #content [style*="background:#08"],#appView #content [style*="background: #08"],
  #appView #content [style*="background:#09"],#appView #content [style*="background: #09"],
  #appView #content [style*="background:#0a"],#appView #content [style*="background: #0a"],
  #appView #content [style*="background:#0b"],#appView #content [style*="background: #0b"],
  #appView #content [style*="background:#0c"],#appView #content [style*="background: #0c"],
  #appView #content [style*="background:#11"],#appView #content [style*="background: #11"],
  #appView #content [style*="background:#15"],#appView #content [style*="background: #15"],
  #appView #content [style*="background:#16"],#appView #content [style*="background: #16"],
  #appView #content [style*="background:#17"],#appView #content [style*="background: #17"]{
    background:#fff!important;background-image:none!important;color:#142a45!important;
    -webkit-text-fill-color:#142a45!important;border-color:#cbddef!important;
  }
  #appView #content [style*="color:#e4"],#appView #content [style*="color: #e4"],
  #appView #content [style*="color:#e7"],#appView #content [style*="color: #e7"],
  #appView #content [style*="color:#e8"],#appView #content [style*="color: #e8"],
  #appView #content [style*="color:#f2"],#appView #content [style*="color: #f2"],
  #appView #content [style*="color:#f4"],#appView #content [style*="color: #f4"],
  #appView #content [style*="color:#f5"],#appView #content [style*="color: #f5"]{
    color:#1268ca!important;-webkit-text-fill-color:#1268ca!important;
  }

  #appView #content .yh-ad-grid,#appView #content .yh-svc-form,
  #appView #content .yh-usdt-kpi-grid,#appView #content .yh-usdt-credit-grid,
  #appView #content .rate-report-grid{grid-template-columns:1fr!important}
  #appView #content .yh-ad-title,#appView #content .yh-svc-head,
  #appView #content .yh-usdt-command-head{align-items:flex-start!important;flex-direction:column!important}
  #appView #content .yh-ad-actions,#appView #content .fee-settings-actions{width:100%!important}
  #appView #content .yh-ad-actions button,#appView #content .fee-settings-actions button{min-height:42px!important}
}
