  :root {
    --bg: #F4F3F8; --card: #FFFFFF; --txt: #1B1A2E; --sub: #5E5C70; --linha: #ECEBF2; --campo: #F4F3F8;
    --azul: #5B3CE0; --azul-forte: #4428B8; --azul-claro: #ECE8FD; --azul-ico: #7A60EA;
    --verde: #1F7A4D; --verde-claro: #E3F4EA; --vermelho: #C2412D; --vermelho-claro: #FDECE8; --vermelho-txt: #6B2216;
    --transf: #0E6BA8; --transf-claro: #E2F0FA; --laranja: #A85A00; --laranja-claro: #FFF1DE; --estrela: #F2A900;
    --teal: #0F766E; --teal-claro: #DDF3F0;
    --sombra: 0 1px 2px rgba(27,26,46,.04), 0 4px 14px rgba(27,26,46,.05);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0F0E17; --card: #1B1A26; --txt: #F2F1F8; --sub: #A3A1B5; --linha: #2A2838; --campo: #24222F;
      --azul: #7C62F5; --azul-forte: #B7A8FF; --azul-claro: #2A2350; --azul-ico: #9580FF;
      --verde: #4CC38A; --verde-claro: #13301F; --vermelho: #FF7A66; --vermelho-claro: #3A1A15; --vermelho-txt: #FFC9BF;
      --transf: #4FA8E8; --transf-claro: #12283A; --laranja: #F2A74B; --laranja-claro: #33240F;
      --teal: #1E9E92; --teal-claro: #0F2B28;
      --sombra: none;
    }
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; background: var(--bg); color: var(--txt);
    font: 16px "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  button, input, select { font-family: inherit; }
  body { padding: env(safe-area-inset-top) 0 calc(40px + env(safe-area-inset-bottom)); }
  svg { flex-shrink: 0; }

  /* ---------- início ---------- */
  .topo { display: flex; align-items: center; gap: 10px; padding: 18px 18px 6px; }
  .topo > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .topo .hoje { font-size: 13px; font-weight: 500; color: var(--sub); }
  .topo h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 0; }
  .icone { border: 0; background: var(--card); color: var(--txt); width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--sombra); }
  .btn-easy { display: flex; align-items: center; gap: 16px; width: calc(100% - 36px); margin: 12px 18px 0; border: 0;
    border-radius: 24px; padding: 18px; background: var(--azul); color: #fff; text-align: left; }
  .btn-easy .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--azul-ico); display: flex;
    align-items: center; justify-content: center; }
  .btn-easy span.txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
  .btn-easy b { font-size: 20px; font-weight: 800; }
  .btn-easy small { font-size: 14px; font-weight: 500; opacity: .88; }
  .grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 18px 0; }
  .tile { border: 0; border-radius: 20px; background: var(--card); color: var(--txt); padding: 16px; display: flex;
    flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; box-shadow: var(--sombra); }
  .tile b { font-size: 16px; font-weight: 700; display: block; }
  .tile small { font-size: 12px; color: var(--sub); }
  .ico-q { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
  .c-transf { background: var(--transf-claro); color: var(--transf); }
  .c-laranja { background: var(--laranja-claro); color: var(--laranja); }
  .c-roxo { background: var(--azul-claro); color: var(--azul); }
  .c-verde { background: var(--verde-claro); color: var(--verde); }
  .c-verm { background: var(--vermelho-claro); color: var(--vermelho); }
  .c-teal { background: var(--teal-claro); color: var(--teal); }
  .tile-largo { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .tile-largo > span:nth-child(2) { flex: 1; }
  .tile-largo > svg { color: var(--sub); }

  /* relatório expandido: esconde o cabeçalho (filtros) e usa a tela toda */
  .barra-res { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 12px 16px 0; }
  .barra-res .t { flex: 1; font-size: 13px; font-weight: 700; color: var(--sub); }
  .btn-expandir { display: inline-flex; align-items: center; gap: 6px; }
  .folha.cheia { top: env(safe-area-inset-top); border-radius: 0; }
  .folha-corpo.expandido > :not(.res-area) { display: none !important; }
  .folha-corpo.expandido .barra-res { position: sticky; top: 0; z-index: 5; background: var(--bg); margin: 0; padding: 8px 16px; }
  .folha-corpo.expandido .tab-wrap { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .folha-corpo.expandido #cGrupo { max-height: 40vh; }

  /* tela inicial: painel, texto rápido, grade 3 colunas */
  .grade { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
  .tile { align-items: center !important; text-align: center !important; gap: 8px !important; padding: 14px 6px !important; }
  .tile b { font-size: 13.5px !important; }
  .painel { display: block; width: calc(100% - 36px); margin: 8px 18px 0; border: 0; border-radius: 22px; background: var(--card);
    box-shadow: var(--sombra); padding: 14px 16px; text-align: left; color: var(--txt); }
  .painel-topo { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--sub); }
  .painel-topo span:first-child { text-transform: capitalize; }
  .link-txt { display: inline-flex; align-items: center; gap: 4px; color: var(--azul); font-weight: 600; }
  .painel-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
  .painel-nums small { display: block; font-size: 11.5px; font-weight: 600; color: var(--sub); }
  .painel-nums b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .painel-comp { margin-top: 8px; font-size: 12.5px; color: var(--sub); font-weight: 600; }
  .rapido { display: flex; gap: 8px; margin: 10px 18px 0; }
  .rapido input { flex: 1; min-width: 0; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--sombra);
    color: var(--txt); font-size: 15px; padding: 13px 14px; outline: none; }
  .rapido button { width: 48px; border: 0; border-radius: 16px; background: var(--azul-claro); color: var(--azul);
    display: flex; align-items: center; justify-content: center; }

  /* avisos com ação, seleção em massa, faturas, gráficos */
  .toast.acao { display: flex; align-items: center; gap: 12px; pointer-events: auto; text-align: left; }
  .toast.acao button { border: 0; background: transparent; color: #B7A8FF; font-weight: 800; font-size: 14px; padding: 4px 2px; white-space: nowrap; }
  .barra-massa { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 16px; padding: 10px 12px; border-radius: 16px;
    background: var(--azul-claro); position: sticky; top: 52px; z-index: 6; }
  .barra-massa b { flex: 1 1 100%; font-size: 13px; color: var(--azul-forte); }
  .mini.perigo, .btn.perigo { color: var(--vermelho); }
  table.tab th.sel, table.tab td.sel { width: 34px; text-align: center; padding: 0 4px; }
  table.tab tr.marcada td { background: var(--azul-claro); }
  a.clipe { color: var(--azul); margin-right: 4px; vertical-align: -2px; }
  .sel-linha { flex: 1; min-width: 0; border: 0; background: var(--campo); border-radius: 12px; padding: 10px; font-size: 15px; font-weight: 600; color: var(--txt); }
  .mes-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 16px 6px; }
  .mes-nav b { min-width: 150px; text-align: center; font-size: 17px; text-transform: capitalize; }
  .barra { height: 8px; border-radius: 999px; background: var(--linha); overflow: hidden; margin-top: 6px; }
  .barra i { display: block; height: 100%; border-radius: 999px; background: var(--verde); }
  .barra i.alerta { background: var(--laranja); } .barra i.estourou { background: var(--vermelho); }
  .item.orc { align-items: center; }
  .orc-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .orc-n small { font-size: 12.5px; color: var(--sub); font-weight: 500; }
  .sep-lista { padding: 10px 16px 4px; font-size: 12px; font-weight: 700; color: var(--sub); background: var(--campo); }
  .mais-item { align-items: center; }
  .mais-item .ico-q { width: 38px; height: 38px; border-radius: 12px; }
  .fatura { padding: 0; overflow: hidden; }
  .fat-topo { display: flex; width: 100%; border: 0; background: transparent; color: var(--txt); padding: 14px 16px; gap: 10px; text-align: left; align-items: center; }
  .fat-topo > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .fat-topo small { font-size: 12px; color: var(--sub); }
  .fat-val { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .chip-st { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
  .chip-st.aberta { background: var(--vermelho-claro); color: var(--vermelho); }
  .chip-st.paga { background: var(--verde-claro); color: var(--verde); }
  .fat-itens { border-top: 1px solid var(--linha); padding: 4px 16px; }
  .fat-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linha); cursor: pointer; }
  .fat-item:last-child { border-bottom: 0; }
  .fat-item .d { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .fat-item .d b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fat-item .d small { font-size: 12px; color: var(--sub); }
  .fat-item.pago { opacity: .6; } .fat-item .ok { color: var(--verde); display: flex; }
  .grafico { width: 100%; height: auto; display: block; margin: 8px 0; }
  .g-rot { font-size: 10px; fill: var(--sub); font-family: inherit; } .g-rot.forte { font-weight: 800; fill: var(--txt); font-size: 11px; }
  .barras-h { padding: 8px 16px; }
  .bh { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%;
    border: 0; background: transparent; color: var(--txt); padding: 7px 0; text-align: left; font-size: 13px; }
  .bh-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .bh-b { height: 10px; border-radius: 999px; background: var(--campo); overflow: hidden; }
  .bh-b i { display: block; height: 100%; background: var(--vermelho); border-radius: 999px; }
  .bh-v { font-weight: 700; color: var(--vermelho); font-variant-numeric: tabular-nums; }
  .leg { font-weight: 500; margin-left: 8px; } .leg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin: 0 3px 0 8px; }
  .hist-item small.antes { text-decoration: line-through; opacity: .75; }

  /* comprovantes (anexos) */
  .anexos { padding: 10px 16px 12px; }
  .anexos-topo { display: flex; align-items: center; gap: 10px; }
  .anexos-topo .t { flex: 1; font-size: 14px; font-weight: 700; }
  .anexos-topo .ico-l { color: var(--sub); display: flex; }
  .anexos-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
  .anexo { display: flex; align-items: center; gap: 10px; background: var(--campo); border-radius: 14px; padding: 8px 6px 8px 8px; }
  .anexo .ico-q { width: 34px; height: 34px; border-radius: 10px; }
  .anexo .n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .anexo .n small { display: block; font-size: 12px; font-weight: 500; color: var(--sub); }
  .anexos .vazio-msg { padding: 8px 0 0; font-size: 13px; }
  .anexos-origens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
  .anexos-origens .mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
    border-radius: 14px; font-size: 12px; }
  .colar-aqui { width: 100%; margin-top: 10px; border: 2px dashed var(--azul); border-radius: 14px; background: var(--azul-claro);
    color: var(--txt); font: inherit; font-size: 14px; padding: 12px; resize: none; outline: none; }
  .anexos-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 700; }

  /* saldo por conta */
  .periodo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 16px; }
  .periodo label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--sub); }
  .periodo input { border: 1px solid var(--linha); background: var(--campo); color: var(--txt); border-radius: 12px;
    padding: 10px; font-size: 15px; font-weight: 600; min-width: 0; }
  .periodo .chips-p { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
  .totais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 16px; }
  .tot { background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: var(--sombra);
    display: flex; flex-direction: column; gap: 4px; }
  .tot span { font-size: 12px; font-weight: 700; color: var(--sub); }
  .tot b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .tot.dest { background: var(--teal); }
  .tot.dest span { color: rgba(255,255,255,.85); } .tot.dest b { color: #fff; }
  table.saldos td:first-child, table.saldos th:first-child { position: sticky; left: 0; z-index: 2; background: var(--card); }
  table.saldos th:first-child { background: var(--campo); z-index: 3; }
  table.saldos tfoot td:first-child { background: var(--campo); }
  table.tab.saldos td.num, table.tab.saldos th, table.tab.saldos th button { text-align: center; }   /* título e valor na mesma coluna visual */
  table.tab.saldos th:first-child, table.tab.saldos th:first-child button { text-align: left; }
  table.tab.saldos td.num { min-width: 110px; }
  table.saldos td.neg { color: var(--vermelho); font-weight: 700; }
  .sec-topo { display: flex; align-items: center; justify-content: space-between; margin: 22px 20px 8px; }
  .sec-topo span { font-size: 15px; font-weight: 700; }
  .link { border: 0; background: transparent; color: var(--azul); font-size: 14px; font-weight: 600; padding: 6px 0; }
  .card { background: var(--card); border-radius: 20px; margin: 10px 16px; padding: 4px 16px; box-shadow: var(--sombra); }
  .titulo-sec { font-size: 13px; font-weight: 700; color: var(--sub); margin: 18px 24px 4px; }
  .linha { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--linha); gap: 10px; }
  .linha:last-child { border-bottom: 0; }
  .linha > label { width: 112px; flex: none; color: var(--sub); font-size: 14px; font-weight: 600; }
  .linha > label.curto { width: 46px; }
  .linha .ico-l { color: var(--sub); display: flex; }
  .linha input[type=text], .linha input[type=date], .linha input:not([type]) {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--txt); font-size: 16px; font-weight: 600; padding: 12px 0; outline: none; }
  .linha input[type=date] { -webkit-appearance: none; appearance: none; text-align: left; min-height: 44px; }
  .valor input { font-size: 24px !important; font-weight: 800 !important; }
  .escolha { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; color: var(--txt);
    font-size: 16px; font-weight: 600; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .escolha span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .escolha .vazio { color: var(--sub); font-weight: 500; }
  .escolha::after { content: "›"; color: var(--sub); font-size: 22px; line-height: 1; }
  .escolha:disabled { opacity: .4; }
  .seg { flex: 1; display: flex; background: var(--campo); border-radius: 12px; padding: 3px; }
  .seg button { flex: 1; border: 0; background: transparent; color: var(--txt); padding: 9px 0; border-radius: 9px; font-size: 15px; font-weight: 600; }
  .seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 800; }
  .seg button.on.despesa { color: var(--vermelho); }
  .seg button.on.receita { color: var(--verde); }
  .mini { border: 0; background: var(--azul-claro); color: var(--azul); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 700; }
  .tagfinal { color: var(--azul); font-weight: 700; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }
  .card .chips, .easy .chips { padding: 0; }
  .chip { border: 0; background: var(--card); color: var(--txt); border-radius: 999px; padding: 10px 14px; box-shadow: var(--sombra);
    font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px; }
  .chip .est { color: var(--estrela); display: flex; }
  .busca-atalho { width: 100%; text-align: left; border: 0; background: var(--campo); color: var(--sub);
    border-radius: 12px; padding: 12px; font-size: 15px; margin-top: 10px; display: flex; align-items: center; gap: 8px; }
  .vazio-msg { color: var(--sub); font-size: 14px; padding: 12px 0; }
  .btn { border: 0; border-radius: 16px; padding: 15px; font-size: 16px; font-weight: 800; display: inline-flex;
    align-items: center; justify-content: center; gap: 8px; }
  .btn.prim { flex: 1; background: var(--azul); color: #fff; }
  .btn.sec { background: var(--card); color: var(--txt); box-shadow: var(--sombra); }
  .btn.transf { background: var(--transf); color: #fff; }
  .btn.largo { display: flex; width: calc(100% - 32px); margin: 16px; }
  .btn:disabled { opacity: .5; }
  .acoes-form { display: flex; gap: 10px; margin: 14px 16px; }
  .hist { padding: 4px 16px; }
  .hist .item-h { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
  .hist .item-h:last-child { border-bottom: 0; }
  .hist .item-h > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .hist .item-h b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hist .item-h small { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hist .ico-q { width: 40px; height: 40px; border-radius: 12px; }
  .v-neg { color: var(--vermelho); font-weight: 800; font-variant-numeric: tabular-nums; }
  .v-pos { color: var(--verde); font-weight: 800; font-variant-numeric: tabular-nums; }
  .v-transf { color: var(--transf); font-weight: 800; font-variant-numeric: tabular-nums; }

  /* folhas (telas por cima) */
  .folha-fundo { position: fixed; inset: 0; background: rgba(15,14,23,.4); display: none; z-index: 10; }
  .folha { position: fixed; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 36px); background: var(--bg);
    border-radius: 24px 24px 0 0; display: none; flex-direction: column; z-index: 11; }
  .folha.aberta, .folha-fundo.aberta { display: flex; }
  .folha-topo { display: flex; align-items: center; padding: 14px 16px 8px; gap: 8px; }
  .folha-topo h2 { flex: 1; font-size: 17px; font-weight: 800; margin: 0; text-align: center; }
  .folha-topo button { border: 0; background: transparent; color: var(--azul); font-size: 16px; font-weight: 600; min-width: 74px; padding: 8px 0; }
  .folha-topo button.voltar { text-align: left; }
  .folha-topo button.ok { font-weight: 800; text-align: right; }
  .folha-corpo { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .busca { margin: 4px 16px 8px; display: flex; background: var(--card); border-radius: 14px; padding: 0 12px; align-items: center; gap: 6px; color: var(--sub); }
  .busca input { flex: 1; border: 0; background: transparent; color: var(--txt); font-size: 16px; padding: 12px 4px; outline: none; }
  .lista { background: var(--card); border-radius: 18px; margin: 6px 16px; overflow: hidden; box-shadow: var(--sombra); }
  .lista button.item { display: flex; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linha);
    background: transparent; color: var(--txt); font-size: 16px; font-weight: 600; padding: 14px 16px; justify-content: space-between; gap: 8px; }
  .lista button.item:last-child { border-bottom: 0; }
  .lista button.item.sel { color: var(--azul); font-weight: 800; }
  .lista button.item.nenhum { color: var(--sub); font-style: italic; }
  .lista button.item.novo { color: var(--azul); }
  .lista button.item:disabled { opacity: .5; }
  .lista button.item small { color: var(--sub); font-weight: 500; }
  .lista .item-linha { display: flex; align-items: center; border-bottom: 1px solid var(--linha); padding: 0 6px 0 16px; min-height: 52px; gap: 8px; }
  .lista .item-linha:last-child { border-bottom: 0; }
  .lista .item-linha span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .lista .item-linha small { color: var(--sub); }
  .lista .item-linha .abre { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--txt); font-size: 16px;
    font-weight: 600; text-align: left; padding: 12px 0; }
  .lista .item-linha .abre small { display: block; font-size: 13px; font-weight: 500; margin-top: 2px; }
  .del { border: 0; background: transparent; color: var(--vermelho); font-size: 15px; padding: 10px; }
  .parc { font-size: 14px; }
  .parc .item-linha { min-height: 40px; }
  .parc b { font-variant-numeric: tabular-nums; }
  .edit { border: 0; background: transparent; color: var(--azul); font-size: 18px; padding: 8px 10px; }
  .switch { position: relative; width: 51px; height: 31px; flex: none; }
  .linha > label.switch { width: 51px; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch span { position: absolute; inset: 0; background: var(--linha); border-radius: 31px; transition: .2s; }
  .switch span::before { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; background: #fff;
    border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
  .switch input:checked + span { background: var(--verde); }
  .switch input:checked + span::before { transform: translateX(20px); }
  .abas { display: flex; overflow-x: auto; gap: 8px; padding: 4px 16px 8px; }
  .abas button { border: 0; background: var(--card); color: var(--txt); border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .abas button.on { background: var(--azul); color: #fff; }
  .add { display: flex; gap: 8px; margin: 6px 16px; }
  .add input { flex: 1; border: 0; border-radius: 14px; background: var(--card); color: var(--txt); font-size: 16px; padding: 12px; outline: none; }
  .nota { color: var(--sub); font-size: 13px; margin: 6px 24px; line-height: 1.4; }

  /* teclado: foco sempre visível */
  button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 10px; }
  .linha input:focus-visible { outline-offset: -2px; }
  .switch input:focus-visible + span { outline: 2px solid var(--azul); outline-offset: 2px; }

  /* consulta */
  .filtros { display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; align-items: center; padding: 14px 16px; }
  .filtros > label { color: var(--sub); font-size: 13px; font-weight: 600; }
  .filtros .par { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .filtros input, .filtros select { font-size: 15px; padding: 8px 10px; border: 1px solid var(--linha);
    border-radius: 10px; background: var(--campo); color: var(--txt); min-width: 0; }
  .filtros input:disabled { opacity: .55; }
  .filtros input[type=text] { flex: 1; min-width: 120px; }
  .filtros input[type=number] { width: 150px; }
  .acoes-consulta { display: flex; gap: 8px; margin: 6px 16px; flex-wrap: wrap; }
  .acoes-consulta .btn { padding: 13px 16px; }
  .resumo { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; font-size: 14px; }
  .resumo b { font-variant-numeric: tabular-nums; }
  .resumo .neg { color: var(--vermelho); } .resumo .pos { color: var(--verde); }
  .agrupar { display: flex; gap: 8px; align-items: center; margin: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--sub); }
  .tab-wrap { overflow: auto; margin: 6px 16px; background: var(--card); border-radius: 16px; max-height: 60vh; }
  table.tab { border-collapse: collapse; width: 100%; font-size: 13.5px; }
  table.tab th { position: sticky; top: 0; background: var(--campo); text-align: left; padding: 0; z-index: 1;
    border-bottom: 1px solid var(--linha); white-space: nowrap; }
  table.tab th button { border: 0; background: transparent; color: var(--txt); font-weight: 700; font-size: 13.5px;
    padding: 9px 10px; width: 100%; text-align: left; }
  table.tab td { padding: 8px 10px; border-bottom: 1px solid var(--linha); white-space: nowrap; max-width: 260px;
    overflow: hidden; text-overflow: ellipsis; }
  table.tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
  table.tab th button { cursor: pointer; white-space: nowrap; }
  table.tab th button:hover { color: var(--azul); }
  table.tab th button .ord { color: var(--sub); opacity: .55; font-size: 11px; margin-left: 3px; }
  table.tab th button .ord.on { color: var(--azul); opacity: 1; font-size: 12px; }
  table.tab tr.reg { cursor: pointer; }
  table.tab tr.reg:hover td, table.tab tr.reg:focus td { background: var(--azul-claro); }
  table.tab tr.reg:focus { outline: 2px solid var(--azul); outline-offset: -2px; }
  table.tab tfoot td { font-weight: 800; background: var(--campo); position: sticky; bottom: 0; }

  /* transferência */
  .tr-valor { background: var(--card); border-radius: 22px; margin: 6px 16px 10px; padding: 14px 16px; display: flex;
    flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--sombra); }
  .tr-valor label { font-size: 13px; font-weight: 600; color: var(--sub); }
  .tr-valor input { width: 100%; border: 0; background: transparent; text-align: center; font-size: 38px; font-weight: 800;
    color: var(--txt); padding: 0; outline: none; }
  .tr-contas { padding: 6px 16px; }
  .tr-linha { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
  .tr-linha:first-child { border-bottom: 1px solid var(--linha); }
  .tr-linha label { font-size: 13px; font-weight: 600; color: var(--sub); width: 40px; }
  .tr-linha select { flex: 1; min-width: 0; border: 0; background: var(--campo); border-radius: 12px; padding: 12px;
    font-size: 16px; font-weight: 700; color: var(--txt); }
  .tr-linha .ico-q { width: 40px; height: 40px; border-radius: 12px; }
  .tr-swap { display: flex; justify-content: flex-end; margin: -22px 0; position: relative; z-index: 1; }
  .tr-swap button { width: 44px; height: 44px; border-radius: 999px; border: 3px solid var(--card); background: var(--transf);
    color: #fff; display: flex; align-items: center; justify-content: center; }
  .prev { padding: 4px 16px; }
  .prev .pl { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
  .prev .pl:last-child { border-bottom: 0; }
  .prev .pl > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .prev .pl b { font-size: 14px; font-weight: 700; }
  .prev .pl small { font-size: 12px; color: var(--sub); overflow-wrap: anywhere; }
  .prev .riscado { font-size: 13px; color: var(--sub); text-decoration: line-through; }
  .prev code { align-self: flex-start; background: var(--campo); border-radius: 8px; padding: 3px 8px; font-size: 12px; color: var(--azul-forte); }
  .alerta { background: var(--vermelho-claro); border-radius: 18px; margin: 10px 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
  .alerta .ico-q { width: 36px; height: 36px; border-radius: 12px; background: var(--vermelho); color: #fff; }
  .alerta b { display: block; font-size: 15px; font-weight: 800; color: var(--vermelho); margin-bottom: 3px; }
  .alerta span.t { font-size: 13px; line-height: 1.45; color: var(--vermelho-txt); }
  .res-transf { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 16px 4px; }
  .res-transf h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
  .res-transf .vt { font-size: 32px; font-weight: 800; color: var(--transf); }
  .res-transf .rota { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--sub); flex-wrap: wrap; justify-content: center; }

  .toast { position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    background: rgba(27,26,46,.94); color: #fff; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600;
    opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 30; max-width: 90%; text-align: center; }
  .toast.on { opacity: 1; }
  .carregando { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 14px; z-index: 40; color: var(--sub); }
  .giro { width: 34px; height: 34px; border: 3px solid var(--linha); border-top-color: var(--azul); border-radius: 50%; animation: g 0.8s linear infinite; }
  @keyframes g { to { transform: rotate(360deg); } }

  /* ============ EASY ============ */
  .easy { position: fixed; inset: 0; z-index: 9; background: var(--bg); display: none; flex-direction: column;
    padding-top: env(safe-area-inset-top); }
  .easy.aberta { display: flex; }
  .easy-topo { display: flex; align-items: center; gap: 12px; padding: 12px 16px 4px; }
  .easy-topo button { border: 0; background: var(--card); color: var(--txt); font-size: 15px; font-weight: 700; min-width: 44px; height: 44px;
    padding: 0 12px; border-radius: 14px; box-shadow: var(--sombra); }
  .easy-prog { flex: 1; height: 8px; background: var(--linha); border-radius: 999px; overflow: hidden; }
  .easy-prog i { display: block; height: 100%; width: 0; background: var(--azul); border-radius: 999px; transition: width .2s; }
  .easy-corpo { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 18px calc(28px + env(safe-area-inset-bottom)); }
  .easy-perg { font-size: 28px; font-weight: 800; letter-spacing: -.4px; margin: 14px 2px 6px; }
  .easy-ctx { color: var(--sub); font-size: 14px; font-weight: 600; margin: 0 2px 14px; overflow-wrap: anywhere; }
  .easy-sub { font-size: 13px; font-weight: 700; color: var(--sub); margin: 18px 2px 8px; }
  .easy .chip { background: var(--azul-claro); color: var(--azul-forte); box-shadow: none; font-weight: 700; }
  .easy .chip small { opacity: .8; font-size: 12px; font-weight: 500; }
  .easy .busca { margin: 0 0 8px; }
  .easy .lista { margin: 0; }
  .easy .card { margin: 12px 0; }
  .easy-valor { width: 100%; border: 0; background: var(--card); color: var(--txt); font-size: 44px; font-weight: 800;
    text-align: center; padding: 22px 10px; border-radius: 20px; outline: none; margin-top: 10px; box-shadow: var(--sombra); }
  .easy-obs { width: 100%; border: 0; background: var(--card); color: var(--txt); font-size: 18px; font-weight: 600; padding: 16px;
    border-radius: 16px; outline: none; margin-top: 10px; box-shadow: var(--sombra); }
  .easy-btn { display: block; width: 100%; border: 0; border-radius: 16px; padding: 17px; font-size: 17px; font-weight: 800;
    background: var(--azul); color: #fff; margin-top: 14px; }
  .easy-btn.sec { background: var(--card); color: var(--txt); box-shadow: var(--sombra); }
  .easy-btn:disabled { opacity: .5; }
  .sugestao { display: flex; align-items: center; gap: 14px; width: 100%; border: 2px solid var(--azul); background: var(--card);
    color: var(--txt); border-radius: 20px; padding: 16px; text-align: left; font-size: 20px; font-weight: 800; margin-top: 6px; }
  .sugestao .ck { width: 40px; height: 40px; border-radius: 50%; background: var(--azul); color: #fff; display: flex;
    align-items: center; justify-content: center; flex: none; }
  .sugestao small { display: block; font-size: 13px; font-weight: 600; color: var(--azul-forte); margin-top: 3px; }
  .tipo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
  .tipo-btns button { border: 2px solid var(--linha); background: var(--card); color: var(--txt); border-radius: 20px;
    padding: 30px 8px; font-size: 20px; font-weight: 800; }
  .tipo-btns button.desp.sug { border-color: var(--vermelho); color: var(--vermelho); }
  .tipo-btns button.rec.sug { border-color: var(--verde); color: var(--verde); }
  .tipo-btns small { display: block; font-size: 12px; font-weight: 500; color: var(--sub); margin-top: 6px; }
  .res-valor { display: block; width: 100%; border: 0; background: transparent; font-size: 40px; font-weight: 800;
    padding: 10px 0 0; text-align: center; font-variant-numeric: tabular-nums; }
  .res-valor.neg { color: var(--vermelho); } .res-valor.pos { color: var(--verde); }
  .res-tipo { text-align: center; }
  .res-linha { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--linha);
    background: transparent; color: var(--txt); padding: 14px 0; font-size: 16px; text-align: left; }
  .res-linha span { width: 112px; flex: none; color: var(--sub); font-size: 14px; font-weight: 600; }
  .res-linha b { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .res-linha b i { color: var(--sub); font-weight: 400; }
  .res-linha::after { content: "›"; color: var(--sub); font-size: 22px; line-height: 1; }
  .feito { text-align: center; padding-top: 34px; }
  .feito-ck { width: 76px; height: 76px; border-radius: 50%; background: var(--verde); color: #fff;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; }
