:root {
  --bg: #090b10;
  --ink: #f4f6f8;
  --muted: #a7b0bb;
  --card: #14181f;
  --card-2: #1c222b;
  --line: #2c343f;
  --accent: #d7dde6;
  --accent-ink: #101318;
  --accent-dark: #ffffff;
  --danger: #ffb4ab;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -10%, #1c2633 0%, transparent 55%),
    var(--bg);
  font-family: Outfit, "Segoe UI", sans-serif;
  line-height: 1.45;
}

h1, h2, .amount, .brand, .stats strong {
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 560;
  letter-spacing: -0.04em;
}

h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.05; margin: 0 0 8px; }
h1.quiet { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
h2 { font-size: 26px; margin: 0; }

p { margin: 0; }

a { color: #d5deea; }

button, .button, input, textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 3;
}

.skip:focus { top: 12px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #f4f6f8;
  color: #101318;
  font-family: Outfit, sans-serif;
  font-size: 16px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar nav a { color: inherit; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.topbar form { margin: 0; }

.nav-note { color: var(--muted); }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 12px auto 64px;
}

.narrow { width: min(480px, calc(100% - 32px)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.page-head { margin: 8px 0 18px; }

.eyebrow {
  margin: 0 0 6px;
  color: #c5d0dc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead { color: var(--muted); margin: 8px 0 18px; }

.fine { color: var(--muted); font-size: 14px; margin-top: 14px; }

.hint, .meta { color: var(--muted); font-size: 14px; }

.pix-fixo { display: grid; gap: 10px; margin: 0 0 18px; }
.pix-fixo div { display: grid; gap: 2px; }
.pix-fixo dt { color: var(--muted); font-size: 13px; }
.pix-fixo dd { margin: 0; font-weight: 600; }

.optional { font-weight: 400; color: var(--muted); }

.stack { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d1015;
  color: var(--ink);
}

textarea { min-height: 92px; resize: vertical; }

button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button:hover { background: var(--accent-dark); }

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.ghost:hover { background: var(--card-2); }

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid #6e3a36;
}

button.danger:hover { background: #2a1715; }

.linkish {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.linkish:hover { background: transparent; }

.flash {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #163028;
  color: #c9f3e2;
}

.flash-erro { background: #3a1d1b; color: #ffd0cb; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stats article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.stats span { display: block; color: var(--muted); font-size: 13px; }
.stats strong { font-size: 32px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.search {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 16px 0;
}

.search label { flex: 1; }

.people { display: grid; gap: 14px; }

.person-top, .row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.person-top { align-items: start; margin-bottom: 8px; }
.row { align-items: end; flex-wrap: wrap; margin-top: 12px; }
.grow { flex: 1; min-width: 180px; }

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: #2a3038;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.badge[data-status="aberto"] { background: #3a3424; color: #f3ddb0; }
.badge[data-status="aprovado"] { background: #1a3330; color: #b7f0df; }
.badge[data-status="pago"] { background: #1c2c40; color: #d4e6fb; }
.badge[data-status="recusado"] { background: #3a2220; color: #ffd0cb; }

.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.steps li {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 999px;
  background: #222830;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.steps li.done { background: #1a3330; color: #b7f0df; }
.steps li.current { background: var(--accent); color: var(--accent-ink); }
.steps li.failed { background: #3a2220; color: #ffd0cb; }

.amount {
  font-size: clamp(40px, 8vw, 56px);
  margin: 4px 0 8px;
}

.qr {
  display: grid;
  place-items: center;
  margin: 8px 0 16px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.qr img { width: min(240px, 100%); height: auto; }

.pay-box { display: grid; gap: 8px; margin-top: 14px; }

.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; }

.code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  word-break: break-all;
}

.instructions { margin: 16px 0 0; padding-left: 18px; color: var(--ink); }
.instructions li + li { margin-top: 6px; }

details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
details textarea { margin-top: 8px; }

.empty { text-align: left; }

:focus-visible {
  outline: 2px solid #d7dde6;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .stats, .grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .topbar, .search, .copy-row { flex-direction: column; align-items: stretch; }
  .stats, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}
