:root {
  --bg: #0b0b0c;
  --panel: #161618;
  --panel-2: #1f1f22;
  --line: #2c2c30;
  --text: #f2f2f3;
  --muted: #9a9aa2;
  --accent: #ff4d6d;
  --accent-ink: #ffffff;
  --ok: #3ecf8e;
  --warn: #f5b942;
  --err: #ff6b6b;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--err); border: 1px solid var(--err); }
.btn.big { min-height: 56px; padding: 0 36px; font-size: 18px; }
.btn:disabled { opacity: .5; }

.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .btn { width: 100%; margin-top: 8px; }
label { display: block; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
label small { display: block; margin-top: 4px; font-size: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 13px; }
label.check input { width: auto; margin: 3px 0 0; }

.flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.flash-error { border-color: var(--err); color: #ffd2d2; }
.flash-ok { border-color: var(--ok); color: #c9f5e0; }
.flash-info { border-color: var(--warn); color: #fde8bd; }

/* Páginas internas do usuário */
.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; padding-top: max(16px, env(safe-area-inset-top)); }
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-top a.back { color: var(--text); text-decoration: none; font-size: 15px; }
.balance { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.balance strong { display: block; font-size: 36px; line-height: 1.1; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list li a.item { color: var(--text); text-decoration: none; flex: 1; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.tag.ok { color: var(--ok); }
.amount.pos { color: var(--ok); }
.amount.neg { color: var(--err); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* Logotipo */
.brand-head { text-align: center; margin-bottom: 18px; }
.brand-head img.logo { max-width: 220px; max-height: 80px; width: auto; height: auto; }
.brand-head .logo-text { display: block; font-size: 24px; font-weight: 700; }
