:root {
  --bg: #0b1220;
  --panel: rgba(17, 27, 46, 0.88);
  --panel-2: #16233a;
  --line: #26364f;
  --text: #e6edf7;
  --muted: #94a3b8;
  --accent: #14b8a6;
  --accent-2: #0d9488;
  --danger: #e11d48;
  --ok: #22c55e;
  --receita: #e3f0ff;
  --despesa: #ffe4ea;
  --invest: #e1f7e7;
  --ink: #0f172a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg) url("/img/fundo.svg") center / cover fixed no-repeat;
}
a { color: #5eead4; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }

/* ---------- estrutura ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; background: rgba(8, 14, 26, .94); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .06em; }
.brand span { color: var(--accent); }
.drawer {
  position: fixed; inset: 0 auto 0 0; width: 260px; max-width: 82vw; z-index: 40; padding: 1rem .75rem;
  background: #0a1324; border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s;
  display: flex; flex-direction: column; gap: .1rem; overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer a, .drawer .linkbtn {
  display: block; padding: .5rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; background: none;
  border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer;
}
.drawer a:hover, .drawer a.active, .drawer .linkbtn:hover { background: var(--panel-2); }
.drawer .grupo-menu summary { padding: .5rem .8rem; border-radius: 8px; cursor: pointer; list-style: none; }
.drawer .grupo-menu summary::-webkit-details-marker { display: none; }
.drawer .grupo-menu summary::after { content: '▸'; float: right; }
.drawer .grupo-menu[open] summary::after { content: '▾'; }
.drawer .grupo-menu summary:hover { background: var(--panel-2); }
.drawer .grupo-menu a { padding-left: 1.6rem; font-size: .93rem; }
.drawer .grupo-menu.sub { margin-left: .8rem; }
.drawer .grupo-menu.sub summary { padding: .4rem .8rem; font-size: .93rem; }
.drawer .who { color: var(--muted); font-size: .85rem; padding: .25rem .8rem 1rem; }
.drawer .spacer { flex: 1; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 35; display: none; }
.scrim.show { display: block; }
.content { padding: 1rem 1rem 4rem; max-width: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; backdrop-filter: blur(4px); }
.rodape { position: fixed; right: .75rem; bottom: .4rem; font-size: .68rem; color: var(--muted); z-index: 20; pointer-events: none; }

@media (min-width: 900px) {
  .drawer { transform: none; }
  .scrim { display: none !important; }
  .topbar, .content { margin-left: 260px; }
  #menuBtn { display: none; }
  .content { padding: 1.5rem 2rem 4rem; }
}

/* ---------- formulários e botões ---------- */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .7rem; color: var(--text); background: #0d182b;
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--accent); }
.grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 150px; min-height: 44px;
  padding: .55rem 1rem; border: 0; border-radius: 8px; background: var(--accent-2); color: #fff; font: inherit;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent); }
.btn.ativo { outline: 2px solid #14b8a6; outline-offset: 1px; }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--line); }
.btn.secondary:hover { background: #1d2e4a; }
.btn.danger { background: var(--danger); }
.btn.small { min-width: 110px; min-height: 36px; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.msg { padding: .65rem .85rem; border-radius: 8px; margin-bottom: 1rem; }
.msg.erro { background: rgba(225, 29, 72, .15); border: 1px solid var(--danger); }
.msg.ok { background: rgba(34, 197, 94, .13); border: 1px solid var(--ok); }

.pw { position: relative; }
.pw input { padding-right: 3rem; }
.pw .eye { position: absolute; right: 2px; top: 2px; width: 44px; height: 40px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.pw .eye svg { width: 22px; height: 22px; }
.pw .eye .off { display: none; }
.pw .eye.on .off { display: block; }
.pw .eye.on .on { display: none; }

.stepper { display: flex; gap: .4rem; }
.stepper .btn { min-width: 44px; padding: 0; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { text-align: center; letter-spacing: .08em; font-size: 1.6rem; }
.login-card h1 span { color: var(--accent); }
.login-card .btn { width: 100%; margin-top: .6rem; }

/* ---------- tabelas simples ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tag { padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; background: var(--panel-2); border: 1px solid var(--line); }
.tag.bad { background: rgba(225, 29, 72, .2); border-color: var(--danger); }
.inline { display: inline; }

/* ---------- planilhas ---------- */
.sheet-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 150px); background: rgba(8, 14, 26, .6); }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: max-content; }
.sheet th, .sheet td { padding: .4rem .6rem; border-bottom: 1px solid rgba(15, 23, 42, .25); white-space: nowrap; }
.sheet thead th { position: sticky; top: 0; z-index: 3; background: #0a1324; color: var(--text); text-align: right; min-width: 92px; border-bottom: 1px solid var(--line); }
.sheet thead th.cur { background: var(--accent-2); }
.sheet .name { position: sticky; left: 0; z-index: 2; text-align: left; min-width: 150px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.sheet thead th.name { z-index: 4; }
.sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet td a { color: inherit; }
.sheet tr.R td, .sheet tr.R .name { background: var(--receita); color: var(--ink); }
.sheet tr.D td, .sheet tr.D .name { background: var(--despesa); color: var(--ink); }
.sheet tr.I td, .sheet tr.I .name { background: var(--invest); color: var(--ink); }
.sheet tr.sum td, .sheet tr.sum .name { background: #cbd5e1; color: var(--ink); font-weight: 700; }
.sheet tr.head td, .sheet tr.head .name { font-weight: 700; letter-spacing: .04em; filter: brightness(.94); }
.sheet tr.grp td, .sheet tr.grp .name { font-weight: 600; }
.sheet tr.child { display: none; }
.sheet tr.child .name { padding-left: 1.6rem; }
.sheet tr.child.show { display: table-row; }
.sheet tr.final td, .sheet tr.final .name { background: #0f172a; color: #fff; font-weight: 700; }
.sheet .neg { color: #be123c; }
.sheet tr.final .neg { color: #fda4af; }
.sheet .tg { background: none; border: 0; cursor: pointer; font-size: .8rem; color: inherit; padding: 0 .35rem 0 0; }
.sheet .cursor-col { box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, .10); }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.doc-box { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.sheet tr.linha .name { padding-left: 1.6rem; font-weight: 400; }
.sheet tr.linha td { font-size: .95em; }
.dialogo { max-width: 380px; width: calc(100% - 2rem); padding: 1.2rem; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.dialogo::backdrop { background: rgba(0, 0, 0, .6); }
.sheet button.plus { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: .45rem; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; background: none; color: inherit; font: 700 .85rem/1 inherit; cursor: pointer; vertical-align: middle; }
.sheet tr.item .name { padding-left: 1.6rem; font-weight: 400; }
.sheet tr.item.calculado td { font-weight: 700; }
.sheet td.edit { cursor: text; }
.sheet td.edit:hover { outline: 1px dashed rgba(15, 23, 42, .5); outline-offset: -2px; }
.sheet td.edit input { width: 100%; min-width: 80px; min-height: 28px; padding: .15rem .3rem; text-align: right; color: var(--ink); background: #fff; border: 1px solid var(--accent-2); border-radius: 4px; font: inherit; }
.check { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; color: var(--text); font-size: .95rem; }
/* Patrimônio: colunas de dezembro com a cor da própria linha, 15% mais escura e mais saturada */
.sheet.patr tr.R td.dez { background: hsl(212, 100%, 81%); }
.sheet.patr tr.D td.dez { background: hsl(348, 100%, 80%); }
.sheet.patr tr.sum td.dez { background: hsl(214, 45%, 71%); }
.sheet.patr thead th.dez { background: hsl(217, 70%, 9%); }
.sheet.patr thead th.cur.dez { background: hsl(173, 80%, 28%); }
/* Empréstimo Simples – Previ */
.sheet-wrap.tall { max-height: calc(100vh - 170px); }
.sheet.emp thead th { text-align: center; }
.sheet.emp thead th.sep { border-left: 1px solid var(--line); }
.sheet.emp thead th { min-width: 0; padding-left: .4rem; padding-right: .4rem; }
.sheet.emp td { padding-left: .3rem; padding-right: .3rem; font-size: .8rem; }
.sheet.emp thead tr:first-child th { white-space: nowrap; height: 28px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; line-height: 1.1; vertical-align: middle; }
.sheet.emp thead tr.sub th { padding-left: .3rem; padding-right: .3rem; }
.sheet.emp thead tr.sub th { top: 27px; min-width: 0; font-weight: 600; } /* 1px de sobreposição: sem fresta entre as linhas do cabeçalho */ /* colunas pelo tamanho do conteúdo */
.sheet.emp thead th.n, .sheet.emp thead th.mes { min-width: 0; }
.sheet.emp td { color: var(--ink); }
.sheet.emp td.n, .sheet.emp td.mes { text-align: center; font-weight: 600; background: inherit; }
.sheet.emp tr.p0 td { background: #fce4d6; }
.sheet.emp tr.b0 td { background: #fff2cc; }
.sheet.emp tr.b1 td { background: #e2efda; }
.sheet.emp tr[data-linha-atual] td { box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, .22); font-weight: 700; }
.sheet.emp td.calculado { font-style: italic; }
.sheet.emp td.neg { color: #dc2626; }
.sheet.emp tr.b1:nth-child(12n + 2) td, .sheet.emp tr.b0:nth-child(12n + 2) td { border-top: 2px solid #475569; }
.sheet tr.vinculo td.num { font-style: italic; }
/* gráfico de linhas */
.sheet a.chart-ico { float: right; margin-left: .6rem; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: inherit; background: rgba(15, 23, 42, .12); text-decoration: none; }
.sheet a.chart-ico:hover { background: rgba(15, 23, 42, .3); }
.sheet tr.final a.chart-ico { background: rgba(255, 255, 255, .16); }
.grafico-card { position: relative; max-width: 960px; }
.grafico-area { width: 100%; min-height: 300px; }
.grafico-area svg { display: block; max-width: 100%; touch-action: pan-y; }
.legenda { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .6rem; font-size: .9rem; }
.legenda span, .tooltip div { display: inline-flex; align-items: center; gap: .4rem; }
.legenda i, .tooltip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tooltip { position: absolute; z-index: 5; min-width: 170px; padding: .55rem .7rem; background: #0a1324; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; pointer-events: none; }
.tooltip strong, .tooltip div { display: flex; margin-bottom: .15rem; }
.alinha-fim { align-self: end; }
/* Documentos */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 960px; }
.tile { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem; color: var(--text); text-decoration: none; margin: 0; }
.tile:hover { border-color: var(--accent); }
.thumb.mini { width: 56px; height: 56px; }
/* Aniversários */
.tiles.aniv { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; }
.aniv-card { margin: 0; }
.aniv-card h2 { margin: 0 0 .6rem; font-size: 1.05rem; }
.aniv-card.atual { border-color: var(--accent); }
.aniv-card ul { list-style: none; margin: 0; padding: 0; }
.aniv-card li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.aniv-card li:first-child { border-top: 0; }
.aniv-card .dia { min-width: 3.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.aniv-card a { color: var(--text); text-decoration: none; }
.aniv-card a:hover { text-decoration: underline; }
.aniv-card li.passou { opacity: .5; }
.aniv-card li.hoje { color: #5eead4; }
.aniv-card li.hoje a { color: #5eead4; font-weight: 700; }
/* Proventos de ações */
.acoes-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .acoes-layout { grid-template-columns: 1fr; } }
.acoes-resumos { display: grid; gap: 1rem; min-width: 0; }
.resumos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.sheet.acoes thead th { min-width: 0; }
.sheet.acoes thead th.c { text-align: center; }
.sheet.acoes thead th.sep { border-left: 1px solid var(--line); }
.sheet.acoes thead tr.sub th { top: 34px; text-align: center; }
.sheet.acoes th.vermelho, .sheet.acoes td.vermelho { color: #f87171; }
.sheet.acoes td { background: #f8fafc; color: var(--ink); }
.sheet.acoes tr.lin:nth-child(even) td { background: #eef2f7; }
.sheet.acoes tr.sum td { background: #cbd5e1; font-weight: 700; }
.sheet.acoes td.vermelho { color: #dc2626; }
.sheet.acoes td a { text-decoration: none; }
.sheet.acoes td a:hover { text-decoration: underline; }
table.resumo { width: 100%; border-collapse: collapse; font-size: .85rem; background: #f8fafc; color: var(--ink); border: 2px solid #0f172a; }
table.resumo caption { text-align: left; padding: .3rem .5rem; font-weight: 700; background: #fff; color: var(--ink); border: 2px solid #0f172a; border-bottom: 0; }
table.resumo th, table.resumo td { padding: .25rem .5rem; border: 1px solid #94a3b8; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.resumo thead th { text-align: center; background: #fff; }
table.resumo tbody th { text-align: center; background: #fff; }
table.resumo .jcp { background: #00b0f0; color: #0f172a; font-weight: 600; }
table.resumo .div { background: #ffa04d; color: #0f172a; font-weight: 600; }
table.resumo .tot { background: #c6e0b4; color: #0f172a; font-weight: 600; }
.barras-card { position: relative; margin: 0; background: linear-gradient(#3a3a3a, #1c1c1c); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.sheet.acoes th.sel, .sheet.acoes td.sel { width: 34px; min-width: 34px; text-align: center; padding-left: .3rem; padding-right: .3rem; }
.sheet.acoes td.sel input, .sheet.acoes th.sel input { width: 18px; min-height: 18px; height: 18px; }
.filtro-ativo { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.filtro-ativo label { margin: 0; }
.filtro-ativo select { width: auto; min-width: 9rem; }
tr[hidden] { display: none; }
.linha-form { margin-bottom: .9rem; }
.thumbs { display: flex; gap: .75rem; margin-top: .6rem; }
.thumb { display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 700; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.hint { color: var(--muted); font-size: .8rem; margin: .5rem 0; }

/* ---------- árvore de cadastro ---------- */
.nome-item { background: none; border: 0; padding: 0; margin: 0; color: var(--text); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
.nome-item:hover { text-decoration: underline; }
.nome-item.cat { font-weight: 700; font-size: 1rem; }
.nome-item.sub { font-weight: 700; }
.atalhos { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.irpf-ano { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; font-size: 1.1rem; }
.irpf-ano a, .irpf-ano .desab { font-size: 1.6rem; line-height: 1; text-decoration: none; color: var(--text); }
.irpf-ano .desab { opacity: .3; }
.irpf-ano select { width: auto; min-width: 6rem; font-weight: 700; }
.irpf-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
@media (min-width: 1000px) { .irpf-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.irpf-layout > .card { margin: 0; min-width: 0; }
table.irpf-benf .r, table.irpf-benf th.r { text-align: right; white-space: nowrap; }
table.irpf-benf tr.subtotal td { font-weight: 700; background: rgba(255, 255, 255, .06); }
table.irpf-benf tr.total td { font-weight: 700; background: rgba(20, 184, 166, .18); }
table.irpf-benf label.trocar { cursor: pointer; text-decoration: underline; }
/* indicadores financeiros */
.indic-wrap { max-height: calc(100dvh - 14rem); overflow: auto; }
.sheet.indic { width: auto; min-width: min(100%, 640px); }
.sheet.indic thead th { text-align: center; background: #1e3a5f; color: #fff; position: sticky; top: 0; z-index: 3; white-space: nowrap; }
.sheet.indic td { color: var(--ink); background: #f8fafc; padding-top: .2rem; padding-bottom: .2rem; line-height: 1.15; }
.sheet.indic tbody tr:nth-child(even) td { background: #eef2f7; }
.sheet.indic td.mes { text-align: center; font-weight: 700; background: #dbe4ef; white-space: nowrap; }
.sheet.indic tbody tr:nth-child(even) td.mes { background: #cfd9e6; }
.sheet.indic td.num { text-align: right; }
.sheet.indic tr[data-linha-atual] td { box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, .3); font-weight: 700; }
.sheet.indic tfoot { position: sticky; bottom: 0; z-index: 3; }
.sheet.indic tfoot td { background: #0f766e; color: #fff; font-weight: 700; border-top: 1px solid #14b8a6; }
.sheet.indic tfoot td.mes { background: #0b5a54; color: #fff; }
/* informações úteis: post-its */
/* a página ocupa a altura da tela: o quadro de cartões rola na vertical e a barra do bloco e da lixeira fica fixa embaixo */
.content:has(.info-pagina) { padding-bottom: .6rem; }
.info-pagina { display: flex; flex-direction: column; height: calc(100dvh - 4.6rem); min-height: 26rem; }
@media (min-width: 900px) { .info-pagina { height: calc(100dvh - 5.2rem); } }
.info-quadro { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px dashed var(--line); border-radius: var(--radius); }
.info-folga { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }
.postit { position: absolute; width: 220px; min-height: 140px; padding: .6rem .7rem 1.6rem; background: #fef08a; color: #3b3200; border-radius: 2px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, .45); cursor: grab; user-select: none; touch-action: auto; }
.postit.arrastando { cursor: grabbing; box-shadow: 4px 10px 22px rgba(0, 0, 0, .6); }
.postit h3 { margin: 0 1.4rem .4rem 0; font-size: 1rem; font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; touch-action: none; }
.postit-txt { font-size: .9rem; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.postit-data { position: absolute; right: .6rem; bottom: .35rem; font-size: .68rem; opacity: .75; }
/* janela de novo cartão: folha de um bloco de post-it */
.dialogo.bloco { max-width: 380px; padding: 0; background: transparent; border: 0; overflow: visible; }
.bloco-folha { position: relative; padding: 0 1.1rem 1rem; background: linear-gradient(#fef08a, #fde968); color: #3b3200; border-radius: 2px;
  box-shadow: 0 1px 0 #e6d24a, 0 3px 0 #f4df5c, 0 5px 0 #e6d24a, 0 6px 14px rgba(0, 0, 0, .55); transform: rotate(-1deg); }
.bloco-topo { height: 1.7rem; margin: 0 -1.1rem .6rem; padding: 0 1.1rem; display: flex; align-items: center; background: rgba(0, 0, 0, .07); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.bloco-folha .campo { display: flex; align-items: baseline; gap: .4rem; margin: 0 0 .5rem; color: #3b3200; }
.bloco-folha .campo > span { font-size: .85rem; font-weight: 700; flex: none; }
.bloco-folha input, .bloco-folha textarea { flex: 1; min-width: 0; background: transparent; color: #3b3200; border: 0; border-bottom: 1px dotted rgba(59, 50, 0, .45); border-radius: 0; padding: .15rem .2rem; font: inherit; outline: 0; box-shadow: none; }
.bloco-folha input:focus, .bloco-folha textarea:focus { border-bottom-color: #3b3200; }
.bloco-folha .campo.area { align-items: flex-start; }
.bloco-folha textarea { resize: none; line-height: 1.55rem; padding: 0 .2rem; background-image: repeating-linear-gradient(transparent, transparent calc(1.55rem - 1px), rgba(59, 50, 0, .22) calc(1.55rem - 1px), rgba(59, 50, 0, .22) 1.55rem); background-attachment: local; border-bottom: 0; }
.dialogo.bloco form > .actions { margin-top: 1rem; justify-content: center; }
.dialogo.bloco #infoExcluir { text-align: center; }
/* bloco permanente de novo cartão e lixeira, fixos na parte de baixo da tela (em telas largas) */
.info-barra { flex: none; display: flex; align-items: flex-end; gap: 1.2rem; margin-top: .6rem; padding: .6rem 1rem 1rem; background: rgba(8, 12, 22, .88); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(4px); }
/* o bloco tem o tamanho de um cartão (220 px); o botão Colar fica dentro da folha, inclinado com ela, com metade do tamanho de um botão padrão */
.bloco-inline { width: 220px; flex: none; }
.bloco-inline .bloco-folha { height: 140px; display: flex; flex-direction: column; padding: 0 .7rem .6rem; }
.bloco-inline .campo.area { flex: 1; min-height: 0; margin-bottom: 0; }
.bloco-inline .campo.area textarea { height: 100%; }
.bloco-inline .bloco-topo { height: 1.2rem; margin: 0 -.7rem .4rem; padding: 0 .7rem; font-size: .6rem; }
.bloco-inline .campo { margin-bottom: .3rem; }
.bloco-inline input, .bloco-inline textarea { min-height: 0; }
.bloco-inline input { height: 1.5rem; }
.bloco-inline .campo > span { font-size: .78rem; }
.bloco-inline textarea { line-height: 1.3rem; background-image: repeating-linear-gradient(transparent, transparent calc(1.3rem - 1px), rgba(59, 50, 0, .22) calc(1.3rem - 1px), rgba(59, 50, 0, .22) 1.3rem); }
/* Colar no limite inferior da folha (metade para fora), liberando espaço para escrever */
.bloco-folha .btn.colar { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); z-index: 2; margin: 0; min-width: 55px; min-height: 18px; padding: .1rem .6rem; font-size: .7rem; line-height: 1.2; border-radius: 4px; }
/* ponta inferior direita da folha de cima levemente levantada (pequena área) */
.bloco-folha::after { content: ''; position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; border-top-left-radius: 4px;
  background: linear-gradient(to top left, #fde968 50%, #fff8b8 50%, #e2cf4a 100%); box-shadow: -2px -2px 4px rgba(0, 0, 0, .28); pointer-events: none; }
.info-lado { display: flex; align-items: flex-end; gap: .8rem; }
.info-botoes { display: flex; flex-direction: column; gap: .5rem; }
/* incineração: o cartão vira carvão de baixo para cima (linha de brasa) enquanto chamas e fumaça (canvas, no JS) sobem dele */
@property --q { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.lixeira { position: relative; }
.postit-voo-lixo .carvao, .voo-lixo-gen .carvao { position: absolute; inset: 0; pointer-events: none; border-radius: 2px; --q: 0%;
  background: linear-gradient(to top, #070605 0%, #0d0a07 calc(var(--q) - 9%), #3a1706 calc(var(--q) - 4%), #c2410c calc(var(--q) - 1.5%), #ff9a24 var(--q), rgba(255, 190, 70, .55) calc(var(--q) + 1.5%), rgba(255, 170, 40, 0) calc(var(--q) + 5%)); }
@keyframes brasa { 0%, 100% { box-shadow: none; } 15%, 80% { box-shadow: 0 0 22px rgba(251, 146, 60, .75), inset 0 0 12px rgba(251, 146, 60, .45); } }
.lixeira.queimando { border-color: #fb923c; color: #fb923c; animation: brasa 1.2s ease-out; }
.lixeira.queimando .lix-tampa { transform: rotate(-24deg) translateY(-3px); }
.lixeira { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; width: 75px; min-height: 65px; padding: .3rem; border: 2px dashed var(--line); border-radius: var(--radius); color: #94a3b8; font-size: .55rem; line-height: 1.1; text-align: center; transition: border-color .15s, color .15s, background .15s, transform .15s; }
.lixeira svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; transform-origin: 50% 80%; }
.lixeira .lix-tampa { transform-origin: 8px 14px; transition: transform .2s; }
.lixeira.ativa { border-color: #f87171; color: #f87171; }
.lixeira.sobre { background: rgba(248, 113, 113, .16); border-style: solid; transform: scale(1.06); }
.lixeira.sobre .lix-tampa, .lixeira.tampa .lix-tampa { transform: rotate(-24deg) translateY(-3px); }
.postit-voo-lixo { width: 220px; }
/* a folha voando até o quadro */
.postit-voo { position: fixed; z-index: 3000; padding: 1.7rem 1.1rem 1rem; background: #fef08a; color: #3b3200; border-radius: 2px; overflow: hidden; pointer-events: none; will-change: transform; box-shadow: 2px 4px 10px rgba(0, 0, 0, .4); }
.postit-voo h3 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 700; text-decoration: underline; }
.postit-voo .postit-txt { font-size: .9rem; line-height: 1.3; white-space: pre-wrap; }
@keyframes assentar { 0% { transform: scale(1.07) rotate(2deg); box-shadow: 8px 18px 26px rgba(0, 0, 0, .5); } 60% { transform: scale(.98); } 100% { transform: none; box-shadow: 2px 4px 10px rgba(0, 0, 0, .45); } }
.postit.colando { animation: assentar .32s ease-out; }
@media (prefers-reduced-motion: reduce) { .postit.colando { animation: none; } }
.postit-edit { position: absolute; top: .25rem; right: .3rem; background: none; border: 0; padding: 0 .2rem; min-height: 0; min-width: 0; color: #3b3200; font-size: .95rem; cursor: pointer; opacity: .6; }
.postit-edit:hover { opacity: 1; }
/* autofinanciamento */
.sheet.afin thead th { text-align: center; }
.sheet.afin thead th.g { font-size: 1rem; }
.sheet.afin thead th.g0 { background: #3f8f46; color: #fff; }
.sheet.afin thead th.g1 { background: #3b7fc4; color: #fff; }
.sheet.afin thead tr.sub th { top: 34px; min-width: 84px; font-weight: 600; }
.sheet.afin thead tr.sub th.g0 { background: #cfe8d1; color: #14351a; }
.sheet.afin thead tr.sub th.g1 { background: #cfe0f4; color: #12304f; }
.sheet.afin thead th.tot { background: #475569; color: #fff; }
.sheet.afin td { color: var(--ink); background: #f8fafc; }
.sheet.afin tbody tr:nth-child(even) td { background: #eef2f7; }
.sheet.afin td.mes { text-align: center; font-weight: 700; background: #dbe4ef; white-space: nowrap; }
.sheet.afin tbody tr:nth-child(even) td.mes { background: #cfd9e6; }
.sheet.afin td.selic { text-align: center; font-weight: 600; }
.sheet.afin td.selic.herdada { font-style: italic; color: #475569; font-weight: 500; }
.sheet.afin td.amort { font-style: italic; }
.sheet.afin td.tot, .sheet.afin tbody tr:nth-child(even) td.tot { font-weight: 700; background: #cbd5e1; }
.sheet.afin td.neg { color: #dc2626; }
.sheet.afin tr[data-linha-atual] td { box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, .3); font-weight: 700; }
.sheet.afin td.edit:hover { outline: 2px solid #14b8a6; outline-offset: -2px; cursor: pointer; }
.sheet.afin tbody td { padding-top: .17rem; padding-bottom: .17rem; line-height: 1.15; }
.sheet.afin .acoes-g { margin-left: .5rem; white-space: nowrap; }
.sheet.afin .acoes-g form { display: inline; margin: 0; }
.sheet.afin .mini { background: rgba(255, 255, 255, .2); color: inherit; border: 0; border-radius: 4px; min-height: 0; min-width: 0; width: 22px; height: 22px; padding: 0; cursor: pointer; font-size: .8rem; }
.sheet.afin .mini:hover { background: rgba(255, 255, 255, .4); }
.afin-resp { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.afin-resp label.sempre { margin: 0; min-width: 7rem; display: flex; align-items: center; gap: .3rem; }
.afin-resp input[data-valor] { flex: 1 1 0; min-width: 0; }
.afin-resp input[data-perc] { flex: 0 0 5.5rem; min-width: 0; }
/* planner */
.plan-mes { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: .6rem; }
.plan-mes h1 { margin: 0; font-size: 1.4rem; text-transform: capitalize; min-width: 10rem; text-align: center; }
.plan-mes a { font-size: 2rem; line-height: 1; text-decoration: none; color: var(--text); padding: 0 .4rem; }
.plan-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.plan-cab { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted, #94a3b8); padding: .2rem 0; }
.plan-card { min-height: 5.5rem; padding: .25rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-width: 0; overflow: hidden; }
.plan-card:hover { border-color: #14b8a6; }
.plan-card.hoje { border-color: #14b8a6; box-shadow: inset 0 0 0 1px #14b8a6; }
.plan-dia { font-weight: 700; font-size: .85rem; margin-bottom: .15rem; }
.plan-item { display: flex; align-items: center; gap: 2px; font-size: .68rem; line-height: 1.2; margin-top: 2px; background: rgba(20, 184, 166, .16); border-radius: 4px; padding: 1px 2px; min-width: 0; }
.plan-item.aniv { background: rgba(244, 114, 182, .2); }
.plan-item.feito .plan-txt { text-decoration: line-through; opacity: .6; }
.plan-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 0; margin: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.plan-item.aniv .plan-txt { cursor: default; display: block; }
.plan-check { margin: 0; flex: none; }
.chk { width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 4px; border: 1px solid #64748b; background: transparent; color: transparent; font-size: .7rem; line-height: 1; cursor: pointer; }
.chk.on { background: #14b8a6; border-color: #14b8a6; color: #04201c; }
.chk:hover { border-color: #14b8a6; }
@media (max-width: 700px) {
  .plan-card { min-height: 4.2rem; padding: 2px; }
  .plan-item { font-size: .6rem; }
  .plan-item b { display: none; }
  .plan-dia { font-size: .75rem; }
}
.plan-tit { margin: 1.2rem 0 .5rem; font-size: 1.1rem; }
.plan-tarefas { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.plan-tarefas .card { margin: 0; padding: .6rem; }
.plan-tarefas h3 { margin: 0 0 .4rem; font-size: .95rem; }
.plan-tarefas ul { list-style: none; margin: 0; padding: 0; }
.plan-tarefas li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .15rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.plan-tarefas li form { margin: 0; }
.tarefa-txt { flex: 1; min-width: 0; background: none; border: 0; padding: 0; margin: 0; color: var(--text); font: inherit; text-align: left; cursor: text; overflow-wrap: anywhere; }
.tarefa-txt:hover { text-decoration: underline dotted; }
.plan-tarefas li form.tarefa-edita { flex: 1; min-width: 0; }
.plan-tarefas li form.tarefa-edita input { min-height: 0; padding: .15rem .4rem; font-size: .9rem; }
.plan-tarefas .x { background: none; border: 0; color: #f87171; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.plan-tarefas .nova-tarefa { margin-top: .4rem; }
.plan-tarefas .nova-tarefa input { min-height: 0; padding: .3rem .5rem; font-size: .9rem; }
.plan-pend { list-style: none; margin: 0; padding: 0; }
.plan-pend li { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.plan-pend .data { color: #fbbf24; font-weight: 700; flex: none; }
.plan-pend form { margin: 0; }
.plan-repetir { display: flex; align-items: center; gap: .8rem; }
.plan-repetir label.sempre { display: flex; align-items: center; gap: .3rem; margin: 0; white-space: nowrap; }
.cfg-duas { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.cfg-duas > .card { margin: 0; min-width: 0; }
@media (min-width: 800px) { .cfg-duas { grid-template-columns: minmax(0, 24rem) minmax(0, 24rem); } }
.tree ul { list-style: none; margin: 0; padding-left: 1.2rem; }
.tree > ul { padding-left: 0; }
.tree li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .3rem 0; }
/* Configurações: linhas a 60% da altura, mesma fonte */
table.list.cfg th, table.list.cfg td { padding-top: .2rem; padding-bottom: .2rem; line-height: 1.15; }
table.list.cfg .btn.small { min-height: 22px; padding-top: .1rem; padding-bottom: .1rem; }
.cfg-duas .tree li { padding: .1rem 0; gap: .3rem; }
.cfg-duas .tree input[type="checkbox"] { min-height: 0; height: 16px; width: 16px; margin: 0; }
.cfg-duas .tree .nome-item { line-height: 1.15; }
table.list.cfg td:last-child { white-space: nowrap; }
table.list.cfg form.inline { display: inline-block; margin-left: .3rem; }
.tree li > ul { flex-basis: 100%; }
.tree .cat { font-weight: 700; }
.tree .row { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; width: 100%; }
.tree label { margin: 0; color: var(--text); font-size: .95rem; }
.tree .row label { display: flex; gap: .5rem; align-items: center; }
@media (max-width: 600px) {
  table.sheet { font-size: .78rem; }
  .sheet .name { min-width: 130px; max-width: 150px; }
  .sheet thead th { min-width: 78px; }
}

.sheet.compacta th, .sheet.compacta td { padding-left: .3rem; padding-right: .3rem; }
.sheet.compacta td.num, .sheet.compacta thead th:not(.name) { font-size: .74rem; }
/* cartões, patrimônio e empréstimo: linhas com 60% da altura, mesma fonte */
.sheet.cartoes tbody td, .sheet.patr tbody td, .sheet.emp tbody td, .sheet.acoes tbody td { padding-top: .17rem; padding-bottom: .17rem; line-height: 1.15; }
.sheet tr.child td { padding-top: .17rem; padding-bottom: .17rem; line-height: 1.15; } /* orçamento: só as linhas de contas */
/* negociações: cores do modelo da planilha */
.sheet.neg { font-size: .78rem; }
.sheet.neg th, .sheet.neg td { padding: .2rem .4rem; }
.sheet.neg thead th { height: 26px; min-width: 0; text-align: center; font-weight: 700; color: #fff; border-right: 1px solid rgba(255, 255, 255, .25); }
.sheet.neg thead tr:nth-child(2) th { top: 27px; }
.sheet.neg thead tr:nth-child(3) th { top: 54px; }
.sheet.neg thead th.grp-c { background: #e00000; font-size: 1rem; }
.sheet.neg thead th.grp-v { background: #3b4a67; font-size: 1rem; }
.sheet.neg thead th.grp-r { background: #6b7280; font-size: 1rem; }
.sheet.neg thead th.c { background: #fbe9dd; color: #1f2937; }
.sheet.neg thead th.v { background: #dbe4f3; color: #1f2937; }
.sheet.neg thead th.r { background: #4b5563; }
.sheet.neg td { color: var(--ink); white-space: nowrap; }
.sheet.neg td.c { background: #fff3ea; }
.sheet.neg td.v { background: #e8eefa; }
.sheet.neg td.r { background: #3b4a67; color: #fff; font-weight: 700; }
.sheet.neg td.r.neg { color: #fca5a5 !important; }
.sheet.neg td a { color: inherit; text-decoration: underline dotted; }
.sheet.neg td.papel { text-align: center; font-weight: 700; }
.sheet.neg td.tot { font-weight: 700; }
.sheet.neg tr.sum td { background: #cbd5e1; color: var(--ink); font-weight: 700; text-align: right; }
.sheet.neg td.vazio { text-align: center; background: #f8fafc; }
/* notas de corretagem: uma linha por arquivo, botões pequenos na mesma linha */
.btn.mini { min-width: 0; min-height: 26px; padding: .1rem .65rem; font-size: .78rem; }
.sheet.notas thead th { text-align: left; min-width: 0; }
.sheet.notas td { background: #f8fafc; color: var(--ink); white-space: nowrap; }
.sheet.notas tr:nth-child(even) td { background: #eef2f7; }
.sheet.notas td.tickers { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.sheet.notas td.num.neg { color: #dc2626; }
.sheet.notas .acoes-nota { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; }
.sheet.notas .acoes-nota form { margin: 0; }
/* carteira */
.sheet.carteira thead th { text-align: center; min-width: 0; border-right: 1px solid var(--line); }
.sheet.carteira td { background: #f8fafc; color: var(--ink); white-space: nowrap; }
.sheet.carteira tr:nth-child(even) td { background: #eef2f7; }
.sheet.carteira td.t { text-align: left; font-weight: 700; }
.sheet.carteira td.hist { color: #64748b; font-style: italic; }
.sheet.carteira tr.sum td { background: #cbd5e1; font-weight: 700; text-align: right; }
.sheet.carteira td.vazio { text-align: center; }
/* imposto de renda */
.nav-mes select { width: auto; min-width: 7rem; }
.btn.mini2 { min-width: 40px; padding: 0; }
.btn.desab { opacity: .35; pointer-events: none; }
.ir-layout { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
.ir-tabela { flex: 0 1 auto; min-width: 0; max-width: 100%; } /* a janela tem o tamanho da tabela */
.ir-resumo { flex: 0 0 auto; max-width: 100%; overflow-x: auto; }
.sheet.ir { font-size: .74rem; }
.sheet.ir th, .sheet.ir td { padding: .2rem .3rem; }
.sheet.ir thead th { text-align: center; min-width: 0; height: 26px; }
.sheet.ir thead tr:nth-child(2) th { top: 27px; }
.sheet.ir thead th.c { background: #fbe9dd; color: #1f2937; }
.sheet.ir thead th.v { background: #dbe4f3; color: #1f2937; }
.sheet.ir td { background: #fff; color: var(--ink); white-space: nowrap; }
.sheet.ir td.c { background: #fff3ea; }
.sheet.ir td.v { background: #e8eefa; }
.sheet.ir td.papel { font-weight: 700; text-align: center; }
.sheet.ir td.tot { font-weight: 700; }
.sheet.ir td.res { text-align: right; font-weight: 700; color: #fff; }
.sheet.ir td.res.positivo { background: #44546a; }
.sheet.ir td.res.negativo { background: #e00000; }
.sheet.ir td.res.dt { background: #d9d9d9; color: var(--ink); }
.sheet.ir tr.banner td { font-weight: 700; font-size: .95rem; padding: .3rem .5rem; }
.sheet.ir tr.banner.b0 td { background: #ffff00; color: #1f4e9c; }
.sheet.ir tr.banner.b1 td { background: #4472c4; color: #fff; }
.sheet.ir tr.sub td { background: #e2e8f0; font-weight: 700; text-align: right; }
.sheet.ir tr.sum td { background: #cbd5e1; font-weight: 700; text-align: right; }
.sheet.ir td.neg { color: #dc2626; }
.resumo-ir th, .resumo-ir td { white-space: nowrap; } /* cada célula em uma só linha */
.resumo-ir { width: auto; border-collapse: collapse; font-size: .74rem; background: #fff; color: var(--ink); border: 1px solid #94a3b8; }
.resumo-ir th { background: #b4c6e7; color: #1f2937; padding: .25rem .4rem; text-align: center; }
.resumo-ir td { padding: .2rem .35rem; border: 1px solid #cbd5e1; }
.resumo-ir th.mes-titulo { display: table-cell; padding: .2rem .5rem; }
.resumo-ir th.mes-titulo .nome { display: inline-block; width: auto; min-width: 5.6rem; min-height: 0; padding: .1rem .3rem; font-size: 1.25rem; font-weight: 700; color: #1f2937; background: rgba(255, 255, 255, .55); border: 1px solid #8ea5d4; border-radius: 6px; cursor: pointer; vertical-align: middle; }
.resumo-ir th.mes-titulo a, .resumo-ir th.mes-titulo .desab { display: inline-block; width: 1.8rem; font-size: 1.4rem; line-height: 1.4rem; color: #1f2937; text-decoration: none; border-radius: 6px; }
.resumo-ir th.mes-titulo a:hover { background: rgba(255, 255, 255, .55); }
.resumo-ir th.mes-titulo .desab { opacity: .3; }
.resumo-ir td.rot { font-weight: 700; }
.resumo-ir td.rot.ind { font-weight: 400; padding-left: .8rem; }
.resumo-ir td.n { text-align: right; white-space: nowrap; min-width: 9.5ch; font-variant-numeric: tabular-nums; }
.resumo-ir td.forte { font-weight: 700; }
.resumo-ir tr.secao td { background: #d9e2f3; font-weight: 700; }
.resumo-ir tr.total td, .resumo-ir tr.pago td { font-weight: 700; border-top: 2px solid #0f172a; }
.resumo-ir td.amarelo { background: #ffff00; padding: 0; }
.resumo-ir tr.pago td.amarelo { background: #ffe699; }
.resumo-ir td.amarelo form { margin: 0; }
.resumo-ir td.amarelo input { width: 1px; min-width: 100%; /* o campo acompanha a coluna, sem alargá-la */ min-height: 0; padding: .22rem .4rem; text-align: right; font: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 0; }
.resumo-ir td.amarelo input.manual { font-weight: 700; }
.resumo-ir .neg { color: #dc2626; }
.ir-selo { margin-top: .5rem; text-align: left; }
.resumo-ir tr.selo td { border: 0; background: transparent; padding: .35rem 0 0; }
.resumo-ir tr.selo img { display: block; width: 0; min-width: 100%; /* não alarga as colunas */ height: auto; border-radius: 4px; }
.resumo-ir tr.selo a img, .resumo-ir tr.selo label img { cursor: pointer; }
.ir-selo .trocar { text-decoration: underline; cursor: pointer; }
.duas-tabelas { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.duas-tabelas section { flex: 1 1 520px; min-width: 0; }
.duas-tabelas h3 { margin: 0 0 .5rem; font-size: 1rem; }
.sheet.divfii thead th { text-align: center; min-width: 0; }
.sheet.divfii td { background: #f8fafc; color: var(--ink); white-space: nowrap; }
.sheet.divfii tr:nth-child(even) td { background: #eef2f7; }
.sheet.divfii td.t { text-align: left; font-weight: 700; }
.sheet.divfii td.clicavel { cursor: pointer; text-decoration: underline; }
.sheet.divfii td.clicavel:hover { background: #cfe3ff; }
.sheet.divfii td.tot { font-weight: 700; }
.sheet.divfii tr.sum td { background: #cbd5e1; font-weight: 700; text-align: right; }
.sheet.divfii tr.sum td.t { text-align: left; }
.sheet.divfii td.vazio { text-align: center; }
.resumo-carteira { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: .8rem; }
.resumo-carteira div { display: flex; flex-direction: column; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.resumo-carteira span { color: var(--muted); font-size: .8rem; }
.resumo-carteira .neg { color: #f87171; }
.lista-notas { display: grid; gap: .5rem; max-width: 560px; }
.nota-linha { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); }
.sheet-box { position: relative; }
.seta { position: absolute; top: 7px; z-index: 6; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; font-size: .6rem; line-height: 1; color: #fff; background: rgba(15, 23, 42, .9); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.seta.dir { right: 18px; }
.seta:hover:not(:disabled) { background: var(--accent-2); }
.seta:disabled { opacity: .25; cursor: default; }
.sugestoes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.sugestoes.hidden { display: none; }
.sugestao { padding: .3rem .7rem; font: inherit; font-size: .85rem; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.sugestao:hover { border-color: var(--accent-2); }
.sheet thead th a { color: inherit; text-decoration: underline; }
.sheet thead th .up { margin-left: .25rem; padding: 0 .3rem; font-size: .75rem; line-height: 1.4; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; cursor: pointer; }
.sheet tr.base td, .sheet tr.base .name { font-style: italic; opacity: .72; }
.sheet td.num a { text-decoration: underline; }

/* descontos (valores negativos) sempre em vermelho */
.sheet td.neg, .sheet td.neg a { color: #dc2626 !important; }
.sheet tr.final td.neg { color: #fca5a5 !important; }

.grid > div { min-width: 0; }
.stepper { min-width: 0; }
.stepper input { min-width: 0; flex: 1 1 auto; padding-left: .45rem; padding-right: .3rem; }

.sheet tr.resp td, .sheet tr.resp .name, .sheet tr.resp a { font-weight: 700; }

/* seleção de período do gráfico: o campo de mês precisa caber "setembro de 2026" por inteiro */
.periodo .grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.periodo .stepper input { min-width: 12.5rem; }

/* lista de compras: coluna com um terço da largura (tela cheia no celular) */
.compras-col { width: 33.333%; min-width: 340px; }
.compra-nova { display: grid; grid-template-columns: 1.3fr 2.8rem 1fr auto; gap: .3rem; align-items: center; margin-bottom: .6rem; padding: .5rem; }
.compra-nova input { margin: 0; min-width: 0; width: 100%; padding-left: .4rem; padding-right: .4rem; font-size: .85rem; }
.compra-nova .btn { padding-left: .5rem; padding-right: .5rem; font-size: .85rem; }
.compra-lista { padding: .3rem .6rem; }
.compra-linha { display: grid; grid-template-columns: auto 2fr 3.6rem 1.4fr auto; gap: .4rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.compra-linha:last-child { border-bottom: 0; }
.compra-linha form { margin: 0; }
.compra-marca { width: 1.4rem; height: 1.4rem; min-height: 0; margin: 0; accent-color: #3b82f6; }
.compra-linha .c-item { overflow-wrap: anywhere; }
.compra-linha .c-qtd, .compra-linha .c-local { color: var(--muted, #94a3b8); overflow-wrap: anywhere; }
.compra-linha .x { background: none; border: 0; color: #f87171; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.compras-dlg { max-width: 420px; max-height: 90vh; overflow: auto; }
.compras-txt h3 { margin: .7rem 0 .2rem; font-size: 1rem; color: #93c5fd; }
.compras-txt ul { margin: 0; padding-left: 1.2rem; font-size: 1.05rem; }
.compras-txt li { padding: .15rem 0; }
@media (max-width: 640px) {
  .compras-col { width: 100%; min-width: 0; }
  .compra-linha { grid-template-columns: auto 1fr auto; grid-template-areas: "m i x" ". q x" ". l x"; row-gap: 0; }
  .compra-linha .compra-marca { grid-area: m; } .compra-linha .c-item { grid-area: i; } .compra-linha form { grid-area: x; }
  .compra-linha .c-qtd { grid-area: q; font-size: .85rem; } .compra-linha .c-local { grid-area: l; font-size: .85rem; }
  .compra-linha .c-qtd:empty, .compra-linha .c-local:empty { display: none; }
  .compras-dlg { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; }
}

.compra-comprado { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .3rem 0; padding: .4rem .4rem .4rem .8rem; min-height: 48px; font-size: 1.1rem; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; }
.compra-tirar { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; font-size: 1.6rem; line-height: 1; color: #f87171; background: none; border: 0; cursor: pointer; }
.compra-botoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .5rem; }
.compra-botoes form { margin: 0; }
.compra-botoes .btn { width: 100%; padding-left: .3rem; padding-right: .3rem; font-size: .85rem; }

/* indicadores: título, botões e última atualização ficam fixos sob a barra superior */
.indic-topo { position: sticky; top: 3.7rem; z-index: 25; margin: 0 -1rem .6rem; padding: .5rem 1rem; background: #080e1a; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .indic-topo { margin: 0 -2rem .6rem; padding: .5rem 2rem; } }
.indic-topo .msg { margin: 0 0 .4rem; }
.sheet.indic .x-col { background: none; border: 0; color: #fca5a5; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 0 0 .3rem; min-height: 0; }

/* ---------- rolagem ----------
   Rolar uma tabela até o fim não passa a rolagem para a tela (os títulos e botões não somem). */
.sheet-wrap, .table-wrap, .info-quadro, .ir-resumo, .dialogo, .drawer { overscroll-behavior: contain; }
/* título e botões da tela ficam fixos sob a barra superior */
.content > .actions:first-child { position: sticky; top: 3.7rem; z-index: 25; margin-left: -1rem; margin-right: -1rem; padding: .5rem 1rem; background: #080e1a; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .content > .actions:first-child { margin-left: -2rem; margin-right: -2rem; padding: .5rem 2rem; } }
/* telas de uma tabela só: a tabela ocupa a altura que sobra e a tela não rola; só a tabela rola */
.content:has(> [data-fit], > .sheet-box > [data-fit]) { display: flex; flex-direction: column; height: calc(100dvh - 3.7rem); padding-bottom: 1.6rem; overflow-y: auto; }
.content:has(> [data-fit], > .sheet-box > [data-fit]) > * { flex: none; }
.content:has(> [data-fit], > .sheet-box > [data-fit]) > [data-fit], .content:has(> [data-fit], > .sheet-box > [data-fit]) > .sheet-box:has(> [data-fit]) { flex: 1 1 auto; min-height: 9rem; }
.content > .sheet-box:has(> [data-fit]) { display: flex; flex-direction: column; }
.content:has(> [data-fit], > .sheet-box > [data-fit]) [data-fit] { max-height: none; }
.sheet-box > [data-fit] { flex: 1 1 auto; min-height: 0; }
/* nessas telas a rolagem é do próprio .content, então o título gruda no topo dele */
.content:has(> [data-fit], > .sheet-box > [data-fit]) > .actions:first-child, .content:has(> [data-fit]) > .indic-topo { top: 0; }
.content:has(> [data-fit], > .sheet-box > [data-fit]) > .actions:first-child { margin-top: -1rem; padding-top: 1rem; }
@media (min-width: 900px) { .content:has(> [data-fit], > .sheet-box > [data-fit]) > .actions:first-child { margin-top: -1.5rem; padding-top: 1.5rem; } }

/* Acumulação */
.sheet.acum thead th { white-space: nowrap; min-width: 0; text-align: center; vertical-align: bottom; font-size: .74rem; line-height: 1.1; padding: .35rem .15rem; }
.sheet.acum thead th .vt { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: normal; max-height: 8.5rem; text-align: left; }
.sheet.acum thead th .x-col { display: block; margin: .2rem auto 0; padding: 0; }
.sheet.acum thead th form { display: block; }
.sheet.acum thead tr.sub th { top: 25px; }
.sheet.acum thead th.name { min-width: 76px; max-width: none; z-index: 5; }
.sheet.acum thead th.gj { background: #1e3a5f; color: #fff; }
.sheet.acum thead th.gf { background: #7c3f1d; color: #fff; }
.sheet.acum thead th.gt { background: #5b4b12; color: #fff; }
.sheet.acum thead th.gv { background: #1f5130; color: #fff; }
.sheet.acum td { color: var(--ink); padding: .25rem .35rem; font-size: .8rem; }
.sheet.acum td.name { background: #dbe4ef; text-align: center; font-weight: 700; min-width: 76px; }
.sheet.acum td.gj { background: #dbe9fb; }
.sheet.acum td.gf { background: #fde4d0; }
.sheet.acum td.gt { background: #fff2cc; }
.sheet.acum td.gv { background: #d9ead3; }
.sheet.acum td.tot { font-weight: 700; }
.sheet.acum tr.dezembro td { border-bottom: 2px solid #64748b; }
.sheet.acum tr[data-linha-atual] td { box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, .3); }
.sheet .x-col { background: none; border: 0; color: #fca5a5; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 0 0 .3rem; min-height: 0; }
.sheet.acum tr.mais td { background: #0b1220; text-align: left; padding: .6rem; position: sticky; left: 0; }

/* convite para ativar alertas no celular */
.push-convite { position: fixed; left: .75rem; right: .75rem; bottom: .9rem; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; background: #0f766e; border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.push-convite a { color: #fff; font-weight: 600; text-decoration: none; }
.push-convite button { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; min-height: 0; padding: 0 .3rem; }
.tree .x-conta { background: none; border: 0; color: #f87171; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .35rem; min-height: 0; }
.tree .x-conta:hover { color: #fca5a5; }
.thumb-item { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; margin-right: .5rem; position: relative; }
.thumb-item.removido .thumb { opacity: .35; }
.thumb-item .remover { display: flex; align-items: center; gap: .25rem; font-size: .75rem; margin: 0; color: var(--muted, #94a3b8); }
.thumb-item .remover input { min-height: 0; width: auto; margin: 0; }
.thumb-item .tirar { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: #b91c1c; color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }

/* ---------- calculadora flutuante ---------- */
.calc-abre { margin-left: auto; display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.calc-abre:hover, .calc-abre.ativo { color: #5eead4; border-color: #0f766e; background: rgba(20, 184, 166, .14); }
.calc {
  position: relative; zoom: .7; width: min(300px, calc((100vw - 1.8rem) / .7)); padding: .7rem .7rem .6rem;
  color: #e5edf7; background: linear-gradient(160deg, rgba(22, 33, 56, .96), rgba(9, 15, 29, .97)); border: 1px solid rgba(148, 163, 184, .22); border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(10px); outline: none;
}
/* posição na tela: o contêiner é arrastável; o painel interno é que tem o zoom */
.calc-pos { position: fixed; right: .9rem; bottom: .9rem; z-index: 60; animation: calc-entra .18s ease-out; }
.calc-pos.solta { right: auto; bottom: auto; }
/* ao fechar, a janela encolhe em direção ao botão da calculadora e some */
.calc-pos.fechando { pointer-events: none; animation: calc-sai .22s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes calc-sai { to { opacity: 0; transform: scale(.15); } }
.calc-topo { cursor: grab; touch-action: none; user-select: none; }
.calc-pos.arrastando .calc-topo { cursor: grabbing; }
@keyframes calc-entra { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.calc-topo { display: flex; align-items: center; justify-content: space-between; padding: 0 .2rem .4rem; }
.calc-titulo { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.calc .calc-x { width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(148, 163, 184, .14); color: #e2e8f0; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.calc .calc-x:hover { background: #b91c1c; color: #fff; }
.calc-tela { margin: 0 0 .6rem; padding: .6rem .8rem; text-align: right; background: rgba(2, 6, 18, .7); border: 1px solid rgba(148, 163, 184, .14); border-radius: 14px; overflow: hidden; }
.calc-expr { min-height: 1.3rem; font-size: .95rem; color: #94a3b8; overflow-wrap: anywhere; }
.calc-res { margin-top: .1rem; font-size: 2rem; font-weight: 600; letter-spacing: .01em; color: #f8fafc; overflow-x: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.calc .calc-k { min-height: 46px; min-width: 0; padding: 0; font: inherit; font-size: 1.15rem; color: #f1f5f9; background: rgba(148, 163, 184, .13); border: 0; border-radius: 14px; cursor: pointer; transition: background .12s, transform .06s; }
.calc .calc-k:hover { background: rgba(148, 163, 184, .24); }
.calc .calc-k:active { transform: scale(.95); }
.calc .calc-k-f { background: rgba(148, 163, 184, .07); color: #cbd5e1; }
.calc .calc-k-o { background: rgba(20, 184, 166, .2); color: #5eead4; font-weight: 600; }
.calc .calc-k-o:hover { background: rgba(20, 184, 166, .34); }
.calc .calc-k-c { background: rgba(244, 63, 94, .18); color: #fda4af; font-weight: 600; }
.calc .calc-k-zero { grid-column: span 2; }
.calc .calc-k-eq { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; font-weight: 700; }
.calc .calc-k-eq:hover { filter: brightness(1.1); }
.calc .calc-transp { width: 100%; min-height: 40px; margin-top: .5rem; padding: 0; font: inherit; font-size: .9rem; color: #5eead4; background: transparent; border: 1px dashed rgba(94, 234, 212, .45); border-radius: 12px; cursor: pointer; }
.calc .calc-transp:hover { background: rgba(20, 184, 166, .14); }
.calc-aviso { min-height: 1.1rem; margin-top: .3rem; font-size: .78rem; text-align: center; color: #5eead4; }
@media (max-width: 480px) { .calc { right: .5rem; bottom: .5rem; } .calc-res { font-size: 1.7rem; } }

/* patrimônio: excluir item */
.item-linha { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.item-linha .check { flex: 1; min-width: 0; }
.x-item { background: none; border: 0; color: #f87171; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 .4rem; min-height: 0; }
.x-item:hover { color: #fca5a5; }

/* lixeira da barra superior (lançamento e documentos), à esquerda da calculadora */
.lixeira-topo { margin-left: auto; }
.lixeira-topo + .calc-abre { margin-left: .5rem; }
.lixeira-topo:hover { color: #fca5a5; border-color: #b91c1c; background: rgba(248, 113, 113, .14); }
.lixeira-topo.queimando { color: #fb923c; border-color: #fb923c; animation: brasa 1.2s ease-out; }
.lixeira-topo.queimando .lix-tampa-topo { transform: rotate(-24deg) translateY(-3px); transform-origin: 8px 7px; }
.lixeira-topo .lix-tampa-topo { transition: transform .2s; }
.voo-lixo-gen { box-shadow: 0 10px 40px rgba(0, 0, 0, .5); border-radius: var(--radius); }

/* cores dos cartões de crédito: tom forte no cartão e no total, médio no usuário, claro nos lançamentos */
.cc-amarelo { --cc1: #fbbf24; --cc2: #fde68a; --cc3: #fef9c3; }
.cc-azul { --cc1: #60a5fa; --cc2: #bfdbfe; --cc3: #e0efff; }
.cc-verde { --cc1: #4ade80; --cc2: #bbf7d0; --cc3: #e3fbec; }
.cc-laranja { --cc1: #fb923c; --cc2: #fed7aa; --cc3: #ffefdc; }
.cc-vermelho { --cc1: #f87171; --cc2: #fecaca; --cc3: #fee9e9; }
.cc-roxo { --cc1: #a78bfa; --cc2: #ddd6fe; --cc3: #f1edff; }
.cc-rosa { --cc1: #f472b6; --cc2: #fbcfe8; --cc3: #fdeaf4; }
.cc-cinza { --cc1: #94a3b8; --cc2: #cbd5e1; --cc3: #eef2f7; }
.sheet tr.cc.head td, .sheet tr.cc.head .name, .sheet tr.cc.sum td, .sheet tr.cc.sum .name { background: var(--cc1); color: #0f172a; filter: none; }
.sheet tr.cc.resp td, .sheet tr.cc.resp .name { background: var(--cc2); color: #0f172a; }
.sheet tr.cc.linha td, .sheet tr.cc.linha .name { background: var(--cc3); color: #0f172a; }
.cores { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .2rem 0 .4rem; }
.cor-op { display: inline-flex; align-items: center; gap: .35rem; margin: 0; cursor: pointer; font-size: .9rem; }
.cor-op input { width: auto; min-height: 0; margin: 0; }
.cor-bola { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--cc1); border: 2px solid var(--cc2); vertical-align: middle; }

/* caixa "exclusivo DEV/USE001" (só para DEV e USE001) */
.excl { display: inline-flex; align-items: center; gap: .25rem; margin: 0 0 0 .6rem; font-size: .7rem; color: #fbbf24; cursor: pointer; white-space: nowrap; }
.excl input { width: auto; min-height: 0; margin: 0; }

/* ordem dos cartões: arrastar pela alça */
.alca-ordem { width: 1.6rem; text-align: center; color: #94a3b8; cursor: grab; touch-action: none; user-select: none; letter-spacing: -2px; }
tr.arrastando { opacity: .85; background: rgba(20, 184, 166, .16); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); position: relative; z-index: 2; }
tr.arrastando .alca-ordem { cursor: grabbing; }

/* Exclusivo: coluna fixa à direita para alinhar as caixas; fonte 25% menor */
.tree .row .excl { margin-left: auto; width: 5.8rem; flex: none; font-size: .604rem; }
.tree .row .excl input { transform: scale(1.3); }

/* Sucessão: cabeçalhos na horizontal; estimativas em itálico */
.sheet.acum.suc thead th { white-space: normal; hyphens: auto; font-size: .7rem; padding: .3rem .2rem; }
.sheet.acum.suc thead th .vt { writing-mode: horizontal-tb; transform: none; max-height: none; text-align: center; white-space: normal; }
.sheet.acum.suc thead tr:first-child th { height: 24px; box-sizing: border-box; line-height: 1.1; padding-top: 0; padding-bottom: 0; vertical-align: middle; }
.sheet.acum.suc thead tr.sub th { top: 23px; min-width: 0; } /* 1px de sobreposição: sem fresta entre as duas linhas */
.sheet.acum.suc td { padding: .22rem .25rem; font-size: .76rem; white-space: nowrap; }
.sheet.acum td.est { font-style: italic; }

/* Números Úteis */
.num-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .6rem; }
.num-barra .btn.small { min-width: 0; padding: 0 .8rem; }
.num-barra .btn.ligado { background: rgba(20, 184, 166, .25); border-color: #14b8a6; color: #5eead4; }
.num-barra .lixeira { margin-left: auto; }
.num-wrap { max-height: calc(100dvh - 15rem); }
table.numeros { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; min-width: 84rem; font-size: .85rem; background: #fff; color: var(--ink); }
table.numeros col.c-tit { width: 11rem; } table.numeros col.c-nome { width: 8.5rem; } table.numeros col.c-obs { width: 16rem; }
table.numeros thead th { position: sticky; top: 0; z-index: 2; background: #1e3a5f; color: #fff; font-weight: 700; text-align: center; padding: .4rem .3rem; border: 1px solid #0f2744; }
table.numeros td.cel { height: 1.4rem; line-height: 1.2; padding: .15rem .4rem; vertical-align: top; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; overflow-wrap: anywhere; outline: 0; }
table.numeros td.cel:focus { box-shadow: inset 0 0 0 2px var(--accent-2); }
table.numeros td.tit { font-weight: 700; background: #eef2f7; cursor: grab; }
table.numeros td.tit:focus { cursor: text; }
table.numeros td.sel { background: #fde68a; box-shadow: inset 0 0 0 2px #d97706; }
table.numeros tr.fantasma { opacity: .35; }
table.arrastando-linha td.cel { height: auto; }
table.numeros td.cel[data-a="c"] { text-align: center; }
table.numeros td.cel[data-a="r"] { text-align: right; }
table.numeros td.coberta { display: none; }
.num-barra .btn.icone svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num-barra .btn:disabled { opacity: .4; cursor: default; }
.grupo-bt { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.grupo-bt .btn { border: 0; border-radius: 0; min-width: 0; padding: 0 .55rem; }
.grupo-bt .btn + .btn { border-left: 1px solid var(--line); }
.num-barra .btn.icone svg line { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
table.numeros thead th[contenteditable] { cursor: text; outline: 0; }
table.numeros thead th[contenteditable]:focus { box-shadow: inset 0 0 0 2px #5eead4; }
table.numeros.selecionando td { user-select: none; -webkit-user-select: none; }
table.numeros tr.linha-sel td.cel { background: #fde68a; }
table.numeros tr.linha-sel td.tit { box-shadow: inset 3px 0 0 #d97706; }
.num-contador { position: fixed; z-index: 3001; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #dc2626; color: #fff; font-size: .8rem; font-weight: 700; line-height: 22px; text-align: center; pointer-events: none; }

/* Plano de Investimentos */
.plano-titulo { margin: 1.2rem 0 .5rem; font-size: 1.1rem; }
.plano-wrap { max-height: none; }
.sheet.plano thead th { min-width: 0; text-align: center; padding: .4rem .6rem; }
.sheet.plano thead th.sep { border-left: 1px solid var(--line); }
.sheet.plano thead th.proj, .sheet.plano td.proj { text-align: left; min-width: 14rem; }
.sheet.plano thead tr.sub th { top: 34px; font-weight: 600; }
.sheet.plano td { color: var(--ink); background: #eef2f7; }
.sheet.plano td.num { text-align: right; }
.sheet.plano td.edit { background: #fff; }
.sheet.plano td.terceiros { background: #fff2cc; cursor: pointer; font-weight: 600; }
.sheet.plano td.terceiros:hover { background: #fde68a; }
.sheet.plano td.chk, .sheet.plano thead th.chk { text-align: center; white-space: nowrap; }
.sheet.plano td.chk form { display: inline-block; margin: 0; vertical-align: middle; }
.sheet.plano tr.total td { font-weight: 700; background: #cbd5e1; border-top: 2px solid #475569; }
input.check-vermelho { accent-color: #dc2626; width: 20px; height: 20px; min-height: 0; cursor: pointer; vertical-align: middle; }

/* Acumulação: conjuntos de colunas recolhíveis (clique em 50% ou 100%) */
.sheet-wrap[data-edit-wrap]:not([data-abre-a]) .conj-a, .sheet-wrap[data-edit-wrap]:not([data-abre-b]) .conj-b { display: none; }
.sheet.acum thead th[data-conj] { cursor: pointer; }
.sheet.acum td.soma-a, .sheet.acum td.soma-b { cursor: pointer; }
.sheet.acum thead th[data-conj] .vt::after { content: ' ▸'; }
.sheet-wrap[data-abre-a] thead th.soma-a .vt::after, .sheet-wrap[data-abre-b] thead th.soma-b .vt::after { content: ' ▾'; }
.sheet.acum thead th.branca { cursor: pointer; min-width: 1.6rem; }
.sheet.acum thead th .nome-extra { cursor: pointer; }
.sheet.acum td.conj-a.edit:empty, .sheet.acum td.conj-b.edit:empty { background: #edf3fb; }

/* comentários de célula: marcador no canto e texto ao passar o mouse */
.sheet td.com { position: relative; }
.sheet td.com::after { content: ''; position: absolute; top: 0; right: 0; border-top: 8px solid #dc2626; border-left: 8px solid transparent; pointer-events: none; }
.nota-flutuante { position: fixed; z-index: 3200; max-width: 20rem; padding: .45rem .65rem; background: #fffbe0; color: #3b3200; border: 1px solid #d6c86a; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); font-size: .85rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.nota-flutuante[hidden] { display: none; }
.lixeira-topo.tampa .lix-tampa-topo { transform: rotate(-24deg) translateY(-3px); transform-origin: 8px 7px; }

/* Configurações: caixa "Minha conta" ao lado dos menus (3 colunas em telas largas) */
@media (min-width: 1250px) { .cfg-duas { grid-template-columns: repeat(3, minmax(0, 24rem)); } }
.conta-secao { margin: 0 0 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.conta-secao:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.conta-secao h3 { margin: 0 0 .5rem; font-size: 1rem; }

/* nome do aplicativo: PORCO + nome completo no cabeçalho (em tela estreita o nome completo desce para a linha de baixo) */
.brand { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand .brand-nome { color: var(--accent); font-size: 1.05rem; }
.brand .brand-sub { color: var(--text); font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) { .brand { flex-direction: row; align-items: baseline; gap: .3rem; } .brand .brand-sub { font-size: .85rem; } }
.login-sub { margin: -.6rem 0 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
