* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f7f9;
  color: #1a2433;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  background: #fff;
  border-bottom: 1px solid #e5e9ef;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
header strong { font-size: 18px; color: #005eeb; }
.badge {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 12px;
  background: #fff3d6;
  color: #8a5a00;
}
.badge.live { background: #e3f7ed; color: #0a7a45; }
main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}
#panel {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(20, 40, 80, .08);
  padding: 32px;
}
.summary { border-bottom: 1px solid #eef1f5; padding-bottom: 20px; margin-bottom: 24px; }
.summary small { color: #7b8798; font-size: 13px; }
.summary h1 { font-size: 22px; margin: 6px 0 18px; }
dl { display: grid; grid-template-columns: 110px 1fr; row-gap: 10px; font-size: 14px; }
dt { color: #7b8798; }
dd { color: #1a2433; font-weight: 500; }
h2 { font-size: 17px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: #5a6678; margin-bottom: 7px; }
input[type=number] {
  width: 100%;
  padding: 13px 14px;
  font-size: 18px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  outline: none;
}
input[type=number]:focus { border-color: #005eeb; box-shadow: 0 0 0 3px rgba(0, 94, 235, .12); }
.money { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.money b { font-size: 18px; color: #5a6678; }
button {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #005eeb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { background: #004ec4; }
button:disabled { opacity: .6; cursor: not-allowed; }
.payment-error { color: #c02b2b; font-size: 13px; margin: 10px 0; min-height: 1em; }
#message { display: block; text-align: center; color: #c02b2b; font-size: 13px; margin-top: 14px; }
.loading { text-align: center; color: #7b8798; padding: 40px 0; }

/* 结果页 */
.state-mark { display: inline-flex; margin-bottom: 12px; }
.state-mark.success { color: #0a9c54; }
.state-mark.failure { color: #c02b2b; }
.payment-result h1 { font-size: 22px; margin-bottom: 20px; }
.payment-result .facts { margin-bottom: 24px; }
.payment-result a, .payment-result button.secondary {
  display: block; text-align: center; text-decoration: none;
  padding: 12px; margin-top: 10px; border-radius: 8px;
  color: #005eeb; border: 1px solid #cfd8e3; background: #fff;
}
.payment-spinner {
  display: inline-block; width: 26px; height: 26px;
  border: 3px solid #dfe6ef; border-top-color: #005eeb;
  border-radius: 50%; animation: spin .8s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 模拟审批页 */
.approve-card { text-align: center; }
.approve-card .paypal-logo {
  font-size: 26px; font-weight: 700; font-style: italic; color: #003087; margin-bottom: 8px;
}
.approve-card .paypal-logo span { color: #009cde; }
.approve-card .amt { font-size: 34px; font-weight: 700; margin: 18px 0 6px; }
.approve-card .desc { color: #7b8798; font-size: 14px; margin-bottom: 26px; }
.approve-card .sandbox-note {
  background: #fff3d6; color: #8a5a00; font-size: 12px;
  padding: 10px; border-radius: 8px; margin-bottom: 20px;
}
.approve-card button.ghost {
  background: #fff; color: #5a6678; border: 1px solid #cfd8e3; margin-top: 10px;
}

/* ===== v4.1 ACDC 卡收款 ===== */
input.demo-input {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1px solid #cfd8e3; border-radius: 8px; outline: none;
  margin-bottom: 16px; font-family: inherit;
}
input.demo-input:focus { border-color: #005eeb; box-shadow: 0 0 0 3px rgba(0,94,235,.12); }
.amount-line { font-size: 15px; color: #1a2433; font-weight: 600; margin: 4px 0 20px; }
.card-checkout { margin-top: 22px; border-top: 1px solid #eef1f5; padding-top: 22px; }
.card-checkout h3 { font-size: 17px; margin-bottom: 18px; }
.pp-field {
  min-height: 46px; border: 1px solid #cfd8e3; border-radius: 8px;
  padding: 4px 12px; margin-bottom: 14px; display: flex; align-items: center;
}
.pp-field:focus-within { border-color: #005eeb; box-shadow: 0 0 0 3px rgba(0,94,235,.12); }
.pp-field iframe { width: 100% !important; }
.secure-note {
  font-size: 12px; color: #7b8798; line-height: 1.6;
  background: #f4f7f9; padding: 10px 12px; border-radius: 8px; margin: 4px 0 18px;
}
.demo-note {
  font-size: 12px; color: #8a5a00; line-height: 1.6;
  background: #fff3d6; padding: 10px 12px; border-radius: 8px; margin-bottom: 18px;
}
.result-note { font-size: 13px; color: #7b8798; margin: 8px 0 16px; }
.payment-result .facts { margin: 0 0 24px; }
