:root {
  --bg: #f6f7fb; --card: #ffffff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --accent: #0f766e; --accent-soft: #ccfbf1; --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #b91c1c; --bad-soft: #fee2e2; --sim: #7c3aed; --sim-soft: #ede9fe; --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1120; --card: #111827; --ink: #e5e7eb; --muted: #94a3b8; --line: #1f2937;
    --accent: #2dd4bf; --accent-soft: #134e4a; --ok: #4ade80; --ok-soft: #14532d; --warn: #fbbf24; --warn-soft: #422006;
    --bad: #f87171; --bad-soft: #450a0a; --sim: #a78bfa; --sim-soft: #2e1065; --shadow: none; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
header.top { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--card); }
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #0ea5e9); display: grid; place-items: center; color: #fff; font-weight: 800; }
.brand { font-weight: 700; font-size: 17px; } .tag { color: var(--muted); font-size: 14px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }
.grid { display: grid; gap: 18px; grid-template-columns: 360px 1fr; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h2 { margin: 0 0 12px; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px; }
button { appearance: none; border: 0; border-radius: 10px; padding: 11px 14px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--accent); color: #fff; transition: transform .08s, opacity .2s; }
button:active { transform: scale(.98); } button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.sim { background: var(--sim); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.sim { background: var(--sim-soft); color: var(--sim); } .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.muted { background: var(--line); color: var(--muted); }
/* QR nunca passa da largura útil do cartão (checkout dentro do celular da demo, telas estreitas, barra de rolagem do macOS). */
.qr { background: #fff; border-radius: 12px; padding: 10px; width: min(220px, 100%); height: auto; aspect-ratio: 1 / 1; margin: 8px auto; display: grid; place-items: center; }
.qr svg, .qr img { display: block; width: 100%; height: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; } .kpi .l { font-size: 12px; color: var(--muted); }
ol.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
ol.timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
ol.timeline li { position: relative; padding: 6px 0 10px 34px; animation: pop .35s ease-out both; }
ol.timeline li .dot { position: absolute; left: 4px; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); }
ol.timeline li.ok .dot { border-color: var(--ok); background: var(--ok); } ol.timeline li.warn .dot { border-color: var(--warn); }
ol.timeline li .t { font-weight: 600; } ol.timeline li .d { font-size: 12.5px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.steps .step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps .step:last-child { border-bottom: 0; }
.ico { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.ico.ok { background: var(--ok-soft); color: var(--ok); } .ico.fail { background: var(--bad-soft); color: var(--bad); }
.ico.info { background: var(--accent-soft); color: var(--accent); } .ico.unavailable, .ico.run { background: var(--warn-soft); color: var(--warn); }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
a { color: var(--accent); }
.center { max-width: 460px; margin: 0 auto; text-align: center; }
.big { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.note { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 10px; }
/* v2: console de 3 colunas, moldura de celular, recibo */
.badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
header.top .spacer { flex: 1; }
.grid3 { display: grid; gap: 18px; grid-template-columns: 320px 330px 1fr; align-items: start; }
@media (max-width: 1180px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > .wide { grid-column: 1 / -1; } }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 14px; }
.phone { width: 300px; height: 600px; margin: 0 auto; border-radius: 38px; padding: 12px; background: #0f172a; box-shadow: 0 20px 50px rgba(15,23,42,.25); position: relative; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 90px; height: 20px; border-radius: 12px; background: #0f172a; z-index: 2; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 28px; background: var(--bg); }
.phone .empty { width: 100%; height: 100%; border-radius: 28px; background: var(--card); display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.amount-in { position: relative; }
.amount-in span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.amount-in input { padding-left: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-block { width: 100%; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; }
.hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); margin-bottom: 14px; }
.hero.ok { background: var(--ok-soft); color: var(--ok); } .hero.warn { background: var(--warn-soft); color: var(--warn); }
.hero.bad { background: var(--bad-soft); color: var(--bad); } .hero.run { background: var(--accent-soft); color: var(--accent); }
.hero .big-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: rgba(255,255,255,.55); flex: none; }
.hero h1 { margin: 0; font-size: 20px; } .hero p { margin: 2px 0 0; font-size: 13.5px; opacity: .9; }
.code { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.code .mono { flex: 1; max-height: 3.2em; overflow: hidden; }
.code button { padding: 7px 10px; font-size: 12.5px; }
.check { width: 84px; height: 84px; border-radius: 50%; margin: 18px auto 8px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 42px; font-weight: 800; animation: pop .4s ease-out both; }
.check.warn { background: var(--warn-soft); color: var(--warn); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--line); font-size: 12.5px; font-weight: 600; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.recent { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.recent li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.recent li:last-child { border-bottom: 0; }
.receipt-wrap { max-width: 760px; margin: 0 auto; }
footer.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px; }
.hidden { display: none !important; }
.wide-main { max-width: 1320px; }
.mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; }
.mb0 { margin-bottom: 0; } .mb12 { margin-bottom: 12px; } .mb14 { margin-bottom: 14px; } .m0 { margin: 0 !important; } .pt28 { padding-top: 28px; }
.between { justify-content: space-between; } .justify-center { justify-content: center; }
.col-title { text-align: center; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 4px 0 12px; }
ol.timeline li.placeholder { animation: none; }
.state { margin: 8px 0 4px; } .scan { margin: 4px 0 6px; } .done { margin: 6px 0; font-size: 20px; font-weight: 700; } .strong { font-weight: 600; }
.logo { flex: none; } .badge { white-space: nowrap; }
@media (max-width: 640px) { header.top { padding: 14px 16px; flex-wrap: wrap; } header.top .tag { display: none; } header.top .spacer { flex-basis: 100%; height: 0; } }
@media (prefers-color-scheme: dark) {
  .phone { background: #1e293b; box-shadow: 0 0 0 1px #334155, 0 20px 50px rgba(0,0,0,.5); } .phone::before { background: #1e293b; }
  button:not(.ghost) { color: #04201d; } button.sim { color: #1e0b45; }
}
