:root { --pay-primary: #07c160; }
* { box-sizing: border-box; }
body.pay-body { margin: 0; min-height: 100vh; background: #f3f6f4; color: #111827; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
.pay-bg { position: fixed; inset: 0; background: radial-gradient(700px 420px at 10% -10%, rgba(7,193,96,.18), transparent 60%), radial-gradient(700px 420px at 110% 20%, rgba(14,165,233,.12), transparent 60%); pointer-events: none; }
.pay-shell { position: relative; width: min(100%, 480px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; }
.pay-brand { display: flex; align-items: center; gap: 10px; padding: 8px 4px 18px; color: #334155; font-weight: 700; font-size: 14px; }
.pay-logo, .pay-logo-mark { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.pay-logo-mark { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--pay-primary), #0ea5e9); color: #fff; font-weight: 800; }
.pay-card { background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; padding: 22px 20px; box-shadow: 0 22px 60px rgba(15,23,42,.1); backdrop-filter: blur(12px); animation: pay-in .35s ease both; }
.pay-card-center { text-align: center; }
.pay-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(7,193,96,.1); color: #047857; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; }
.pay-title { font-size: 22px; line-height: 1.3; margin: 14px 0 6px; font-weight: 800; letter-spacing: -.4px; }
.pay-subtitle { color: #6b7280; font-size: 13px; margin: 0 0 18px; line-height: 1.6; }
.pay-amount { font-size: 38px; font-weight: 800; letter-spacing: -1.5px; color: #0f172a; margin: 12px 0 16px; }
.pay-amount small { font-size: 20px; margin-right: 2px; }
.pay-field { text-align: left; margin: 16px 0; }
.pay-field > label { display: block; color: #64748b; font-size: 12px; margin-bottom: 8px; font-weight: 600; }
.pay-input-wrap { display: flex; align-items: center; border: 1.5px solid #e2e8f0; background: #f8fafc; border-radius: 14px; padding: 0 14px; transition: border-color .2s, box-shadow .2s; }
.pay-input-wrap:focus-within { border-color: var(--pay-primary); box-shadow: 0 0 0 4px rgba(7,193,96,.1); background: #fff; }
.pay-input-wrap span { font-size: 22px; font-weight: 700; color: #334155; }
.pay-input-wrap input { border: 0; outline: 0; background: transparent; width: 100%; padding: 15px 8px; font-size: 28px; font-weight: 700; color: #0f172a; }
.pay-range { color: #94a3b8; font-size: 11px; margin-top: 6px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-card { border: 1.5px solid #e2e8f0; background: #fff; border-radius: 14px; padding: 14px 12px; text-align: left; cursor: pointer; transition: all .18s; }
.option-card:hover { border-color: #86efac; }
.option-card.selected { border-color: var(--pay-primary); background: rgba(7,193,96,.06); box-shadow: 0 0 0 3px rgba(7,193,96,.08); }
.option-label { display: block; font-weight: 700; font-size: 14px; color: #0f172a; }
.option-amount { display: block; color: #64748b; font-size: 12px; margin-top: 3px; }
.option-custom .option-label { color: #047857; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.quick-amounts button { border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 10px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.quick-amounts button:hover { border-color: #86efac; color: #047857; }
.btn-pay { width: 100%; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--pay-primary), #0aa653); color: #fff; font-size: 16px; font-weight: 800; padding: 15px 18px; cursor: pointer; box-shadow: 0 12px 24px rgba(7,193,96,.22); transition: transform .1s, opacity .2s; display: flex; align-items: center; justify-content: center; min-height: 52px; text-decoration: none; }
.btn-pay:active { transform: scale(.99); }
.btn-pay:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-pay-secondary { display: inline-flex; align-items: center; justify-content: center; width: 100%; border: 1px solid #dbe3ea; border-radius: 14px; background: #fff; color: #334155; padding: 13px 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-pay-secondary:hover { border-color: #94a3b8; }
.btn-pay-loading i { animation: spin 1s linear infinite; margin-right: 6px; }
.pay-alert { border-radius: 12px; padding: 11px 12px; font-size: 12px; line-height: 1.5; margin: 12px 0; text-align: left; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.pay-alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.pay-test-badge { display: inline-block; background: #fff7ed; color: #c2410c; border: 1px dashed #fdba74; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; margin-bottom: 12px; }
.debug-pay-box { margin-top: 16px; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 12px; background: #f8fafc; text-align: left; }
.debug-pay-title { font-size: 11px; color: #64748b; margin-bottom: 8px; font-weight: 700; }
.btn-debug-success, .btn-debug-fail { flex: 1; border: 1px solid #e2e8f0; background: #fff; border-radius: 9px; padding: 8px; font-size: 12px; cursor: pointer; }
.btn-debug-success { color: #047857; border-color: #a7f3d0; }
.btn-debug-fail { color: #b91c1c; border-color: #fecaca; }
.pay-meta { display: flex; justify-content: space-between; gap: 10px; color: #94a3b8; font-size: 11px; margin-top: 16px; }
.pay-secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: #94a3b8; font-size: 11px; margin-top: 18px; }
.pay-steps { text-align: left; display: grid; gap: 7px; color: #475569; font-size: 12px; margin: 14px 0; }
.pay-steps span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(7,193,96,.12); color: #047857; font-size: 11px; font-weight: 800; margin-right: 8px; }
.qr-box { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px dashed #dbe3ea; border-radius: 18px; padding: 14px; margin: 14px auto; width: 228px; height: 228px; }
.qr-box canvas, .qr-box img { max-width: 100%; height: auto; }
.pay-copy-input { width: 100%; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 10px; padding: 10px 12px; font-size: 11px; color: #64748b; margin: 6px 0 10px; }
.pay-hint { color: #94a3b8; font-size: 11px; margin-top: 12px; }
.pay-footer { margin-top: auto; padding: 22px 4px 0; text-align: center; color: #94a3b8; font-size: 10px; line-height: 1.8; }
body.pay-embed { background: transparent; }
body.pay-embed .pay-shell { width: 100%; min-height: 0; padding: 8px; }
body.pay-embed .pay-card { box-shadow: none; border: 0; padding: 10px; background: #fff; }
.pay-embed-card .qr-box { width: 210px; height: 210px; margin: 8px auto; }
.toast-copy { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 12px; z-index: 9999; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast-copy.show { opacity: 1; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 8px auto 16px; font-size: 30px; }
.result-success { background: rgba(7,193,96,.12); color: #059669; }
.result-pending { background: rgba(14,165,233,.12); color: #0284c7; }
.result-pending i { animation: spin 1s linear infinite; }
.result-fail { background: #fef2f2; color: #dc2626; }
.result-amount { font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 10px 0; }
.result-meta { color: #94a3b8; font-size: 12px; line-height: 1.8; margin-bottom: 18px; }
.result-card .btn-pay, .result-card .btn-pay-secondary { margin-top: 4px; }
.hidden, .d-none { display: none !important; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.mt-3 { margin-top: 16px; }
@keyframes pay-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 380px) { .pay-card { padding: 22px 16px; } .pay-amount { font-size: 36px; } .option-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
