:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --ground: #f4f6fb;
  --card: #ffffff;
  --brand: #1d4ed8;
  --brand-dark: #1e40af;
  --ok: #15803d;
  --warn: #b45309;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand img { height: 36px; width: auto; }

.secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ok);
}

.secure svg { width: 16px; height: 16px; fill: currentColor; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

.state { text-align: center; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.amount {
  margin: 4px 0 20px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.summary {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary dt { color: var(--muted); }

.summary dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.title { margin: 12px 0 4px; font-size: 18px; font-weight: 700; }

.muted { margin: 8px 0 0; color: var(--muted); }

button { font: inherit; cursor: pointer; }

.primary {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
}

.state > .primary:first-of-type { margin-top: 20px; }

.primary:hover { background: var(--brand-dark); }

.primary:disabled { opacity: 0.6; cursor: progress; }

.primary:focus-visible, .link:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 2px;
}

.link {
  margin-top: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 8px auto 4px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.badge {
  width: 48px;
  height: 48px;
  margin: 4px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.badge.ok { background: var(--ok); }
.badge.warn { background: var(--warn); }

.foot {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.foot p { margin: 0 0 8px; }

.foot a { color: inherit; }

.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }

.error {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 14px;
  text-align: left;
}
