/* Cartão corporativo: estilos do sistema. Fonte, ícones e logo são servidos daqui mesmo (sem CDN).

   Regras do visual (docs/superpowers/plans/2026-12-03-visual-novo.md):
   - tinta (--primario) no texto e no botão principal; um botão principal por tela;
   - o vermelho da marca (--marca) só na logo, no item atual do menu e no progresso;
   - erro e ação que apaga usam --vermelho SEMPRE com ícone, contorno e palavras;
   - azul é só para campo sugerido;
   - uma superfície branca por assunto, com linhas finas dentro dela. */

@font-face {
  font-family: "Inter";
  src: url("fontes/inter.260c81a4759b.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --fundo: #f3f4f5;
  --texto: #1c1f23;
  --texto-suave: #5b626a;
  --branco: #ffffff;
  --marca: #eb363d;
  --primario: #1c1f23;
  --primario-escuro: #3a4047;
  --borda: #e1e4e7; /* contorno de superfície e linha entre partes */
  --linha: #e9ebed; /* linha fina entre as linhas de uma lista */
  --contorno: #aeb4ba; /* contorno de botão */
  --contorno-campo: #8a9199; /* contorno de campo: precisa aparecer contra o branco */
  --foco: #2f74e0;
  --verde: #11602a;
  --verde-fundo: #e2f5e7;
  --ambar: #7a4100;
  --ambar-fundo: #fdf3df;
  --ambar-borda: #e2a64b;
  --vermelho: #b3202b;
  --vermelho-fundo: #fdf0f0;
  --azul: #1858bd;
  --azul-borda: #7ea6e8;
  --azul-fundo: #e3eeff;
  --neutro-fundo: #eef0f2;
  --raio: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
}

h1,
h2,
h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  margin: 0 0 12px;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration-color: var(--contorno);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
}

input:not([type="checkbox"], [type="radio"], [type="file"]),
select,
textarea {
  height: 40px;
  max-width: 100%;
  padding: 0 10px;
  font: inherit;
  color: var(--texto);
  background: var(--branco);
  border: 1px solid var(--contorno-campo);
  border-radius: 6px;
}
input[type="checkbox"] {
  accent-color: var(--primario);
}
:is(input, select)[aria-invalid="true"] {
  border: 2px solid var(--vermelho);
}

/* Ícones (Lucide): desenhados com a cor do texto de quem os usa. */
.botao-perigo::before,
.mensagens li::before,
.erro::before,
.aviso::before,
.conta-avisos li[class]::before,
.conta-aviso::before,
.voltar::before,
.dobra > summary::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--icone) center / contain no-repeat;
}
.mensagens li,
.erro,
.aviso,
.conta-avisos li {
  --icone: url("icones/triangle-alert.f12f5ba0f2ed.svg");
}
.mensagens .msg-success,
.mensagens .msg-info,
.conta-avisos .tom-ok,
.conta-aviso {
  --icone: url("icones/circle-check.7d1aaa1cecb6.svg");
}

/* ---------- Barra do topo ---------- */

.topo {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
}
.topo-dentro {
  display: flex;
  align-items: center;
  gap: 0 30px;
  max-width: 1240px;
  min-height: 62px;
  margin: 0 auto;
  padding: 0 24px;
}
body:has(> .pagina-larga) .topo-dentro {
  max-width: 1440px;
}
.marca {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
/* Celular pequeno ou zoom de 400%: a barra inteira continua cabendo. */
@media (max-width: 350px) {
  .topo .marca {
    gap: 8px;
    font-size: 14px;
  }
  .topo .topo-abrir {
    padding-inline: 12px;
  }
}
.topo .topo-abrir {
  display: none;
}
/* No computador o "popover" do menu é uma parte comum da barra. */
.topo-menu {
  position: static;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: none;
  border: 0;
}
.topo-itens {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(14px, 1.7vw, 24px);
}
.topo-itens a {
  display: flex;
  align-items: center;
  min-height: 62px;
  border: solid transparent;
  border-width: 3px 0;
  text-decoration: none;
}
.topo-itens a:hover {
  border-bottom-color: var(--contorno);
}
.topo-itens a[aria-current] {
  border-bottom-color: var(--marca);
  font-weight: 600;
}
.topo-usuario {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
}
.topo-usuario form {
  margin: 0;
}
.topo-nome {
  max-width: 15rem;
  overflow: hidden;
  color: var(--texto-suave);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topo-dentro > .ajuda-botao {
  margin-left: -16px;
}

/* Com seis itens no menu, o nome só cabe na mesma linha em tela larga. */
@media (min-width: 861px) and (max-width: 1100px) {
  .topo-itens:has(a:nth-child(6)) + .topo-usuario .topo-nome {
    display: none;
  }
}
@media (max-width: 860px) {
  .topo-dentro > .ajuda-botao {
    margin-left: 0;
  }
  .topo-dentro {
    gap: 8px;
    padding: 0 16px;
  }
  .marca {
    margin-right: auto;
  }
  .topo .topo-abrir {
    display: inline-flex;
  }
  /* Navegador sem popover ignora as duas regras e mostra o menu sempre aberto. */
  .topo-menu:not(:popover-open) {
    display: none;
  }
  .topo-menu:popover-open {
    position: absolute;
    inset: 62px 0 auto;
    display: block;
    width: 100%;
    padding: 4px 0 12px;
    background: var(--branco);
    border-bottom: 1px solid var(--borda);
    box-shadow: 0 16px 24px rgb(28 31 35 / 0.12);
  }
  .topo-itens {
    flex-direction: column;
  }
  .topo-itens a {
    min-height: 48px;
    padding: 0 16px 0 13px;
    border-width: 0 0 0 3px;
  }
  .topo-itens a[aria-current] {
    border-left-color: var(--marca);
  }
  .topo-usuario {
    justify-content: space-between;
    margin: 8px 0 0;
    padding: 12px 8px 0 16px;
    border-top: 1px solid var(--linha);
  }
}

/* ---------- Página: título, ações e seções ---------- */

.pagina {
  width: 100%;
  min-width: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 24px 48px;
}
.pagina-larga {
  max-width: 1440px;
  padding-top: 24px;
}
.pagina-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 20px;
}
.pagina-titulo {
  flex: 1 1 340px;
  min-width: 0;
}
.pagina-titulo > p {
  margin: 6px 0 0;
  color: var(--texto-suave);
}
.pagina-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.pagina-acoes:not(:has(*)) {
  display: none;
}
.voltar {
  --icone: url("icones/arrow-left.2827b65c438f.svg");
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--texto-suave);
  text-decoration: none;
}
.voltar:hover {
  color: var(--texto);
  text-decoration: underline;
}
.secao {
  margin: 36px 0 12px;
}
.texto-suave {
  color: var(--texto-suave);
}
.depois {
  margin: 12px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nowrap {
  white-space: nowrap;
}
.quebra {
  overflow-wrap: anywhere;
}

/* ---------- Superfície branca: uma por assunto ---------- */

.cartao,
.vazio,
.lista,
.fatura,
.tabela-rolagem {
  background: var(--branco);
  border-radius: var(--raio);
}
.cartao,
.vazio {
  padding: 22px 24px;
}
.cartao > :last-child,
.vazio > :last-child {
  margin-bottom: 0;
}
.vazio {
  color: var(--texto-suave);
}
.vazio strong {
  color: var(--texto);
}
/* Superfície dentro de superfície não existe: a de dentro perde o fundo e o espaço. */
.cartao .tabela-rolagem,
.cartao .vazio {
  padding: 0;
  border-radius: 0;
}

/* Frase à esquerda, botão à direita. */
.chamada {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.chamada > p {
  flex: 1 1 280px;
  margin: 0;
}

/* Lista: uma linha por item. O link da linha vale na linha inteira. */
.lista {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.lista-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  min-height: 52px;
  padding: 10px 24px;
}
.lista-item:hover {
  background: #f8f9fa;
}
.lista-link {
  flex: 1 1 240px;
  min-width: 0;
  font-weight: 500;
  text-decoration: none;
}
.lista-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.lista-link:focus-visible {
  outline: 0;
}
.lista-link:focus-visible::after {
  outline: 3px solid var(--foco);
  outline-offset: -3px;
  border-radius: var(--raio);
}
.lista-empresa {
  display: inline-block;
  min-width: 10rem;
}
.lista-empresa + .texto-suave {
  font-weight: 400;
  white-space: nowrap;
}
.lista-valor {
  min-width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Tabelas ---------- */

/* Tabela larga rola dentro da própria caixa, sem esticar a página. */
.tabela-rolagem {
  position: relative; /* segura o texto escondido (.sr-only) dentro da caixa */
  overflow-x: auto;
}
.tabela {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.tabela th,
.tabela td {
  padding: 12px;
}
.tabela :is(th, td):first-child {
  padding-left: 24px;
}
.tabela :is(th, td):last-child {
  padding-right: 24px;
}
.cartao .tabela :is(th, td):first-child {
  padding-left: 0;
}
.cartao .tabela :is(th, td):last-child {
  padding-right: 0;
}
.tabela thead th {
  padding-block: 14px 10px;
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.tabela :is(tbody, tfoot) :is(th, td) {
  border-top: 1px solid var(--linha);
}
.tabela tbody th {
  font-weight: 600;
}
.tabela tfoot :is(th, td) {
  font-weight: 600;
}
.tabela .num {
  text-align: right;
  white-space: nowrap;
}
.tabela small {
  display: block;
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 400;
}

/* ---------- Botões ---------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: var(--texto);
  text-align: center;
  text-decoration: none;
  background: var(--branco);
  border: 1px solid var(--contorno);
  border-radius: 8px;
  cursor: pointer;
}
.botao:hover {
  background: var(--fundo);
}
.botao-primario {
  color: #fff;
  background: var(--primario);
  border-color: var(--primario);
}
.botao-primario:hover {
  background: var(--primario-escuro);
}
/* Pede atenção sem ser erro: falta alguém responder. */
.botao-alerta {
  color: var(--ambar);
  background: var(--ambar-fundo);
  border-color: var(--ambar-borda);
}
.botao-alerta:hover {
  background: #fae8c5;
}
/* Apaga ou descarta: ícone, contorno e palavra, para não se confundir com a marca. */
.botao-perigo {
  --icone: url("icones/trash-2.df56930b1c6e.svg");
  color: var(--vermelho);
  border-color: var(--vermelho);
}
.botao-perigo:hover {
  background: var(--vermelho-fundo);
}
.botao-discreto {
  padding-inline: 12px;
  font-weight: 500;
  background: transparent;
  border-color: transparent;
}
.botao-discreto:hover {
  background: var(--neutro-fundo);
}
.botao[disabled] {
  color: #6a7178;
  background: var(--neutro-fundo);
  border-color: var(--neutro-fundo);
  cursor: not-allowed;
}

/* ---------- Selos ---------- */

.selo {
  display: inline-block;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--texto-suave);
  background: var(--neutro-fundo);
  border-radius: 6px;
}
.selo-ok {
  color: var(--verde);
  background: var(--verde-fundo);
}
.selo-alerta {
  color: var(--ambar);
  background: var(--ambar-fundo);
}
.selo-erro {
  color: var(--vermelho);
  background: var(--vermelho-fundo);
  outline: 1px solid var(--vermelho);
  outline-offset: -1px;
}

/* ---------- Mensagens, avisos e erros ---------- */

.mensagens {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.mensagens li,
.erro,
.aviso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  font-weight: 500;
  color: var(--ambar);
  background: var(--ambar-fundo);
  border: 1px solid transparent;
  border-radius: 8px;
}
.mensagens li::before,
.erro::before,
.aviso::before {
  margin-top: 2px;
}
.mensagens .msg-success {
  color: var(--verde);
  background: var(--verde-fundo);
}
.mensagens .msg-info {
  color: var(--texto);
  background: var(--branco);
}
.mensagens .msg-error,
.erro {
  color: var(--vermelho);
  background: var(--vermelho-fundo);
  border-color: var(--vermelho);
}

/* ---------- Parte que abre e fecha ---------- */

.dobra > summary {
  --icone: url("icones/chevron-right.fba19b519aea.svg");
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 52px;
  padding: 10px 24px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.dobra > summary::-webkit-details-marker {
  display: none;
}
.dobra > summary::before {
  color: var(--texto-suave);
  transition: rotate 0.15s;
}
.dobra[open] > summary::before {
  rotate: 90deg;
}
.dobra > summary:hover {
  background: #f8f9fa;
}
.dobra > summary:focus-visible {
  outline-offset: -3px;
}
.dobra > summary > .texto-suave {
  font-weight: 400;
}
.lista > * + * {
  border-top: 1px solid var(--linha);
}
.dobra > .tabela-rolagem {
  border-radius: 0;
}

/* ---------- Início: uma linha por fatura, com o anel do progresso ---------- */

.faturas {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fatura {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  padding: 22px 24px;
}
.anel {
  flex: none;
  width: 72px;
  height: 72px;
}
.anel circle {
  fill: none;
  stroke: var(--borda);
  stroke-width: 8;
}
.anel .anel-feito {
  stroke: var(--marca);
  transform: rotate(-90deg);
  transform-origin: center;
}
.anel text {
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--texto);
}
.fatura-texto {
  flex: 1 1 280px;
  min-width: 0;
}
.fatura-texto a {
  text-decoration: none;
}
.fatura-texto a:hover {
  text-decoration: underline;
}
.fatura-texto p {
  margin: 3px 0 0;
  color: var(--texto-suave);
}
.fatura-total {
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fatura .botao {
  min-height: 46px;
}
.inicio-cartoes {
  margin-top: 12px;
}
.inicio-perfil {
  margin: 36px 0 0;
  font-size: 13px;
}

/* ---------- Entrada e páginas de erro ---------- */

.pagina-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}
.login-cartao {
  width: 100%;
  max-width: 400px;
  padding: 32px;
}
.login-cartao .marca {
  margin-bottom: 28px;
}
.login-cartao h1 {
  margin-bottom: 16px;
}
.login-cartao .botao {
  width: 100%;
  min-height: 48px;
}
.formulario label {
  display: block;
  margin: 16px 0 4px;
  font-weight: 500;
}
.formulario input {
  width: 100%;
  height: 44px;
}
.formulario .erro {
  margin-top: 12px;
}
.formulario .botao {
  margin-top: 20px;
}

/* ---------- Fatura: de quem é cada cartão, quem já preencheu ---------- */

.bloco {
  margin-bottom: 20px;
}
.chamada small,
.lembrar small {
  color: var(--texto-suave);
  font-size: 13px;
}
.chamada small {
  display: block;
}
.lembrar {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  margin: -6px 0; /* o botão não deixa a linha mais alta que as outras */
}
.falta {
  font-weight: 600;
  color: var(--ambar);
}
.tabela .grupo th {
  padding-top: 20px;
}
.dados {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 24px;
}
.dados dl {
  flex: 1 1 300px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 0;
}
.dados dt {
  color: var(--texto-suave);
  font-size: 13px;
}
.dados dd {
  margin: 2px 0 0;
}
.dobra-pe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 24px 16px;
}
.dobra-pe:not(:has(*)) {
  display: none;
}

.destinatario-todos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-top: 8px;
}
.destinatario-todos select {
  width: 24rem;
}
.destinatario-linha {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 4fr;
  align-items: end;
  gap: 6px 24px;
  min-width: 0;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--linha);
}
.destinatario-linha > legend {
  float: left; /* deixa a legenda entrar na grade */
  align-self: center;
  padding: 0;
}
.destinatario-linha > legend span {
  display: block;
}
/* A faixa vermelha vai até a borda da superfície, sem tirar os campos do alinhamento. */
.destinatario-linha-erro {
  margin-inline: -24px;
  padding-inline: 24px;
  box-shadow: inset 4px 0 0 var(--vermelho);
}
.destinatario-erro {
  grid-column: 2;
  margin: 0;
  font-weight: 600;
  color: var(--vermelho);
}
.destinatario-campos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
.destinatario-campos label {
  flex: 1 1 170px;
  min-width: 0;
}
.destinatario-campos label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--texto-suave);
  font-size: 13px;
}
.destinatario-campos :is(select, input) {
  width: 100%;
}
.destinatario-linha + .botao {
  margin-top: 8px;
}
.destinatario-ou {
  align-self: flex-end;
  color: var(--texto-suave);
  line-height: 40px;
}

.area-upload {
  margin-bottom: 20px;
  padding: 40px 16px;
  text-align: center;
  background: var(--fundo);
  border: 2px dashed var(--contorno-campo);
  border-radius: var(--raio);
}
.area-upload:hover,
.area-upload.arrastando {
  border-color: var(--primario);
}
.area-upload input {
  max-width: 100%;
  font: inherit;
}
.area-upload ::file-selector-button {
  min-height: 44px;
  margin-right: 12px;
  padding: 0 18px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: var(--branco);
  border: 1px solid var(--contorno);
  border-radius: 8px;
  cursor: pointer;
}
.carregar-vencimento {
  margin-bottom: 24px;
}
.carregar-vencimento label {
  margin-right: 8px;
  font-weight: 500;
}
.carregar-vencimento p {
  margin: 6px 0 0;
}

/* Sem largura para as colunas: cada linha da tabela vira um bloco, com o nome da coluna ao lado. */
@media (max-width: 760px) {
  .tabela-blocos,
  .tabela-blocos tbody {
    display: block;
  }
  .tabela-blocos thead {
    position: absolute;
    clip-path: inset(50%);
  }
  .tabela-blocos tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding: 12px 16px;
  }
  .tabela-blocos tr + tr {
    border-top: 1px solid var(--linha);
  }
  .tabela.tabela-blocos tbody :is(th, td) {
    padding: 0;
    text-align: left;
    border: 0;
  }
  .tabela.tabela-blocos tbody th {
    flex: 1 0 100%;
  }
  .tabela-blocos td[data-rotulo]::before {
    content: attr(data-rotulo) " ";
    color: var(--texto-suave);
  }
  .tabela-blocos td:has(form) {
    flex: 1 0 100%;
  }
  .tabela-blocos .so-computador {
    display: none;
  }
  .lembrar {
    margin: 4px 0;
  }
  .destinatario-linha {
    grid-template-columns: minmax(0, 1fr);
  }
  .destinatario-linha-erro {
    margin-inline: -16px;
    padding-inline: 16px;
  }
  .destinatario-erro {
    grid-column: 1;
  }
  .destinatario-ou {
    flex: 1 0 100%;
    line-height: 1.2;
  }
}

/* ---------- Meu extrato (portal do colaborador) ---------- */

.lista-estado {
  min-width: 11rem;
  text-align: right;
}

/* Uma linha por compra, e as ações sempre à vista. */
.extrato-ajuda {
  margin-bottom: 14px;
}
.extrato-caixa {
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  background: var(--branco);
  border-radius: var(--raio);
}
.extrato-tabela {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.extrato-tabela .col-data { width: 8.5rem; }
.extrato-tabela .col-estab { width: 26%; }
.extrato-tabela .col-valor { width: 7rem; }
.extrato-tabela .col-dep { width: 12rem; }
.extrato-tabela th,
.extrato-tabela td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.extrato-tabela :is(th, td):first-child {
  padding-left: 24px;
}
.extrato-tabela :is(th, td):last-child {
  padding-right: 24px;
}
.extrato-tabela .num {
  text-align: right;
  white-space: nowrap;
}
.extrato-tabela thead th {
  padding-block: 14px 10px;
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 500;
}
.extrato-tabela tbody tr,
.extrato-tabela tfoot tr {
  border-top: 1px solid var(--linha);
}
.extrato-tabela tfoot td {
  padding-block: 14px;
  font-weight: 600;
}
.extrato-compra-data {
  color: var(--texto-suave);
  white-space: nowrap;
}
.extrato-compra-descricao {
  font-weight: 500;
}
.extrato-compra-valor {
  font-weight: 600;
}
.extrato-compra label,
.extrato-rotulo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.extrato-compra :is(select, input[type="text"]) {
  display: block;
  width: 100%;
}
.extrato-compra-erro {
  box-shadow: inset 4px 0 0 var(--vermelho);
}
.extrato-erro {
  margin: 4px 0 0;
  color: var(--vermelho);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.extrato-lido small {
  display: block;
  color: var(--texto-suave);
  font-size: 13px;
}
.extrato-acoes {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--branco);
  border-radius: var(--raio);
  box-shadow: 0 -1px 0 var(--borda), 0 -6px 16px rgb(28 31 35 / 0.06);
}
.extrato-acoes > .texto-suave {
  margin-right: auto;
}
.extrato-acoes strong {
  color: var(--texto);
}
/* O campo que recebe o foco nunca fica escondido atrás da barra. */
html:has(.extrato-acoes) {
  scroll-padding-bottom: 5.5rem;
}

@container (max-width: 820px) {
  .extrato-tabela .col-data { width: 8.2rem; }
  .extrato-tabela .col-estab { width: 22%; }
  .extrato-tabela .col-valor { width: 6.2rem; }
  .extrato-tabela .col-dep { width: 9rem; }
}
/* Sem largura para as colunas: cada compra vira um bloco, com o rótulo ao lado de cada campo. */
@container (max-width: 680px) {
  .extrato-tabela,
  .extrato-tabela tbody {
    display: block;
  }
  .extrato-tabela thead,
  .extrato-tabela colgroup {
    display: none;
  }
  .extrato-tabela tbody tr,
  .extrato-tabela tfoot,
  .extrato-tabela tfoot tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .extrato-tabela tbody tr {
    gap: 0 12px;
    padding: 14px 16px;
  }
  .extrato-tabela tfoot {
    grid-template-columns: 1fr;
  }
  .extrato-tabela tfoot td {
    padding: 12px 16px;
  }
  .extrato-tabela tfoot td:first-child {
    padding-left: 16px;
  }
  .extrato-tabela tfoot td:last-child {
    display: none;
  }
  .extrato-tabela .extrato-compra :is(th, td) {
    grid-column: 1 / -1;
    padding: 0;
  }
  .extrato-compra-valor ~ td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    align-items: center;
    margin-top: 8px;
  }
  .extrato-compra-valor ~ td > :is(small, .extrato-erro) {
    grid-column: 2;
  }
  .extrato-tabela .extrato-compra .extrato-compra-descricao {
    grid-area: 1 / 1;
    font-weight: 600;
  }
  .extrato-tabela .extrato-compra .extrato-compra-valor {
    grid-area: 1 / 2;
  }
  .extrato-compra-data {
    font-size: 13px;
  }
  .extrato-compra label,
  .extrato-rotulo {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    color: var(--texto-suave);
    font-size: 13px;
  }
  .extrato-compra :is(select, input[type="text"]) {
    height: 44px;
    font-size: 16px; /* menos que isso faz o iPhone dar zoom ao tocar no campo */
  }
}
@media (max-width: 700px) {
  /* A barra fica mais alta: o texto vai para uma linha só dele. */
  html:has(.extrato-acoes) {
    scroll-padding-bottom: 8rem;
  }
  .extrato-acoes {
    flex-wrap: wrap;
    margin: 16px -16px 0;
    padding: 8px 16px 12px;
    border-radius: 0;
  }
  .extrato-acoes > .texto-suave {
    flex: 1 0 100%;
    text-align: center;
  }
  .extrato-acoes-ajuda {
    display: none;
  }
  .extrato-acoes .botao {
    flex: 1;
  }
}

/* ---------- Campo sugerido (Meu extrato e Contas a pagar): o único azul das telas ---------- */

[data-sugerido],
.legenda-sugerido::before {
  background-color: var(--azul-fundo);
  border: 1px solid var(--azul-borda);
  box-shadow: inset 3px 0 0 var(--azul);
}
/* Vence a cor comum dos campos. */
[data-sugerido]:is(input, select, .lido) {
  background-color: var(--azul-fundo);
  border-color: var(--azul-borda);
}
.legenda-sugerido {
  white-space: nowrap;
}
.legenda-sugerido::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 14px;
  margin-right: 5px;
  border-radius: 4px;
  vertical-align: -2px;
}
span[data-sugerido] {
  position: relative; /* segura o texto escondido (.sr-only) dentro da caixa de rolagem */
  padding: 2px 6px 2px 8px;
  border-radius: 6px;
}

/* ---------- Painel "Extratos dos colaboradores" ---------- */

.painel-acoes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.painel-acoes > * > .botao,
.painel-acoes > .botao {
  padding-inline: 14px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .painel-acoes {
    align-items: flex-start;
    margin-top: 6px;
  }
}

/* Janela pequena por cima da página (popover do navegador: Esc ou um clique fora fecha). */
.janela {
  width: min(28rem, 100% - 32px);
  padding: 24px;
  color: inherit;
  text-align: left;
  border: 0;
  border-radius: var(--raio);
}
.janela::backdrop {
  background: rgb(28 31 35 / 0.45);
}
.janela p {
  margin: 6px 0 16px;
}
.janela input {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
}

/* ---------- Listas do Omie ---------- */

.listas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 16px;
}
.listas form {
  margin-top: 16px;
}
.listas .tabela {
  margin: 12px 0;
}
.listas .tabela :is(th, td) {
  padding-block: 9px;
}

/* ---------- Visto do gestor ---------- */

.visto-cabeca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
section + section > .visto-cabeca {
  margin-top: 36px;
}
.visto-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--branco);
  border-radius: var(--raio);
}
/* O botão fica por cima do canto direito do resumo: assim as compras, abertas, usam a linha toda. */
.visto-item {
  --visto-acao: 12.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--visto-acao);
}
.visto-item + .visto-item {
  border-top: 1px solid var(--linha);
}
.visto-item:target {
  box-shadow: inset 4px 0 0 var(--primario);
}
.visto-item > details {
  grid-area: 1 / 1 / 2 / -1;
  min-width: 0;
}
.visto-acao {
  grid-area: 1 / 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 72px;
  padding-right: 24px;
  text-align: right;
  pointer-events: none; /* só o botão recebe o clique; o resto abre o extrato */
}
.visto-acao .botao {
  pointer-events: auto;
}
.visto-item summary {
  --icone: url("icones/chevron-right.fba19b519aea.svg");
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px var(--visto-acao) 10px 20px;
  list-style: none;
  border-radius: var(--raio);
  cursor: pointer;
}
.visto-item summary::-webkit-details-marker {
  display: none;
}
.visto-item summary::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--texto-suave);
  mask: var(--icone) center / contain no-repeat;
  transition: rotate 0.15s;
}
.visto-item details[open] > summary::before {
  rotate: 90deg;
}
.visto-item summary:hover {
  background: #f8f9fa;
}
.visto-item summary:focus-visible {
  outline-offset: -3px;
}
.visto-quem {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.visto-quem .texto-suave span + span::before {
  content: ", ";
}
.visto-total {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.visto-compras {
  padding: 0 24px 16px 50px;
}
.visto-compras table {
  width: 100%;
  table-layout: fixed; /* as colunas ficam alinhadas de um extrato para o outro */
  border-collapse: collapse;
}
.visto-compras th:first-child {
  width: 7rem;
}
.visto-compras th:nth-child(2) {
  width: 30%;
}
.visto-compras th:nth-child(3) {
  width: 18%;
}
.visto-compras th:last-child {
  width: 7rem;
}
.visto-compras th,
.visto-compras td {
  padding: 9px 16px 9px 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--linha);
  overflow-wrap: anywhere;
}
.visto-compras th {
  border-top: 0;
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 500;
}
.visto-compras .num {
  padding-right: 0;
  text-align: right;
}
.visto-compras .visto-data,
.visto-compras .visto-valor {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.visto-falta {
  color: var(--ambar);
}

@media (max-width: 700px) {
  .visto-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .visto-item > details {
    grid-area: 1 / 1;
  }
  .visto-acao {
    grid-area: 2 / 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 0 16px 16px 42px;
  }
  .visto-acao form,
  .visto-acao .botao {
    width: 100%;
  }
  .visto-item summary {
    align-items: flex-start;
    min-height: 0;
    padding: 14px 16px 10px 12px;
  }
  .visto-item summary::before {
    margin-top: 2px;
  }
  .visto-quem .texto-suave span {
    display: block;
  }
  .visto-quem .texto-suave span + span::before {
    content: none;
  }
  .visto-compras {
    padding: 0 16px 12px 42px;
  }
  /* Cada compra vira um bloco: local e valor em cima; data, departamento e descrição embaixo. */
  .visto-compras thead {
    display: none;
  }
  .visto-compras table,
  .visto-compras tbody {
    display: block;
  }
  .visto-compras tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--linha);
  }
  .visto-compras td {
    padding: 0;
    border: 0;
  }
  .visto-compras .visto-local {
    grid-area: 1 / 1 / 2 / 3;
    font-weight: 600;
  }
  .visto-compras .visto-valor {
    grid-area: 1 / 3;
  }
  .visto-compras .visto-data {
    grid-area: 2 / 1;
    color: var(--texto-suave);
  }
  .visto-compras .visto-departamento {
    grid-area: 2 / 2 / 3 / 4;
  }
  .visto-compras .visto-descricao {
    grid-area: 3 / 1 / 4 / 4;
  }
}

/* ========== Tutorial na tela (botão "?"): início ==========
   O botão é criado por tutorial.js no fim da barra do topo; a dica da primeira visita, acima do
   título da página. */

.ajuda-botao {
  flex: none;
  width: 36px;
  height: 36px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--texto);
  background: var(--branco);
  border: 1px solid var(--contorno);
  border-radius: 50%;
  cursor: pointer;
}
.ajuda-botao:hover {
  background: var(--fundo);
}
.ajuda-convite {
  display: flex;
  width: fit-content;
  margin: -14px 0 14px auto;
  background: var(--branco);
  border-radius: 8px;
}
.ajuda-convite button {
  min-height: 44px;
  padding: 0 8px 0 16px;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.ajuda-convite-texto {
  font-weight: 500;
  text-decoration: underline var(--contorno);
  text-underline-offset: 3px;
}
.ajuda-convite .ajuda-dispensar {
  width: 44px;
  padding: 0;
  font-size: 20px;
}

/* O passeio: um <dialog> que cobre a janela; a sombra enorme da "luz" é o que escurece o resto. */
.tutorial {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}
.tutorial::backdrop {
  background: transparent;
}
.tutorial-luz {
  position: absolute;
  border-radius: var(--raio);
  outline: 3px solid #fff;
  box-shadow: 0 0 0 200vmax rgb(28 31 35 / 0.72);
}
.tutorial-cartao {
  position: absolute;
  width: 22rem;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 20px;
  color: var(--texto);
  background: var(--branco);
  border-radius: var(--raio);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.35);
}
.tutorial-cartao:focus {
  outline: 0;
}
.tutorial-cartao h2 {
  margin: 0 32px 6px 0;
}
.tutorial-cartao p {
  margin: 0;
  font-size: 16px;
}
.tutorial-cartao .tutorial-contador {
  position: absolute;
  bottom: 32px;
  font-size: 14px;
  color: var(--texto-suave);
}
.tutorial-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.tutorial-fechar {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  font: inherit;
  font-size: 22px;
  color: var(--texto-suave);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.tutorial-fechar:hover {
  background: var(--neutro-fundo);
}
/* ========== Tutorial na tela: fim ========== */

/* ---------- Celular ---------- */

@media (max-width: 700px) {
  h1 {
    font-size: 24px;
  }
  .pagina {
    padding: 22px 16px 40px;
  }
  .cartao,
  .vazio,
  .fatura {
    padding: 18px 16px;
  }
  .lista-item,
  .dobra > summary,
  .dados,
  .dobra-pe {
    padding-inline: 16px;
  }
  .tabela :is(th, td):first-child {
    padding-left: 16px;
  }
  .tabela :is(th, td):last-child {
    padding-right: 16px;
  }
  .pagina-acoes,
  .pagina-acoes > *,
  .pagina-acoes .botao,
  .chamada > form,
  .chamada .botao,
  .fatura > .botao {
    width: 100%;
  }
  .pagina-acoes .botao-discreto {
    width: auto;
  }
  /* O total fica ao lado do anel e do nome quando cabe; o botão sempre ocupa a linha. */
  .fatura {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 16px;
  }
  .fatura .anel {
    grid-row: 1 / 3;
  }
  .fatura-total {
    grid-column: 2;
    font-size: 16px;
  }
  .fatura > .botao {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
  .dobra > summary > .texto-suave {
    margin-left: 28px;
  }
  .lista-estado {
    min-width: 0;
    text-align: left;
  }
  .lista-link {
    flex-basis: 100%;
  }
  .lista-item {
    column-gap: 12px;
  }
  .lista-empresa,
  .lista-valor {
    min-width: 0;
  }
  .lista-valor {
    margin-left: auto;
  }
  .ajuda-convite {
    margin-top: -8px;
  }
  .login-cartao {
    padding: 24px 20px;
  }
}
