/* Empresas usa os tokens do molde; as regras comecam pelo celular. */
.molde.emp-molde { max-width: none; padding-inline: 12px; }
main.palco:has(.emp-molde) { background: var(--ast-bg-pagina); color: var(--ast-texto); }
main.palco:has(.emp-molde) #eyebrow-vista { display: none; }
main.palco:has(.emp-molde) #gerado { font-size: 11px; }
.emp-pagina, .emp-pagina * { box-sizing: border-box; }
.emp-pagina { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; color: var(--ast-texto); }
.emp-principal, .emp-contas { min-width: 0; }
.emp-contas h2 { margin: 0 0 6px; color: var(--ast-texto-titulo); font-size: 14px; font-weight: 600; text-transform: lowercase; letter-spacing: normal; }
.emp-grupos { display: none; }
.emp-grupo { margin-bottom: 2px; }
.emp-grupo-topo { display: flex; align-items: center; gap: 5px; width: 100%; height: 30px; padding: 3px 6px; border: 0; background: none; color: var(--ast-texto-titulo); font: inherit; font-size: 13px; cursor: pointer; text-align: left; white-space: nowrap; }
.emp-grupo-topo strong { margin-left: auto; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.emp-contas-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.emp-conta { position: relative; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 3px 9px; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio-pequeno); background: var(--ast-bg-cartao); color: var(--ast-texto); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.emp-grupo .emp-conta { margin-top: 1px; }
.emp-conta strong { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.emp-contas-chips .emp-conta { flex: none; width: auto; min-width: 150px; height: 44px; grid-template-columns: 7px auto; gap: 0 5px; padding: 4px 8px; }
.emp-contas-chips .emp-conta strong { grid-column: 2; }
.emp-conta-ativa { border-color: var(--ast-primaria); background: var(--ast-menu-ativo-fundo); color: var(--ast-menu-ativo-texto); }
.emp-conta:hover, .emp-grupo-topo:hover { background: var(--ast-bg-hover-linha); }
.emp-conta-nome { min-width: 0; white-space: nowrap; }
.emp-leitura { display: inline-flex; align-items: center; gap: 6px; color: var(--ast-texto-apagado); font-size: 11px; }
.emp-leitura i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.emp-leitura-ok { color: var(--ast-sucesso); }
.emp-leitura-atencao, .emp-atencao { color: var(--ast-alerta); }
.emp-topo { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px; padding-bottom: 14px; }
.emp-topo > div:first-child { min-width: 0; }
.emp-topo h1 { margin: 4px 0 6px; color: var(--ast-texto-titulo); font-size: 16px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.emp-sobretitulo, .emp-saldo-atual > span { display: block; color: var(--ast-texto-apagado); font-size: 11px; }
.emp-saldo-atual { flex: none; text-align: right; }
.emp-saldo-atual strong { display: block; margin: 4px 0; color: var(--ast-texto-forte); font-size: 18px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.emp-secundario { margin: 3px 0 0; color: var(--ast-texto-apagado); font-size: 11px; font-weight: 400; }
.emp-indicadores { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.emp-indicador { display: inline-flex; flex: none; align-items: baseline; gap: 4px; padding: 10px 12px; border: 1px solid var(--ast-borda-controle); border-radius: var(--ast-raio); background: var(--ast-bg-cartao); color: var(--ast-texto); text-align: left; font: inherit; white-space: nowrap; cursor: pointer; }
.emp-indicador span { color: var(--ast-texto-apagado); font-size: 13px; }
.emp-indicador strong { color: var(--ast-texto-forte); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.emp-indicador strong.emp-atencao { color: var(--ast-alerta); }
.emp-indicador[aria-pressed="true"] { border-color: var(--ast-primaria); background: var(--ast-menu-ativo-fundo); }
.emp-abas { margin: 0 0 8px; min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
.emp-abas[hidden] { display: none; }
.emp-abas .ast-aba { flex: none; flex-direction: row; gap: 6px; padding-inline: 12px; white-space: nowrap; }
.emp-abas [aria-pressed="true"] { color: var(--ast-texto-titulo); box-shadow: inset 0 -3px var(--ast-aba-sublinhado); }
.emp-contagem { color: var(--ast-texto-apagado); font-size: 12px; font-variant-numeric: tabular-nums; }
.emp-barra { gap: 8px; margin-bottom: 14px; }
.emp-busca { flex: 1 1 100%; min-width: 0; }
.emp-busca .ast-campo { width: 100%; background: var(--ast-bg-busca); }
.emp-barra .ast-chip { flex: none; font-size: 12px; white-space: nowrap; }
.emp-periodo { display: block; min-width: 0; }
.emp-periodo .ast-select { width: 100%; }
.emp-datas { display: grid; gap: 10px; margin-top: 12px; }
.emp-datas label { display: flex; align-items: center; gap: 6px; }
.emp-datas .ast-campo { min-width: 0; width: 100%; }
.emp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.emp-chip { padding: 5px 10px; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio-chip); background: var(--ast-bg-cartao); color: var(--ast-texto); font: inherit; cursor: pointer; }
.emp-chip.ativa { border-color: var(--ast-primaria); background: var(--ast-menu-ativo-fundo); }
.emp-faturas { margin-bottom: 18px; padding: 14px; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio); }
.emp-faturas h2 { margin: 0 0 12px; color: var(--ast-texto-titulo); font-size: 14px; text-transform: none; letter-spacing: normal; }
.emp-faturas h2 span { display: block; margin-top: 4px; color: var(--ast-texto-apagado); font-size: 12px; font-weight: 400; }
.emp-faturas .ast-tabela { min-width: 350px; }
.emp-estimada { color: var(--ast-texto-apagado); }
.emp-lista { padding-bottom: 90px; }
.emp-tabela { min-width: 930px; }
.emp-tabela td, .emp-tabela th { font-size: 13px; }
.emp-tabela td { padding-block: 9px; }
.emp-tabela th { text-transform: none; }
.emp-tabela .emp-data { width: 78px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.emp-descricao { min-width: 210px; width: 35%; overflow-wrap: anywhere; }
.emp-descricao strong { color: var(--ast-texto-forte); font-weight: 600; }
.emp-ordem-crescente .ast-icone { transform: rotate(180deg); }
.emp-cartao-rotulo { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: var(--ast-raio-pequeno); background: var(--ast-bg-pilula-icone); font-size: 11px; }
.emp-linha { cursor: pointer; }
.emp-linha:focus-visible { outline: 2px solid var(--ast-anel); outline-offset: -2px; }
.emp-numero, .emp-saldo { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.emp-entrada, .emp-rodape strong.emp-entrada { color: var(--ast-sucesso); }
.emp-saida, .emp-rodape strong.emp-saida, .emp-erro { color: var(--ast-perigo-texto); }
/* 13/10/2026: o dono pediu justificativa e anexo em formato de botão ("+ justificativa", "+ comprovante"). */
.emp-justificativa { display: inline-flex; align-items: center; gap: 5px; max-width: 150px; overflow: hidden; padding: 4px 8px; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio-pequeno); background: var(--ast-bg-cartao); color: var(--ast-primaria); font: inherit; font-size: 13px; white-space: nowrap; text-align: left; cursor: pointer; }
.emp-justificativa.tem { color: var(--ast-texto); }
.emp-justificativa span { overflow: hidden; text-overflow: ellipsis; }
.emp-justificativa .ast-icone { flex: none; width: 13px; height: 13px; }
.emp-justificativa:hover { border-color: var(--ast-primaria); background: var(--ast-bg-hover-linha); }
.emp-pagina .anexo-btn, .emp-pagina .anexo-btn.tem { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio-pequeno); background: var(--ast-bg-cartao); color: var(--ast-primaria); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.emp-pagina .anexo-btn.tem { color: var(--ast-texto); }
.emp-pagina .anexo-btn:hover { border-color: var(--ast-primaria); background: var(--ast-bg-hover-linha); }
.emp-mais { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.emp-mais > span, .emp-fonte { color: var(--ast-texto-apagado); font-size: 12px; }
.emp-rodape { display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 12px; min-height: 0; height: auto; overflow-x: auto; padding: 8px 12px; line-height: 1.3; }
.emp-rodape > div { flex: none; min-width: 0; white-space: nowrap; }
.emp-rodape strong, .emp-rodape span { display: inline; text-align: right; font-size: 11px; }
.emp-rodape strong { margin-left: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.emp-rodape [data-emp-total="saldo-final"] { order: -2; }
.emp-rodape [data-emp-total="lancamentos"] { order: -1; }
.emp-rodape [data-emp-total="lancamentos"] strong { margin-left: 0; }
.emp-aviso-saldo { display: block; width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; font-size: 10px; }
.emp-camadas .ast-balao { position: fixed; right: auto; width: min(420px, calc(100vw - 24px)); max-width: none; overflow-y: auto; z-index: var(--ast-z-calendario); }
.emp-camadas #emp-filtros, .emp-camadas #emp-periodo { width: min(330px, calc(100vw - 24px)); }
.emp-camadas .ast-select { width: 100%; }
.emp-just-contexto { margin: 0 0 12px; color: var(--ast-texto-apagado); font-size: 12px; line-height: 1.4; }
.emp-editor textarea { display: block; width: 100%; min-height: 150px; margin-top: 6px; padding: 10px; resize: vertical; line-height: 1.5; font-size: 14px; }
.emp-editor-info { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--ast-texto-apagado); font-size: 11px; }
.emp-contador { flex: none; font-variant-numeric: tabular-nums; }
.emp-editor-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.emp-camadas .ast-painel-lado > .ast-componente-cabecalho { padding: 24px 20px 15px; }
.emp-camadas .ast-painel-lado > .ast-componente-corpo { padding-inline: 20px; }
.emp-camadas .ast-painel-lado > .ast-componente-rodape { padding: 0; }
.emp-detalhe-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.emp-detalhe-descricao { margin: 22px 0 14px; color: var(--ast-texto-titulo); overflow-wrap: anywhere; }
.emp-detalhe-dados { display: grid; gap: 16px; margin: 0 0 24px; }
.emp-detalhe-dados dt { color: var(--ast-texto-apagado); font-size: 12px; }
.emp-detalhe-dados dd { margin: 5px 0 0; color: var(--ast-texto-forte); overflow-wrap: anywhere; }
.emp-anexos { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--ast-borda); }
.emp-anexos h3 { font-size: 16px; }
.emp-anexo { display: flex; align-items: center; gap: 8px; padding-block: 10px; border-bottom: 1px solid var(--ast-borda); }
.emp-anexo > span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.emp-anexo .ast-btn { flex: none; padding-inline: 6px; }
.emp-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.emp-com-painel.emp-painel-compacto { grid-template-columns: minmax(0, 1fr); }
.emp-com-painel.emp-painel-compacto .emp-grupos { display: none; }
.emp-com-painel.emp-painel-compacto .emp-contas-chips { display: flex; }
.emp-com-painel.emp-painel-compacto .emp-contas { position: static; }
.emp-com-painel .emp-contas h2 { display: none; }

@media (min-width: 768px) {
  .molde.emp-molde { padding-inline: 24px; }
  .molde.emp-molde:has(.emp-com-painel) { padding-inline: 8px; }
  .emp-topo { gap: 16px; padding-bottom: 20px; }
  .emp-topo h1 { font-size: 18px; }
  .emp-saldo-atual strong { font-size: 24px; }
  .emp-busca { flex: 1 1 0; }
  .emp-barra { flex-wrap: nowrap; }
  .emp-rodape { justify-content: flex-end; gap: 20px; padding: 8px 24px; }
  .emp-rodape > div { display: grid; text-align: right; }
  .emp-rodape strong, .emp-rodape span { display: block; }
  .emp-rodape strong { order: -1; margin: 0 0 2px; font-size: 14px; }
  .emp-rodape [data-emp-total="saldo-final"], .emp-rodape [data-emp-total="lancamentos"] { order: 0; }
  .emp-aviso-saldo { width: auto; font-size: 10px; }
  .emp-camadas .ast-painel-lado > .ast-componente-cabecalho { padding: 32px 32px 20px; }
  .emp-camadas .ast-painel-lado > .ast-componente-corpo { padding-inline: 32px; }
  .emp-detalhe-dados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .emp-com-painel.emp-painel-reservado { margin-right: 650px; }
  .emp-com-painel.emp-painel-reservado .emp-rodape { right: 650px; justify-content: flex-start; gap: 12px; }
  .emp-com-painel .emp-tabela { min-width: 0; }
  .emp-com-painel .emp-descricao { min-width: 0; width: auto; }
  .emp-com-painel .emp-tabela th:nth-child(3), .emp-com-painel .emp-tabela td:nth-child(3),
  .emp-com-painel .emp-tabela th:nth-child(6), .emp-com-painel .emp-tabela td:nth-child(6),
  .emp-com-painel .emp-tabela th:nth-child(7), .emp-com-painel .emp-tabela td:nth-child(7),
  .emp-com-painel .emp-tabela th:nth-child(8), .emp-com-painel .emp-tabela td:nth-child(8) { display: none; }
}

@media (min-width: 1200px) {
  /* Coluna maior a pedido do dono; encolhe até 230 px em telas de 1366 para a tabela caber inteira. */
  .emp-pagina { grid-template-columns: clamp(230px, 16vw, 280px) minmax(0, 1fr); }
  .emp-tabela { min-width: 0; }
  .emp-pessoal { grid-template-columns: minmax(0, 1fr); }
  .emp-contas { position: sticky; top: 12px; align-self: start; max-height: calc(100dvh - 216px); overflow-y: auto; border: 1px solid var(--ast-borda); border-radius: var(--ast-raio); padding: 7px; }
  .emp-grupos { display: block; }
  .emp-contas-chips { display: none; }
}
