.deposit-page {
  padding-bottom: 112px;
}

.deposit-shell {
  max-width: 1320px;
  min-width: 0;
}

.deposit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.deposit-heading-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.deposit-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 900;
}

.deposit-heading p {
  margin: 8px 0 0;
  color: #64748b;
}

.deposit-record-btn,
.deposit-back-btn,
.back-link,
.copy-btn,
.upload-preview button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font-weight: 800;
}

.deposit-back-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  background: #fff;
  color: #475569;
}

.deposit-record-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-color: #dbe5f3;
  background: #f8fbff;
  color: #334155;
  box-shadow: none;
}

.deposit-back-btn:hover,
.deposit-record-btn:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue-ink);
}

.deposit-back-btn svg,
.deposit-record-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.deposit-view {
  display: none;
}

.deposit-view.active {
  display: block;
}

.method-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.method-search {
  width: min(380px, 100%);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.method-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: #64748b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.method-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
}

.method-groups {
  display: grid;
  gap: 30px;
  padding-bottom: 24px;
}

.method-group h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.method-group .method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.method-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.method-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.method-icon,
.method-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 8px;
  background: var(--method-bg);
  color: var(--method-color);
  font-size: 11px;
  font-weight: 900;
}

.method-head strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.method-info {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  border: 1px solid #dbe5f3;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.method-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: 240px;
  max-width: min(240px, 70vw);
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.method-info:hover .method-tooltip,
.method-info:focus .method-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.method-meta {
  display: grid;
  gap: 7px;
  min-height: 66px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.method-meta b {
  color: #334155;
}

.regular-method-card {
  min-height: 156px;
}

.regular-method-card .method-head {
  min-height: 40px;
}

.regular-method-card .method-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 50%;
  font-size: 12px;
}

.regular-method-card .method-head strong {
  font-size: 18px;
}

.regular-method-meta {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.regular-method-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.method-availability-badge,
.availability-info-panel span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.method-availability-badge.open,
.availability-info-panel.open span {
  background: #dcfce7;
  color: #15803d;
}

.method-availability-badge.closed,
.availability-info-panel.closed span {
  background: #fff7ed;
  color: #c2410c;
}

.deposit-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(320px, 440px);
  align-items: start;
  gap: 26px;
}

.deposit-form-card,
.payment-info-card,
.complete-card,
.confirm-dialog {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.deposit-form-card {
  min-width: 0;
  padding: clamp(20px, 2.2vw, 30px);
}

.form-card-head {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.back-link {
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
}

.back-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.form-title-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.form-title-row h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.form-title-row p {
  margin: 6px 0 0;
  color: #64748b;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.form-field.full,
.rate-row.full {
  grid-column: 1 / -1;
}

.form-field > span {
  color: #334155;
  font-weight: 800;
}

.form-field em {
  color: #ef4444;
  font-style: normal;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  outline: 0;
}

.form-field input,
.form-field select {
  height: 48px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 118px;
  resize: vertical;
  padding: 13px 14px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue-ink);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field small {
  min-height: 16px;
  color: #64748b;
  font-size: 12px;
}

.form-field small.error {
  color: #dc2626;
}

.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix input {
  padding-right: 64px;
}

.input-suffix b {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-weight: 800;
  pointer-events: none;
}

.password-field input {
  padding-right: 52px;
}

.password-field button {
  position: absolute;
  right: 9px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
}

.password-field button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.pay-currency-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pay-currency {
  min-height: 38px;
  min-width: 70px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-weight: 900;
}

.pay-currency.active {
  border-color: var(--blue-ink);
  background: var(--blue-ink);
  color: #fff;
}

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.rate-row b {
  color: #0f172a;
}

.upload-box {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #b8c7dc;
  border-radius: 8px;
  background: #fbfdff;
  color: #64748b;
  text-align: center;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-box svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--blue-ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.upload-box strong {
  color: #0f172a;
  font-weight: 900;
}

.upload-box span {
  font-size: 12px;
}

.upload-preview {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.upload-preview[hidden] {
  display: none;
}

.upload-preview span {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview button {
  min-height: 30px;
  padding: 0 10px;
}

.pay-summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.pay-summary span {
  color: #64748b;
  font-weight: 800;
}

.pay-summary strong {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.pay-summary em {
  color: #64748b;
  font-size: 14px;
  font-style: normal;
}

.form-actions,
.complete-actions,
.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.form-actions .primary-action,
.form-actions .ghost-action,
.complete-actions .primary-action,
.complete-actions .ghost-action,
.confirm-actions .primary-action,
.confirm-actions .ghost-action {
  width: auto;
  min-width: 118px;
  margin-top: 0;
  padding: 0 18px;
}

.payment-info-card {
  position: sticky;
  top: calc(var(--app-chrome-height, 131px) + 22px);
  min-width: 0;
  padding: 26px;
}

.payment-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.payment-info-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
}

.payment-info-head span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.payment-info-list {
  display: grid;
  gap: 18px;
}

.info-item {
  display: grid;
  gap: 7px;
}

.info-label {
  color: #64748b;
  font-weight: 800;
}

.info-value-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.info-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.availability-info-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.availability-info-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.availability-info-panel strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.availability-info-panel small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.copy-btn {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 9px;
  color: var(--blue-ink);
  font-size: 12px;
}

.qr-card {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(#e2e8f0 1px, transparent 1px) 0 0 / 14px 14px,
    #f8fafc;
  color: #0f172a;
  font-weight: 900;
}

.complete-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 3vw, 42px);
  text-align: center;
}

.complete-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #059669;
}

.complete-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.complete-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.complete-card p {
  margin: 10px 0 26px;
  color: #64748b;
}

.complete-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  text-align: left;
}

.complete-details div {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
}

.complete-details dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.complete-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-weight: 900;
}

.status-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.complete-actions {
  justify-content: center;
}

.confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.confirm-mask[hidden],
.toast[hidden] {
  display: none;
}

.confirm-dialog {
  width: min(460px, 100%);
  padding: 24px;
}

.confirm-dialog h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 900;
}

.unavailable-dialog p {
  margin: -6px 0 18px;
  color: #64748b;
  line-height: 1.55;
}

.confirm-dialog dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.confirm-dialog dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf1f7;
}

.confirm-dialog dt {
  color: #64748b;
}

.confirm-dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-weight: 900;
  text-align: right;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .method-group .method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .deposit-form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .payment-info-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .deposit-page {
    padding-bottom: 92px;
  }

  .deposit-heading h1 {
    font-size: 28px;
  }

  .method-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .method-search {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .method-toolbar,
  .method-groups {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .deposit-heading {
    display: grid;
  }

  .deposit-heading-main {
    align-items: flex-start;
  }

  .deposit-record-btn {
    width: fit-content;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .method-group .method-grid {
    grid-template-columns: 1fr;
  }

  .method-card {
    min-height: 118px;
    padding: 14px;
  }

  .deposit-form-card,
  .payment-info-card,
  .complete-card {
    padding: 18px;
  }

  .form-title-row h2 {
    font-size: 22px;
  }

  .field-grid,
  .complete-details {
    grid-template-columns: 1fr;
  }

  .rate-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions,
  .complete-actions,
  .confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .primary-action,
  .form-actions .ghost-action,
  .complete-actions .primary-action,
  .complete-actions .ghost-action,
  .confirm-actions .primary-action,
  .confirm-actions .ghost-action {
    width: 100%;
  }

  .payment-info-head {
    display: grid;
  }

  .info-value-row {
    display: grid;
  }

  .availability-info-panel div {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-btn {
    width: fit-content;
  }

  .pay-summary strong {
    font-size: 21px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}
