/* =====================================================================
   Prumo — sistema visual
   Layout: coluna única pensada para iPhone (390–430 pt), cartões com
   hierarquia por função; números em destaque com algarismos tabulares.
   Cores da marca (roxo) vêm de src/brand.js como --accent*.
   ===================================================================== */
@font-face { font-family: 'Geist'; src: url('../fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  /* neutros com leve viés violeta */
  --bg: #F5F4F8;
  --surface: #FFFFFF;
  --surface-2: #F0EEF5;
  --surface-3: #E6E3EE;
  --line: #E5E2EC;
  --line-strong: #D2CEDC;
  --ink: #16141D;
  --ink-2: #47434F;
  --muted: #696577;
  --faint: #A19DAD;
  /* semânticas */
  --pos: #0D7A4C;  --pos-soft: #E2F3EA;
  --neg: #C02838;  --neg-soft: #FBE8EA;
  --warn: #935700; --warn-soft: #FAEFD9;
  /* cartão de destaque (escuro nos dois modos) */
  --hero-bg: #17141F; --hero-bg-2: #231C38; --hero-ink: #F6F4FB; --hero-muted: #B1ACBF; --hero-line: rgba(255,255,255,.10);
  --scrim: rgba(18, 14, 30, .42);
  --shadow: 0 1px 2px rgba(22,20,29,.04), 0 8px 24px -12px rgba(22,20,29,.14);
  --shadow-lg: 0 18px 50px -12px rgba(22,20,29,.28);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  /* tipografia */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* forma */
  --r-xl: 24px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --tabbar-h: 58px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --kb: 0px; --vvh: 100dvh;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0A0F; --surface: #15141B; --surface-2: #1D1B25; --surface-3: #282533; --line: #24212D; --line-strong: #363242;
    --ink: #F3F2F7; --ink-2: #CAC7D4; --muted: #9C98AA; --faint: #6C687A;
    --pos: #45D296; --pos-soft: #10281D; --neg: #FF6E7B; --neg-soft: #33161B; --warn: #F3B653; --warn-soft: #2D2413;
    --hero-bg: #1A1725; --hero-bg-2: #261E3F; --hero-line: rgba(255,255,255,.09);
    --scrim: rgba(0,0,0,.6);
    --shadow: 0 0 0 1px var(--line); --shadow-lg: 0 0 0 1px var(--line-strong), 0 24px 60px -10px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0A0F; --surface: #15141B; --surface-2: #1D1B25; --surface-3: #282533; --line: #24212D; --line-strong: #363242;
  --ink: #F3F2F7; --ink-2: #CAC7D4; --muted: #9C98AA; --faint: #6C687A;
  --pos: #45D296; --pos-soft: #10281D; --neg: #FF6E7B; --neg-soft: #33161B; --warn: #F3B653; --warn-soft: #2D2413;
  --hero-bg: #1A1725; --hero-bg-2: #261E3F; --hero-line: rgba(255,255,255,.09);
  --scrim: rgba(0,0,0,.6);
  --shadow: 0 0 0 1px var(--line); --shadow-lg: 0 0 0 1px var(--line-strong), 0 24px 60px -10px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overscroll-behavior-y: none;
}
body.has-sheet { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 22px; height: 22px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 14px; } .center { text-align: center; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }

/* ---------- estrutura ---------- */
.view {
  max-width: 600px; margin: 0 auto; outline: none;
  padding: calc(var(--sat) + 8px) calc(var(--sar) + 16px) calc(var(--tabbar-h) + var(--sab) + 104px) calc(var(--sal) + 16px);
  display: flex; flex-direction: column; gap: 14px;
}
.view.enter { animation: viewIn .22s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.028em; font-weight: 650; margin: 0; text-wrap: balance; }
.topbar .eyebrow { display: block; margin-bottom: 2px; }
.greet { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.greet .logo { flex: none; border-radius: 10px; }
.greet-text { min-width: 0; }
.greet-text strong { display: block; font-size: 19px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.greet-text span { font-size: 13px; color: var(--muted); display: block; }

.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; position: relative; transition: background .15s; }
.icon-btn:active { background: var(--surface-3); }
.icon-btn.filled { background: var(--surface); box-shadow: var(--shadow); }
.icon-btn .badge-dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- barra inferior e ação rápida ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 6px calc(var(--sar) + 6px) calc(var(--sab) + 6px) calc(var(--sal) + 6px);
  background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
}
.tabbar-inner { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.tab .tab-ic { width: 46px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background .2s var(--ease), color .2s; }
.tab.active { color: var(--ink); }
.tab.active .tab-ic { background: var(--accent-soft); color: var(--accent-ink); }
.fab {
  position: fixed; z-index: 31; right: calc(var(--sar) + 16px); bottom: calc(var(--tabbar-h) + var(--sab) + 18px);
  width: 58px; height: 58px; border-radius: 20px; color: var(--on-accent); background: var(--accent);
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent), 0 2px 6px rgba(0,0,0,.12);
  display: grid; place-items: center; transition: transform .15s var(--ease);
}
.fab .ic { width: 26px; height: 26px; stroke-width: 2.2; }
.fab:active { transform: scale(.94); }

/* ---------- cartão de destaque (pergunta 1) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); color: var(--hero-ink);
  background: radial-gradient(120% 90% at 100% 0%, var(--hero-bg-2) 0%, var(--hero-bg) 58%); padding: 18px 18px 4px;
  box-shadow: var(--shadow-lg);
}
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hero-line); pointer-events: none; }
.hero .eyebrow { color: var(--hero-muted); display: flex; align-items: center; gap: 6px; }
.hero-amount { display: block; width: 100%; text-align: left; color: inherit; padding: 4px 0 2px; }
.hero-value { font-size: clamp(34px, 10.5vw, 42px); line-height: 1.05; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero-sub { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--hero-muted); margin-top: 6px; }
.hero-sub .ic { width: 16px; height: 16px; }
.hero-foot { margin-top: 14px; border-top: 1px solid var(--hero-line); }
.hero-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; color: inherit; text-align: left; }
.hero-row span { flex: 1; font-size: 14px; color: var(--hero-muted); }
.hero-row strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hero-row .ic { width: 18px; height: 18px; color: var(--hero-muted); }
.hero-row .neg-on-dark { color: #FF9AA3; }

/* ---------- ações rápidas ---------- */
.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-height: 74px; justify-content: center; transition: transform .12s var(--ease); }
.quick:active { transform: scale(.97); }
.quick .q-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.quick .q-ic .ic { width: 20px; height: 20px; }
.q-out .q-ic { background: var(--neg-soft); color: var(--neg); }
.q-in .q-ic { background: var(--pos-soft); color: var(--pos); }
.q-card .q-ic, .q-tr .q-ic { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- painéis ---------- */
.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.panel.flush { padding: 4px 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 28px; }
.panel.flush .panel-head { padding: 10px 16px 0; }
.panel-head h2 { font-size: 17px; font-weight: 640; letter-spacing: -.015em; margin: 0; }
.panel-head .sub { font-size: 13px; color: var(--muted); font-weight: 500; display: block; letter-spacing: 0; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14.5px; min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.link-btn .ic { width: 16px; height: 16px; }
.panel-tap { display: block; width: 100%; text-align: left; color: inherit; }

/* pergunta 2: comprometido */
.commit-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.big-value { font-size: 30px; font-weight: 620; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.meter { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; margin: 12px 0 6px; }
.meter > span { height: 100%; border-radius: 6px; background: var(--accent); transition: width .6s var(--ease); flex: none; }
.meter > span.over { background: var(--neg); }
.meter > span.plan { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, color-mix(in srgb, var(--accent) 35%, transparent) 3px 6px); }
.meter-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.meter-label strong { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.pct-pill { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pct-pill.over { background: var(--neg-soft); color: var(--neg); }

/* ---------- linhas de lista ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; position: relative; cursor: pointer; text-align: left; width: 100%; color: inherit;
  transition: background .15s;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 68px; right: 0; border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row.compact { min-height: 54px; }
.row.static { cursor: default; }
.row.static:active { background: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 560; font-size: 15.5px; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.row-title > span { overflow: hidden; text-overflow: ellipsis; }
.row-title .ic { width: 14px; height: 14px; color: var(--muted); }
.row-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row-sub.late { color: var(--neg); font-weight: 560; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.row-chev { color: var(--faint); width: 18px; height: 18px; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15.5px; letter-spacing: -.01em; }
.amt.in { color: var(--pos); }
.amt.out { color: var(--ink); }
.amt.muted { color: var(--muted); }
.row.flash { animation: flash 1.8s var(--ease); }
@keyframes flash { 0%, 35% { background: var(--accent-soft); } 100% { background: transparent; } }
.panel > .rows { margin: 0 -16px; }
.panel > .rows:last-child { margin-bottom: -8px; }

.tile { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--tc, var(--accent)); isolation: isolate; }
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tc, var(--accent)); opacity: .14; z-index: -1; }
.tile .ic { width: 20px; height: 20px; }
.tile.sm { width: 32px; height: 32px; border-radius: 10px; }
.tile.sm .ic { width: 17px; height: 17px; }
.tile.neutral { --tc: var(--ink-2); }
.tile.alert { --tc: var(--neg); }
.tile.ok { --tc: var(--pos); }

/* selos de situação (texto + ícone, nunca só cor) */
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; line-height: 1.4; }
.badge .ic { width: 12px; height: 12px; }
.badge.plan { background: var(--accent-soft); color: var(--accent-ink); }
.badge.late { background: var(--neg-soft); color: var(--neg); }
.badge.ok { background: var(--pos-soft); color: var(--pos); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.pay-btn { min-height: 32px; padding: 0 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 650; position: relative; }
.pay-btn::after { content: ""; position: absolute; inset: -6px -4px; }

/* ---------- navegação de mês ---------- */
.month-switch { display: inline-flex; align-items: center; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 2px; flex: none; }
.month-switch .icon-btn { width: 40px; height: 40px; }
.month-switch .icon-btn .ic { width: 18px; height: 18px; }
.month-switch .m-label { font-weight: 600; font-size: 15px; min-width: 132px; text-align: center; min-height: 40px; padding: 0 4px; }
.month-switch.small .m-label { min-width: 70px; font-size: 14px; }
.month-switch.wide { display: flex; }
.month-switch.wide .m-label { flex: 1; }

/* ---------- resumo do mês e categorias ---------- */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.flow-item { text-align: left; border-radius: var(--r-md); background: var(--surface-2); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; }
.flow-item .eyebrow { display: flex; align-items: center; gap: 4px; }
.flow-item .eyebrow .ic { width: 14px; height: 14px; }
.flow-item .v { font-size: 19px; font-weight: 620; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-item .meter { margin: 8px 0 6px; height: 6px; }
.flow-item small { font-size: 12px; color: var(--muted); line-height: 1.4; font-variant-numeric: tabular-nums; }
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: center; padding: 9px 0; text-align: left; width: 100%; color: inherit; }
.cat-row .tile { grid-row: span 2; }
.cat-name { font-weight: 560; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-val { font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cat-val small { color: var(--muted); font-weight: 500; }
.cat-bar { grid-column: 2 / 4; height: 8px; border-radius: 5px; background: var(--surface-2); position: relative; display: flex; gap: 2px; }
.cat-bar > span { height: 100%; border-radius: 5px; background: var(--tc, var(--accent)); flex: none; }
.cat-bar > span.plan { background: repeating-linear-gradient(135deg, var(--tc, var(--accent)) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--tc, var(--accent)); }
.cat-bar > i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; }
.cat-meta { grid-column: 2 / 4; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: -2px; font-variant-numeric: tabular-nums; }
.cat-meta .over { color: var(--neg); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 8px; border-radius: 3px; background: var(--accent); display: inline-block; }
.lg.plan { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--accent); }
.lg.budget { width: 2px; height: 12px; background: var(--ink); }

/* ---------- lançamentos ---------- */
.search-bar { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: var(--r-md); padding: 0 12px; box-shadow: var(--shadow); color: var(--muted); min-width: 0; }
.search .ic { width: 19px; height: 19px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; min-height: 46px; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 560; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; position: relative; }
.chip::after { content: ""; position: absolute; inset: -3px 0; }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip .ic { width: 16px; height: 16px; }
.totals { display: flex; flex-wrap: wrap; gap: 8px; }
.totals > .total-cell { flex: 1 1 112px; }
.total-cell { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 10px 12px; min-width: 0; }
.total-cell .eyebrow { font-size: 10.5px; }
.total-cell strong { display: block; font-size: 15px; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.day-group { display: flex; flex-direction: column; gap: 6px; }
.day-head { display: flex; justify-content: space-between; padding: 4px 4px 0; font-size: 13px; color: var(--muted); font-weight: 560; }
.day-head span:first-child::first-letter { text-transform: uppercase; }
.day-head span:last-child { font-variant-numeric: tabular-nums; }
.day-group .panel { padding: 0; overflow: hidden; }

/* ---------- contas e cartões ---------- */
.total-head .big-value { font-size: 34px; margin-top: 4px; }
.total-head .sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; display: block; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc {
  position: relative; overflow: hidden; width: 100%; text-align: left; border-radius: var(--r-xl); padding: 18px; color: #F6F4FB;
  background: radial-gradient(110% 120% at 0% 0%, #3B2B70 0%, #1E1830 55%, #15121F 100%); box-shadow: var(--shadow-lg); min-height: 178px;
  display: flex; flex-direction: column; gap: 12px;
}
.cc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); pointer-events: none; }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-name { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.cc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-name .logo { color: #CDBEFF; flex: none; }
.cc .eyebrow { color: #B9B4C7; }
.cc-value { font-size: 30px; font-weight: 620; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.cc-meta { font-size: 13px; color: #B9B4C7; }
.cc .meter { background: rgba(255,255,255,.14); margin: 0 0 6px; height: 6px; }
.cc .meter > span { background: #BBA8FF; }
.cc .meter-label { color: #B9B4C7; font-size: 12.5px; }
.cc .meter-label strong { color: #F6F4FB; }
.cc-badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.13); color: #F6F4FB; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.cc-badge.late { background: #FF8D97; color: #2A0A0F; }
.cc-badge.ok { background: #7FE2B4; color: #072315; }
.cc-badge .ic { width: 12px; height: 12px; }
.cc-alert { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 141, 151, .16); color: #FFC9CE; }
.cc-alert .ic { width: 16px; height: 16px; }
.inv-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.inv-stats div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; min-width: 0; }
.inv-stats strong { display: block; font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.timeline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 14px; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.timeline .dot.hollow { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.timeline .dash { flex: 1; height: 1px; background: var(--line-strong); }

/* ---------- mais ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 21px; font-weight: 650; flex: none; }
.avatar.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }
.profile-main { flex: 1; min-width: 0; }
.profile-main strong { display: block; font-size: 18px; font-weight: 640; letter-spacing: -.015em; }
.profile-main span { font-size: 13.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .row { min-height: 56px; }
.menu .row-title { font-weight: 540; }
.menu .row.danger .row-title { color: var(--neg); }
.menu .row.danger .tile { --tc: var(--neg); }
.menu .seg { margin-top: 10px; }
.menu .seg-opt span { min-height: 40px; padding: 0 10px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-3); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.foot-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; color: var(--muted); font-size: 12.5px; }
.foot-brand .logo { color: var(--accent); }
.prose h3 { font-size: 15.5px; margin: 18px 0 4px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.prose h3 .ic { width: 18px; height: 18px; color: var(--accent); }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 8px; font-size: 15px; color: var(--ink-2); }

/* ---------- botões ---------- */
.btn { min-height: 52px; padding: 0 18px; border-radius: var(--r-md); font-weight: 620; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .12s var(--ease), filter .15s, background .15s; letter-spacing: -.005em; }
.btn:active { transform: scale(.985); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:disabled { opacity: .7; }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn-tonal { background: var(--accent-soft); color: var(--accent-ink); }
.btn-ghost { color: var(--accent); }
.btn-danger { background: var(--neg); color: #fff; }
.btn-danger-ghost { color: var(--neg); background: var(--neg-soft); }
.btn-block { width: 100%; }
.btn-icon { width: 52px; padding: 0; flex: none; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; }

/* ---------- formulários ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field input:not([type="radio"]):not([type="checkbox"]):not(.amount-input), .field select, .field textarea {
  width: 100%; min-height: 50px; border: 1.5px solid transparent; background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px;
  font-size: 16px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:not(.amount-input):focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: var(--ring); }
.field input[type="date"] { display: block; min-width: 0; line-height: 24px; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23908BA0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.field textarea { min-height: 72px; resize: vertical; }
.field.invalid input, .field.invalid select, .field.invalid .chips-scroll, .field.invalid .amount-input { border-color: var(--neg) !important; }
.err { color: var(--neg); font-size: 13px; }
.err:empty { display: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.amount-field { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0 0; }
.amount-field > .label { font-size: 13px; color: var(--muted); font-weight: 560; }
.amount-wrap { display: flex; align-items: center; gap: 8px; width: 100%; }
.amount-input {
  flex: 1; width: 100%; min-width: 0; border: 1.5px solid transparent; background: transparent; text-align: center; outline: none; border-radius: var(--r-md);
  font-size: 42px; line-height: 1.15; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--ink); padding: 4px; caret-color: var(--accent);
  font-family: var(--font);
}
.amount-input.zero { color: var(--faint); }
.amount-input:focus { background: var(--surface-2); }
.amount-field.small { align-items: stretch; gap: 6px; }
.amount-field.small > .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.amount-field.small .amount-input { font-size: 22px; text-align: left; background: var(--surface-2); padding: 9px 14px; letter-spacing: -.02em; min-height: 50px; }
.amount-field.small .amount-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: var(--ring); }
.sign-btn { width: 50px; height: 50px; border-radius: var(--r-md); background: var(--surface-2); font-size: 22px; font-weight: 700; color: var(--pos); flex: none; }
.sign-btn.neg { color: var(--neg); background: var(--neg-soft); }
.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 3px; gap: 3px; }
.seg-opt { flex: 1; position: relative; min-width: 0; }
.seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.seg-opt span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--muted); padding: 2px 6px; text-align: center; line-height: 1.15; transition: background .18s var(--ease), color .18s; }
.seg-opt span .ic { width: 16px; height: 16px; }
.seg-opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px var(--line); }
:root[data-theme="dark"] .seg-opt input:checked + span { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-opt input:checked + span { background: var(--surface-3); } }
.seg.type .seg-opt input[value="despesa"]:checked + span { color: var(--neg); }
.seg.type .seg-opt input[value="receita"]:checked + span { color: var(--pos); }
.seg-opt input:focus-visible + span { box-shadow: var(--ring); }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; border: 1.5px solid transparent; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; flex: none; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.pick > span { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 13px; background: var(--surface-2); font-size: 14.5px; font-weight: 560; color: var(--ink-2); border: 1.5px solid transparent; white-space: nowrap; transition: border-color .15s, background .15s; }
.pick.no-tile > span { padding-left: 14px; }
.pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.pick input:focus-visible + span { box-shadow: var(--ring); }
.pick .tile.sm { width: 30px; height: 30px; border-radius: 9px; }
.more-opts { border-radius: var(--r-md); background: var(--surface-2); }
.more-opts summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 0 14px; font-weight: 600; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.more-opts summary small { font-weight: 500; color: var(--muted); font-size: 13px; flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.more-opts[open] summary .ic { transform: rotate(180deg); }
.more-opts .more-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.more-opts .field input:not([type="radio"]):not([type="checkbox"]):not(.amount-input), .more-opts .field select, .more-opts .field textarea, .more-opts .amount-field.small .amount-input { background: var(--surface); }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; cursor: pointer; }
.check > span:first-child { flex: 1; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.hint { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: var(--r-md); padding: 11px 13px; margin: 0; line-height: 1.45; }
.hint .ic { width: 16px; height: 16px; color: var(--accent); vertical-align: -3px; margin-right: 5px; }
.hint.accent { background: var(--accent-soft); color: var(--accent-ink); }
.hint.accent .ic { color: inherit; }
.inline-note { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-note strong { color: var(--ink); font-weight: 600; }
.form-error { display: flex; gap: 10px; align-items: flex-start; background: var(--neg-soft); color: var(--neg); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; animation: shake .35s; }
.form-error strong { display: block; }
.sheet > .form-error { margin: 0 calc(var(--sar) + 20px) 8px calc(var(--sal) + 20px); flex: none; }
.form-error .ic { width: 20px; height: 20px; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 12px; background: var(--c); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.icon-pick { position: relative; }
.icon-pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.icon-pick span { display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); border: 1.5px solid transparent; }
.icon-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.installments { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r-md); padding: 8px 14px; font-size: 14px; }
.installments:empty { display: none; }
.installments div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.installments div:first-child { font-weight: 600; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--r-md); min-height: 50px; }
.stepper button { width: 50px; height: 50px; display: grid; place-items: center; color: var(--ink); border-radius: var(--r-md); }
.stepper button:active { background: var(--surface-3); }
.stepper output { flex: 1; text-align: center; font-weight: 620; font-variant-numeric: tabular-nums; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r-md); padding: 14px; background: var(--surface-2); border: 1.5px solid transparent; cursor: pointer; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.radio-card div { display: flex; flex-direction: column; gap: 2px; }
.radio-card small { color: var(--muted); font-size: 13.5px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.copy-area { width: 100%; font: 12px/1.45 var(--mono); border: 0; border-radius: var(--r-md); padding: 12px; background: var(--surface-2); color: var(--ink); }

/* ---------- folhas (bottom sheets) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: var(--kb); margin: 0 auto; max-width: 600px;
  max-height: calc(var(--vvh) - var(--sat) - 12px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .3s var(--ease);
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.closing .sheet { transform: translateY(105%); transition-duration: .22s; }
.sheet-wrap.closing .sheet-backdrop { opacity: 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 16px 12px 6px 20px; position: relative; flex: none; }
.sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; border-radius: 3px; background: var(--line-strong); transform: translateX(-50%); }
.sheet-head h2 { flex: 1; font-size: 19px; font-weight: 650; letter-spacing: -.02em; margin: 4px 0 0; min-width: 0; }
.sheet-head .icon-btn { background: var(--surface-2); width: 40px; height: 40px; margin-top: 2px; }
.sheet-head .icon-btn::after { content: ""; position: absolute; inset: -4px; }
.sheet-head .icon-btn .ic { width: 18px; height: 18px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px calc(var(--sar) + 20px) 20px calc(var(--sal) + 20px); overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.sheet-foot { flex: none; padding: 10px calc(var(--sar) + 20px) calc(max(var(--sab), 8px) + 8px) calc(var(--sal) + 20px); border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; }
.sheet-wrap.kb-open .sheet-foot { padding-bottom: 10px; }
.sheet-wrap.kb-open .sheet { border-radius: 20px 20px 0 0; }
.sheet-foot .btn-primary { flex: 1; }
.dialog-msg { margin: 0 0 4px; color: var(--ink-2); font-size: 15.5px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 4px; }
.quick-big { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); text-align: left; min-height: 116px; transition: transform .12s var(--ease); color: inherit; }
.quick-big:active { transform: scale(.98); }
.quick-big strong { font-size: 16px; font-weight: 620; display: block; }
.quick-big small { font-size: 12.5px; color: var(--muted); }
.quick-big .q-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); }
.quick-big.q-out .q-ic { color: var(--neg); background: var(--neg-soft); } .quick-big.q-in .q-ic { color: var(--pos); background: var(--pos-soft); }
.quick-big.q-card .q-ic, .quick-big.q-tr .q-ic { color: var(--accent-ink); background: var(--accent-soft); }
.calc { display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-md); padding: 2px 14px; }
.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 50px; border-bottom: 1px solid var(--line); font-size: 15px; width: 100%; text-align: left; color: inherit; }
.calc-row:last-child { border-bottom: 0; }
.calc-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 620; }
.calc-row small { display: block; color: var(--muted); font-size: 12px; }
.calc-row.total { font-size: 16.5px; font-weight: 650; }
.calc-op { font-family: var(--mono); color: var(--muted); width: 18px; display: inline-block; }
.breakdown-total { display: flex; flex-direction: column; gap: 2px; padding: 0 0 12px; }
.breakdown-total .big-value { font-size: 32px; }
.sheet .rows { margin: 0 -20px; }
.sheet .row { padding-left: 20px; padding-right: 20px; }
.sheet .row + .row::before { left: 72px; }
.sheet .group-label { padding: 14px 0 4px; }

/* ---------- avisos ---------- */
.toast {
  position: fixed; z-index: 90; left: calc(var(--sal) + 12px); right: calc(var(--sar) + 12px); margin: 0 auto; max-width: 480px;
  bottom: calc(var(--tabbar-h) + var(--sab) + 92px); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; min-height: 54px;
  border-radius: 16px; background: #1D1A27; color: #F6F4FB; box-shadow: 0 12px 40px -8px rgba(0,0,0,.45);
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .28s var(--ease), opacity .2s;
}
:root[data-theme="dark"] .toast { background: #2C283A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #2C283A; } }
body.has-sheet .toast { bottom: calc(var(--kb) + var(--sab) + 96px); }
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast-msg { flex: 1; font-size: 14.5px; font-weight: 560; line-height: 1.3; }
.toast-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #45D296; color: #0B2A1C; }
.toast-ic .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.toast.ok .toast-ic .ic path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .08s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.toast.error .toast-ic { background: #FF8D97; color: #2A0A0F; }
.toast-action { color: #CDBEFF; font-weight: 650; font-size: 14.5px; min-height: 40px; padding: 0 10px; border-radius: 10px; }
.toast-action:active { background: rgba(255,255,255,.08); }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; background: var(--warn-soft); color: var(--warn); }
.banner .ic { width: 18px; height: 18px; margin-top: 1px; }
.banner.info { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- vazio / carregando / erro ---------- */
.empty { text-align: center; padding: 26px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-art { width: 128px; height: 96px; margin-bottom: 6px; }
.empty h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.015em; text-wrap: balance; }
.empty p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; max-width: 34ch; text-wrap: pretty; }
.empty .stack { width: 100%; max-width: 320px; }
.empty.small { padding: 14px 10px 10px; }
.empty.small .empty-art { width: 92px; height: 68px; margin-bottom: 2px; }
.empty.small h3 { font-size: 16px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: var(--surface-3); border-radius: 10px; position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-hero { height: 206px; border-radius: var(--r-xl); }
.skel-line { height: 14px; }
.skel-block { height: 74px; border-radius: var(--r-md); }
.skel-panel { height: 150px; border-radius: var(--r-lg); }

/* ---------- autenticação e primeiro acesso ---------- */
.auth, .onb {
  min-height: 100dvh; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(var(--sat) + 20px) calc(var(--sar) + 24px) calc(var(--sab) + 20px) calc(var(--sal) + 24px);
}
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin: 28px 0 24px; }
.auth-brand .logo { border-radius: 16px; box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.auth h1, .onb h1 { font-size: 32px; line-height: 1.08; letter-spacing: -.035em; font-weight: 650; margin: 0; text-wrap: balance; }
.auth-brand p, .onb-lead { font-size: 16px; color: var(--muted); margin: 0; text-wrap: pretty; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.auth-foot { margin-top: auto; padding-top: 28px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.auth-foot .ic { width: 15px; height: 15px; }
.onb-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.onb-steps { display: flex; gap: 6px; }
.onb-steps i { width: 20px; height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .3s, width .3s var(--ease); }
.onb-steps i.on { background: var(--accent); width: 32px; }
.onb-body { flex: 1; display: flex; flex-direction: column; gap: 18px; padding-top: 18px; animation: viewIn .3s var(--ease); }
.onb-points { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.onb-point { display: flex; gap: 14px; align-items: flex-start; }
.onb-point strong { display: block; font-size: 15.5px; font-weight: 620; }
.onb-point span { font-size: 14px; color: var(--muted); }
.onb-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; margin-top: auto; }
.onb-art { width: 100%; max-width: 360px; align-self: center; }

/* ---------- instalação e uso sem internet ---------- */
.install-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.install-os { background: var(--surface-2); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.install-os h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.install-os h3 .ic { width: 18px; height: 18px; color: var(--accent); }
.install-os .hint { background: var(--surface); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.step-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--surface); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.step-ic .ic { width: 17px; height: 17px; }
.net-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.net-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.net-list .ic { width: 18px; height: 18px; color: var(--pos); margin-top: 1px; }
.net-list li.no .ic { color: var(--warn); }
.install-hint { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; }
.install-hint .row-sub { white-space: normal; }

/* ---------- ajustes por sistema ---------- */
/* Android: botão de ação no formato Material, barra inferior acima dos gestos/botões do sistema */
.os-android .fab { border-radius: 18px; }
.os-android .tabbar { padding-bottom: calc(max(var(--sab), 8px) + 4px); }
.os-android .tab { font-size: 11px; }
.os-android .sheet { border-radius: 28px 28px 0 0; }
.os-android .sheet-foot { padding-bottom: calc(max(var(--sab), 10px) + 6px); }
/* iPhone: respeita o indicador de início na base da tela */
.os-ios .tabbar { padding-bottom: max(var(--sab), 8px); }

@media (max-width: 359px) {
  .quick-row { gap: 6px; } .quick { font-size: 11.5px; }
  .month-switch .m-label { min-width: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
