.wallet-page {
  min-height: 100vh;
  background: var(--bg);
}

.wallet-page-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 20px 0;
}

.wallet-page-back {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.wallet-page-back:hover {
  color: var(--mint);
}

.wallet-page-shell {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 26px 20px 70px;
}

.wallet-page-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(8, 13, 25, 0.84);
  box-shadow: 0 30px 70px -44px rgba(0, 0, 0, 0.95);
}

.wallet-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.wallet-page-head h1 {
  margin: 6px 0 6px;
  font-size: clamp(1.55rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.wallet-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.wallet-page-balance {
  flex: 0 0 auto;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(110, 243, 197, 0.22);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(110, 243, 197, 0.1), rgba(147, 197, 253, 0.04));
  text-align: right;
}

.wallet-page-balance span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.wallet-page-balance strong {
  display: block;
  margin-top: 4px;
  color: var(--mint);
  font-size: 1.35rem;
  line-height: 1.2;
}

.wallet-page-balance small {
  color: var(--muted);
  font-size: 9.5px;
}

.wallet-page-card .wallet-form {
  max-width: 540px;
}

.wallet-page-card .wallet-alert {
  margin-top: 12px;
}

.wallet-page-card .wallet-alert:first-of-type {
  margin-top: 0;
}

.wallet-page-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 11px;
  background: rgba(255, 209, 102, 0.07);
  color: #fde68a;
  font-size: 10.5px;
  line-height: 1.6;
}

.wallet-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.wallet-page-links a {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}

.wallet-page-links a:hover {
  color: var(--mint);
  border-color: rgba(110, 243, 197, 0.3);
}

.wallet-page-card .deposit-payment-scroll {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.wallet-page-card .wallet-history-list {
  max-height: none;
}

.wallet-history-source {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  font-size: 8.5px;
  font-weight: 700;
}

.wallet-page-card .deposit-actions {
  margin-top: 14px;
}

.wallet-account-list dd.deposit-bank-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.wallet-account-list dd.deposit-bank-value .bank-logo-tile {
  flex: 0 0 auto;
}

.deposit-reference-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed rgba(110, 243, 197, 0.45);
  border-radius: 14px;
  background: rgba(110, 243, 197, 0.07);
}

.deposit-reference-card > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
  min-width: 0;
}

.deposit-reference-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deposit-reference-card strong {
  color: var(--mint);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.deposit-reference-card small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.deposit-reference-card .wallet-copy-btn {
  flex: 0 0 auto;
}

.deposit-webhook-wait {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(110, 243, 197, 0.25);
  border-radius: 14px;
  background: rgba(110, 243, 197, 0.06);
}

.deposit-webhook-wait .action-spinner {
  flex: 0 0 auto;
}

.deposit-webhook-wait strong {
  display: block;
  font-size: 13px;
}

.deposit-webhook-wait p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.deposit-webhook-wait.is-error {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.06);
}

.deposit-webhook-wait.is-error .action-spinner {
  display: none;
}

@media (max-width: 620px) {
  .wallet-page-topbar {
    padding: 16px 14px 0;
  }

  .wallet-page-shell {
    padding: 20px 14px 50px;
  }

  .wallet-page-card {
    padding: 17px;
    border-radius: 19px;
  }

  .wallet-page-head {
    flex-direction: column;
    gap: 12px;
  }

  .wallet-page-balance {
    display: flex;
    align-items: baseline;
    gap: 5px;
    width: 100%;
    padding: 9px 12px;
    text-align: left;
  }

  .wallet-page-balance span {
    margin-right: auto;
    font-size: 10px;
  }

  .wallet-page-balance strong {
    margin: 0 0 0 auto;
    font-size: 1.25rem;
    line-height: 1.1;
  }

  .wallet-page-balance small {
    font-size: 10px;
  }

  .wallet-page-card input,
  .wallet-page-card select,
  .wallet-page-card textarea {
    font-size: 16px !important;
  }

  .wallet-page-card .deposit-actions {
    flex-direction: column-reverse;
  }

  .wallet-page-card .deposit-actions .btn {
    width: 100%;
  }
}
