/* =============================================================
   Telas de trabalho: Caixa de entrada, Contatos, CRM, Campanhas, Fluxos
   ============================================================= */

/* ---------- Telas de altura cheia (caixa e editor de fluxos) ---------- */
body.tela-cheia main { padding: 0; }
body.tela-cheia .tela { max-width: none; }
.badge-menu { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--green); color: var(--navy); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.barra-inferior .badge-menu { position: absolute; margin: 0; transform: translate(12px, -4px); min-width: 17px; height: 17px; font-size: 10px; }
.barra-inferior a { position: relative; }

/* ---------- Ícone/avatar genérico ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-100); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.p { width: 32px; height: 32px; font-size: 11.5px; }
.av.g { width: 64px; height: 64px; font-size: 20px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--blue-100); color: var(--blue); white-space: nowrap; }
.chip.verde { background: var(--green-50); color: var(--green-700); }
.chip.ambar { background: var(--amber-50); color: var(--amber-700); }
.chip.cinza { background: #EEF2F7; color: var(--muted); }
.chip button { background: none; border: 0; padding: 0; margin-left: 2px; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; opacity: .7; }
.chip button:hover { opacity: 1; }
.chips-linha { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.icone-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg-soft); flex: none; }
.icone-btn:hover { background: var(--blue-50); border-color: var(--blue-300); color: var(--blue); }
.icone-btn.ativo { background: var(--blue-100); color: var(--blue); border-color: var(--blue-300); }
.select { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 0 10px; height: 38px; max-width: 100%; }
.select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,95,173,.14); }

/* ---------- Gaveta lateral e janelas ---------- */
.gaveta-fundo { position: fixed; inset: 0; background: rgba(15,35,66,.35); z-index: 48; }
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--surface); z-index: 49; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: entrar-dir .2s ease; }
@keyframes entrar-dir { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.gaveta-cab { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.gaveta-cab h2 { margin: 0; font-size: 18px; color: var(--navy); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gaveta-corpo { padding: 20px 22px; overflow-y: auto; display: grid; gap: 18px; align-content: start; flex: 1; }
.gaveta-rodape { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .inteiro { grid-column: 1 / -1; }
.secao-tit { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -6px; }
.janela { width: min(640px, 100%); }
.janela.larga { width: min(860px, 100%); }

/* =============================================================
   CAIXA DE ENTRADA
   ============================================================= */
.cx { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; height: calc(100vh - var(--topo)); background: var(--surface); }
.cx.sem-info { grid-template-columns: 340px minmax(0, 1fr); }
.cx.sem-info .cx-info { display: none; }
.cx-lista { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.cx-lista-cab { padding: 18px 18px 10px; display: flex; align-items: center; gap: 10px; }
.cx-lista-cab h2 { margin: 0; font-size: 20px; color: var(--navy); flex: 1; }
.cx-filtros { padding: 0 18px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.cx-abas { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.cx-abas button { border: 0; background: transparent; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); display: flex; gap: 5px; justify-content: center; align-items: center; }
.cx-abas button[aria-pressed="true"] { background: var(--surface); color: var(--blue); font-weight: 600; box-shadow: var(--shadow-sm); }
.cx-abas b { font-size: 11px; background: var(--blue-100); color: var(--blue); border-radius: 99px; padding: 0 6px; }
.cx-itens { overflow-y: auto; flex: 1; }
.cx-item { display: flex; gap: 12px; padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--line); position: relative; }
.cx-item:hover { background: var(--blue-50); }
.cx-item.ativa { background: var(--blue-100); }
.cx-item.ativa::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.cx-item-corpo { min-width: 0; flex: 1; display: grid; gap: 2px; }
.cx-item-topo { display: flex; gap: 8px; align-items: baseline; }
.cx-item-topo strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cx-item-topo time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cx-item-msg { display: flex; gap: 8px; align-items: center; }
.cx-item-msg span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.cx-item.nao-lida .cx-item-msg span { color: var(--fg); font-weight: 500; }
.cx-nl { background: var(--green); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 99px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.cx-item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.cx-mais { margin: 12px auto; }

.cx-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); background-image: radial-gradient(rgba(15,63,122,.045) 1px, transparent 1px); background-size: 16px 16px; }
.cx-vazio { margin: auto; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; padding: 24px; }
.cx-vazio .kpi-ico { width: 64px; height: 64px; border-radius: 20px; }
.cx-chat-cab { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cx-chat-cab .quem { flex: 1; min-width: 140px; display: grid; }
.cx-chat-cab .quem strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-chat-cab .quem span { font-size: 12.5px; color: var(--muted); }
.cx-chat-cab .acoes-cx { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cx-voltar { display: none; }
.cx-msgs { flex: 1; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 6px; }
.cx-dia { align-self: center; font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,.85); padding: 3px 12px; border-radius: 99px; margin: 10px 0 4px; box-shadow: var(--shadow-sm); }
.msg-b { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 1px rgba(0,0,0,.06); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.msg-b.enviada { align-self: flex-end; background: var(--bubble); border-bottom-right-radius: 4px; }
.msg-b.recebida { border-bottom-left-radius: 4px; }
.msg-b.privada { align-self: flex-end; background: #FFF6DB; border: 1px dashed #E9C770; }
.msg-b.privada::before { content: "Nota interna · só a equipe vê"; display: block; font-size: 10.5px; font-weight: 600; color: #A27A10; margin-bottom: 3px; }
.msg-b .autor { display: block; font-size: 11px; font-weight: 600; color: var(--blue); margin-bottom: 2px; }
.msg-b .rodape-msg { display: flex; justify-content: flex-end; gap: 4px; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.msg-atv { align-self: center; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.75); padding: 4px 12px; border-radius: 99px; max-width: 80%; text-align: center; }
.msg-b img.anexo, .msg-b video.anexo { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 2px 0 4px; cursor: zoom-in; background: var(--blue-50); }
.msg-b audio { width: 260px; max-width: 100%; margin: 2px 0; }
.msg-b a.arquivo { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(15,63,122,.06); color: var(--fg); text-decoration: none; margin: 2px 0 4px; }
.cx-compor { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px 14px; display: grid; gap: 8px; position: relative; }
.cx-compor.privada { background: #FFFBEE; }
.cx-modo { display: flex; gap: 4px; }
.cx-modo button { border: 0; background: transparent; padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cx-modo button[aria-pressed="true"] { background: var(--blue-100); color: var(--blue); font-weight: 600; }
.cx-modo button[data-modo="nota"][aria-pressed="true"] { background: #FCEFC7; color: #8A6508; }
.cx-escrever { display: flex; gap: 8px; align-items: flex-end; }
.cx-escrever textarea { flex: 1; resize: none; min-height: 44px; max-height: 180px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; line-height: 1.45; background: var(--surface); }
.cx-escrever textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,95,173,.14); }
.cx-enviar { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.cx-enviar:disabled { opacity: .5; }
.cx-anexo-prev { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--fg-soft); background: var(--blue-50); border-radius: 10px; padding: 6px 10px; }
.cx-respostas { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; z-index: 5; }
.cx-respostas button { display: grid; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; cursor: pointer; gap: 2px; border-bottom: 1px solid var(--line); }
.cx-respostas button:hover, .cx-respostas button.sel { background: var(--blue-50); }
.cx-respostas b { color: var(--blue); font-size: 12.5px; }
.cx-respostas span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cx-info { border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 20px; display: grid; gap: 20px; align-content: start; background: var(--surface); }
.cx-info .perfil { display: grid; justify-items: center; text-align: center; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cx-info .perfil strong { font-size: 16px; }
.cx-info .perfil span { color: var(--muted); font-size: 13px; }
.cx-info dl { margin: 0; display: grid; gap: 10px; }
.cx-info dt { font-size: 11.5px; color: var(--muted); }
.cx-info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.cx-bloco { display: grid; gap: 10px; }
.cx-bloco h3 { margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cx-add-etq { display: flex; gap: 6px; }
.cx-add-etq input { flex: 1; min-width: 0; height: 34px; min-height: 34px; padding: 6px 10px; }
.cartao-mini { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; background: #FBFCFE; }
.ver-imagem { position: fixed; inset: 0; background: rgba(10,20,40,.88); z-index: 60; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.ver-imagem img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* =============================================================
   CONTATOS
   ============================================================= */
.filtros-barra { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros-barra .busca { flex: 1; min-width: 220px; }
.tab-contatos td { white-space: nowrap; }
.tab-contatos td.nome-cel { display: flex; gap: 12px; align-items: center; min-width: 220px; white-space: normal; }
.paginacao { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.import-prev { font-size: 12.5px; }
.import-prev td, .import-prev th { padding: 6px 8px; }

/* =============================================================
   CRM
   ============================================================= */
.crm-quadro { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; min-height: 60vh; }
.crm-col { background: #EDF2F8; border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 240px); min-height: 200px; }
.crm-col-cab { padding: 14px 14px 10px; display: grid; gap: 2px; }
.crm-col-cab .linha { gap: 8px; }
.crm-col-cab strong { font-size: 14px; flex: 1; }
.crm-col-cab .soma { font-size: 12px; color: var(--muted); font-weight: 500; }
.crm-ponto { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.crm-n { font-size: 11.5px; background: var(--surface); border-radius: 99px; padding: 1px 8px; color: var(--muted); font-weight: 600; }
.crm-cartoes { padding: 4px 10px 10px; display: grid; gap: 10px; overflow-y: auto; align-content: start; flex: 1; min-height: 60px; border-radius: 12px; transition: background .12s; }
.crm-cartoes.alvo { background: rgba(27,95,173,.08); outline: 2px dashed var(--blue-300); outline-offset: -4px; }
.crm-cartao { background: var(--surface); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15,63,122,.08); cursor: grab; display: grid; gap: 8px; border: 1px solid transparent; transition: border-color .12s, box-shadow .12s; }
.crm-cartao:hover { border-color: var(--blue-300); box-shadow: var(--shadow); }
.crm-cartao.arrastando { opacity: .45; }
.crm-cartao strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-cartao .sub { font-size: 12.5px; color: var(--muted); }
.crm-cartao .baixo { display: flex; align-items: center; gap: 8px; }
.crm-cartao .valor { font-weight: 600; color: var(--green-700); font-size: 13px; flex: 1; }
.crm-add { margin: 0 10px 12px; border: 1px dashed var(--line-strong); background: transparent; border-radius: 10px; padding: 8px; color: var(--muted); cursor: pointer; font-weight: 500; }
.crm-add:hover { border-color: var(--blue); color: var(--blue); background: var(--surface); }
.etapa-linha { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.etapa-linha input[type=color] { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; background: var(--surface); }

/* =============================================================
   CAMPANHAS
   ============================================================= */
#cp-lista td:first-child { min-width: 230px; }
#cp-lista td:nth-child(2) { min-width: 140px; }
.camp-prog { display: grid; gap: 4px; min-width: 140px; }
.camp-prog .barra { height: 6px; }
.camp-acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.etq-escolha { display: flex; gap: 8px; flex-wrap: wrap; }
.etq-escolha label { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-strong); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.etq-escolha label:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.etq-escolha input { display: none; }
.alcance { display: flex; gap: 12px; align-items: center; background: var(--blue-50); border-radius: 12px; padding: 12px 14px; }
.alcance strong { font-size: 24px; color: var(--navy); }

/* =============================================================
   FLUXOS
   ============================================================= */
.fluxos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.fluxo-card { display: grid; gap: 14px; align-content: start; }
.fluxo-card h3 { margin: 0; font-size: 16px; color: var(--navy); }
.fluxo-card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.dias-semana { display: flex; gap: 6px; flex-wrap: wrap; }
.dias-semana label { width: 44px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; display: grid; place-items: center; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dias-semana label:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.dias-semana input { display: none; }

.ed { display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - var(--topo)); background: var(--bg); }
.ed-barra { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ed-barra .nome-fluxo { font-size: 16px; font-weight: 600; color: var(--navy); border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; min-width: 120px; max-width: 320px; background: transparent; }
.ed-barra .nome-fluxo:hover, .ed-barra .nome-fluxo:focus { border-color: var(--line-strong); outline: none; background: var(--surface); }
.ed-barra .salvo { font-size: 12px; color: var(--muted); margin-right: auto; }
.ed-corpo { display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; min-height: 0; }
.ed-paleta { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: grid; gap: 6px; align-content: start; overflow-y: auto; }
.ed-paleta button { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 10px; cursor: pointer; text-align: left; font-weight: 500; font-size: 13px; color: var(--fg-soft); }
.ed-paleta button:hover { border-color: var(--blue-300); background: var(--blue-50); }
.ed-paleta .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 14px; }
.ed-tela { overflow: auto; position: relative; background-color: #F3F6FA; background-image: radial-gradient(#D5DEEA 1.2px, transparent 1.2px); background-size: 22px 22px; }
.ed-area { position: relative; width: 3200px; height: 2200px; }
.ed-area svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ed-area path.lig { fill: none; stroke: #8FA6C4; stroke-width: 2.5; pointer-events: stroke; cursor: pointer; }
.ed-area path.lig:hover, .ed-area path.lig.sel { stroke: var(--red-600); stroke-width: 3.5; }
.ed-area path.lig-temp { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-dasharray: 6 5; }
.no { position: absolute; width: 240px; background: var(--surface); border-radius: 14px; box-shadow: 0 1px 3px rgba(15,63,122,.12), 0 6px 18px rgba(15,63,122,.06); border: 2px solid transparent; user-select: none; }
.no.sel { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27,95,173,.14), 0 6px 18px rgba(15,63,122,.1); }
.no.alvo { border-color: var(--green); }
.no-cab { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px 12px 0 0; cursor: grab; font-weight: 600; font-size: 13px; color: #fff; }
.no-cab .ic { font-size: 14px; }
.no-corpo { padding: 10px 12px; font-size: 12.5px; color: var(--fg-soft); display: grid; gap: 6px; max-height: 120px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.no-corpo .vazio-no { color: var(--muted); font-style: italic; }
.no-saidas { display: grid; padding: 4px 0 8px; }
.no-saida { position: relative; display: flex; justify-content: flex-end; align-items: center; padding: 5px 24px 5px 12px; font-size: 12px; color: var(--fg-soft); font-weight: 500; gap: 6px; }
.porta { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--blue); cursor: crosshair; z-index: 2; }
.porta.saida { right: -9px; top: 50%; transform: translateY(-50%); }
.porta.saida:hover, .porta.saida.ligada { background: var(--blue); }
.porta.chegada { left: -9px; top: 18px; border-color: #8FA6C4; cursor: default; }
.ed-props { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.ed-props-cab { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.ed-props-cab h3 { margin: 0; font-size: 15px; flex: 1; }
.ed-props-corpo { padding: 16px 18px; display: grid; gap: 14px; align-content: start; }
.opcao-linha { display: flex; gap: 6px; align-items: center; }
.opcao-linha span { width: 24px; text-align: center; font-weight: 700; color: var(--blue); }
.var-dica { font-size: 11.5px; color: var(--muted); }
.var-dica code { background: var(--blue-50); color: var(--blue); padding: 1px 5px; border-radius: 5px; font-size: 11px; cursor: pointer; }
.sim { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sim-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--chat-bg); min-height: 260px; }
.sim-msgs .msg-b { max-width: 88%; font-size: 13px; }
.sim-msgs .msg-b.cliente { align-self: flex-end; background: var(--bubble); }
.sim-msgs .msg-b.robo { align-self: flex-start; }
.sim-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.sim-form input { flex: 1; min-width: 0; }
.ed-celular { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1250px) {
  .cx { grid-template-columns: 300px minmax(0, 1fr); }
  .cx .cx-info { display: none; }
  .cx.info-aberta .cx-info { display: grid; position: fixed; right: 0; top: var(--topo); bottom: 0; width: 330px; z-index: 30; box-shadow: var(--shadow-lg); }
  .ed-corpo { grid-template-columns: 170px minmax(0, 1fr) 300px; }
}
@media (max-width: 820px) {
  .cx, .cx.sem-info { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--topo) - 70px - env(safe-area-inset-bottom, 0px)); }
  .cx.com-conversa .cx-lista { display: none; }
  .cx:not(.com-conversa) .cx-chat { display: none; }
  .cx-voltar { display: grid; }
  .cx-msgs { padding: 16px 12px; }
  .msg-b { max-width: 88%; }
  .cx.info-aberta .cx-info { top: 0; width: 100%; z-index: 46; padding-bottom: 90px; }
  body.tela-cheia .barra-inferior { display: grid; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .crm-quadro { grid-auto-columns: minmax(260px, 84vw); }
  .crm-col { max-height: none; }
  .ed-corpo { display: none; }
  .ed-celular { display: grid; place-items: center; text-align: center; padding: 40px 20px; gap: 10px; color: var(--muted); }
  .ed { height: auto; }
}
