:root {
  --bg: #EEEFF2; --card: #ffffff; --ink: #111318; --muted: #5F6469; --faint: #9AA0A6;
  --line: #C9CDD3; --rule: #D5D8DD; --red: #A94545; --red-dark: #8f3a3a; --green: #1f8f4e;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }

.top { max-width: 1120px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { display: block; height: 40px; width: auto; }
.top-phone { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.top-phone:hover { color: var(--ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 24px 56px 24px; display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 560px); justify-content: space-between; gap: 48px; }

.summary h1 { margin: 12px 0 10px 0; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.summary .sub { margin: 0 0 24px 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 440px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--faint); }
.field input { height: 50px; width: 100%; border: 1.5px solid var(--line); border-radius: 4px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,19,24,.08); }
.field input.bad { border-color: var(--red); }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 0; height: 50px; display: flex; align-items: center; color: var(--muted); font-size: 16px; }
.money input { padding-left: 28px; }

.totals { margin: 8px 0 0 0; padding: 18px 0 0 0; border-top: 1px solid var(--rule); }
.totals div { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px 0; font-size: 15px; color: var(--muted); }
.totals dt { margin: 0; }
.totals dd { margin: 0; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.totals .grand { padding-top: 12px; border-top: 1px solid var(--rule); font-size: 17px; }
.totals .grand dt { color: var(--ink); font-weight: 600; }
.totals .grand dd { font-size: 22px; font-weight: 700; }
.note { font-size: 13px; line-height: 1.5; color: var(--faint); margin: 12px 0 0 0; }

.card { background: var(--card); border-radius: 6px; box-shadow: 0 1px 2px rgba(17,19,24,.04), 0 16px 48px rgba(17,19,24,.08); padding: 32px 36px 36px 36px; align-self: start; }
.card h2 { margin: 0 0 20px 0; padding-bottom: 16px; font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--rule); }

.cardwrap { position: relative; }
.cardwrap input { padding-right: 150px; }
.brands { position: absolute; right: 10px; top: 0; height: 50px; display: flex; align-items: center; gap: 4px; }
.brands img { height: 22px; width: auto; border-radius: 3px; opacity: .35; transition: opacity .15s ease; }
.brands img.on { opacity: 1; }
.brands.none img { opacity: .8; }

.turnstile { margin: 4px 0 16px 0; min-height: 65px; }

.pay { width: 100%; height: 54px; border: 0; border-radius: 4px; background: var(--red); color: #fff; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.pay:hover { background: var(--red-dark); }
.pay:disabled { background: #c9a0a0; cursor: not-allowed; }
.pay.busy { cursor: wait; }
.fine { margin: 14px 0 0 0; font-size: 12.5px; line-height: 1.5; color: var(--faint); text-align: center; }

.alert { border: 1px solid #e3b4b4; background: #fbf1f1; color: #7a2b2b; border-radius: 4px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 18px; }

.done { text-align: center; padding: 8px 0 0 0; }
.done .check { width: 56px; height: 56px; margin: 0 auto 14px auto; border-radius: 50%; background: var(--green); color: #fff; font-size: 28px; line-height: 56px; }
.done h2 { border: 0; padding: 0; margin-bottom: 6px; }
.done > p { margin: 0 0 18px 0; color: var(--muted); }
.receipt { margin: 0 0 16px 0; padding: 14px 0 4px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: left; }
.receipt div { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; }
.receipt dt { color: var(--muted); margin: 0; }
.receipt dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; text-align: right; }
.linkbtn { display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--red); }

.foot { max-width: 1120px; margin: 0 auto; padding: 0 24px 32px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.foot a { color: var(--faint); text-decoration: none; margin-left: 14px; }
.foot a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .summary h1 { font-size: 30px; }
  .card { padding: 24px 20px 28px 20px; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 .field:last-child { grid-column: 1 / -1; }
  .brands { display: none; }
  .cardwrap input { padding-right: 14px; }
}
