:root {
  --ink: #0B1220; --muted: #475467; --subtle: #667085; --border: #E4E7EC; --divider: #EAECF0;
  --canvas: #F7F8FA; --surface: #fff; --surface-2: #F2F4F7;
  --brand: #0F172A; --brand-ink: #fff; --ok: #067647; --ok-bg: #ECFDF3; --err: #B42318; --err-bg: #FEF3F2;
  --radius: 14px; --font: Inter, system-ui, -apple-system, Segoe UI, sans-serif; --font-head: "Inter Tight", Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #F2F4F7; --muted: #B8C0CC; --subtle: #98A2B3; --border: #2A3242; --divider: #222A38; --canvas: #0B0F17; --surface: #121826; --surface-2: #1A2130; --ok: #6CE9A6; --ok-bg: #0B2E1E; --err: #FDA29B; --err-bg: #3A1512; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 26px; } h2 { font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; flex-direction: column; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.narrow { width: 100%; max-width: 420px; }

.brandline { display: flex; align-items: center; gap: 10px; font: 700 20px/1 var(--font-head); letter-spacing: -0.02em; margin-bottom: 22px; }
.brandline .mark { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); }
.brandline .ok { color: var(--brand); }
.brandline.brand-conta .mark { background: #0F172A; }
@media (prefers-color-scheme: dark) { .brandline.brand-conta .mark { background: #1E293B; box-shadow: inset 0 0 0 1px #334155; } .brandline.brand-conta .ok { color: #2DD4BF; filter: none; } }
@media (prefers-color-scheme: dark) { .brandline .ok { filter: brightness(1.6); } }

label { display: block; font-weight: 500; font-size: 14px; margin: 14px 0 6px; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); width: 100%; margin-top: 18px; }
.btn-primary:hover { background: var(--brand); filter: brightness(1.12); }
.btn-primary:disabled { opacity: .6; cursor: default; }
@media (prefers-color-scheme: dark) { .btn-primary { --brand: #E6E9F0; --brand-ink: #0B1220; } .brand-statusok .btn-primary { --brand: #5B4BEA; --brand-ink: #fff; } .brand-mailok .btn-primary { --brand: #3B5FE0; --brand-ink: #fff; } }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-top: 14px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.err { background: var(--err-bg); color: var(--err); }
.foot { font-size: 13px; color: var(--subtle); text-align: center; max-width: 420px; }
.foot a { color: var(--subtle); }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--ink); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Minha conta */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.topbar .brandline { margin: 0; font-size: 18px; }
.topbar .grow { flex: 1; }
.user-chip { font-size: 14px; color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { max-width: 880px; margin: 0 auto; padding: 32px 16px 64px; display: grid; gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.product { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.product .pmark { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.product .pbody { flex: 1; min-width: 0; }
.product h3 { font-size: 16px; margin: 0 0 2px; }
.badge { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin: 6px 0 10px; }
.badge.on { background: var(--ok-bg); color: var(--ok); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14.5px; }
.kv dt { color: var(--subtle); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } .card { padding: 20px; } }
