/* WhatsApp do setor — Eventos, Orçamento, Pequenos Reparos (Thiago 21/11/2026). Mesmo padrão da caixa da Assistência (whatsapp.css):
   amarelo + preto, cartões do Dashboard. Regra-mãe de alinhamento (15/11): nada de rolagem lateral, botões quebram em linhas iguais,
   conferido em 360/400/1024/1366/1920. */
.ws-topo { display: grid; gap: 10px; }
.ws-topo .pilulas button em { background: var(--marca); color: #111; border-radius: 999px; padding: 0 6px; font-weight: 800; }
.ws-topo-acoes { justify-content: flex-end; }
.ws-topo-acoes > .peq.muted { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.ws-mesa { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; margin: 0 24px; }
.ws-mesa > .cartao { margin: 18px 0 0; min-width: 0; }
.ws-lista { padding: 12px; display: grid; gap: 8px; }
.ws-busca { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ws-filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; }
.ws-filtros button { width: 100%; justify-content: center; white-space: nowrap; }
.ws-l { max-height: 68vh; overflow-y: auto; overflow-x: hidden; display: grid; gap: 6px; align-content: start; }
.ws-item { display: grid; gap: 4px; width: 100%; text-align: left; background: #fff; border: 1px solid #ececea; border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; text-decoration: none; min-width: 0; }
.ws-item:hover { border-color: var(--marca); } .ws-item.on { border-color: #111; box-shadow: inset 4px 0 0 var(--marca); }
.ws-item-t { display: flex; justify-content: space-between; gap: 8px; min-width: 0; } .ws-item-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-item-t small { color: #777; font-size: 11px; white-space: nowrap; }
.ws-item-m { font-size: 12.5px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-item .chips, .ws-cab .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-chat { display: grid; gap: 8px; min-height: 460px; align-content: start; }
.ws-cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; border-bottom: 1px solid #ececea; padding-bottom: 8px; }
.ws-cab-nome { min-width: 0; display: grid; gap: 3px; } .ws-cab-nome b { font-size: 16px; overflow-wrap: anywhere; } .ws-cab-nome small { color: #666; font-size: 12px; overflow-wrap: anywhere; }
.ws-cab-acoes { justify-content: flex-end; gap: 6px; }
.ws-voltar { display: none; }
.ws-proc { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-proc-i { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--marca-suave); border: 1px solid #f2e2a6; border-radius: 10px; padding: 5px 8px; font-size: 12.5px; min-width: 0; }
.ws-proc-i small { color: #6b5a12; }
.ws-msgs { background: #efeae2; border-radius: 12px; padding: 12px; height: 52vh; min-height: 300px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 6px; }
.ws-antigas { align-self: center; }
.ws-msg { max-width: 78%; padding: 7px 10px 4px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08); overflow-wrap: anywhere; min-width: 0; position: relative; }
.ws-msg.cliente { background: #fff; align-self: flex-start; } .ws-msg.equipe { background: #d9fdd3; align-self: flex-end; }
.ws-msg.nao-saiu { border: 1px solid var(--perigo); }
.ws-rodape { display: block; text-align: right; color: #667781; font-size: 10.5px; margin-top: 2px; } .ws-falhou { color: var(--perigo); }
.ws-msg-acoes { display: none; flex-wrap: wrap; gap: 2px; margin-top: 2px; } .ws-msg:hover .ws-msg-acoes, .ws-msg:focus-within .ws-msg-acoes { display: flex; }
@media (hover: none) { .ws-msg-acoes { display: flex; } }
.ws-msg-acoes .btn { padding: 2px 6px; font-size: 11.5px; }
.ws-cit { display: grid; gap: 1px; background: rgba(0,0,0,.05); border-left: 3px solid var(--marca); border-radius: 6px; padding: 4px 7px; margin-bottom: 4px; font-size: 12px; }
.ws-cit b { font-size: 11.5px; } .ws-cit span { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-citando { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.ws-img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; } .ws-video { max-width: 100%; } .ws-msg audio { max-width: 100%; width: 260px; }
.ws-carregar { display: grid; place-items: center; gap: 2px; width: 200px; max-width: 100%; aspect-ratio: 4 / 3; background: #d4d0c8; border: 2px dashed #9b968c; border-radius: 10px; cursor: pointer; font: inherit; color: #333; }
.ws-carregar small { font-size: 11px; color: #555; } .ws-carregar:hover { border-color: var(--preto); }
.ws-cartao { display: grid; gap: 6px; background: rgba(255,255,255,.7); border: 1px solid #ddd; border-radius: 10px; padding: 8px; margin: 2px 0; }
.ws-cartao small { display: block; color: #666; font-size: 11.5px; }
.ws-edicoes { margin-top: 4px; font-size: 12px; } .ws-edicoes summary { cursor: pointer; color: #555; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ws-ed { border-left: 3px solid #ccc; padding: 3px 7px; margin-top: 4px; } .ws-ed small { color: #777; font-size: 10.5px; } .ws-ed-de { color: #555; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); }
.ws-apagada { display: grid; gap: 4px; } .ws-apagada .tag { justify-self: start; }
.ws-sel { position: absolute; left: -26px; top: 6px; } .ws-msg.equipe .ws-sel { left: auto; right: calc(100% + 6px); }
.ws-msgs:has(.ws-sel) .ws-msg.cliente { margin-left: 26px; }
.ws-selbar { background: var(--preto); color: var(--marca); border-radius: 10px; padding: 8px 10px; }
.ws-resp { display: grid; gap: 8px; } .ws-resp textarea { min-height: 64px; }
.ws-resp-acoes { gap: 6px; } .ws-resp-acoes .ws-enviar { margin-left: auto; min-width: 110px; }
.ws-fim { justify-content: space-between; }
.ws-mais { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 10px 0; } .ws-mais .btn { white-space: normal; text-align: center; }
.ws-escolha { max-height: 50vh; overflow-y: auto; display: grid; gap: 4px; margin: 8px 0; }
.ws-op { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; border: 1px solid #ececea; border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.ws-op small { display: block; color: #777; font-size: 11.5px; } .ws-op b { overflow-wrap: anywhere; }
.ws-scripts { max-height: 46vh; overflow-y: auto; display: grid; gap: 6px; margin: 8px 0; }
.ws-script { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; border: 1px solid #ececea; border-radius: 10px; padding: 6px; }
.ws-script-usar { text-align: left; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; min-width: 0; } .ws-script-usar small { display: block; color: #666; overflow-wrap: anywhere; }
.ws-grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.ws-busca-cab { justify-content: space-between; }
.ws-proc-setor { border: 1px solid #ececea; border-radius: 12px; padding: 10px; margin-bottom: 10px; display: grid; gap: 6px; }
.ws-proc-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .ws-mesa { grid-template-columns: minmax(0, 1fr); margin: 0 12px; }
  .ws-mesa.com-conversa > .ws-lista { display: none; }
  .ws-mesa:not(.com-conversa) > .ws-chat { display: none; }
  .ws-voltar { display: inline-flex; grid-column: 1 / -1; justify-self: start; }
  .ws-cab { grid-template-columns: auto minmax(0, 1fr); } .ws-cab-acoes { justify-content: flex-start; grid-column: 1 / -1; }
  .ws-msg { max-width: 90%; }
  .ws-topo-acoes { justify-content: flex-start; } .ws-topo-acoes > .peq.muted { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .ws-topo.cartao { margin: 12px 12px 0; padding: 12px; }
  .ws-busca { grid-template-columns: minmax(0, 1fr); }
  .ws-grade2 { grid-template-columns: minmax(0, 1fr); }
  .ws-resp-acoes .btn { flex: 1 1 calc(50% - 6px); } .ws-resp-acoes .ws-enviar { flex-basis: 100%; margin-left: 0; }
  .ws-cab-acoes .btn { flex: 1 1 calc(50% - 6px); }
  .ws-msgs { height: 58vh; }
}
/* conversa única do processo (Thiago 23/11/2026) */
.cu-msgs { height: 56vh; }
.cu-canal { margin-bottom: 2px; } .cu-canal .tag { font-size: 10.5px; padding: 1px 6px; }
.cu-troca { align-self: center; background: #fff7cc; color: #5a4a00; border-radius: 8px; padding: 3px 10px; font-size: 12px; margin: 6px 0; }
.dado .contatar { margin-top: 6px; }

/* paridade com o Redento (Thiago 23/11/2026): foto, lista por dia, ordenar, emoji, foto ampliada */
.ws-item { grid-template-columns: 40px minmax(0, 1fr); align-items: start; column-gap: 10px; }
.ws-item-c { display: grid; gap: 4px; min-width: 0; }
.ws-ava { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--preto, #111); color: var(--marca); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; overflow: hidden; flex: none; }
.ws-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ws-ava.grande { width: 48px; height: 48px; font-size: 16px; }
.ws-grupo { display: grid; gap: 6px; margin-bottom: 8px; }
.ws-grupo-t { display: flex; justify-content: space-between; align-items: center; background: none; border: 0; border-bottom: 1px solid #ececea; padding: 6px 2px; font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #555; cursor: pointer; text-align: left; }
.ws-grupo-t em { font-style: normal; background: #f1f1ef; border-radius: 999px; padding: 0 8px; font-size: 11px; }
.ws-ordem { display: flex; justify-content: flex-end; margin: 6px 0 8px; } .ws-ordem label { display: flex; align-items: center; gap: 6px; } .ws-ordem select { width: auto; min-width: 170px; padding: 4px 8px; }
.ws-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; background: #fff; border: 1px solid #ececea; border-radius: 12px; padding: 6px; max-height: 180px; overflow: auto; }
.ws-emojis button { background: none; border: 0; font-size: 20px; line-height: 1; padding: 6px 0; border-radius: 8px; cursor: pointer; } .ws-emojis button:hover { background: var(--marca-suave, #fff7d1); }
.ws-lupa { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; cursor: zoom-out; }
.ws-lupa img { max-width: 96vw; max-height: 84vh; border-radius: 10px; object-fit: contain; }
.ws-fin-l { max-height: 55vh; overflow: auto; display: grid; gap: 6px; margin: 8px 0; }
.ws-fin-msgs { max-height: 60vh; overflow: auto; }

/* ===== WHATSAPP EM GUIA PRÓPRIA — só o atendimento (Filipe 25/11/2026: "mais visualização para os analistas") ===== */
.wa-foco .cabecalho, .wa-foco .faixa-real, .wa-foco .selo-teste, .wa-foco #app > .titulo { display: none !important; }
.wa-foco body.modo-real, .wa-foco body { padding-top: 0 !important; background: #f4f4f2; }
.wa-foco .conteudo { padding: 0 !important; }
.wa-foco .ws-topo.cartao { margin: 16px 24px 0; padding: 14px 20px; }
.wa-foco .ws-mesa { margin: 0 24px; gap: 20px; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); align-items: stretch; }
.wa-foco .ws-mesa > .cartao { margin-top: 16px; }
.wa-foco .ws-lista { padding: 16px; gap: 10px; }
.wa-foco .ws-l { max-height: calc(100vh - 330px); }
.wa-foco .ws-chat { padding: 18px 22px; gap: 12px; }
.wa-foco .ws-msgs { height: calc(100vh - 430px); min-height: 300px; padding: 20px 28px; gap: 10px; }
.wa-foco .ws-msg { font-size: 15px; line-height: 1.5; padding: 9px 13px 6px; max-width: 72%; }
.wa-foco .ws-resp textarea { min-height: 76px; font-size: 15px; }
@media (max-width: 1100px) { .wa-foco .ws-mesa { grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 14px; margin: 0 12px; } .wa-foco .ws-topo.cartao { margin: 12px 12px 0; } .wa-foco .ws-msgs { padding: 14px 16px; } }
@media (max-width: 820px) { .wa-foco .ws-mesa { grid-template-columns: minmax(0, 1fr); margin: 0 8px; } .wa-foco .ws-msgs { height: calc(100vh - 300px); } .wa-foco .ws-msg { max-width: 86%; } .wa-foco .ws-l { max-height: none; } }

/* menu do botão direito (Filipe 25/11/2026) */
.ws-ctx { position: fixed; z-index: 10000; min-width: 230px; background: #fff; border: 1px solid #e6e6e3; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 6px; display: grid; }
.ws-ctx button { all: unset; box-sizing: border-box; cursor: pointer; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #1b1b1b; }
.ws-ctx button:hover, .ws-ctx button:focus-visible { background: #f4f4f1; }
.ws-ctx button.perigo { color: #b42318; }
.ws-ctx-sep { height: 1px; background: #ececea; margin: 4px 6px; }

/* ===== GUIA DO WHATSAPP v2 (Filipe 25/11/2026): a PÁGINA não rola; a lista de contatos rola por dentro; a conversa ocupa a tela ===== */
html.wa-foco, html.wa-foco body { height: 100%; overflow: hidden; }
.wa-foco #app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding: 0 !important; }
.wa-foco .ws-topo.cartao { flex: 0 0 auto; margin: 8px 14px 0; padding: 8px 14px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 12px; }
.wa-foco .ws-topo #wsFaixa { grid-column: 1 / -1; } .wa-foco .ws-topo #wsFaixa:empty { display: none; }
.wa-foco .ws-mesa { flex: 1 1 auto; min-height: 0; margin: 8px 14px 10px; gap: 12px; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.wa-foco .ws-mesa > .cartao { margin: 0 !important; min-height: 0; height: 100%; }
.wa-foco .ws-lista { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow: hidden; }
.wa-foco .ws-lista > * { flex: 0 0 auto; }
.wa-foco .ws-lista .ws-l { flex: 1 1 auto; min-height: 0; max-height: none !important; overflow-y: auto; }
.wa-foco .ws-chat { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; overflow: hidden; min-height: 0 !important; }
.wa-foco .ws-chat > * { flex: 0 0 auto; }
.wa-foco .ws-chat > .ws-msgs { flex: 1 1 auto; height: auto !important; min-height: 0 !important; padding: 16px 22px; }
.wa-foco .ws-cab { padding-bottom: 6px; }
.wa-foco .ws-resp { gap: 4px; }
.wa-foco .ws-resp textarea { min-height: 46px !important; height: 46px; font-size: 15px; resize: vertical; }
.wa-foco .ws-resp-acoes { gap: 6px; margin: 0; }
.wa-foco .ws-resp-acoes .btn { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 820px) {
  .wa-foco .ws-topo.cartao { grid-template-columns: minmax(0, 1fr); }
  .wa-foco .ws-mesa { grid-template-columns: minmax(0, 1fr); margin: 6px 6px 8px; }
}
@media (max-width: 820px) { .wa-foco #app:has(.ws-mesa.com-conversa) .ws-topo { display: none; } .wa-foco .ws-cab-acoes .btn { padding-top: 5px; padding-bottom: 5px; } }   /* celular: conversa aberta usa a tela toda (Filipe 25/11/2026) */

/* barra de digitar estilo WhatsApp + cabeçalho número/nome do WhatsApp (Filipe 25/11/2026) */
.ws-linha-digitar { display: flex; align-items: flex-end; gap: 8px; }
.ws-linha-digitar textarea { flex: 1 1 auto; min-width: 0; }
.ws-linha-digitar .ws-mic, .ws-linha-digitar .ws-enviar { flex: 0 0 auto; width: 46px; height: 46px; min-width: 46px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.ws-linha-digitar .ws-mic.perigo { width: auto; border-radius: 23px; padding: 0 14px; }
.ws-linha-digitar .ws-enviar[disabled] { width: auto; border-radius: 23px; padding: 0 14px; }
.ws-resp-acoes .ws-enviar { display: none; }
.ws-cab-nome .ws-cab-wa { display: block; font-size: 13px; color: #3f3f3f; font-weight: 600; margin-top: 1px; }

/* ===== 25/11/2026 Filipe (REGRA FIXA): "remova todos esses filtros abaixo do campo de pesquisa, deixe apenas o campo de pesquisa,
   aumente o tamanho da lista e ao clicar na conversa diminua esse cabeçalho do associado — MAIS VISUALIZAÇÃO AO BATE-PAPO" ===== */
#wsFil, .ws-ordem, #wsBusca > button { display: none !important; }
#wsBusca { display: block; } #wsBusca .inp { width: 100%; }
.ws-mesa { grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); }
.ws-l { max-height: 80vh; }
.wa-foco .ws-mesa { grid-template-columns: minmax(340px, 480px) minmax(0, 1fr); }
/* cabeçalho da conversa compacto: uma faixa fina, o espaço vai para as mensagens */
.ws-cab { align-items: center; gap: 8px; padding-bottom: 4px !important; }
.ws-cab .ws-ava.grande { width: 30px; height: 30px; font-size: 12px; }
.ws-cab-nome { gap: 1px; } .ws-cab-nome b { font-size: 14px; line-height: 1.2; } .ws-cab-nome small, .ws-cab-wa { font-size: 11px !important; line-height: 1.25; }
.ws-cab .chips { gap: 3px; } .ws-cab .chips .tag, .ws-cab .chips .btn { font-size: 11px; padding: 1px 7px; min-height: 0; }
.ws-cab-acoes { gap: 4px !important; } .ws-cab-acoes .btn { font-size: 12px; padding: 3px 9px; min-height: 0; }
.ws-proc { flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
.ws-proc-i { flex: 0 0 auto; padding: 2px 6px; font-size: 11.5px; gap: 4px; } .ws-proc-i .btn { font-size: 11px; padding: 1px 7px; min-height: 0; }
.ws-chat { gap: 4px; }

/* filtro pequeno de analista (Filipe 25/11/2026) */
.ws-ordem { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; }
.ws-analista select { font-size: 12px; padding: 3px 6px; height: auto; min-height: 0; width: auto; }
/* 25/11/2026 Filipe: "coloque apenas um filtro, pequeno e sem muito destaque" — dos filtros escondidos (regra de 09:57) volta SO o de analista (Lucas / Samara) */
.ws-ordem:has(#wsAna) { display: flex !important; justify-content: flex-start; margin: 2px 0 4px; }
.ws-ordem:has(#wsAna) > label:not(.ws-analista) { display: none; }
.ws-analista { font-size: 11.5px; color: #8a8a85; gap: 5px; } .ws-analista select { font-size: 11.5px; padding: 2px 6px; border-radius: 8px; min-width: 0 !important; }

/* 25/11/2026: áudio instantâneo — balão na hora com "enviando…" animado */
.ws-pend { opacity: .92; } .ws-pend audio { max-width: 260px; height: 36px; }
.ws-pend-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; } .ws-pend-st .btn { padding: 1px 8px; font-size: 11px; min-height: 0; }
.ws-gira { width: 11px; height: 11px; border: 2px solid #8aa; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: ws-gira .7s linear infinite; }
@keyframes ws-gira { to { transform: rotate(360deg); } }

/* 25/11/2026 Felipe Lago via Bulma: no balão só o ⋮ (igual ao WhatsApp); as opções abrem no menu */
.ws-tres { position: absolute; top: 3px; right: 4px; width: 24px; height: 22px; border: 0; border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 22px; text-align: center; color: #54656f; background: inherit; opacity: 0; transition: opacity .12s; padding: 0; }
.ws-msg.cliente .ws-tres { background: linear-gradient(to right, rgba(255,255,255,0), #fff 35%); width: 30px; }
.ws-msg.equipe .ws-tres { background: linear-gradient(to right, rgba(217,253,211,0), #d9fdd3 35%); width: 30px; }
.ws-msg:hover .ws-tres, .ws-tres:focus-visible, .ws-msg:focus-within .ws-tres { opacity: 1; }
.ws-tres:hover { color: #111; }
@media (hover: none) { .ws-tres { opacity: .85; } }

/* 26/11/2026 — Felipe Lago via Bulma: indicador discreto de mensagens não lidas. */
.ws-item-c { position: relative; min-width: 0; }
.ws-item-c:has(.ws-nao-lidas) .ws-item-m, .ws-item-c:has(.ws-nao-lidas) .chips { padding-right: 56px; }
.ws-nao-lidas { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #19a85b; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
