/* Prumo v0.2: identidade quente e motivadora.
   Terracota (marca) + âmbar (o peso do prumo) sobre creme; tinta marrom no lugar do preto. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fontes/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fontes/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fontes/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fontes/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --fundo: #fbf5ec; --superficie: #fffdf9; --afundado: #f4ebdd; --linha: #eadfcf;
  --tinta: #2b1d14; --suave: #6e5a4b; --apagado: #8a7766;
  --marca: #b84f2a; --marca-forte: #973d1d; --marca-claro: #f8e3d6; --na-marca: #fff8f2;
  --sol: #e39a2d; --sol-claro: #fbecd2;
  --entrada: #2f7a55; --entrada-claro: #def0e4; --gasto: #a5334a; --gasto-claro: #f8e0e4;
  --sombra: 0 1px 2px rgb(74 42 20 / .06), 0 10px 28px -14px rgb(74 42 20 / .28);
  --raio: 20px; --raio-p: 12px;
  --t-xs: .75rem; --t-s: .875rem; --t-m: 1rem; --t-l: 1.25rem; --t-xl: 1.75rem; --t-2xl: 2.5rem;
  --titulo: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --c0: #b84f2a; --c1: #e39a2d; --c2: #6f8f3a; --c3: #2f7a72; --c4: #4f6db0;
  --c5: #8b5ba8; --c6: #b5487a; --c7: #8a6a4f; --c8: #a39686;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #1c1410; --superficie: #261c16; --afundado: #17100c; --linha: #3a2c23;
    --tinta: #f6ebdd; --suave: #c4b09c; --apagado: #a08c79;
    --marca: #f0875a; --marca-forte: #f7a47f; --marca-claro: #43261a; --na-marca: #2b1208;
    --sol: #f2b654; --sol-claro: #3d2c14;
    --entrada: #7cc79a; --entrada-claro: #1d3427; --gasto: #f08a9c; --gasto-claro: #3d1c23;
    --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 12px 30px -16px rgb(0 0 0 / .7);
    --c0: #f0875a; --c1: #f2b654; --c2: #a7c46b; --c3: #5fbfb3; --c4: #8fa8e8;
    --c5: #c39ae0; --c6: #ec88b4; --c7: #c9a283; --c8: #b8ad9f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--linha) transparent; }
body { margin: 0; background: var(--fundo); color: var(--tinta); font: 400 var(--t-m)/1.5 var(--texto);
  font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; caret-color: var(--marca); }
body.logado { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
::selection { background: var(--sol-claro); color: var(--tinta); }
a { color: var(--marca); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--marca-forte); }
:focus-visible { outline: 2.5px solid var(--sol); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 750; letter-spacing: -.02em; line-height: 1.1;
  text-wrap: balance; margin: 0; }
h1 { font-size: var(--t-xl); }
h2 { font-size: var(--t-l); }
p { margin: 0; }
small { font-size: var(--t-s); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Estrutura ---------- */
.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--fundo) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
.marca { display: inline-flex; gap: 10px; align-items: center; color: var(--tinta); text-decoration: none;
  font: 800 var(--t-l)/1 var(--titulo); letter-spacing: -.03em; }
.marca:hover { color: var(--tinta); }
.sair { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0;
  background: none; color: var(--suave); font: 500 var(--t-s) var(--texto); cursor: pointer; border-radius: 999px; }
.sair:hover { background: var(--afundado); color: var(--tinta); }
.sair .ic { width: 18px; height: 18px; }
.conteudo { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }
.titulo-pagina { margin: 12px 0 20px; }
.titulo-pagina h1 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.035em; }
.titulo-pagina .sub { margin-top: 8px; }
.com-voltar { display: flex; align-items: center; gap: 8px; }
.com-voltar h1 { font-size: var(--t-xl); }
.voltar { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 999px; color: var(--tinta); }
.voltar:hover { background: var(--afundado); color: var(--tinta); }
.sub { color: var(--suave); max-width: 52ch; }

.bloco { background: var(--superficie); border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 20px; margin-bottom: 16px; }
.bloco > h2 { margin-bottom: 16px; }
.bloco-cabecalho { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.link-seta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: var(--t-s);
  text-decoration: none; min-height: 44px; }
.link-seta .ic { width: 18px; height: 18px; }
.vazio { color: var(--suave); }
.vazio strong { color: var(--tinta); }
.nota { margin-top: 12px; padding: 10px 14px; border-radius: var(--raio-p); background: var(--sol-claro);
  color: var(--tinta); font-size: var(--t-s); }
.centro { text-align: center; margin-top: 16px; }

/* ---------- Avisos ---------- */
.aviso { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 4px 0 16px;
  border-radius: var(--raio-p); background: var(--entrada-claro); color: var(--tinta);
  animation: entrar .5s cubic-bezier(.16, 1, .3, 1) both; }
.aviso p { flex: 1; font-weight: 500; }
.aviso .ic { color: var(--entrada); }
.aviso.erro { background: var(--gasto-claro); }
.aviso.erro .ic { color: var(--gasto); }
.aviso.festa { background: var(--sol-claro); }
.aviso.festa .ic { color: var(--marca); }
.desfazer { border: 0; background: var(--superficie); color: var(--marca); font: 700 var(--t-s) var(--texto);
  padding: 0 14px; min-height: 40px; border-radius: 999px; cursor: pointer; box-shadow: var(--sombra); }
.desfazer:hover { color: var(--marca-forte); }
@keyframes entrar { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- O prumo (resumo do mês) ---------- */
.prumo { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin-bottom: 16px;
  padding: 20px 20px 20px 12px; border-radius: var(--raio); background: var(--superficie); box-shadow: var(--sombra); }
.fio { width: 40px; height: 120px; overflow: visible; }
.fio-linha { stroke: var(--apagado); stroke-width: 1.5; stroke-dasharray: 2 3; }
.fio-trava { stroke: var(--tinta); stroke-width: 2.5; stroke-linecap: round; }
.fio-peso { fill: var(--sol); stroke: var(--tinta); stroke-width: 1.5; stroke-linejoin: round; }
.prumo .fio { transform-origin: 20px 4px; animation: balanco 2.4s cubic-bezier(.16, 1, .3, 1) both; }
.estado-fora .fio { transform: rotate(9deg); animation-name: balanco-fora; }
.estado-atencao .fio { transform: rotate(4deg); animation-name: balanco-atencao; }
.estado-fora .fio-peso { fill: var(--gasto); }
@keyframes balanco { 0% { transform: rotate(14deg); } 35% { transform: rotate(-6deg); } 65% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes balanco-fora { 0% { transform: rotate(-8deg); } 50% { transform: rotate(13deg); } 100% { transform: rotate(9deg); } }
@keyframes balanco-atencao { 0% { transform: rotate(-10deg); } 50% { transform: rotate(7deg); } 100% { transform: rotate(4deg); } }
.prumo-mes { color: var(--suave); font-size: var(--t-s); font-weight: 600; }
.prumo h2 { font-size: var(--t-xl); font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.estado-prumo h2 { color: var(--entrada); }
.estado-fora h2 { color: var(--gasto); }
.estado-atencao h2 { color: var(--marca); }
.prumo-texto { color: var(--suave); margin-top: 4px; }
.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 18px 0 0; }
.numeros div { margin: 0; }
.numeros .saldo { grid-column: 1 / -1; }
.numeros dt { font-size: var(--t-xs); font-weight: 600; color: var(--suave); text-transform: uppercase; letter-spacing: .06em; }
.numeros dd { margin: 2px 0 0; font: 700 var(--t-l)/1.15 var(--texto); font-variant-numeric: tabular-nums; }
.numeros .saldo dd { font: 800 var(--t-2xl)/1 var(--titulo); letter-spacing: -.03em; }
dd.entrada { color: var(--entrada); }
dd.gasto, dd.neg { color: var(--gasto); }
.medidor { position: relative; margin-top: 18px; }
.medidor-trilho { height: 12px; border-radius: 999px; background: var(--afundado); overflow: hidden; }
.medidor-trilho > div { height: 100%; border-radius: 999px; background: var(--entrada); }
.estado-atencao .medidor-trilho > div { background: var(--sol); }
.estado-fora .medidor-trilho > div { background: var(--gasto); }
.medidor-limite { position: absolute; left: 90%; top: -5px; bottom: -5px; width: 2px; border-radius: 2px; background: var(--tinta); opacity: .55; }
.comparacao { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--suave); font-size: var(--t-s); }
.comparacao .ic { width: 18px; height: 18px; color: var(--marca); }

/* ---------- Barras ---------- */
.barra { height: 10px; background: var(--afundado); border-radius: 999px; overflow: hidden; margin: 12px 0 4px; }
.barra.fina { height: 6px; margin: 6px 0 0; }
.barra > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--marca), var(--sol)); }

/* ---------- Pilares (painel) ---------- */
.pilares-lista { list-style: none; margin: 0 -8px; padding: 0; }
.pilar-linha { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 8px; border-radius: var(--raio-p); color: var(--tinta); text-decoration: none; }
.pilar-linha:hover { background: var(--afundado); color: var(--tinta); }
.pilar-icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--marca-claro); color: var(--marca); }
.pilar-icone.grande { width: 52px; height: 52px; border-radius: 16px; }
.pilar-icone.grande .ic { width: 26px; height: 26px; }
.pilar-renda_extra { background: var(--sol-claro); color: color-mix(in srgb, var(--sol) 70%, var(--tinta)); }
.pilar-concurseiro { background: color-mix(in srgb, var(--c4) 16%, var(--superficie)); color: var(--c4); }
.pilar-empresario { background: color-mix(in srgb, var(--c5) 16%, var(--superficie)); color: var(--c5); }
.pilar-investidor { background: var(--entrada-claro); color: var(--entrada); }
.pilar-info { min-width: 0; }
.pilar-nome { display: block; font-weight: 700; }
.pilar-detalhe { display: block; color: var(--suave); font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilar-pct { font: 800 var(--t-l)/1 var(--titulo); font-variant-numeric: tabular-nums; min-width: 3.2ch; text-align: right; }
.pilar-pct.grande { font-size: var(--t-xl); }

/* ---------- Pilares (página) ---------- */
.pilar { scroll-margin-top: 80px; }
.pilar > .aviso { margin: -4px 0 16px; }
.aviso.festa { animation: festa .9s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes festa { 0% { opacity: 0; transform: scale(.92); } 60% { transform: scale(1.02); } 100% { transform: none; } }
.pilar-topo { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; }
.pilar-titulo .pilar-detalhe { white-space: normal; }
.meta-form { margin-top: 16px; }
.meta-linha { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.etapas { list-style: none; margin: 16px 0 0; padding: 0; }
.etapas li { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--linha); }
.etapas li:first-child { border-top: 0; }
.etapas li > form:first-child { flex: 1; min-width: 0; }
.marcar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 0;
  border: 0; background: none; color: var(--tinta); font: 500 var(--t-m) var(--texto); text-align: left; cursor: pointer; }
.caixa { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px;
  border: 2px solid var(--linha); color: transparent; transition: background .2s, border-color .2s; }
.caixa .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.marcar:hover .caixa { border-color: var(--marca); }
.feita .caixa { background: var(--entrada); border-color: var(--entrada); color: var(--superficie); }
.feita .etapa-texto { color: var(--suave); text-decoration: line-through; text-decoration-color: var(--apagado); }
.nova-etapa { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }

/* ---------- Formulários ---------- */
label { display: block; margin-bottom: 14px; }
.rotulo { display: block; font-size: var(--t-s); font-weight: 600; color: var(--suave); margin-bottom: 6px; }
.rotulo small { font-weight: 400; }
input, select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px;
  padding: 12px 14px; font: 500 var(--t-m) var(--texto); color: var(--tinta); background: var(--fundo);
  border: 1.5px solid var(--linha); border-radius: var(--raio-p); transition: border-color .15s, background .15s; }
input::placeholder, textarea::placeholder { color: var(--apagado); }
input:hover, select:hover { border-color: color-mix(in srgb, var(--linha) 50%, var(--suave)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marca); background: var(--superficie);
  box-shadow: 0 0 0 4px var(--marca-claro); }
[aria-invalid="true"] { border-color: var(--gasto); background: var(--gasto-claro); }
input[type="date"] { appearance: none; }
.linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.linha > * { min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  padding: 0 20px; border: 0; border-radius: 999px; background: var(--marca); color: var(--na-marca);
  font: 700 var(--t-m) var(--texto); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgb(74 42 20 / .2), 0 8px 18px -10px var(--marca); transition: background .15s, transform .15s; }
.botao:hover { background: var(--marca-forte); color: var(--na-marca); }
.botao:active { transform: translateY(1px); }
.botao.secundario { width: auto; min-height: 48px; background: var(--afundado); color: var(--tinta); box-shadow: none; }
.botao.secundario:hover { background: var(--linha); color: var(--tinta); }

.icone-botao { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 999px;
  background: none; color: var(--suave); cursor: pointer; }
.icone-botao:hover { background: var(--afundado); color: var(--tinta); }
.icone-botao.perigo:hover { background: var(--gasto-claro); color: var(--gasto); }
.icone-botao.cheio { width: 48px; height: 48px; background: var(--marca); color: var(--na-marca); }
.icone-botao.cheio:hover { background: var(--marca-forte); color: var(--na-marca); }

/* Registrar */
.erro-form { display: flex; gap: 8px; align-items: center; padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--raio-p); background: var(--gasto-claro); font-weight: 500; }
.erro-form .ic { color: var(--gasto); }
.tipo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px;
  border-radius: 999px; background: var(--afundado); }
.tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tipo label { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; margin: 0;
  border-radius: 999px; font-weight: 700; color: var(--suave); cursor: pointer; transition: background .2s, color .2s; }
.tipo .ic { width: 18px; height: 18px; stroke-width: 2.25; }
#tipo-gasto:checked + label { background: var(--superficie); color: var(--gasto); box-shadow: var(--sombra); }
#tipo-entrada:checked + label { background: var(--superficie); color: var(--entrada); box-shadow: var(--sombra); }
.tipo input:focus-visible + label { outline: 2.5px solid var(--sol); outline-offset: 2px; }
.valor-caixa { display: flex; align-items: baseline; gap: 8px; padding: 6px 16px; border-radius: var(--raio-p);
  background: var(--fundo); border: 1.5px solid var(--linha); }
.valor-caixa:focus-within { border-color: var(--marca); background: var(--superficie); box-shadow: 0 0 0 4px var(--marca-claro); }
.moeda { font: 700 var(--t-l) var(--titulo); color: var(--suave); }
.valor-caixa input { border: 0; background: none; padding: 4px 0; min-height: 56px; box-shadow: none;
  font: 800 var(--t-2xl)/1 var(--titulo); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.valor-caixa input:focus { box-shadow: none; background: none; }
.valor-caixa:has([aria-invalid="true"]) { border-color: var(--gasto); background: var(--gasto-claro); }
.form-registro:has(#tipo-entrada:checked) .cat-gasto,
.form-registro:has(#tipo-gasto:checked) .cat-entrada { display: none; }
.opcao { position: relative; margin: 4px 0 20px; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao > span { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--raio-p);
  border: 1.5px solid var(--linha); cursor: pointer; transition: border-color .15s, background .15s; }
.opcao > span > .ic { color: var(--suave); margin-top: 1px; }
.opcao strong { display: block; }
.opcao small { display: block; color: var(--suave); }
.opcao input:checked + span { border-color: var(--marca); background: var(--marca-claro); }
.opcao input:checked + span > .ic { color: var(--marca); }
.opcao input:focus-visible + span { outline: 2.5px solid var(--sol); outline-offset: 2px; }

/* ---------- Listas de lançamentos ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "tipo texto valor" "tipo texto acoes";
  column-gap: 12px; row-gap: 0; align-items: center; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--linha); }
.lista li:first-child { border-top: 0; }
.lista li .lista-tipo { grid-area: tipo; }
.lista li .lista-texto { grid-area: texto; }
.lista li .valor { grid-area: valor; text-align: right; }
.lista li .lista-acoes { grid-area: acoes; justify-self: end; }
.lista li:not(:has(.lista-acoes)) .valor { grid-row: 1 / 3; }
.lista-texto small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-tipo { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; }
.lista-tipo .ic { width: 18px; height: 18px; stroke-width: 2.25; }
.lista-tipo.gasto { background: var(--gasto-claro); color: var(--gasto); }
.lista-tipo.entrada { background: var(--entrada-claro); color: var(--entrada); }
.lista-texto { flex: 1; min-width: 0; }
.lista-texto strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-texto small { color: var(--suave); }
.selo { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--sol-claro); color: var(--tinta); font-size: var(--t-xs); font-weight: 600; }
.valor { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.valor.entrada { color: var(--entrada); }
.valor.gasto { color: var(--gasto); }
.lista-acoes { display: flex; margin: -2px -10px -6px 0; }
.lista-acoes .icone-botao { width: 40px; height: 40px; }
.lista-acoes .ic { width: 19px; height: 19px; }
@media (min-width: 560px) {
  .lista li { grid-template-columns: 36px minmax(0, 1fr) auto auto; grid-template-areas: "tipo texto valor acoes"; }
  .lista li:not(:has(.lista-acoes)) .valor { grid-row: auto; }
  .lista-acoes { margin: 0 -10px 0 0; }
  .lista-acoes .icone-botao { width: 44px; height: 44px; }
}
.contagem { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--afundado); color: var(--suave);
  font-size: var(--t-s); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Finanças ---------- */
.mes { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 16px; }
.mes h1 { font-size: var(--t-xl); font-weight: 800; letter-spacing: -.03em; text-align: center; white-space: nowrap; }
.mes + .prumo .prumo-mes, .voltar-hoje + .prumo .prumo-mes { display: none; }
.mes .icone-botao { color: var(--tinta); background: var(--superficie); box-shadow: var(--sombra); }
.voltar-hoje { text-align: center; margin: -8px 0 16px; font-size: var(--t-s); font-weight: 600; }
.legenda { display: flex; align-items: center; gap: 6px; color: var(--suave); font-size: var(--t-xs); font-weight: 600; }
.legenda .ponto + * { margin-right: 6px; }
.ponto { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 4px; background: var(--c8); }
.ponto.entrada { background: var(--entrada); }
.ponto.gasto { background: var(--gasto); }
.colunas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.colunas li { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.colunas-par { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 120px;
  padding-bottom: 1px; border-bottom: 1.5px solid var(--linha); }
.col { width: 38%; max-width: 16px; min-height: 2px; border-radius: 5px 5px 2px 2px; }
.col.entrada { background: var(--entrada); }
.col.gasto { background: var(--gasto); }
.colunas li:not(.atual) .col { opacity: .55; }
.colunas a { font-size: var(--t-xs); font-weight: 600; color: var(--suave); text-decoration: none; text-transform: capitalize;
  min-height: 32px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px; }
.colunas .atual a { color: var(--na-marca); background: var(--marca); }
.faixa { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 16px; background: var(--afundado); }
.faixa span { flex: none; min-width: 4px; }
.categorias { list-style: none; margin: 0; padding: 0; }
.categorias li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; min-height: 40px; }
.categoria-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.categoria-pct { color: var(--suave); font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.categorias b { font-variant-numeric: tabular-nums; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); }
.c3 { background: var(--c3); } .c4 { background: var(--c4); } .c5 { background: var(--c5); }
.c6 { background: var(--c6); } .c7 { background: var(--c7); } .c8, .c-1 { background: var(--c8); }

/* ---------- Acesso ---------- */
.visitante .topo { justify-content: center; background: none; backdrop-filter: none; }
.acesso { max-width: 420px; margin: 4vh auto 0; text-align: center; }
.acesso h1 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.035em; }
.acesso .sub { margin: 8px auto 24px; }
.acesso .bloco { text-align: left; }
.acesso-fio { display: block; margin: 0 auto 12px; transform-origin: 20px 4px; animation: balanco 2.4s cubic-bezier(.16, 1, .3, 1) both; }
.acesso-fio.torto { transform: rotate(12deg); animation-name: balanco-fora; }
.acesso .botao { margin-top: 4px; }
.acesso p > .botao { width: auto; }

/* ---------- Navegação e botão Registrar ---------- */
.abas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--superficie) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--linha); }
.abas a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px;
  padding: 6px 0; border-radius: 14px; color: var(--suave); font-size: var(--t-xs); font-weight: 600; text-decoration: none; }
.abas a:hover { color: var(--tinta); }
.abas a.ativa { color: var(--marca); background: var(--marca-claro); }
.abas .ic { width: 24px; height: 24px; }
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 7;
  display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--marca); color: var(--na-marca); font-weight: 700; text-decoration: none;
  box-shadow: 0 2px 4px rgb(74 42 20 / .2), 0 14px 28px -12px var(--marca); transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .15s; }
.fab:hover { background: var(--marca-forte); color: var(--na-marca); transform: translateY(-2px); }
.fab .ic { stroke-width: 2.5; }
body.logado .conteudo { padding-bottom: 72px; }

/* ---------- Computador ---------- */
@media (min-width: 960px) {
  body.logado { padding-bottom: 0; padding-left: 248px; }
  body.logado .topo { position: fixed; left: 0; top: 0; width: 248px; padding: 28px 24px; background: none; backdrop-filter: none;
    flex-direction: column; align-items: flex-start; bottom: 0; justify-content: space-between; z-index: 7; pointer-events: none; }
  body.logado .topo > * { pointer-events: auto; }
  .abas { top: 96px; bottom: auto; right: auto; left: 16px; width: 216px; flex-direction: column; gap: 4px;
    padding: 0; background: none; backdrop-filter: none; border: 0; }
  .abas a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; font-size: var(--t-m); }
  .fab { right: 40px; bottom: 40px; }
  body.logado .conteudo { max-width: 760px; padding: 32px 40px 96px; }
  .titulo-pagina h1 { font-size: 3rem; }
  .prumo { grid-template-columns: 56px 1fr; padding: 28px 28px 28px 16px; }
  .numeros { grid-template-columns: 1.6fr 1fr 1fr; align-items: end; }
  .numeros .saldo { grid-column: auto; }
  .bloco { padding: 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Larguras e alturas em passos de 5% (a CSP não permite style inline) */
.p0 { width: 0%; } .p5 { width: 5%; } .p10 { width: 10%; } .p15 { width: 15%; } .p20 { width: 20%; }
.p25 { width: 25%; } .p30 { width: 30%; } .p35 { width: 35%; } .p40 { width: 40%; } .p45 { width: 45%; }
.p50 { width: 50%; } .p55 { width: 55%; } .p60 { width: 60%; } .p65 { width: 65%; } .p70 { width: 70%; }
.p75 { width: 75%; } .p80 { width: 80%; } .p85 { width: 85%; } .p90 { width: 90%; } .p95 { width: 95%; } .p100 { width: 100%; }
.h0 { height: 0%; } .h5 { height: 5%; } .h10 { height: 10%; } .h15 { height: 15%; } .h20 { height: 20%; }
.h25 { height: 25%; } .h30 { height: 30%; } .h35 { height: 35%; } .h40 { height: 40%; } .h45 { height: 45%; }
.h50 { height: 50%; } .h55 { height: 55%; } .h60 { height: 60%; } .h65 { height: 65%; } .h70 { height: 70%; }
.h75 { height: 75%; } .h80 { height: 80%; } .h85 { height: 85%; } .h90 { height: 90%; } .h95 { height: 95%; } .h100 { height: 100%; }
