/* ---------- WhatsApp: painel manual do vendedor e vários números (prefixo wa-) ---------- */
.wa-nums { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-nums .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.wa-nums .segmented svg { width: 13px; height: 13px; }
.wa-num { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 500; vertical-align: 1px; white-space: nowrap; }
.wa-num svg { width: 11px; height: 11px; }
.wa-num.oficial { background: var(--ok-soft); color: var(--ok); }
.wa-num.evolution { background: var(--info-soft); color: var(--info); }
.conv__tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.conv__tags .conv__tag { margin-top: 0; }
.chat__who b .wa-num { margin-left: 6px; }
.wa-janela { display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 7px 10px; border-radius: var(--r-sm); font-size: var(--fs-2xs); color: var(--tx-2); background: var(--s2); border: 1px solid var(--line); }
.wa-janela svg { width: 13px; height: 13px; flex: none; }
.wa-janela.oficial svg { color: var(--ok); }
.wa-janela.evolution { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.wa-janela.evolution svg { color: var(--warn); }

/* Painel lateral */
.wa__ctx .ctx__title { display: flex; align-items: center; gap: 8px; }
.wa__ctx .ctx__title small { margin-left: auto; font-weight: 400; font-size: var(--fs-2xs); }
.wa-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); color: var(--red-tx); }
.wa-link svg { width: 12px; height: 12px; }
.wa-lbl { display: block; font-size: var(--fs-2xs); color: var(--tx-3); margin: 2px 0 -4px; }
.wa-form { display: grid; gap: 8px; }
.wa-form label { display: grid; gap: 4px; font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-form .input, .wa__ctx .input { height: 34px; font-size: var(--fs-xs); width: 100%; }
.wa-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-2 > div { display: grid; gap: 4px; }
.wa-full { width: 100%; justify-content: center; }
.wa-ctx__sel { height: 34px; font-size: var(--fs-xs); width: 100%; }
.wa-hint { display: flex; gap: 6px; align-items: flex-start; font-size: 10.5px; line-height: 1.4; }
.wa-hint svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.wa-hint b { color: var(--tx-2); font-weight: 600; }
/* Fase do atendimento */
.wa-fases { display: flex; flex-wrap: wrap; gap: 4px; }
.wa-fases button { height: 26px; padding: 0 9px; border-radius: var(--r-pill); font-size: 10.5px; color: var(--tx-3); border: 1px solid var(--line-2); background: transparent; transition: all var(--t-fast); }
.wa-fases button:hover { color: var(--tx); border-color: var(--line-3); }
.wa-fases button.done { color: var(--tx-2); background: var(--s3); border-color: transparent; }
.wa-fases button.on { color: var(--tx); border-color: var(--red-line); background: var(--red-soft); font-weight: 600; }
.wa-fases button.on.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-soft); }
.wa-fases button.on.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.wa-fases button.on.info { border-color: color-mix(in srgb, var(--info) 45%, transparent); background: var(--info-soft); }
/* Etiquetas */
.wa-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.wa-tags button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); font-size: 10.5px; color: var(--tx-3); border: 1px dashed var(--line-3); }
.wa-tags button svg { width: 11px; height: 11px; }
.wa-tags button.on { border-style: solid; border-color: var(--line-3); background: var(--s4); color: var(--tx); }
.wa-tags .wa-tags__add { color: var(--red-tx); border-color: var(--red-line); }
/* Funil */
.wa-funil { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wa-funil button { display: grid; gap: 5px; justify-items: center; padding: 6px 2px; border-radius: var(--r-sm); font-size: 10px; color: var(--tx-3); text-align: center; line-height: 1.2; transition: background var(--t-fast); }
.wa-funil button:hover { background: var(--s3); color: var(--tx); }
.wa-funil button i { width: 100%; height: 5px; border-radius: 5px; background: var(--s4); }
.wa-funil button.done i { background: color-mix(in srgb, var(--c) 55%, transparent); }
.wa-funil button.now i { background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.wa-funil button.now { color: var(--tx); font-weight: 600; }
/* Orçamento e OS no painel */
.wa-orc { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.wa-orc__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-orc__top a { font-size: var(--fs-xs); color: var(--tx); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.wa-orc__top .pill { height: 20px; font-size: 10px; }
.wa-orc__kv { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-orc__kv b { font-size: var(--fs-sm); color: var(--tx); }
.wa-orc__act { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-orc__act .btn { height: 30px; font-size: 11.5px; }
/* Modal de números */
.wa-numlist { display: grid; gap: 8px; }
.wa-numrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); }
.wa-numrow > div { display: grid; gap: 2px; min-width: 0; }
.wa-numrow small { font-size: var(--fs-2xs); }
.wa-numrow__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.wa-numrow.oficial .wa-numrow__ic { background: var(--ok-soft); color: var(--ok); }
.wa-numrow.evolution .wa-numrow__ic { background: var(--info-soft); color: var(--info); }
.wa-numrow__ic svg { width: 18px; height: 18px; }
.wa-numhelp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wa-numhelp > div { padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--line-2); font-size: var(--fs-xs); }
.wa-numhelp b { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.wa-numhelp b svg { width: 14px; height: 14px; }
.wa-numhelp p { margin: 6px 0 0; color: var(--tx-2); line-height: 1.45; }
@media (max-width: 760px) { .wa-numhelp { grid-template-columns: 1fr; } .wa-numrow { grid-template-columns: 36px 1fr; } }
/* Atalho para a conversa no orçamento */
.oq-topbar-r { display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* O painel não pode transbordar: tudo encolhe dentro da largura da coluna */
.wa__ctx { overflow-x: hidden; }
.wa__ctx .ctx__card, .wa__ctx .ctx__card > *, .wa-2 > *, .wa-form label { min-width: 0; }
.wa__ctx .ctx__card { overflow: hidden; }
.wa__ctx .ctx__title { flex-wrap: wrap; row-gap: 2px; }
.wa__ctx .ctx__title small { text-transform: none; letter-spacing: 0; white-space: nowrap; }
.wa__ctx .ctx__deal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wa__ctx input[type="date"] { min-width: 0; padding-right: 4px; }
.wa-funil button { font-size: 9.5px; padding: 6px 1px; word-break: break-word; hyphens: auto; }
.wa-funil button span { display: block; max-width: 100%; }
.wa-hint { display: block; }
.wa-hint svg { display: inline; vertical-align: -2px; margin-right: 4px; }
/* Abas do painel lateral */
.wa-tabs { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px; margin-bottom: 10px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line-2); }
.wa-tabs button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: var(--r-sm); font-size: 10.5px; color: var(--tx-3); transition: all var(--t-fast); }
.wa-tabs button svg { width: 15px; height: 15px; }
.wa-tabs button:hover { color: var(--tx); background: var(--s3); }
.wa-tabs button.on { color: var(--tx); background: var(--red-soft); box-shadow: inset 0 -2px 0 var(--red); }
.wa-tabs button em { position: absolute; top: 3px; right: 6px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: var(--r-pill); font-style: normal; font-size: 9px; font-weight: 600; display: grid; place-items: center; background: var(--s4); color: var(--tx-2); }
.wa-tabbody { display: grid; gap: 10px; animation: rise .3s var(--ease) both; }
.wa-p { font-size: 12px; margin: 0; line-height: 1.45; }
.wa-p b { color: var(--tx-2); }
/* Atalhos para ficha, orçamento e OS */
.wa-atalhos { display: grid; gap: 4px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.wa-atalhos a { display: grid; grid-template-columns: 16px 1fr 14px; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-fast); }
.wa-atalhos a:hover { background: var(--s3); color: var(--tx); }
.wa-atalhos a svg { width: 15px; height: 15px; color: var(--tx-3); }
.wa-atalhos a svg:last-child { width: 13px; height: 13px; color: var(--red-tx); }
/* Etapas do funil (o vendedor move) */
.wa-etapas { display: grid; gap: 4px; }
.wa-etapas button { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); text-align: left; font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-fast); }
.wa-etapas button i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); }
.wa-etapas button.done i { background: color-mix(in srgb, var(--c) 55%, transparent); }
.wa-etapas button.now { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--tx); font-weight: 600; }
.wa-etapas button.now i { background: var(--c); box-shadow: 0 0 8px var(--c); }
.wa-etapas button small { font-size: 9.5px; font-weight: 400; color: var(--tx-3); }
.wa-etapas button:hover:not(.now) { border-color: var(--line-3); color: var(--tx); }
.wa-newtag { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.wa-err { border-color: var(--crit) !important; box-shadow: 0 0 0 3px var(--crit-soft); }
/* Pedidos: itens que abrem e fecham */
.wa-it { border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.wa-it + .wa-it { margin-top: 4px; }
.wa-it__h { width: 100%; display: grid; grid-template-columns: auto auto 1fr 14px; align-items: center; gap: 8px; padding: 8px 10px; text-align: left; font-size: var(--fs-xs); }
.wa-it__h .pill { height: 20px; font-size: 10px; justify-self: start; }
.wa-it__h b { justify-self: end; font-size: var(--fs-xs); }
.wa-it__h > svg:last-child { width: 14px; height: 14px; color: var(--tx-3); transition: transform var(--t-fast); }
.wa-it.open .wa-it__h > svg:last-child { transform: rotate(180deg); }
.wa-it__h:hover { background: var(--s3); }
.wa-it__b { display: none; gap: 6px; padding: 0 10px 10px; }
.wa-it.open .wa-it__b { display: grid; }
.wa-tabs { grid-template-columns: repeat(3, 1fr); }
.wa-it__h { grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-rows: auto auto; row-gap: 5px; }
.wa-it__h > :nth-child(1) { grid-column: 1; grid-row: 1; white-space: nowrap; font-weight: 600; }
.wa-it__h > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.wa-it__h > :nth-child(3) { grid-column: 2; grid-row: 1; white-space: nowrap; }
.wa-it__h > svg:last-child { grid-column: 3; grid-row: 1; }
.wa-it__b .wa-orc__act .btn { flex: 1 1 auto; justify-content: center; }
/* ---------- Atendimento "caixa geral com dono" ---------- */
/* Ver como (simulação do login) */
.wa-eu { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 6px; border-radius: var(--r-pill); border: 1px dashed var(--line-3); font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-eu select { height: 26px; border: 0; background: transparent; color: var(--tx); font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 0 2px; cursor: pointer; }
.wa-eu select:focus-visible { outline: 2px solid var(--red-line); border-radius: var(--r-sm); }
.wa-eu select option { background: var(--s2); color: var(--tx); }
/* avatar pequeno do responsável */
.wa-dono { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #fff; box-shadow: 0 0 0 2px var(--s1); }
.wa-dono.md { width: 30px; height: 30px; font-size: var(--fs-2xs); }
.wa-dono.vazio { background: transparent; color: var(--tx-3); border: 1px dashed var(--line-3); box-shadow: none; }
.wa-dono.vazio svg { width: 11px; height: 11px; }
.wa-semresp { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; color: var(--warn); background: var(--warn-soft); border: 1px dashed color-mix(in srgb, var(--warn) 45%, transparent); }
.wa-semresp svg { width: 11px; height: 11px; }
.conv__tags .wa-dono.conv__dono { margin-left: auto; }
/* filtros: quebram linha em vez de rolar escondido */
.wa-f { flex-wrap: wrap; overflow: visible; row-gap: 6px; }
.wa-f button { height: 30px; padding: 0 9px; font-size: var(--fs-2xs); gap: 5px; }
.wa-f button em { font-style: normal; font-size: var(--fs-2xs); color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-f button.on em { color: inherit; opacity: .8; }
.wa-f .badge { height: 18px; min-width: 18px; padding: 0 5px; font-size: var(--fs-2xs); }
.wa__convs .empty { line-height: 1.6; }
.wa-vazio { margin: 6px auto 0; display: inline-flex; }
/* KPIs do gestor: conversas por vendedor */
.wa-kpis__eq span { display: flex; gap: 10px; align-items: center; height: 24px; }
.wa-kpis__eq i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-weight: 600; font-size: var(--fs-sm); }
/* botão Transferir no topo do chat */
.chat__acts { align-items: center; }
.wa-transf { gap: 6px; padding-left: 6px; flex: none; }
.wa-transf .wa-dono { box-shadow: none; }
/* faixa "Ninguém está atendendo" */
.wa-semdono { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); }
.wa-semdono > svg { width: 18px; height: 18px; color: var(--warn); flex: none; }
.wa-semdono > div { flex: 1 1 200px; min-width: 0; display: grid; gap: 1px; }
.wa-semdono__acts { display: flex; gap: 6px; margin-left: auto; }
.wa-semdono b { font-size: var(--fs-sm); font-weight: 600; }
.wa-semdono small { font-size: var(--fs-2xs); color: var(--tx-2); }
.wa-semdono .btn { flex: none; }
/* campo Responsável do painel */
.wa-resp { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.wa-resp > div { flex: 1; min-width: 0; display: grid; }
.wa-resp b { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-resp small { font-size: 10.5px; }
.wa-resp .wa-semresp { margin-right: auto; }
.wa-resp .btn { flex: none; height: 28px; font-size: 11.5px; }
/* modal Transferir */
.wa-tr { display: grid; gap: 8px; }
.wa-tr .lbl { margin: 4px 0 0; }
.wa-dest { display: grid; gap: 6px; }
.wa-dest button { display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); }
.wa-dest button span { display: grid; min-width: 0; }
.wa-dest button b { font-size: var(--fs-sm); font-weight: 500; }
.wa-dest button small { font-size: var(--fs-2xs); }
.wa-dest button > svg { width: 16px; height: 16px; color: var(--tx-4); opacity: 0; transition: opacity var(--t-fast); }
.wa-dest button:hover { border-color: var(--line-3); }
.wa-dest button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-dest button.on > svg { opacity: 1; color: var(--red-tx); }
.wa-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wa-chips button { height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 10.5px; color: var(--tx-3); border: 1px dashed var(--line-3); }
.wa-chips button:hover { color: var(--tx); border-style: solid; }
.wa-chk { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 10px 12px; margin-top: 4px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.wa-chk input { accent-color: var(--red); width: 16px; height: 16px; margin: 2px 0 0; }
.wa-chk span { display: grid; gap: 2px; min-width: 0; }
.wa-chk b { font-size: var(--fs-sm); font-weight: 500; }
.wa-chk small { font-size: var(--fs-2xs); line-height: 1.4; }
.wa-chk + .wa-chk { margin-top: 0; }
/* nota da regra no modal Números */
.wa-regra { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); font-size: var(--fs-xs); }
.wa-regra > svg { width: 16px; height: 16px; color: var(--info); flex: none; margin-top: 1px; }
.wa-regra b { font-size: var(--fs-sm); }
.wa-regra ul { margin: 6px 0; padding-left: 18px; color: var(--tx-2); line-height: 1.5; }
.wa-regra ul b { font-size: inherit; color: var(--tx); }
/* mensagem de sistema longa (transferência) quebra em bloco, não em pílula */
.wa__chat .sys { max-width: min(92%, 520px); border-radius: var(--r-md); line-height: 1.4; }
/* ---------- Follow-up: agendado pelo vendedor (nada é enviado sozinho) ---------- */
/* selo na lista de conversas */
.wa-fupselo { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; color: var(--warn); background: var(--warn-soft); }
.wa-fupselo svg { width: 11px; height: 11px; }
.wa-fupselo.atrasado { color: var(--crit); background: var(--crit-soft); }
/* pílula de data/estado do follow-up */
.wa-fq { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; color: var(--tx-2); background: var(--s3); font-variant-numeric: tabular-nums; }
.wa-fq svg { width: 12px; height: 12px; flex: none; }
.wa-fq.hoje { color: var(--warn); background: var(--warn-soft); }
.wa-fq.atrasado { color: var(--crit); background: var(--crit-soft); }
.wa-fq.feito { color: var(--ok); background: var(--ok-soft); }
.wa-fq.sm { height: 20px; padding: 0 7px; font-size: var(--fs-2xs); }
.wa-fq.sm svg { width: 11px; height: 11px; }
/* botão da agenda no cabeçalho */
.wa-agd { gap: 6px; }
.wa-agd__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 700; background: var(--s4); color: var(--tx-2); font-variant-numeric: tabular-nums; }
.wa-agd__n.warn { background: var(--warn-soft); color: var(--warn); }
.wa-agd__n.crit { background: var(--crit-soft); color: var(--crit); }
.wa-nums .badge { height: 18px; min-width: 18px; padding: 0 5px; font-size: var(--fs-2xs); margin-left: 2px; }

/* faixa no topo do chat: fundo neutro, cor só no filete e na pílula */
.wa-fup { position: relative; display: grid; gap: 6px; padding: 10px 14px 10px 17px; border-bottom: 1px solid var(--line); background: var(--s2); box-shadow: inset 3px 0 0 var(--line-3); }
.wa-fup.hoje { box-shadow: inset 3px 0 0 var(--warn); }
.wa-fup.atrasado { box-shadow: inset 3px 0 0 var(--crit); }
.wa-fup__top { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: var(--fs-2xs); min-width: 0; }
.wa-fup__top > svg { width: 15px; height: 15px; color: var(--tx-3); }
.wa-fup.hoje .wa-fup__top > svg { color: var(--warn); }
.wa-fup.atrasado .wa-fup__top > svg { color: var(--crit); }
.wa-fup__top b { font-size: var(--fs-sm); font-weight: 600; }
.wa-fup__mot { color: var(--tx-2); font-size: var(--fs-xs); min-width: 0; }
.wa-fup__mot a { color: var(--tx); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.wa-fup__quem { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--tx-3); }
.wa-fup__quem .wa-dono { width: 18px; height: 18px; font-size: var(--fs-2xs); box-shadow: none; }
.wa-fup__mais { font-size: var(--fs-2xs); }
.wa-fup__nota { display: flex; gap: 6px; margin: 0; font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.4; }
.wa-fup__nota svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--tx-3); }
.wa-fup__msg { margin: 0; padding: 6px 10px; border-radius: var(--r-sm); background: var(--s1); border: 1px dashed var(--line-3); font-size: var(--fs-xs); color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-fup__acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wa-fup__acts small { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); white-space: nowrap; }
.wa-fup__acts small svg { width: 12px; height: 12px; }
.wa-fup__acts .btn { height: 28px; font-size: var(--fs-2xs); }
.wa-fup__acts .btn svg + svg { width: 12px; height: 12px; margin-left: -2px; opacity: .7; }
.wa-fup__adiar { position: relative; display: inline-flex; }
.wa-fup__menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 220px; display: grid; padding: 4px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.wa-fup__menu[hidden] { display: none; }
.wa-fup__menu button { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--tx-2); text-align: left; }
.wa-fup__menu button:hover { background: var(--s3); color: var(--tx); }
.wa-fup__menu svg { width: 14px; height: 14px; color: var(--tx-3); }
.wa-fup__menu small { font-size: var(--fs-2xs); color: var(--tx-3); }
/* sugestão discreta "Agendar follow-up?" */
.wa-sug { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px dashed var(--line-2); background: var(--bg-2); animation: rise .4s var(--ease) both; }
.wa-sug > svg { width: 15px; height: 15px; color: var(--tx-3); flex: none; }
.wa-sug > span { flex: 1; min-width: 0; display: grid; }
.wa-sug b { font-size: var(--fs-xs); font-weight: 500; }
.wa-sug small { font-size: var(--fs-2xs); }
.wa-sug .btn { height: 28px; font-size: var(--fs-2xs); flex: none; }
.wa-sug__x { width: 28px; height: 28px; flex: none; }
.wa-sug__x svg { width: 14px; height: 14px; }

/* card "Follow-up" no painel lateral */
.wa-fc__prox { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.wa-fc__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.wa-fc__quem { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx-3); white-space: nowrap; min-width: 0; }
.wa-fc__quem .wa-dono { width: 18px; height: 18px; font-size: 8px; box-shadow: none; }
.wa-fc__mot { font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; }
.wa-fc__nota { margin: 0; font-size: 11.5px; color: var(--tx-2); line-height: 1.45; }
.wa-fc__orc { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--tx-2); min-width: 0; }
.wa-fc__orc svg { width: 13px; height: 13px; color: var(--tx-3); flex: none; }
.wa-fc__orc b { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--tx); }
.wa-fc__orc:hover span { color: var(--tx); text-decoration: underline; text-underline-offset: 3px; }
.wa-fc__msg { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 10.5px; color: var(--tx-3); }
.wa-fc__msg svg { width: 12px; height: 12px; }
.wa-fc__acts { display: flex; gap: 2px; margin: 2px -4px -2px; }
.wa-fc__prox > .wa-fc__acts .del { margin-left: auto; width: 26px; padding: 0; justify-content: center; }
.wa-fc__prox > .wa-fc__acts .del.conf { width: auto; padding: 0 8px; }
.wa-fc__b { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11px; color: var(--tx-3); transition: all var(--t-fast); }
.wa-fc__b svg { width: 13px; height: 13px; flex: none; }
.wa-fc__b:hover { background: var(--s3); color: var(--tx); }
.wa-fc__b.del:hover, .wa-fc__b.conf { color: var(--crit); background: var(--crit-soft); }
.wa-fc__lst { display: grid; gap: 2px; }
.wa-fc__sub { font-size: 10px; color: var(--tx-4); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.wa-fc__it { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "q a" "m m"; align-items: center; gap: 2px 6px; padding: 6px 0 4px; border-top: 1px dashed var(--line); }
.wa-fc__it > .wa-fq { grid-area: q; justify-self: start; }
.wa-fc__it > .wa-fc__acts { grid-area: a; }
.wa-fc__itm { grid-area: m; font-size: 11px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-fc__it .wa-fc__acts { margin: 0; flex-wrap: nowrap; }
.wa-fc__it .wa-fc__b { width: 24px; height: 24px; padding: 0; justify-content: center; }
.wa-fc__it .wa-fc__b.conf { width: auto; padding: 0 6px; }
.wa-fc__ult { display: flex; align-items: flex-start; gap: 5px; font-size: 10.5px; color: var(--tx-3); line-height: 1.4; }
.wa-fc__ult svg { width: 12px; height: 12px; flex: none; margin-top: 1px; color: var(--ok); }

/* formulário agendar / editar / reagendar */
.modal.wa-ffm { width: min(640px, calc(100vw - 32px)); }
.modal.wa-ffm.sm { width: min(500px, calc(100vw - 32px)); }
.wa-ffm.sm .wa-qd { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wa-ff { display: grid; gap: 16px; }
.wa-ff section { display: grid; gap: 6px; min-width: 0; }
.wa-ff .lbl { margin: 0; }
.wa-ff .lbl .muted { font-weight: 400; }
.wa-qd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wa-qd button { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); min-width: 0; }
.wa-qd button b { font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.wa-qd button small { font-size: 10.5px; color: var(--tx-3); }
.wa-qd button:hover { border-color: var(--line-3); }
.wa-qd button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-qd button.on small { color: var(--tx-2); }
.wa-ff__2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wa-ff__2 label { display: grid; gap: 4px; font-size: var(--fs-2xs); color: var(--tx-3); min-width: 0; }
.wa-ff__2 .input, .wa-ff__2 .select { width: 100%; min-width: 0; }
.wa-ff .wa-chips.sel button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; font-size: 11.5px; color: var(--tx-2); border: 1px solid var(--line-2); }
.wa-ff .wa-chips.sel button svg { width: 13px; height: 13px; color: var(--tx-3); }
.wa-ff .wa-chips.sel button:hover { border-color: var(--line-3); color: var(--tx); }
.wa-ff .wa-chips.sel button.on { color: var(--tx); border-color: var(--red-line); background: var(--red-soft); }
.wa-ff .wa-chips.sel button.on svg { color: var(--red-tx); }
.wa-ff #ff-outro { margin-top: 2px; }
.wa-ff__ta { width: 100%; height: auto; min-height: 0; padding: 8px 10px; resize: vertical; font: inherit; font-size: var(--fs-xs); line-height: 1.45; }
.wa-ff__vars { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 10.5px; }
.wa-ff__vars button { height: 22px; padding: 0 8px; border-radius: var(--r-pill); border: 1px dashed var(--line-3); font-family: var(--mono); font-size: 10.5px; color: var(--tx-2); }
.wa-ff__vars button:hover { color: var(--tx); border-style: solid; }
.wa-ff__prev { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--wa) 7%, var(--s1)); border: 1px solid var(--line); }
.wa-ff__prev.vazio { background: transparent; border-style: dashed; }
.wa-ff__prev small { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx-3); }
.wa-ff__prev small svg { width: 12px; height: 12px; }
.wa-ff__prev p { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--tx); }
.wa-ff__aviso { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); line-height: 1.4; }
.wa-ff__aviso svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 640px) {
  .wa-qd { grid-template-columns: 1fr 1fr; }
  .wa-ff__2 { grid-template-columns: 1fr; }
}

/* agenda de follow-ups (drawer largo) */
.drawer.wa-agd-drawer { width: min(860px, 100vw); }
.wa-agd-drawer .drawer__head h3 { margin: 0; }
.wa-agd-drawer .drawer__head > div { display: grid; gap: 2px; min-width: 0; }
.wa-ag { display: grid; gap: 14px; align-content: start; }
.wa-ag__per { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-ag__per button { height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--s3); font-size: 11.5px; color: var(--tx-2); white-space: nowrap; }
.wa-ag__per button:hover { color: var(--tx); }
.wa-ag__per button.on { background: var(--wa-soft); color: var(--wa); font-weight: 500; }
.wa-ag__datas { display: flex; gap: 10px; flex-wrap: wrap; }
.wa-ag__datas[hidden] { display: none; }
.wa-ag__datas label { display: grid; gap: 4px; font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-ag__datas .input { height: 34px; font-size: var(--fs-xs); }
/* próximos 7 dias úteis */
.wa-ag__dias { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.wa-ag__dias button { display: grid; justify-items: start; gap: 0; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); min-width: 0; }
.wa-ag__dias button:hover { border-color: var(--line-3); }
.wa-ag__dias small { font-size: 10.5px; color: var(--tx-3); }
.wa-ag__dias b { font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.wa-ag__dias em { font-style: normal; font-size: 10.5px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wa-ag__dias b { color: var(--tx); }
.wa-ag__dias button.wa-zero b { color: var(--tx-3); font-weight: 500; }
.wa-ag__dias button.wa-zero em { color: var(--tx-4); }
.wa-ag__dias button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-ag__dias button.atr b { color: var(--crit); }
.wa-ag__dias button.atr em { display: none; }
/* resumo por vendedor (gestor) */
.wa-ag__eq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wa-ag__eq:empty { display: none; }
.wa-ag__eq button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; min-width: 0; transition: all var(--t-fast); }
.wa-ag__eq button:hover { border-color: var(--line-3); }
.wa-ag__eq button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-ag__eq button > span:last-child { display: grid; min-width: 0; }
.wa-ag__eq b { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ag__eq small { font-size: 10.5px; color: var(--tx-3); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ag__eq i { font-style: normal; }
.wa-ag__eq i.crit { color: var(--crit); font-weight: 600; }
.wa-ag__eq i.warn { color: var(--warn); font-weight: 600; }
.wa-ag__eq .wa-dono.gestor { width: 30px; height: 30px; background: var(--s3); }
.wa-ag__eq .wa-dono.gestor svg { width: 14px; height: 14px; }
.wa-ag__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-ag__bar .spacer { flex: 1; }
/* lista agrupada por dia */
.wa-ag__lista { display: grid; gap: 14px; }
.wa-ag__g { display: grid; gap: 4px; }
.wa-ag__g h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--tx-2); }
.wa-ag__g h4 svg { width: 14px; height: 14px; color: var(--tx-3); }
.wa-ag__g h4 em { font-style: normal; font-size: 10.5px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--s3); color: var(--tx-2); }
.wa-ag__g.atr h4 svg, .wa-ag__g.atr h4 { color: var(--crit); }
.wa-ag__g.atr h4 em { background: var(--crit-soft); color: var(--crit); }
.wa-ag__g.hj h4 svg { color: var(--warn); }
.wa-ag__it { display: grid; grid-template-columns: 52px 30px minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); }
.wa-ag__g.atr .wa-ag__it { box-shadow: inset 3px 0 0 var(--crit); }
.wa-ag__h { display: grid; line-height: 1.2; }
.wa-ag__h b { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.wa-ag__h b.crit { color: var(--crit); }
.wa-ag__h small { font-size: 10px; color: var(--tx-3); }
.wa-ag__it .wa-dono.md { box-shadow: none; }
.wa-ag__cli, .wa-ag__mot { display: grid; min-width: 0; }
.wa-ag__cli b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ag__cli small, .wa-ag__mot small { font-size: 11px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ag__mot > span { font-size: var(--fs-xs); color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ag__acts { display: flex; gap: 6px; }
.wa-ag__acts .btn { height: 30px; font-size: 11.5px; }
.wa-ag__vazio { display: grid; justify-items: center; gap: 4px; padding: 32px 16px; border-radius: var(--r-md); border: 1px dashed var(--line-2); text-align: center; }
.wa-ag__vazio svg { width: 22px; height: 22px; color: var(--tx-3); margin-bottom: 4px; }
.wa-ag__vazio b { font-size: var(--fs-sm); font-weight: 500; }
.wa-ag__vazio small { font-size: var(--fs-2xs); }
.wa-ag__foot { justify-content: space-between; align-items: center; }
.wa-ag__foot small { display: inline-flex; align-items: flex-start; gap: 6px; font-size: var(--fs-2xs); line-height: 1.4; }
.wa-ag__foot small svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
@media (max-width: 760px) {
  .wa-ag__dias { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wa-ag__eq { grid-template-columns: 1fr 1fr; }
  .wa-ag__it { grid-template-columns: 44px 30px minmax(0, 1fr); }
  .wa-ag__mot { grid-column: 3; }
  .wa-ag__acts { grid-column: 1 / -1; }
  .wa-ag__acts .btn { flex: 1; justify-content: center; }
}
.wa-dono.gestor { color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--line-3); }

/* linha de destaque: Atendimentos comigo + Sem responsável · mesmo desenho do seletor (.segmented) do sistema */
.wa-fd__row { flex: 0 0 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; padding: 3px; margin-bottom: 4px; border-radius: var(--r-sm); background: var(--s1); border: 1px solid var(--line-2); min-width: 0; }
.wa-f button.wa-fd { height: 32px; min-width: 0; padding: 0 8px; border-radius: 7px; background: transparent; color: var(--tx-3); font-size: var(--fs-2xs); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background var(--t-fast), color var(--t-fast); }
.wa-f button.wa-fd:hover { color: var(--tx); }
.wa-f button.wa-fd.on { background: var(--s4); color: var(--tx); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.wa-fd > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-fd i { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--s3); color: var(--tx-2); font-size: var(--fs-2xs); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.wa-fd.on i { background: var(--wa-soft); color: var(--wa); }
.wa-fd.tem i { background: var(--warn-soft); color: var(--warn); }
.wa-fd.crit i { background: var(--red-soft); color: var(--red-tx); }
:root[data-theme="light"] .wa-fd__row { background: var(--s3); }
:root[data-theme="light"] .wa-f button.wa-fd.on { background: var(--s1); box-shadow: 0 1px 2px rgba(60, 30, 34, .12), 0 0 0 1px var(--line); }

:root[data-theme="light"] .wa-fup__menu { background: var(--s1); }
:root[data-theme="light"] .wa-ff__prev { background: color-mix(in srgb, var(--wa) 6%, var(--s1)); }
:root[data-theme="light"] .wa-ag__it, :root[data-theme="light"] .wa-ag__dias button, :root[data-theme="light"] .wa-ag__eq button, :root[data-theme="light"] .wa-qd button { background: var(--s1); }
:root[data-theme="light"] .wa-ag__dias button.on, :root[data-theme="light"] .wa-ag__eq button.on, :root[data-theme="light"] .wa-qd button.on { background: var(--red-soft); }

/* ---------- Cabeçalho compacto + tela inteira sem rolagem (computador) ---------- */
.page-head.wa-head { display: grid; gap: 10px; justify-content: stretch; align-items: stretch; margin-bottom: 12px; }
.wa-head__top { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; min-width: 0; }
.wa-head__top h1 { font-size: var(--fs-xl); line-height: 1.1; margin: 0; }
.wa-head .wa-head__eb { margin: 0 0 0 auto; min-width: 0; flex: 0 1 auto; font-size: var(--fs-2xs); }
.wa-head__eb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wa-head .wa-head__eb svg { flex: none; width: 13px; height: 13px; }
.wa-head .wa-nums { gap: 6px 8px; }
.wa-head .wa-eu { height: 32px; }
/* mini-indicadores em pílula, ao lado do título */
.wa-head .wa-kpis { gap: 6px; align-items: center; }
.wa-head .wa-kpis > div { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--s1); border: 1px solid var(--line-2); white-space: nowrap; }
.wa-head .wa-kpis small { font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-head .wa-kpis b { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.wa-head .wa-kpis b.warn-tx { color: var(--warn); }
.wa-head .wa-kpis__eq span { gap: 8px; height: auto; }
.wa-head .wa-kpis__eq i { gap: 3px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.wa-head .wa-kpis__eq .wa-dono { width: 18px; height: 18px; font-size: 8px; box-shadow: none; }
:root[data-theme="light"] .wa-head .wa-kpis > div { background: var(--s1); border-color: var(--line-2); }

@media (min-width: 761px) {
  /* a página ocupa a altura da janela; só lista, mensagens e painel rolam por dentro */
  .page:has(> .wa-app) { height: 100%; display: flex; flex-direction: column; padding-top: 18px; padding-bottom: 18px; }
  .page:has(> .wa-app) > .wa-head { flex: none; }
  .page:has(> .wa-app) > .wa-app { flex: 1 1 auto; height: auto; min-height: 400px; grid-template-rows: minmax(0, 1fr); }
}
@media (min-width: 1101px) {
  /* título, indicadores e números na mesma linha: o texto dos números encurta com reticências */
  .wa-head__top { flex-wrap: nowrap; }
  .wa-head__top h1, .wa-head .wa-kpis { flex: none; }
  .wa-head .wa-kpis { flex-wrap: nowrap; }
}
@media (max-width: 760px) {
  .wa-head .wa-head__eb { margin-left: 0; flex-basis: 100%; flex-wrap: nowrap; }
}

/* ---------- Cliente único em todos os números ---------- */
/* separador quando a conversa troca de número */
.wa-troca { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; font-size: 10.5px; color: var(--tx-3); }
.wa-troca::before, .wa-troca::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.wa-troca span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.wa-troca svg { width: 12px; height: 12px; }
.wa-troca.oficial svg { color: var(--ok); }
.wa-troca.evolution svg { color: var(--info); }
/* marca discreta do número em cada mensagem (só quando o cliente usou mais de um número) */
.wa-mn { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; font-size: 10px; color: var(--tx-3); }
.wa-mn svg { width: 10px; height: 10px; }
.wa-mn.oficial svg { color: var(--ok); }
.wa-mn.evolution svg { color: var(--info); }
.msg .by.wa-ct { color: var(--info); }
/* mensagem enviada por modelo aprovado */
.wa-tplb { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 10.5px; font-weight: 500; color: var(--tx-3); }
.wa-tplb svg { width: 12px; height: 12px; color: var(--ok); }
.msg .wa-tplb + .att-pdf { margin-bottom: 6px; }

/* faixa acima do campo de texto: fundo neutro, cor só no filete e no ícone */
.wa-janela { gap: 8px 10px; flex-wrap: wrap; line-height: 1.4; }
.wa-janela > span { flex: 1 1 200px; min-width: 0; }
.wa-janela b { font-weight: 600; color: var(--tx); }
.wa-janela .btn { height: 28px; font-size: var(--fs-2xs); flex: none; }
.wa-janela .btn em { font-style: normal; font-size: var(--fs-2xs); font-weight: 600; margin-left: 4px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); }
.wa-janela.evolution { border-color: var(--line); background: var(--s2); }
.wa-janela.evolution svg { color: var(--info); }
.wa-janela.fora, .wa-janela.risco { background: var(--s2); border-color: var(--line); box-shadow: inset 3px 0 0 var(--warn); padding-left: 12px; }
.wa-janela.fora > svg, .wa-janela.risco > svg { color: var(--warn); }

.quick.off { display: none; }
.composer textarea:disabled { opacity: .6; cursor: not-allowed; }
.composer .send:disabled { opacity: .35; box-shadow: none; cursor: not-allowed; transform: none; }

/* card: contatos da empresa e números deste cliente */
.kv.tight > div.wa-cts b { display: grid; gap: 2px; }
.wa-cts b i { font-style: normal; font-weight: 400; color: var(--tx-3); }
.wa-fq.aberta { color: var(--ok); background: var(--ok-soft); }
.wa-fq.fora { color: var(--warn); background: var(--warn-soft); }
.wa-fq.neutro { color: var(--tx-3); background: var(--s3); }
.wa-cn__ids { display: grid; gap: 4px; }
.wa-cn__ct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.wa-cn__ct > b { font-size: 10.5px; font-weight: 600; color: var(--tx-2); margin-right: 2px; }
.wa-id { display: inline-flex; align-items: center; gap: 4px; height: 20px; max-width: 100%; padding: 0 7px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; }
.wa-id svg { width: 10px; height: 10px; flex: none; }
.wa-id em { font-style: normal; color: var(--tx-2); overflow: hidden; text-overflow: ellipsis; }
.wa-id.falta { border-style: dashed; color: var(--warn); }
#ctx-vinc { margin-top: -2px; }

/* modal: modelos aprovados */
.modal.wa-tplm { width: min(760px, calc(100vw - 32px)); }
.wa-tpl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.wa-tpl__lst { display: grid; gap: 6px; align-content: start; }
.wa-tpl__lst button { display: grid; gap: 6px; justify-items: start; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); }
.wa-tpl__lst button > span:first-child { display: grid; gap: 1px; }
.wa-tpl__lst button b { font-size: var(--fs-sm); font-weight: 600; }
.wa-tpl__lst button small { font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-tpl__lst button:hover { border-color: var(--line-3); }
.wa-tpl__lst button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-tpl__cat { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: 10px; font-weight: 600; }
.wa-tpl__cat.utilidade { color: var(--ok); background: var(--ok-soft); }
.wa-tpl__cat.marketing { color: var(--warn); background: var(--warn-soft); }
.wa-tpl__dir { display: grid; gap: 12px; align-content: start; min-width: 0; }
.wa-tpl__prev { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.wa-tpl__prev > small { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx-3); }
.wa-tpl__prev > small svg { width: 12px; height: 12px; }
.wa-tpl__prev p { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--tx); }
.wa-tpl__bolha { justify-self: end; max-width: 92%; display: grid; gap: 6px; padding: 9px 12px; border-radius: 12px 4px 12px 12px; background: color-mix(in srgb, var(--wa) 9%, var(--s2)); border: 1px solid var(--line-2); }
.wa-tpl__bolha mark { background: var(--warn-soft); color: var(--tx); border-radius: 3px; padding: 0 2px; }
.wa-tpl__pdf { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--tx-2); }
.wa-tpl__pdf svg { width: 13px; height: 13px; color: var(--red-tx); }
.wa-tpl__aviso { display: flex; gap: 6px; align-items: flex-start; font-size: 10.5px; color: var(--tx-2); line-height: 1.4; }
.wa-tpl__aviso svg { width: 12px; height: 12px; flex: none; margin-top: 1px; color: var(--warn); }
.wa-tpl__vars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-tpl__vars label { display: grid; gap: 4px; font-size: var(--fs-2xs); color: var(--tx-3); min-width: 0; }
.wa-tpl__vars .input { height: 32px; font-size: var(--fs-xs); width: 100%; min-width: 0; }
.wa-tpl__foot { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); min-width: 0; }
.wa-tpl__foot svg { width: 13px; height: 13px; flex: none; }
.wa-evo { display: grid; gap: 12px; }
.wa-evo p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--tx-2); }
.wa-evo .wa-tpl__prev p { font-size: var(--fs-xs); }

/* modal: vincular a um cliente existente */
.modal.wa-vcm { width: min(820px, calc(100vw - 32px)); }
.wa-vc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }
.wa-vc__esq { display: grid; gap: 8px; align-content: start; min-width: 0; }
.wa-vc__lista { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; padding-right: 2px; }
.wa-vc__lista button { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); text-align: left; transition: all var(--t-fast); }
.wa-vc__lista button:hover { border-color: var(--line-3); }
.wa-vc__lista button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-vc__lista .avatar { width: 30px; height: 30px; font-size: 11px; }
.wa-vc__lista button > span:nth-child(2) { display: grid; min-width: 0; }
.wa-vc__lista b { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-vc__lista small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-vc__tem svg { width: 14px; height: 14px; color: var(--wa); }
.wa-vc__dir { display: grid; gap: 8px; align-content: start; min-width: 0; }
.wa-vc__dir .lbl { margin: 0; }
.wa-vc__vazio { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; border-radius: var(--r-md); border: 1px dashed var(--line-2); text-align: center; font-size: var(--fs-xs); color: var(--tx-3); }
.wa-vc__vazio svg { width: 20px; height: 20px; }
.wa-vc__cts { display: grid; gap: 6px; }
.wa-vc__cts .wa-chk { margin-top: 0; padding: 8px 10px; }
.wa-vc__novo[hidden] { display: none; }
.wa-vc__novo .input { height: 34px; font-size: var(--fs-xs); width: 100%; }
.wa-vc__prev { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.wa-vc__prev ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wa-vc__prev li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; font-size: var(--fs-xs); line-height: 1.45; color: var(--tx-2); }
.wa-vc__prev li svg { width: 14px; height: 14px; margin-top: 2px; color: var(--tx-3); }
.wa-vc__prev li b { color: var(--tx); font-weight: 600; }

/* modal Números: adicionar número (passos simulados) */
.wa-an { display: grid; gap: 14px; }
.wa-an__passos { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wa-an__passos li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s3); font-size: var(--fs-xs); color: var(--tx-3); }
.wa-an__passos i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--s4); color: var(--tx-2); }
.wa-an__passos i svg { width: 12px; height: 12px; }
.wa-an__passos li.on { color: var(--tx); box-shadow: inset 0 -2px 0 var(--red); }
.wa-an__passos li.feito i { background: var(--ok-soft); color: var(--ok); }
.wa-an__tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wa-an__tipos button { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); }
.wa-an__tipos button:hover { border-color: var(--line-3); }
.wa-an__tipos button.on { border-color: var(--red-line); background: var(--red-soft); }
.wa-an__tipos button[data-t="oficial"] .wa-numrow__ic { background: var(--ok-soft); color: var(--ok); }
.wa-an__tipos button[data-t="evolution"] .wa-numrow__ic { background: var(--info-soft); color: var(--info); }
.wa-an__tipos button > span:last-child { display: grid; gap: 4px; }
.wa-an__tipos b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); font-weight: 600; }
.wa-an__tipos b .pill { height: 20px; font-size: 10px; font-style: normal; }
.wa-an__tipos small { font-size: var(--fs-2xs); color: var(--tx-2); line-height: 1.45; }
.wa-an__tipo { display: flex; align-items: center; gap: 8px; align-self: end; height: 38px; font-size: var(--fs-xs); color: var(--tx-2); }
.wa-an__tipo svg { width: 15px; height: 15px; color: var(--tx-3); }
.wa-an__chk { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wa-an__chk li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-med); }
.wa-an__chk li svg { width: 16px; height: 16px; flex: none; color: var(--tx-3); }
.wa-an__chk li.ok { color: var(--tx); }
.wa-an__chk li.ok svg { color: var(--ok); }
.wa-an__evo { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.wa-an__qr { width: 170px; height: 170px; padding: 8px; border-radius: var(--r-md); background: var(--tx); fill: var(--bg); transition: opacity var(--t-med); }
.wa-an__qr.lido { opacity: .25; }
.wa-an__evo ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--tx-2); line-height: 1.45; }
.wa-an__evo ol b { color: var(--tx); }
.wa-an__nota { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); }
.wa-an__nota svg { width: 13px; height: 13px; }
.modal__foot .pill { height: 26px; }
@media (max-width: 760px) {
  .wa-tpl, .wa-vc, .wa-an__tipos { grid-template-columns: 1fr; }
  .wa-an__evo { grid-template-columns: 1fr; justify-items: center; }
}
:root[data-theme="light"] .wa-tpl__lst button, :root[data-theme="light"] .wa-vc__lista button, :root[data-theme="light"] .wa-an__tipos button, :root[data-theme="light"] .wa-an__chk li { background: var(--s1); }
:root[data-theme="light"] .wa-tpl__lst button.on, :root[data-theme="light"] .wa-vc__lista button.on, :root[data-theme="light"] .wa-an__tipos button.on { background: var(--red-soft); }
:root[data-theme="light"] .wa-tpl__bolha { background: color-mix(in srgb, var(--wa) 8%, var(--s1)); }
.wa-cn .wa-fq { max-width: 100%; height: auto; min-height: 20px; padding: 2px 8px; white-space: normal; line-height: 1.35; font-size: 10px; }

/* ---------- Uma conversa por número, um card por cliente ---------- */
/* lista: empresa + elo discreto quando o cliente também tem conversa em outro número */
.conv__emp { display: flex; align-items: center; gap: 6px; min-width: 0; }
.conv__emp > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-elo { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 5px; border-radius: var(--r-pill); border: 1px dashed var(--line-3); font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.wa-elo svg { width: 11px; height: 11px; flex: none; }
.wa-elo:hover { color: var(--tx); border-style: solid; border-color: var(--tx-4); }
.wa-elo i { font-style: normal; display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--wa-soft); color: var(--wa); font-size: 10px; font-weight: 700; }
.wa-num.sm { height: 18px; padding: 0 7px; font-size: var(--fs-2xs); }
/* prévia da outra conversa ao passar o mouse no elo */
.wa-pop { position: fixed; z-index: 380; width: 290px; display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); pointer-events: none; animation: wa-pop-in .16s var(--ease) both; }
.wa-pop[hidden] { display: none; }
.wa-pop__it { display: grid; gap: 4px; }
.wa-pop__h { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--tx-2); }
.wa-pop__h small { margin-left: auto; color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-pop__h .badge { height: 16px; min-width: 16px; font-size: 9.5px; }
.wa-pop p { margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--tx); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-pop p b { font-weight: 600; color: var(--tx-3); }
.wa-pop__dica { display: flex; align-items: center; gap: 5px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 10px; color: var(--tx-4); }
.wa-pop__dica svg { width: 11px; height: 11px; }
@keyframes wa-pop-in { from { opacity: 0; transform: translateY(-3px); } }

/* contagem + "Agrupar por cliente" (interruptor) */
.wa-lbar { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.wa-lbar small { font-size: var(--fs-2xs); color: var(--tx-4); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wa-sw { position: relative; margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-2xs); color: var(--tx-3); cursor: pointer; user-select: none; transition: color var(--t-fast); }
.wa-sw:hover { color: var(--tx); }
.wa-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wa-sw__t { position: relative; flex: none; width: 26px; height: 15px; border-radius: var(--r-pill); background: var(--s4); transition: background var(--t-fast), box-shadow var(--t-fast); }
.wa-sw__t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--tx-3); transition: transform var(--t-med) var(--ease), background var(--t-fast); }
.wa-sw input:checked + .wa-sw__t { background: var(--wa-soft); box-shadow: inset 0 0 0 1px var(--wa); }
.wa-sw input:checked + .wa-sw__t::after { transform: translateX(11px); background: var(--wa); }
.wa-sw input:checked ~ * { color: var(--tx); }
.wa-sw input:focus-visible + .wa-sw__t { outline: 2px solid var(--red-line); outline-offset: 2px; }

/* lista agrupada: o cliente uma vez, as conversas de cada número dentro */
.wa-grp { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.wa-grp > .conv { border-bottom: 0; padding-bottom: 6px; }
.wa-grp__it { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: calc(100% - 64px); margin: 0 12px 2px 52px; padding: 6px 8px; border-radius: var(--r-sm); text-align: left; transition: background var(--t-fast); }
.wa-grp__it::before { content: ""; position: absolute; left: -12px; top: -4px; height: calc(50% + 4px); width: 9px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-bottom-left-radius: 6px; }
.wa-grp__it:hover { background: var(--s2); }
.wa-grp__it.on { background: var(--red-soft); box-shadow: inset 2px 0 0 var(--red); }
.wa-grp__it:focus-visible { outline: 2px solid var(--red-line); outline-offset: -2px; }
.wa-grp__n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.wa-grp__n svg { width: 12px; height: 12px; }
.wa-grp__n.oficial { background: var(--ok-soft); color: var(--ok); }
.wa-grp__n.evolution { background: var(--info-soft); color: var(--info); }
.wa-grp__t { display: grid; min-width: 0; }
.wa-grp__t b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-grp__t b i { font-style: normal; font-weight: 400; color: var(--tx-3); }
.wa-grp__t small { font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-grp__t small .tk { vertical-align: -3px; margin-right: 3px; }
.wa-grp__it.unread .wa-grp__t small { color: var(--tx-2); }
.wa-grp__r { display: grid; justify-items: end; gap: 2px; }
.wa-grp__r small { font-size: var(--fs-2xs); color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-grp__it.unread .wa-grp__r small { color: var(--wa); }
.wa-grp__r .badge { height: 16px; min-width: 16px; font-size: var(--fs-2xs); }

/* topo do chat: abas das conversas do cliente (uma por número) + Continuar pelo outro número */
.wa-ponte { container-type: inline-size; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--s1); min-width: 0; }
.wa-pt { position: relative; flex: 0 1 auto; display: inline-flex; gap: 2px; padding: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2); }
.wa-pt::-webkit-scrollbar { display: none; }
.wa-pt__thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 7px; background: var(--s4); box-shadow: inset 0 1px 0 var(--line-2); transition: left var(--t-med) var(--ease), width var(--t-med) var(--ease); }
.wa-pt button { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; color: var(--tx-3); white-space: nowrap; transition: color var(--t-fast); }
.wa-pt button:hover, .wa-pt button.on { color: var(--tx); }
.wa-pt button:focus-visible { outline: 2px solid var(--red-line); outline-offset: -2px; }
.wa-pt button > svg { width: 13px; height: 13px; flex: none; }
.wa-pt button.oficial > svg, .wa-pt__solo.oficial svg { color: var(--ok); }
.wa-pt button.evolution > svg, .wa-pt__solo.evolution svg { color: var(--info); }
.wa-pt b { font-weight: 600; }
.wa-pt__ct { color: var(--tx-3); }
.wa-pt button.on .wa-pt__ct { color: var(--tx-2); }
.wa-pt small { font-size: 10px; color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-pt i { font-style: normal; display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--wa-soft); color: var(--wa); font-size: 9.5px; font-weight: 700; }
.wa-pt__solo { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); font-size: 11.5px; color: var(--tx-2); white-space: nowrap; }
.wa-pt__solo svg { width: 13px; height: 13px; flex: none; }
.wa-pt__solo b { font-weight: 600; color: var(--tx); }
.wa-pt__solo small { font-size: 10px; color: var(--tx-4); }
.wa-pt__dica { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx-4); white-space: nowrap; }
.wa-pt__dica svg { width: 12px; height: 12px; }
.wa-cont { margin-left: auto; flex: none; }
.wa-cont em { font-style: normal; }
.wa-cont__w { position: relative; margin-left: auto; flex: none; }
.wa-cont__w .wa-cont { margin-left: 0; }
.wa-cont__menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: 240px; display: grid; gap: 2px; padding: 6px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.wa-cont__menu[hidden] { display: none; }
.wa-cont__menu button { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; color: var(--tx-2); }
.wa-cont__menu button:hover, .wa-cont__menu button:focus-visible { background: var(--s3); color: var(--tx); outline: none; }
.wa-cont__menu button > svg { width: 15px; height: 15px; }
.wa-cont__menu button.oficial > svg { color: var(--ok); }
.wa-cont__menu button.evolution > svg { color: var(--info); }
.wa-cont__menu span { display: grid; min-width: 0; }
.wa-cont__menu b { font-size: var(--fs-xs); font-weight: 600; }
.wa-cont__menu small { font-size: var(--fs-2xs); color: var(--tx-3); }
@container (max-width: 560px) { .wa-cont em { display: none; } .wa-pt button.on small { display: none; } .wa-ponte.muitas .wa-pt small { display: none; } .wa-ponte.muitas .wa-cont > span { display: none; } }
.wa-semmsg { font-style: normal; color: var(--tx-4); }
@container (max-width: 400px) { .wa-pt small, .wa-pt__solo small { display: none; } }

/* troca entre as conversas do mesmo cliente: as mensagens deslizam para o lado da aba */
.chat__body.wa-sw-r > * { animation: wa-sw-r .26s var(--ease) both; }
.chat__body.wa-sw-l > * { animation: wa-sw-l .26s var(--ease) both; }
@keyframes wa-sw-r { from { opacity: 0; transform: translateX(16px); } }
@keyframes wa-sw-l { from { opacity: 0; transform: translateX(-16px); } }
/* aviso do sistema com atalho para a outra conversa */
.sys .wa-sys__ir { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; font-size: 11px; font-weight: 600; color: var(--red-tx); white-space: nowrap; }
.sys .wa-sys__ir svg { width: 12px; height: 12px; }
.sys .wa-sys__ir:hover { text-decoration: underline; }
/* conversa ainda sem mensagens */
.wa-vazio-chat { align-self: center; margin: auto 0; display: grid; justify-items: center; gap: 6px; max-width: 320px; padding: 22px 20px; text-align: center; border-radius: var(--r-lg); background: var(--s1); border: 1px dashed var(--line-2); }
.wa-vazio-chat svg { width: 22px; height: 22px; color: var(--tx-3); }
.wa-vazio-chat b { font-size: var(--fs-sm); font-weight: 600; }
.wa-vazio-chat small { font-size: var(--fs-2xs); color: var(--tx-3); line-height: 1.5; }

/* card "Números deste cliente": cada conversa com a última mensagem, não lidas, janela e Abrir conversa */
.wa-cn { display: grid; gap: 6px; }
.wa-cn__it { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); text-align: left; color: inherit; font: inherit; transition: border-color var(--t-fast), background var(--t-fast); }
button.wa-cn__it { cursor: pointer; }
button.wa-cn__it:hover { border-color: var(--line-3); }
button.wa-cn__it:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.wa-cn__it.aqui { border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--red); }
.wa-cn__it.vazio { border-style: dashed; background: transparent; }
.wa-cn__ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.wa-cn__ic svg { width: 14px; height: 14px; }
.wa-cn__ic.oficial { background: var(--ok-soft); color: var(--ok); }
.wa-cn__ic.evolution { background: var(--info-soft); color: var(--info); }
.wa-cn__b { display: grid; gap: 4px; min-width: 0; }
.wa-cn__b > b { display: flex; align-items: baseline; gap: 4px 6px; flex-wrap: wrap; font-size: var(--fs-xs); font-weight: 600; }
.wa-cn__b > b i { font-style: normal; font-weight: 400; color: var(--tx-2); }
.wa-cn__b > b small { font-size: 10.5px; font-weight: 400; color: var(--tx-3); }
.wa-cn__b > small { font-size: 10.5px; }
.wa-cn__u { display: flex; gap: 6px; min-width: 0; font-size: 11px; color: var(--tx-2); }
.wa-cn__u span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-cn__u em { flex: none; margin-left: auto; font-style: normal; font-size: 10px; color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-cn__st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wa-cn__st .badge { height: 18px; min-width: 18px; font-size: 10px; }
.wa-cn__aqui, .wa-cn__abrir { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; color: var(--tx-3); }
.wa-cn__abrir { color: var(--red-tx); }
.wa-cn__aqui svg, .wa-cn__abrir svg { width: 12px; height: 12px; }
button.wa-cn__it:hover .wa-cn__abrir svg { transform: translateX(2px); }
.wa-cn__abrir svg { transition: transform var(--t-fast); }
.wa-cn__comecar { margin-left: 0; justify-self: start; }
.wa-cn__ids summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; font-size: 10.5px; color: var(--tx-3); }
.wa-cn__ids summary::-webkit-details-marker { display: none; }
.wa-cn__ids summary svg { width: 12px; height: 12px; }
.wa-cn__ids summary:hover { color: var(--tx); }
.wa-cn__ids[open] summary { margin-bottom: 6px; }
.wa-cn__ids .wa-cn__ct + .wa-cn__ct { margin-top: 4px; }
.wa-etq-de { display: inline-flex; align-items: center; gap: 6px; }

/* modal "Continuar pelo outro número" */
.modal.wa-cmm { width: min(540px, calc(100vw - 32px)); }
.wa-cm { display: grid; gap: 12px; }
.wa-cm p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--tx-2); }
.wa-cm p b { color: var(--tx); font-weight: 600; }
.wa-cm__num { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); }
.wa-cm__num > div { display: grid; min-width: 0; }
.wa-cm__num b { font-size: var(--fs-sm); font-weight: 600; }
.wa-cm__num small { font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-cm__rec { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); box-shadow: inset 3px 0 0 var(--ok); }
.wa-cm__rec > svg { width: 16px; height: 16px; color: var(--ok); margin-top: 1px; }
.wa-cm__rec div { display: grid; gap: 2px; }
.wa-cm__rec b { font-size: var(--fs-xs); font-weight: 600; }
.wa-cm__rec small { font-size: var(--fs-2xs); color: var(--tx-2); line-height: 1.45; }
.wa-cm__lst { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wa-cm__lst li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; font-size: var(--fs-xs); line-height: 1.45; color: var(--tx-3); }
.wa-cm__lst svg { width: 14px; height: 14px; margin-top: 1px; }
.wa-tr__cli { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-2xs); line-height: 1.45; }
.wa-tr__cli svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }

/* histórico do cliente: marca do número e mensagens dos números juntas (só leitura) */
.hc-num { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 6px 0 5px; margin-right: 6px; border-radius: var(--r-pill); background: var(--s3); color: var(--tx-2); font-size: 9.5px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.hc-num svg { width: 10px; height: 10px; }
.hc-num.oficial svg { color: var(--ok); }
.hc-num.evolution svg { color: var(--info); }
.hc-conv { display: grid; grid-template-columns: 30px minmax(0, 1fr) 14px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: border-color var(--t-fast); }
.hc-conv:hover { border-color: var(--line-3); }
.hc-conv:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.hc-conv__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--wa-soft); color: var(--wa); }
.hc-conv__ic svg { width: 15px; height: 15px; }
.hc-conv > span:nth-child(2) { display: grid; min-width: 0; }
.hc-conv b { font-size: var(--fs-xs); font-weight: 600; }
.hc-conv small { font-size: 10.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-conv > svg { width: 14px; height: 14px; color: var(--tx-3); }
.drawer.hc-tl-dw { width: min(600px, 100vw); }
.hc-tl-w { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.hc-tl { flex: 1; min-height: 0; padding: 18px 5%; }
.hc-tl .msg { max-width: 82%; }
.hc-tl__foot { flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.hc-tl__foot > small { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); margin-right: auto; }
.hc-tl__foot > small svg { width: 13px; height: 13px; }

@media (prefers-reduced-motion: reduce) {
  .chat__body.wa-sw-r > *, .chat__body.wa-sw-l > *, .wa-pop { animation: none; }
  .wa-pt__thumb, .wa-sw__t::after { transition: none; }
}
:root[data-theme="light"] .wa-pop, :root[data-theme="light"] .wa-cont__menu { background: var(--s1); }
:root[data-theme="light"] .wa-ponte { background: var(--s1); }
:root[data-theme="light"] .wa-pt, :root[data-theme="light"] .wa-pt__solo { background: var(--s3); }
:root[data-theme="light"] .wa-pt__thumb { background: var(--s1); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
:root[data-theme="light"] .wa-cn__it, :root[data-theme="light"] .wa-cm__num, :root[data-theme="light"] .wa-cm__rec, :root[data-theme="light"] .hc-conv { background: var(--s1); }
:root[data-theme="light"] .wa-cn__it.vazio { background: transparent; }
:root[data-theme="light"] .wa-vazio-chat { background: var(--s1); }
:root[data-theme="light"] .wa-sw__t { background: var(--s3); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Venda: valor só a partir do Orçamento + checklist de qualificação ---------- */
.wa__ctx .ctx__deal { align-items: center; }
.wa__ctx .ctx__deal b.wa-semvalor { font-size: var(--fs-xs); font-weight: 500; color: var(--tx-3); }
.wa__ctx .ctx__deal #ctx-qpill { margin-left: auto; display: inline-flex; }
.wa__ctx .ctx__deal #ctx-qpill .pill { height: 22px; font-size: 10.5px; }
.wa-qcard .ctx__title small { text-align: right; }
.wa-qcard #ctx-qualif { min-width: 0; }

/* ---------- A3b · Minha meta (só o vendedor logado), férias e link para a Gestão comercial ---------- */
.wa-meta { position: relative; flex: none; min-width: 0; }
.wa-meta__b { display: grid; grid-template-columns: auto auto; grid-template-areas: "t l" "bar bar"; align-items: center; gap: 3px 10px; min-width: 210px; padding: 5px 12px 6px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line-2); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.wa-meta__b:hover { border-color: var(--line-3); }
.wa-meta__b[aria-expanded="true"] { border-color: var(--red-line); }
.wa-meta__b:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }
.wa-meta__b > small { grid-area: t; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; }
.wa-meta__b > small svg { width: 12px; height: 12px; flex: none; }
.wa-meta__l { grid-area: l; display: inline-flex; align-items: baseline; gap: 5px; justify-self: end; white-space: nowrap; font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-meta__l b { font-size: var(--fs-sm); font-weight: 700; color: var(--tx); }
.wa-meta__l em { font-style: normal; font-weight: 700; font-size: var(--fs-xs); margin-left: 2px; }
.wa-meta__b.ok .wa-meta__l em, .wa-meta__i em.ok { color: var(--ok); }
.wa-meta__b.warn .wa-meta__l em, .wa-meta__i em.warn { color: var(--warn); }
.wa-meta__b.crit .wa-meta__l em, .wa-meta__i em.crit { color: var(--crit); }
.wa-meta__bar { grid-area: bar; display: block; height: 4px; border-radius: 4px; background: var(--s4); overflow: hidden; }
.wa-meta__bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--tx-4); }
.wa-meta__b.ok .wa-meta__bar i, .wa-meta__bar.ok i { background: var(--ok); }
.wa-meta__b.warn .wa-meta__bar i, .wa-meta__bar.warn i { background: var(--warn); }
.wa-meta__b.crit .wa-meta__bar i, .wa-meta__bar.crit i { background: var(--crit); }
:root[data-theme="light"] .wa-meta__b.warn .wa-meta__bar i, :root[data-theme="light"] .wa-meta__bar.warn i { background: var(--warn-fill); }
.wa-meta__pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(340px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2, 0 12px 32px rgba(0, 0, 0, .35)); }
.wa-meta__pop[hidden] { display: none; }
.wa-meta__h { display: grid; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.wa-meta__h b { font-size: var(--fs-sm); font-weight: 600; }
.wa-meta__h small { font-size: var(--fs-2xs); }
.wa-meta__i { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "bar p"; align-items: center; gap: 3px 10px; font-size: var(--fs-xs); }
.wa-meta__i > span:first-child { grid-area: n; display: inline-flex; align-items: center; gap: 6px; color: var(--tx-2); min-width: 0; }
.wa-meta__i > span:first-child svg { width: 13px; height: 13px; flex: none; color: var(--tx-3); }
.wa-meta__i > b { grid-area: v; font-weight: 600; white-space: nowrap; }
.wa-meta__i > b small { font-weight: 400; }
.wa-meta__i > .wa-meta__bar { grid-area: bar; }
.wa-meta__i > em { grid-area: p; font-style: normal; font-weight: 600; font-size: var(--fs-2xs); text-align: right; }
.wa-meta__f { display: flex; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: var(--fs-2xs); }
.wa-meta__f svg { width: 12px; height: 12px; flex: none; }
.wa-dono.ferias { position: relative; }
.wa-dono.ferias::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--s1); }
.wa-eu__fer { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; margin-right: 2px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-style: normal; font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; }
.wa-eu__fer svg { width: 11px; height: 11px; flex: none; }
.wa-fer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 14px; border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); font-size: var(--fs-xs); color: var(--tx-2); }
.wa-fer > svg { width: 16px; height: 16px; color: var(--warn); flex: none; }
.wa-fer > span { flex: 1 1 200px; min-width: 0; }
.wa-fer b { color: var(--tx); font-weight: 600; }
.wa-fer .btn { flex: none; margin-left: auto; }
.wa-cfg { white-space: nowrap; }
@media (max-width: 760px) {
  .wa-meta { order: 3; width: 100%; }
  .wa-meta__b { width: 100%; min-width: 0; }
}

/* =====================================================================
   Cores da caixa do WhatsApp + painel lateral recolhível + Personalizar
   A caixa ganha um cinza-grafite próprio (escuro) / cinza suave (claro) para se destacar do resto do sistema.
   Os tons ficam em variáveis do módulo (--wa-cx-*, --wa-f-*, --wa-in-*, --wa-b-*) e dentro do #wa
   as superfícies --bg-2/--s1…--s4 passam a usar esses tons: tudo o que já usa os tokens acompanha.
   ===================================================================== */
:root {
  /* caixa (escuro): grafite neutro, um passo acima do fundo do sistema */
  --wa-cx-bg2: #1A1A1E; --wa-cx-s1: #1E1E22; --wa-cx-s2: #242428; --wa-cx-s3: #2D2D32; --wa-cx-s4: #38383E;
  /* fundos da conversa */
  --wa-f-padrao: #151518; --wa-f-padrao-pt: rgba(255, 255, 255, .045);
  --wa-f-grafite: #1F1F23; --wa-f-grafite-pt: transparent;
  --wa-f-areia: #1D1915; --wa-f-areia-pt: rgba(255, 214, 170, .05);
  /* balão recebido: acompanha o fundo */
  --wa-in-padrao: #2A2A2F; --wa-in-grafite: #303036; --wa-in-areia: #2B2520;
  /* balão enviado (texto claro do tema sobre todos: contraste AA) */
  --wa-b-vermelho: linear-gradient(180deg, #4A1414, #3A0E0F); --wa-b-vermelho-l: rgba(255, 70, 50, .2);
  --wa-b-verde: linear-gradient(180deg, #0E4A3A, #0B3D30); --wa-b-verde-l: rgba(37, 211, 102, .2);
  --wa-b-azul: linear-gradient(180deg, #183559, #132C4B); --wa-b-azul-l: rgba(92, 168, 255, .22);
  --wa-b-grafite: linear-gradient(180deg, #3B3B42, #333339); --wa-b-grafite-l: rgba(255, 255, 255, .1);
  /* texto claro para o balão grafite no tema claro */
  --wa-inv-tx: #F4F0F0; --wa-inv-tx2: #D6D0D1; --wa-inv-tx3: #BDB6B8; --wa-inv-tick: #53BDEB; --wa-inv-red: #FF8A80;
}
:root[data-theme="light"] {
  /* caixa (claro): cinza suave em vez de quase branco */
  --wa-cx-bg2: #EBEBEE; --wa-cx-s1: #FFFFFF; --wa-cx-s2: #F7F7F8; --wa-cx-s3: #EEEEF1; --wa-cx-s4: #DEDEE3;
  --wa-f-padrao: #E3E3E7; --wa-f-padrao-pt: rgba(30, 30, 45, .075);
  --wa-f-grafite: #D6D6DB; --wa-f-grafite-pt: transparent;
  --wa-f-areia: #EFE6D9; --wa-f-areia-pt: rgba(120, 80, 30, .08);
  --wa-in-padrao: #FFFFFF; --wa-in-grafite: #F7F7F9; --wa-in-areia: #FFFCF7;
  --wa-b-vermelho: linear-gradient(180deg, #FDEDEA, #FBE1DD); --wa-b-vermelho-l: rgba(225, 6, 0, .18);
  --wa-b-verde: linear-gradient(180deg, #DCF8D2, #D2F3C7); --wa-b-verde-l: rgba(15, 117, 54, .2);
  --wa-b-azul: linear-gradient(180deg, #E1EDFF, #D6E6FD); --wa-b-azul-l: rgba(30, 97, 186, .2);
  --wa-b-grafite: linear-gradient(180deg, #3D3D44, #34343A); --wa-b-grafite-l: rgba(0, 0, 0, .2);
}
/* superfícies dentro da caixa */
#wa { --bg-2: var(--wa-cx-bg2); --s1: var(--wa-cx-s1); --s2: var(--wa-cx-s2); --s3: var(--wa-cx-s3); --s4: var(--wa-cx-s4); background: var(--s1); }
#wa .wa__list { background: var(--bg-2); }

/* opções: os mesmos atributos servem para o #wa e para as amostras do Personalizar */
[data-wa-fundo] { --wa-fundo: var(--wa-f-padrao); --wa-fundo-pt: var(--wa-f-padrao-pt); --wa-in: var(--wa-in-padrao); }
[data-wa-fundo="grafite"] { --wa-fundo: var(--wa-f-grafite); --wa-fundo-pt: var(--wa-f-grafite-pt); --wa-in: var(--wa-in-grafite); }
[data-wa-fundo="areia"] { --wa-fundo: var(--wa-f-areia); --wa-fundo-pt: var(--wa-f-areia-pt); --wa-in: var(--wa-in-areia); }
[data-wa-balao] { --wa-out: var(--wa-b-vermelho); --wa-out-l: var(--wa-b-vermelho-l); --wa-out-by: var(--red-tx); }
[data-wa-balao="verde"] { --wa-out: var(--wa-b-verde); --wa-out-l: var(--wa-b-verde-l); --wa-out-by: var(--wa); }
[data-wa-balao="azul"] { --wa-out: var(--wa-b-azul); --wa-out-l: var(--wa-b-azul-l); --wa-out-by: var(--info); }
[data-wa-balao="grafite"] { --wa-out: var(--wa-b-grafite); --wa-out-l: var(--wa-b-grafite-l); --wa-out-by: var(--tx-2); }

#wa .chat__body { background-color: var(--wa-fundo); background-image: radial-gradient(var(--wa-fundo-pt) 1px, transparent 1.3px); background-size: 18px 18px; transition: background-color var(--t-med) var(--ease); }
#wa .msg.in { background: var(--wa-in); }
#wa .msg.out { background: var(--wa-out); border: 1px solid var(--wa-out-l); }
#wa .msg.out .by { color: var(--wa-out-by); }
#wa .msg.out .meta { color: color-mix(in srgb, var(--tx) 68%, transparent); }
:root[data-theme="light"] #wa .msg.in { box-shadow: 0 1px 1px rgba(30, 30, 45, .09); }
/* balão grafite no tema claro: balão escuro com texto claro */
:root[data-theme="light"] #wa[data-wa-balao="grafite"] .msg.out { --tx: var(--wa-inv-tx); --tx-2: var(--wa-inv-tx2); --tx-3: var(--wa-inv-tx3); --tick: var(--wa-inv-tick); --red-tx: var(--wa-inv-red); --wa-out-by: var(--wa-inv-tx2); color: var(--tx); }
:root[data-theme="light"] #wa[data-wa-balao="grafite"] .msg.out :is(.att-pdf, .att-link) { background: rgba(0, 0, 0, .22); }
@media (prefers-reduced-motion: reduce) { #wa .chat__body { transition: none; } }

/* ---------- Painel lateral recolhível ---------- */
#wa { grid-template-columns: 330px minmax(0, 1fr) auto; }
.wa__side { position: relative; display: flex; min-width: 0; min-height: 0; width: 300px; border-left: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; transition: width var(--t-med) var(--ease); }
.wa__side > .wa__ctx { display: grid; flex: none; width: 300px; min-height: 0; border-left: 0; transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease), visibility 0s; }
#wa.lado-off .wa__side { width: 48px; }
#wa.lado-off .wa__side > .wa__ctx { opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); }

/* trilho: ícones das 3 abas, sempre à vista quando o painel está recolhido */
.wa-rail { position: absolute; inset: 0 auto 0 0; z-index: 2; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--bg-2);
  opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), visibility 0s linear var(--t-fast); }
#wa.lado-off .wa-rail { opacity: 1; visibility: visible; transition: opacity var(--t-med) var(--ease) 60ms, visibility 0s; }
.wa-rail button { position: relative; flex: none; width: 40px; display: grid; justify-items: center; gap: 3px; padding: 7px 0 6px; border-radius: var(--r-sm); color: var(--tx-3); transition: background var(--t-fast), color var(--t-fast); }
.wa-rail button svg { width: 18px; height: 18px; flex: none; }
.wa-rail button:hover { color: var(--tx); background: var(--s3); }
.wa-rail button:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.wa-rail small { font-size: 9.5px; line-height: 1; letter-spacing: -.01em; }
.wa-rail__t { height: 36px; padding: 0 !important; place-items: center; color: var(--tx-2) !important; background: var(--s2); border: 1px solid var(--line-2) !important; }
.wa-rail__t:hover { border-color: var(--line-3) !important; }
.wa-rail__sep { width: 22px; height: 1px; margin: 4px 0; background: var(--line-2); flex: none; }
.wa-rail__b.on { color: var(--tx); background: var(--red-soft); box-shadow: inset 2px 0 0 var(--red); }
.wa-rail__b em { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: var(--r-pill); font-style: normal; font-size: 9px; font-weight: 700; display: grid; place-items: center; background: var(--s4); color: var(--tx-2); font-variant-numeric: tabular-nums; }

/* botão de recolher no topo do painel (junto das abas) e no cabeçalho do chat */
.wa-tabs.wa-tabs--x { grid-template-columns: repeat(3, minmax(0, 1fr)) 30px; }
.wa-tabs .wa-tabs__x { align-self: center; justify-self: end; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--tx-3); }
.wa-tabs .wa-tabs__x svg { width: 16px; height: 16px; flex: none; }
.wa-tabs .wa-tabs__x:hover { color: var(--tx); background: var(--s3); }

/* até 1380 px o painel abre POR CIMA do chat (à esquerda do trilho, que fica sempre visível) */
@media (min-width: 761px) and (max-width: 1380px) {
  #wa { grid-template-columns: 300px minmax(0, 1fr) 48px; }
  .wa__side, #wa.lado-off .wa__side { width: 48px; overflow: visible; z-index: 6; }
  .wa-rail, #wa.lado-off .wa-rail { opacity: 1; visibility: visible; border-radius: 0 var(--r-xl) var(--r-xl) 0; }
  .wa__side > .wa__ctx { position: absolute; top: 0; bottom: 0; right: 100%; width: min(320px, calc(100vw - 140px)); background: var(--bg-2); border-left: 1px solid var(--line-2); box-shadow: -18px 0 40px -18px rgba(0, 0, 0, .55); }
  :root[data-theme="light"] .wa__side > .wa__ctx { box-shadow: -18px 0 40px -20px rgba(30, 30, 45, .3); }
  #wa.lado-off .wa__side > .wa__ctx { transform: translateX(24px); }
  /* o trilho ao lado já tem o botão de recolher */
  .wa-tabs.wa-tabs--x { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wa-tabs .wa-tabs__x { display: none; }
}
/* celular: o trilho fica numa coluna estreita à direita da conversa (A3i: o botão do cabeçalho saiu);
   tocar num ícone abre o painel em tela cheia por cima da conversa */
@media (max-width: 760px) {
  #wa { position: relative; }
  #wa.chat-open { grid-template-columns: minmax(0, 1fr) 44px; }
  .wa__side, #wa.lado-off .wa__side { position: static; width: 44px; z-index: auto; border-left: 1px solid var(--line-2); background: var(--bg-2); overflow: visible; }
  .wa-rail, #wa.lado-off .wa-rail { position: static; width: 44px; opacity: 1; visibility: visible; padding: 8px 0; overflow-y: auto; }
  .wa-rail button { width: 38px; }
  .wa-rail small { font-size: 9px; }
  .wa__side > .wa__ctx { position: absolute; top: 0; right: 0; bottom: 0; z-index: 7; width: min(100%, 400px); background: var(--bg-2); box-shadow: -18px 0 40px -18px rgba(0, 0, 0, .55); }
  :root[data-theme="light"] .wa__side > .wa__ctx { box-shadow: -18px 0 40px -20px rgba(30, 30, 45, .3); }
  #wa.lado-off .wa__side > .wa__ctx { transform: translateX(100%); }
  #wa:not(.chat-open) .wa__side { display: none; }
  /* cabeçalho do chat mais justo */
  #wa .chat__head { gap: 8px; padding: 10px 10px 10px 8px; }
  /* no celular o nome fica sozinho na 1ª linha e as ações descem para a 2ª, com alvo de 44 px */
  #wa .chat__head { flex-wrap: wrap; row-gap: 6px; }
  #wa .chat__acts { order: 3; flex: 1 0 100%; gap: 4px; flex-wrap: wrap; }
  #wa .chat__acts .icon-btn, #wa .chat__acts .btn { min-width: 44px; min-height: 44px; }
  #wa .chat__acts .icon-btn { width: 44px; height: 44px; }
  #wa .chat__acts .icon-btn svg { width: 17px; height: 17px; flex: none; }
  #wa .chat__who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* lista no celular: busca, abas e filtros com alvo de 44 px; as abas rolam de lado quando não cabem */
  .wa__search .input-icon .input { height: 44px; }
  .wa__search .icon-btn { width: 44px; height: 44px; flex: none; }
  .wa-f button { height: auto; min-height: 44px; padding: 0 12px; }
  .wa-fd__row { display: flex; overflow-x: auto; scrollbar-width: none; }
  .wa-fd__row::-webkit-scrollbar { display: none; }
  .wa-f .wa-fd__row button.wa-fd { flex: 1 0 auto; min-height: 40px; padding: 0 10px; }
  .wa-f .wa-etqf__l button { height: 44px; }
  /* campo de escrever no celular: respostas rápidas, clipe, microfone e enviar com 44 px */
  .quick__b { height: 44px; padding: 0 14px; }
  .composer .send, .composer .wa-mic, .composer .icon-btn { width: 44px; height: 44px; flex: none; }
  .composer textarea { min-height: 44px; }
}
@media (max-width: 480px) {
  /* celular estreito: "Transferir" vira só o selo do responsável (o texto continua para leitor de tela) */
  #wa .wa-transf { padding: 0 6px; }
  #wa .wa-transf > span:not(.wa-dono) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .wa__side, .wa__side > .wa__ctx, #wa.lado-off .wa__side > .wa__ctx, .wa-rail, #wa.lado-off .wa-rail { transition: none; }
}

/* ---------- Personalizar (fundo + cor das mensagens) ---------- */
.wa-pz { position: relative; flex: none; }
.wa-pz__btn { gap: 6px; }
.wa-pz__btn svg { flex: none; }
.wa-pz__btn[aria-expanded="true"] { border-color: var(--red-line); }
.wa-pz__pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: min(344px, calc(100vw - 32px)); display: grid; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.wa-pz__pop[hidden] { display: none; }
.wa-pz__pop:focus { outline: none; }
.wa-pz__h { display: flex; align-items: flex-start; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.wa-pz__h > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.wa-pz__h b { font-size: var(--fs-sm); font-weight: 600; }
.wa-pz__h small { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); }
.wa-pz__h small svg { width: 12px; height: 12px; flex: none; }
.wa-pz__h .icon-btn { width: 32px; height: 32px; margin: -4px -4px 0 0; flex: none; }
.wa-pz__h .icon-btn svg { width: 16px; height: 16px; }
.wa-pz__g { display: grid; gap: 8px; }
.wa-pz__lbl { font-size: var(--fs-2xs); font-weight: 600; color: var(--tx-2); text-transform: uppercase; letter-spacing: .06em; }
.wa-pz__fs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wa-pz__f { display: grid; gap: 6px; padding: 5px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s1); text-align: center; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.wa-pz__f:hover { border-color: var(--line-3); }
.wa-pz__f[aria-checked="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.wa-pz__am { display: flex; flex-direction: column; gap: 4px; height: 58px; padding: 8px 7px; border-radius: 7px; overflow: hidden; background-color: var(--wa-fundo); background-image: radial-gradient(var(--wa-fundo-pt) 1px, transparent 1.3px); background-size: 9px 9px; border: 1px solid var(--line); }
.wa-pz__am i { display: block; height: 11px; border-radius: 5px; }
.wa-pz__am .in { width: 66%; align-self: flex-start; background: var(--wa-in); box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.wa-pz__am .in.curta { width: 44%; }
.wa-pz__am .out { width: 58%; align-self: flex-end; background: var(--wa-out); border: 1px solid var(--wa-out-l); }
.wa-pz__n { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; font-size: var(--fs-2xs); color: var(--tx-2); white-space: nowrap; }
.wa-pz__n svg { display: none; width: 12px; height: 12px; flex: none; color: var(--red-tx); }
.wa-pz__f[aria-checked="true"] .wa-pz__n { color: var(--tx); font-weight: 600; }
.wa-pz__f[aria-checked="true"] .wa-pz__n svg { display: block; }
.wa-pz__bs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wa-pz__b { display: grid; justify-items: center; gap: 6px; padding: 8px 2px 7px; border-radius: var(--r-sm); border: 1px solid transparent; transition: background var(--t-fast), border-color var(--t-fast); }
.wa-pz__b:hover { background: var(--s3); }
.wa-pz__b[aria-checked="true"] { border-color: var(--line-3); background: var(--s1); }
.wa-pz__b .wa-pz__n { white-space: normal; line-height: 1.2; text-align: center; font-size: 10.5px; }
.wa-pz__b[aria-checked="true"] .wa-pz__n { color: var(--tx); font-weight: 600; }
.wa-pz__bola { width: 34px; height: 34px; border-radius: 50% 50% 6px 50%; display: grid; place-items: center; background: var(--wa-out); border: 1px solid var(--wa-out-l); box-shadow: 0 0 0 3px var(--wa-fundo); color: var(--tx); }
.wa-pz__bola svg { width: 15px; height: 15px; opacity: 0; flex: none; }
.wa-pz__b[aria-checked="true"] .wa-pz__bola { box-shadow: 0 0 0 3px var(--wa-fundo), 0 0 0 5px var(--red); }
.wa-pz__b[aria-checked="true"] .wa-pz__bola svg { opacity: 1; }
:root[data-theme="light"] .wa-pz__bola[data-wa-balao="grafite"] { color: var(--wa-inv-tx); }
.wa-pz__f:focus-visible, .wa-pz__b:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }
.wa-pz__dica { font-size: var(--fs-2xs); }
.wa-pz__ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.wa-pz__ft .btn svg { flex: none; }

/* =====================================================================
   A3e · Dono do cliente, escada de tempo de resposta e Fila de apoio
   ===================================================================== */
/* selo da escada na lista: âmbar (dono avisado) · vermelho (gestor avisado) · vermelho com boia (Fila de apoio) */
.wa-esc { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; color: var(--warn); background: var(--warn-soft); }
.wa-esc svg { width: 11px; height: 11px; flex: none; }
.wa-esc.d2 { color: var(--crit); background: var(--crit-soft); }
.wa-esc.d3 { color: var(--crit); background: var(--crit-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 45%, transparent); }
/* mensagem enviada pelo apoio */
.msg .by .wa-apoio-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 6px; height: 16px; border-radius: var(--r-pill); font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .02em; color: var(--info); background: var(--info-soft); vertical-align: 1px; }
.msg .by .wa-apoio-tag svg { width: 10px; height: 10px; flex: none; }
/* faixa acima do campo de texto: cliente de outro vendedor · respondendo como apoio · cliente esperando */
.wa-dn:empty { display: none; }
.wa-dn { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 14px 6px; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-2xs); color: var(--tx-2); background: var(--s2); border: 1px solid var(--line-2); }
.wa-dn > svg { width: 15px; height: 15px; flex: none; }
.wa-dn > span { flex: 1 1 220px; min-width: 0; display: grid; gap: 1px; line-height: 1.4; }
.wa-dn b { color: var(--tx); font-weight: 600; font-size: var(--fs-xs); }
.wa-dn .btn { flex: none; margin-left: auto; }
.wa-dn.bloq > svg { color: var(--tx-3); }
.wa-dn.bloq > span { display: block; }
.wa-dn.apoio { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.wa-dn.apoio > svg { color: var(--info); }
.wa-dn.d1 { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.wa-dn.d1 > svg { color: var(--warn); }
.wa-dn.d2, .wa-dn.d3 { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 32%, transparent); }
.wa-dn.d2 > svg, .wa-dn.d3 > svg { color: var(--crit); }
.wa-dn__pd { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-style: normal; font-weight: 600; color: var(--warn); }
.wa-dn__pd svg { width: 13px; height: 13px; flex: none; }
/* painel: regra do dono, pedido pendente e reclamação */
.wa-resp__regra { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; line-height: 1.4; }
.wa-resp__regra svg { width: 12px; height: 12px; flex: none; margin-top: 2px; }
.wa-pedido { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 10px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: var(--fs-2xs); color: var(--tx-2); }
.wa-pedido > svg { width: 14px; height: 14px; flex: none; color: var(--warn); margin-top: 1px; }
.wa-pedido > span { flex: 1 1 160px; min-width: 0; display: grid; gap: 2px; line-height: 1.4; }
.wa-pedido b { color: var(--tx); font-weight: 600; }
.wa-pedido__a { display: flex; gap: 6px; margin-left: auto; }
.wa-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.wa-rec__n { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); font-weight: 600; color: var(--crit); }
.wa-rec__n svg { width: 13px; height: 13px; flex: none; }
.wa-rec .btn { margin-left: auto; }
.wa-obr { font-style: normal; font-size: var(--fs-2xs); font-weight: 500; color: var(--red-tx); margin-left: 4px; }
/* cabeçalho: "Sem resposta" + "Fila de apoio" na mesma pílula, clicáveis */
.wa-head .wa-kpis > .wa-kpi-sr { padding: 0 4px; gap: 0; }
.wa-kpi-sr button { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); color: inherit; transition: background var(--t-fast); }
.wa-kpi-sr button:hover { background: var(--s3); }
.wa-kpi-sr button:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.wa-kpi-sr .wa-kpi-ap { border-left: 1px solid var(--line-2); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.wa-kpi-sr small { display: inline-flex; align-items: center; gap: 4px; }
.wa-kpi-sr small svg { width: 12px; height: 12px; flex: none; }
.wa-head .wa-kpis b.crit-tx { color: var(--crit); }
.wa-ped { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: var(--r-pill); white-space: nowrap; flex: none; font-size: var(--fs-2xs); font-weight: 600; color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); transition: background var(--t-fast); }
.wa-ped[hidden] { display: none; }
.wa-ped svg { width: 13px; height: 13px; flex: none; }
.wa-ped b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); font-size: 10.5px; color: var(--tx); background: color-mix(in srgb, var(--warn) 30%, transparent); }
.wa-ped:hover { background: color-mix(in srgb, var(--warn) 22%, transparent); }
.wa-ped:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }
/* sino: notificação que leva a uma tela */
.notif__item.link { cursor: pointer; }
.notif__item.link:focus-visible { outline: 2px solid var(--red-line); outline-offset: -2px; }
@media (max-width: 760px) {
  .wa-dn { margin-inline: 10px; }
  .wa-ped > span { display: none; }
}
/* nome do contato numa linha só, mesmo com o botão do dono mais largo ("Pedir transferência") */
#wa .chat__who { min-width: 0; }
#wa .chat__who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- A3f · aba Cliente: dados editáveis em linha, anotações e conversas reduzidas ---------- */
.wa-who { min-width: 0; flex: 1; }
.wa-who__n { display: flex !important; align-items: center; gap: 4px; min-width: 0; }
.wa-who__n > span { min-width: 0; overflow-wrap: anywhere; }
.wa-ed__b { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: var(--r-xs); color: var(--tx-3); border: 1px solid transparent; transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast); }
.wa-ed__b svg { width: 12px; height: 12px; }
.wa-ed__b:hover { color: var(--tx); background: var(--s3); border-color: var(--line); }
.wa-ed__b:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.kv b.wa-kvx { display: flex; align-items: flex-start; gap: 6px; }
.kv b.wa-kvx > span { flex: 1; min-width: 0; color: var(--tx); font-size: inherit; padding: 0; }
.kv b.wa-kvx > span .mono { color: var(--tx); font-size: inherit; padding: 0; }
.kv b.wa-kvx i { font-style: normal; font-weight: 400; color: var(--tx-3); }
.kv b.wa-kvx em { font-style: normal; font-weight: 400; }
.kv b.wa-kvx .wa-kvx__s { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 400; color: var(--tx-3); }
.kv b.wa-kvx .wa-ed__b { margin: -3px -4px -3px 0; }
.wa-ed { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--red-line); background: color-mix(in srgb, var(--red) 5%, var(--s1)); min-width: 0; animation: rise .3s var(--ease) both; }
.wa-ed .input { width: 100%; min-width: 0; }
.wa-ed .wa-lbl { margin: 0; }
.wa-ed__a { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.wa-ed__cts { display: grid; gap: 3px; min-width: 0; }
.wa-ed__cts .wa-chk { margin-top: 0; padding: 6px 8px; gap: 8px; grid-template-columns: 16px minmax(0, 1fr); }
.wa-ed__cts .wa-chk input { width: 14px; height: 14px; }
.wa-ed__cts .wa-chk small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-ed__cts .wa-chk b { font-size: var(--fs-xs); display: flex; align-items: center; gap: 5px; }
.wa-ed__cts .wa-chk b svg { width: 13px; height: 13px; color: var(--red-tx); }
.wa-ed__cts .wa-chk:has(input:checked) { border-color: var(--red-line); }
.wa-ed__nv { border-style: dashed !important; background: transparent !important; }
.wa-ed__form { display: grid; gap: 6px; min-width: 0; }
.wa-ed__form[hidden] { display: none; }
.wa-ed__form label { display: grid; gap: 3px; font-size: var(--fs-2xs); color: var(--tx-3); min-width: 0; }
.wa-tp { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 10.5px; color: var(--tx-3); }
.wa-tp > span { margin-right: 2px; }
.wa-tp button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--tx-3); font-size: 10.5px; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.wa-tp button svg { width: 12px; height: 12px; }
.wa-tp button:hover { color: var(--tx); border-color: var(--line-3); }
.wa-tp button.on { color: var(--tx); background: var(--red-soft); border-color: var(--red-line); }
.wa-cli .wa-hint svg { color: var(--tx-3); }
/* conversas deste cliente: uma linha por número */
.wa-cn--min { gap: 0; }
.wa-cn--min.aberto { gap: 8px; }
.wa__ctx .wa-cn__tog { width: 100%; text-align: left; flex-wrap: nowrap; cursor: pointer; padding: 0; color: var(--tx-3); }
.wa__ctx .wa-cn__tog > span { flex: none; }
.wa__ctx .wa-cn__tog small { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; }
.wa-cn__tog > svg:last-child { flex: none; width: 14px; height: 14px; transition: transform var(--t-fast); }
.wa-cn--min.aberto .wa-cn__tog > svg:last-child { transform: rotate(180deg); }
.wa-cn__tog:hover { color: var(--tx); }
.wa-cn__tog:focus-visible { outline: 2px solid var(--red-line); outline-offset: 3px; border-radius: 4px; }
.wa-cn__nl { color: var(--wa); font-weight: 600; }
.wa-cn__corpo { display: grid; gap: 8px; min-width: 0; }
.wa-cn__corpo[hidden] { display: none; }
.wa-cn--min .wa-cn { gap: 2px; }
.wa-cn__l { width: 100%; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--r-sm); border: 1px solid transparent; color: inherit; font: inherit; text-align: left; transition: background var(--t-fast), border-color var(--t-fast); }
button.wa-cn__l { cursor: pointer; }
button.wa-cn__l:hover { background: var(--s3); }
button.wa-cn__l:focus-visible { outline: 2px solid var(--red-line); outline-offset: 1px; }
.wa-cn__l.aqui { background: var(--s1); border-color: var(--line); }
.wa-cn__l.vazio { color: var(--tx-3); }
.wa-cn__l .wa-cn__ic { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.wa-cn__l .wa-cn__ic svg { width: 12px; height: 12px; }
.wa-cn__n { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 4px; font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; }
.wa-cn__n b { font-weight: 600; flex: none; }
.wa-cn__n i { font-style: normal; color: var(--tx-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wa-cn__l.vazio .wa-cn__n i { color: var(--tx-3); }
.wa-cn__h { flex: none; font-style: normal; font-size: 10px; color: var(--tx-4); font-variant-numeric: tabular-nums; }
.wa-cn__l .badge { flex: none; height: 18px; min-width: 18px; font-size: 10px; }
.wa-cn__l .wa-cn__aqui { margin-left: 0; flex: none; font-size: 10px; font-weight: 500; }
.wa-cn__l .wa-cn__comecar { flex: none; margin-left: 0; }
/* painel estreito: rótulo em cima, valor embaixo (o lápis fica à direita do valor) */
.wa-cli .kv.tight > div { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 7px 10px; }
.wa-cli .kv.tight > div > span { padding-top: 0; font-size: 10.5px; }
.wa-cli .kv b.wa-kvx .wa-ed__b { margin-top: -18px; }
.wa__ctx .wa-cn__tog { align-items: flex-start; }
.wa__ctx .wa-cn__tog > svg:first-child { margin-top: 1px; flex: none; }
.wa-cn__tt { flex: 1 !important; min-width: 0; display: grid; gap: 2px; }
.wa__ctx .wa-cn__tog .wa-cn__tt small { margin-left: 0; text-transform: none; letter-spacing: 0; font-size: 10.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-who__lead { height: 18px; padding: 0 7px; font-size: 10px; margin-right: 6px; vertical-align: 1px; }

/* Etiquetas no topo da conversa (entre "Passar adiante" e o telefone) */
.wa-etq { position: relative; flex: none; }
.wa-etq__b { display: inline-flex; align-items: center; gap: 6px; }
.wa-etq__b > svg { width: 14px; height: 14px; flex-shrink: 0; }
.wa-etq__b b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--s3); color: var(--tx-2); font-size: var(--fs-2xs); font-weight: 600; }
.wa-etq__b.tem b { background: var(--wa-soft); color: var(--wa); }
.wa-etq__pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: min(320px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.28)); }
.wa-etq__pop[hidden] { display: none; }
.wa-etq__h { display: grid; gap: 2px; }
.wa-etq__h b { font-size: var(--fs-sm); font-weight: 600; }
.wa-etq__h small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-2xs); }
.wa-etq__pop .wa-tags { max-height: 220px; overflow-y: auto; }
@media (max-width: 760px) { .wa-etq__b span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* destaque com 3 opções (Comigo · Sem responsável · Fila de apoio) sem cortar os nomes */
.wa-fd__row { grid-template-columns: auto auto auto; }
.wa-fd__row:has(> .wa-fd:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
.wa-f .wa-fd__row button.wa-fd { padding: 0 5px; gap: 3px; font-size: var(--fs-2xs); }
.wa-fd__row .wa-fd i { min-width: 18px; height: 18px; padding: 0 4px; font-size: var(--fs-2xs); }
.wa-fd__row { gap: 1px; }
.wa-fd__row .wa-fd > span { text-overflow: clip; }

/* Filtro por etiqueta na lista (substitui Leads e Recuperação) */
.wa-etqf { position: relative; display: inline-flex; }
.wa-f .wa-etqf__b { display: inline-flex; align-items: center; gap: 5px; }
.wa-etqf__b svg { width: 12px; height: 12px; flex-shrink: 0; }
.wa-etqf__b span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-etqf__b em { font-style: normal; display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--wa-soft); color: var(--wa); font-size: var(--fs-2xs); font-weight: 600; }
.wa-f .wa-etqf__b.on { border-color: color-mix(in srgb, var(--wa) 45%, transparent); color: var(--tx); background: var(--wa-soft); }
.wa-etqf__m { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 250px; display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.28)); }
.wa-etqf__m[hidden] { display: none; }
.wa-etqf__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-etqf__h b { font-size: var(--fs-xs); font-weight: 600; }
.wa-etqf__l { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.wa-f .wa-etqf__l button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--tx-2); font-size: var(--fs-xs); text-align: left; }
.wa-f .wa-etqf__l button:hover { background: var(--s3); color: var(--tx); }
.wa-f .wa-etqf__l button.on { color: var(--tx); font-weight: 500; }
.wa-f .wa-etqf__l button.zero { color: var(--tx-4); font-weight: 400; }   /* .zero também existe em proposta.css (negrito) */
.wa-etqf__ck { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line-3); }
.wa-etqf__l button.on .wa-etqf__ck { background: var(--wa); border-color: var(--wa); color: #fff; }
.wa-etqf__ck svg { width: 11px; height: 11px; }
.wa-etqf__l em { font-style: normal; font-size: var(--fs-2xs); color: var(--tx-4); }
.wa-etqf__d { font-size: var(--fs-2xs); }

/* A3g · aba Oportunidade: espelho do card do Funil (mesmo HTML do quadro, sem R$) e próximo passo */
.wa-espelho { min-width: 0; }
.wa-espelho .deal { cursor: pointer; min-width: 0; }
.wa-espelho .deal__top { min-width: 0; }
.wa-espelho .deal__top b { min-width: 0; overflow-wrap: anywhere; }
.wa-espelho .deal__tags { min-width: 0; }
.wa-espelho .deal__tags .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-espelho .deal:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }
.wa-opp__acao { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-xs); color: var(--tx-2); min-width: 0; }
.wa-opp__acao > svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--tx-3); }
.wa-opp__acao > div { display: grid; gap: 1px; min-width: 0; }
.wa-opp__acao small { font-size: 10px; color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.wa-opp__acao span { overflow-wrap: anywhere; line-height: 1.4; }
.wa-opp__fup { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); color: var(--tx-2); }
.wa-opp__fup > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-opvazio { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.wa-opvazio > svg { width: 30px; height: 30px; flex: none; padding: 7px; border-radius: var(--r-sm); background: var(--s3); color: var(--tx-3); }
.wa-opvazio > div { display: grid; gap: 4px; min-width: 0; }
.wa-opvazio b { font-size: var(--fs-xs); font-weight: 600; color: var(--tx); }
/* trilho recolhido: "Oportunidade" em duas linhas para caber nos 40 px */
.wa-rail small.wa-rail__2l { display: block; max-width: 40px; white-space: normal; text-align: center; line-height: 1.1; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
.wa-opp .wa-resp small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-opp .wa-resp { flex-wrap: wrap; row-gap: 8px; }
.wa-opp .wa-resp > div { min-width: 92px; }
.wa-opp .wa-resp .btn { flex: none; margin-left: auto; }

/* =====================================================================
   A3h · Etiquetas da empresa × pessoais, "Meu perfil" e cor do balão do cliente
   ===================================================================== */
/* 8 cores de etiqueta (texto legível sobre o fundo suave nos dois temas) */
:root {
  --etq-cinza: #BDB5B7; --etq-cinza-s: rgba(189, 181, 183, .14);
  --etq-vermelho: #FF6B60; --etq-vermelho-s: rgba(255, 90, 78, .15);
  --etq-laranja: #F6A723; --etq-laranja-s: rgba(246, 167, 35, .14);
  --etq-verde: #34D17F; --etq-verde-s: rgba(52, 209, 127, .14);
  --etq-azul: #5CA8FF; --etq-azul-s: rgba(92, 168, 255, .14);
  --etq-roxo: #B794FF; --etq-roxo-s: rgba(183, 148, 255, .15);
  --etq-rosa: #FF7EB6; --etq-rosa-s: rgba(255, 126, 182, .14);
  --etq-ciano: #3FD0D4; --etq-ciano-s: rgba(63, 208, 212, .14);
  /* balão do cliente (escuro): texto claro do tema por cima, contraste AA */
  --wa-c-cinza: #3C3C44; --wa-c-areia: #3A3128; --wa-c-gelo: #1D3346;
}
:root[data-theme="light"] {
  --etq-cinza: #4A4446; --etq-cinza-s: rgba(74, 68, 70, .09);
  --etq-vermelho: #C20800; --etq-vermelho-s: rgba(225, 6, 0, .08);
  --etq-laranja: #935700; --etq-laranja-s: rgba(196, 122, 0, .12);
  --etq-verde: #11703D; --etq-verde-s: rgba(17, 112, 61, .1);
  --etq-azul: #1E61BA; --etq-azul-s: rgba(30, 97, 186, .09);
  --etq-roxo: #6B3FB8; --etq-roxo-s: rgba(107, 63, 184, .1);
  --etq-rosa: #A8245B; --etq-rosa-s: rgba(168, 36, 91, .09);
  --etq-ciano: #0B6A70; --etq-ciano-s: rgba(11, 106, 112, .1);
  /* balão do cliente (claro): texto escuro do tema por cima */
  --wa-c-cinza: #EDEDF0; --wa-c-areia: #F6EBDC; --wa-c-gelo: #E2EFFA;
}
[data-cor] { --etq: var(--etq-cinza); --etq-s: var(--etq-cinza-s); }
[data-cor="vermelho"] { --etq: var(--etq-vermelho); --etq-s: var(--etq-vermelho-s); }
[data-cor="laranja"] { --etq: var(--etq-laranja); --etq-s: var(--etq-laranja-s); }
[data-cor="verde"] { --etq: var(--etq-verde); --etq-s: var(--etq-verde-s); }
[data-cor="azul"] { --etq: var(--etq-azul); --etq-s: var(--etq-azul-s); }
[data-cor="roxo"] { --etq: var(--etq-roxo); --etq-s: var(--etq-roxo-s); }
[data-cor="rosa"] { --etq: var(--etq-rosa); --etq-s: var(--etq-rosa-s); }
[data-cor="ciano"] { --etq: var(--etq-ciano); --etq-s: var(--etq-ciano-s); }

/* chip de etiqueta: desligado = tracejado com a bolinha da cor; ligado = fundo suave e texto na cor */
.wa-etqc { display: inline-flex; align-items: center; gap: 5px; height: 24px; max-width: 100%; padding: 0 9px 0 7px; border-radius: var(--r-pill); font-size: 11px; color: var(--tx-2); border: 1px dashed var(--line-3); background: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.wa-etqc > i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--etq); }
.wa-etqc > svg { flex: none; width: 12px; height: 12px; }
button.wa-etqc:hover { border-color: var(--etq); color: var(--tx); }
.wa-etqc.on { border-style: solid; border-color: color-mix(in srgb, var(--etq) 40%, transparent); background: var(--etq-s); color: var(--etq); font-weight: 500; }
.wa-etqc:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }
.wa-tags button.wa-etqc { gap: 5px; padding: 0 9px 0 7px; font-size: var(--fs-2xs); color: var(--tx-2); }
.wa-tags button.wa-etqc.on { border-style: solid; border-color: color-mix(in srgb, var(--etq) 40%, transparent); background: var(--etq-s); color: var(--etq); }

/* popover do botão Etiquetas: duas seções */
.wa-etq__sec { display: grid; gap: 6px; }
.wa-etq__st, .wa-etqf__st { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); font-weight: 600; color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.wa-etq__st svg, .wa-etqf__st svg { width: 12px; height: 12px; flex: none; }
.wa-etq__st span, .wa-etqf__st span { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--tx-4); }
.wa-etq__pop .wa-etq__l { max-height: 150px; overflow-y: auto; }
.wa-etq__pop .wa-newtag { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
.wa-etq__cores { grid-column: 1 / -1; }
.wa-etq__mp { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); }
.wa-etq__mp svg { width: 13px; height: 13px; flex: none; }
.wa-etq__nota { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-2xs); line-height: 1.45; }
.wa-etq__nota svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }

/* filtro "Etiquetas ▾" com seções e a bolinha da cor */
.wa-etqf__l .wa-etqf__st { padding: 8px 8px 2px; }
.wa-etqf__l .wa-etqf__st:first-child { padding-top: 0; }
.wa-etqf__n { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-etqf__cor { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--etq); }
.wa-etqf__v { padding: 2px 8px 4px; font-size: var(--fs-2xs); }
.wa-etqf__m { width: min(260px, calc(100vw - 32px)); }

/* bolinhas na lista de conversas (até 3) */
.wa-etqdots { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.wa-etqdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--etq); }
.wa-etqdots i.eu { box-shadow: 0 0 0 1.5px var(--s1), 0 0 0 2.5px var(--etq); width: 6px; height: 6px; margin: 0 1px; }
.wa-etqdots em { font-style: normal; font-size: 10px; color: var(--tx-4); }

/* respostas rápidas: as minhas depois das da empresa */
.quick__sep { flex: none; width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line-3); }
.quick__b--eu { display: inline-flex; align-items: center; gap: 5px; border-style: dashed; }
.quick__b--eu svg { width: 12px; height: 12px; flex: none; color: var(--tx-3); }

/* balão do cliente: "Padrão" acompanha o fundo; as outras cores passam por cima */
[data-wa-fundo][data-wa-cli="cinza"], [data-wa-cli="cinza"] { --wa-in: var(--wa-c-cinza); }
[data-wa-fundo][data-wa-cli="areia"], [data-wa-cli="areia"] { --wa-in: var(--wa-c-areia); }
[data-wa-fundo][data-wa-cli="gelo"], [data-wa-cli="gelo"] { --wa-in: var(--wa-c-gelo); }
.mp-bola-in { background: var(--wa-in); border-color: var(--line-2); border-radius: 50% 50% 50% 6px; }
/* no tema claro, as cores claras do cliente ganham um contorno fino para não sumir no fundo */
:root[data-theme="light"] #wa:not([data-wa-cli="padrao"]) .msg.in, :root[data-theme="light"] .mp-prev:not([data-wa-cli="padrao"]) .mp-prev__in { box-shadow: 0 0 0 1px rgba(30, 30, 45, .1), 0 1px 1px rgba(30, 30, 45, .09); }

/* botão "Meu perfil" no topo do WhatsApp */
.wa-mp-b { gap: 6px; }
.wa-mp-b svg { flex: none; }

/* ---------- Gaveta "Meu perfil" ---------- */
.mp-dw .drawer__head.mp-head { align-items: center; }
.mp-head .avatar { width: 40px; height: 40px; flex: none; font-size: 13px; }
.mp-head h3 { margin: 0; }
.mp-head > div { min-width: 0; }
.mp-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-nav { display: flex; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.mp-nav::-webkit-scrollbar { display: none; }
.mp-nav button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s1); color: var(--tx-2); font-size: var(--fs-xs); white-space: nowrap; transition: border-color var(--t-fast), color var(--t-fast); }
.mp-nav button:hover { border-color: var(--line-3); color: var(--tx); }
.mp-nav button svg { width: 13px; height: 13px; flex: none; }
.mp-body { display: grid; gap: 14px; align-content: start; scroll-padding-top: 8px; }
.mp-sec { display: grid; gap: 12px; min-width: 0; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--s1); scroll-margin-top: 8px; }
.mp-sec__h { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.mp-sec__h > div { display: grid; gap: 2px; min-width: 0; }
.mp-sec__h h4 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.mp-sec__h small { font-size: var(--fs-2xs); line-height: 1.45; }
.mp-sec__ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--s3); color: var(--tx-2); }
.mp-sec__ic svg { width: 15px; height: 15px; }
.mp-g { display: grid; gap: 8px; min-width: 0; }
.mp-lbl { font-size: var(--fs-2xs); font-weight: 600; color: var(--tx-2); text-transform: uppercase; letter-spacing: .06em; }
.mp-dica { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-2xs); line-height: 1.45; }
.mp-dica svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.mp-vazio { margin: 0; font-size: var(--fs-xs); color: var(--tx-3); }
.mp-row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mp-row-end .btn svg, .mp-etq__a .btn svg, .mp-novo .btn svg { flex: none; }
.mp-ib { width: 30px; height: 30px; }
.mp-ib svg { width: 15px; height: 15px; }
.mp-ib.danger:hover { color: var(--crit); }
.mp-btn-danger { background: var(--crit-soft); color: var(--crit); border: 1px solid color-mix(in srgb, var(--crit) 35%, transparent); }
.mp-btn-danger:hover { background: color-mix(in srgb, var(--crit) 22%, transparent); }

/* cores (8 bolinhas) */
.mp-cores { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-cor { width: 22px; height: 22px; border-radius: 50%; background: var(--etq); border: 2px solid var(--s1); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.mp-cor:hover { transform: scale(1.08); }
.mp-cor[aria-checked="true"] { box-shadow: 0 0 0 2px var(--etq); }
.mp-cor:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }

/* minhas etiquetas */
.mp-etqs { display: grid; gap: 6px; }
.mp-etq { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); }
.mp-etq .wa-etqc { justify-self: start; }
.mp-etq__n { font-size: var(--fs-2xs); min-width: 0; }
.mp-etq__a { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.mp-etq.ed { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; }
.mp-etq.ap { grid-template-columns: auto minmax(0, 1fr); border-color: color-mix(in srgb, var(--crit) 35%, transparent); }
.mp-etq.ap .mp-etq__n { color: var(--tx-2); font-size: var(--fs-xs); }
.mp-etq.ap .mp-etq__a { grid-column: 1 / -1; }
.mp-novo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.mp-novo .mp-cores { grid-column: 1 / -1; order: 3; }

/* aparência: prévia ao vivo com um balão de cada lado */
.mp-prev { display: grid; gap: 8px; padding: 14px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background-color: var(--wa-fundo); background-image: radial-gradient(var(--wa-fundo-pt) 1px, transparent 1.3px); background-size: 14px 14px; transition: background-color var(--t-med) var(--ease); }
.mp-prev > div { display: grid; gap: 2px; max-width: 80%; padding: 7px 10px 5px; border-radius: 10px; font-size: var(--fs-xs); line-height: 1.4; color: var(--tx); }
.mp-prev b { font-size: 10.5px; font-weight: 600; }
.mp-prev small { justify-self: end; display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: color-mix(in srgb, var(--tx) 62%, transparent); }
.mp-prev small svg { width: 12px; height: 12px; color: var(--tick); }
.mp-prev__in { justify-self: start; background: var(--wa-in); border-top-left-radius: 3px; }
.mp-prev__in b { color: var(--tx-2); }
.mp-prev__out { justify-self: end; background: var(--wa-out); border: 1px solid var(--wa-out-l); border-top-right-radius: 3px; }
.mp-prev__out b { color: var(--wa-out-by); }
:root[data-theme="light"] .mp-prev__in { box-shadow: 0 1px 1px rgba(30, 30, 45, .09); }
:root[data-theme="light"] .mp-prev[data-wa-balao="grafite"] .mp-prev__out { --tx: var(--wa-inv-tx); --wa-out-by: var(--wa-inv-tx2); --tick: var(--wa-inv-tick); color: var(--tx); }
.mp-sec .wa-pz__f, .mp-sec .wa-pz__b { background: var(--s2); }
.mp-sec .wa-pz__b[aria-checked="true"] { background: var(--s3); }

/* respostas rápidas */
.mp-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); font-weight: 600; color: var(--tx); }
.mp-sub svg { width: 13px; height: 13px; flex: none; color: var(--tx-3); }
.mp-sub em { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--s3); color: var(--tx-2); font-size: 10px; }
.mp-sub small { font-weight: 400; font-size: var(--fs-2xs); }
.mp-qe { display: flex; flex-wrap: wrap; gap: 5px; }
.mp-qe__b { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2); color: var(--tx-3); font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-ql { display: grid; gap: 6px; }
.mp-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 6px 8px 10px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); }
.mp-q.ed { border-color: var(--red-line); }
.mp-q__t { display: grid; gap: 1px; min-width: 0; }
.mp-q__t b { font-size: var(--fs-xs); font-weight: 600; }
.mp-q__t small { font-size: var(--fs-2xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-qf { display: grid; gap: 8px; padding-top: 4px; }
.mp-ta { width: 100%; resize: vertical; min-height: 56px; font: inherit; font-size: var(--fs-sm); line-height: 1.45; padding: 8px 10px; }
.mp-qf .input, .mp-assin .input { width: 100%; }

/* assinatura */
.mp-assin { display: grid; gap: 10px; }
.mp-sw { margin-left: 0; justify-self: start; font-size: var(--fs-sm); color: var(--tx-2); gap: 9px; }
.mp-assin__prev { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2); border: 1px dashed var(--line-3); }
.mp-assin__prev small { font-size: 10.5px; }
.mp-assin__prev p { margin: 0; font-size: var(--fs-xs); line-height: 1.5; overflow-wrap: anywhere; }
.mp-assin__prev p span { color: var(--tx-3); }

/* avisos */
.mp-avs { display: grid; gap: 4px; }
.mp-av { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mp-av:last-child { border-bottom: 0; }
.mp-av__ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--s3); color: var(--tx-3); }
.mp-av__ic svg { width: 14px; height: 14px; }
.mp-av__t { display: grid; gap: 1px; min-width: 0; }
.mp-av__t b { font-size: var(--fs-sm); font-weight: 500; }
.mp-av__t small { font-size: var(--fs-2xs); line-height: 1.4; }
.mp-av .wa-sw { margin-left: 0; }

/* meta */
.mp-metas { display: grid; gap: 4px; }
.mp-meta { padding: 6px 0; border-bottom: 1px solid var(--line); }
.mp-meta:last-child { border-bottom: 0; }

/* preferências: escolha única em pílulas */
.mp-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-seg button { height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2); color: var(--tx-2); font-size: var(--fs-xs); }
.mp-seg button:hover { border-color: var(--line-3); color: var(--tx); }
.mp-seg button[aria-checked="true"] { background: var(--wa-soft); border-color: color-mix(in srgb, var(--wa) 45%, transparent); color: var(--tx); font-weight: 500; }
.mp-seg button:focus-visible { outline: 2px solid var(--red-line); outline-offset: 2px; }

.mp-foot { justify-content: space-between; align-items: center; }
.mp-foot > span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); min-width: 0; }
.mp-foot > span svg { width: 13px; height: 13px; flex: none; }
.mp-foot .btn svg { flex: none; }
@media (max-width: 520px) {
  .mp-dw .drawer__body { padding: 14px; }
  .mp-sec { padding: 12px; }
  .mp-nav { padding: 8px 14px; }
  .mp-dw .drawer__head { padding: 16px 14px 12px; }
  .mp-dw .drawer__foot { padding-left: 14px; padding-right: 14px; }
  .mp-sec .wa-pz__bs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .mp-prev { transition: none; } .mp-cor { transition: none; } }

/* ---------- A3i · Topo do chat: Agenda, busca na conversa e anexos ---------- */
/* Agenda (follow-up desta conversa): mesmo desenho do botão Etiquetas, com selo hoje (âmbar) / atrasado (vermelho) */
.wa-agc__b .wa-agc__n { background: var(--warn-soft); color: var(--warn); }
.wa-agc__b .wa-agc__n.atrasado { background: var(--crit-soft); color: var(--crit); }
.wa-agc__b[aria-expanded="true"], .wa-etq__b[aria-expanded="true"] { border-color: var(--red-line); }
.wa-agc__pop { width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 160px)); overflow-y: auto; }
.wa-agc__corpo { display: grid; gap: 10px; min-width: 0; }
.wa-agc__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.wa-agc__acts .btn > svg { flex-shrink: 0; }
.wa-agc__mini { display: inline-flex; gap: 2px; margin-left: auto; }
.wa-agc__mini .wa-fc__b { width: 28px; height: 28px; padding: 0; justify-content: center; }
.wa-agc__mini .wa-fc__b.conf { width: auto; padding: 0 8px; }
.wa-agc__adiar { position: relative; display: inline-flex; }
.wa-agc__menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; min-width: 200px; display: grid; padding: 4px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .28); }
.wa-agc__menu[hidden] { display: none; }
.wa-agc__menu button { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--tx-2); text-align: left; }
.wa-agc__menu button svg { width: 14px; height: 14px; color: var(--tx-3); }
.wa-agc__menu button small { font-size: var(--fs-2xs); color: var(--tx-4); }
.wa-agc__menu button:hover, .wa-agc__menu button:focus-visible { background: var(--s3); color: var(--tx); outline: none; }
.wa-agc__vazio { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); }
.wa-agc__vazio > svg { width: 18px; height: 18px; flex: none; color: var(--tx-3); margin-top: 1px; }
.wa-agc__vazio span { display: grid; gap: 2px; font-size: var(--fs-xs); }
.wa-agc__vazio small { font-size: var(--fs-2xs); line-height: 1.4; }
.wa-agc__todos { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); }
.wa-agc__todos svg { width: 13px; height: 13px; flex: none; }
/* aba Oportunidade: linha pequena "Follow-up: dd/mm · ver na Agenda" */
.wa-opp__agc { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 30px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.wa-opp__agc > svg { width: 14px; height: 14px; flex: none; color: var(--tx-3); }
.wa-opp__agc > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-opp__agc em { margin-left: auto; flex: none; font-style: normal; font-size: var(--fs-2xs); color: var(--red-tx); }
.wa-opp__agc:hover { border-color: var(--line-3); background: var(--s2); }
.wa-opp__agc.hoje > svg { color: var(--warn); }
.wa-opp__agc.atrasado > svg { color: var(--crit); }

/* busca na conversa: barra logo abaixo do cabeçalho */
.wa-bq { display: flex; align-items: center; gap: 4px; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); background: var(--s2); min-width: 0; }
.wa-bq[hidden] { display: none; }
.wa-bq > svg { width: 15px; height: 15px; flex: none; color: var(--tx-3); margin-right: 4px; }
.wa-bq .input { flex: 1; min-width: 0; height: 32px; }
.wa-bq__n { flex: none; min-width: 52px; padding: 0 6px; text-align: right; font-size: var(--fs-2xs); color: var(--tx-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wa-bq__n.zero { color: var(--crit); }
.wa-bq .icon-btn { flex: none; width: 32px; height: 32px; }
.wa-bq .icon-btn svg { flex: none; }
.wa-bq .icon-btn:disabled { opacity: .35; cursor: default; }
.chat__acts .wa-lupa.on { color: var(--tx); background: var(--s3); }
mark.wa-hl { padding: 0 1px; border-radius: 3px; color: inherit; background: color-mix(in srgb, var(--warn) 32%, transparent); }
mark.wa-hl.on { background: color-mix(in srgb, var(--warn) 62%, transparent); box-shadow: 0 0 0 2px var(--warn); }

/* anexar: botão do clipe travado (o clique explica o motivo), área de soltar e balões */
.composer .wa-clip.off { opacity: .45; }
.wa-drop { position: absolute; inset: 8px; z-index: 8; display: grid; place-items: center; border-radius: var(--r-lg); border: 2px dashed var(--wa); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
.wa-drop[hidden] { display: none; }
.wa-drop > div { display: grid; justify-items: center; gap: 6px; max-width: 300px; padding: 18px 22px; text-align: center; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.wa-drop svg { width: 30px; height: 30px; color: var(--wa); }
.wa-drop b { font-size: var(--fs-md); font-weight: 600; }
.wa-drop small { font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.4; }
.wa-drop.bloq { border-color: var(--crit); }
.wa-drop.bloq svg { color: var(--crit); }
.wa-att-img img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.wa-att-nome { display: flex; align-items: center; gap: 5px; min-width: 0; margin: -2px 0 2px; font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-att-nome svg { width: 12px; height: 12px; flex: none; }
.wa-att-nome b { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-att-nome small { flex: none; }
.msg .att-pdf + p, .msg .wa-att-nome + p { margin-top: 2px; }
.wa-ext { font-size: 10px; letter-spacing: .02em; }
.wa-ext.doc { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px var(--info); }
.wa-ext.xls { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.wa-ext.ppt { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.wa-ext.txt, .wa-ext.outro { background: var(--s4); color: var(--tx); }
.wa-ext.img { background: var(--s4); color: var(--tx); }
@media (max-width: 760px) { .att-pdf { min-width: 0; } .wa-att-img { width: min(300px, 64vw); } }

/* prévia antes de enviar */
.wa-anxm { width: min(520px, calc(100vw - 24px)); }
.wa-anx { display: grid; gap: 10px; }
.wa-anx__l { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 300px; overflow-y: auto; }
.wa-anx__it { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s2); }
.wa-anx__it.erro { border-color: var(--crit); background: var(--crit-soft); }
.wa-anx__th { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-sm); background: var(--s3); }
.wa-anx__th img { width: 100%; height: 100%; object-fit: cover; }
.wa-anx__th .att-pdf__ic { width: 34px; height: 42px; }
.wa-anx__t { display: grid; gap: 2px; min-width: 0; }
.wa-anx__t b { font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-anx__t small { font-size: var(--fs-2xs); color: var(--tx-3); }
.wa-anx__t em { font-style: normal; font-weight: 600; color: var(--crit); }
.wa-anx__it .icon-btn svg { flex: none; }
.wa-anx__leg { width: 100%; resize: vertical; min-height: 56px; }
.wa-anx .wa-chk.off { opacity: .6; }
.wa-anx__nota { display: inline-flex; align-items: center; gap: 5px; }
.wa-anx__nota svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 520px) { .wa-anxm .modal__foot { flex-wrap: wrap; } .wa-anx__nota { width: 100%; } }
/* topo do chat em conversa estreita (ex.: 1440 px com o painel aberto): Etiquetas e Agenda ficam só com o ícone e o selo,
   para o nome do contato continuar legível; o nome completo fica no title de cada botão */
#wa .wa__chat { container: wachat / inline-size; }
#wa .chat__who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container wachat (max-width: 640px) {
  .chat__acts .wa-etq__b:not(.wr-fin-b) { padding: 0 8px; }   /* 27/11: o "Finalizar" mantém o nome (ele só encolhe abaixo de 520) */
  .chat__acts .wa-etq__b:not(.wr-fin-b) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@container wachat (max-width: 420px) {
  #wa .wa-transf { padding: 0 6px; }
  #wa .wa-transf > span:not(.wa-dono) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* celular estreito: sem o avatar no topo do chat (o nome do contato precisa caber ao lado dos botões e do trilho) */
@media (max-width: 480px) {
  #wa .chat__head > .avatar { display: none; }
  #wa .chat__head { gap: 6px; }
  #wa .chat__acts .wa-etq__b { padding: 0 6px; gap: 4px; }
}

/* 09/11 · mensagem de voz na demonstração (o sistema real usa o player de áudio · whatsapp-real.css) */
.wa-voz { display: flex; align-items: center; gap: 8px; min-width: 200px; margin: 2px 0; }
.wa-voz .icon-btn { width: 32px; height: 32px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--tx) 12%, transparent); }
.wa-voz__onda { display: flex; align-items: center; gap: 2px; flex: 1; height: 24px; }
.wa-voz__onda i { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--tx) 45%, transparent); height: 30%; }
.wa-voz__onda i:nth-child(3n) { height: 70%; } .wa-voz__onda i:nth-child(4n) { height: 50%; } .wa-voz__onda i:nth-child(5n) { height: 90%; }
.wa-voz small { flex: none; font-variant-numeric: tabular-nums; font-size: var(--fs-2xs); opacity: .8; }
