/* Saldo Certo — estilos. Visual clean e neutro: cinza claro, branco e preto, com um destaque verde-limão.
   Modo claro é o padrão; escuro e automático ficam em Ajustes. */

@font-face {
  font-family: 'Jakarta';
  src: url('../fonts/jakarta-latin.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  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: 'Jakarta';
  src: url('../fonts/jakarta-latin-ext.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ----------
   --primary: botões principais e seleções   --hero: superfícies invertidas (cards escuros)
   --mustard: cor de destaque (nome mantido por compatibilidade)  --chip/--mint: cinza suave */
:root {
  color-scheme: light;
  --bg: #EEEFF1; --card: #FFFFFF; --ink: #111214; --muted: #5F646C; --line: #E4E6E9;
  --primary: #111214; --onprimary: #FFFFFF;
  --hero: #111214; --hero2: #26282C; --onhero: #FFFFFF; --onhero2: #B4B8BF;
  --mint: #F3F4F6; --mintink: #111214; --chip: #F3F4F6;
  --mustard: #C6F135; --onmustard: #111214;
  --pos: #13803F; --warn: #C8372B; --warnbg: #FBE9E7; --track: #E9EAED;
  --saidas-bar: #9DA1A8; --placeholder: #8B9097; --sombra: 0 12px 30px rgba(17, 18, 20, .14);
  --nav: #111214; --nav-ic: #8D9198;
  --d1: #5F646C; --d2: #9DA1A8; --d3: #CDD0D4; --d4: #E4E6E9; --d5: #111214;
  --raio: 24px; --segon: #FFFFFF;
  --nav-h: 76px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="claro"]) {
    color-scheme: dark;
    --bg: #0C0D0F; --card: #16171A; --ink: #F3F4F6; --muted: #A3A8B0; --line: #26282C;
    --primary: #F3F4F6; --onprimary: #111214;
    --hero: #1F2125; --hero2: #2A2C31; --onhero: #F3F4F6; --onhero2: #A3A8B0;
    --mint: #1F2125; --mintink: #F3F4F6; --chip: #1F2125;
    --pos: #5BD68A; --warn: #FF7A6E; --warnbg: #3A1E1B; --track: #26282C;
    --saidas-bar: #6B7078; --placeholder: #7D838B; --sombra: 0 12px 30px rgba(0, 0, 0, .5);
    --nav: #1F2125; --nav-ic: #8D9198;
    --d1: #A3A8B0; --d2: #6B7078; --d3: #45484E; --d4: #2E3135; --d5: #F3F4F6;
    --segon: #1F2125;
  }
}
:root[data-theme="escuro"] {
  color-scheme: dark;
  --bg: #0C0D0F; --card: #16171A; --ink: #F3F4F6; --muted: #A3A8B0; --line: #26282C;
  --primary: #F3F4F6; --onprimary: #111214;
  --hero: #1F2125; --hero2: #2A2C31; --onhero: #F3F4F6; --onhero2: #A3A8B0;
  --mint: #1F2125; --mintink: #F3F4F6; --chip: #1F2125;
  --pos: #5BD68A; --warn: #FF7A6E; --warnbg: #3A1E1B; --track: #26282C;
  --saidas-bar: #6B7078; --placeholder: #7D838B; --sombra: 0 12px 30px rgba(0, 0, 0, .5);
  --nav: #1F2125; --nav-ic: #8D9198;
  --d1: #A3A8B0; --d2: #6B7078; --d3: #45484E; --d4: #2E3135; --d5: #F3F4F6;
  --segon: #1F2125;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Sem zoom no toque duplo (o gesto de pinça continua funcionando, por acessibilidade) */
html, body, * { touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[x-cloak] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, p { margin: 0; }

/* Ícones (sprite SVG) */
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 13px; height: 13px; }
.ic-lg { width: 26px; height: 26px; }

/* Estrutura */
.app { min-height: 100vh; min-height: 100dvh; }
.tela { max-width: 520px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
.tela.sem-nav { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.topo { padding: calc(18px + env(safe-area-inset-top)) 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.linha { display: flex; align-items: center; gap: 10px; }
.entre { justify-content: space-between; }
.conteudo { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.grade { display: flex; flex-direction: column; gap: 12px; }
.titulo-tela { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.sub { font-size: 12px; color: var(--muted); }

.marca { display: flex; align-items: center; gap: 10px; }
.marca-logo { width: 38px; height: 38px; border-radius: 999px; background: var(--primary); color: var(--mustard); display: flex; align-items: center; justify-content: center; }
.marca-nome { font-size: 25px; font-weight: 800; letter-spacing: -0.04em; display: block; line-height: 1.1; }

/* Botões */
.btn-icone { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-seta { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.btn-seta:disabled { opacity: .3; cursor: default; }
.btn { height: 52px; border-radius: 999px; border: 0; padding: 0 20px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-principal { background: var(--primary); color: var(--onprimary); }
.btn-mostarda { background: var(--mustard); color: var(--onmustard); }
.btn-contorno { background: var(--chip); color: var(--ink); }
.btn-claro { background: var(--card); color: var(--ink); }
.btn-contorno-claro { background: transparent; color: var(--onhero); border: 1.5px solid var(--onhero2); }
.btn-perigo { background: transparent; color: var(--warn); border: 1.5px solid var(--warn); }
.btn-perigo-cheio { background: var(--warn); color: #fff; }
.btn-pequeno { height: 36px; border-radius: 999px; padding: 0 14px; font-size: 12px; font-weight: 700; width: auto; }
.link { font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }

/* Segmentado e opções (pílulas) */
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--card); gap: 2px; }
.seg button { border: 0; border-radius: 999px; padding: 0 14px; height: 36px; font-size: 13px; font-weight: 700; background: transparent; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
.seg-largo { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); }
.seg-largo button { height: 44px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 700; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg-largo button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
.card .seg-largo { background: var(--chip); }
.card .seg-largo button { font-size: 13px; padding: 0 6px; }
.opcoes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.opcoes button { min-height: 44px; border-radius: 999px; border: 0; background: var(--chip); color: var(--ink); font-size: 13px; font-weight: 700; padding: 6px 10px; }
.opcoes button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
.opcoes button:disabled { opacity: .45; }
.opcoes.suave button { border-radius: 18px; }
.opcoes.suave button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
.opcoes small { display: block; font-weight: 500; color: inherit; opacity: .7; font-size: 11px; }

/* Cards */
.card { background: var(--card); border: 1px solid transparent; border-radius: var(--raio); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-titulo { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 15px; font-weight: 700; }
.hero { background: var(--hero); color: var(--onhero); border-radius: var(--raio); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.mini { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--onhero2); text-transform: uppercase; }
.chip-m { font-size: 12px; font-weight: 700; background: var(--mustard); color: var(--onmustard); padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.duas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.serifa { font-weight: 700; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.estat { background: var(--card); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.estat span:first-child { font-size: 12px; color: var(--muted); }
.estat span:last-child { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.tres.extrato { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr) minmax(0, 1fr); }
.tres.extrato .estat { padding: 14px 12px; }
.tres.extrato .estat span:last-child { font-size: 14px; white-space: nowrap; overflow-wrap: normal; }
.aviso { border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--card); color: var(--ink); }
.aviso .ic { color: var(--warn); margin-top: 1px; }
.aviso p { font-size: 13px; line-height: 1.45; color: var(--muted); }
.aviso strong { display: block; font-size: 14px; margin-bottom: 2px; color: var(--ink); }
.vazio { text-align: center; padding: 28px 16px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.vazio .serifa { font-size: 17px; }

/* Painel: saldo central */
.saldo-topo { padding: 18px 16px 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.saldo-rotulo { display: flex; align-items: center; gap: 4px; }
.saldo-rotulo button.rot { border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 4px; }
.saldo-valor { font-size: 46px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; }
.saldo-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.pilula { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--muted); }
.pilula b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pilula.destaque { background: var(--mustard); color: var(--onmustard); }
.acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acoes .btn { height: 54px; background: var(--card); color: var(--ink); }
.insight { background: var(--hero); color: var(--onhero); border-radius: var(--raio); padding: 18px 18px 18px 20px; display: flex; align-items: center; gap: 14px; }
.insight-txt { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.insight-txt strong { font-size: 15px; font-weight: 700; line-height: 1.35; }
.insight-txt span { font-size: 13px; line-height: 1.45; color: var(--onhero2); }
.insight-ic { width: 52px; height: 52px; border-radius: 999px; background: var(--mustard); color: var(--onmustard); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Distribuição por categoria (barra + lista) */
.distrib { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; }
.distrib span { height: 100%; border-radius: 3px; min-width: 4px; }
.cat-lista { display: flex; flex-direction: column; }
.cat-lista-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; }
.cat-lista-item + .cat-lista-item { border-top: 1px solid var(--line); }
.cat-lista-item .nome { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-lista-item .pct { font-size: 13px; color: var(--muted); width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
.cat-lista-item .val { font-weight: 700; min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.ponto { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; display: inline-block; box-shadow: inset 0 0 0 1px var(--line); }
.quad { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; display: inline-block; }
.separado { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }

/* Barras de progresso */
.barra { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.barra.fina { height: 6px; }
.barra > span { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.orc { display: flex; flex-direction: column; gap: 7px; }
.orc-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.orc-topo span:last-child { color: var(--muted); font-size: 13px; }
.dividida { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; background: var(--track); }
.formas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.forma { background: var(--chip); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }

/* Gráfico anual */
.colunas { display: flex; align-items: flex-end; justify-content: space-between; height: 150px; padding-top: 8px; }
.coluna { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 24px; }
.coluna .par { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.coluna .par span { width: 9px; border-radius: 999px; min-height: 4px; }
.coluna small { font-size: 11px; font-weight: 600; color: var(--muted); }
.leg-linha { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.leg-linha span { display: inline-flex; align-items: center; gap: 6px; }

/* Listas de lançamentos */
.item { width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 11px 0; display: flex; align-items: center; gap: 12px; }
.item + .item { border-top: 1px solid var(--line); }
.tile { width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--chip); color: var(--ink); }
.item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-txt b { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.item-txt b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-txt > span { font-size: 12px; color: var(--muted); }
.item-valor { font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-valor.pos { color: var(--pos); }
.item-valor.neg { color: var(--warn); }
.item-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.badge.fixa { background: var(--chip); color: var(--ink); }
.badge.pend { background: var(--warnbg); color: var(--warn); }
.grupo { display: flex; flex-direction: column; gap: 8px; }
.grupo-topo { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px; }
.grupo-topo h2 { font-size: 13px; font-weight: 700; color: var(--muted); }
.grupo-topo span { font-size: 12px; color: var(--muted); }
.lista { background: var(--card); border-radius: 22px; padding: 4px 16px; }
.btn-pago { border: 0; border-radius: 999px; height: 34px; padding: 0 14px; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.btn-pago.ok { background: var(--mustard); color: var(--onmustard); }

/* Filtros e busca */
.busca { position: relative; }
.busca .ic { position: absolute; left: 16px; top: 14px; color: var(--muted); }
.busca input { width: 100%; height: 48px; border-radius: 999px; border: 0; background: var(--card); padding: 0 16px 0 46px; font-size: 16px; }
.filtros { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.filtros::-webkit-scrollbar { display: none; }
.filtros button { height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 0; background: var(--card); color: var(--ink); white-space: nowrap; flex-shrink: 0; }
.filtros button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }

/* Fixas e parcelas */
.sheet .estat { background: var(--bg); }

/* Aviso com ação (Desfazer) */
.toast.com-acao { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; white-space: nowrap; }
.toast-acao { border: 0; background: var(--mustard); color: var(--onmustard); font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 999px; }

/* Ajustes em lista */
.lista-ajustes { padding: 2px 16px; gap: 0; }
.ajuste-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ajuste-tit { font-size: 14px; font-weight: 700; }
.ajuste-valor { font-size: 14px; color: var(--muted); }
.ajuste .seta { color: var(--muted); flex-shrink: 0; }
.sub-alerta { color: var(--warn); font-weight: 600; }
.link-sub { font-size: 12px; padding: 2px 0 0; }
.tile-ok { background: var(--mustard); color: var(--onmustard); }
.tile-alerta { background: var(--warnbg); color: var(--warn); }
.rotulo-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.perigo-card { border: 1px solid var(--warn); background: var(--warnbg); gap: 10px; }
.perigo-card .sub { color: var(--warn); opacity: .85; }

/* Novidades */
.novidades-lista { display: flex; flex-direction: column; gap: 14px; }
.novidade { display: flex; gap: 14px; align-items: flex-start; }
.novidade-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.novidade-txt b { font-size: 15px; font-weight: 700; }
.novidade-txt span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.novidade-txt .link { padding-top: 4px; }

/* Filtro por categoria */
.filtro-cat { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-cat { height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px dashed var(--line); background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.btn-cat[aria-pressed="true"] { border: 0; background: var(--mustard); color: var(--onmustard); }
.chip-sel { height: 34px; padding: 0 10px 0 14px; border-radius: 999px; border: 0; background: var(--primary); color: var(--onprimary); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cats-filtro { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-cat { height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--chip); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip-cat[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
button.cat-lista-item { width: 100%; border: 0; border-radius: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
button.cat-lista-item:disabled { cursor: default; }
button.cat-lista-item + button.cat-lista-item { border-top: 1px solid var(--line); }

/* Formulário */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label, .campo .rotulo { font-size: 15px; font-weight: 700; }
.campo label small, .campo .rotulo small { font-weight: 500; color: var(--muted); font-size: 13px; }
.entrada { height: 48px; border-radius: 14px; border: 0; padding: 0 16px; font-size: 16px; background: var(--chip); color: var(--ink); width: 100%; }
.hero .entrada { background: var(--hero2); color: var(--onhero); }
textarea.entrada { height: auto; padding: 12px 16px; resize: none; }
select.entrada { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.valor-bloco { padding: 26px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.valor-bloco label { font-size: 13px; font-weight: 600; color: var(--muted); }
.valor-bloco input { width: 100%; border: 0; background: transparent; color: var(--ink); font-size: 50px; font-weight: 800; letter-spacing: -0.045em; text-align: center; outline: none; padding: 0; font-variant-numeric: tabular-nums; caret-color: var(--mustard); }
.valor-bloco input::placeholder { color: var(--placeholder); opacity: .7; }
.data-card { background: var(--card); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.data-linha { display: flex; align-items: center; gap: 12px; }
.data-linha .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.data-linha .txt b { font-size: 14px; font-weight: 700; }
.data-linha .txt span { font-size: 12px; color: var(--muted); }
.data-input { height: 48px; border-radius: 14px; border: 0; padding: 0 14px; font-size: 16px; background: var(--chip); color: var(--ink); width: 100%; }
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.cat { border: 0; border-radius: 18px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink); background: transparent; min-width: 0; }
.cat span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.cat .tile-sm { width: 52px; height: 52px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.cat[aria-pressed="true"] .tile-sm { background: var(--mustard); color: var(--onmustard); }
.cat.nova { color: var(--muted); }
.cat.nova .tile-sm { background: transparent; border: 1.5px dashed var(--line); }
.tile-sm { width: 36px; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.subcaixa { background: var(--chip); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.subcaixa .opcoes button { background: var(--card); }
.subcaixa .opcoes button[aria-pressed="true"] { background: var(--primary); color: var(--onprimary); }
.subcaixa .btn-icone { background: var(--card); }
.subcaixa .entrada { background: var(--card); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper b { min-width: 64px; text-align: center; font-size: 16px; font-weight: 800; }
.erro { color: var(--warn); font-size: 13px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }
.rodape-fixo { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 20; }
.rodape-fixo > div { max-width: 488px; margin: 0 auto; display: flex; gap: 8px; }
.rodape-fixo .btn { height: 56px; }

/* Categorias */
.icones { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.icones button { height: 46px; border-radius: 999px; border: 0; background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.icones button[aria-pressed="true"] { background: var(--mustard); color: var(--onmustard); }
.cat-linha { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.cat-linha + .cat-linha { border-top: 1px solid var(--line); }

/* Interruptor */
.switch { width: 52px; height: 32px; border: 0; border-radius: 999px; padding: 3px; display: flex; background: var(--track); flex-shrink: 0; transition: background .15s; }
.switch span { width: 26px; height: 26px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"] span { transform: translateX(20px); background: var(--onprimary); }
.ajuste { display: flex; align-items: center; gap: 12px; padding: 14px 0; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); }
.ajuste + .ajuste { border-top: 1px solid var(--line); }

/* Navegação: pílula flutuante (celular) / coluna lateral (computador) */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; background: var(--nav); border-radius: 999px; padding: 8px; box-shadow: var(--sombra); }
.nav-in { display: flex; align-items: center; gap: 4px; }
.nav a { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--nav-ic); }
.nav a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, .12); }
.nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav .fab-wrap { display: flex; }
.fab { width: 56px !important; height: 56px !important; background: var(--mustard); color: var(--onmustard) !important; }

/* Sheet / modal */
.veu { position: fixed; inset: 0; background: rgba(8, 9, 10, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 28px 28px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow-y: auto; box-shadow: var(--sombra); }
.sheet h2 { font-size: 18px; font-weight: 800; }
.sheet p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.alca { width: 40px; height: 5px; border-radius: 999px; background: var(--line); align-self: center; margin-top: -6px; position: relative; flex-shrink: 0; cursor: grab; }
.alca::before { content: ''; position: absolute; inset: -14px -60px; } /* área de toque maior para arrastar */
.veu { overscroll-behavior: contain; animation: veu-entra .2s ease-out; }
.sheet { overscroll-behavior: contain; animation: folha-sobe .24s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
@keyframes folha-sobe { from { transform: translateY(100%); } to { transform: none; } }
@keyframes veu-entra { from { background-color: rgba(8, 9, 10, 0); } }
@media (prefers-reduced-motion: reduce) { .veu, .sheet { animation: none; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); background: var(--primary); color: var(--onprimary); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 50; box-shadow: var(--sombra); max-width: calc(100vw - 32px); text-align: center; }

/* Primeiro acesso */
.boas-vindas { background: var(--hero); color: var(--onhero); padding: calc(36px + env(safe-area-inset-top)) 24px 30px; border-radius: 0 0 32px 32px; display: flex; flex-direction: column; gap: 18px; }
.logo-grande { width: 56px; height: 56px; border-radius: 999px; background: var(--mustard); color: var(--onmustard); display: flex; align-items: center; justify-content: center; }
.passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.passos li { display: flex; align-items: center; gap: 12px; }
.passo-n { width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0; background: var(--primary); color: var(--onprimary); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.passo-ic { width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0; background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.nota { font-size: 12px; color: var(--muted); background: var(--chip); border-radius: 14px; padding: 10px 12px; line-height: 1.45; }

/* Apoio e estatísticas */
.apoio-link { align-self: center; margin-top: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 999px; }
.apoio-link b { color: var(--ink); }
.apoio-link .ic { color: var(--warn); }
.pix-chave { background: var(--chip); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pix-chave b { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.passos-pix { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.passos-pix b { color: var(--ink); }
.detalhes summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); list-style: none; padding: 4px 0; }
.detalhes summary::-webkit-details-marker { display: none; }
.detalhes summary::after { content: ' ▾'; }
.detalhes[open] summary::after { content: ' ▴'; }
.lista-ok, .lista-nao { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.lista-ok b, .lista-nao b { font-size: 13px; color: var(--ink); }
.lista-ok span::before { content: '✓ '; color: var(--pos); font-weight: 800; }
.lista-nao span::before { content: '✕ '; color: var(--warn); font-weight: 800; }

/* Computador: menu lateral e painel em duas colunas */
@media (min-width: 900px) {
  .nav { left: 20px; top: 50%; bottom: auto; transform: translateY(-50%); }
  .nav-in { flex-direction: column; }
  .nav .fab-wrap { order: -1; margin-bottom: 8px; }
  .app.com-nav { padding-left: 100px; }
  .tela { max-width: 1040px; padding-bottom: 40px; }
  .tela.estreita { max-width: 560px; }
  .topo, .conteudo { padding-left: 32px; padding-right: 32px; }
  .grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
  .grade > .largo { grid-column: 1 / -1; }
  .toast { bottom: 28px; }
  .rodape-fixo { left: 100px; }
  .veu { align-items: center; }
  .sheet { border-radius: 28px; max-width: 480px; }
  .alca { display: none; }
  .sheet { animation-name: janela-entra; animation-duration: .18s; }
}
@keyframes janela-entra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
