:root {
  --brand: #fef65b;
  --brand-soft: #fff9b8;
  --brand-ink: #5f5600;
  --alipay-blue: #1677ff;
  --alipay-blue-dark: #0958d9;
  --alipay-blue-soft: #e6f4ff;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f4f4ef;
  color: #303632;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.case-ghost-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f6f6f1;
  color: #575f59;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(37, 40, 38, .06);
}

.case-ghost-btn:hover {
  background: #eeeee7;
  color: #2f3531;
}

.account-ledger-backdrop,
.recharge-modal-backdrop,
.version-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(37, 42, 37, .18);
  backdrop-filter: blur(5px);
}

.version-detail-backdrop {
  z-index: 60;
}

.account-ledger-backdrop {
  z-index: 64;
}

.recharge-modal-backdrop {
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(37, 42, 37, .34);
  backdrop-filter: blur(6px);
}

.version-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(620px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #e1e5dc;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #fffefa;
  box-shadow: -22px 0 38px rgba(37, 42, 37, .14);
}

.version-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #edf0e9;
  background: #fffefa;
}

.version-detail-heading {
  min-width: 0;
}

.version-detail-kicker {
  color: #8b918a;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
}

.version-detail-title {
  margin: 4px 0 0;
  overflow: hidden;
  color: #252826;
  font-size: 18px;
  font-weight: 880;
  line-height: 1.22;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-detail-meta {
  margin: 5px 0 0;
  overflow: hidden;
  color: #727970;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-detail-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.version-detail-close {
  width: 32px;
  height: 32px;
  color: #697169;
}

.version-detail-copy-btn {
  background: var(--brand-soft);
  color: var(--brand-ink);
  box-shadow: inset 0 0 0 1px rgba(123, 116, 0, .18);
}

.version-detail-copy-btn:hover {
  background: #fff7a6;
  color: #3f3a00;
}

.version-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px 18px 16px;
  overflow: hidden;
  background: #fffefa;
}

.version-detail-drawer.is-prompt-expanded .version-detail-body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.version-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.version-detail-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e8ebe4;
  border-radius: 8px;
  background: #fbfcf8;
}

.version-detail-summary span {
  overflow: hidden;
  color: #838b83;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-detail-summary strong {
  overflow: hidden;
  color: #586547;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-detail-prompt-toggle {
  flex: 0 0 auto;
  width: 100%;
  height: 34px;
  border: 1px solid #e3e6de;
  border-radius: 8px;
  background: #fbfcf8;
  color: #5f675f;
  font-size: 12px;
  font-weight: 780;
  text-align: center;
  cursor: pointer;
}

.version-detail-prompt-toggle:hover {
  background: #f4f6ef;
  color: #303631;
}

.version-detail-prompt {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
}

.version-detail-block {
  min-height: 72px;
  max-height: 150px;
  margin: 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid #e8ebe4;
  border-radius: 8px;
  background: #f8f9f4;
  color: #333a34;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.version-runs-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding-top: 12px;
  border-top: 1px solid #edf0e9;
}

.version-detail-drawer.is-prompt-expanded .version-runs-panel {
  flex: 0 0 auto;
  min-height: 0;
}

.version-runs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 2px 8px;
}

.version-runs-head h3 {
  margin: 0;
  color: #303631;
  font-size: 13px;
  font-weight: 840;
  line-height: 1.2;
}

.version-runs-status {
  flex: 0 0 auto;
  color: #777f77;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.version-run-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid #edf0e9;
}

.version-detail-drawer.is-prompt-expanded .version-run-list {
  flex: 0 0 auto;
  overflow: visible;
}

.version-run-row {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 11px 6px 11px 17px;
  border: 0;
  border-top: 1px solid #edf0e9;
  background: transparent;
  color: #303631;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s ease;
}

.version-run-row:first-child {
  border-top: 0;
}

.version-run-row::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: #d3d6d1;
}

.version-run-row[data-status="failed"]::before {
  background: #d66a62;
}

.version-run-row.is-active {
  background: #fbfbf4;
}

.version-run-row.is-active::before,
.version-run-row[data-status="success"].is-active::before,
.version-run-row[data-status="failed"].is-active::before {
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(95, 86, 0, .12);
}

.version-run-row:hover,
.version-run-row:focus-visible {
  background: #f7f8f2;
  outline: none;
}

.version-run-row:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.version-run-top,
.version-run-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.version-run-title {
  overflow: hidden;
  color: #252826;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-run-status-text {
  flex: 0 0 auto;
  color: #697169;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.version-run-row[data-status="success"] .version-run-status-text {
  color: #66703b;
}

.version-run-row[data-status="failed"] .version-run-status-text {
  color: #a33c31;
}

.version-run-meta,
.version-run-preview {
  overflow: hidden;
  color: #737a72;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-run-preview {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.version-run-detail-drawer {
  position: fixed;
  top: 0;
  right: min(620px, calc(100vw - 28px));
  bottom: 0;
  z-index: 61;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(540px, calc(100vw - 648px));
  min-width: 360px;
  overflow: hidden;
  border: 1px solid #e1e5dc;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #fffefa;
  box-shadow: -18px 0 32px rgba(37, 42, 37, .12);
}

.version-run-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #edf0e9;
  background: #fffefa;
}

.version-run-detail-heading {
  min-width: 0;
}

.version-run-detail-kicker {
  color: #8b918a;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
}

.version-run-detail-title {
  margin: 4px 0 0;
  overflow: hidden;
  color: #252826;
  font-size: 17px;
  font-weight: 880;
  line-height: 1.22;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-run-detail-meta {
  margin: 5px 0 0;
  overflow: hidden;
  color: #727970;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-run-detail-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #697169;
}

.version-run-detail-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px 18px 18px;
  overflow: auto;
  background: #fffefa;
}

.version-run-detail-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.version-run-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.version-run-detail-section-title h3 {
  margin: 0;
  overflow: hidden;
  color: #303631;
  font-size: 13px;
  font-weight: 840;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-run-copy-btn {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: #f6f6f1;
  color: #59615b;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(37, 40, 38, .07);
}

.version-run-copy-btn:hover {
  background: #eeeee7;
  color: #252826;
}

.version-run-detail-block {
  min-height: 118px;
  max-height: 236px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #20271f;
  border-radius: 8px;
  background: #101710;
  color: #eef1df;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.version-run-detail-block::selection {
  background: rgba(254, 246, 91, .28);
}

.account-ledger-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #e1e5dc;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #fffefa;
  box-shadow: -22px 0 38px rgba(37, 42, 37, .14);
}

.account-ledger-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #edf0e9;
  background: #fffefa;
}

.account-ledger-heading {
  min-width: 0;
}

.account-ledger-kicker {
  color: #8b918a;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
}

.account-ledger-title {
  margin: 4px 0 0;
  color: #252826;
  font-size: 20px;
  font-weight: 880;
  line-height: 1.18;
  letter-spacing: 0;
}

.account-ledger-meta {
  margin: 5px 0 0;
  color: #727970;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.account-ledger-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #697169;
}

.account-ledger-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 16px 18px 18px;
  overflow: auto;
  background: #fffefa;
}

.account-ledger-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-ledger-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e8ebe4;
  border-radius: 8px;
  background: #fbfcf8;
}

.account-ledger-metric span {
  color: #838b83;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.account-ledger-metric strong {
  overflow: hidden;
  color: #586547;
  font-size: 16px;
  font-weight: 880;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-ledger-recharge {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(22, 119, 255, .22);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fcff, #edf6ff);
  color: #1d3f6f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
}

.alipay-logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: transparent;
  box-shadow: 0 10px 22px rgba(22, 119, 255, .16);
}

.alipay-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-ledger-recharge-title {
  font-size: 13px;
  font-weight: 860;
  line-height: 1.25;
}

.account-ledger-recharge-copy {
  margin-top: 3px;
  color: rgba(29, 63, 111, .68);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.account-recharge-button,
.recharge-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--alipay-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .22);
}

.account-recharge-button:hover,
.recharge-primary:hover {
  background: var(--alipay-blue-dark);
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] {
  border-color: rgba(0, 112, 186, .22);
  background: var(--paypal-blue-soft);
  color: var(--paypal-blue);
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .payment-logo-mark[data-provider="paypal"] {
  background: transparent;
  box-shadow: none;
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .payment-logo-mark[data-provider="paypal"] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .account-ledger-recharge-title {
  color: var(--paypal-blue);
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .account-ledger-recharge-copy {
  color: rgba(0, 41, 145, .64);
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .account-recharge-button {
  background: var(--paypal-button-blue);
  box-shadow: 0 8px 18px rgba(0, 112, 186, .24);
}

:is(#alipayRechargeEntry, .payment-recharge-entry)[data-provider="paypal"] .account-recharge-button:hover {
  background: var(--paypal-button-blue-hover);
}

.account-ledger-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #edf0e9;
}

.account-ledger-section-head h3 {
  margin: 0;
  color: #303631;
  font-size: 14px;
  font-weight: 860;
  line-height: 1.2;
}

.account-ledger-refresh {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e1e5dc;
  border-radius: 7px;
  background: #fbfcf8;
  color: #6b736b;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.account-ledger-refresh:hover {
  background: #f4f6ef;
  color: #303631;
}

.account-ledger-filter {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 38px;
  padding: 4px;
  border: 1px solid #d9ddd7;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(244, 242, 236, .94), rgba(235, 232, 224, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.account-ledger-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #667069;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.account-ledger-filter button:hover {
  background: rgba(255, 255, 255, .48);
  color: #303631;
}

.account-ledger-filter button.is-active {
  border-color: #cfd4ce;
  background: #fff;
  color: #222724;
  box-shadow: 0 1px 4px rgba(31, 35, 32, .12);
}

.account-ledger-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #edf0e9;
}

.account-ledger-row {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid #edf0e9;
  background: transparent;
}

.account-ledger-row::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: #d3d6d1;
}

.account-ledger-row[data-ledger-kind="recharge"]::before {
  background: var(--brand);
}

.account-ledger-row-top,
.account-ledger-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.account-ledger-row-title {
  overflow: hidden;
  color: #252826;
  font-size: 13px;
  font-weight: 840;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-ledger-amount {
  flex: 0 0 auto;
  color: #9e4a40;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.3;
  white-space: nowrap;
}

.account-ledger-row[data-ledger-kind="recharge"] .account-ledger-amount {
  color: #66703b;
}

.account-ledger-row-meta,
.account-ledger-preview {
  overflow: hidden;
  color: #737a72;
  font-size: 12px;
  line-height: 1.42;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-ledger-preview {
  white-space: normal;
}

.recharge-modal {
  width: min(450px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #e1e5dc;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: 0 28px 80px rgba(27, 31, 27, .28);
}

.recharge-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 16px 13px;
  border-bottom: 1px solid #edf0e9;
  background: #fffefa;
}

.recharge-title {
  margin: 0;
  color: #252826;
  font-size: 18px;
  font-weight: 880;
  line-height: 1.22;
  letter-spacing: 0;
}

.recharge-copy {
  margin: 5px 0 0;
  color: #727970;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.recharge-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #697169;
}

.recharge-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.recharge-amounts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.recharge-amount {
  min-width: 0;
  height: 34px;
  border: 1px solid #e2e5df;
  border-radius: 7px;
  background: #fff;
  color: #303631;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.recharge-amount:hover {
  background: #f7f8f2;
}

.recharge-amount.is-active {
  border-color: rgba(22, 119, 255, .34);
  background: var(--alipay-blue-soft);
  color: #0b5bd3;
  box-shadow: inset 0 0 0 1px rgba(22, 119, 255, .08);
}

.recharge-qr-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 236px;
  padding: 18px;
  border: 1px solid #e8ebe4;
  border-radius: 8px;
  background: #fbfcf8;
  color: #303631;
}

.recharge-qr-title {
  font-size: 13px;
  font-weight: 840;
  line-height: 1.25;
}

.recharge-qr {
  display: grid;
  place-items: center;
  width: 174px;
  aspect-ratio: 1;
  border: 1px solid #d8dacd;
  border-radius: 8px;
  background:
    linear-gradient(#eef0e9 1px, transparent 1px),
    linear-gradient(90deg, #eef0e9 1px, transparent 1px),
    #fffefa;
  background-size: 16px 16px;
  color: var(--alipay-blue);
  font-size: 13px;
  font-weight: 840;
  box-shadow: 0 10px 24px rgba(37, 42, 37, .08);
}

.recharge-qr img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.recharge-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #edf0e9;
  background: #fffefa;
}

.recharge-secondary {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e1e5dc;
  border-radius: 8px;
  background: #fff;
  color: #4d554d;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
}

.recharge-secondary:hover {
  background: #f7f8f2;
}

@media (max-width: 1160px) {
  .version-run-detail-drawer {
    width: min(480px, calc(100vw - min(620px, calc(100vw - 28px))));
    min-width: 340px;
  }
}

@media (max-width: 860px) {
  .version-detail-drawer,
  .account-ledger-drawer {
    width: 100vw;
  }

  .version-run-detail-drawer {
    right: 0;
    z-index: 62;
    width: 100vw;
    min-width: 0;
  }

  .version-detail-header,
  .account-ledger-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .version-detail-summary,
  .account-ledger-metrics {
    grid-template-columns: 1fr;
  }

  .account-ledger-recharge {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .account-recharge-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .recharge-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dev PromptInterface real Alipay recharge modal: keep the polished demo UX after this file's older demo rules. */
.recharge-modal {
  width: min(520px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: hidden;
  background: #fffefa;
}

.recharge-header,
.recharge-footer {
  background: #fffefa;
}

.recharge-body {
  gap: 12px;
  padding: 16px;
  background: #fffefa;
}

.recharge-custom-panel[hidden] {
  display: none !important;
}

.recharge-custom-panel {
  display: block;
}

.recharge-custom-input {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 48px;
  align-items: center;
  height: 36px;
  border: 1px solid #dfe3dc;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.recharge-custom-prefix,
.recharge-custom-suffix {
  color: #6f776e;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.recharge-custom-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #252826;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.recharge-custom-input input::placeholder {
  color: #8a9288;
}

.recharge-qr-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 10px;
  min-height: 390px;
  padding: 8px 16px 20px;
  border: 0;
  border-radius: 0;
  background: #fffefa;
  box-shadow: none;
}

.recharge-qr-title {
  display: none;
}

.recharge-qr {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 326px;
  border: 0;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: none;
}

.recharge-qr-panel[data-state="waiting"] {
  padding-top: 12px;
}

.recharge-qr-panel[data-state="waiting"] .recharge-qr {
  --cashier-crop-size: min(380px, calc(100vw - 96px));
  --cashier-qr-target-size: 320px;
  --cashier-crop-offset: max(8px, calc((var(--cashier-crop-size) - var(--cashier-qr-target-size)) / 2));
  position: relative;
  width: var(--cashier-crop-size);
  height: var(--cashier-crop-size);
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.recharge-qr > div {
  width: 100%;
  height: 100%;
  background: transparent;
}

.recharge-cashier-frame {
  border: 0;
  background: #fff;
}

.recharge-stage-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #252826;
  text-align: center;
}

.recharge-stage-card strong {
  color: #252826;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.recharge-stage-spinner {
  width: 28px;
  height: 28px;
  border: 4px solid rgba(22, 119, 255, 0.14);
  border-top-color: var(--alipay-blue);
  border-radius: 999px;
  animation: recharge-stage-spin 0.82s linear infinite;
}

.recharge-stage-success-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--alipay-blue);
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.22);
}

.recharge-stage-success-icon svg {
  width: 25px;
  height: 25px;
}

.recharge-stage-success-icon path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes recharge-stage-spin {
  to {
    transform: rotate(360deg);
  }
}

.recharge-modal .wallet-recharge-status {
  min-height: 0;
  margin: 0;
  padding: 0 2px;
}

.recharge-modal .wallet-recharge-status:empty {
  display: none;
}

.recharge-primary:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  box-shadow: none;
}

@media (max-width: 560px) {
  .recharge-modal {
    width: calc(100vw - 16px);
  }

  .recharge-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recharge-qr-panel[data-state="waiting"] .recharge-qr {
    --cashier-crop-size: min(360px, calc(100vw - 72px));
  }
}

/* Exact sidebar UX demo recharge modal UI, with only the cashier iframe stage added for real Alipay. */
.recharge-modal {
  width: min(520px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #e1e5dc;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: 0 28px 80px rgba(27, 31, 27, .28);
}

.recharge-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 16px 13px;
  border-bottom: 1px solid #edf0e9;
  background: #fffefa;
}

.recharge-title {
  margin: 0;
  color: #252826;
  font-size: 18px;
  font-weight: 880;
  line-height: 1.22;
}

.recharge-copy {
  margin: 5px 0 0;
  color: #727970;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.recharge-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #697169;
}

.recharge-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.recharge-amounts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.recharge-amount {
  min-width: 0;
  height: 34px;
  border: 1px solid #e2e5df;
  border-radius: 7px;
  background: #fff;
  color: #303631;
  font-size: 13px;
  font-weight: 820;
}

.recharge-amount:hover {
  background: #f7f8f2;
}

.recharge-amount.is-active {
  border-color: rgba(22, 119, 255, .34);
  background: var(--alipay-blue-soft);
  color: #0b5bd3;
  box-shadow: inset 0 0 0 1px rgba(22, 119, 255, .08);
}

.recharge-custom-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 2px 0 0;
}

.recharge-custom-panel[hidden] {
  display: none;
}

.recharge-custom-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  background: #fff;
  color: #3f473f;
}

.recharge-custom-prefix,
.recharge-custom-suffix {
  color: #717a71;
  font-size: 13px;
  font-weight: 760;
}

.recharge-custom-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #252826;
  font-size: 15px;
  font-weight: 840;
  line-height: 1.4;
}

.recharge-custom-input::placeholder {
  color: #a1a99f;
  font-weight: 720;
}

.recharge-qr-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  min-height: 408px;
  padding: 14px 16px 20px;
  border: 0;
  border-radius: 8px;
  background: #fffefa !important;
  color: #303631;
}

.recharge-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 294px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fffefa !important;
  box-shadow: none;
}

.recharge-stage-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 330px;
  padding: 22px;
  background: #fffefa;
  color: #3f473f;
  text-align: center;
}

.recharge-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e8f1ff;
  border-top-color: var(--alipay-blue);
  border-radius: 999px;
  animation: recharge-spin .85s linear infinite;
}

@keyframes recharge-spin {
  to { transform: rotate(360deg); }
}

.recharge-stage-card strong {
  color: #252826;
  font-size: 17px;
  font-weight: 880;
  line-height: 1.3;
}

.recharge-qr-panel[data-recharge-status="custom_pending"] .recharge-stage-card {
  gap: 16px;
}

.recharge-qr-panel[data-recharge-status="custom_pending"] .recharge-stage-card strong {
  color: #4d554d;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
}

.recharge-success-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--alipay-blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 119, 255, .22);
}

.recharge-success-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
  stroke: #fff;
  stroke-width: 3;
}

.recharge-success-icon path {
  stroke: #fff;
}

.recharge-qr {
  display: grid;
  place-items: center;
  position: relative;
  width: 238px;
  aspect-ratio: 1;
  border: 1px solid #e0e4dd;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 20px, #111 20px 30px, transparent 30px 40px, #111 40px 50px, transparent 50px 70px, #111 70px 80px, transparent 80px 100px, #111 100px 120px, transparent 120px),
    linear-gradient(#111 10px, transparent 10px 22px, #111 22px 34px, transparent 34px 46px, #111 46px 58px, transparent 58px 82px, #111 82px 96px, transparent 96px),
    #fff;
  background-blend-mode: multiply;
  background-size: 54px 42px, 44px 56px, auto;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 42, 37, .10);
}

.recharge-qr::before,
.recharge-qr::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border: 12px solid #111;
  background: #fff;
  box-shadow: inset 0 0 0 8px #fff, inset 0 0 0 18px #111;
}

.recharge-qr::before {
  top: 18px;
  left: 18px;
}

.recharge-qr::after {
  top: 18px;
  right: 18px;
}

.recharge-qr-corner {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border: 12px solid #111;
  background: #fff;
  box-shadow: inset 0 0 0 8px #fff, inset 0 0 0 18px #111;
}

.recharge-qr-logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 5px solid #fff;
  border-radius: 13px;
  background: var(--alipay-blue);
  color: #fff;
  font-size: 30px;
  font-weight: 880;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .22);
}

.recharge-stage-card--cashier {
  max-width: none;
  padding: 0;
}

.recharge-cashier-crop {
  --cashier-crop-size: min(380px, calc(100vw - 96px));
  --cashier-qr-target-size: 320px;
  --cashier-crop-offset: max(8px, calc((var(--cashier-crop-size) - var(--cashier-qr-target-size)) / 2));
  position: relative;
  width: var(--cashier-crop-size);
  height: var(--cashier-crop-size);
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.recharge-cashier-frame {
  position: absolute;
  left: var(--cashier-crop-offset);
  top: var(--cashier-crop-offset);
  width: 520px;
  max-width: none;
  height: 520px;
  border: 0;
  background: #fff;
}

.recharge-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #edf0e9;
  background: #fffefa;
}

.recharge-secondary {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e1e5dc;
  border-radius: 8px;
  background: #fff;
  color: #4d554d;
  font-size: 13px;
  font-weight: 780;
}

.recharge-secondary:hover {
  background: #f7f8f2;
}

.recharge-secondary.is-muted {
  color: #7b847b;
  background: #fbfcf8;
}

.recharge-primary:disabled {
  cursor: default;
  opacity: .72;
  box-shadow: none;
}

.recharge-modal .wallet-recharge-status {
  min-height: 0;
  margin: 0;
  padding: 0 2px;
}

.recharge-modal .wallet-recharge-status:empty {
  display: none;
}

@media (max-width: 560px) {
  .recharge-modal {
    width: calc(100vw - 16px);
  }

  .recharge-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recharge-cashier-crop {
    --cashier-crop-size: min(360px, calc(100vw - 72px));
  }
}
