/* AF Advocacia — recebimentos parciais na parcela. 22/08/2026 */

.afr-painel {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px dashed hsl(var(--border));
  font-size: .75rem;
}

.afr-resumo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.afr-resumo-txt { color: hsl(var(--muted-foreground)); }

.afr-lista {
  margin: .5rem 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.afr-linha {
  display: grid;
  grid-template-columns: 5.5rem 7rem 1fr auto auto;
  align-items: center;
  gap: .5rem;
  padding: .3rem .5rem;
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  background: hsl(var(--background));
}

.afr-data { color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.afr-valor { font-weight: 600; font-variant-numeric: tabular-nums; }
.afr-forma { color: hsl(var(--foreground)); }
.afr-origem { color: hsl(var(--muted-foreground)); font-style: italic; }

.afr-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
}

.afr-campo {
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: .3rem .5rem;
  font-size: .75rem;
  min-width: 7rem;
}
.afr-campo-valor { max-width: 7rem; }

.afr-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 9999px;
  padding: .3rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.afr-btn:hover:not(:disabled) { background: hsl(var(--muted)); }
.afr-btn:disabled { opacity: .5; cursor: default; }

.afr-primario {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border-color: hsl(var(--foreground));
}
.afr-primario:hover:not(:disabled) { background: hsl(var(--foreground) / .9); }

.afr-discreto { border-color: transparent; color: hsl(var(--muted-foreground)); }

.afr-remover {
  border-color: transparent;
  color: hsl(var(--destructive));
  padding: .1rem .45rem;
  font-size: .9rem;
  line-height: 1;
}
.afr-remover:hover:not(:disabled) { background: hsl(var(--destructive) / .08); }

.afr-recado {
  flex-basis: 100%;
  color: hsl(var(--muted-foreground));
}
.afr-recado.afr-erro { color: hsl(var(--destructive)); }

/* ---------- forma de pagamento como lista ---------- */

.afr-forma-sel {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: .55rem .6rem;
  font-size: .875rem;
}

/* o campo original continua vivo para o React, mas fora do caminho */
.afr-forma-oculta {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- apagar lançamento avulso ---------- */

.afr-linha-avulso { position: relative; }

/* a coluna existe so para o botao: encosta na direita e nao quebra linha */
.afr-col-acao {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  padding-right: .75rem;
}

.afr-apagar {
  margin-left: 0;
  border-color: transparent;
  color: hsl(var(--muted-foreground));
  padding: .2rem .6rem;
}
.afr-apagar:hover:not(:disabled) {
  background: hsl(var(--destructive) / .08);
  color: hsl(var(--destructive));
}

/* no segundo clique o botão assume a cor do que vai fazer */
.afr-apagar-firme {
  background: hsl(var(--destructive));
  color: #fff;
  border-color: hsl(var(--destructive));
}
.afr-apagar-firme:hover:not(:disabled) {
  background: hsl(var(--destructive) / .9);
  color: #fff;
}

/* recado passageiro quando a exclusão não pôde acontecer: o botão volta a
   ser botão depois de alguns segundos, em vez de morrer na tela */
.afr-apagar-aviso {
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / .35);
  background: hsl(var(--destructive) / .06);
}
