/* Documentos do chat (03/10/2026): pop-up da ficha — lista, filtros, tags e Kanban.
   web/js/documentos-chat.js. Visual minimalista (03/10, pedido do Pedro): sem bordas pesadas,
   linhas com separador fino, ações em ícone que aparecem no hover. Cor do selo vem de .ds-tipo-* (documentos-salvos.css). */
.modal-caixa:has(.dc-janela) { max-width: min(1040px, 94vw); width: 94vw; padding: 0; overflow: hidden; display: flex; }
.dc-janela { display: flex; flex-direction: column; position: relative; width: 100%; max-height: 88vh; min-height: 0; }

/* topo */
.dc-topo { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px 22px; }
.dc-titulo { display: flex; align-items: baseline; gap: 10px; margin-right: auto; min-width: 0; }
.dc-titulo h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.dc-titulo small { color: var(--texto-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dc-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--fundo-3); }
.dc-seg button { border: 0; background: transparent; color: var(--texto-2); font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: background .15s, color .15s; }
.dc-seg button:hover { color: var(--texto); }
.dc-seg button.ativo { background: var(--fundo-2); color: var(--texto); box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.dc-icone { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--texto-3); cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.dc-icone:hover, .dc-icone:focus-visible { background: var(--fundo-3); color: var(--texto); outline: none; }

/* filtros */
.dc-filtros { display: flex; flex-direction: column; gap: 10px; padding: 0 22px 14px; border-bottom: 1px solid var(--borda); }
.dc-busca { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--fundo-3); color: var(--texto-3); cursor: text; transition: box-shadow .15s; }
.dc-busca:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ouro) 45%, transparent); }
.dc-busca input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--texto); font: inherit; font-size: 14px; padding: 0; outline: none; box-shadow: none; }
.dc-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-chips[hidden] { display: none; }
.dc-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--texto-2);
  font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.dc-chip b { font-weight: 500; font-size: 11.5px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.dc-chip:hover { background: var(--fundo-3); color: var(--texto); }
.dc-chip.ativo { background: var(--texto); color: var(--fundo-2); }
.dc-chip.ativo b { color: inherit; opacity: .6; }
.dc-chip-tag.ativo { background: color-mix(in srgb, var(--ouro) 22%, transparent); color: var(--texto); }
.dc-extra { display: flex; align-items: center; gap: 6px; }
.dc-campo { height: 30px; border: 0; border-radius: 8px; background: var(--fundo-3); color: var(--texto-2); font: inherit; font-size: 12.5px; padding: 0 8px; }
.dc-campo:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--ouro) 45%, transparent); color: var(--texto); }
.dc-ate { color: var(--texto-3); font-size: 12px; }

/* corpo */
.dc-corpo { flex: 1; min-height: 160px; max-height: min(62vh, 600px); overflow: auto; padding: 6px 12px 12px; }
.dc-vazio { text-align: center; color: var(--texto-3); font-size: 13px; padding: 48px 8px; margin: 0; }
.dc-dica { padding: 10px 22px 14px; color: var(--texto-3); font-size: 11.5px; border-top: 1px solid var(--borda); }
.dc-dica[hidden] { display: none; }

/* lista */
.dc-lista { display: flex; flex-direction: column; }
.dc-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 10px; transition: background .12s; }
.dc-lista .dc-item + .dc-item { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--borda) 60%, transparent); }
.dc-item:hover { background: var(--fundo-3); }
.dc-lista .dc-item:hover, .dc-lista .dc-item:hover + .dc-item { box-shadow: none; }
.dc-mini, .dc-selo { flex: none; width: 40px; height: 40px; border-radius: 9px; }
.dc-mini { object-fit: cover; cursor: zoom-in; }
.modal-caixa .dc-mini { border-radius: 9px; }
.dc-selo { display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: var(--c, var(--texto-3)); background: color-mix(in srgb, var(--c, var(--texto-3)) 14%, transparent); }
.dc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--texto); }
.dc-info small { color: var(--texto-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.dc-quem::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--texto-3); }
.dc-quem-cliente::before { background: var(--info); }
.dc-quem-escritorio::before { background: var(--ouro); }
.dc-acoes { flex: none; display: flex; gap: 2px; align-items: center; opacity: 0; transition: opacity .12s; }
.dc-item:hover .dc-acoes, .dc-item:focus-within .dc-acoes { opacity: 1; }
.dc-indisp { font-size: 11.5px; color: var(--texto-3); }

/* tags */
.dc-tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.dc-tag { display: inline-flex; align-items: center; font-size: 11.5px; padding: 1px 2px 1px 8px; border-radius: 6px;
  color: var(--texto-2); background: color-mix(in srgb, var(--ouro) 14%, transparent); }
.dc-tag-x { border: 0; background: transparent; color: var(--texto-3); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 5px; opacity: 0; transition: opacity .12s; }
.dc-tag:hover .dc-tag-x, .dc-tag-x:focus-visible { opacity: 1; color: var(--texto); }
.dc-tag-novo { width: 56px; height: 20px; font-size: 11.5px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--texto-2);
  opacity: 0; transition: opacity .12s, width .15s, background .15s; }
.dc-item:hover .dc-tag-novo, .dc-tag-novo:focus, .dc-tag-novo:not(:placeholder-shown) { opacity: 1; }
.dc-tag-novo:focus { width: 120px; outline: none; background: var(--fundo-2); box-shadow: 0 0 0 1px var(--borda-forte); }

/* kanban */
.dc-kanban { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 6px 0 8px; }
.dc-coluna { flex: 0 0 264px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; min-height: 140px;
  background: color-mix(in srgb, var(--fundo-3) 55%, transparent); transition: background .15s, box-shadow .15s; }
.dc-coluna.alvo { background: color-mix(in srgb, var(--ouro) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ouro) 50%, transparent); }
.dc-coluna h4 { display: flex; align-items: center; gap: 6px; margin: 0 2px 4px; font-size: 12px; font-weight: 600; color: var(--texto-2); }
.dc-coluna h4 b { font-weight: 500; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.dc-cartao { cursor: grab; flex-wrap: wrap; align-items: flex-start; background: var(--fundo-2); box-shadow: var(--sombra); }
.dc-cartao:hover { background: var(--fundo-2); box-shadow: 0 0 0 1px var(--borda-forte); }
.dc-cartao:active { cursor: grabbing; }
.dc-cartao .dc-acoes { width: 100%; justify-content: flex-end; margin-top: -4px; }

/* foto ampliada por cima do pop-up */
.dc-zoom { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 18px;
  background: color-mix(in srgb, var(--fundo) 96%, transparent); backdrop-filter: blur(6px); animation: dc-entrar .15s ease-out; }
.dc-zoom-topo { display: flex; align-items: center; gap: 4px; }
.dc-zoom-topo .dc-nome { flex: 1; min-width: 0; }
.dc-zoom img { flex: 1; min-height: 0; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 10px; }
@keyframes dc-entrar { from { opacity: 0; } to { opacity: 1; } }

@media (hover: none) {
  .dc-acoes, .dc-tag-x, .dc-tag-novo { opacity: 1; }
}
@media (max-width: 640px) {
  .dc-topo { padding: 14px 12px 10px 16px; }
  .dc-filtros { padding: 0 16px 12px; }
  .dc-corpo { padding: 4px 6px 10px; }
  .dc-extra { width: 100%; }
  .dc-extra .dc-campo { flex: 1; min-width: 0; }
  .dc-coluna { flex-basis: 78vw; }
}
