/* Bolso — leve e colorido, a mesma família visual do Blocos.
   Fundo branco quente, cartões arredondados, cor por categoria, tinta quase preta para as ações
   e navegação flutuante com o + em destaque. Tipo: Plus Jakarta Sans. */
:root {
  --bg: #FBFAF8;
  --card: #FFFFFF;
  --soft: #F3F2EF;
  --ink: #17171B;
  --ink-2: #3F3F46;
  --muted: #7C7C86;
  --faint: #B4B4BB;
  --line: rgba(23, 23, 27, .07);
  --dash: rgba(23, 23, 27, .1);
  --on-ink: #FFFFFF;
  --accent: #6D5DF6;
  --in: #157F55;
  --red: #D93A3F;
  --amber: #B26B00;
  --green: #1F8A5B;
  --c-in: #1baf7a;
  --c-out: #eb6834;
  --c-fix: #4a3aa7;
  --c-var: #eda100;
  --c-pos: #2a78d6;
  --c-neg: #e34948;
  --s-good: #0ca30c; --s-warn: #fab219; --s-bad: #d03b3b;
  --grid: #E7E5DF;
  --hero: #17171B;
  --hero-2: #2A2A31;
  --hero-fg: #FFFFFF;
  --fab: #17171B;
  --fab-fg: #FFFFFF;
  --primary: #17171B;
  --on-primary: #FFFFFF;
  --tint: 11%;
  --fg-mix: 100%;
  --scrim: rgba(17, 17, 22, .32);
  --shadow: 0 1px 2px rgba(23, 23, 27, .04), 0 10px 30px -14px rgba(23, 23, 27, .16);
  --shadow-float: 0 12px 34px -12px rgba(23, 23, 27, .28);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F12; --card: #19191E; --soft: #23232A; --ink: #F4F4F6; --ink-2: #D2D2D8;
    --muted: #8E8E98; --faint: #5E5E68; --line: rgba(255,255,255,.08); --dash: rgba(255,255,255,.11);
    --on-ink: #0F0F12; --accent: #9B8CFF; --in: #4FD197; --red: #FF6B6F; --amber: #F0B451; --green: #5AD49A;
    --c-in: #199e70; --c-out: #d95926; --c-fix: #9085e9; --c-var: #c98500; --c-pos: #3987e5; --c-neg: #e66767;
    --grid: #2C2C2A; --hero: #24242B; --hero-2: #2E2E37; --hero-fg: #F4F4F6; --fab: #F4F4F6; --fab-fg: #0F0F12;
    --primary: #F4F4F6; --on-primary: #0F0F12;
    --tint: 18%; --fg-mix: 62%; --scrim: rgba(0,0,0,.55);
    --shadow: 0 0 0 1px rgba(255,255,255,.05); --shadow-float: 0 0 0 1px rgba(255,255,255,.07), 0 14px 34px -12px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  font: 500 15px/1.4 var(--font); color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-user-select: none; user-select: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; font: inherit; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }
[hidden] { display: none !important; }

/* ---------- estrutura do app ---------- */
.main { position: fixed; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.main::-webkit-scrollbar { display: none; }
.wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding: calc(var(--top) + 14px) var(--gutter) calc(var(--bottom) + 116px); }
.page .wrap { padding-bottom: calc(var(--bottom) + 36px); }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hd-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eyebrow { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.title { font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }
.hd-r { display: flex; align-items: center; gap: 8px; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 700; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; }
.ibtn { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); }
.ibtn:active, .avatar:active { transform: scale(.94); }

/* cartão de saldo */
.hero { border-radius: 26px; padding: 20px 20px 16px; color: var(--hero-fg); background: linear-gradient(140deg, var(--hero), var(--hero-2)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 34px -22px var(--hero); }
.hero-l { font-size: 13px; font-weight: 600; opacity: .72; display: flex; align-items: center; gap: 6px; }
.hero-v { font-size: 38px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin-top: 4px; }
.hero-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-row span { font-size: 11.5px; font-weight: 600; opacity: .68; }
.hero-row b { font-size: 14px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* contas em faixa */
.strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.acc { flex: none; width: 150px; display: flex; flex-direction: column; gap: 10px; padding: 13px 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: left; }
.acc:active { transform: scale(.98); }
.acc-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.acc-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-v { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.acc-d { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: -6px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 4px; background: var(--c); }

/* grupos e cartões */
.grp { display: flex; flex-direction: column; gap: 8px; }
.grp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.grp-h h2 { font-size: 16px; font-weight: 800; letter-spacing: -.015em; }
.grp-h span, .grp-h button { font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: right; }
.grp-h button { color: var(--accent); font-weight: 700; }
.card { background: var(--card); border-radius: 22px; padding: 4px 16px; box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.card.soft { background: var(--soft); box-shadow: none; }
.list > li + li { border-top: 1px solid var(--line); }
.more { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-top: 1px solid var(--line); color: var(--accent); font-size: 14px; font-weight: 700; }

/* linha de lançamento / conta a pagar */
.it { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 9px 0; width: 100%; text-align: left; }
.ci { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) calc(var(--tint) + 3%), var(--card)); }
.ci svg { width: 21px; height: 21px; }
.ci.sm { width: 32px; height: 32px; border-radius: 11px; }
.ci.sm svg { width: 18px; height: 18px; }
.it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.it-t { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.it-m { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.late { color: var(--red); font-weight: 700; }
.soon { color: var(--amber); font-weight: 700; }
.it-m .tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.it-m .tag svg { width: 11px; height: 11px; }
.amt { flex: none; text-align: right; font-size: 15px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt.in { color: var(--in); }
.amt.tr { color: var(--muted); }
.amt small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.is-paid .it-t { color: var(--muted); }
.ck { flex: none; width: 30px; height: 30px; margin-right: -2px; display: grid; place-items: center; }
.ck span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 2px var(--dash); transition: background-color .18s, box-shadow .18s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.ck svg { opacity: 0; transform: scale(.5); transition: opacity .15s, transform .2s; }
.ck.late span { box-shadow: inset 0 0 0 2px var(--red); }
.ck.on span { background: var(--green); box-shadow: none; }
.ck.on svg { opacity: 1; transform: none; }
.ck:active span { transform: scale(.85); }

/* alerta */
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: color-mix(in srgb, var(--red) var(--tint), var(--card)); text-align: left; width: 100%; }
.alert .ci { --c: var(--red); background: var(--card); }
.alert-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert-t b { font-size: 15px; font-weight: 800; color: color-mix(in srgb, var(--red) var(--fg-mix), #fff); }
.alert-t span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.alert .btn-s { background: var(--card); }

/* resumo do mês */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat span { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b.in { color: var(--in); }
.stat b.neg { color: var(--red); }
.kdot { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }
.ratio { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.ratio p { font-size: 13px; color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.ratio p b { font-weight: 800; }

/* medidor */
.meter { position: relative; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--soft)); overflow: visible; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--accent)); max-width: 100%; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.meter.warn { --c: var(--s-warn); }
.meter.over { --c: var(--s-bad); }
.meter.good { --c: var(--s-good); }
.meter .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--ink); opacity: .55; }
.meter.big { height: 10px; border-radius: 5px; }

.bud { display: flex; flex-direction: column; gap: 8px; padding: 13px 0; }
.bud + .bud { border-top: 1px solid var(--line); }
.bud-h { display: flex; align-items: center; gap: 10px; }
.bud-n { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.bud-p { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bud-p.warn { color: var(--amber); }
.bud-p.over { color: var(--red); }
.bud-d { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bud-d .over { color: var(--red); font-weight: 700; }

/* saúde */
.health { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; }
.ring { position: relative; flex: none; width: 76px; height: 76px; }
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.ring.lg, .ring.lg svg { width: 120px; height: 120px; }
.ring.lg b { font-size: 34px; }
.health-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.health-t > b { font-size: 16px; font-weight: 800; }
.health-t > span { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.sts { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 3px 9px 3px 6px; border-radius: 99px; background: color-mix(in srgb, var(--sc) 14%, var(--card)); color: var(--ink); white-space: nowrap; }
.sts i { width: 16px; height: 16px; border-radius: 50%; background: var(--sc); display: grid; place-items: center; color: #fff; }
.sts i svg { width: 10px; height: 10px; }
.s-good { --sc: var(--s-good); } .s-warn { --sc: var(--s-warn); } .s-bad { --sc: var(--s-bad); }
.s-warn i { color: #3A2A00; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }

.ind { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.ind + .ind { border-top: 1px solid var(--line); }
.ind-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ind-h h3 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.ind-v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.ind-v small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.ind p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.ind .link { font-size: 13.5px; }

/* onboarding */
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; width: 100%; text-align: left; }
.step + .step { border-top: 1px solid var(--line); }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; box-shadow: inset 0 0 0 2px var(--dash); color: var(--muted); }
.step.done .step-n { background: var(--primary); color: var(--on-primary); color: #fff; box-shadow: none; }
.step-t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; }
.step.done .step-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.step-t small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; text-decoration: none; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.prog .meter { flex: 1; }

/* dica */
.tip { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 22px; background: color-mix(in srgb, var(--accent) var(--tint), var(--card)); text-align: left; width: 100%; }
.tip .ci { --c: var(--accent); background: var(--card); }
.tip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tip-t b { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) var(--fg-mix), #fff); }
.tip-t p { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.tip-t span { font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--accent) var(--fg-mix), #fff); }

/* controles */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 4px; border-radius: 99px; background: var(--soft); }
.seg button { height: 38px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; transition: background-color .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.msw { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msw b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; text-align: center; flex: 1; }
.msw button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); }
.msw button:disabled { opacity: .35; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.chip svg { width: 15px; height: 15px; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; outline: none; }
.search input::placeholder { color: var(--faint); }
.day-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 4px 0; }
.day-h h3 { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.day-h span { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.sum-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }

/* cartão de progresso das contas do mês */
.paybar { display: flex; flex-direction: column; gap: 10px; }
.paybar-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 12px; }
.paybar-top b { white-space: nowrap; }
.paybar-top .r { margin-left: auto; }
.paybar-top div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.paybar-top span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.paybar-top b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.paybar-top .r { text-align: right; }
.paybar-top .r b { font-size: 15px; }

/* parcelas */
.inst { display: flex; flex-direction: column; gap: 9px; padding: 14px 0; }
.inst + .inst { border-top: 1px solid var(--line); }
.inst-h { display: flex; align-items: center; gap: 12px; }
.inst-d { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; gap: 8px; }

/* gráficos */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; font-weight: 600; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--faint); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .sel { fill: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend i.hatch { background: repeating-linear-gradient(45deg, var(--c) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--c); }
.readout { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 14px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.readout b { color: var(--ink); font-weight: 800; }
.readout div { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.readout div span { display: inline-flex; align-items: center; gap: 5px; }
.readout div i { width: 12px; height: 2px; border-radius: 1px; background: var(--c); }
.catbars { display: flex; flex-direction: column; }
.cb { display: flex; flex-direction: column; gap: 7px; padding: 11px 0; }
.cb + .cb { border-top: 1px solid var(--line); }
.cb-h { display: flex; align-items: center; gap: 10px; }
.cb-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cb-v { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cb-p { width: 40px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cb-bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--c-out); margin-left: 42px; min-width: 3px; }
.stack { display: flex; gap: 2px; height: 14px; }
.stack i { display: block; height: 100%; background: var(--c); }
.stack i:first-child { border-radius: 4px 0 0 4px; }
.stack i:last-child { border-radius: 0 4px 4px 0; }
.r503 { display: flex; flex-direction: column; gap: 14px; }
.r503-i { display: flex; flex-direction: column; gap: 7px; }
.r503-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.r503-h b { font-size: 14.5px; font-weight: 800; }
.r503-h small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.r503-v { font-size: 18px; font-weight: 800; letter-spacing: -.02em; text-align: right; }
.r503-v small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.explain { font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 500; padding: 0 4px; }
.explain b { color: var(--ink-2); font-weight: 700; }
.fc { display: flex; flex-direction: column; }
.fc-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; }
.fc-r + .fc-r { border-top: 1px solid var(--line); }
.fc-r b { font-size: 14.5px; font-weight: 800; }
.fc-r small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }

/* metas */
.goal { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: color-mix(in srgb, var(--c) var(--tint), var(--card)); }
.goal-h { display: flex; align-items: center; gap: 12px; }
.goal-h .ci { background: var(--card); }
.goal-n { flex: 1; min-width: 0; }
.goal-n b { display: block; font-size: 15.5px; font-weight: 800; color: color-mix(in srgb, var(--c) var(--fg-mix), #fff); }
.goal-n span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.goal-v { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-v b { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.goal-v span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.goal .meter { background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.goal-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

/* linhas de ajuste / perfil */
.row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; text-align: left; }
.card > .row + .row { border-top: 1px solid var(--line); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-t { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.row-d { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.row-r { flex: none; display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 14px; font-weight: 700; }
.row-r b { color: var(--ink); font-weight: 800; }
.row.danger .row-t { color: var(--red); }
.switch { flex: none; width: 50px; height: 44px; display: grid; place-items: center; }
.switch span { width: 46px; height: 28px; padding: 3px; border-radius: 14px; display: flex; background: color-mix(in srgb, var(--ink) 14%, var(--soft)); transition: background-color .2s; }
.switch span::after { content: ''; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .22s cubic-bezier(.3,1.3,.5,1); }
.switch.on span { background: var(--primary); }
.switch.on span::after { transform: translateX(18px); background: var(--on-primary); }
.pill { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.back { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.profile { display: flex; align-items: center; gap: 14px; }

/* botões */
.btn { width: 100%; min-height: 54px; padding: 0 22px; border-radius: 99px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; transition: transform .12s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.green { background: var(--green); color: #fff; }
.btn-s { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn-s.primary { background: var(--primary); color: var(--on-primary); }
.btn-s:active { opacity: .7; }
.link { align-self: flex-start; color: var(--accent); font-size: 14.5px; font-weight: 700; padding: 4px 0; }
.add-dash { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 18px; border: 1.5px dashed var(--dash); color: var(--ink-2); font-size: 14.5px; font-weight: 700; width: 100%; }

/* navegação */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 18px calc(var(--bottom) + 12px); pointer-events: none; }
.nav::before { content: ''; position: absolute; inset: -26px 0 0; background: linear-gradient(to top, var(--bg) 45%, transparent); z-index: -1; }
.nav-in { pointer-events: auto; max-width: 420px; height: 66px; margin: 0 auto; border-radius: 99px; background: var(--card); box-shadow: var(--shadow-float); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; justify-items: center; }
.tab { position: relative; width: 58px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 10.5px; font-weight: 700; border-radius: 16px; }
.tab.on { color: var(--primary); }
.fab { width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; background: var(--fab); color: var(--fab-fg); box-shadow: 0 12px 22px -8px rgba(0,0,0,.45); transition: transform .15s; }
.fab:active { transform: scale(.92); }

/* folha */
.scrim { position: fixed; inset: 0; z-index: 10; background: var(--scrim); }
.enter .scrim { animation: fade .22s ease-out; }
.enter .sheet { animation: up .34s cubic-bezier(.2,.9,.25,1); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 560px; margin: 0 auto; max-height: calc(100% - var(--top) - 10px); max-height: calc(100dvh - var(--top) - 10px); display: flex; flex-direction: column; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-float); }
.sheet-head { flex: none; padding: 8px 14px 4px; }
.grab { width: 38px; height: 5px; margin: 0 auto 4px; border-radius: 3px; background: var(--dash); }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 46px; }
.sheet-bar h2 { font-size: 16px; font-weight: 800; text-align: center; white-space: nowrap; }
.tbtn { justify-self: start; height: 40px; padding: 0 6px; font-size: 15px; font-weight: 600; color: var(--muted); }
.tbtn.strong { justify-self: end; padding: 0 16px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; padding: 8px var(--gutter) calc(var(--bottom) + 24px); scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-body > * { flex-shrink: 0; }

/* formulário de lançamento */
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 4px; border-radius: 99px; background: var(--soft); }
.types button { height: 40px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.types button.on { color: #fff; background: var(--tc); }
.amount { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 2px; }
.amount label { font-size: 13px; font-weight: 700; color: var(--muted); }
.amount input { width: 100%; border: 0; background: transparent; text-align: center; font-size: 42px; font-weight: 800; letter-spacing: -.04em; color: var(--tc, var(--ink)); outline: none; font-variant-numeric: tabular-nums; }
.amount small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.title-in { width: 100%; min-height: 56px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 17px; font-weight: 700; color: var(--ink); }
.title-in:focus { outline: 2px solid var(--accent); }
.title-in::placeholder { color: var(--faint); font-weight: 600; }
.fl { display: flex; flex-direction: column; gap: 9px; }
.fl-l { font-size: 13.5px; font-weight: 800; color: var(--ink-2); padding: 0 2px; display: flex; justify-content: space-between; gap: 8px; }
.fl-l em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12.5px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
.opts.scroll::-webkit-scrollbar { display: none; }
.opt { flex: none; height: 42px; padding: 0 15px; display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; white-space: nowrap; }
.opt.on { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.opt .ci.xs { width: 24px; height: 24px; border-radius: 8px; margin-left: -7px; }
.opt .ci.xs svg { width: 15px; height: 15px; }
.opt.on .ci.xs { background: color-mix(in srgb, var(--on-primary) 22%, transparent); color: var(--on-primary); }
.opt .dot { margin-left: -2px; }
.sugg { display: flex; gap: 6px; flex-wrap: wrap; }
.sugg button { height: 32px; padding: 0 12px; border-radius: 99px; background: var(--soft); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 9%, var(--card)); font-size: 13px; line-height: 1.45; color: var(--ink-2); font-weight: 600; }
.hint svg { color: var(--accent); margin-top: 1px; }
.hint b { color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 22px; font-weight: 600; display: grid; place-items: center; }
.stepper b { min-width: 56px; text-align: center; font-size: 20px; font-weight: 800; }
.stepper span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.toggle-row div { display: flex; flex-direction: column; gap: 1px; padding: 8px 0; }
.toggle-row b { font-size: 15px; font-weight: 700; }
.toggle-row span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.date-in { height: 42px; padding: 0 12px; border: 0; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; color: var(--ink); }

/* fatura */
.inv-card { border-radius: 24px; padding: 18px 20px; color: #fff; background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); display: flex; flex-direction: column; gap: 12px; }
.inv-card span { font-size: 12.5px; font-weight: 600; opacity: .8; }
.inv-card b { font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.inv-row { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); font-size: 13px; font-weight: 700; }
.inv-row div { display: flex; flex-direction: column; gap: 1px; }
.inv-row small { font-size: 11.5px; font-weight: 600; opacity: .75; }

/* artigo e calculadora */
.art { display: flex; flex-direction: column; gap: 14px; }
.art h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.art h2 { font-size: 17px; font-weight: 800; letter-spacing: -.015em; margin-top: 6px; }
.art p, .art li { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); font-weight: 500; }
.art ul { display: flex; flex-direction: column; gap: 10px; }
.art li { display: flex; gap: 10px; }
.art li::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 10px; border-radius: 50%; background: var(--accent); }
.art .callout { padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); font-size: 14.5px; line-height: 1.55; font-weight: 600; color: var(--ink); }
.art-meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.guides .row .ci { width: 38px; height: 38px; }
.calcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calc-btn { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: left; min-height: 118px; }
.calc-btn b { font-size: 14.5px; font-weight: 800; line-height: 1.25; }
.calc-btn span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--ink-2); padding: 0 2px; }
.field input { width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-size: 16px; font-weight: 600; }
.field input:focus { outline: 2px solid var(--accent); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.result > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.result > b { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.result p { font-size: 14px; line-height: 1.5; color: var(--ink-2); font-weight: 600; }
.result p b { color: var(--ink); }
.verdict { padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 700; line-height: 1.45; background: color-mix(in srgb, var(--sc) 13%, var(--card)); }

.toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 96px); z-index: 30; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 99px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 700; text-align: center; line-height: 1.35; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); animation: toast .28s cubic-bezier(.2,.9,.3,1.15); }

/* Celulares bem estreitos: os três números viram uma lista (rótulo à esquerda, valor à direita), sem cortar valores. */
@media (max-width: 359px) {
  .hero-row, .stats, .sum-bar { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hero-row div, .stat { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
  .hero-row span, .stat span { font-size: 12.5px; }
  .hero-v { font-size: 34px; }
}

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes toast { from { transform: translate(-50%, 12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- peças do app de verdade ---------- */
.offline { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 16px; background: color-mix(in srgb, var(--amber) 14%, var(--card)); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.35; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-radius: 22px; background: var(--card); border: 1.5px dashed var(--dash); }
.empty b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.empty span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.empty .btn-s { margin-top: 6px; }
.row-lead { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.row-lead:active { opacity: .6; }
.mini { flex: none; width: 36px; height: 44px; display: grid; place-items: center; color: var(--ink-2); border-radius: 12px; }
.mini:active { background: var(--soft); }
.mini:disabled { opacity: .3; cursor: default; }
.time { height: 36px; min-width: 84px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.time:disabled { color: var(--faint); }
.num-sel { height: 36px; padding: 0 8px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 700; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.5; padding: 0 4px; }
.note b { color: var(--ink-2); }
.foot { font-size: 12px; color: var(--faint); text-align: center; margin-top: 6px; }
.warn-t { color: var(--red); font-weight: 600; }
.in-field { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-size: 16px; font-weight: 600; }
.in-field:focus { outline: 2px solid var(--accent); }
textarea.in-field { height: auto; min-height: 84px; padding: 14px 16px; line-height: 1.45; resize: vertical; font-weight: 500; }
select.in-field { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.two-sel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.btn.danger { color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--card)); min-height: 50px; font-size: 15px; }
.btn.ghost { color: var(--ink-2); min-height: 46px; font-size: 15px; }
.btn:disabled { opacity: .55; }
.btns { display: flex; flex-direction: column; gap: 8px; }
.scope { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.scope p { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.confirm { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--red) 9%, var(--card)); }
.confirm p { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.confirm p small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.icons button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); }
.icons button svg { width: 20px; height: 20px; }
.icons button.on { background: var(--c, var(--ink)); color: #fff; box-shadow: none; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 8px; }
.swc { aspect-ratio: 1; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; }
.swc.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.imp { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.imp + .imp { border-top: 1px solid var(--line); }
.imp input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.imp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.imp-main b { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.imp-main span { font-size: 12px; color: var(--muted); font-weight: 600; }
.imp-main select { height: 32px; border: 0; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 700; padding: 0 8px; max-width: 100%; }
.imp.off { opacity: .45; }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 18px; border-radius: 20px; border: 1.5px dashed var(--dash); background: var(--card); text-align: center; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.file-drop b { font-size: 16px; color: var(--ink); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.acct { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.acct + .acct { border-top: 1px solid var(--line); }
.acct-act { display: flex; gap: 8px; flex-wrap: wrap; }
.secret { display: block; padding: 20px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: center; font: 700 26px/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .06em; -webkit-user-select: all; user-select: all; }
.lead { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.archived { opacity: .55; }
.dim { opacity: .55; transition: opacity .2s; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); }
.res-list .it { min-height: 60px; }

/* entrada (login e criação de conta) */
.auth { position: fixed; inset: 0; overflow-y: auto; display: flex; padding: calc(var(--top) + 28px) 22px calc(var(--bottom) + 28px); }
.auth-in { width: 100%; max-width: 380px; margin: auto; display: flex; flex-direction: column; gap: 24px; }
.auth-title { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.auth-sub { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.auth-foot { display: flex; flex-direction: column; gap: 4px; margin-top: -8px; }
.auth-foot p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.err { color: var(--red); font-size: 14px; font-weight: 600; line-height: 1.4; padding: 0 2px; }
.form .btn { margin-top: 6px; }
.logo { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #17171B, #34343D); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .6); }
.logo svg { width: 32px; height: 32px; }
@media (prefers-color-scheme: dark) { .logo { background: linear-gradient(140deg, #2E2E37, #44444F); } }
.spin { position: fixed; inset: 0; display: grid; place-items: center; }
.spin .logo { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.92); opacity: .6; } 50% { transform: none; opacity: 1; } }
.sheet-wrap { display: contents; }
.sheet-wrap.leaving .scrim { opacity: 0; transition: opacity .2s; }
.sheet-wrap.leaving .sheet { transform: translateY(105%); transition: transform .21s cubic-bezier(.4, 0, 1, 1); }
