/* Redesign "Animada" (v5.0): preto puro, cartões translúcidos, lima só para "deu certo". */
:root {
  --bg: #000;                       /* fundo preto puro */
  --surface: rgba(255, 255, 255, .08); /* cartão translúcido */
  --surface-2: rgba(28, 28, 30, .92); /* barra de baixo */
  --solid: #141414;                /* fundo opaco: folha, cartão que desliza */
  --line: #222;                     /* divisórias */
  --line-hi: #2f2f2f;               /* bordas */
  --text: #fff;
  --text-2: #b5b5b5;                /* secundário */
  --muted: #9a9a9a;                 /* rótulos (AA: 5,3:1 sobre o cartão mais claro) */
  --faint: #8c8c8c;                 /* setas, legendas (AA: 4,5:1 sobre cartão) */
  --lime: #c6f432;                  /* só para "deu certo": pago, lançado, aba ativa */
  --red: #ff8a7a;                   /* coral */
  --amber: #ffc75a;
  --green: var(--lime);
  /* Escala de tipografia (v5.5): um tamanho e um peso por nível. Não usar font-size/weight avulsos. */
  --fs-hero: 3.5rem; --fw-hero: 300;  /* número herói */
  --fs-t: 1.875rem;    --fw-t: 300;     /* título e números grandes */
  --fs-st: 1.25rem;   --fw-st: 500;    /* subtítulo */
  --fs-tx: 0.9375rem;   --fw-tx: 400;    /* texto */
  --fs-r: 0.75rem;    --fw-r: 500;     /* rótulo, legenda */
  --r: 22px; --r-sm: 14px; --r-btn: 14px; --r-sheet: 32px;
  --ease: cubic-bezier(.2, .9, .1, 1);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  /* Nomes antigos, mantidos para o resto do CSS continuar funcionando. */
  --glass: var(--surface);
  --glass-hi: rgba(255, 255, 255, .12);
  --stroke: var(--line);
  --stroke-hi: var(--line-hi);
  --accent: var(--text);
  --blur: blur(24px) saturate(140%);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font-family: Geist, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  letter-spacing: -.01em;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Superfície (antigo vidro) ---------- */
.g { background: var(--surface); border: 0; box-shadow: none; }

/* ---------- Login ---------- */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { border-radius: 32px; padding: 36px 26px; max-width: 380px; width: 100%; text-align: center; }
.logo { width: 76px; height: 76px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-weight: 800; font-size: 1.7rem; background: var(--lime); color: var(--bg); }
.login-card h1 { margin: 18px 0 6px; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.03em; }
.login-card p { color: var(--muted); line-height: 1.5; }
.erro { color: var(--red); font-size: var(--fs-tx); font-weight: var(--fw-tx); min-height: 1.2em; }

/* ---------- Topo ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--st) + 12px) 16px 10px;
}
.top.scrolled { background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--line); font-weight: 600; display: grid; place-items: center; border: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.ativo { box-shadow: 0 0 0 2px var(--text); }
#mes-label { cursor: pointer; }
.mes-pill { flex: 1; display: flex; align-items: center; justify-content: space-between; border-radius: 99px; height: 42px; padding: 0 4px; max-width: 260px; margin: 0 auto; }
.mes-pill button { width: 36px; height: 36px; border-radius: 50%; font-size: var(--fs-st); font-weight: var(--fw-st); color: var(--muted); }
.mes-pill button:active { background: var(--glass-hi); }
.mes-pill span { font-weight: var(--fw-tx); font-size: var(--fs-tx); }
/* Topo do redesign (item 01): mês só em texto, avatar e olho de 36px. */
.top .mes-pill { background: transparent; }
.top .mes-pill span { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.top .mes-pill button { color: var(--faint); }
.top .avatar { width: 36px; height: 36px; }
.top .ico { width: 36px; height: 36px; background: transparent; border: 1px solid var(--line); }
.ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.ico svg { width: 20px; height: 20px; }

.menu { position: fixed; z-index: 40; top: calc(var(--st) + 62px); left: 16px; border-radius: 22px; min-width: 250px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.menu button { display: block; width: 100%; text-align: left; padding: 14px 18px; border-top: 1px solid var(--stroke); }
.menu button:active { background: var(--glass-hi); }
.menu-user { padding: 14px 18px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); line-height: 1.4; }
.menu-user b { color: var(--text); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.menu-status { padding: 10px 18px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); border-top: 1px solid var(--stroke); }
.danger-text { color: var(--red) !important; }

main { padding: 4px 16px calc(180px + var(--sb)); max-width: 720px; margin: 0 auto; }
.fade-in { animation: aparece .35s ease-out both; }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { padding: 26px 4px 26px; }
.ola { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.03em; }
.hero-lbl { color: var(--muted); margin-top: 18px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.hero-val { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: -.045em; margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero-sub { color: var(--muted); font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-top: 8px; }
.hero-sub b { color: var(--text); font-weight: 600; }

/* ---------- Cartões ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { border-radius: var(--r); padding: 16px; text-align: left; display: block; width: 100%; position: relative; }
button.card:active { transform: scale(.985); }
.card + .card, .grid2 + .card, .card + .grid2 { margin-top: 12px; }
.grid2 > .card { margin-top: 0; }
.card .lbl { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); }
.card .val { font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.03em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.card .sub { color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 3px; }
.chev { position: absolute; top: 14px; right: 16px; color: var(--muted); font-size: 1.2rem; }
.card-top { height: 46px; display: flex; align-items: center; margin-bottom: 14px; padding-right: 18px; }
.dots { display: flex; }
.dots span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--bg); display: grid; place-items: center; font-size: .95rem; margin-left: -10px; }
.dots span:first-child { margin-left: 0; }
.catbar { display: flex; gap: 4px; width: 100%; height: 12px; }
.catbar i { display: block; height: 100%; border-radius: 99px; min-width: 10px; }
.catbar.vazia i { background: var(--glass-hi); flex: 1; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats .val { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--amber); }
.barra { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.barra > div { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.barra.amber > div { background: var(--amber); }
.barra.red > div { background: var(--red); }
.barra-lbl { display: flex; justify-content: space-between; color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 7px; }

/* ---------- Seções e listas ---------- */
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.sec-h h3 { margin: 0; font-size: var(--fs-tx); font-weight: var(--fw-tx); letter-spacing: -.02em; }
.sec-h button, .link { color: var(--accent); font-size: var(--fs-r); font-weight: var(--fw-r); }
.list { border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.row + .row { border-top: 1px solid var(--stroke); }
.ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.15rem; background: color-mix(in srgb, var(--c, var(--muted)) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--muted)) 35%, transparent); }
.row .info { flex: 1; min-width: 0; cursor: pointer; }
.row .t { font-weight: var(--fw-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-tx); }
.row .m { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row .v { font-weight: var(--fw-tx); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-tx); }
.row .v.pos { color: var(--green); }
.chk { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--stroke-hi); color: transparent; font-size: var(--fs-r); font-weight: var(--fw-r); display: grid; place-items: center; transition: all .2s; }
.chk.on { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.chk:active { transform: scale(.9); }
.tag { font-size: var(--fs-r); padding: 2px 8px; border-radius: 99px; font-weight: var(--fw-r); }
.tag.red { background: rgba(255, 138, 122, .16); color: var(--red); }
.tag.amber { background: rgba(255, 199, 90, .15); color: var(--amber); }
.tag.green { background: rgba(198, 244, 50, .14); color: var(--green); }
.vazio { border-radius: var(--r); padding: 30px 20px; text-align: center; color: var(--muted); line-height: 1.5; }
.vazio .big { font-size: 2rem; display: block; margin-bottom: 6px; }
.total-linha { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin: 4px 6px 10px; }
.total-linha b { color: var(--text); font-variant-numeric: tabular-nums; }
.add-btn { width: 100%; border-radius: var(--r-sm); padding: 14px; margin-top: 10px; color: var(--muted); font-weight: var(--fw-tx); font-size: var(--fs-tx); border: 1px dashed var(--stroke-hi); }
.add-btn:active { background: var(--glass); }

/* Insights */
.scroll-x { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.insight { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.4; }
.insight .e { font-size: 1.3rem; line-height: 1; }
.insight.red { box-shadow: inset 3px 0 0 var(--red); }
.insight.amber { box-shadow: inset 3px 0 0 var(--amber); }
.insight.green { box-shadow: inset 3px 0 0 var(--green); }

/* Pílulas */
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 8px -16px 16px; padding: 0 16px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { padding: 10px 18px; border-radius: 99px; font-weight: var(--fw-tx); font-size: var(--fs-tx); white-space: nowrap; color: var(--text); }
.pill.active { background: var(--text); color: var(--bg); border-color: transparent; }

/* Heatmap */
.heat-h { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); text-align: center; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.heat i { aspect-ratio: 1; border-radius: 7px; background: rgba(255, 255, 255, .06); position: relative; }
.heat i.vz { background: transparent; }
.heat i.l1 { background: rgba(198, 244, 50, .22); } .heat i.l2 { background: rgba(198, 244, 50, .42); }
.heat i.l3 { background: rgba(198, 244, 50, .66); } .heat i.l4 { background: var(--lime); }
.heat i.hoje { outline: 1.5px solid rgba(255, 255, 255, .7); outline-offset: 1px; }

/* Cartão de crédito */
.ccard {
  border-radius: var(--r); padding: 18px; position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--c) 45%, var(--surface));
  border: 0; box-shadow: none;
}
.ccard + .ccard { margin-top: 14px; }
.cc-top { display: flex; justify-content: space-between; font-weight: 600; position: relative; }
.cc-lbl { margin-top: 22px; font-size: var(--fs-r); font-weight: var(--fw-r); opacity: .75; position: relative; }
.cc-val { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.04em; font-variant-numeric: tabular-nums; position: relative; }
.cc-meta { font-size: var(--fs-r); font-weight: var(--fw-r); opacity: .75; margin-top: 4px; position: relative; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ccard .barra { background: rgba(0, 0, 0, .25); }
.ccard .barra > div { background: rgba(255, 255, 255, .85); }
.cc-btns { display: flex; gap: 8px; margin-top: 14px; position: relative; }
.cc-btns button { flex: 1; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .14); font-weight: var(--fw-r); font-size: var(--fs-r); border: 1px solid rgba(255, 255, 255, .12); }

/* Metas */
.meta { border-radius: var(--r); padding: 16px; display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; }
.meta + .meta { margin-top: 10px; }
.ring { width: 58px; height: 58px; flex-shrink: 0; position: relative; display: grid; place-items: center; font-size: 1.4rem; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { stroke-width: 5; fill: none; }
.meta .info { flex: 1; min-width: 0; }
.meta .t { font-weight: 600; }
.meta .m { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 3px; }
.meta .v { font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }

/* Gráficos */
.donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.donut { width: 150px; height: 150px; flex-shrink: 0; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 20; }
.donut .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.donut .c b { display: block; color: var(--text); font-size: var(--fs-tx); font-weight: var(--fw-tx); letter-spacing: -.02em; }
.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-r); font-weight: var(--fw-r); }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 18px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .pair i { width: 40%; max-width: 16px; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bars .in { background: var(--green); }
.bars .out { background: var(--text-2); }
.bars .col span { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); }
.bars .col.atual span { color: var(--text); font-weight: 600; }
.leg-inline { display: flex; gap: 14px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); margin-top: 12px; }
.leg-inline i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.cmp .row { padding: 11px 0; }
.delta { font-size: var(--fs-r); font-weight: var(--fw-r); }

/* ---------- Dock ---------- */
.dock {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--sb) + 14px); width: calc(100% - 28px); max-width: 460px;
  display: flex; align-items: center; justify-content: space-around;
  border-radius: 26px; padding: 8px 6px; background: var(--surface-2); border: 1px solid var(--line);
}
.dock button[data-tela] { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); padding: 4px 0; transition: color .2s; }
.dock button[data-tela] { position: relative; }
.dock button[data-tela].active { color: var(--text); }
/* Aba ativa do redesign (item 05): ponto lima de 6px acima do ícone. */
.dock button[data-tela].active::before { content: ''; position: absolute; top: -6px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--lime); }
.dock button[data-tela] svg { width: 23px; height: 23px; }
.fab {
  position: fixed; z-index: 26; right: max(20px, calc(50% - 230px)); bottom: calc(var(--sb) + 104px);
  width: 58px; height: 58px; border-radius: 20px;
  background: var(--lime); color: var(--bg);
  font-size: 1.9rem; font-weight: 400; line-height: 1; box-shadow: none;
  transition: transform .15s;
}
.fab:active { transform: scale(.92); }

/* ---------- Modal / folha ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; animation: fundo .2s ease-out; }
@keyframes fundo { from { background: rgba(0, 0, 0, 0); } }
.sheet {
  width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto;
  border-radius: 30px 30px 0 0; padding: 6px 20px calc(22px + var(--sb));
  background: rgba(24, 24, 30, .82); animation: sobe .32s cubic-bezier(.2, .9, .25, 1);
}
@media (min-width: 640px) { .modal { align-items: center; } .sheet { border-radius: 30px; } }
@keyframes sobe { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }
.grabber { width: 40px; height: 5px; border-radius: 9px; background: var(--stroke-hi); margin: 6px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-head h2 { font-size: var(--fs-st); font-weight: var(--fw-st); margin: 8px 0; letter-spacing: -.02em; }
.sheet-head .ico { width: 34px; height: 34px; font-size: .85rem; }

form label, .lbl-f { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); margin: 14px 2px 6px; }
form input, form select {
  width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-size: var(--fs-tx); font-weight: var(--fw-tx); outline: none;
}
form input:focus, form select:focus { border-color: var(--line-hi); background: var(--glass-hi); outline: none; }
form select option { background: var(--solid); }
.valor-big { font-size: var(--fs-t) !important; font-weight: var(--fw-t); letter-spacing: -.03em; text-align: center; padding: 16px !important; }
.linha { display: flex; gap: 10px; }
.linha > div { flex: 1; min-width: 0; }
.chk-l { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: var(--fs-tx); font-weight: var(--fw-tx); cursor: pointer; }
.chk-l input { width: 22px; height: 22px; accent-color: var(--accent); }
.seg { display: flex; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke); gap: 4px; }
.seg label { flex: 1; margin: 0; text-align: center; padding: 10px 4px; border-radius: 12px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); cursor: pointer; }
.seg input { display: none; }
.seg label:has(input:checked) { background: rgba(255, 255, 255, .14); color: var(--text); font-weight: 600; }
.cores { display: flex; gap: 10px; flex-wrap: wrap; }
.cores label { margin: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.cores input { display: none; }
.cores label:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.acoes { display: flex; gap: 10px; margin-top: 22px; }
.btn { flex: 1; border-radius: 16px; padding: 15px 16px; font-weight: 600; background: transparent; border: 1px solid var(--line-hi); }
.btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.danger { background: rgba(255, 138, 122, .14); color: var(--red); border-color: transparent; }
.btn.big { width: 100%; margin-top: 10px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.btn:active { transform: scale(.98); }
.aviso { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); background: rgba(255, 255, 255, .05); padding: 12px 14px; border-radius: 14px; margin-top: 14px; line-height: 1.45; border: 1px solid var(--stroke); }
.acao-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.acao-grid button { border-radius: 22px; padding: 18px 14px; text-align: left; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke); }
.acao-grid button span { font-size: 1.6rem; }
.acao-grid button b { font-weight: var(--fw-tx); font-size: var(--fs-tx); }
.acao-grid button small { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: -6px; }

/* ---------- Conta ---------- */
.perfil { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.perfil .avatar { width: 64px; height: 64px; font-size: 1.5rem; }
.perfil .nome { font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.02em; }
.perfil .mail { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 2px; word-break: break-all; }
.perfil .via { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); background: rgba(255, 255, 255, .07); padding: 4px 10px; border-radius: 99px; }
.row.clic { cursor: pointer; }
.row.clic:active { background: rgba(255, 255, 255, .04); }
.row .seta { color: var(--faint); font-size: 1.1rem; }
.row .val-d { color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); white-space: nowrap; }
.row.perigo .t { color: var(--red); }
.sw { width: 50px; height: 30px; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; flex-shrink: 0; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--text); transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.sw.on { background: var(--green); }
.sw.on::after { transform: translateX(20px); }
.rodape { text-align: center; color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 26px; line-height: 1.6; }
.pin-in { letter-spacing: .6em; text-align: center; font-size: 1.6rem !important; }

/* ---------- Bloqueio ---------- */
body.travado #app, body.travado #modal { display: none !important; }
#lock { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(7, 8, 12, .35); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.lock-box { width: 100%; max-width: 320px; text-align: center; }
.lock-box h2 { margin: 16px 0 4px; font-size: var(--fs-st); font-weight: var(--fw-st); }
.lock-box p { color: var(--muted); margin: 0 0 18px; min-height: 1.3em; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 28px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); transition: background .15s; }
.pin-dots i.on { background: var(--text); border-color: var(--text); }
.pin-dots.erro { animation: treme .4s; }
@keyframes treme { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; justify-items: center; }
.pinpad button { width: 72px; height: 72px; border-radius: 50%; font-size: 1.7rem; font-weight: 400; background: rgba(255, 255, 255, .09); border: 1px solid var(--stroke); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); display: grid; place-items: center; }
.pinpad button:active { background: rgba(255, 255, 255, .25); }
.pinpad button[data-pin="bio"], .pinpad button[data-pin="del"] { background: transparent; border-color: transparent; font-size: 1.4rem; }
.pinpad button svg { width: 30px; height: 30px; }
#lock-sair { margin-top: 28px; color: var(--muted); font-weight: 500; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sb) + 100px); z-index: 60; padding: 12px 18px; border-radius: 99px; font-size: var(--fs-tx); font-weight: var(--fw-tx); background: rgba(40, 40, 48, .85); max-width: 88vw; text-align: center; animation: aparece .25s ease-out; }

/* ---------- v2.5: saúde financeira ---------- */
.saude { position: relative; overflow: hidden; }
.saude-top { display: flex; align-items: center; gap: 14px; position: relative; }
.semaforo { display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: 14px; background: rgba(0, 0, 0, .35); }
.semaforo i { width: 14px; height: 14px; border-radius: 50%; opacity: .18; }
.semaforo .r { background: var(--red); } .semaforo .a { background: var(--amber); } .semaforo .v { background: var(--lime); }
.semaforo i.on { opacity: 1; box-shadow: 0 0 12px currentColor; }
.semaforo .r.on { color: var(--red); } .semaforo .a.on { color: var(--amber); } .semaforo .v.on { color: var(--lime); }
.nota { text-align: right; } .nota b { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.04em; } .nota small { color: var(--muted); }
.s-vermelho .nota b { color: var(--red); } .s-amarelo .nota b { color: var(--amber); } .s-verde .nota b { color: var(--green); }
.saude-barra { position: relative; }
.s-vermelho .saude-barra > div { background: var(--red); }
.s-amarelo .saude-barra > div { background: var(--amber); }
.saude-res { color: var(--muted); font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.5; margin: 12px 0 6px; position: relative; }
.sinais { display: flex; flex-direction: column; gap: 2px; position: relative; }
.sinal { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--stroke); }
.sinal > span { font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.4; }
.sinal b { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.sinal small { display: block; color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 2px; line-height: 1.4; }
.dicas { margin-top: 8px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke); position: relative; }
.dicas summary { padding: 13px 14px; font-weight: var(--fw-tx); font-size: var(--fs-tx); cursor: pointer; list-style: none; }
.dicas summary::-webkit-details-marker { display: none; }
.dicas summary::after { content: '›'; float: right; transition: transform .2s; color: var(--muted); }
.dicas[open] summary::after { transform: rotate(90deg); }
.dica { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--stroke); }
.dica p { margin: 0; font-size: var(--fs-r); font-weight: var(--fw-r); line-height: 1.5; color: rgba(245, 245, 247, .85); }

/* ---------- v2.5: gastos por dia ---------- */
.heatcard .val .delta { font-size: var(--fs-r); font-weight: var(--fw-r); margin-left: 6px; vertical-align: middle; }
.hstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hstats > div { background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 10px; border: 1px solid var(--stroke); }
.hstats span { display: block; color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); }
.hstats b { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-top: 3px; font-variant-numeric: tabular-nums; }
.hstats small { color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); }
.heat i { cursor: pointer; display: grid; place-items: center; }
.heat i b { font-size: var(--fs-r); font-weight: var(--fw-r); color: rgba(255, 255, 255, .62); font-style: normal; }
.heat i.l3 b, .heat i.l4 b { color: var(--bg); }
.heat i.fut { opacity: .35; }
.heat i.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-leg { display: flex; align-items: center; gap: 4px; margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); flex-wrap: wrap; }
.heat-leg i { width: 12px; height: 12px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.heat-leg i.l1 { background: rgba(198, 244, 50, .22); } .heat-leg i.l2 { background: rgba(198, 244, 50, .42); }
.heat-leg i.l3 { background: rgba(198, 244, 50, .66); } .heat-leg i.l4 { background: var(--lime); }
.heat-leg em { margin-left: auto; font-style: normal; color: var(--muted); }
.dia-det { margin-top: 12px; border-top: 1px solid var(--stroke); padding-top: 10px; animation: aparece .25s ease-out; }
.dia-h { display: flex; justify-content: space-between; font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-bottom: 6px; }
.dia-l { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: var(--fs-r); font-weight: var(--fw-r); border-top: 1px solid var(--stroke); }
.dia-l small { display: block; color: var(--faint); font-size: var(--fs-r); font-weight: var(--fw-r); }
.dia-l b { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- v2.5: seletor de mês ---------- */
.ano-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.ano-nav b { font-size: var(--fs-st); font-weight: var(--fw-st); }
.ano-nav .ico { width: 38px; height: 38px; font-size: 1.2rem; }
.mes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mes-grid button { padding: 16px 0; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--stroke); font-weight: 600; }
.mes-grid button.atual { border-color: var(--accent); }
.mes-grid button.sel { background: var(--text); color: var(--bg); }
.mes-grid button:active { transform: scale(.96); }
/* v2.6 */
.pode .val { font-size: var(--fs-t); font-weight: var(--fw-t); }
.mini { overflow: visible; }
.row.imp .info { min-width: 0; }

/* ---------- Abertura (v2.8) ---------- */
/* 1º quadro = tela de abertura do Android: fundo do app + símbolo no centro. Tudo termina em ~0,95 s. */
#abertura { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); pointer-events: none; animation: ab-sai .3s .64s ease-in forwards; }
.ab-conj { display: flex; flex-direction: column; align-items: center; animation: ab-sobe .38s .56s cubic-bezier(.55, 0, .25, 1) forwards; }
#abertura .ab-simbolo { width: 104px; height: 104px; stroke-linecap: round; stroke-linejoin: round; fill: none; }
#abertura .ab-traco { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ab-traca .42s .05s cubic-bezier(.4, 0, .2, 1) forwards; }
#abertura .ab-folha { opacity: 0; transform-origin: 292px 196px; transform: scale(.4); animation: ab-folha .3s .4s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes ab-folha { to { opacity: 1; transform: none; } }
.ab-nome { margin-top: 16px; font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.03em; opacity: 0; transform: translateY(8px); animation: ab-nome .3s .24s ease-out forwards; }
@keyframes ab-traca { to { stroke-dashoffset: 0; } }
@keyframes ab-nome { to { opacity: 1; transform: none; } }
@keyframes ab-sobe { to { transform: translateY(calc(-50vh + 40px)) scale(.35); opacity: 0; } }
@keyframes ab-sai { to { opacity: 0; visibility: hidden; } }
/* A tela inicial entra enquanto a abertura sobe. */
.abrindo .top, .abrindo main, .abrindo .login-card { animation: ab-entra .4s .6s cubic-bezier(.2, .8, .3, 1) both; }
.abrindo .dock, .abrindo .fab { animation: ab-entra-o .4s .66s ease-out both; }
@keyframes ab-entra { from { opacity: 0; transform: translateY(18px); } }
@keyframes ab-entra-o { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #abertura { display: none; }
  .abrindo .top, .abrindo main, .abrindo .login-card, .abrindo .dock, .abrindo .fab { animation: none; }
}

/* Dividir contas */
.div-hero .val { font-size: var(--fs-t); font-weight: var(--fw-t); }
.div-acoes { display: flex; gap: 8px; margin-top: 14px; }
.div-acoes .btn { padding: 12px 10px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.row.div-novo { background: rgba(255, 199, 90, .07); }
.cod { font-family: ui-monospace, monospace; letter-spacing: .08em; color: var(--text); }

/* ---------- Início do redesign (itens 01, 03 e 09) ---------- */
.hero2 { display: block; width: 100%; text-align: left; padding: 28px 8px 0; }
.h2-lbl { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--muted); }
.h2-linha { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.hero2 .hero-val { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: -.045em; line-height: 1; margin: 0; color: var(--text); }
.hero2 .hero-val.warn { color: var(--amber); }
.hero2 .hero-val.neg { color: var(--red); }
.h2-suf { font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--muted); }
.h2-sub { display: block; margin-top: 10px; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text-2); }
.dias { display: grid; gap: 4px; height: 6px; margin-top: 18px; }
.dias i { background: var(--line-hi); border-radius: 3px; }
.dias i:first-child { background: var(--lime); }
.dias-leg { display: flex; justify-content: space-between; margin-top: 8px; font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; color: var(--faint); letter-spacing: .02em; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.mini-card { background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.mini-card span { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.mini-card b { display: block; margin-top: 4px; font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.02em; }
.sec-h .cont { font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.pend { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; }
.pend + .pend { border-top: 1px solid var(--line); }
.pend .info { flex: 1; min-width: 0; cursor: pointer; }
.pend .t { font-size: var(--fs-tx); font-weight: var(--fw-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pend .m { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); margin-top: 2px; }
.pend .m.neg { color: var(--red); }
.pend .v { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.bol { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.bol.red { background: var(--red); } .bol.amber { background: var(--amber); }
.pg { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-hi); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.pg.primario { background: var(--text); color: var(--bg); border-color: transparent; }
.pend .seta { color: var(--faint); font-size: 1.2rem; padding: 0 4px; }
.ver-tudo { display: block; margin: 10px 4px 0; min-height: 44px; }
.vazio-txt { margin: 0 4px; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--muted); }
.saude-mini { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding: 14px 16px; }
.saude-mini .lbl { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); flex: 1; }
.saude-mini .barra { width: 90px; height: 6px; margin: 0; }
.saude-mini .barra > span { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.saude-mini.s-amarelo .barra > span { background: var(--amber); } .saude-mini.s-vermelho .barra > span { background: var(--red); }
.saude-mini b { font-size: var(--fs-r); font-weight: var(--fw-r); }
.saude-mini.s-verde b { color: var(--green); } .saude-mini.s-amarelo b { color: var(--amber); } .saude-mini.s-vermelho b { color: var(--red); }
.toast-btn { margin-left: 12px; font-weight: 600; color: var(--lime); min-height: 32px; }

/* ---------- Lançar em uma linha (item 02) ---------- */
.lz .seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg); border-radius: 14px; padding: 4px; }
.lz .seg button { min-height: 40px; border-radius: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.lz .seg button.on { background: var(--line); color: var(--text); font-weight: 600; }
.lz-campo { position: relative; margin-top: 16px; }
.lz-campo input, .lz-espelho { font: var(--fw-t) var(--fs-t)/1.3 "Geist Mono", ui-monospace, monospace; letter-spacing: 0; padding: 12px 2px; white-space: pre; overflow: hidden; }
.lz-campo input { position: relative; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-hi); color: transparent; caret-color: var(--text); outline: none; }
.lz-campo input::placeholder { color: var(--faint); }
.lz-espelho { position: absolute; inset: 0; color: var(--text); pointer-events: none; }
.lz-espelho span { border-radius: 6px; }
.tk-valor { background: color-mix(in srgb, var(--lime) 15%, transparent); color: var(--lime); }
.tk-cart { background: var(--glass-hi); color: var(--text); }
.tk-desc { background: var(--glass-hi); }
.lz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.lz-grid label { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border-radius: 16px; padding: 10px 12px; margin: 0; }
.lz-grid span { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.lz-grid input, .lz-grid select { background: transparent; border: 0; padding: 0; min-height: 28px; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text); width: 100%; }
.lz-grid small { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); }
.lz-impacto { margin: 14px 2px 0; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); min-height: 1.2em; }
.lz-impacto b { color: var(--text); font-weight: 500; }
.lz-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 14px; }
.lz-ok { background: var(--lime); color: var(--bg); border-color: transparent; min-height: 52px; font-weight: 600; }
.lz-ok:disabled { opacity: .35; }
.lz-full { display: block; margin: 12px auto 0; min-height: 44px; color: var(--muted); }

/* Guia de dívidas: texto dos passos em várias linhas */
.guia .m { white-space: normal; line-height: 1.45; margin-top: 4px; }
.guia .row { align-items: flex-start; }

/* Plano mês a mês */
.plano-mes .mes-plano { padding: 12px 2px; border-top: 1px solid var(--line); }
.plano-mes .mp-h { display: flex; justify-content: space-between; font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-bottom: 4px; }
.plano-mes .mp-l { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); padding: 2px 0; }
.plano-mes .mp-l.m { color: var(--muted); }

/* ---------- Navegação do redesign (item 05) ---------- */
.dock { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 68px; padding: 0 6px; left: 12px; right: 12px; width: auto; max-width: 460px; margin: 0 auto; transform: none; bottom: calc(var(--sb) + 18px); border-radius: 26px; background: var(--surface-2); border: 1px solid var(--line); }
.dock button[data-tela] { min-height: 52px; justify-content: center; font-size: var(--fs-r); font-weight: var(--fw-r); }
.dock-lancar { justify-self: center; width: 48px; height: 48px; border-radius: 16px; background: var(--lime); color: var(--bg); display: grid; place-items: center; }
.dock-lancar svg { width: 24px; height: 24px; stroke-width: 2.4; }
.dock-lancar:active { transform: scale(.94); }
.mais .row { width: 100%; text-align: left; min-height: 64px; }
.mais .info { display: flex; flex-direction: column; gap: 2px; }
.mais .t { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.mais .m { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.mais .seta { color: var(--faint); font-size: 1.2rem; }
.mais-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--line); display: grid; place-items: center; flex-shrink: 0; }
.mais-ic svg { width: 20px; height: 20px; }

/* Ícones das categorias (item 07) */
.ic { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent); box-shadow: none; color: var(--c, var(--muted)); }
.ic svg { width: 20px; height: 20px; stroke-width: 1.8; }

/* Fechamento do mês (item 06) */
.fech-frase { font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.5; color: var(--text-2); margin: 4px 0 0; }
.fech-frase b { color: var(--text); font-weight: 600; }

.voltar-hoje { display: block; margin: 14px 8px 0; min-height: 44px; }

/* ----- Hoje visual (v4.1) ----- */
.hj-explica { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 44px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--lime); }
.hj-explica svg { transition: transform .2s; }
.hj-explica[aria-expanded="true"] svg { transform: rotate(180deg); }
.hj-casc { margin: 6px 0 0; overflow: hidden; background: var(--surface); border-radius: var(--r); }
.hj-casc[hidden], .hj-det[hidden] { display: none; }
.hj-passo { width: 100%; display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--line); text-align: left; color: inherit; }
.hj-casc > .hj-passo:first-child { border-top: 0; }
.hj-n { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.hj-n small { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.hj-v { font-variant-numeric: tabular-nums; font-weight: 500; }
.hj-v.menos { color: var(--text-2); }
.hj-v.neg { color: var(--red); }
.hj-seta { color: var(--faint); transition: transform .2s; }
.hj-passo[aria-expanded="true"] .hj-seta { transform: rotate(90deg); }
.hj-passo.res { background: rgba(255, 255, 255, .05); min-height: 64px; }
.hj-passo.res .hj-v { font-size: var(--fs-st); font-weight: var(--fw-st); }
.hj-det { padding: 2px 16px 12px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.hj-det div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); padding: 8px 0; border-bottom: 1px solid var(--line); }
.hj-det div:last-child { border-bottom: 0; }
.hj-det span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hj-reserva { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); min-height: 56px; }
.hj-step { display: flex; align-items: center; gap: 2px; }
.hj-step button { width: 44px; height: 44px; border: 1px solid var(--line-hi); border-radius: 14px; text-align: center; font-size: var(--fs-st); font-weight: var(--fw-st); color: var(--text-2); }
.hj-step output { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500; }
.hj-leitura { min-height: 62px; padding: 2px 4px 0; }
.hj-d { font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.hj-s { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hj-s.neg { color: var(--red); }
.hj-e { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); }
.hj-chart { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.hj-chart:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
.hj-alerta { margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--red); display: flex; gap: 8px; align-items: flex-start; }
.hj-alerta svg { flex: none; margin-top: 2px; }
.hj-leg { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.hj-leg span { display: inline-flex; align-items: center; gap: 6px; }
.hj-leg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hj-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--lime); }
.hj-cat { width: 100%; display: block; padding: 12px 0; border-top: 1px solid var(--line); min-height: 56px; text-align: left; color: inherit; }
.sec-h + .hj-cat { border-top: 0; }
.hj-cat-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.hj-cat-t b { font-weight: 500; font-variant-numeric: tabular-nums; }
.hj-trilho { position: relative; display: block; height: 8px; margin-top: 10px; background: var(--line-hi); border-radius: 4px; }
.hj-b { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--text-2); }
.hj-b.acima { background: linear-gradient(90deg, var(--text-2) var(--ate), var(--amber) var(--ate)); }
.hj-m { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; }
.hj-cat-s { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.hj-cat-s .up { color: var(--amber); }
.hj-cat-s .dn { color: var(--text-2); }
.hj-det-cat { border-radius: 12px; border: 0; margin-bottom: 8px; }
.hj-leg2 { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.hj-leg2 i { width: 2px; height: 12px; background: var(--text); display: inline-block; }
@media (prefers-reduced-motion: reduce) { .hj-explica svg, .hj-seta { transition: none; } }

/* ---------- Quantos meses eu aguento (v4.2) ---------- */
.hero2 .hero-val.ok { color: var(--lime); }
.fg-hero .h2-sub b { font-weight: 600; color: var(--text); }
.fg-aviso .link { display: inline-flex; align-items: center; min-height: 44px; color: var(--lime); }
.fg-card, .fg-ctl, .fg-expl { margin-top: 16px; }
.fg-card h3, .fg-ctl h3, .fg-expl h3 { margin: 0 0 2px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.fg-s { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.fg-regua { position: relative; margin-top: 14px; }
.fg-pinos { position: relative; height: 30px; }
.fg-pin { position: absolute; bottom: 0; transform: translateX(-50%); font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.fg-pin::after { content: ""; display: block; width: 1px; height: 8px; margin: 3px auto 0; background: currentColor; }
.fg-pin.seg { color: var(--amber); } .fg-pin.vaga { color: var(--lime); } .fg-pin.fim { color: var(--red); }
.fg-barras { position: relative; display: grid; gap: 3px; height: 150px; }
.fg-mes { position: relative; min-width: 0; min-height: 44px; border-radius: 6px; }
.fg-mes i { position: absolute; left: 1px; right: 1px; border-radius: 4px; transition: height .25s, bottom .25s; }
.fg-mes i.p { background: var(--lime); }
.fg-mes i.n { background: var(--red); }
.fg-mes.sel { background: rgba(255, 255, 255, .06); }
.fg-mes.sel i { left: 0; right: 0; }
.fg-mes:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.fg-zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-hi); pointer-events: none; }
.fg-rot { display: grid; gap: 3px; margin-top: 6px; }
.fg-rot span { font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; color: var(--faint); text-align: center; text-transform: uppercase; overflow: hidden; }
.fg-rot span.ano { color: var(--text-2); }
.fg-rot small { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.fg-det { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.fg-dt { font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; color: var(--muted); text-transform: uppercase; padding: 8px 0 4px; }
.fg-det > div:not(.fg-dt) { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); padding: 8px 0; border-bottom: 1px solid var(--line); }
.fg-det > div > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fg-det > .fg-sub { padding: 4px 0 4px 14px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); border-bottom: 0; }
.fg-det > .fg-tot { color: var(--text); font-weight: 600; border-bottom: 0; }
.fg-c { padding: 14px 0; border-top: 1px solid var(--line); }
.fg-c:first-of-type { border-top: 0; padding-top: 8px; }
.fg-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fg-ch b { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.fg-ch output { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.fg-c small { display: block; margin-top: 2px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); line-height: 1.4; }
.fg-chips { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.fg-chips::-webkit-scrollbar { display: none; }
.fg-chips button { flex: none; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 12px; color: var(--text-2); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.fg-chips button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--bg); font-weight: 600; }
.fg-sal { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.fg-sal[hidden] { display: none; }
.fg-sal input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-hi); border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
#fg-corte { width: 100%; height: 44px; margin: 6px 0 0; accent-color: var(--lime); }
.fg-ef { min-height: 18px; margin-top: 6px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--lime); }
.fg-ef b { font-weight: 600; }
.fg-ef .fraco { color: var(--text-2); }
.fg-expl p { margin: 6px 0 0; font-size: var(--fs-r); font-weight: var(--fw-r); line-height: 1.55; color: var(--text-2); }
.fg-expl b { color: var(--text); font-weight: 500; }
.fg-linha { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; margin-top: 16px; padding: 12px 16px; background: var(--surface); border-radius: var(--r); text-align: left; color: inherit; }
.fg-linha small { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.fg-linha b { display: block; margin: 2px 0; font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.02em; }
.fg-linha b.neg { color: var(--red); }
.fg-plan { margin-top: 12px; }
.fg-plan .val.neg { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .fg-mes i { transition: none; } }

/* ---------- Dívidas interativas (v4.3) ---------- */
.dv-card, .dv-ctl { margin-top: 16px; }
.dv-card h3 { margin: 18px 0 2px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.dv-hero { padding: 4px 0 0; }
.dv-big { display: block; margin-top: 6px; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.04em; line-height: 1.05; }
.dv-ganho { color: var(--lime); font-weight: 600; }
.dv-graf { position: relative; margin-top: 12px; }
.dv-pinos { position: relative; height: 30px; }
.dv-pin { position: absolute; bottom: 0; transform: translateX(-50%); font: var(--fw-r) var(--fs-r) "Geist Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .02em; color: var(--lime); white-space: nowrap; }
.dv-pin::after { content: ""; display: block; width: 6px; height: 6px; margin: 3px auto 0; border-radius: 50%; background: currentColor; }
.dv-pin[style*="right"]::after { margin-right: 4px; }
.dv-barras { display: grid; gap: 4px; height: 170px; align-items: end; }
.dv-col { position: relative; height: 100%; min-width: 0; min-height: 44px; padding: 0 2px; border-radius: 8px; display: flex; flex-direction: column-reverse; }
.dv-col.sel { background: rgba(255, 255, 255, .06); }
.dv-col:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.dv-seg { flex: none; width: 100%; height: 0; border-radius: 4px; transition: height .4s cubic-bezier(.2, .8, .2, 1), margin .4s; }
.dv-seg:not(.zero) ~ .dv-seg:not(.zero) { margin-bottom: 2px; }
.dv-fant { position: absolute; left: 2px; right: 2px; bottom: 0; height: 0; border: 1px dashed var(--line-hi); border-radius: 4px; pointer-events: none; transition: height .4s cubic-bezier(.2, .8, .2, 1); }
.dv-fant[style*="height: 0px"], .dv-fant[style*="height:0px"] { border: 0; }
.dv-ok { position: absolute; left: 50%; bottom: 4px; width: 14px; height: 14px; transform: translateX(-50%); color: var(--lime); stroke-width: 2.6; opacity: 0; transition: opacity .3s .2s; }
.dv-col.livre .dv-ok { opacity: 1; }
.dv-rot { gap: 4px; }
.dv-leg { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-leg i { width: 14px; height: 10px; border: 1px dashed var(--line-hi); border-radius: 3px; }
.dv-det > .dv-lin { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); }
.dv-det > .dv-lin:last-child { border-bottom: 0; }
.dv-lin > i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.dv-lin .n { flex: 1; min-width: 0; }
.dv-lin .v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dv-lin small { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-lin.zerou .v { color: var(--lime); font-weight: 600; }
.dv-lin.feita { opacity: .45; }
.dv-play { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 14px; border: 1px solid var(--line-hi); border-radius: 14px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.dv-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.dv-ctl input[type=range] { width: 100%; height: 44px; margin: 10px 0 2px; accent-color: var(--lime); }
.dv-ef { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(198, 244, 50, .07); border: 1px solid rgba(198, 244, 50, .22); font-size: var(--fs-r); font-weight: var(--fw-r); line-height: 1.5; color: var(--text-2); }
.dv-ef b { color: var(--text); font-weight: 600; }
.dv-ef.fraco { background: rgba(255, 255, 255, .03); border-color: var(--line); }
.dv-usar { width: 100%; min-height: 48px; margin-top: 10px; border-radius: 14px; background: var(--lime); color: var(--bg); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.dv-festa { position: fixed; left: 50%; bottom: calc(var(--sb) + 96px); z-index: 70; display: flex; align-items: center; gap: 12px; width: min(400px, calc(100% - 32px)); padding: 14px 16px; background: var(--solid); border: 1px solid rgba(198, 244, 50, .4); border-radius: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); transform: translate(-50%, 40px); opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.2, 1.3, .3, 1), opacity .25s; }
.dv-festa.on { transform: translate(-50%, 0); opacity: 1; }
.dv-festa b { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.dv-festa small { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-festa-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--bg); }
.dv-festa-ic svg { stroke-width: 2.4; }
.dv-confete { position: fixed; z-index: 69; width: 7px; height: 11px; border-radius: 2px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dv-seg, .dv-fant, .dv-ok, .dv-festa { transition: none; } }

/* =====================================================================
   Visual "Animada" (v5.0). Sobrescreve o "Calma" acima: rótulos em
   maiúsculas, número herói em Geist 300, botão principal branco com →,
   cantos 22/14/32, barra de baixo em cápsula. Animações de entrada só
   com #conteudo.entrando (troca de tela), nunca a cada atualização.
   ===================================================================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cap, .card .lbl, .sec-h h3, .h2-lbl, .hj-d, .fg-dt, .mini-card span, .lz-grid span, .hstats span {
  font: var(--fw-r) var(--fs-r) Geist, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
}
.sec-h h3 { font-size: var(--fs-r); font-weight: var(--fw-r); letter-spacing: .08em; }
.sec-h > span:not(.cont) { font: var(--fw-r) var(--fs-r) Geist, sans-serif; color: var(--faint); letter-spacing: .08em; }
.sec-h .cont { font: var(--fw-r) var(--fs-r) Geist, sans-serif; color: var(--muted); }
.card .val { font-weight: 400; letter-spacing: -.035em; }
.card .sub { color: var(--muted); }
.list { border-radius: var(--r); }
.row + .row, .pend + .pend { border-top-color: var(--line); }
.vazio { border-radius: var(--r); color: var(--muted); }
.chev { color: var(--text); font-size: 1rem; top: 16px; }
.aviso { background: rgba(255, 255, 255, .05); border-color: var(--line); border-radius: var(--r-sm); color: var(--text-2); }

/* Número herói */
.hero-val, .hero2 .hero-val { font-weight: 300; letter-spacing: -.06em; line-height: 1; }
.hero2 .hero-val { font-size: var(--fs-hero); font-weight: var(--fw-hero); }
.hero2 .hero-val.warn { color: var(--amber); }
.hero2 .hero-val.neg { color: var(--red); }
.h2-sub { color: var(--text-2); font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-top: 12px; }
.h2-suf { color: var(--muted); }

/* Odômetro: cada dígito numa coluna 0–9 */
.od { display: inline-flex; align-items: flex-start; height: 1em; line-height: 1; }
.od-c { display: inline-block; height: 1em; overflow: hidden; }
.od-f { display: flex; flex-direction: column; transition: transform 1.1s var(--ease); }
.od-f span { display: block; height: 1em; line-height: 1; text-align: center; }
.od-s { display: inline-block; line-height: 1; white-space: pre; }
.od-p { color: var(--muted); }
.hero-val.neg .od-p { color: inherit; opacity: .7; }

/* Botões */
.btn { border-radius: var(--r-btn); border: 1px solid var(--line-hi); font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: uppercase; letter-spacing: .06em; min-height: 48px; }
.btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.primary::after { content: " \2192"; }
.btn.primary:disabled { background: var(--line); color: var(--faint); }
.btn.primary:disabled::after { content: ""; }
.btn.danger { border-color: transparent; }
.btn.big { font-size: var(--fs-r); font-weight: var(--fw-r); }
.pg { border-radius: var(--r-btn); border-color: var(--line-hi); font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.pg.primario, .pg.branco { background: var(--text); color: var(--bg); border-color: transparent; }
.add-btn { border-radius: var(--r-btn); border-color: var(--line-hi); }
.link, .sec-h button { color: var(--text); }
.hj-explica, .hj-link, .fg-aviso .link { color: var(--text); }

/* Chips (pílulas de 44 px) e abas */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip, .pill, .fg-chips button { flex: none; min-height: 44px; height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line-hi); background: transparent; color: var(--text); font: var(--fw-r) var(--fs-r) Geist, sans-serif; transition: background .3s, color .3s, border-color .3s; }
.chip[aria-pressed="true"], .pill.active, .fg-chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 500; }
.pill.g { background: transparent; }
.pill.g.active { background: var(--text); }
.pills { margin: 4px -16px 16px; }

/* Controle deslizante: trilho de 2 px, bolinha branca de 22 px, 44 px de toque */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; accent-color: var(--text); }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-hi); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--text); margin-top: -10px; }
input[type=range]::-moz-range-track { height: 2px; background: var(--line-hi); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--text); }
input[type=range]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 8px; }

/* Seta que gira */
.seta-g { display: inline-block; transition: transform .35s ease; font-size: 1.125rem; line-height: 1; }
[aria-expanded="true"] > .seta-g { transform: rotate(180deg); }

/* Formulários e folhas */
form input, form select { border-radius: var(--r-sm); border-color: var(--line-hi); background: rgba(255, 255, 255, .05); }
form input:focus, form select:focus { border-color: var(--faint); background: rgba(255, 255, 255, .08); }
form label, .lbl-f { font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
form .chk-l, .chk-l { font: var(--fw-tx) var(--fs-tx) Geist, sans-serif; text-transform: none; letter-spacing: 0; color: var(--text); }
.valor-big { font-weight: var(--fw-t) !important; font-size: var(--fs-t) !important; letter-spacing: -.05em; }
.modal { background: rgba(0, 0, 0, .6); }
.sheet { background: var(--solid); border-radius: var(--r-sheet) var(--r-sheet) 0 0; border-top: 1px solid var(--line-hi); animation: folha .5s var(--ease); }
@media (min-width: 640px) { .sheet { border-radius: var(--r-sheet); border: 1px solid var(--line-hi); } }
@keyframes folha { from { transform: translateY(100%); } to { transform: none; } }
.grabber { width: 40px; height: 4px; background: var(--line-hi); }
.sheet-head h2 { font-weight: var(--fw-t); font-size: var(--fs-t); letter-spacing: -.04em; }
.sheet-head .ico { width: 44px; height: 44px; background: transparent; border: 1px solid var(--line-hi); }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.acao-grid button { border-radius: var(--r); background: rgba(255, 255, 255, .06); border-color: var(--line); }
.mes-grid button { border-radius: var(--r-sm); min-height: 48px; }
.mes-grid button.atual { border-color: var(--lime); }

/* Toast: branco, texto preto, botão DESFAZER preto */
.toast { display: flex; align-items: center; gap: 14px; background: var(--text); color: var(--bg); border-radius: 18px; padding: 10px 16px; font-size: var(--fs-tx); font-weight: var(--fw-tx); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: torrada .35s ease both; }
.toast:has(.toast-btn) { padding: 6px 6px 6px 16px; }
@keyframes torrada { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast-btn { margin: 0; flex: none; height: 36px; min-height: 36px; padding: 0 12px; border-radius: var(--r-btn); background: var(--bg); color: var(--text); font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: uppercase; letter-spacing: .04em; }

/* Barra de baixo: cápsula, aba ativa branca com ponto lima embaixo, Lançar em círculo branco */
.dock { height: auto; padding: 6px; border-radius: 30px; background: var(--surface-2); border: 1px solid var(--line-hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); left: 14px; right: 14px; }
.dock button[data-tela] { position: relative; gap: 3px; padding: 6px 0 2px; min-height: 56px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dock button[data-tela].active { color: var(--text); }
.dock button[data-tela]::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.dock button[data-tela].active::before { content: none; }
.dock button[data-tela].active::after { background: var(--lime); }
.dock button[data-tela] svg { width: 22px; height: 22px; stroke-width: 1.6; }
.dock-lancar { width: 54px; height: 54px; border-radius: 50%; background: var(--text); color: var(--bg); }
.dock-lancar svg { stroke-width: 2; }
.dock-selo { position: absolute; top: 2px; left: 50%; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--bg); font: var(--fw-r) var(--fs-r)/18px Geist, sans-serif; text-align: center; }
.dock-selo[hidden] { display: none; }

/* Topo */
.top .ico { border-color: var(--line-hi); }
.avatar { background: var(--text); color: var(--bg); }

/* Entrada em cascata (só na troca de tela) */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes desenha { from { stroke-dashoffset: var(--len, 1); } to { stroke-dashoffset: 0; } }
@keyframes cresce-y { from { transform: scaleY(0); } }
@keyframes cresce-x { from { transform: scaleX(0); } }
.entrando .rise { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
.entrando .desenha { stroke-dasharray: var(--len, 1); animation: desenha 1.5s .3s cubic-bezier(.6, 0, .2, 1) both; }
.entrando .pop { animation: pop .4s ease both; animation-delay: var(--d, 1.3s); transform-box: fill-box; transform-origin: center; }
.entrando .cresce-y { transform-origin: bottom; animation: cresce-y .7s var(--ease) both; animation-delay: var(--d, 0ms); }
.entrando .cresce-x { transform-origin: left; animation: cresce-x .8s var(--ease) both; animation-delay: var(--d, 0ms); }
.pop-agora { animation: pop .45s ease both; }

@media (prefers-reduced-motion: reduce) {
  .entrando .rise, .entrando .desenha, .entrando .pop, .entrando .cresce-y, .entrando .cresce-x, .pop-agora, .sheet, .toast { animation: none !important; }
  .od-f, .seta-g, .chip, .pill { transition: none !important; }
}

/* ----- Animada R2: topo e Hoje ----- */
.top { gap: 8px; padding: calc(var(--st) + 14px) 16px 8px; }
.mes-sel { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.mes-sel > button:not(.mes-nome) { width: 36px; height: 44px; color: var(--muted); font-size: var(--fs-st); font-weight: var(--fw-st); flex: none; }
.mes-nome { height: 44px; min-width: 128px; overflow: hidden; text-align: center; }
.mes-in { display: block; }
#mes-label { display: block; font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.01em; line-height: 24px; }
#mes-tag { display: block; font: var(--fw-r) var(--fs-r)/18px Geist, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
#mes-tag.atual { color: var(--lime); }
.mes-in.in-r { animation: in-r .35s var(--ease) both; }
.mes-in.in-l { animation: in-l .35s var(--ease) both; }
@keyframes in-r { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes in-l { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.top .ico, .top .avatar { width: 44px; height: 44px; }
.top .ico { border: 1px solid var(--line-hi); }
.hero2 { padding: 18px 4px 0; }
.hero2 .chips { margin-top: 18px; }
.hero2 .h2-linha { margin-top: 10px; }
.hj-cartao { margin-top: 18px; padding: 4px 16px; }
.hj-cartao .hj-explica { width: 100%; justify-content: space-between; min-height: 52px; margin: 0; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text); }
.hj-cartao .hj-casc { background: transparent; margin: 0 -16px; border-radius: 0; border-top: 1px solid var(--line); }
.hj-casc.abrindo > * { animation: rise .35s ease both; }
.hj-casc.abrindo > :nth-child(2) { animation-delay: 40ms; } .hj-casc.abrindo > :nth-child(3) { animation-delay: 70ms; }
.hj-casc.abrindo > :nth-child(4) { animation-delay: 110ms; } .hj-casc.abrindo > :nth-child(5) { animation-delay: 140ms; }
.hj-casc.abrindo > :nth-child(6) { animation-delay: 180ms; } .hj-casc.abrindo > :nth-child(n+7) { animation-delay: 220ms; }
.hj-passo.res .hj-v { color: var(--lime); font-weight: 400; }
.hj-passo.res .hj-v.neg { color: var(--red); }
.hj-v.menos { color: var(--red); }
.hj-apertado { color: var(--red) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: var(--fs-r) !important; font-weight: var(--fw-r); }
.hj-s { font-weight: 300; letter-spacing: -.04em; }
.pend-lista { display: flex; flex-direction: column; gap: 8px; }
.pend-lista .pend { background: var(--surface); border-radius: var(--r); padding: 10px 10px 10px 16px; min-height: 64px; transition: background .4s; }
.pend-lista .pend + .pend { border-top: 0; }
.pend .t { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.pend .m.warn { color: var(--amber); }
.pend.pago { background: rgba(198, 244, 50, .10) !important; }
.pend-ok { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--bg); display: grid; place-items: center; }
.pend-ok svg { stroke-width: 2.4; }
.pend .seta { color: var(--faint); padding: 0 10px; }
.voltar-hoje { display: inline-flex; align-items: center; margin: 18px 0 0; padding: 0 16px; flex: none; }
.duo { margin-top: 16px; }
.mini-card b { font-weight: 400; letter-spacing: -.03em; }
.fg-linha b { font-weight: 400; }
.saude-mini { border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) { .mes-in, .hj-casc.abrindo > * { animation: none !important; } }

/* ----- Animada R3: Lançar ----- */
.lz > .chips { margin: 4px -20px 0; padding: 0 20px; }
.lz-rot { display: block; margin: 18px 0 0; }
.lz-campo { margin-top: 6px; }
.lz-campo input, .lz-espelho { font: var(--fw-t) var(--fs-t)/1.3 Geist, sans-serif; letter-spacing: -.04em; padding: 6px 0 12px; }
.lz-campo input { border-bottom: 1px solid var(--line-hi); }
.lz-campo input::placeholder { color: var(--faint); }
.tk-valor { background: rgba(198, 244, 50, .14); color: var(--text); }
.tk-cart { background: rgba(255, 255, 255, .1); color: var(--text); }
.lz-sug { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lz-s { min-height: 44px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-hi); color: var(--text-2); font-size: var(--fs-r); font-weight: var(--fw-r); }
.lz-grid label { background: transparent; border: 1px solid var(--line-hi); border-radius: var(--r); padding: 12px; min-height: 64px; transition: background .3s, border-color .3s; }
.lz-grid label.cheio { background: var(--surface); border-color: transparent; }
.lz-grid span { font-size: var(--fs-r); font-weight: var(--fw-r); }
.lz-grid input, .lz-grid select { font-size: var(--fs-st); font-weight: var(--fw-st); color: var(--faint); }
.lz-grid label.cheio input, .lz-grid label.cheio select { color: var(--text); }
.lz-grid input::placeholder { color: var(--faint); }
.lz-impacto { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.lz-impacto:empty { display: none; }
.lz-impacto span:first-child { color: var(--muted); }
.lz-impacto i { font-style: normal; color: var(--faint); }
.lz-impacto b { font-weight: 500; transition: color .3s; }
.lz-ok { margin-top: 16px; min-height: 52px; }
.lz-links { display: flex; justify-content: center; gap: 24px; margin-top: 8px; }
.lz-links .link { min-height: 44px; color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); }
.lz-feito { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 0 10px; text-align: center; }
.lz-ok-ic { position: relative; width: 88px; height: 88px; display: grid; place-items: center; }
.lz-anel { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lime); animation: anel .9s ease-out both; }
.lz-circ { width: 88px; height: 88px; border-radius: 50%; background: var(--lime); color: var(--bg); display: grid; place-items: center; animation: pop .45s ease both; }
.lz-circ svg { width: 40px; height: 40px; stroke-width: 2.4; }
.lz-circ path { stroke-dasharray: 1; animation: desenha .5s .25s ease both; }
@keyframes anel { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.lz-res { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.05em; animation: rise .5s .2s ease both; }
.lz-res2 { font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text-2); animation: rise .5s .3s ease both; }
.lz-fbtns { display: flex; gap: 8px; margin-top: 10px; animation: rise .5s .4s ease both; }
.lz-fbtns .btn { padding: 0 18px; }
@media (prefers-reduced-motion: reduce) { .lz-anel { display: none; } .lz-circ, .lz-circ path, .lz-res, .lz-res2, .lz-fbtns { animation: none !important; } .lz-grid label { transition: none; } }

/* ----- Animada R4: Planejar ----- */
.pl-topo { padding: 18px 4px 6px; }
.pl-topo h1 { margin: 6px 0 0; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.05em; line-height: 1.05; }
.pl-card { display: block; padding: 18px; margin-top: 12px; color: var(--text); }
.pl-h { display: flex; justify-content: space-between; font: var(--fw-r) var(--fs-r) Geist, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pl-h span:last-child:not(:first-child) { color: var(--text); }
.pl-dura { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.pl-dura b { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: -.06em; line-height: 1; }
.pl-dura span { font-size: var(--fs-st); font-weight: var(--fw-st); }
.pl-regua { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: end; height: 36px; margin-top: 14px; }
.pl-regua span { background: var(--text); border-radius: 4px; }
.pl-regua span.falta { background: transparent; border: 1px solid var(--red); }
.pl-quando { display: block; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.04em; margin-top: 8px; }
.pl-prog { display: block; height: 6px; background: var(--line-hi); border-radius: 6px; overflow: hidden; margin-top: 12px; }
.pl-prog span { display: block; height: 100%; background: var(--lime); border-radius: 6px; }
.pl-rod { display: flex; justify-content: space-between; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); margin-top: 8px; }
.pl-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pl-duo .pl-card { margin-top: 0; padding: 16px; }
.pl-mini { display: block; width: 100%; height: 40px; margin-top: 12px; }
.pl-num { display: block; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.05em; margin-top: 10px; }
.pl-nota { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); margin-top: 6px; color: var(--text-2); }
.pl-meta { display: flex; align-items: center; gap: 12px; padding: 16px; }
.pl-meta > span { flex: 1; min-width: 0; }
.pl-mt { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); margin-top: 4px; }
.pl-meta b { font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.04em; }
.meta { border-radius: var(--r); }

/* ----- Animada R5: Fôlego (e cabeçalho das subtelas) ----- */
.sub-topo { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; }
.ico-volta { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-hi); display: grid; place-items: center; font-size: 1rem; flex: none; }
.fg-hero { padding: 14px 4px 0; }
.fg-hero h1 { margin: 0; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.05em; line-height: 1.1; }
.fg-dura { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; }
.fg-n { font-size: min(7.5rem, 32vw) !important; letter-spacing: -.07em; }
.fg-suf { font-size: var(--fs-st); font-weight: var(--fw-st); padding-bottom: 14px; }
.fg-suf small { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--muted); margin-top: 2px; }
.fg-card { margin-top: 14px; }
.fg-barras { height: 150px; border-bottom: 1px solid var(--line-hi); }
.fg-mes i { border-radius: 6px 6px 2px 2px; transition: height .7s var(--ease), bottom .7s var(--ease); }
.fg-mes i.p { background: var(--text); }
.fg-mes i.n { background: transparent; border: 1px solid var(--red); }
.fg-mes em { position: absolute; left: -4px; right: -4px; text-align: center; font: var(--fw-r) var(--fs-r) Geist, sans-serif; color: var(--text-2); font-style: normal; transition: bottom .7s var(--ease); white-space: nowrap; }
.fg-mes em.neg { color: var(--red); }
.fg-rot span { font-family: Geist, sans-serif; color: var(--muted); }
.fg-rot span.neg { color: var(--red); }
.fg-zero { display: none; }
.fg-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.fg-tres .mini-card { padding: 12px; }
.fg-tres .mini-card b { font-size: var(--fs-st); font-weight: var(--fw-st); margin: 0; }
.fg-tres .mini-card span { font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: none; letter-spacing: 0; margin-top: 4px; }
.fg-detcard { margin-top: 12px; }
.fg-detcard .fg-det { margin-top: 0; border-top: 0; padding-top: 0; }
.fg-ctl { margin-top: 22px; }
.fg-c { border-top-color: var(--line); }
.fg-ch b { font-weight: 400; }
.fg-ef { color: var(--text-2); }
.fg-ef b { color: var(--lime); }
.fg-salvo { margin: 10px 4px 0; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); min-height: 1em; }
.fg-ctl .btn.big { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .fg-mes i, .fg-mes em { transition: none; } }

/* ----- Animada R6: Dívidas ----- */
.dv-topo { display: block; padding: 14px 4px 0; }
.dv-lbl { display: block; font-size: var(--fs-st); font-weight: var(--fw-st); color: var(--text-2); letter-spacing: -.02em; }
.dv-janela { display: block; height: 78px; overflow: hidden; margin-top: 4px; }
.dv-quando { display: block; font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: -.065em; line-height: 1.05; }
.dv-quando.troca { animation: troca .5s var(--ease) both; }
@keyframes troca { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
.dv-nums { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-nums b { color: var(--text); font-weight: 500; }
.dv-nums b.neg { color: var(--red); }
.dv-abas { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-hi); margin-top: 18px; }
.dv-abas button { height: 48px; font: var(--fw-tx) var(--fs-tx) Geist, sans-serif; color: var(--muted); transition: color .3s; }
.dv-abas button[aria-selected="true"] { color: var(--text); }
.dv-sub { position: absolute; bottom: -1px; left: 0; width: 33.333%; height: 2px; background: var(--text); transition: transform .4s cubic-bezier(.3, 1.3, .5, 1); }
.dv-explica { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); line-height: 1.4; margin: 10px 4px 0; }
.dv-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dv-item { text-align: left; background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.dv-i1 { display: flex; align-items: baseline; gap: 10px; }
.dv-n { font: var(--fw-r) var(--fs-r) "Geist Mono", monospace; color: var(--muted); }
.dv-nome { flex: 1; min-width: 0; font-size: var(--fs-tx); font-weight: var(--fw-tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-saldo { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.dv-barra { display: block; height: 6px; background: var(--line-hi); border-radius: 6px; overflow: hidden; }
.dv-barra span { display: block; height: 100%; background: var(--text); border-radius: 6px; }
.dv-barra span.primeira { background: var(--lime); }
.dv-i3 { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-i3 b { color: var(--text); font-weight: 500; }
.dv-dica { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-hi); padding-top: 10px; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--text-2); line-height: 1.45; animation: rise .3s ease both; }
.dv-dica span { flex: none; color: var(--text); text-transform: uppercase; font-size: var(--fs-r); font-weight: var(--fw-r); letter-spacing: .06em; min-height: 44px; display: flex; align-items: center; }
.dv-perde { margin: 14px 4px 0; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.dv-perde b { color: var(--red); font-weight: 500; }
.dv-card { margin-top: 18px; }
.dv-usar { background: var(--text); color: var(--bg); border-radius: var(--r-btn); text-transform: uppercase; letter-spacing: .06em; font: var(--fw-r) var(--fs-r) Geist, sans-serif; }
.dv-play { border-radius: var(--r-btn); text-transform: uppercase; letter-spacing: .06em; font: var(--fw-r) var(--fs-r) Geist, sans-serif; }
.dv-ef { background: rgba(198, 244, 50, .06); border-color: rgba(198, 244, 50, .18); border-radius: var(--r-sm); }
.dv-aporte { font-size: var(--fs-t) !important; font-weight: var(--fw-t); text-align: center; letter-spacing: -.04em; }
.dv-festa { background: var(--text); color: var(--bg); border: 0; }
.dv-festa small { color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .dv-quando.troca, .dv-dica { animation: none !important; } .dv-sub { transition: none; } }

/* ----- Animada R7: Mais, Movimentos e o resto ----- */
.mais-topo { display: flex; align-items: center; gap: 14px; padding: 22px 4px 16px; }
.mais-av { width: 56px; height: 56px; font-size: 1.375rem; }
.mais-nome { font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.04em; }
.mais-sync { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); }
.mais .row { min-height: 64px; padding: 10px 16px; gap: 14px; }
.mais .t { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.mais-ic { background: var(--solid); border-radius: 12px; }
.mais .seta, .row .seta { color: var(--faint); }
.total-linha { font-size: var(--fs-r); font-weight: var(--fw-r); text-transform: uppercase; letter-spacing: .06em; }
.total-linha b { font-weight: 500; letter-spacing: 0; }
.row .t { font-weight: 500; }
.row .v { font-weight: 400; }
.chk { border-color: var(--line-hi); width: 44px; height: 44px; margin: -7px -7px -7px 0; }
.ccard { border-radius: var(--r); }
.ccard .cc-val { font-weight: 300; letter-spacing: -.05em; }
.cc-btns button { border-radius: var(--r-btn); text-transform: uppercase; font: var(--fw-r) var(--fs-r) Geist, sans-serif; letter-spacing: .06em; min-height: 44px; }
.tag { font-weight: 500; letter-spacing: .02em; }
.login-card h1, .lock-box h2 { font-weight: 300; letter-spacing: -.04em; }
.pinpad button { background: rgba(255, 255, 255, .08); }
.stats .val, .div-hero .val { font-weight: 300; }

/* ----- Animada R8: rede de segurança do movimento reduzido (tudo parado e legível) ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
}

/* ----- Fase 5: grupos ----- */
.grp-card { display: block; padding: 18px; margin-top: 12px; }
.grp-nome { display: block; font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.04em; margin-top: 8px; }
.grp-saldo { display: block; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text-2); margin-top: 6px; }
.grp-saldo.neg { color: var(--red); }
.grp-vazio { margin-top: 12px; line-height: 1.5; }
.grp-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.grp-acoes .btn { flex: 1 1 auto; padding: 0 16px; }
.grp-transf { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.grp-t { background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.grp-t1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.grp-t1 i { font-style: normal; color: var(--muted); padding: 0 4px; }
.grp-t1 b { font-weight: var(--fw-st); font-size: var(--fs-st); letter-spacing: -.03em; white-space: nowrap; }
.grp-t2 { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.grp-t2:empty { display: none; }
.grp-nota { margin-top: 8px; }
.grp-pessoas { padding: 4px 16px; }
.grp-p { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.grp-p:first-child { border-top: 0; }
.grp-p small { color: var(--muted); }
.grp-p b { font-weight: 400; white-space: nowrap; }
.grp-linha { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 6px 0 0; text-transform: none; letter-spacing: 0; font-size: var(--fs-tx); font-weight: var(--fw-tx); color: var(--text); }
.grp-linha span { flex: 1; min-width: 0; }
.grp-linha input:not([type=checkbox]) { width: 110px; flex: none; padding: 10px 12px; text-align: right; }
.grp-linha input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--text); flex: none; }
.grp-parts { margin-top: 6px; }
#g-modo { margin-top: 2px; }
.grp-cod { width: 100%; margin-top: 12px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line-hi); background: rgba(255, 255, 255, .05); color: var(--text); font: var(--fw-r) var(--fs-r)/1.4 "Geist Mono", monospace; resize: none; word-break: break-all; }
.grp-qr { width: 220px; margin: 16px auto 0; padding: 10px; background: var(--text); border-radius: var(--r-sm); color: var(--bg); font-size: var(--fs-r); font-weight: var(--fw-r); text-align: center; }
.grp-qr:empty { display: none; }
.grp-qr svg { width: 100%; height: auto; display: block; stroke: none; }
#publico main { padding-top: calc(var(--st) + 10px); padding-bottom: 60px; }

/* ---------- Caixa de entrada e regras (v5.2) ---------- */
.cx-selo { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 4px 0 12px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface); text-align: left; }
.cx-selo b { font-weight: 600; }
.cx-selo-m { flex: 1; color: var(--muted); font-size: var(--fs-r); font-weight: var(--fw-r); }
.cx-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: cx-pulso 1.6s ease-in-out infinite; }
@keyframes cx-pulso { 50% { opacity: .35; } }
.cx-dica { margin-bottom: 12px; }
.cx-card { position: relative; margin-bottom: 12px; border-radius: var(--r); overflow: hidden; }
.cx-fundo { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; font: var(--fw-r) var(--fs-r) Geist, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.cx-f-ok, .cx-f-ign { opacity: 0; transition: opacity .2s; }
.cx-f-ok { color: var(--lime); } .cx-f-ign { color: var(--red); }
.cx-card[data-dir="ok"] .cx-f-ok, .cx-card[data-dir="ign"] .cx-f-ign { opacity: 1; }
.cx-frente { position: relative; padding: 16px; border-radius: var(--r); background: var(--solid); touch-action: pan-y; transition: transform .3s var(--ease); user-select: none; }
.cx-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cx-val { font-size: var(--fs-st); font-weight: var(--fw-st); letter-spacing: -.03em; }
.cx-val.pos { color: var(--lime); }
.cx-desc { margin: 4px 0 12px; font-size: var(--fs-st); font-weight: var(--fw-st); }
.cx-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-campos label span { display: block; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.cx-campos select { width: 100%; min-height: 44px; }
.cx-acoes { display: flex; gap: 8px; margin-top: 12px; }
.rg-row select { max-width: 46%; min-height: 44px; }
.rg-del { min-width: 44px; min-height: 44px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .cx-ponto { animation: none; } .cx-frente { transition: none; } }

/* ---------- IA: insight do dia e Pergunte (v5.3) ---------- */
.ia-card { display: flex; flex-direction: column; gap: 12px; }
.ia-tag { font: var(--fw-r) var(--fs-r) Geist, sans-serif; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line-hi); color: var(--text-2); }
.ia-txt { margin: 0; font-size: var(--fs-st); line-height: 1.4; font-weight: var(--fw-st); letter-spacing: -.01em; }
.ia-vazio { color: var(--muted); font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.ia-form input { width: 100%; min-height: 48px; }
.ia-resp { display: none; margin: 14px 0 4px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.45; white-space: pre-line; }
.ia-resp.on { display: block; }
.ia-aviso { margin: 10px 0 0; font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--faint); }

/* v5.5: classes da escala de tipografia (para marcação gerada no JS) */
.t-hero { font-size: var(--fs-hero); font-weight: var(--fw-hero); }
.t-t { font-size: var(--fs-t); font-weight: var(--fw-t); }
.t-st { font-size: var(--fs-st); font-weight: var(--fw-st); }
.t-tx { font-size: var(--fs-tx); font-weight: var(--fw-tx); }
.t-r { font-size: var(--fs-r); font-weight: var(--fw-r); }

/* v5.5: ícones de linha no lugar dos emojis (icons.js, vigiarEmojis). Neutros; lima só para "deu certo". */
.ic-l { display: inline-flex; vertical-align: -.16em; color: inherit; }
.ic-l svg { width: 1.15em; height: 1.15em; }
.ic .ic-l svg, .mais-ic .ic-l svg { width: 20px; height: 20px; }
.ic-ok { color: var(--lime); }
.ic-aviso { color: var(--amber); }
.ic-ruim { color: var(--red); }
.ic { --c: var(--text-2) !important; }
.ic.ok { --c: var(--lime) !important; }

/* v5.5: botão de voltar, um componente só (subTopo). Seta em SVG centrada, 44 px. */
.sub-topo { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; }
.ico-volta { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line-hi); background: transparent; color: var(--text); display: grid; place-items: center; flex: none; cursor: pointer; }
.ico-volta svg { width: 20px; height: 20px; stroke-width: 2; display: block; }
.ico-volta:active { background: var(--glass-hi); }

/* v5.5: o texto corrido herda o nível "texto" da escala */
body { font-size: var(--fs-tx); font-weight: var(--fw-tx); }

/* Open Finance (v5.7) */
button.sw { border: 0; padding: 0; cursor: pointer; min-width: 50px; }
.of-banco { margin-bottom: 14px; }
.of-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.of-h .m, .of-conta .m { font-size: var(--fs-r); color: var(--muted); }
.of-h .m.neg { color: var(--red); }
.of-conta { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.of-vinc { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-r); color: var(--muted); }
.of-vinc select { min-height: 44px; max-width: 60%; }
.of-ok { color: var(--green); }
.of-dif { color: var(--amber); }
.of-aj { min-height: 32px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; cursor: pointer; }
.of-selo { background: rgba(255, 255, 255, .1); color: var(--text); margin-right: 4px; }
.cx-dia { font-size: var(--fs-r); font-weight: var(--fw-st); color: var(--muted); margin: 18px 4px 8px; text-transform: uppercase; letter-spacing: .06em; }
.cx-rep { margin-top: 8px; color: var(--amber); }

/* Ajuda no lugar (Fase UX): "?" ao lado do rótulo, folha por cima do formulário */
.ajuda-btn { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: -3px 0 0 6px; padding: 0; vertical-align: middle; border-radius: 50%; border: 1px solid var(--line-hi); background: transparent; color: var(--muted); font: var(--fw-st) 11px Geist, sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; }
.ajuda-btn::after { content: ''; position: absolute; inset: -12px; }
.ajuda-btn:hover, .ajuda-btn:focus-visible { color: var(--text); border-color: var(--text); }
.ajuda-modal { z-index: 60; }
.ajuda-corpo { font-size: var(--fs-tx); font-weight: var(--fw-tx); line-height: 1.5; }
.ajuda-p { margin: 6px 2px 0; color: var(--text); }
.ajuda-passos { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: aj; }
.ajuda-passos li { counter-increment: aj; position: relative; padding: 0 0 12px 34px; color: var(--muted); }
.ajuda-passos li b { color: var(--text); font-weight: var(--fw-st); }
.ajuda-passos li::before { content: counter(aj); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-r); color: var(--text); border: 1px solid var(--line-hi); }
.ajuda-dica { margin: 4px 0 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, .05); color: var(--muted); font-size: var(--fs-r); line-height: 1.45; }

/* Primeiros passos (Fase UX): checklist na Hoje para quem está começando */
.pp { margin-top: 12px; }
.pp-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pp-h .t-st { margin-top: 4px; }
.pp-n { font-size: var(--fs-r); font-weight: var(--fw-r); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-barra { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin: 14px 0 6px; overflow: hidden; }
.pp-barra i { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: width .5s var(--ease); }
.pp-lista { list-style: none; margin: 0; padding: 0; }
.pp-lista li { border-top: 1px solid var(--line); }
.pp-lista li:first-child { border-top: 0; }
.pp-item, .pp-ok { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 0; background: transparent; border: 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.pp-item b, .pp-ok b { display: block; font-size: var(--fs-tx); font-weight: var(--fw-st); }
.pp-item small { display: block; font-size: var(--fs-r); color: var(--muted); margin-top: 2px; }
.pp-item > span:nth-child(2) { flex: 1; }
.pp-ck { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-hi); display: grid; place-items: center; font-size: 0.75rem; }
.pp-prox .pp-ck { border-color: var(--text); }
.pp-ok { cursor: default; }
.pp-ok b { color: var(--muted); font-weight: var(--fw-tx); text-decoration: line-through; text-decoration-color: var(--faint); }
.pp-ok .pp-ck { background: var(--lime); border-color: var(--lime); color: #000; }
.pp-seta { color: var(--faint); }
.pp-pular { display: block; min-height: 44px; margin: -6px 0 4px 34px; }
.pp-dispensar { display: block; min-height: 44px; margin: 4px auto 0; color: var(--muted); }
.vazio-btn { display: block; width: auto; margin: 14px auto 0; padding: 12px 20px; }

/* ---- Formulários que perdoam (Fase UX 3): erro no campo e indicador de gravação ---- */
form input.campo-erro, form select.campo-erro, input.campo-erro { border-color: var(--red); background: rgba(255, 138, 122, .08); }
.erro-msg { display: block; margin: 6px 2px 0; color: var(--red); font-size: var(--fs-r); font-weight: var(--fw-r); line-height: 1.35; }
.sync { position: fixed; top: calc(var(--st) + 10px); right: 14px; z-index: 70; padding: 6px 12px; border-radius: 99px; background: rgba(40, 40, 48, .9); color: var(--text-2); font-size: var(--fs-r); font-weight: var(--fw-r); pointer-events: none; transition: opacity .3s; }
.sync.off { color: var(--amber); }

/* ---------- Boas-vindas (Fase 8) ---------- */
.bv { padding: 28px 4px 8px; }
.bv h1 { margin: 6px 0 22px; }
.bv-conv { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r); background: rgba(255, 255, 255, .06); color: var(--text-2); font-size: var(--fs-r); }
.bv-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bv-card { display: flex; gap: 14px; align-items: flex-start; }
.bv-card b { display: block; font-size: var(--fs-tx); font-weight: var(--fw-st); }
.bv-card p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-r); line-height: 1.45; }
.bv-ic { flex: none; width: 26px; height: 26px; margin-top: 1px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bv-priv { margin: 18px 2px 0; color: var(--faint); font-size: var(--fs-r); }
.bv-btn { display: block; width: 100%; min-height: 52px; margin-top: 18px; }

/* ---------- Fechamento em cards (Fase 7) ---------- */
.retro { display: grid; gap: 10px; margin-top: 4px; }
.retro-card { display: flex; flex-direction: column; gap: 4px; animation: retro-entra .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.retro-big { font-size: var(--fs-t); font-weight: var(--fw-t); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.retro-big.pos { color: var(--lime); }
.retro-big.neg { color: var(--red); }
.retro-sub { color: var(--muted); font-size: var(--fs-r); }
.retro-ia p { margin: 6px 0 0; color: var(--text-2); font-size: var(--fs-tx); line-height: 1.5; }
.retro-ia.carregando p { color: var(--faint); }
@keyframes retro-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .retro-card { animation: none; } }

.tr-nota { margin: 8px 4px 0; color: var(--faint); font-size: var(--fs-r); }
