/* af-diligencias-20261009.css — aba "Diligências" da ficha do assistido */
.afdl-oculto { display: none !important; }
[data-af-dilig][data-afdl-n]:not([data-afdl-n=""])::after { content: attr(data-afdl-n); margin-left: .4rem; min-width: 1.15rem; height: 1.15rem;
  padding: 0 .3rem; border-radius: 999px; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.afdl-painel { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; max-width: 1100px; }
.afdl-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.afdl-h3 { font-size: 1.125rem; font-weight: 600; margin: 0; }
.afdl-sub { font-size: .78rem; color: hsl(var(--muted-foreground)); margin: .25rem 0 0; max-width: 46rem; }
.afdl-btn { padding: .45rem .9rem; border-radius: .6rem; border: 1px solid hsl(var(--border)); background: hsl(var(--primary));
  color: hsl(var(--primary-foreground)); font-size: .85rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.afdl-btn:hover { opacity: .9; }
.afdl-btn:disabled { opacity: .6; cursor: default; }
.afdl-btn-leve { background: hsl(var(--background)); color: hsl(var(--foreground)); }
.afdl-btn-leve:hover { background: hsl(var(--muted)); opacity: 1; }
.afdl-btn-perigo { color: #b91c1c; }
:is(.dark *) .afdl-btn-perigo { color: #fca5a5; }
.afdl-carregando, .afdl-vazio { font-size: .85rem; color: hsl(var(--muted-foreground)); padding: .9rem 1.1rem; margin: 0; }
.afdl-aviso { color: #b91c1c; font-size: .78rem; margin: 0; min-height: 1rem; }
:is(.dark *) .afdl-aviso { color: #fca5a5; }

/* formulário */
.afdl-form { border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem; }
.afdl-h4 { font-size: .95rem; font-weight: 600; margin: 0; }
.afdl-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.afdl-campo { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.afdl-c2 { grid-column: span 2; }
.afdl-c4 { grid-column: span 4; }
.afdl-rot { font-size: .78rem; font-weight: 600; color: hsl(var(--foreground)); }
.afdl-in { display: block; width: 100%; height: 2.5rem; padding: 0 .75rem; border-radius: .375rem; border: 1px solid hsl(var(--input, var(--border)));
  background: hsl(var(--background)); color: hsl(var(--foreground)); font-size: .875rem; }
.afdl-ta { height: auto; padding: .6rem .75rem; resize: vertical; line-height: 1.45; }
.afdl-form-pe { display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 760px) { .afdl-grade { grid-template-columns: 1fr 1fr; } .afdl-c4 { grid-column: span 2; } }
@media (max-width: 480px) { .afdl-grade { grid-template-columns: 1fr; } .afdl-c2, .afdl-c4 { grid-column: span 1; } .afdl-in { font-size: 16px; } }

/* lista */
.afdl-grupo, .afdl-feitos, .afdl-form { font-weight: 400; }
.afdl-grupo { border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); overflow: hidden; }
.afdl-grupo-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem;
  padding: .9rem 1.1rem; border-bottom: 1px solid hsl(var(--border)); }
.afdl-grupo-tit { font-weight: 600; font-size: .92rem; }
.afdl-cont { font-size: .75rem; color: hsl(var(--muted-foreground)); }
.afdl-card { display: flex; flex-direction: column; gap: .4rem; padding: .9rem 1.1rem; border-bottom: 1px solid hsl(var(--border)); }
.afdl-card:last-child { border-bottom: 0; }
.afdl-card-ok { opacity: .8; }
.afdl-card-topo { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .75rem; color: hsl(var(--muted-foreground)); }
.afdl-chip { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; background: hsl(var(--muted)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); }
.afdl-chip-contato { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.afdl-chip-email { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.afdl-chip-oficio { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.afdl-chip-visita { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.afdl-chip-pesquisa { background: #f3e8ff; color: #6b21a8; border-color: #e9d5ff; }
.afdl-chip-documento { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
:is(.dark *) .afdl-chip-contato { background: rgba(59,130,246,.18); color: #bfdbfe; border-color: rgba(59,130,246,.4); }
:is(.dark *) .afdl-chip-email { background: rgba(99,102,241,.18); color: #c7d2fe; border-color: rgba(99,102,241,.4); }
:is(.dark *) .afdl-chip-oficio { background: rgba(245,158,11,.18); color: #fcd34d; border-color: rgba(245,158,11,.4); }
:is(.dark *) .afdl-chip-visita { background: rgba(34,197,94,.18); color: #bbf7d0; border-color: rgba(34,197,94,.4); }
:is(.dark *) .afdl-chip-pesquisa { background: rgba(168,85,247,.18); color: #e9d5ff; border-color: rgba(168,85,247,.4); }
:is(.dark *) .afdl-chip-documento { background: rgba(249,115,22,.18); color: #fed7aa; border-color: rgba(249,115,22,.4); }
.afdl-data { font-variant-numeric: tabular-nums; font-weight: 600; }
.afdl-ok { color: #15803d; font-weight: 600; }
:is(.dark *) .afdl-ok { color: #86efac; }
.afdl-tit { font-size: .95rem; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.afdl-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.afdl-selo { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; padding: .12rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; line-height: 1.35; border: 1px solid hsl(var(--border)); background: hsl(var(--muted));
  color: hsl(var(--foreground)); overflow-wrap: anywhere; }
.afdl-selo-proc { background: transparent; }
.afdl-desc { font-size: .875rem; line-height: 1.5; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: hsl(var(--foreground)); }
.afdl-prox { font-size: .82rem; margin: 0; color: hsl(var(--foreground)); }
.afdl-retorno { font-size: .78rem; margin: 0; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.afdl-retorno-alerta { color: #b91c1c; font-weight: 600; }
:is(.dark *) .afdl-retorno-alerta { color: #fca5a5; }
.afdl-acoes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.afdl-acoes .afdl-btn { padding: .3rem .7rem; font-size: .78rem; }
.afdl-feitos { border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); overflow: hidden; }
.afdl-feitos > summary { cursor: pointer; padding: .7rem 1.1rem; font-size: .85rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
.afdl-feitos[open] > summary { border-bottom: 1px solid hsl(var(--border)); }
