/* Workflow jurídico (18/10/2026) — só o que é desta tela (prefixo jw-).
   O resto são as peças do quadro de referência: cm-* (comercial/funil.css),
   cg-* (card de Garantia) e cx-* (card do comex). Cores pelos tokens do tema. */

#jwRoot .jw-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
#jwRoot .jw-titulo .painel-title { margin: 0; }
#jwRoot .jw-barra .cm-busca-caixa { min-width: 360px; }

/* miniatura */
#jwRoot .jw-card, .afz-lote--juridico .jw-card { position: relative; }
#jwRoot .jw-pend, .afz-lote--juridico .jw-pend { position: absolute; top: 7px; right: 7px; }
#jwRoot .jw-card-sub, .afz-lote--juridico .jw-card-sub { font-size: 10.5px; color: var(--text-2, var(--text-secondary)); line-height: 1.35; margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#jwRoot .jw-urgente, .afz-lote--juridico .jw-urgente { background: #fdecea; color: #b3261e; border-color: transparent; }
#jwRoot .jw-qtd, .afz-lote--juridico .jw-qtd { font-size: 10px; color: var(--text-2, var(--text-secondary)); white-space: nowrap; }
#jwRoot .jw-antigos { display: block; width: 100%; margin-top: 6px; padding: 7px; background: none; cursor: pointer;
  border: 1px dashed var(--border, var(--card-border)); border-radius: 8px; color: var(--text-2, var(--text-secondary)); font-size: 11.5px; }
#jwRoot .jw-antigos:hover { color: var(--ink, var(--text-primary)); }

/* card aberto */
#jwRoot .jw-faixa { margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; font-size: 12.5px; line-height: 1.5;
  background: var(--surface-2, #f3f3f1); color: var(--text-2, var(--text-secondary)); }
#jwRoot .jw-faixa--ok { background: #e8f4ec; color: #1e6b3a; }
#jwRoot .jw-faixa--no { background: #fdecea; color: #a1281e; }
#jwRoot .jw-faixa--falta { background: #fdf3e6; color: #8a5a12; }
#jwRoot .jw-obrig { font-style: normal; color: #d93025; }
#jwRoot .cm-f.jw-falta > label { color: #d93025; }
#jwRoot .cm-f.jw-falta .cm-val { border-color: #d93025; box-shadow: 0 0 0 2px rgba(217,48,37,.10); }
#jwRoot .jw-check { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 0; }

/* anexos */
#jwRoot .jw-anx-lista { display: flex; flex-direction: column; gap: 8px; }
#jwRoot .jw-anx-lista--novo { padding: 10px; border: 1px dashed var(--border, var(--card-border)); border-radius: 8px; }
#jwRoot .jw-anx { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, var(--card-border));
  border-radius: 8px; background: var(--surface, #fff); }
#jwRoot .jw-anx-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#jwRoot .jw-anx-nome { font-size: 12.5px; color: var(--ink, var(--text-primary)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
#jwRoot a.jw-anx-nome:hover { text-decoration: underline; }
#jwRoot .jw-anx-sub { font-size: 10.5px; color: var(--text-2, var(--text-secondary)); }
#jwRoot .jw-anx-b { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border, var(--card-border)); background: none; color: var(--text-2, var(--text-secondary)); text-decoration: none; font-size: 13px; }
#jwRoot .jw-anx-x:hover { color: #d93025; border-color: #d93025; }
#jwRoot .jw-anx.is-fora { opacity: .65; }
#jwRoot .jw-anx.is-fora .jw-anx-nome { text-decoration: line-through; }
#jwRoot .jw-anx-add { align-self: flex-start; }

/* histórico */
#jwRoot .jw-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#jwRoot .jw-hist li { padding-left: 12px; border-left: 2px solid var(--border, var(--card-border)); }
#jwRoot .jw-hist-o { font-size: 12.5px; font-weight: 600; color: var(--ink, var(--text-primary)); }
#jwRoot .jw-hist-t { font-size: 12px; color: var(--text-2, var(--text-secondary)); margin-top: 2px; white-space: pre-line; }
#jwRoot .jw-hist-ass { font-size: 9.5px; color: var(--text-2, var(--text-secondary)); margin-top: 3px; }

/* encerrar: o desfecho */
#jwRoot .jw-desf { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
#jwRoot .jw-desf-op { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border, var(--card-border));
  border-radius: 8px; cursor: pointer; }
#jwRoot .jw-desf-op input { margin: 0; }
#jwRoot .jw-desf-op small { display: block; font-size: 11.5px; color: var(--text-2, var(--text-secondary)); }
#jwRoot .jw-desf-op.is-off { opacity: .5; cursor: not-allowed; }
#jwRoot .jw-desf-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; }
#jwRoot .jw-desf-ico--ok { background: #1e8449; }
#jwRoot .jw-desf-ico--no { background: #c0392b; }
#jwRoot .jw-cnpj .cm-combo-op span { margin-left: auto; font-family: var(--font-mono, monospace); font-size: 10.5px; color: var(--text-2, var(--text-secondary)); }
/* encerramento que registra o contrato (ou o distrato) em Contratos */
#jwRoot .jw-ct { margin: 4px 0 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2, #f7f7f4); }
#jwRoot .jw-ct[hidden] { display: none; }
#jwRoot .jw-ct-tit { font-size: 13px; color: var(--ink, var(--text-primary)); margin-bottom: 4px; }
/* o badge (absoluto) não cobre a BU nem a etiqueta da miniatura */
#jwRoot .jw-card .cm-card-head { padding-right: 30px; }

/* "A fazer" de Tarefas (2026-10-18, PADROES §34): opened embedded
   (?embed=afazer), the board is hidden and only the case modal and its side
   panel show. The .afz-lote--juridico selectors above draw the miniature in
   Tarefas exactly as on the board. */
html.em-afazer #jwModal, html.em-afazer #jwSec { visibility: visible; }
#jwRoot .jw-ct .cm-f-nota { margin-bottom: 10px; }
