.members-page .page-actions { flex-wrap: wrap; }
.team-wallet-summary {
  min-width: 0;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--oa-border);
  border-radius: 10px;
  background: var(--oa-panel-2);
}
.team-wallet-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
}
.team-wallet-credit-dialog .team-wallet-sources,
.team-wallet-credit-dialog .team-wallet-recipients {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.team-wallet-credit-dialog :is(.team-wallet-sources, .team-wallet-recipients) > legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--oa-text);
}
.team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--oa-border);
  border-radius: 7px;
  color: var(--oa-text);
}
.team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member):focus-within,
.team-wallet-credit-dialog .team-wallet-source:has(input:checked) {
  border-color: var(--client-focus-edge, var(--oa-accent-2, #8b5cf6));
}
.team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member) > input:focus {
  outline: none;
  box-shadow: none;
}
.team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member) > span { overflow-wrap: anywhere; }
.team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member) > :last-child { text-align: right; }
.team-wallet-credit-dialog input:is([type="checkbox"], [type="radio"]) {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--client-focus-edge, var(--oa-accent-2, #8b5cf6));
}
.team-wallet-body { min-width: 0; padding: 1px 2px 0; }
.team-wallet-transfer { display: grid; gap: 10px; min-width: 0; }
.team-wallet-select-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px 12px;
  min-width: 0;
}
.team-wallet-credit-dialog .team-wallet-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.team-wallet-credit-dialog :is(.team-wallet-select-toolbar input[type="search"], .team-wallet-amount input) {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--oa-border);
  border-radius: 8px;
  background: var(--oa-panel);
  color: var(--oa-text);
  font: inherit;
}
.team-wallet-credit-dialog :is(.team-wallet-select-toolbar input[type="search"], .team-wallet-amount input):focus {
  border-color: var(--client-focus-edge, var(--oa-accent-2, #8b5cf6));
  outline: none;
  box-shadow: none;
}
.team-wallet-member-list {
  display: grid;
  gap: 5px;
  max-height: min(30dvh, 270px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1px;
}
.team-wallet-member small { display: block; color: var(--oa-muted); font-size: 11px; }
.team-wallet-credit-dialog .team-wallet-amount { display: grid; gap: 6px; margin: 0; }
.team-wallet-help { margin: 0; font-size: 12px; color: var(--oa-muted); }
.team-wallet-funds-error { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.team-wallet-transfer .login-error { margin: 0; }
.team-wallet-transfer .modal-actions { margin-top: 3px; }
.team-wallet-transfer + .member-credit-history { margin-top: 14px; }

.tenant-recharge-summary .tenant-credit-funds.team-wallet-platform-funds {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 14px;
}
.team-wallet-platform-funds-info, .team-wallet-platform-funds-amount {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.team-wallet-platform-funds-info > span {
  color: var(--oa-text);
  font-size: 12px;
}
.team-wallet-platform-funds-amount { justify-items: end; text-align: right; }
.team-wallet-platform-funds-amount > button { margin: 0; }
@media (max-width: 520px) {
  .team-wallet-platform-funds-amount > b { font-size: 15px; }
  .team-wallet-credit-dialog .team-wallet-summary { padding: 8px; }
  .team-wallet-credit-dialog :is(.team-wallet-source, .team-wallet-member) { padding: 6px; }
}

html .modal-card.team-wallet-credit-dialog[aria-label="成员充值"] {
  --team-wallet-single-gutter: 28px;
  padding-inline: 0;
  padding-block-end: 0;
}

.team-wallet-credit-dialog[aria-label="成员充值"] > :is(.modal-head, .team-wallet-summary) {
  margin-inline: var(--team-wallet-single-gutter);
}

.team-wallet-credit-dialog[aria-label="成员充值"] > .team-wallet-body {
  padding: 1px var(--team-wallet-single-gutter) var(--team-wallet-single-gutter);
  overflow-x: hidden;
  overflow-y: auto;
}

.team-wallet-credit-dialog[aria-label="成员充值"] .member-credit-table {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

@media (max-width: 600px) {
  html .modal-card.team-wallet-credit-dialog[aria-label="成员充值"] {
    --team-wallet-single-gutter: 16px;
  }
}

@media (max-height: 440px) {
  html .modal-card.team-wallet-credit-dialog[aria-label="成员充值"] {
    --team-wallet-single-gutter: 12px;
  }
}

.team-wallet-credit-dialog {
  --team-wallet-balance-high: #166534;
  --team-wallet-balance-low: #9a3412;
}
html[data-theme="dark"] .team-wallet-credit-dialog {
  --team-wallet-balance-high: #86efac;
  --team-wallet-balance-low: #fdba74;
}
.team-wallet-credit-dialog .team-wallet-wallet-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 2px 4px;
  color: var(--oa-text);
}
.team-wallet-credit-dialog :is(.team-wallet-wallet-balance, .team-wallet-source:has(input[value="wallet"])) > span {
  font-size: 15px;
  font-weight: 600;
}
.team-wallet-credit-dialog .team-wallet-wallet-amount {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--oa-text);
  font-size: clamp(22px, 5vw, 30px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.team-wallet-credit-dialog .team-wallet-wallet-amount[data-balance-tone="high"] {
  color: var(--team-wallet-balance-high);
}
.team-wallet-credit-dialog .team-wallet-wallet-amount[data-balance-tone="low"] {
  color: var(--team-wallet-balance-low);
}

.team-wallet-credit-dialog[aria-label="成员充值"] .team-wallet-transfer > .modal-actions {
  border-top: 0;
}
