/* Harvey: mesa do advogado (redesenho de 15/10/2026). Prefixo hv- e
   harvey- para não colidir com o resto. Tudo dentro de um cartão só:
   barra do topo, filtros, conversa e barra de digitar. */
.hv { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; background: #fff; border: 1px solid #e4e7e2;
  border-radius: 18px; box-shadow: 0 1px 2px rgba(15,31,20,.04), 0 12px 32px -18px rgba(15,31,20,.18); overflow: hidden; }

/* Barra do topo */
.hv-topo { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #eef0ec; }
.hv-topo-foto { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; }
.hv-topo-txt { flex: 1; min-width: 0; }
.hv-topo-txt strong { display: block; font-size: 16px; font-weight: 700; color: #0f1f14; line-height: 1.2; }
.hv-topo-txt span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #6b7368; }
.hv-topo-txt span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2f8a4a; }
.hv-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent;
  color: #3d4539; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hv-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hv-btn:hover { background: #f2f4f0; color: #0f1f14; }

/* Ajuda (abre pelo botão Como usar) */
.hv-ajuda { padding: 14px 20px; background: #fafbf9; border-bottom: 1px solid #eef0ec; font-size: 13.5px; line-height: 1.55; color: #3d4539; }
.hv-ajuda p { margin: 0 0 6px; }
.hv-ajuda ul { margin: 0; padding-left: 18px; }
.hv-ajuda li { margin: 3px 0; }

/* Filtros */
.hv-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 20px; border-bottom: 1px solid #eef0ec; }
.hv-esp { display: flex; gap: 4px; background: #f2f4f0; padding: 3px; border-radius: 10px; }
.hv-esp button { border: 0; background: transparent; color: #4b5348; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hv-esp button.ativo { background: #fff; color: #1f6b3a; box-shadow: 0 1px 2px rgba(15,31,20,.12); }
.hv-campos { display: flex; gap: 6px; margin-left: auto; }
.hv-campos input { width: 130px; height: 34px; border: 1px solid #e1e5df; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13px; background: #fff; }
.hv-campos input[data-f="uf"] { width: 56px; text-transform: uppercase; }
.hv-campos input:focus { outline: none; border-color: #2f7a3b; }

/* Conversa */
.hv-conversa { overflow-y: auto; padding: 24px 28px 8px; display: flex; flex-direction: column; gap: 16px; background: #fcfdfb; min-height: 380px; }
.hv-boas { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 4px; }
.hv-boas img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hv-boas h3 { margin: 12px 0 4px; font-size: 19px; font-weight: 700; color: #0f1f14; }
.hv-boas p { margin: 0; max-width: 560px; font-size: 14px; line-height: 1.55; color: #5b6359; }
.hv-atalhos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 760px; width: 100%; margin: 18px auto 0; }
.hv-atalho { text-align: left; border: 1px solid #e4e7e2; background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.hv-atalho strong { display: block; font-size: 14px; color: #0f1f14; margin-bottom: 3px; }
.hv-atalho span { display: block; font-size: 12.5px; line-height: 1.45; color: #6b7368; }
.hv-atalho:hover { border-color: #9cc3a4; box-shadow: 0 4px 14px -8px rgba(31,107,58,.45); transform: translateY(-1px); }

.hv-linha { display: flex; gap: 10px; align-items: flex-start; max-width: 82%; }
.hv-linha img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: 0 0 auto; margin-top: 2px; }
.hv-msg { font-size: 15px; line-height: 1.65; color: #1c241a; overflow-wrap: anywhere; }
.hv-ia { padding: 2px 0; }
.hv-eu { align-self: flex-end; max-width: 72%; background: #edf5ee; border-radius: 16px 16px 4px 16px; padding: 10px 14px; }
.hv-pensando { display: inline-flex; gap: 5px; align-items: center; color: #8a9287; padding: 10px 0; }
.hv-pensando i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: hv-pulso 1.2s infinite ease-in-out; }
.hv-pensando i:nth-child(2) { animation-delay: .2s; } .hv-pensando i:nth-child(3) { animation-delay: .4s; }
@keyframes hv-pulso { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Barra de digitar (estilo WhatsApp, larga) */
.hv-digitar { padding: 12px 20px 10px; background: #fff; border-top: 1px solid #eef0ec; }
.hv-anexos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hv-anexos[hidden] { display: none; }
.hv-anexo { display: inline-flex; align-items: center; gap: 6px; background: #f2f4f0; border-radius: 8px; padding: 5px 6px 5px 10px; font-size: 12.5px; color: #3d4539; }
.hv-anexo svg { width: 14px; height: 14px; fill: none; stroke: #1f6b3a; stroke-width: 2; }
.hv-anexo button { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: #6b7368; padding: 0 4px; }
.hv-anexo.lendo { font-style: italic; color: #6b7368; }
.hv-caixa { display: flex; align-items: flex-end; gap: 6px; border: 1px solid #dfe3dc; border-radius: 22px; padding: 8px 8px 8px 6px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.hv-caixa:focus-within { border-color: #2f7a3b; box-shadow: 0 0 0 4px rgba(47,122,59,.10); }
.hv-caixa textarea { flex: 1; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; line-height: 1.55; min-height: 52px; max-height: 40vh; padding: 6px 4px; background: transparent; }
.hv-redondo { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #5b6359; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hv-redondo svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hv-redondo:hover { background: #f2f4f0; color: #1f6b3a; }
.hv-enviar { background: #1f6b3a; color: #fff; }
.hv-enviar:hover { background: #185a30; color: #fff; }
.hv-enviar:disabled { opacity: .45; cursor: default; }
.hv-mic.gravando { background: #c0392b; color: #fff; animation: hv-pulso 1.4s infinite; }
.hv-rodape { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 11.5px; color: #8a9287; line-height: 1.4; }
.hv-rodape b { color: #5b6359; font-weight: 600; }
.hv-rodape > span:last-child { white-space: nowrap; }

@media (max-width: 720px) {
  .hv-atalhos { grid-template-columns: 1fr; }
  .hv-campos { margin-left: 0; width: 100%; }
  .hv-campos input { flex: 1; width: auto; }
  .hv-btn span { display: none; }
  .hv-conversa { padding: 16px; }
  .hv-linha, .hv-eu { max-width: 100%; }
  .hv-rodape { flex-direction: column; }
}

/* Quadro de ajuda e botão do manual da tela do Luca (js/sections/luca.js) */
.harvey-sobre { border: 1px solid #e4e7e2; border-radius: 12px; background: #fff; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.harvey-sobre summary { cursor: pointer; font-weight: 700; color: #1f6b3a; }
.harvey-sobre p { margin: 8px 0 4px; }
.harvey-sobre ul { margin: 4px 0 8px 18px; padding: 0; }
.harvey-manual { border: 1px solid #2f7a3b; color: #2f7a3b; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }

/* Estrutura rica das respostas do Harvey (formatador compartilhado conversaTexto) */
.hv-msg p { margin: 0 0 6px; }
.hv-msg p:last-child { margin-bottom: 0; }
.hv-msg ul, .hv-msg ol { margin: 4px 0 6px; padding-left: 20px; }
.hv-msg ul { list-style: disc; }
.hv-msg ol { list-style: decimal; }
.hv-msg li { margin: 2px 0; padding-left: 2px; }
.hv-msg li::marker { color: #1f6b3a; }
.hv-msg li > ul { margin: 2px 0; padding-left: 16px; list-style: circle; }
.hv-msg h4.cv-titulo, .hv-msg p.cv-titulo { margin: 10px 0 3px; font-size: 14px; font-weight: 700; line-height: 1.35; color: #0f1f14; }
.hv-msg > h4.cv-titulo:first-child, .hv-msg > p.cv-titulo:first-child { margin-top: 0; }
.hv-msg em { font-style: italic; }
.hv-msg table.cv-tabela { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 6px 0; font-size: 13px; line-height: 1.4; }
.hv-msg table.cv-tabela th, .hv-msg table.cv-tabela td { border: 1px solid #dfe3dc; padding: 4px 8px; text-align: left; vertical-align: top; }
.hv-msg table.cv-tabela th { background: #f2f4f0; font-weight: 700; }
.hv-msg hr { border: 0; border-top: 1px solid #e4e7e2; margin: 8px 0; }
