/* Cashback Pro V36.8.54 — visible bank status, white withdrawal refresh,
   tactile Admin/customer actions and customer creation as a modal. */

/* Light-mode bank badges: use dark ink on pale tinted surfaces. Retain their
   status colors (green/yellow/red), but avoid low contrast pastel-on-pastel. */
html body.theme-default.default-light-mode .bank-status.verified,
html body.default-light-mode .bank-status.verified {
  color: #087047 !important;
  background: rgba(11, 153, 96, .16) !important;
  border: 1px solid rgba(12, 139, 88, .40) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html body.theme-default.default-light-mode .bank-status.pending,
html body.default-light-mode .bank-status.pending {
  color: #855000 !important;
  background: rgba(233, 163, 38, .21) !important;
  border: 1px solid rgba(172, 110, 8, .38) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html body.theme-default.default-light-mode .bank-status.incorrect,
html body.default-light-mode .bank-status.incorrect {
  color: #a12a40 !important;
  background: rgba(211, 75, 91, .16) !important;
  border: 1px solid rgba(182, 51, 72, .38) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html body.theme-default.default-light-mode #admin-bank-accounts-body .bank-status,
html body.default-light-mode #admin-bank-accounts-body .bank-status,
html body.theme-default.default-light-mode #customer-bank-list .bank-status,
html body.default-light-mode #customer-bank-list .bank-status {
  font-weight: 800 !important;
  opacity: 1 !important;
}
/* Transaction states in the same light theme: readable completed/cancelled chips. */
html body.default-light-mode .customer-withdrawals-list .withdrawal-state.paid {
  color: #087047 !important; background: rgba(11,153,96,.15) !important;
}
html body.default-light-mode .customer-withdrawals-list .withdrawal-state.pending {
  color: #855000 !important; background: rgba(233,163,38,.19) !important;
}
html body.default-light-mode .customer-withdrawals-list .withdrawal-state.rejected,
html body.default-light-mode .customer-withdrawals-list .withdrawal-state.cancelled {
  color: #8e2d43 !important; background: rgba(211,75,91,.14) !important;
}

/* Specifically the history refresh button, not the large blue withdraw CTA.
   Keep the existing click handler and tactile response. */
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh:hover:not(:active) {
  background: #fff !important;
  background-image: none !important;
  color: #21344e !important;
  border: 1px solid rgba(125,146,182,.42) !important;
  box-shadow: 0 3px 12px rgba(30,54,94,.12) !important;
  -webkit-tap-highlight-color: transparent;
}

/* Shared touch + keyboard feedback for the specific requested actions. */
html body #admin-users-refresh,
html body #admin-add-customer-button,
html body #customer-bank-edit-toggle,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh,
html body #admin-create-user-card .cb-v54-create-submit,
html body #admin-create-user-card .cb-v54-modal-close {
  cursor: pointer !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, box-shadow .16s ease, filter .16s ease,
              border-color .16s ease, background-color .16s ease !important;
}
@media (hover:hover) and (pointer:fine) {
  html body #admin-users-refresh:hover,
  html body #admin-add-customer-button:hover,
  html body #customer-bank-edit-toggle:hover,
  html body #admin-create-user-card .cb-v54-create-submit:hover,
  html body #admin-create-user-card .cb-v54-modal-close:hover {
    filter: brightness(1.04) !important;
    box-shadow: 0 6px 16px rgba(52,82,132,.20) !important;
    transform: translateY(-1px) !important;
  }
}
html body #admin-users-refresh:active,
html body #admin-users-refresh.cb-v54-pressed,
html body #admin-add-customer-button:active,
html body #admin-add-customer-button.cb-v54-pressed,
html body #customer-bank-edit-toggle:active,
html body #customer-bank-edit-toggle.cb-v54-pressed,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh:active,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh.cb-v54-pressed,
html body #admin-create-user-card .cb-v54-create-submit:active,
html body #admin-create-user-card .cb-v54-create-submit.cb-v54-pressed,
html body #admin-create-user-card .cb-v54-modal-close:active,
html body #admin-create-user-card .cb-v54-modal-close.cb-v54-pressed {
  transform: translateY(2px) scale(.975) !important;
  filter: brightness(.93) !important;
  box-shadow: inset 0 2px 6px rgba(25,37,65,.19) !important;
}
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh:active,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh.cb-v54-pressed {
  background: #e9f1ff !important;
  background-image: none !important;
  color: #1f3552 !important;
}
html body #admin-users-refresh:focus-visible,
html body #admin-add-customer-button:focus-visible,
html body #customer-bank-edit-toggle:focus-visible,
html body #tab-finance .customer-withdrawals-card .customer-withdrawals-refresh:focus-visible {
  outline: 2px solid #6393d9 !important;
  outline-offset: 3px !important;
}

/* The create-customer editor is a real dialog: it no longer occupies space
   below the add button in the customer table. */
html body .cb-v54-create-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 44500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: max(14px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom)) !important;
  background: rgba(6,13,34,.60) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  overflow: hidden !important;
}
html body .cb-v54-create-overlay.hidden,
html body .cb-v54-create-overlay[hidden] { display: none !important; }
html body .cb-v54-create-overlay > .cb-v54-create-card {
  position: relative !important;
  box-sizing: border-box !important;
  display: block !important;
  width: min(560px,calc(100vw - 24px)) !important;
  max-width: 100% !important;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: clamp(18px,4vw,27px) !important;
  border: 1px solid var(--border-color, rgba(144,170,211,.45)) !important;
  border-radius: 22px !important;
  background: var(--bg-surface,#f5f8ff) !important;
  color: var(--text-main,#21324a) !important;
  box-shadow: 0 28px 76px rgba(0,0,0,.36) !important;
  -webkit-overflow-scrolling: touch !important;
}
html body .cb-v54-create-card .cb-v54-create-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid var(--border-color,rgba(130,156,198,.35));
  padding-bottom: 15px;
}
html body .cb-v54-create-card .cb-v54-create-heading strong {
  display: inline-flex !important; align-items:center !important; gap:8px !important;
  flex: 1 1 auto !important; min-width: 0 !important;
  font-size: clamp(17px,4vw,21px) !important;
  color: var(--text-main,#21324a) !important;
  line-height: 1.35 !important;
}
html body .cb-v54-create-card .cb-v54-create-heading .ui-line-icon {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  display: block !important;
}
html body.default-light-mode .cb-v54-create-card input.form-control,
html body.default-light-mode .cb-v54-create-card select.form-control {
  background: rgba(255,255,255,.92) !important;
  color: #24364f !important;
  border: 1px solid rgba(137,156,191,.45) !important;
}
html body.default-light-mode .cb-v54-create-card input.form-control::placeholder {
  color: #7d8da5 !important;
}
html body .cb-v54-create-card .cb-v54-modal-close {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 82px !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
}
html body.theme-default.default-light-mode .cb-v54-create-overlay > .cb-v54-create-card,
html body.default-light-mode .cb-v54-create-overlay > .cb-v54-create-card {
  background: linear-gradient(145deg,#f8fbff,#eff4ff 58%,#f0edff) !important;
  border-color: rgba(125,151,191,.40) !important;
  box-shadow: 0 28px 76px rgba(27,46,85,.26) !important;
  color: #21344e !important;
}
html body.theme-default.default-light-mode .cb-v54-create-card .cb-v54-create-heading strong,
html body.default-light-mode .cb-v54-create-card .cb-v54-create-heading strong {
  color: #21344e !important;
}
html body .cb-v54-create-card input,
html body .cb-v54-create-card select { min-height: 48px; }
html body .cb-v54-create-card .cb-v54-create-submit { min-height: 46px; margin-top: 4px; }
body.cb-v54-customer-modal-open { overflow: hidden !important; overscroll-behavior: none !important; }
@media (max-width: 600px) {
  html body .cb-v54-create-overlay { align-items: center !important; padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)) !important; }
  html body .cb-v54-create-overlay > .cb-v54-create-card { width: 100% !important; max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important; }
  html body .cb-v54-create-card .cb-v54-create-heading strong { font-size: 17px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body #admin-users-refresh,html body #admin-add-customer-button,
  html body #customer-bank-edit-toggle,html body .customer-withdrawals-refresh,
  html body .cb-v54-create-card button { transition: none !important; }
}
