/* Estilos do inFinance (antes inline no layout). Ao mudar, o ?v= do link muda sozinho (filemtime). */
* { box-sizing: border-box; }
:root {
    --verde: #0f5132;
    --verde-escuro: #083b26;
    --verde-claro: #d9fbe8;
    --menta: #2fbf71;
    --texto: #263f35;
    --texto-suave: #74867d;
    --linha: #eef1f6;
    --fundo: #f6faf7;
    --sombra: 0 18px 40px rgba(20, 55, 38, .09);
}
body { margin: 0; font-family: Arial, sans-serif; color: var(--texto); background: var(--fundo); }
a { color: inherit; text-decoration: none; transition: color .2s ease, transform .2s ease, opacity .2s ease; }
a:hover { color: var(--verde); }
.estrutura-app { min-height: 100vh; display: grid; grid-template-columns: 282px 1fr; }
.estrutura-visitante { display: block; }
.estrutura-visitante .cabecalho { min-height: 0; padding: 0; background: transparent; box-shadow: none; }
.estrutura-visitante .barra-topo { display: block; }
.estrutura-visitante .titulo-topo, .estrutura-visitante .acoes-topo { display: none; }
.estrutura-visitante .conteudo { min-height: 100vh; padding-top: 0; }
.barra-lateral {
    position: sticky; top: 0; height: 100vh; padding: 17px 14px; background: #fff;
    border-top-right-radius: 14px; box-shadow: var(--sombra); overflow-y: auto;
}
.marca-topo, .barra-abas, .gaveta, .gaveta-fundo { display: none; }
.submenu a.ativo { background: #f4fbf7; color: var(--verde); font-weight: 700; }
.submenu a.ativo .icone-submenu { color: var(--verde); }
.botao-instalar { display: none; }
.botao-instalar.visivel { display: inline-flex; }
.marca { height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 8px; font-weight: 700; color: #263f35; }
.marca-simbolo { width: 32px; height: 32px; display: block; flex: 0 0 auto; border-radius: 8px; box-shadow: 0 6px 14px rgba(15, 81, 50, .22); }
.marca-nome { font-size: 19px; font-weight: 400; letter-spacing: -.2px; color: var(--texto-suave); }
.marca-nome strong { font-weight: 700; color: var(--verde); }
.secao-menu { margin-top: 24px; }
.grupo-menu {
    min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-radius: 8px;
    color: #8b929d; font-size: 14px; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.grupo-menu.ativo { background: #f4fbf7; color: var(--verde); font-weight: 700; }
.grupo-menu:hover { transform: translateX(3px); background: #f4fbf7; }
.icone-menu { width: 19px; height: 19px; color: var(--verde); flex: 0 0 auto; }
.icone-menu svg { width: 100%; height: 100%; display: block; stroke: currentColor; }
.submenu { display: grid; gap: 6px; margin: 10px 0 0 14px; color: #6f7f77; font-size: 14px; }
.submenu a { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 8px; position: relative; }
.submenu a:hover { transform: translateX(3px); background: #f7fbf8; }
.icone-submenu { width: 17px; height: 17px; color: #a7bbb1; transition: color .2s ease, transform .2s ease; }
.icone-submenu svg { width: 100%; height: 100%; display: block; stroke: currentColor; }
.submenu a:hover .icone-submenu { color: var(--verde); transform: scale(1.08); }
.conteudo { min-width: 0; position: relative; }
.cabecalho {
    min-height: 300px; padding: 18px 36px 0; background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
    color: #fff; box-shadow: inset 0 -70px 80px rgba(255,255,255,.06);
}
.barra-topo { display: flex; align-items: center; gap: 18px; }
.titulo-topo { display: grid; gap: 4px; }
.titulo-topo span { color: rgba(255,255,255,.72); font-size: 13px; font-weight: 700; }
.titulo-topo strong { display: block; color: #fff; font-size: 22px; line-height: 1.2; }
.acoes-topo { margin-left: auto; display: flex; align-items: center; gap: 20px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--menta); box-shadow: 0 0 0 4px rgba(47, 191, 113, .14); }
.botao-sair { border: 0; background: transparent; color: #fff; font-weight: 700; cursor: pointer; transition: opacity .2s ease, transform .2s ease; }
.botao-sair:hover { opacity: .85; transform: translateY(-1px); }
.pagina { width: min(1558px, calc(100% - 72px)); margin: -200px auto 48px; position: relative; z-index: 1; animation: surgir .38s ease both; }
h1 { margin: 0 0 20px; font-size: 28px; color: #243d32; }
.pagina > h1, .pagina > .linha-topo h1 {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}
h2 { margin: 0 0 12px; font-size: 18px; color: #263f35; }
.grade { display: grid; gap: 24px; }
.grade-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grade-indicadores { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.cartao-indicador, .painel, table {
    background: #fff; border: 0; border-radius: 14px; box-shadow: var(--sombra);
    transition: transform .22s ease, box-shadow .22s ease;
}
.cartao-indicador:hover, .painel:hover { transform: translateY(-3px); box-shadow: 0 22px 46px rgba(20, 55, 38, .13); }
.cartao-indicador { min-height: 115px; padding: 19px 16px; display: flex; justify-content: space-between; gap: 16px; }
.indicador-rotulo { color: #5f6f68; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.indicador-valor { display: block; margin-top: 6px; font-size: 20px; font-weight: 800; color: #183d2c; }
.indicador-rodape { margin-top: 14px; color: #65756d; }
.positivo { color: #0aa35d; font-weight: 800; }
.negativo { color: #cf2e3a; font-weight: 800; }
.indicador-icone {
    width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
    color: #fff; font-size: 20px; background: linear-gradient(135deg, var(--verde), var(--menta));
    transition: transform .22s ease;
}
.cartao-indicador:hover .indicador-icone { transform: scale(1.08) rotate(3deg); }
.indicador-icone.verde { background: #1f8f5a; }
.painel { padding: 22px 24px; }
table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid var(--linha); text-align: left; }
th { color: #667085; font-size: 13px; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f8fcfa; }
label { display: block; margin-bottom: 6px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9dee8; border-radius: 7px; background: #fff; transition: box-shadow .2s ease, border-color .2s ease; }
form .campo { margin-bottom: 14px; }
button, .botao {
    display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px;
    border: 0; border-radius: 7px; background: var(--verde); color: #fff; cursor: pointer; font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
button:hover, .botao:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15, 81, 50, .22); color: #fff; }
.botao.secundario, button.secundario { background: #edf5f1; color: var(--verde); }
.acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acoes .botao, .acoes button, .cl-acoes .botao, .cl-acoes button { font-size: 14px; }
.linha-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sucesso { padding: 12px; margin-bottom: 16px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; color: #166534; }
.aviso-membros {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px;
    margin-bottom: 16px; border-radius: 10px; background: #fff7ed; color: #7c2d12; border: 1px solid #fed7aa;
}
.aviso-membros strong { display: block; margin-bottom: 3px; }
.aviso-membros span { color: #9a3412; }
/* Investimentos (RN-INV-001): fonte de mercado fora do ar e origem dos dados. */
.aviso-mercado { padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; background: #fff7ed; color: #7c2d12; border: 1px solid #fed7aa; }
.fonte-mercado { margin: 8px 0 0; font-size: 13px; color: var(--texto-suave); }
.busca-ativos { display: flex; gap: 8px; margin-bottom: 16px; }
.busca-ativos input { flex: 1; min-width: 0; }
.resultado-plano { display: grid; gap: 16px; margin-top: 16px; }
/* Carteira: blocos com respiro e um card por ativo (RN-INV-003). */
.carteira { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.carteira > *, .carteira .grade-indicadores, .carteira .lista-faturas { margin: 0; }
.titulo-secao { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.titulo-secao h2 { margin: 0; }
.posicao { gap: 16px; }
.posicao-titulo { min-width: 0; }
.posicao-titulo h2 { margin: 0; font-size: 20px; letter-spacing: .3px; }
.posicao-titulo h2 a { color: var(--verde); text-decoration: none; }
.posicao-nome { display: block; margin-top: 4px; overflow: hidden; color: var(--texto-suave); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.posicao .fatura-valor .texto-suave { font-size: 12px; }
.posicao .fatura-divisao { padding: 6px 14px; }
.posicao .linha-valor { padding: 9px 0; }
.posicao .linha-valor span { color: var(--texto-suave); }
.posicao .fatura-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.variacao { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; vertical-align: 1px; }
.variacao.positivo { background: #e7f8ef; color: #087a46; }
.variacao.negativo { background: #fdecee; color: #b4232f; }
.adicionar-ativo summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 700; color: var(--texto); }
.adicionar-ativo summary::-webkit-details-marker { display: none; }
.adicionar-ativo summary::after {
    content: "+"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: #edf5f1; color: var(--verde); font-size: 20px; line-height: 1; transition: transform .2s ease;
}
.adicionar-ativo[open] summary::after { transform: rotate(45deg); }
.adicionar-ativo[open] summary { margin-bottom: 18px; }
.adicionar-ativo .acoes { margin-top: 16px; }
.alerta-erros { padding: 14px 16px; margin-bottom: 16px; border: 1px solid #fecaca; border-radius: 10px; background: #fff7f7; color: #7f1d1d; }
.alerta-erros strong { display: block; margin-bottom: 4px; color: #7f1d1d; }
.alerta-erros p { margin: 0; color: #9f2c2c; }
.erro { color: #b91c1c; font-size: 13px; margin-top: 6px; font-weight: 700; }
.campo:has(.erro) input, .campo:has(.erro) select, .campo:has(.erro) textarea,
.campo.campo-com-erro input, .campo.campo-com-erro select, .campo.campo-com-erro textarea {
    border-color: #ef4444; background: #fffafa; box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}
.texto-suave { color: var(--texto-suave); }
.principal-dashboard { grid-template-columns: 1fr .78fr 1.28fr; align-items: start; }
.cartao-grafico { min-height: 0; }
.subtitulo-grafico { margin: 6px 0 16px; color: #65756d; font-weight: 700; font-size: 14px; }
.grafico {
    height: 280px; border-bottom: 1px dashed #dfe3ea; border-top: 1px dashed #dfe3ea;
    background: repeating-linear-gradient(to bottom, transparent 0 42px, #e7eee9 43px 44px);
    position: relative; overflow: hidden;
}
.grafico svg { width: 100%; height: 100%; display: block; }
.cartao-destaque {
    min-height: 404px; position: relative; overflow: hidden; border-radius: 14px; padding: 236px 48px 34px;
    color: #fff; background:
        radial-gradient(circle at 74% 22%, rgba(255,255,255,.7), transparent 16%),
        radial-gradient(circle at 78% 45%, rgba(217,251,232,.75), transparent 20%),
        linear-gradient(135deg, #083b26 0%, #0f5132 52%, #2fbf71 100%);
}
.cartao-destaque::before {
    content: ""; position: absolute; right: 40px; top: 36px; width: 250px; height: 310px; border-radius: 48% 52% 42% 58%;
    background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.04)); transform: rotate(-18deg);
    animation: flutuar 5s ease-in-out infinite;
}
.cartao-destaque::after {
    content: ""; position: absolute; right: -42px; bottom: -60px; width: 360px; height: 230px;
    border: 2px solid rgba(255,255,255,.18); border-radius: 50%; transform: rotate(-28deg);
}
.cartao-destaque h2, .cartao-destaque p { position: relative; z-index: 1; color: #fff; }
.cartao-destaque h2 { font-size: 22px; margin-bottom: 8px; }
.cartao-destaque p { max-width: 520px; line-height: 1.55; font-weight: 700; }
.resumo-barras { display: grid; gap: 9px; margin-top: 8px; }
.barra-resumo { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.barra-resumo span { color: var(--texto-suave); font-weight: 700; }
.barra-resumo strong { color: #183d2c; }
.barra-resumo div { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #edf5f1; overflow: hidden; }
.barra-resumo i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--verde), var(--menta)); transition: width .5s ease; }
.barra-resumo.destaque span, .barra-resumo.destaque strong { color: #0f5132; }
.barra-alerta { background: linear-gradient(90deg, #cf2e3a, #f97316) !important; }
.barra-alerta-suave { background: linear-gradient(90deg, #d97706, #fbbf24) !important; }
.barra-investimento { background: linear-gradient(90deg, #0369a1, #06b6d4) !important; }
.nota-resumo { margin: 12px 0 0; color: var(--texto-suave); font-size: 13px; line-height: 1.45; }
.lista-investimentos { display: grid; gap: 10px; }
.linha-investimento, .total-investimentos {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--linha);
}
.linha-investimento span, .total-investimentos span { color: var(--texto-suave); font-weight: 700; min-width: 0; }
.linha-investimento span { display: grid; gap: 4px; }
.linha-investimento span strong { color: #183d2c; white-space: normal; }
.linha-investimento span small { color: var(--texto-suave); font-size: 12px; font-weight: 700; }
.linha-investimento strong, .total-investimentos strong { color: #183d2c; white-space: nowrap; }
.total-investimentos { margin-top: 12px; padding: 14px 0 0; border-bottom: 0; border-top: 1px solid var(--linha); }
.total-investimentos span, .total-investimentos strong { color: #0369a1; }
.grade-cartoes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cartao-cartao { padding: 18px; border: 1px solid #edf3ef; border-radius: 10px; background: #fbfdfc; }
.cartao-cartao .linha-topo { margin-bottom: 12px; }
.cartao-cartao .linha-topo strong { color: var(--verde); font-size: 18px; }
.linha-cartao { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--linha); }
.linha-cartao span { color: var(--texto-suave); }
.linha-cartao strong { color: #183d2c; white-space: nowrap; }
.grafico-anual { display: grid; grid-template-columns: repeat(12, minmax(44px, 1fr)); gap: 10px; align-items: start; padding: 34px 4px 0; }
.mes-grafico { min-width: 44px; display: grid; gap: 6px; justify-items: center; padding-bottom: 6px; border-radius: 10px; color: inherit; text-decoration: none; }
.mes-grafico:hover { background: #f6faf7; }
.mes-previsto { opacity: .6; }
.mes-antes-cadastro { opacity: .45; }
.mes-antes-cadastro:hover { background: transparent; }
.botao-desabilitado, .botao-desabilitado:hover { opacity: .35; cursor: default; transform: none; box-shadow: none; background: #edf5f1; color: var(--verde); }
.barras-mes, .barras-negativas { display: flex; gap: 5px; padding: 0 2px; }
.barras-mes { align-items: end; border-bottom: 1px solid #c9d6cf; }
.barras-negativas { align-items: start; }
.barra-mes { width: 9px; border-radius: 999px 999px 0 0; transition: height .35s ease, opacity .2s ease; position: relative; }
.barras-negativas .barra-mes { border-radius: 0 0 999px 999px; }
.barra-mes:hover { opacity: .78; }
.barras-negativas .barra-mes[data-tooltip]::after { bottom: auto; top: calc(100% + 8px); }
.barra-mes[data-tooltip]::after {
    content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 5;
    width: max-content; max-width: 190px; padding: 7px 9px; border-radius: 7px; background: #183d2c;
    color: #fff; font-size: 12px; font-weight: 700; line-height: 1.35; white-space: nowrap;
    opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(4px);
    box-shadow: 0 10px 24px rgba(20, 55, 38, .18); transition: opacity .16s ease, transform .16s ease;
}
.barra-mes:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Nas pontas, a dica abre para dentro do gráfico (senão passa da borda da página). */
.mes-grafico:nth-child(-n+2) .barra-mes[data-tooltip]::after { left: 0; transform: translateY(4px); }
.mes-grafico:nth-last-child(-n+2) .barra-mes[data-tooltip]::after { left: auto; right: 0; transform: translateY(4px); }
.mes-grafico:nth-child(-n+2) .barra-mes:hover::after, .mes-grafico:nth-last-child(-n+2) .barra-mes:hover::after { transform: translateY(0); }
.barra-recebido { background: #0f5132; }
.barra-gasto { background: #cf2e3a; }
.barra-investimento-anual { background: #0284c7; }
.barra-sobra { background: #2fbf71; }
.barra-resultado-negativo { background: #f59e0b; }
.marca-mes { min-height: 14px; color: var(--texto-suave); font-size: 10px; font-weight: 700; }
.selo-atual { background: #e0f2fe; color: #075985; }
.selo-previsto { background: #f2f4f7; color: #667085; }
.tabela-anual td a { color: #183d2c; font-weight: 800; }
.tabela-anual td .selo { margin-left: 6px; }
.tabela-anual tfoot th { border-top: 2px solid #c9d6cf; color: #183d2c; }
.tabela-anual .linha-media td { color: var(--texto-suave); font-weight: 700; }
.nota-anual { margin: 14px 0 0; font-size: 13px; }
.trilho { display: flex; height: 6px; overflow: hidden; border-radius: 999px; background: #eef3f0; }
.trilho > span { display: block; height: 100%; }
.lista-categorias { display: grid; gap: 14px; }
.categoria-anual { display: grid; gap: 6px; }
.categoria-anual .trilho { height: 8px; }
.categoria-anual-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.categoria-anual-topo strong { white-space: nowrap; color: #183d2c; }
.anual-estreito { display: none; }
/* Análise de gastos (RN-ANA): agrupamento em botões que quebram linha, alertas e grade 2 colunas. */
.agrupamentos { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.agrupamentos .botao { padding: 7px 12px; font-size: 13px; }
.analise-grupo-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; }
.categoria-anual-topo > span, .categoria-anual-topo > a { min-width: 0; overflow-wrap: anywhere; }
.alerta-analise { border-left: 4px solid #cf2e3a; }
.lista-alertas { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lista-alertas li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.grade-analise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.analise { display: grid; gap: 24px; }
.analise .grade-indicadores { margin-bottom: 0; }
.analise .painel h2 { margin-bottom: 16px; }
.lista-ranking { gap: 0; }
.lista-ranking > * { padding: 14px 0; border-bottom: 1px solid #eef3f0; }
.lista-ranking > :first-child { padding-top: 4px; }
.lista-ranking > :last-child { padding-bottom: 0; border-bottom: 0; }
.lista-ranking .categoria-anual { gap: 8px; }
/* Cartões (RN-CAR): faturas em grade automática, mesma altura, botões sempre no rodapé. */
.lista-faturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; align-items: stretch; margin-bottom: 18px; }
.fatura { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.fatura h2 { margin: 0 0 2px; font-size: 17px; }
.fatura-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fatura-valor { display: grid; justify-items: end; gap: 4px; text-align: right; }
.fatura-valor strong { font-size: 22px; color: #183d2c; white-space: nowrap; }
.fatura-divisao { display: grid; padding: 4px 12px; border-radius: 10px; background: #f6faf7; }
/* Consulta do lançamento (RN-LAN-011, RN-PAR-007). */
.historico-salario { margin-top: 24px; }
.consulta-lancamento { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 24px; margin-bottom: 24px; }
.texto-quebra { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
tr.linha-atual td { background: #f4fbf7; }
.fim-parcelas { display: block; font-weight: 400; font-size: 12px; }
.fatura-divisao:empty { display: none; }
.fatura-divisao .linha-valor { padding: 6px 0; font-size: 14px; }
.fatura-divisao .linha-valor + .linha-valor { border-top: 1px solid #e6eee9; }
.fatura-limite { display: grid; gap: 6px; }
.fatura-limite-texto { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.fatura-limite-texto span { color: var(--texto-suave); font-weight: 700; }
.fatura-limite small { font-size: 12px; }
.fatura-acoes { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--linha); }
.outros-cartoes h2 small { font-size: 13px; font-weight: 700; }
.lista-meses-anual { display: grid; gap: 10px; }
.mes-anual { border: 1px solid var(--linha); border-radius: 12px; background: #fff; }
.mes-anual > summary { display: grid; gap: 6px; padding: 12px 14px; list-style: none; cursor: pointer; }
.mes-anual > summary::-webkit-details-marker { display: none; }
.mes-anual-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mes-anual-topo strong { color: #183d2c; }
.mes-anual-resultado { margin-left: auto; white-space: nowrap; }
.mes-anual-resultado::after { content: "▾"; display: inline-block; margin-left: 8px; color: var(--texto-suave); transition: transform .2s ease; }
.mes-anual[open] .mes-anual-resultado::after { transform: rotate(180deg); }
.mes-anual-detalhe { padding: 4px 14px 14px; border-top: 1px solid var(--linha); }
.linha-valor { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.linha-valor span { color: var(--texto-suave); }
.linha-valor strong { color: #183d2c; white-space: nowrap; }
.mes-anual-acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.rotulo-mes { color: var(--texto-suave); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.legenda-grafico { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; color: var(--texto-suave); font-size: 13px; font-weight: 700; }
.legenda-grafico span { display: inline-flex; align-items: center; gap: 8px; }
.legenda-grafico i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.filtro-mensal { display: flex; align-items: end; gap: 14px; margin-bottom: 18px; }
.filtro-mensal .campo { margin: 0; width: min(260px, 100%); }
.seletor-mes-popover {
    position: absolute; z-index: 80; width: 292px; padding: 12px; border: 1px solid #d9dee8; border-radius: 10px;
    background: #fff; box-shadow: 0 18px 40px rgba(20, 55, 38, .16);
}
.seletor-mes-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.seletor-mes-topo strong { color: #183d2c; }
.seletor-mes-topo button {
    min-width: 34px; width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 7px;
    background: #edf5f1; color: var(--verde);
}
.seletor-mes-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seletor-mes-grade button {
    min-height: 38px; padding: 0 8px; border-radius: 7px; background: #f6faf7; color: #263f35;
    box-shadow: none;
}
.seletor-mes-grade button:hover, .seletor-mes-grade button.ativo { background: var(--verde); color: #fff; }
.paginacao { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.paginacao a, .paginacao span {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; border-radius: 9px; background: #fff; color: var(--texto-suave); box-shadow: 0 8px 20px rgba(20, 55, 38, .08);
    font-weight: 700;
}
.paginacao a:hover, .paginacao .ativo { background: var(--verde); color: #fff; transform: translateY(-1px); }
.controle-mes { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.controle-mes form { display: flex; gap: 12px; align-items: end; }
.controle-mes .campo { margin: 0; }
.filtro-ano { display: flex; align-items: end; gap: 12px; }
.filtro-ano .campo { margin: 0; width: 150px; }
.estado-mes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; color: var(--texto-suave); }
.estado-mes strong { color: var(--texto); }
/* Ocupa todo o espaço à esquerda do painel de destaque (50vw, no mínimo 520px, + 16px de margem) e centraliza o card. */
.pagina-autenticacao { width: calc(100% - max(50vw, 520px) - 16px); margin: 0; padding: 0 48px 48px; box-sizing: border-box; animation: surgir .38s ease both; }
.autenticacao-shell { min-height: 100vh; display: grid; align-items: center; padding: 32px 0 100px; }
/* Login e cadastro: card sobre fundo com brilho verde; painel de destaque no desktop. */
.estrutura-visitante .conteudo {
    background:
        radial-gradient(circle at 8% 12%, rgba(47, 191, 113, .16), transparent 38%),
        radial-gradient(circle at 30% 92%, rgba(15, 81, 50, .08), transparent 42%),
        var(--fundo);
}
.autenticacao-card {
    width: min(100%, 480px); margin: 0 auto; padding: 44px 44px 34px; box-sizing: border-box;
    background: #fff; border: 1px solid rgba(15, 81, 50, .07); border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 81, 50, .12), 0 2px 6px rgba(15, 81, 50, .04);
}
.autenticacao-card:hover { transform: none; box-shadow: 0 30px 60px rgba(15, 81, 50, .12), 0 2px 6px rgba(15, 81, 50, .04); }
.autenticacao-marca { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.autenticacao-marca img { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 10px 24px rgba(15, 81, 50, .25); }
.autenticacao-marca .marca-nome { font-size: 24px; }
.autenticacao-card h1 { margin: 0 0 8px; color: #183d2c; font-size: 30px; letter-spacing: -.5px; }
.autenticacao-subtitulo { margin: 0 0 28px; color: var(--texto-suave); font-size: 15px; line-height: 1.5; }
.autenticacao-card .campo { margin-bottom: 16px; }
.autenticacao-card label { font-size: 14px; color: #34493f; }
.autenticacao-card input { min-height: 52px; padding: 12px 16px; border: 1px solid #dfe9e3; border-radius: 12px; background: #f7faf8; font-size: 16px; }
.autenticacao-card input:focus { border-color: var(--menta); background: #fff; box-shadow: 0 0 0 4px rgba(47, 191, 113, .18); }
/* Autopreenchimento do navegador pinta o campo de azul: mantém o fundo do card. */
.autenticacao-card input:-webkit-autofill, .autenticacao-card input:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #f7faf8 inset; -webkit-text-fill-color: var(--texto); caret-color: var(--texto);
}
.autenticacao-card input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(47, 191, 113, .18);
}
.autenticacao-card button[type="submit"] {
    width: 100%; min-height: 52px; margin-top: 8px; border-radius: 12px; font-size: 16px; letter-spacing: .2px;
    background: linear-gradient(135deg, #17824f, var(--verde-escuro)); box-shadow: 0 14px 28px rgba(15, 81, 50, .25);
    transition: transform .2s ease, box-shadow .2s ease;
}
.autenticacao-card button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 18px 32px rgba(15, 81, 50, .3); }
.link-autenticacao { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--linha); text-align: center; color: var(--texto-suave); font-size: 14px; }
.link-autenticacao a { color: var(--verde); font-weight: 700; }
.destaque-autenticacao {
    position: fixed; inset: 16px 16px 16px auto; width: 50vw; min-width: 520px; border-radius: 26px;
    background:
        radial-gradient(circle at 85% 12%, rgba(47, 191, 113, .55), transparent 40%),
        radial-gradient(circle at 10% 95%, rgba(217, 251, 232, .22), transparent 45%),
        linear-gradient(145deg, #136b42 0%, var(--verde) 45%, var(--verde-escuro) 100%);
    overflow: hidden;
}
.destaque-autenticacao::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000, transparent 75%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.texto-destaque-autenticacao {
    position: absolute; left: 11%; right: 11%; top: 50%; transform: translateY(-50%);
    color: #fff; text-align: left; z-index: 1;
}
.texto-destaque-autenticacao strong { display: block; max-width: 460px; font-size: 38px; line-height: 1.15; letter-spacing: -.8px; margin-bottom: 16px; }
.texto-destaque-autenticacao span { display: block; max-width: 460px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.destaque-lista { display: grid; gap: 12px; max-width: 420px; margin: 32px 0 0; padding: 0; list-style: none; }
.destaque-lista li {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 15px; font-weight: 700;
}
.destaque-lista li::before {
    content: "✓"; display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
    background: var(--menta); color: var(--verde-escuro); font-size: 14px; font-weight: 800;
}
.grade-formulario { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.coluna-12 { grid-column: span 12; }
.coluna-8 { grid-column: span 8; }
.coluna-6 { grid-column: span 6; }
.coluna-4 { grid-column: span 4; }
.coluna-3 { grid-column: span 3; }

/* Navegação de mês: ‹ mm/aaaa › (painel e lançamentos). */
.navegacao-mes { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 10px 12px; }
.navegacao-mes .campo { margin: 0; flex: 1 1 auto; text-align: center; }
.navegacao-mes input { max-width: 150px; margin: 0 auto; display: block; text-align: center; font-weight: 800; font-size: 17px; color: #183d2c; border-color: transparent; background: #f6faf7; cursor: pointer; }
.navegacao-mes small { display: block; margin-top: 4px; color: var(--texto-suave); font-weight: 700; font-size: 12px; }
.botao-mes { width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #edf5f1; color: var(--verde); font-size: 22px; line-height: 1; }
.botao-mes:hover { color: #fff; background: var(--verde); }
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.selo-aberto { background: #fff4e5; color: #9a3412; }
.selo-pago { background: #e7f8ef; color: #0a7a45; }
.selo-removido { background: #f2f4f7; color: #667085; }
.selo-fechado { background: #e7f8ef; color: #0a7a45; }

/* Filtros recolhíveis: abertos no desktop, recolhidos no celular (JS). */
.filtros { margin-bottom: 18px; }
.filtros > summary { display: none; }
.filtros .filtro-mensal { margin-bottom: 0; flex-wrap: wrap; }
.so-celular { display: none !important; }

/* Lista de lançamentos em cards (só no celular). */
.lista-lancamentos { display: none; gap: 10px; }
.cartao-lancamento { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(20, 55, 38, .07); }
.cartao-lancamento.removido { opacity: .6; }
.cl-topo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cl-descricao { color: #183d2c; font-size: 15px; overflow-wrap: anywhere; }
.cl-valor { color: #183d2c; font-size: 15px; font-weight: 800; white-space: nowrap; }
.cl-valor.entrada { color: #0a7a45; }
.cl-detalhes { display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--texto-suave); font-size: 13px; }
.cl-detalhes span + span::before { content: "·"; margin-right: 6px; }
.cl-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cl-acoes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.cl-acoes form { margin: 0; }
.cl-acoes button, .cl-acoes .botao { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* Botão flutuante "Novo lançamento" (celular). */
.botao-flutuante { display: none; }

/* Diálogo de confirmação próprio (no lugar do confirm() nativo). */
.dialogo-confirmacao { width: min(420px, calc(100% - 32px)); padding: 22px; border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(8, 59, 38, .28); color: var(--texto); }
.dialogo-confirmacao::backdrop { background: rgba(8, 59, 38, .45); }
.dialogo-confirmacao p { margin: 0 0 20px; font-size: 16px; line-height: 1.45; font-weight: 700; }
.dialogo-confirmacao .acoes { justify-content: flex-end; }
.dialogo-confirmacao button { min-height: 44px; padding: 0 18px; }
.dialogo-tutorial { width: min(480px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(8, 59, 38, .28); color: var(--texto); }
.dialogo-tutorial::backdrop { background: rgba(8, 59, 38, .45); }
.dialogo-tutorial h2 { margin: 6px 0 10px; }
.dialogo-tutorial p { margin: 0 0 20px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.dialogo-tutorial .acoes { justify-content: flex-end; }
.dialogo-tutorial [data-tutorial-pular] { margin-right: auto; }
.dialogo-tutorial button { min-height: 44px; padding: 0 18px; }
.dialogo-tutorial [hidden] { display: none; }
button.perigo { background: #b42318; }
button.perigo:hover { box-shadow: 0 10px 22px rgba(180, 35, 24, .25); }
.fechamento-mes { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.fechamento-mes span { color: var(--texto-suave); }

/* Aliases temporarios para views ja criadas. */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: 22px 24px; background: #fff; border: 0; border-radius: 14px; box-shadow: var(--sombra); transition: transform .22s ease, box-shadow .22s ease; }
.panel:hover { transform: translateY(-3px); box-shadow: 0 22px 46px rgba(20, 55, 38, .13); }
.field { margin-bottom: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--verde); color: #fff; cursor: pointer; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease; }
.button.secondary, button.secondary { background: #edf5f1; color: var(--verde); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.success { padding: 12px; margin-bottom: 16px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; color: #166534; }
.error { color: #b91c1c; font-size: 13px; margin-top: 4px; }
.muted { color: var(--texto-suave); }

@keyframes surgir {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gaveta-sobe { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes flutuar {
    0%, 100% { transform: rotate(-18deg) translateY(0); }
    50% { transform: rotate(-18deg) translateY(-10px); }
}
/* Com menu lateral, 4 indicadores não cabem com ícone: o valor quebrava em duas linhas. */
@media (max-width: 1400px) {
    .indicador-icone { display: none; }
}
@media (max-width: 1100px) {
    .estrutura-app { grid-template-columns: minmax(0, 1fr); }
    /*
     * Celular/tablet com cara de aplicativo (padrão inGym): sem menu lateral;
     * barra de abas fixa embaixo e "Mais" abrindo uma gaveta (bottom sheet).
     */
    .barra-lateral { display: none; }
    .acoes-topo { display: none; }
    .marca-topo { display: inline-flex; flex: 0 0 auto; }
    .marca-topo img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 6px 14px rgba(0,0,0,.18); }
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

    .barra-abas {
        position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
        display: flex; justify-content: space-around; align-items: stretch;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid var(--linha); box-shadow: 0 -6px 20px rgba(20, 55, 38, .08);
    }
    .barra-abas .aba {
        flex: 1 1 0; min-width: 0; min-height: 56px; padding: 4px 2px;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        border: 0; border-radius: 12px; background: transparent; color: var(--texto-suave); box-shadow: none;
        font-size: 10.5px; font-weight: 700; letter-spacing: -.15px; line-height: 1.1; text-align: center; -webkit-tap-highlight-color: transparent;
    }
    .barra-abas .aba span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .barra-abas .aba:hover { background: transparent; color: var(--verde); transform: none; box-shadow: none; }
    .barra-abas .aba.ativa { color: var(--verde); }
    .barra-abas .aba .icone { transition: background .2s ease; }
    .barra-abas .aba.ativa .icone { background: var(--verde-claro); border-radius: 999px; padding: 2px 14px; box-sizing: content-box; }
    .barra-abas .aba:active { transform: scale(.96); }

    .gaveta-fundo:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(8, 59, 38, .42); }
    .gaveta:not([hidden]) {
        display: grid; gap: 4px; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
        max-height: 85vh; overflow-y: auto;
        padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
        background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(8, 59, 38, .2);
        animation: gaveta-sobe .22s ease-out;
    }
    .gaveta-alca { width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 999px; background: var(--linha); }
    .gaveta-usuario { display: grid; gap: 2px; padding: 6px 10px 12px; border-bottom: 1px solid var(--linha); margin-bottom: 4px; }
    .gaveta-usuario strong { color: var(--texto); }
    .gaveta-usuario span { color: var(--texto-suave); font-size: 13px; overflow-wrap: anywhere; }
    .gaveta .gaveta-item {
        width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: flex-start; gap: 14px;
        padding: 0 10px; border: 0; border-radius: 10px; background: transparent; box-shadow: none;
        color: var(--texto); font-size: 16px; font-weight: 600;
    }
    .gaveta .gaveta-item .icone { color: var(--verde); }
    .gaveta .gaveta-item:hover, .gaveta .gaveta-item.ativo { background: #f4fbf7; color: var(--verde); transform: none; box-shadow: none; }
    .gaveta .botao-instalar { display: none; }
    .gaveta .botao-instalar.visivel { display: flex; }
    .gaveta .gaveta-sair, .gaveta .gaveta-sair .icone { color: #b42318; }
    body.gaveta-aberta { overflow: hidden; }
    .gaveta-secao { padding: 12px 10px 4px; color: var(--texto-suave); font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
    .barra-abas, .gaveta, .botao-flutuante { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

    .botao-flutuante {
        position: fixed; z-index: 39; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom));
        width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px;
        background: linear-gradient(135deg, var(--menta), var(--verde)); color: #fff;
        box-shadow: 0 12px 26px rgba(15, 81, 50, .35); -webkit-tap-highlight-color: transparent;
    }
    .botao-flutuante svg { width: 28px; height: 28px; }
    .botao-flutuante:hover { color: #fff; }
    .botao-flutuante:active { transform: scale(.94); }
    body.gaveta-aberta .botao-flutuante { display: none; }
    .so-desktop { display: none !important; }

    /* Salvar sempre à mão: fixo logo acima da barra de abas. */
    .acoes-formulario {
        position: sticky; z-index: 30; bottom: calc(72px + env(safe-area-inset-bottom));
        margin: 8px -24px -22px; padding: 12px 24px; background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--linha); border-radius: 0 0 12px 12px;
    }
    .acoes-formulario button { width: 100%; min-height: 48px; font-size: 16px; }

    .pagina { margin-top: -175px; }
    .grade-indicadores, .principal-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grade-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .destaque-autenticacao { display: none; }
    .pagina-autenticacao { width: min(460px, calc(100% - 32px)); margin: 0 auto; padding: 0 0 48px; }
    .autenticacao-shell { padding: 32px 0; }
}
@media (max-width: 760px) {
    .cabecalho { padding: 14px 14px 0; min-height: 235px; }
    .barra-topo { flex-wrap: wrap; }
    .acoes-topo { margin-left: 0; }
    .pagina { width: calc(100% - 20px); margin-top: -142px; margin-bottom: 96px; }
    .pagina > h1, .pagina > .linha-topo h1 { color: #fff; font-size: 24px; }
    .linha-topo { align-items: stretch; flex-direction: column; }
    .aviso-membros { align-items: stretch; flex-direction: column; }
    .aviso-membros .botao { width: 100%; }
    .linha-topo .botao, .linha-topo button { width: 100%; }
    .painel { padding: 18px 16px; border-radius: 12px; }
    .cartao-indicador:hover, .painel:hover { transform: none; }
    .grade-indicadores, .principal-dashboard, .grade-3, .grid-3, .grade-analise { grid-template-columns: minmax(0, 1fr); }
    .grade-cartoes { grid-template-columns: minmax(0, 1fr); }
    .carteira { gap: 18px; }
    .posicao .fatura-acoes .botao, .posicao .fatura-acoes form { flex: 1 1 0; }
    .posicao .fatura-acoes button { width: 100%; }
    .coluna-12, .coluna-8, .coluna-6, .coluna-4, .coluna-3 { grid-column: span 12; }
    .controle-mes, .controle-mes form, .estado-mes, .filtro-ano, .filtro-mensal { align-items: stretch; flex-direction: column; }
    .filtro-ano .campo { width: 100%; }
    .filtro-mensal .campo { width: 100%; }
    .filtro-mensal button, .controle-mes button, .filtro-ano button { width: 100%; }
    table {
        display: block; overflow-x: auto; white-space: nowrap; border-radius: 12px;
        -webkit-overflow-scrolling: touch;
    }
    th, td { padding: 12px 10px; }
    .acoes { min-width: 150px; }
    .paginacao { justify-content: center; }
    .paginacao a, .paginacao span { min-width: 34px; height: 36px; padding: 0 10px; }
    .barra-resumo { grid-template-columns: 1fr; }
    .barra-resumo strong { font-size: 16px; }
    .cartao-cartao .linha-topo { flex-direction: row; align-items: center; }
    .cartao-cartao .linha-topo h2 { margin-bottom: 0; }
    .linha-cartao { align-items: flex-start; flex-direction: column; gap: 4px; }
    .autenticacao-card h1 { font-size: 26px; color: #183d2c; text-shadow: none; }
    /* Cara de app: faixa verde no topo e o card subindo sobre ela. */
    .estrutura-visitante .conteudo {
        background:
            radial-gradient(circle at 90% 0%, rgba(47, 191, 113, .5), transparent 55%) top / 100% 300px no-repeat,
            linear-gradient(160deg, #136b42, var(--verde-escuro)) top / 100% 300px no-repeat,
            var(--fundo);
    }
    .autenticacao-card { padding: 28px 22px 24px; border-radius: 20px; }

    /* O título já aparece no topo verde: não repetir na página. */
    .pagina > h1, .pagina > .linha-topo h1 { display: none; }
    .so-celular { display: block !important; }

    /* Visão anual: lista de meses no lugar do gráfico e da tabela de 7 colunas. */
    .anual-largo { display: none; }
    .anual-estreito { display: block; }

    /* Filtros recolhidos atrás de um botão, com o resumo do que está ativo. */
    .filtros { background: #fff; border-radius: 12px; box-shadow: var(--sombra); }
    .filtros > summary {
        display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px;
        list-style: none; cursor: pointer; font-weight: 800; color: var(--verde);
    }
    .filtros > summary::-webkit-details-marker { display: none; }
    .filtros > summary::after { content: "▾"; margin-left: auto; transition: transform .2s ease; }
    .filtros[open] > summary::after { transform: rotate(180deg); }
    .filtros > summary small { color: var(--texto-suave); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .filtros .filtro-mensal { box-shadow: none; padding-top: 0; }

    /* Lançamentos: cards no lugar da tabela de 9 colunas. */
    .tabela-lancamentos { display: none; }
    .lista-lancamentos { display: grid; }

    /* Tabelas simples viram cards empilhados (rótulo vem do data-label). */
    table.tabela-cards { display: block; overflow: visible; white-space: normal; background: transparent; box-shadow: none; border-radius: 0; }
    .tabela-cards thead { display: none; }
    .tabela-cards tbody { display: grid; gap: 10px; }
    .tabela-cards tr { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(20, 55, 38, .07); }
    .painel .tabela-cards tr { box-shadow: none; border: 1px solid var(--linha); }
    .tabela-cards tbody tr:hover { background: #fff; }
    .tabela-cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
    .tabela-cards td[data-label]::before { content: attr(data-label); color: var(--texto-suave); font-size: 13px; font-weight: 700; text-align: left; }
    .tabela-cards td.cartao-titulo { display: block; padding-bottom: 6px; text-align: left; font-size: 15px; font-weight: 800; color: #183d2c; }
    .tabela-cards td.cartao-titulo .texto-suave { font-size: 13px; font-weight: 600; }
    .tabela-cards td.acoes { justify-content: flex-end; min-width: 0; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--linha); }
    .tabela-cards td[colspan] { display: block; text-align: left; }

    /* Painel: indicadores 2×2 compactos e sobra por pessoa logo em seguida. */
    .grade-indicadores { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
    .analise, .grade-analise { gap: 16px; }
    .cartao-indicador { min-height: 0; padding: 14px; }
    .indicador-icone { display: none; }
    .indicador-rotulo { font-size: 11px; }
    .indicador-valor { font-size: 17px; overflow-wrap: anywhere; }
    .indicador-rodape { margin-top: 6px; font-size: 12px; }
    .principal-dashboard { gap: 16px; }
    .painel-sobra { order: -1; }
    .fechamento-mes { flex-direction: column; align-items: stretch; }
    .fechamento-mes button { width: 100%; }
    .acoes-formulario { margin: 8px -16px -18px; padding: 12px 16px; }
    .fatura-acoes { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .fatura-acoes .botao { width: 100%; }

    /*
     * Cara de aplicativo: barra de topo compacta e fixa (respeita o notch no PWA com
     * status bar translúcida), faixa verde só atrás dos primeiros cards, toques de 44 px
     * e campos com 16 px para o iOS não dar zoom.
     */
    html { -webkit-tap-highlight-color: transparent; }
    .estrutura-app:not(.estrutura-visitante) .cabecalho {
        position: sticky; top: 0; z-index: 35; min-height: 0;
        padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
        box-shadow: 0 6px 18px rgba(8, 59, 38, .18);
    }
    .estrutura-app:not(.estrutura-visitante) .conteudo {
        background: linear-gradient(135deg, var(--verde), var(--verde-escuro)) top / 100% 120px no-repeat;
    }
    .estrutura-app:not(.estrutura-visitante) .barra-topo { flex-wrap: nowrap; gap: 12px; }
    .estrutura-app:not(.estrutura-visitante) .marca-topo img { width: 32px; height: 32px; }
    .titulo-topo { min-width: 0; }
    .titulo-topo span { display: none; }
    .titulo-topo strong { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pagina { margin-top: 6px; }
    input, select, textarea { min-height: 44px; font-size: 16px; }
    button, .botao { min-height: 44px; }
    .autenticacao-shell {
        min-height: 100svh; padding: calc(24px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
    }
}
/* Toque não tem hover: sem cards "pulando"; o retorno do toque vem no :active. */
@media (hover: none) {
    .cartao-indicador:hover, .painel:hover, button:hover, .botao:hover, .grupo-menu:hover, .submenu a:hover { transform: none; }
    button:active, .botao:active { transform: scale(.97); }
}
/* Instalado como app: sem o "puxar para atualizar" e o efeito elástico do navegador. */
@media (display-mode: standalone) {
    body { overscroll-behavior-y: none; }
}
.dica-fatura { display: block; margin-top: 6px; font-size: 13px; }
.dica-fatura[hidden] { display: none; }
.botao-link, .botao-link:hover { display: inline; min-height: 0; padding: 0; background: none; color: var(--verde); text-decoration: underline; font-weight: 800; box-shadow: none; transform: none; }
.fatura-divisao .linha-origem { padding-left: 12px; font-size: 13px; }
.fatura-divisao .linha-origem span::before { content: "↳ "; }
