/* 充值中心 · Q版浅色（搭配 styles.css 基础件） */

.pay-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  width: min(100% - 32px, 780px);
  margin: 0 auto;
  padding: 34px 0 56px;
}

.pay-panel {
  background: var(--card);
  border: 3px solid #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}

/* 面板顶部糖果彩条，与全站面板一致 */
.pay-panel::before { content: ""; display: block; height: 7px; background: var(--candy); }

.panel-head {
  padding: 26px 34px 18px;
  border-bottom: 2px dashed var(--line);
  text-align: center;
}

.panel-head p {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-title);
  font-size: 30px;
  color: var(--forest);
  letter-spacing: 3px;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-title);
  font-size: 19px;
  color: var(--forest);
  letter-spacing: 1px;
}

.notice,
.return-notice {
  min-height: 0;
  padding: 0 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.notice:not(:empty),
.return-notice:not([hidden]) {
  padding-top: 18px;
}

.notice.success,
.return-notice.success {
  color: var(--forest);
}

.notice.error,
.return-notice.error {
  color: #c0392b;
}

.login-view,
.account-view {
  padding: 28px 34px 34px;
}

.section-title {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.pay-form,
.order-form {
  display: grid;
  gap: 16px;
}

label,
input {
  min-width: 0;
}

button,
input {
  font-family: var(--font-body);
}

.captcha-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.captcha-field legend {
  margin-bottom: 7px;
  padding: 0;
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 150px 46px;
  gap: 9px;
  align-items: center;
}

.captcha-row input {
  height: 46px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.captcha-image {
  display: block;
  width: 150px;
  height: 46px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: #f1eee5;
}

.icon-button,
.quiet-button,
.primary-action {
  cursor: pointer;
}

.icon-button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--forest);
  background: var(--grass);
  font: 22px/1 Georgia, serif;
}

.icon-button:hover,
.quiet-button:hover {
  border-color: var(--forest);
  background: #e2eedb;
}

.primary-action:disabled,
.quiet-button:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.account-strip {
  margin-bottom: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--grass);
}

.account-strip span,
.balance-item span,
.calc-line span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.account-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 18px;
  color: var(--forest);
}

.quiet-button {
  min-height: 38px;
  padding: 0 16px;
  border: 2px solid var(--forest);
  border-radius: 999px;
  color: var(--forest);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.quiet-button:hover {
  color: #fff;
  background: var(--forest);
}

.balance-grid {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.balance-item {
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.balance-item strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-title);
  font-size: 27px;
  color: var(--forest);
  letter-spacing: 1px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.amount-option {
  min-height: 58px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fff;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.amount-option span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.amount-option:hover {
  border-color: #a9c69d;
}

.amount-option[aria-checked="true"] {
  border-color: var(--forest);
  box-shadow: inset 0 -4px 0 var(--gold);
  background: #f0f7ec;
}

.calc-line {
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid var(--gold-deep);
  border-radius: var(--radius-md);
  background: #fff6de;
}

.calc-line strong {
  color: #9a6a08;
  text-align: right;
}

.payment-method-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.payment-method-field legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-method {
  position: relative;
  min-width: 0;
}

.payment-method input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.payment-method span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.payment-method input:checked + span {
  border-color: var(--forest);
  box-shadow: inset 0 -4px 0 var(--gold);
  background: #f0f7ec;
  color: var(--forest);
}

.payment-method input:focus-visible + span {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .pay-shell {
    padding: 24px 0 44px;
  }

  .panel-head,
  .login-view,
  .account-view {
    padding-left: 22px;
    padding-right: 22px;
  }

  .notice,
  .return-notice {
    padding-left: 22px;
    padding-right: 22px;
  }

  h1 {
    font-size: 25px;
  }

  .section-title,
  .account-strip,
  .calc-line {
    align-items: stretch;
    flex-direction: column;
  }

  .section-title span,
  .calc-line strong {
    text-align: left;
  }

  .captcha-row {
    grid-template-columns: minmax(64px, 1fr) 126px 46px;
    gap: 7px;
  }

  .captcha-image {
    width: 126px;
    object-fit: fill;
  }

  .amount-grid,
  .balance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 104px 42px;
  }

  .captcha-image,
  .icon-button {
    height: 42px;
  }

  .captcha-image {
    width: 104px;
  }

  .icon-button {
    width: 42px;
  }
}

/* ---------- 充值记录 ---------- */
.history-view { margin-top: 20px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.history-table th { color: var(--muted); font-size: 12px; }
.history-table .st-paid { color: var(--forest); font-weight: 800; }
.history-table .st-pending { color: #9a6a08; font-weight: 700; }
.history-empty { text-align: center; color: var(--muted); padding: 14px 0; }
.history-pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.history-pager button:disabled { opacity: 0.45; cursor: default; }

/* 面额多送标记 */
.amount-option em { display: block; font-style: normal; color: #d94336; font-size: 11px; font-weight: 800; margin-top: 2px; }
@media (max-width: 640px) {
  .history-table th:nth-child(4), .history-table td:nth-child(4) { display: none; }
}
