/* Finanças JoLu — paleta areia + lavanda. Jo = rosa, Lu = azul. */
:root {
  --bg: #FAF6F0; --card: #FFFFFF; --ink: #2B2622; --muted: #857A6F; --line: #ECE4D8; --soft: #F4EEE5;
  --brand: #6D5DC4; --brand-2: #EEEBFA; --sage: #4E8A5C; --sage-2: #E6F0E4;
  --jo: #CF557F; --jo-2: #FBE6EE; --lu: #2F7BC0; --lu-2: #E2EEF8;
  --bad: #B84A42; --bad-2: #F7E2DE; --warn: #B87D1E; --warn-2: #F6EAD2;
  --on-brand: #FFFFFF;
  --shadow: 0 1px 2px rgba(60, 45, 30, .05);
  --r: 16px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1714; --card: #24201C; --ink: #F3EDE6; --muted: #A69A8E; --line: #36302A; --soft: #2C2722;
    --brand: #B3A8F0; --brand-2: #2E2A45; --sage: #8EC59A; --sage-2: #213024;
    --jo: #F29BBB; --jo-2: #3D2430; --lu: #8EC0EE; --lu-2: #1F2D3B;
    --bad: #EC8781; --bad-2: #3A2321; --warn: #E2B35E; --warn-2: #3A3020;
    --on-brand: #1E1A33;
    --shadow: none;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden;
  font: 16px/1.4 Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }
.num { font-variant-numeric: tabular-nums; }

/* Campos: 16px evita o zoom automático do iPhone; min-width 0 evita estourar a largura */
input, select { width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none; }
input:focus { border-color: var(--brand); }
input[type=date], input[type=month] { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; text-align: left; cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator { cursor: pointer; }
input::-webkit-date-and-time-value { text-align: left; }
input[type=file] { padding: 9px; font-size: 14px; }

/* Topo */
header { position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; display: flex; align-items: center; gap: 8px; }
header .logo { font-weight: 700; font-size: 19px; flex: 1; min-width: 0; white-space: nowrap; letter-spacing: -.3px; }
header .logo span { color: var(--brand); }
header .sync { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 4px; vertical-align: 3px; opacity: 0; transition: opacity .2s; }
header .sync.on { opacity: 1; animation: pulsar 1s ease-in-out infinite alternate; }
@keyframes pulsar { from { opacity: .35; } to { opacity: 1; } }
.mes-nav { display: flex; align-items: center; height: 36px; background: var(--card); border-radius: 10px; border: 1px solid var(--line); }
.mes-nav button { border: 0; background: none; width: 32px; height: 34px; color: var(--muted); display: grid; place-items: center; }
.mes-nav span { font-weight: 600; font-size: 14px; min-width: 62px; text-align: center; }
.engrenagem { border: 1px solid var(--line); background: var(--card); width: 36px; height: 36px; border-radius: 10px; color: var(--muted); display: grid; place-items: center; }
main { padding: 4px var(--gutter) 0; max-width: 560px; margin: 0 auto; }

/* Cartões e títulos */
.card { background: var(--card); border-radius: var(--r); padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.titulo { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin: 0 0 6px; }
.titulo h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; font-weight: 700; }
.titulo .extra { color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.pos { color: var(--sage); } .neg { color: var(--bad); }
.sub { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

/* Resumo do mês */
.hero .rot { font-size: 14px; color: var(--muted); }
.hero .saldo { font-size: 34px; font-weight: 700; margin: 2px 0 14px; letter-spacing: -.8px; line-height: 1.1; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trio div { font-size: 13px; color: var(--muted); min-width: 0; }
.trio b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); border-radius: 4px; }
.bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); } .bar i.brand { background: var(--brand); }
.hero .bar { margin: 16px 0 6px; }
.aviso { background: var(--bad-2); color: var(--bad); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; font-weight: 500; }

/* Linhas: ícone 38px + 12px de espaço = texto sempre começa a 50px da borda do cartão */
.item { display: flex; gap: 12px; align-items: center; padding: 11px 0; min-height: 60px; }
.item + .item, .acoes + .item { border-top: 1px solid var(--line); }
.ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.ico.txt { font-weight: 600; font-size: 14px; }
.ico.Jo { background: var(--jo-2); color: var(--jo); } .ico.Lu { background: var(--lu-2); color: var(--lu); }
.ico.verde { background: var(--sage-2); color: var(--sage); }
.item .info { flex: 1; min-width: 0; }
.item .nome { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.item .valor { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; flex: 0 0 auto; }
.linha2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.linha2 > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Gastos agrupados por dia */
.grupo-dia { margin-top: 14px; }
.grupo-dia .dia { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--soft); border-radius: 8px; padding: 6px 10px; margin: 0 -4px 2px;
  font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.grupo-dia .dia + .item { border-top: 0; }
.quem { font-weight: 600; }
.quem.Jo { color: var(--jo); } .quem.Lu { color: var(--lu); } .quem.ambas { color: var(--brand); }

/* A pagar */
.folha { flex: 0 0 38px; width: 38px; height: 42px; border-radius: 9px; border: 1px solid var(--line); text-align: center; overflow: hidden; background: var(--card); }
.folha small { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; background: var(--soft); color: var(--muted); padding: 1px 0; }
.folha b { display: block; font-size: 16px; line-height: 24px; font-weight: 700; }
.folha.atrasada { border-color: var(--bad-2); } .folha.atrasada small { background: var(--bad-2); color: var(--bad); }
.folha.perto small { background: var(--warn-2); color: var(--warn); }
.btn-pagar { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); border-radius: 9px; height: 34px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--brand); }
.acoes { display: flex; align-items: center; gap: 8px; padding: 0 0 12px 50px; }
.acoes span { font-size: 13px; color: var(--muted); flex: 1; }
.pill { border: 0; border-radius: 8px; height: 34px; padding: 0 14px; font-weight: 600; font-size: 14px; }
.pill.Jo { background: var(--jo-2); color: var(--jo); } .pill.Lu { background: var(--lu-2); color: var(--lu); }
.pill.x { background: none; color: var(--muted); padding: 0 6px; display: grid; place-items: center; }
.dica { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--muted); }
.dica span { flex: 1; }
.linkbtn { border: 0; background: none; color: var(--brand); font-weight: 600; padding: 0; font-size: 14px; white-space: nowrap; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); border-radius: 9px; height: 36px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on.Jo { background: var(--jo); border-color: var(--jo); color: #fff; } .chip.on.Lu { background: var(--lu); border-color: var(--lu); color: #fff; }

.btn { border: 0; border-radius: 12px; height: 50px; padding: 0 14px; font-weight: 600; font-size: 16px; width: 100%; background: var(--brand); color: var(--on-brand); }
.btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; font-size: 15px; height: 44px; }
.btn.del { background: transparent; color: var(--bad); border: 1px solid var(--bad-2); margin-top: 10px; font-weight: 500; height: 44px; }
.btn.mini { width: auto; height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn + .btn { margin-top: 10px; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.seta { transition: transform .2s; display: inline-grid; color: var(--muted); }
.seta svg.i { width: 16px; height: 16px; }
details[open] > summary .seta { transform: rotate(90deg); }

.vazio { text-align: center; color: var(--muted); padding: 14px 0; font-size: 15px; }
.busca { margin: 4px 0 10px; }
.seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; height: 34px; border-radius: 8px; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Navegação */
nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center;
  padding: 8px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); pointer-events: none; }
nav .barra { pointer-events: auto; display: grid; grid-template-columns: 1fr 1fr 56px 1fr 1fr; align-items: center; background: var(--card); border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(60, 40, 25, .10); padding: 5px; gap: 2px; width: 100%; max-width: 420px; }
nav .barra button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 500; color: var(--muted); padding: 6px 0; border-radius: 12px; min-width: 0; white-space: nowrap; }
nav .barra button svg.i { width: 21px; height: 21px; }
nav .barra button.on { color: var(--brand); font-weight: 600; }
nav .barra .add { height: 46px; border-radius: 13px; background: var(--brand); color: var(--on-brand); padding: 0; justify-content: center; }
nav .barra .add svg.i { width: 24px; height: 24px; stroke-width: 2.2; }

/* Gráfico de meses */
.cols { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-top: 4px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.cols .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.cols .pair i { width: 38%; max-width: 12px; border-radius: 4px 4px 2px 2px; background: var(--sage); min-height: 2px; }
.cols .pair i.d { background: var(--brand); }
.cols small { font-size: 11px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pessoa { border-radius: 12px; padding: 14px; border: 1px solid var(--line); min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: 0 0 30px; }
.avatar.Jo { background: var(--jo-2); color: var(--jo); } .avatar.Lu { background: var(--lu-2); color: var(--lu); }
.avatar.grande-av { width: 36px; height: 36px; flex-basis: 36px; }
.com-foto { padding: 0; overflow: hidden; background: var(--soft); }
.com-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fotos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.foto-pessoa { display: flex; align-items: center; gap: 12px; }
.foto-pessoa .avatar.foto-av { width: 56px; height: 56px; flex: 0 0 56px; font-size: 18px; }
.foto-pessoa b { display: block; margin-bottom: 2px; }
.pessoa .v { font-size: 21px; font-weight: 700; margin-top: 10px; letter-spacing: -.4px; white-space: nowrap; }
.split { display: flex; height: 6px; border-radius: 4px; overflow: hidden; margin-top: 14px; background: var(--soft); gap: 2px; }
.split i { display: block; height: 100%; }

.destaques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.destaques div { background: var(--soft); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.destaques small { display: block; font-size: 12px; color: var(--muted); }
.destaques b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grande { font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; }

/* Formulário (folha que sobe de baixo) */
.sheet-bg { position: fixed; inset: 0; background: rgba(30, 20, 12, .35); z-index: 20; display: none; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg); border-radius: 18px 18px 0 0;
  max-height: 94vh; max-height: 94dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; transform: translateY(105%); transition: transform .22s ease;
  max-width: 560px; margin: 0 auto; }
.sheet.open { transform: none; } .sheet-bg.open { display: block; }
.sheet .topo { position: sticky; top: 0; background: var(--bg); padding: 10px var(--gutter) 8px; z-index: 2; }
.sheet .alca { width: 36px; height: 4px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet .topo .l { display: flex; align-items: center; gap: 8px; }
.sheet .topo b { flex: 1; font-size: 17px; font-weight: 700; }
.fechar { border: 1px solid var(--line); background: var(--card); width: 34px; height: 34px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.sheet .corpo { padding: 4px var(--gutter) 16px; }
.sheet .rodape { position: sticky; bottom: 0; background: var(--bg); padding: 10px var(--gutter) calc(14px + env(safe-area-inset-bottom)); }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 8px; font-weight: 600; }
.valor-box { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 12px 0 4px; }
.valor-box span { font-size: 20px; font-weight: 600; color: var(--muted); }
.valor-box input { border: 0; background: none; font-size: 40px; font-weight: 700; text-align: left; padding: 0; width: 6.2ch; letter-spacing: -.8px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cat-grid button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; height: 64px; padding: 0 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted); min-width: 0; }
.cat-grid button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.cat-grid button.on { border-color: var(--brand); background: var(--brand-2); color: var(--brand); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid2 label.f { margin-top: 12px; }
.bloco { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bloco > label.f:first-child { margin-top: 0; }
.mais summary { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); font-size: 14px; min-height: 24px; }
.mais summary .resumo { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.previa { background: var(--brand-2); color: var(--brand); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; font-weight: 500; }
.pag { padding: 12px 0; }
.pag + .pag { border-top: 1px solid var(--line); }
.pag .cab { display: flex; align-items: center; gap: 8px; }
.pag .cab .chips { flex: 1; }
.pag .valor-parte { width: 120px; flex: 0 0 120px; text-align: right; }
.pag .chips.scroll { margin: 8px -14px 0; padding: 2px 14px 4px; }
.pag-total { display: flex; justify-content: space-between; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.atalhos { margin: 8px -16px 0; }
.atalhos .chip { height: 32px; font-size: 13px; }

.lista-ajustes .linha { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 6px 0; }
.lista-ajustes .linha + .linha { border-top: 1px solid var(--line); }
.lista-ajustes .linha span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lista-ajustes input { text-align: right; padding: 9px 11px; }
.fixa { display: grid; grid-template-columns: minmax(0, 1fr) 96px 58px 34px; gap: 6px; align-items: center; padding: 6px 0; }
.fixa input { padding: 9px 10px; }
.fixa.cab { padding: 8px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.fixa.cab span:nth-child(2), .fixa.cab span:nth-child(3) { text-align: right; padding-right: 10px; }
.fixa .num-in { text-align: right; }
.codigo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--soft); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
ol.passos { padding-left: 20px; margin: 8px 0; font-size: 14px; } ol.passos li { margin: 4px 0; }

.toast { position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; z-index: 30; font-size: 15px; font-weight: 500; display: none; max-width: calc(100vw - 32px); text-align: center; }
.loading { text-align: center; padding: 80px 0; color: var(--muted); }

/* Colunas: no celular empilham; no computador ficam lado a lado */
.col-a, .col-b, .cheio { min-width: 0; }
#lateral, .titulo-pagina, .so-desktop { display: none; }

/* Tabela de gastos (computador) */
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.tabela td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr { cursor: pointer; }
.tabela tbody tr:hover td { background: var(--soft); }
.tabela .d { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .cat { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.tabela .cat .ico { flex-basis: 28px; width: 28px; height: 28px; border-radius: 8px; }
.tabela .cat .ico svg.i { width: 16px; height: 16px; }
.tabela .desc { font-weight: 500; }
.tabela .data { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela td:first-child, .tabela th:first-child { padding-left: 0; }
.tabela td:last-child, .tabela th:last-child { padding-right: 0; }

@media (min-width: 900px) {
  :root { --lat: 236px; --gutter: 32px; }
  body { padding-bottom: 0; }
  nav#nav, header .logo, .engrenagem { display: none !important; }

  #lateral { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: var(--lat); z-index: 7;
    background: var(--card); border-right: 1px solid var(--line); padding: 22px 16px 18px; gap: 6px; }
  .lat-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.3px; padding: 0 6px 14px; }
  .lat-logo img { width: 34px; height: 34px; border-radius: 9px; }
  .lat-logo span { color: var(--brand); }
  .lat-lancar { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; margin-bottom: 14px; }
  .lat-nav { display: flex; flex-direction: column; gap: 2px; }
  .lat-nav button { display: flex; align-items: center; gap: 12px; border: 0; background: none; height: 42px; padding: 0 12px; border-radius: 10px;
    font-size: 15px; font-weight: 500; color: var(--muted); text-align: left; }
  .lat-nav button:hover { background: var(--soft); color: var(--ink); }
  .lat-nav button.on { background: var(--brand-2); color: var(--brand); font-weight: 600; }
  .lat-rodape { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
  .lat-rodape b { color: var(--ink); font-weight: 600; display: block; }

  header { margin-left: var(--lat); padding: 22px var(--gutter) 14px; gap: 12px; }
  .titulo-pagina { display: flex; align-items: center; gap: 10px; flex: 1; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
  .titulo-pagina .sync { width: 8px; height: 8px; }
  .mes-nav { height: 40px; } .mes-nav button { height: 38px; width: 36px; } .mes-nav span { min-width: 120px; font-size: 15px; }

  main { margin-left: var(--lat); max-width: none; padding: 0 var(--gutter) 40px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
  main.tela-mes { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); }
  main.tela-pagou { grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); }
  main > .cheio, main > .loading, main > .login { grid-column: 1 / -1; }
  .card { padding: 20px; margin-bottom: 20px; }
  .seg { max-width: 420px; margin-bottom: 20px; }
  .so-desktop { display: block; } .so-celular { display: none !important; }
  .item[onclick]:hover .nome, .item[onclick]:hover .info > .linha2 .nome { color: var(--brand); }
  .item[onclick], summary { cursor: pointer; }
  .chips.scroll { flex-wrap: wrap; margin: 0; padding: 2px 0 4px; }
  .pag .chips.scroll { margin: 8px 0 0; padding: 2px 0 4px; }
  .hero .saldo { font-size: 38px; }

  /* Formulário vira painel lateral à direita */
  .sheet { left: auto; right: 0; top: 0; bottom: 0; width: 460px; max-width: 100vw; max-height: none; height: 100vh;
    border-radius: 0; border-left: 1px solid var(--line); transform: translateX(105%); margin: 0; box-shadow: -12px 0 40px rgba(40, 25, 15, .12); }
  .sheet .alca { display: none; }
  .sheet .topo { padding-top: 22px; }
  .sheet-bg { background: rgba(30, 20, 12, .18); }
  .toast { bottom: 28px; left: calc(50% + var(--lat) / 2); }
  .sem-nav #lateral { display: none; }
  .sem-nav header, .sem-nav main { margin-left: 0; }
}
@media (min-width: 1400px) {
  main.tela-painel, main.tela-metas { grid-template-columns: repeat(2, minmax(0, 560px)); }
}

/* Login */
.login { max-width: 380px; margin: 8vh auto 0; padding: 0 var(--gutter); }
.login img { width: 84px; height: 84px; border-radius: 20px; display: block; margin: 0 auto 16px; }
.login h1 { text-align: center; font-size: 24px; margin: 0 0 4px; letter-spacing: -.4px; }
.login p { text-align: center; color: var(--muted); margin: 0 0 20px; }
.login label.f:first-of-type { margin-top: 0; }
.login .btn { margin-top: 18px; }
.sem-nav nav, .sem-nav #mesNav, .sem-nav .engrenagem { display: none; }
