.modal__dialog--wide { width: min(100%, 720px); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal .demo-warning { max-width: none; margin: 16px 0; padding: 11px 13px; color: #7a3e00; border: 1px solid #efc487; border-radius: 5px; background: #fff7e8; }
.transfer-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.transfer-form[hidden] { display: none; }
.transfer-form label { display: grid; align-content: start; gap: 6px; font-weight: 700; }
.transfer-form input,
.transfer-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #aeb7c4;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}
.transfer-form select:disabled {
  color: #263244;
  background: #fff;
  cursor: not-allowed;
  opacity: 1;
}
.transfer-source-account {
  grid-column: 1 / -1;
}
.transfer-form small { color: var(--muted); font-weight: 400; }
.transfer-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.transfer-actions .primary-button { width: auto; margin: 0; padding-inline: 22px; }
.form-success { color: #107348; font-weight: 700; }
.form-error { color: #b42318; font-weight: 700; }
.transfer-history { margin-top: 32px; }
.transfer-history h3 { margin-bottom: 12px; }
.transfer-record { margin-top: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfe; }
.transfer-record > div { display: flex; justify-content: space-between; gap: 12px; }
.transfer-record > div span { color: var(--muted); font-size: 12px; }
.transfer-record dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 13px 0 0; }
.transfer-record dt { color: var(--muted); font-weight: 700; }
.transfer-record dd { margin: 0; overflow-wrap: anywhere; }
.transfer-confirmation { padding: 18px 0 4px; text-align: center; }
.transfer-confirmation[hidden] { display: none; }
.confirmation-icon { display: grid; width: 56px; height: 56px; margin: 0 auto 14px; place-items: center; color: #fff; border-radius: 50%; background: #16845b; font-size: 30px; font-weight: 700; }
.transfer-confirmation dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; width: min(100%, 430px); margin: 0 auto; padding: 18px; border-radius: 6px; background: #f3f6fa; text-align: left; }
.transfer-confirmation dt { color: var(--muted); font-weight: 700; }
.transfer-confirmation dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.transfer-confirmation .primary-button { width: auto; padding-inline: 32px; }
.history-search { display: flex; align-items: end; gap: 12px; width: min(100%, 560px); margin-top: 22px; }
.history-search label { flex: 1; display: grid; gap: 6px; font-weight: 700; }
.history-search input { width: 100%; padding: 10px; text-transform: uppercase; border: 1px solid #aeb7c4; border-radius: 4px; }
.history-search .primary-button { width: auto; margin: 0; padding-inline: 24px; }
.history-result { width: min(100%, 660px); margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.history-result h3 { margin: 0 0 16px; }
.history-result dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; margin: 0; }
.history-result dt { color: var(--muted); font-weight: 700; }
.history-result dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.status-pill { display: inline-block; padding: 2px 8px; color: #075a3d; border-radius: 999px; background: #dff5e9; }
.status-pill--rejected {
    display: inline-block; padding: 2px 8px;  border-radius: 999px; color: #b42318;
  background: #fde8e7;
}
.reference-value { font-family: Consolas, monospace; letter-spacing: .04em; }
.history-empty { margin-top: 22px !important; padding: 12px; color: #7a3e00 !important; border-radius: 5px; background: #fff7e8; }
@media (max-width: 640px) {
  .transfer-form { grid-template-columns: 1fr; }
  .transfer-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
  .transfer-record dl { grid-template-columns: 1fr; }
  .history-search { grid-column: auto; align-items: stretch; flex-direction: column; }
  .history-result dl { grid-template-columns: 1fr; }
}
.history-page {
  padding: 24px;
}

.history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.history-heading h2 {
  margin: 0 0 8px;
}

.history-heading p {
  margin: 0;
  color: #5f6673;
}

.history-table-wrap {
  width: 100%;
  max-height: calc(100vh - 500px);
  overflow: auto;
  scrollbar-gutter: stable;
  border: 1px solid #d5d9e2;
  border-radius: 4px;
  background: #ffffff;
}

.history-table {
  width: 100%;
  min-width: 1650px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e5eb;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.history-table th {
  background: #f4f6f9;
  color: #232936;
  font-size: 13px;
  font-weight: 700;
}

.history-table td {
  color: #202632;
  font-size: 14px;
}

.history-table tbody tr:hover {
  background: #f8faff;
}

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

.history-time {
  display: block;
  margin-top: 4px;
  color: #687080;
  font-size: 12px;
}

.history-number,
.reference-value {
  font-family: Consolas, Monaco, monospace;
}

.history-table-message {
  padding: 32px !important;
  color: #687080 !important;
  text-align: center !important;
}

.history-table-error {
  color: #b42318 !important;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #123f8c;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .history-page {
    padding: 16px;
  }

  .history-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .history-heading .outline-button {
    width: 100%;
  }
}
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.history-pagination[hidden] {
  display: none;
}

.history-pagination button {
  padding: 8px 14px;
  color: #123f8c;
  border: 1px solid #8ba1c4;
  border-radius: 4px;
  background: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.history-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.status-pill.status-pill--rejected {
  color: #b42318;
  background: #fde8e7;
}