/* AF Advocacia — follow-up do lead. 23/08/2026
   As cores saem das variáveis do próprio sistema, então o bloco acompanha o
   tema claro e o escuro sem precisar de dois conjuntos de regras. */

/* ---------- etiqueta no card ---------- */

.afl-pill {
  display: block;
  width: 100%;
  margin-top: .5rem;
  padding: .3rem .5rem;
  border-radius: .4rem;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: filter .12s ease;
}
.afl-pill:hover { filter: brightness(.96); }

.afl-atrasado {
  background: hsl(var(--destructive) / .12);
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / .3);
}
.afl-hoje {
  background: #fff4e0;
  color: #a35b00;
  border-color: #f0c789;
}
.afl-perto {
  background: #eaf4ff;
  color: #1c5fa8;
  border-color: #bcd9f5;
}
.afl-longe {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-color: hsl(var(--border));
}
.afl-vazio-pill { }
.afl-pill.afl-vazio {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: 1px dashed hsl(var(--border));
  font-weight: 500;
}

/* ---------- modal ---------- */

.afl-fundo {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 18, 22, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.afl-caixa {
  width: min(720px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card, 0 0% 100%));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: .8rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.afl-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
}
.afl-titulo { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.afl-titulo strong { font-size: 1rem; }
.afl-sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.afl-x {
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: hsl(var(--muted-foreground));
}
.afl-x:hover { color: hsl(var(--foreground)); }

.afl-corpo { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; }

.afl-secao {
  margin: .25rem 0 .6rem;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: hsl(var(--muted-foreground));
}

.afl-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.afl-largo { grid-column: 1 / -1; }

.afl-campo { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.afl-rot { font-size: 12px; font-weight: 600; }
.afl-campo select,
.afl-campo input,
.afl-campo textarea {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid hsl(var(--border));
  border-radius: .45rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
}
.afl-campo textarea { min-height: 74px; resize: vertical; }

.afl-chips { display: flex; gap: .4rem; }
.afl-chip {
  flex: 1;
  padding: .4rem .2rem;
  border: 1px solid hsl(var(--border));
  border-radius: .45rem;
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.afl-chip-on.afl-chip-sucesso  { background: #e7f6ec; color: #1f7a41; border-color: #b6e0c6; }
.afl-chip-on.afl-chip-sem      { background: #fff4e0; color: #a35b00; border-color: #f0c789; }
.afl-chip-on.afl-chip-recusado { background: hsl(var(--destructive) / .12); color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / .3); }

.afl-acoes { display: flex; gap: .35rem; margin-left: auto; }
.afl-acoes .afl-mini { margin-left: 0; }

.afl-rodape {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  margin: 1rem 0 .25rem;
}
.afl-recado { font-size: 12px; color: hsl(var(--muted-foreground)); }
.afl-botao {
  padding: .45rem .9rem;
  border: 1px solid hsl(var(--border));
  border-radius: .45rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.afl-botao:disabled { opacity: .6; cursor: default; }
.afl-primario {
  background: hsl(var(--primary, 222 47% 11%));
  color: hsl(var(--primary-foreground, 0 0% 100%));
  border-color: transparent;
}
.afl-mini { padding: .2rem .5rem; font-size: 11px; margin-left: auto; }

/* ---------- histórico ---------- */

.afl-lista { display: flex; flex-direction: column; gap: .6rem; }
.afl-item {
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  padding: .6rem .7rem;
}
.afl-item-feito { opacity: .68; }
.afl-item-cab { display: flex; align-items: center; gap: .5rem; }
.afl-marca {
  padding: .12rem .45rem;
  border-radius: .3rem;
  font-size: 11px;
  font-weight: 700;
}
.afl-marca.afl-feito { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.afl-item-data { font-size: 11px; color: hsl(var(--muted-foreground)); }
.afl-item-tags { margin-top: .3rem; font-size: 11px; color: hsl(var(--muted-foreground)); }
.afl-item-passo { margin-top: .3rem; font-size: 13px; font-weight: 600; }
.afl-item-nota { margin-top: .25rem; font-size: 12px; white-space: pre-wrap; }
.afl-vazio { font-size: 12px; color: hsl(var(--muted-foreground)); margin: .2rem 0; }

/* ---------- Dashboard ---------- */

.afl-quadro { cursor: pointer; }
.afl-quadro-cab {
  display: flex; align-items: center; justify-content: space-between;
}
.afl-quadro-tit { font-size: 14px; font-weight: 600; }
.afl-quadro-ico { font-size: 14px; color: hsl(var(--muted-foreground)); }
.afl-quadro-num { font-size: 30px; font-weight: 700; line-height: 1.2; margin-top: .35rem; }
.afl-quadro-pe { font-size: 12px; color: hsl(var(--muted-foreground)); }
.afl-quadro-alerta .afl-quadro-num { color: hsl(var(--destructive)); }

.afl-bloco {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: .75rem;
  background: hsl(var(--card, 0 0% 100%));
}
.afl-bloco-cab h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.afl-bloco-sub { font-size: 12px; color: hsl(var(--muted-foreground)); margin: .15rem 0 .9rem; }

.afl-colunas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 860px) { .afl-colunas { grid-template-columns: 1fr; } }

.afl-coluna { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.afl-coluna-tit {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .25rem .5rem;
  border-radius: .35rem;
  align-self: flex-start;
}

.afl-mini-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .1rem .5rem;
  width: 100%;
  text-align: left;
  padding: .45rem .55rem;
  border: 1px solid hsl(var(--border));
  border-radius: .45rem;
  background: transparent;
  cursor: pointer;
}
.afl-mini-item:hover { background: hsl(var(--muted) / .5); }
.afl-mini-nome { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afl-mini-hora { font-size: 11px; color: hsl(var(--muted-foreground)); }
.afl-mini-passo {
  grid-column: 1 / -1;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- marca no menu ---------- */

.afl-ponto {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: hsl(var(--destructive));
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  pointer-events: none;
}

/* ---------- aviso na hora ---------- */

.afl-avisos {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 330px;
}
.afl-aviso {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .7rem 2rem .7rem .8rem;
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--destructive));
  border-radius: .5rem;
  background: hsl(var(--card, 0 0% 100%));
  color: hsl(var(--foreground));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
  font-size: 12px;
  cursor: pointer;
  transition: opacity .8s ease;
}
.afl-aviso strong { font-size: 12.5px; }
.afl-aviso-saindo { opacity: 0; }
.afl-aviso-x {
  position: absolute;
  top: .3rem; right: .4rem;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1rem; line-height: 1;
  color: hsl(var(--muted-foreground));
}
