:root {
  --canvas: #070b0f;
  --surface: #0d151d;
  --surface-soft: #101a23;
  --surface-raised: #131e28;
  --heading: #f7fafc;
  --text: #d6e0e8;
  --muted: #8fa1b2;
  --line: #26343f;
  --line-strong: #3a4b59;
  --accent: #ffb31a;
  --accent-hover: #ffc344;
  --accent-soft: rgba(255, 179, 26, .12);
  --green: #7dea16;
  --cyan: #20c8ff;
  --danger: #ff6877;
  --shadow: 0 28px 70px -34px rgba(0, 0, 0, .9), 0 0 36px -24px rgba(255, 179, 26, .5);
  --focus: 0 0 0 3px rgba(32, 200, 255, .2);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--canvas);
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
button, input { font: inherit; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }

.ambient { position: fixed; z-index: -2; border-radius: 50%; pointer-events: none; filter: blur(3px); }
.ambient--one { width: 560px; height: 560px; top: -370px; right: -170px; background: radial-gradient(circle, rgba(125,234,22,.12), transparent 68%); }
.ambient--two { width: 620px; height: 620px; bottom: -420px; left: -270px; background: radial-gradient(circle, rgba(255,179,26,.16), transparent 70%); }

.topbar {
  width: min(1180px, calc(100% - 48px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--heading); text-decoration: none; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: #090d11; background: var(--accent); box-shadow: 0 8px 26px -10px rgba(255,179,26,.9); font: 800 19px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.brand__mark--small { width: 30px; height: 30px; border-radius: 6px; font-size: 14px; }
.brand__copy { display: grid; line-height: 1.05; }
.brand__copy strong { font-size: 15px; letter-spacing: -.15px; }
.brand__copy small { margin-top: 4px; color: var(--muted); font: 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; letter-spacing: .12em; }
.security-label, .secure-chip { display: inline-flex; align-items: center; gap: 7px; color: #7890a4; font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.security-label svg { width: 17px; height: 17px; fill: var(--green); }
.secure-chip { padding: 7px 9px; color: var(--green); border: 1px solid rgba(125,234,22,.25); border-radius: 5px; background: rgba(125,234,22,.06); }

.page-shell {
  width: min(1100px, calc(100% - 48px));
  margin: 32px auto 54px;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(510px, 1.12fr);
  align-items: center;
  gap: 72px;
}
.intro { padding: 20px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--cyan); background: rgba(32,200,255,.06); border: 1px solid rgba(32,200,255,.35); border-radius: 5px; font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(125,234,22,.12); }
.intro h1 { margin: 24px 0 18px; color: var(--heading); font-size: clamp(40px, 4.4vw, 56px); font-weight: 720; letter-spacing: -2px; line-height: 1.03; }
.intro h1 span { color: var(--green); }
.intro__lead { max-width: 500px; margin: 0; color: #a5b4c2; font-size: 16px; line-height: 1.62; }

.method-preview { margin-top: 33px; display: grid; gap: 9px; }
.method-preview__item { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; min-height: 67px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 7px; background: rgba(13,21,29,.72); }
.method-preview__item--active { border-color: rgba(32,200,255,.55); background: rgba(16,26,35,.92); box-shadow: 0 16px 35px -30px rgba(32,200,255,1); }
.method-preview__icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #0a1117; }
.method-preview__icon svg { width: 22px; height: 22px; fill: #c8d7e4; }
.method-preview__icon--sbp { background: rgba(32,200,255,.08); border-color: rgba(32,200,255,.25); }
.method-preview__icon--sbp svg { fill: var(--cyan); }
.method-preview__item b { display: block; color: var(--heading); font-size: 13px; }
.method-preview__item small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.method-preview__check { width: 21px; height: 21px; display: grid; place-items: center; color: #091007; background: var(--green); border-radius: 50%; font-size: 12px; font-weight: 900; }
.trust-row { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 18px; color: #718698; font-size: 11px; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; fill: #6f8395; }

.payment-card { position: relative; padding: 31px 34px 27px; background: linear-gradient(145deg, #111a22, #0b1218); border: 1px solid #2c3a45; border-radius: 9px; box-shadow: var(--shadow); }
.payment-card::before { content: ""; position: absolute; left: 32px; right: 32px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 22px rgba(255,179,26,.6); }
.payment-card::after { content: "payment.create()"; position: absolute; right: 24px; bottom: -21px; color: #24333f; font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.payment-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.step-label, .code-label { margin: 0 0 6px; color: var(--accent); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.payment-card h2, .receipt h2 { margin: 0; color: var(--heading); font-size: 24px; letter-spacing: -.4px; }
.provider-badge { margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.provider-badge strong { color: var(--heading); font-size: 12px; }

.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; color: #cbd7e1; font-size: 12px; font-weight: 650; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] { width: 100%; height: 47px; padding: 0 13px; color: var(--heading); caret-color: var(--cyan); background: #081016; border: 1px solid var(--line-strong); border-radius: 5px; outline: none; font-size: 15px; transition: border-color .16s, box-shadow .16s, background .16s; }
.field input::placeholder { color: #586b7b; }
.field input:hover { border-color: #506271; }
.field input:focus { border-color: var(--cyan); box-shadow: var(--focus); background: #0a131a; }
.field.is-invalid input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,104,119,.1); }
.field__hint { margin-top: 6px; color: var(--muted); font-size: 11px; }
.field__error { min-height: 16px; margin-top: 4px; color: var(--danger); font-size: 11px; }
.amount-field { margin-bottom: 19px; }
.amount-input-wrap { position: relative; }
.amount-input-wrap input { height: 61px !important; padding-right: 58px !important; font-size: 28px !important; font-weight: 650; font-variant-numeric: tabular-nums; }
.amount-currency { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); color: var(--accent); font-size: 23px; pointer-events: none; }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; color: #718394; font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; }
.form-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 13px; row-gap: 8px; }

.payment-switch { position: relative; min-height: 65px; margin-top: 17px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: #0a1218; cursor: pointer; transition: border-color .16s, background .16s; }
.payment-switch:has(input:checked) { border-color: rgba(125,234,22,.45); background: rgba(125,234,22,.06); }
.payment-switch__title { display: block; color: var(--heading); font-size: 13px; font-weight: 650; }
.payment-switch__subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.payment-switch input, .check-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 42px; height: 24px; flex: 0 0 auto; padding: 3px; border-radius: 99px; background: #394a57; transition: background .18s, box-shadow .18s; }
.switch-ui span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #dfe8ee; transition: transform .18s; }
.payment-switch input:checked + .switch-ui { background: var(--green); }
.payment-switch input:checked + .switch-ui span { transform: translateX(18px); background: #10170c; }
.payment-switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }

.consents { margin-top: 17px; display: grid; gap: 11px; }
.check-row { position: relative; display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; color: #8da0b1; font-size: 11px; line-height: 1.5; cursor: pointer; }
.checkbox-ui { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #536572; border-radius: 3px; background: #081016; transition: .16s; }
.checkbox-ui svg { width: 13px; height: 13px; fill: none; stroke: #0a1007; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.65); transition: .16s; }
.check-row input:checked + .checkbox-ui { background: var(--green); border-color: var(--green); }
.check-row input:checked + .checkbox-ui svg { opacity: 1; transform: scale(1); }
.check-row input:focus-visible + .checkbox-ui { box-shadow: var(--focus); }
.check-row.is-invalid .checkbox-ui { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,104,119,.08); }
.check-row a { color: var(--cyan); font-weight: 650; }

.form-status { margin-top: 14px; padding: 10px 12px; color: #ffc0c7; background: rgba(255,104,119,.08); border: 1px solid rgba(255,104,119,.3); border-radius: 5px; font-size: 12px; }
.submit-button { width: 100%; min-height: 51px; margin-top: 19px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #0b0e10; background: var(--accent); border: 0; border-radius: 6px; box-shadow: 0 13px 30px -16px rgba(255,179,26,1); cursor: pointer; font-size: 14px; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.submit-button:hover { background: var(--accent-hover); box-shadow: 0 16px 34px -15px rgba(255,179,26,1); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: none; box-shadow: var(--focus), 0 13px 30px -16px rgba(255,179,26,1); }
.submit-button:disabled { background: #7e652f; cursor: wait; transform: none; }
.submit-button__amount:empty { display: none; }
.submit-button__amount::before { content: "·"; margin-right: 9px; opacity: .55; }
.submit-button__arrow { width: 17px; height: 17px; fill: currentColor; }
.submit-button__loader { display: none; width: 17px; height: 17px; border: 2px solid rgba(8,12,15,.35); border-top-color: #080c0f; border-radius: 50%; animation: spin .75s linear infinite; }
.submit-button.is-loading .submit-button__loader { display: block; }
.submit-button.is-loading .submit-button__arrow, .submit-button.is-loading .submit-button__amount { display: none; }
.submit-note { margin: 11px 0 0; display: flex; align-items: center; justify-content: center; gap: 5px; color: #75899a; font-size: 11px; text-align: center; }
.submit-note svg { width: 14px; height: 14px; fill: #617687; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { width: min(1100px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 28px; display: flex; align-items: center; justify-content: space-between; color: #5f7486; font-size: 10px; }
.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2,5,8,.8); backdrop-filter: blur(7px); }
.modal__panel { position: relative; width: min(430px, 100%); padding: 34px; color: var(--text); background: var(--surface); border: 1px solid #33424e; border-radius: 9px; box-shadow: 0 35px 90px rgba(0,0,0,.7), 0 0 40px -25px rgba(125,234,22,.7); text-align: center; animation: modal-in .22s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal__close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; color: var(--muted); background: #17222b; border: 0; border-radius: 50%; cursor: pointer; font-size: 22px; }
.modal__success { width: 34px; height: 34px; margin: 0 auto 13px; display: grid; place-items: center; color: #091007; background: var(--green); border-radius: 50%; font-weight: 900; }
.modal__panel h2 { margin: 0; color: var(--heading); font-size: 27px; }
.modal__panel > p:not(.step-label):not(.payment-wait) { max-width: 330px; margin: 10px auto 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.qr-frame { width: 244px; height: 244px; margin: 0 auto; padding: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.qr-frame img { display: block; width: 224px; height: 224px; }
.submit-button--link { margin-top: 18px; }
.payment-wait { margin: 13px 0 0; color: var(--cyan); font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.payment-wait.is-confirmed { color: var(--green); }
.payment-wait.is-error { color: var(--danger); }
.modal__panel small { display: block; margin-top: 7px; color: #718596; font: 10.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
body.modal-open { overflow: hidden; }
.result-toast { position: fixed; z-index: 90; top: 22px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); padding: 13px 16px; color: #bdf58a; background: #132214; border: 1px solid rgba(125,234,22,.35); border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; text-align: center; }
.result-toast.is-error { color: #ffc0c7; background: #251217; border-color: rgba(255,104,119,.3); }

.legal-page { min-height: 100vh; padding: 60px 24px; display: grid; place-items: center; }
.legal-card { width: min(720px, 100%); padding: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.legal-card h1 { margin: 16px 0; color: var(--heading); font-size: 36px; letter-spacing: -.8px; }
.legal-card p { color: var(--muted); line-height: 1.65; }
.placeholder-badge { display: inline-flex; padding: 6px 8px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255,179,26,.28); border-radius: 4px; font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.back-link, .outline-link { display: inline-flex; margin-top: 22px; color: var(--cyan); font-weight: 650; text-decoration: none; }

.success-page { min-height: 100vh; }
.success-shell { width: min(990px, calc(100% - 48px)); min-height: calc(100vh - 78px); margin: 0 auto; padding: 70px 0 90px; display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 72px; }
.success-copy h1 { margin: 18px 0 13px; color: var(--heading); font-size: clamp(42px, 5vw, 62px); line-height: .98; letter-spacing: -2px; }
.success-copy > p:not(.code-label) { max-width: 430px; color: var(--muted); line-height: 1.6; }
.success-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; color: #081005; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 8px rgba(125,234,22,.08), 0 0 34px -12px rgba(125,234,22,.9); font-size: 27px; font-weight: 900; }
.success-icon:not(.is-confirmed) { color: #11100b; background: var(--accent); box-shadow: 0 0 0 8px rgba(255,179,26,.08), 0 0 34px -12px rgba(255,179,26,.9); }
.success-icon.is-error { color: #180609; background: var(--danger); box-shadow: 0 0 0 8px rgba(255,104,119,.08), 0 0 34px -12px rgba(255,104,119,.9); }
.outline-link { gap: 12px; padding: 12px 15px; border: 1px solid rgba(32,200,255,.3); border-radius: 5px; font-size: 13px; }
.receipt { position: relative; padding: 30px; background: linear-gradient(145deg,#111b23,#0c1319); border: 1px solid #34424d; border-radius: 8px; box-shadow: var(--shadow); }
.receipt::before { content: ""; position: absolute; top: -1px; left: 25px; right: 25px; height: 2px; background: linear-gradient(90deg,transparent,var(--green),transparent); }
.receipt__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px dashed #34434f; }
.receipt__status { padding: 6px 8px; color: var(--cyan); background: rgba(32,200,255,.07); border: 1px solid rgba(32,200,255,.22); border-radius: 4px; font: 10.5px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; }
.receipt__status.is-confirmed { color: var(--green); background: rgba(125,234,22,.06); border-color: rgba(125,234,22,.25); }
.receipt__status.is-pending { color: var(--accent); background: var(--accent-soft); border-color: rgba(255,179,26,.25); }
.receipt__status.is-error { color: var(--danger); background: rgba(255,104,119,.08); border-color: rgba(255,104,119,.28); }
.receipt__rows { margin: 0; }
.receipt__rows div { display: grid; grid-template-columns: 145px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.receipt__rows dt { color: var(--muted); font-size: 12px; }
.receipt__rows dd { margin: 0; color: var(--heading); font: 12px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; text-align: right; overflow-wrap: anywhere; }
.receipt__rows div:first-child dd { color: var(--green); font-size: 19px; font-weight: 800; }
.receipt__footer { display: flex; align-items: center; gap: 11px; padding-top: 22px; }
.receipt__footer p { margin: 0; color: var(--heading); font-size: 12px; }
.receipt__footer small { color: var(--muted); font-weight: 400; }

@media (max-width: 920px) {
  .page-shell, .success-shell { grid-template-columns: 1fr; gap: 38px; width: min(620px, calc(100% - 36px)); }
  .page-shell { margin-top: 8px; }
  .success-shell { padding-top: 50px; }
  .intro, .success-copy { text-align: center; }
  .intro__lead, .success-copy > p:not(.code-label) { margin-left: auto; margin-right: auto; }
  .method-preview { max-width: 500px; margin-left: auto; margin-right: auto; text-align: left; }
  .trust-row { justify-content: center; }
  .topbar, .footer { width: min(620px, calc(100% - 36px)); }
  .success-icon { margin-left: auto; margin-right: auto; }
  .outline-link { justify-content: center; }
}
@media (max-width: 600px) {
  .topbar { height: 68px; }
  .security-label { font-size: 0; gap: 0; }
  .security-label svg { width: 19px; height: 19px; }
  .secure-chip { display: none; }
  .page-shell { width: calc(100% - 24px); margin-bottom: 36px; gap: 27px; }
  .intro { padding-top: 13px; }
  .intro h1 { margin-top: 18px; font-size: 37px; letter-spacing: -1.4px; }
  .intro__lead { font-size: 14px; }
  .method-preview { margin-top: 24px; }
  .payment-card { padding: 25px 19px 23px; }
  .provider-badge { display: none; }
  .field-grid { grid-template-columns: 1fr; row-gap: 5px; }
  .field input[type="text"], .field input[type="tel"], .field input[type="email"] { height: 49px; font-size: 16px; }
  .submit-button { min-height: 54px; }
  .footer { width: calc(100% - 36px); align-items: flex-start; gap: 16px; }
  .footer nav { flex-direction: column; gap: 7px; text-align: right; }
  .modal__panel { padding: 31px 20px 26px; }
  .qr-frame { width: 224px; height: 224px; }
  .qr-frame img { width: 204px; height: 204px; }
  .legal-card { padding: 28px 22px; }
  .legal-card h1 { font-size: 29px; }
  .success-shell { width: calc(100% - 24px); padding: 40px 0 60px; gap: 38px; }
  .success-copy h1 { font-size: 42px; }
  .receipt { padding: 24px 18px; }
  .receipt__head { display: grid; }
  .receipt__rows div { grid-template-columns: 110px 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
