.credit-charge-page .page-head {
  margin-bottom: 18px;
}

.credit-charge-form-card {
  padding: clamp(18px, 2.4vw, 28px);
}

.credit-charge-page #chargeForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.credit-charge-page #chargeForm > :is(.receipt-type-box, .tax-invoice-box, .cash-receipt-box, .charge-consent-box, #chargeSubmitBtn, #chargeNotice) {
  grid-column: 1 / -1;
}

.credit-history-section {
  margin-top: 24px;
}

.credit-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.credit-history-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  letter-spacing: -.035em;
}

.credit-bank-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.credit-bank-inline > span:first-child {
  font-weight: 800;
}

.credit-bank-inline strong {
  color: var(--text);
  font-size: 14px;
}

.credit-bank-inline small {
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.credit-history-section > .empty {
  padding: 24px 16px;
}

.credit-history-table {
  overflow-x: visible;
  border-radius: 14px;
}

.credit-history-table table {
  min-width: 0;
  table-layout: fixed;
}

.credit-history-table :is(th, td) {
  min-width: 0;
  padding: 12px 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.credit-charge-request-table :is(th, td):nth-child(1) { width: 24%; }
.credit-charge-request-table :is(th, td):nth-child(2) { width: 19%; }
.credit-charge-request-table :is(th, td):nth-child(3) { width: 15%; }
.credit-charge-request-table :is(th, td):nth-child(4) { width: 17%; }
.credit-charge-request-table :is(th, td):nth-child(5) { width: 25%; }

.credit-balance-log-table :is(th, td):nth-child(1) { width: 21%; }
.credit-balance-log-table :is(th, td):nth-child(2) { width: 11%; }
.credit-balance-log-table :is(th, td):nth-child(3),
.credit-balance-log-table :is(th, td):nth-child(4),
.credit-balance-log-table :is(th, td):nth-child(5) { width: 14%; }
.credit-balance-log-table :is(th, td):nth-child(6) { width: 26%; }

.charge-complete-modal {
  width: min(500px, 100%);
  text-align: center;
}

.charge-complete-check {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #047857;
  font-size: 24px;
  font-weight: 900;
}

.charge-complete-modal h2 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  letter-spacing: -.04em;
}

.charge-complete-modal > p {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.charge-complete-payment {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  text-align: left;
}

.charge-complete-payment > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  padding: 14px 16px;
}

.charge-complete-payment span {
  color: var(--muted);
  font-size: 13px;
}

.charge-complete-payment strong {
  color: var(--text);
  text-align: right;
}

.charge-complete-notice {
  margin: 0 0 18px;
  border-radius: 12px;
  background: #eff6ff;
  padding: 13px 15px;
  color: #1e40af;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.charge-complete-modal .btn {
  width: 100%;
}

@media (max-width: 760px) {
  .credit-charge-page #chargeForm {
    grid-template-columns: 1fr;
  }

  .credit-charge-page #chargeForm > * {
    grid-column: 1;
  }

  .credit-history-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .credit-bank-inline {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .credit-history-table {
    border: 0;
    background: transparent;
  }

  .credit-history-table table,
  .credit-history-table tbody,
  .credit-history-table tr,
  .credit-history-table td {
    display: block;
    width: 100%;
  }

  .credit-history-table table {
    table-layout: auto;
  }

  .credit-history-table thead {
    display: none;
  }

  .credit-history-table tbody {
    display: grid;
    gap: 10px;
  }

  .credit-history-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
  }

  .credit-history-table td,
  .credit-charge-request-table td:nth-child(n),
  .credit-balance-log-table td:nth-child(n) {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    border-bottom: 1px solid var(--line);
    padding: 11px 13px;
    text-align: right;
  }

  .credit-history-table td:last-child {
    border-bottom: 0;
  }

  .credit-history-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
  }
}
