.bank-page {
  padding: 8px 0 30px;
}
.bank-heading,
.bank-tools,
.bank-connection > header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.bank-heading h1 {
  font-size: 28px;
  margin: 0 0 8px;
}
.bank-heading p,
.bank-page small {
  color: #7b899e;
}
.bank-tools form {
  display: flex;
  gap: 8px;
  margin: 0;
}
.bank-tools input {
  min-width: 240px;
}
.bank-tools small {
  white-space: nowrap;
}
.bank-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #9ba7b7;
}
.bank-dot.linked {
  background: #22a76d;
}
.bank-connection {
  background: white;
  border: 1px solid #e2e8f1;
  padding: 26px;
  border-radius: 18px;
  margin: 24px 0;
}
.bank-connection h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.bank-connection p,
.bank-connection li {
  color: #7b899e;
  line-height: 1.7;
}
.bank-connection label {
  display: block;
  margin: 24px 0 10px;
}
.bank-connection #bank-link-form {
  display: flex;
  gap: 12px;
  align-items: end;
}
.bank-connection #bank-link-form label {
  flex: 1;
}
.bank-copy {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}
.bank-copy input {
  flex: 1;
  min-width: 0;
  background: #f8f9fc;
}
.bank-copy button {
  white-space: nowrap;
}
.bank-danger {
  background: #dc2938;
  margin-top: 24px;
}
.bank-activation {
  margin-top: 24px;
}
.bank-accounts {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 20px 0 12px;
  padding: 5px;
  background: #f0f3f8;
  border-radius: 12px;
}
.bank-accounts button {
  background: transparent;
  color: #65758b;
  white-space: nowrap;
}
.bank-accounts button[aria-current] {
  background: #112d49;
  color: white;
}
.bank-accounts small {
  display: inline;
  font-size: 12px;
  margin-left: 8px;
}
.bank-accounts span {
  background: #dce6f7;
  border-radius: 20px;
  color: #173654;
  padding: 2px 8px;
  margin-left: 8px;
}
.bank-table {
  background: white;
  border: 1px solid #e2e8f1;
  border-radius: 16px;
  overflow: hidden;
}
.bank-table table {
  width: 100%;
  border-collapse: collapse;
}
.bank-table th {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 500;
  color: #8a98ac;
  background: #fafbfd;
  padding: 18px;
}
.bank-table td {
  padding: 18px;
  border-top: 1px solid #eef1f6;
  vertical-align: top;
}
.bank-table .amount {
  text-align: right;
  white-space: nowrap;
}
.bank-table .credit {
  color: #128852;
}
.bank-table .debit {
  color: #c12f39;
}
.bank-empty {
  text-align: center;
  padding: 60px 20px;
}
.bank-empty h2 {
  font-size: 19px;
}
.bank-empty p,
.bank-footnote {
  color: #8794a7;
}
.bank-table footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 16px;
  color: #8a98ac;
}
.bank-table footer > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bank-table select {
  width: auto;
}
.bank-transaction-id {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  max-width: 220px;
}
.bank-footnote {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 20px;
}
.bank-protocol-note {
  font-size: 12px;
}
.bank-connection [role="alert"] {
  color: #b62735;
}
@media (max-width: 800px) {
  .bank-tools {
    width: 100%;
  }
  .bank-tools form {
    flex: 1;
  }
  .bank-tools input {
    min-width: 0;
    width: 100%;
  }
  .bank-copy {
    flex-wrap: wrap;
  }
  .bank-copy input {
    flex-basis: 100%;
  }
  .bank-connection {
    padding: 18px;
  }
  .bank-connection #bank-link-form {
    display: block;
  }
  .bank-table footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .bank-table table {
    min-width: 850px;
  }
}
/* These are page-local headings, not the fixed workspace toolbar. */
.bank-page .bank-heading,
.bank-page .bank-connection > header {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 20px;
}
.bank-page .bank-heading {
  align-items: flex-start;
  row-gap: 18px;
}
.bank-page .bank-table .table-wrap {
  margin: 0;
  max-width: 100%;
  overflow: auto;
}
.bank-page table {
  white-space: normal;
}
.bank-page .bank-tools input {
  margin: 0;
}

.bank-detail dl {
  display: grid;
  gap: 12px;
}
.bank-detail dl > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #e2e9f2;
  padding: 8px 0;
}
.bank-detail dt {
  color: #61748b;
}
.bank-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.bank-table td small {
  display: block;
  color: #61748b;
}
@media (max-width: 520px) {
  .bank-detail dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.bank-detail {
  max-height: 90vh;
  overflow-y: auto;
}
.bank-detail > header {
  position: sticky;
  top: -28px;
  background: white;
  z-index: 1;
  padding: 12px 0;
}

.bank-activate {
  padding: 16px;
  margin: 18px 0;
  border: 1px solid #bfd0fa;
  border-radius: 12px;
  background: #f2f6ff;
}
.bank-activate p {
  margin: 0 0 12px;
}

/* Outlet activity workspace */
.bank-page {
  color: #18324d;
  max-width: 1600px;
  margin: auto;
}
.bank-eyebrow {
  color: #637891;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.bank-heading h1 {
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.03em;
}
.bank-heading p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #52677f;
}
.bank-page .bank-tools {
  justify-content: flex-end;
  gap: 8px;
}
.bank-tools small {
  flex-basis: 100%;
  text-align: right;
  font-size: 12px;
}
.bank-page button,
.bank-page input,
.bank-page select {
  min-height: 42px;
  border-radius: 9px;
}
.bank-page button:focus-visible,
.bank-page summary:focus-visible {
  outline: 3px solid #8db7ff;
  outline-offset: 3px;
}
.bank-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  margin: 24px 0;
}
.bank-summary article {
  background: #fff;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bank-summary article > span {
  color: #5c7088;
  font-size: 13px;
}
.bank-summary strong {
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.bank-summary strong.bank-summary-date {
  font-size: 18px;
  margin: auto 0;
  letter-spacing: -0.01em;
}
.bank-summary small {
  font-size: 12px;
}
.bank-connection {
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 3px 12px #18324d04;
}
.bank-connection p,
.bank-connection li {
  color: #52677f;
  font-size: 13px;
}
.bank-page .bank-connection > header {
  margin-bottom: 4px;
}
.bank-connection h2 {
  font-size: 19px;
}
.bank-connection label {
  color: #29425e;
  font-weight: 600;
  font-size: 13px;
  margin: 18px 0 8px;
}
.bank-connection label input {
  font-weight: 400;
}
.bank-copy {
  gap: 8px;
  margin-top: 7px;
}
.bank-copy input {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.bank-setup-guide {
  margin-top: 24px;
  background: #f5f8fc;
  padding: 18px 20px;
  border-radius: 10px;
}
.bank-setup-guide strong {
  font-size: 14px;
}
.bank-setup-guide ol {
  margin: 10px 0 0;
  padding-left: 20px;
}
.bank-setup-guide li {
  padding-left: 4px;
  margin-top: 5px;
}
.bank-advanced,
.bank-activation {
  margin-top: 18px;
  border-top: 1px solid #e4eaf2;
  padding-top: 16px;
}
.bank-page summary {
  cursor: pointer;
  color: #49647f;
  font-size: 13px;
  padding: 6px 0;
}
.bank-danger {
  background: #fff;
  border: 1px solid #e7b8be;
  color: #b02739;
  margin-top: 4px;
}
.bank-danger:hover {
  background: #fff3f4;
}
.bank-history {
  margin-top: 28px;
}
.bank-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bank-history-heading h2 {
  font-size: 19px;
  margin: 0 0 6px;
}
.bank-history-heading p {
  color: #637891;
  font-size: 13px;
  margin: 0;
}
.bank-history-heading form {
  display: flex;
  gap: 8px;
  margin: 0;
  flex: 0 1 390px;
}
.bank-history-heading input {
  min-width: 0;
  margin: 0;
}
.bank-accounts {
  background: transparent;
  padding: 0 0 4px;
  margin: 20px 0 12px;
}
.bank-accounts button {
  border: 1px solid #dfe7f0;
  background: #fff;
  font-size: 13px;
}
.bank-accounts button[aria-current] {
  background: #edf3ff;
  color: #2357b6;
  border-color: #9cb9ef;
}
.bank-accounts button[aria-current] small {
  color: #496a9f;
}
.bank-table {
  border-radius: 14px;
}
.bank-table th {
  padding: 14px 16px;
  color: #5c7088;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: left;
}
.bank-table td {
  padding: 18px 16px;
  font-size: 13px;
  line-height: 1.55;
}
.bank-table td small {
  margin-top: 5px;
  font-size: 11px;
}
.bank-table tbody tr:hover {
  background: #f9fbff;
}
.bank-table td.amount {
  font-weight: 700;
}
.bank-table .text-button {
  padding: 0;
  min-height: 32px;
  font-size: 12px;
  text-align: left;
}
.bank-table footer {
  color: #5c7088;
  font-size: 12px;
  background: #fcfdff;
  border-top: 1px solid #e8edf4;
}
.bank-empty {
  padding: 64px 20px;
  max-width: 540px;
  margin: auto;
}
.bank-empty h2 {
  color: #29425e;
}
.bank-empty p {
  color: #637891;
  line-height: 1.7;
}
.bank-footnote {
  max-width: 900px;
  color: #637891;
}
.bank-detail {
  width: min(620px, calc(100vw - 32px));
  border-radius: 16px;
}
.bank-detail h2 {
  font-size: 21px;
}
.bank-detail dl > div {
  padding: 12px 0;
  font-size: 14px;
}
@media (max-width: 1000px) {
  .bank-history-heading form {
    flex: 1 1 100%;
  }
  .bank-table th,
  .bank-table td {
    padding: 14px 10px;
  }
}
@media (max-width: 700px) {
  .bank-page {
    min-width: 0;
  }
  .bank-summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .bank-summary article {
    padding: 16px;
    min-width: 0;
  }
  .bank-summary article:last-child {
    grid-column: 1 / -1;
  }
  .bank-summary strong {
    font-size: 26px;
  }
  .bank-page .bank-tools {
    justify-content: flex-start;
  }
  .bank-tools small {
    text-align: left;
  }
  .bank-connection {
    padding: 18px;
  }
  .bank-page button {
    min-height: 44px;
  }
  .bank-copy {
    flex-wrap: wrap;
  }
  .bank-copy input {
    flex-basis: 100%;
    width: 100%;
  }
  .bank-page .bank-table table {
    min-width: 0;
    width: 100%;
  }
  .bank-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .bank-table table,
  .bank-table tbody {
    display: block;
  }
  .bank-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 16px;
    border-bottom: 1px solid #e4eaf2;
    gap: 12px;
  }
  .bank-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .bank-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: #637891;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    font-weight: 500;
  }
  .bank-table td.amount {
    white-space: normal;
  }
  .bank-table td[colspan] {
    grid-column: 1 / -1;
  }
  .bank-table footer {
    padding: 14px;
    gap: 12px;
  }
  .bank-table footer > div {
    flex-wrap: wrap;
  }
  .bank-accounts {
    max-width: 100%;
  }
  .bank-accounts small {
    display: block;
    margin: 3px 0 0;
  }
  .bank-detail {
    padding: 20px;
  }
}
.bank-detail-amount {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 12px;
  background: #f0f8f5;
  color: #15704c;
  margin: 16px 0 24px;
}
.bank-detail-amount small {
  font-size: 12px;
}
.bank-detail-amount strong {
  font-size: 30px;
}
.bank-detail-amount.debit {
  background: #fff4f4;
  color: #ad3545;
}
.bank-detail h3 {
  font-size: 14px;
  margin: 24px 0 4px;
}
.bank-detail summary {
  cursor: pointer;
  padding: 16px 0;
  color: #52677f;
}
