* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --roxo: #6d28d9;
  --roxo-vivo: #7c5cfc;
  --roxo-suave: #efeaff;
  --tinta: #1f1b3a;
  --sidebar: #262052;
  --sidebar-2: #1c1740;
  --fundo: #f7f5fb;
  --card: #ffffff;
  --texto: #2a2547;
  --texto-suave: #7a748f;
  --borda: #e9e5f5;
  --verde: #22c55e;
  --vermelho: #ef4444;
  --sombra: 0 6px 24px rgba(38, 32, 82, .07);
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--fundo); color: var(--texto); font-size: 14px; }
.oculto { display: none !important; }
.serif { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; color: var(--tinta); letter-spacing: .2px; }
.serif em { font-style: italic; font-weight: 500; color: var(--roxo); }

/* ---------- login ---------- */
.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f3effc 0%, #e7defa 45%, #d7c9f6 100%); }
.card-login { background: var(--card); padding: 48px 42px; border-radius: 22px; width: 400px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(38, 32, 82, .18); border: 1px solid #fff; }
.login-chapeu { font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--roxo); }
.card-login h1 { font-size: 30px; }
.card-login .sub { color: var(--texto-suave); margin-top: -6px; }
.card-login label { font-size: 12px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- layout ---------- */
#app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #cfc9ec; display: flex; flex-direction: column; padding: 26px 14px 18px; position: fixed; top: 0; bottom: 0; z-index: 10; }
.logo { padding: 0 12px 26px; display: flex; flex-direction: column; gap: 3px; }
.logo-marca { font-size: 21px; color: #fff; line-height: 1.15; }
.logo-sub { font-size: 9px; font-weight: 700; letter-spacing: 2.5px; color: #8f86c9; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-secao { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #7d74b8; padding: 16px 12px 6px; }
.nav-btn { text-align: left; background: none; border: none; color: #c6bfe8; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; font-family: inherit; display: flex; align-items: center; gap: 9px; }
.nav-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-btn.ativo { background: var(--roxo-vivo); color: #fff; box-shadow: 0 8px 20px rgba(124, 92, 252, .35); }
.sidebar-rodape { font-size: 12px; color: #9b93c6; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
.btn-link { background: none; border: none; color: #b9aef7; cursor: pointer; text-align: left; padding: 0; font-size: 12px; font-family: inherit; }

main { flex: 1; margin-left: 236px; padding: 34px 38px; min-width: 0; }
.pagina-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; gap: 14px; flex-wrap: wrap; }
.chapeu { font-size: 10.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--texto-suave); margin-bottom: 6px; }
.pagina-header h2 { font-size: 28px; }
.header-acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filtro-data { color: var(--texto-suave); font-size: 12px; display: flex; align-items: center; gap: 6px; }

/* ---------- inputs e botões ---------- */
input, select, textarea { border: 1px solid var(--borda); border-radius: 10px; padding: 10px 13px; font-size: 13.5px; font-family: inherit; background: #fff; width: 100%; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: 2px solid #cdbcf9; border-color: var(--roxo-vivo); }
input[type="search"] { width: 240px; }
input[type="date"] { width: auto; }
input[type="color"] { padding: 2px; height: 38px; width: 48px; }
textarea { resize: vertical; }
.btn { border: 1px solid var(--borda); background: #fff; padding: 10px 17px; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; font-family: inherit; color: var(--texto); }
.btn:hover { border-color: #cdbcf9; color: var(--roxo); }
.btn-primario { background: var(--roxo); border-color: var(--roxo); color: #fff; box-shadow: 0 8px 20px rgba(109, 40, 217, .25); }
.btn-primario:hover { background: #5b21b6; color: #fff; }
.btn-perigo { color: var(--vermelho); border-color: #fecaca; }
.btn-perigo:hover { color: var(--vermelho); border-color: var(--vermelho); }
.btn-mini { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.erro { color: var(--vermelho); font-size: 13px; min-height: 16px; }
label { font-size: 13px; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 22px; align-items: flex-start; }
.coluna { background: #eeebf7; border-radius: 16px; min-width: 285px; width: 285px; flex-shrink: 0; border: 1px solid #e4dff2; }
.coluna-header { display: flex; align-items: center; gap: 8px; padding: 13px 15px 11px; font-weight: 700; font-size: 13px; color: var(--tinta); }
.coluna-header .ponto { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.coluna-header .contagem { margin-left: auto; background: #fff; border: 1px solid var(--borda); border-radius: 20px; padding: 1px 9px; font-size: 11.5px; color: var(--texto-suave); }
.coluna-corpo { padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; max-height: calc(100vh - 250px); overflow-y: auto; }
.coluna-corpo.arrastando-sobre { background: var(--roxo-suave); border-radius: 12px; }
.card-lead { background: var(--card); border-radius: 13px; padding: 13px 14px; box-shadow: 0 2px 8px rgba(38,32,82,.06); cursor: pointer; border: 1px solid #f0edf9; }
.card-lead:hover { border-color: var(--roxo-vivo); box-shadow: 0 6px 18px rgba(124,92,252,.14); }
.card-lead .nome { font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--tinta); }
.card-lead .linha { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 10.5px; padding: 2.5px 9px; border-radius: 20px; background: var(--fundo); color: var(--texto-suave); font-weight: 600; border: 1px solid var(--borda); }
.badge-ia { background: var(--roxo-suave); color: var(--roxo); border-color: #ddd0fb; }
.badge-score { background: #e8faee; color: #15803d; border-color: #c9f0d6; }
.badge-valor { background: #fdf6e3; color: #b45309; border-color: #f5e6bd; }
.badge-meta { background: #e7f0fe; color: #1d4ed8; border-color: #c9dcfb; }
.card-lead .previa { font-size: 12px; color: var(--texto-suave); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etiquetas-card { margin-bottom: 6px; }
.etq { font-size: 10.5px; font-weight: 600; padding: 1.5px 8px; border-radius: 20px; border: 1px solid; }

/* filtro de etiquetas no pipeline */
.filtros-etiqueta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.filtro-rot { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--texto-suave); margin-right: 2px; }
.chip-etq { border: 1px solid var(--borda); background: var(--card); padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit; white-space: nowrap; }
.chip-etq:hover { filter: brightness(1.05); }
.chip-etq.ativo { background: var(--roxo); border-color: var(--roxo); color: #fff; }

/* editor de etiquetas na ficha */
.etiquetas-editor { display: flex; flex-wrap: wrap; gap: 6px; }
.etq-toggle { border: 1px solid; background: var(--card); padding: 5px 11px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit; }
.etq-toggle:hover { filter: brightness(1.05); }

/* ---------- drawer ---------- */
.drawer-fundo, .modal-fundo { position: fixed; inset: 0; background: rgba(31, 27, 58, .5); z-index: 40; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--card); z-index: 50; box-shadow: -20px 0 60px rgba(31,27,58,.25); display: flex; flex-direction: column; overflow-y: auto; }
.drawer-header { padding: 22px 24px 16px; border-bottom: 1px solid var(--borda); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.drawer-header h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 21px; color: var(--tinta); }
.drawer-acoes { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--borda); }
.drawer-acoes .btn { text-decoration: none; }
.drawer-corpo { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.abas { display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--borda); position: sticky; top: 69px; background: var(--card); z-index: 2; }
.aba { border: none; background: none; padding: 11px 15px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--texto-suave); border-bottom: 2px solid transparent; font-family: inherit; }
.aba.ativa { color: var(--roxo); border-bottom-color: var(--roxo); }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo > span { font-size: 10.5px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 1.2px; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* ---------- conversa ---------- */
.conversa { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #f2effa; border-radius: 14px; max-height: 420px; overflow-y: auto; border: 1px solid var(--borda); }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; white-space: pre-wrap; box-shadow: 0 1px 3px rgba(38,32,82,.06); }
.msg.in { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--roxo-suave); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .meta { display: block; font-size: 10px; color: var(--texto-suave); margin-top: 4px; }
.enviar-msg { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- timeline ---------- */
.evento { display: flex; gap: 12px; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--borda); }
.evento .quando { color: var(--texto-suave); white-space: nowrap; font-size: 11.5px; padding-top: 1px; }

/* ---------- dashboard ---------- */
.cards-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card-stat { background: var(--card); border-radius: 16px; padding: 20px 22px; box-shadow: var(--sombra); border: 1px solid #f1eefa; position: relative; }
.card-stat .rotulo { font-size: 10.5px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 1.5px; }
.card-stat .valor { font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 600; margin-top: 6px; color: var(--tinta); }
.card-stat .detalhe { font-size: 12px; color: var(--texto-suave); margin-top: 4px; }
.card-stat .icone { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--roxo-suave); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.paineis { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.painel { background: var(--card); border-radius: 16px; padding: 22px; box-shadow: var(--sombra); border: 1px solid #f1eefa; }
.painel h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--tinta); }
.painel h4 em { font-style: italic; font-weight: 500; color: var(--roxo); }
.barra-linha { display: grid; grid-template-columns: 135px 1fr 42px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 9px; }
.barra-linha .nome-barra { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texto); }
.barra-trilho { background: #f0edf8; border-radius: 20px; height: 13px; overflow: hidden; }
.barra-preenchida { height: 100%; background: linear-gradient(90deg, var(--roxo-vivo), var(--roxo)); border-radius: 20px; min-width: 2px; }
.barra-linha .num { text-align: right; font-weight: 700; color: var(--tinta); }

/* ---------- inbox whatsapp ---------- */
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 170px); min-height: 420px; }
.inbox-coluna { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.inbox-filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.filtro-canal { border: 1px solid var(--borda); background: var(--card); color: var(--texto-suave); padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: inherit; white-space: nowrap; }
.filtro-canal:hover { border-color: var(--roxo-vivo); color: var(--roxo); }
.filtro-canal.ativo { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.filtro-atend { border: 1px solid var(--borda); background: var(--card); color: var(--texto-suave); padding: 5px 11px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit; white-space: nowrap; }
.filtro-atend:hover { border-color: var(--roxo-vivo); color: var(--roxo); }
.filtro-atend.ativo { background: #ede9fe; border-color: #ddd0fb; color: var(--roxo); }
.inbox-select-user { font-size: 12.5px; padding: 7px 10px; }
.inbox-lista { background: var(--card); border-radius: 16px; border: 1px solid #f1eefa; box-shadow: var(--sombra); overflow-y: auto; flex: 1; min-height: 0; }
.conversa-item { display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-bottom: 1px solid #f4f2fa; cursor: pointer; }
.conversa-item:hover { background: #faf9fd; }
.conversa-item.ativa { background: var(--roxo-suave); border-left: 3px solid var(--roxo); padding-left: 13px; }
.conversa-item .topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conversa-item .nome { font-weight: 600; font-size: 13.5px; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversa-item .hora { font-size: 11px; color: var(--texto-suave); white-space: nowrap; }
.conversa-item .previa { font-size: 12.5px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversa-item .resp-tag { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 600; color: var(--roxo); background: var(--roxo-suave); border-radius: 20px; padding: 1px 8px; }
.inbox-chat { background: var(--card); border-radius: 16px; border: 1px solid #f1eefa; box-shadow: var(--sombra); display: flex; flex-direction: column; overflow: hidden; }
.inbox-vazio { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--texto-suave); font-size: 14px; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--borda); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-header .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--roxo-suave); color: var(--roxo); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.chat-header .quem { display: flex; flex-direction: column; }
.chat-header .quem b { font-size: 14px; color: var(--tinta); }
.chat-header .quem span { font-size: 12px; color: var(--texto-suave); }
.chat-header .acoes { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chat-responsavel { width: auto; font-size: 12px; padding: 6px 9px; border-radius: 8px; }
.chat-mensagens { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #f5f2fb; }
.chat-rodape { padding: 12px 14px; border-top: 1px solid var(--borda); display: flex; gap: 8px; align-items: center; background: var(--card); }
.chat-rodape input[type="text"] { flex: 1; }
.msg img, .msg video { max-width: 240px; border-radius: 10px; display: block; }
.msg audio { max-width: 240px; }
.msg .anexo { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--roxo); text-decoration: none; }
.respostas-lista { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.resposta-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--fundo); border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.resposta-item:hover { border-color: var(--roxo-vivo); background: var(--roxo-suave); }
.resposta-item .info { flex: 1; min-width: 0; }
.resposta-item .info b { font-size: 13px; display: block; color: var(--tinta); }
.resposta-item .info span { font-size: 12px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.resposta-item .tipo-chip { font-size: 15px; }
.emoji-painel { display: flex; flex-wrap: wrap; gap: 2px; padding: 10px 14px; border-top: 1px solid var(--borda); background: var(--card); max-height: 130px; overflow-y: auto; }
.emoji-btn { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; }
.emoji-btn:hover { background: var(--roxo-suave); }
#chat-gravar.gravando { background: var(--vermelho); border-color: var(--vermelho); animation: pulsar 1.2s infinite; }
@keyframes pulsar { 50% { opacity: .6; } }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox-lista { max-height: 260px; } .inbox-chat { height: 60vh; } }

/* ---------- tráfego pago ---------- */
.aviso { background: #fdf6e3; border: 1px solid #f5e6bd; color: #92600a; border-radius: 12px; padding: 13px 16px; font-size: 13px; margin-bottom: 18px; }
.tabela-card { background: var(--card); border-radius: 16px; box-shadow: var(--sombra); border: 1px solid #f1eefa; overflow-x: auto; }
.sequencias-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.seq-card { border: 1px solid var(--borda); border-radius: 12px; padding: 14px; background: var(--fundo); display: flex; flex-direction: column; gap: 8px; }
.seq-head { display: flex; align-items: center; gap: 8px; }
.seq-nome { flex: 1; font-weight: 700; font-size: 13.5px; }
.seq-toggle { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--texto-suave); white-space: nowrap; }
.seq-toggle input { width: auto; }
.seq-gatilho { font-size: 11.5px; color: var(--roxo); background: var(--roxo-suave); border-radius: 8px; padding: 4px 9px; align-self: flex-start; }
table.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tabela th { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--borda); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--texto-suave); white-space: nowrap; }
table.tabela td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #f4f2fa; vertical-align: middle; }
table.tabela tr:last-child td { border-bottom: none; }
table.tabela tr:hover td { background: #faf9fd; }

/* ---------- config ---------- */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(390px, 1fr)); gap: 18px; align-items: start; }
.config-card { background: var(--card); border-radius: 16px; padding: 24px; box-shadow: var(--sombra); border: 1px solid #f1eefa; display: flex; flex-direction: column; gap: 13px; }
.config-card h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 17px; font-weight: 600; color: var(--tinta); }
.config-card .dica { font-size: 12.5px; color: var(--texto-suave); line-height: 1.5; }
.config-card .dica code { background: var(--fundo); border: 1px solid var(--borda); border-radius: 5px; padding: 1px 5px; font-size: 11px; }
.lista-config { display: flex; flex-direction: column; gap: 8px; }
.item-config { display: flex; align-items: center; gap: 8px; padding: 9px 11px; background: var(--fundo); border-radius: 10px; font-size: 13px; }
.item-config .crescer { flex: 1 1 auto; min-width: 0; }
.item-config input, .item-config select { width: auto; flex: 0 0 auto; }
.item-config input[type="color"] { width: 48px; }
.item-config input.crescer { flex: 1 1 auto; }

/* ---------- modal ---------- */
.modal-fundo { display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal { background: var(--card); border-radius: 18px; padding: 28px; width: min(490px, 92vw); max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.modal h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; font-weight: 600; color: var(--tinta); }
.modal .dica { font-size: 12.5px; color: var(--texto-suave); line-height: 1.5; }
.modal-botoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 13px 22px; border-radius: 12px; font-size: 13.5px; z-index: 100; box-shadow: 0 14px 40px rgba(31,27,58,.35); }
.toast.erro-toast { background: var(--vermelho); }

@media (max-width: 780px) {
  .sidebar { width: 66px; padding: 18px 7px; }
  .logo { padding: 0 4px 18px; align-items: center; }
  .logo-marca { font-size: 13px; text-align: center; }
  .logo-sub, .nav-secao { display: none; }
  .nav-btn { font-size: 17px; justify-content: center; }
  .nav-btn .rotulo { display: none; }
  .sidebar-rodape { display: none; }
  main { margin-left: 66px; padding: 18px 14px; }
  .pagina-header h2 { font-size: 22px; }
}

/* ---------- Acompanhamento (planilha viva) ---------- */
.btn-suave { border: 1px solid var(--borda); background: var(--roxo-suave); color: var(--roxo); padding: 10px 15px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; }
.btn-suave:hover { border-color: #cdbcf9; }
.ac-acoes { display: flex; gap: 10px; }
.ac-filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ac-filtros input[type="search"] { flex: 1 1 220px; }
.ac-filtros select { width: auto; min-width: 150px; }
.ac-resumo { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.ac-total { font-weight: 700; color: var(--texto); font-size: 13px; margin-right: 4px; }
.ac-pill { font-size: 11.5px; font-weight: 600; color: #fff; background: var(--c); padding: 3px 11px; border-radius: 20px; }
.ac-pill b { font-weight: 800; }
.ac-tabela-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--borda); border-radius: 16px; box-shadow: 0 2px 10px rgba(38,32,82,.05); }
.ac-tabela { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 13px; }
.ac-tabela thead th { text-align: left; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--texto-suave); font-weight: 700; padding: 13px 12px; border-bottom: 1px solid var(--borda); white-space: nowrap; background: #faf9fe; position: sticky; top: 0; }
.ac-tabela tbody td { padding: 7px 12px; border-bottom: 1px solid #f2eff9; vertical-align: middle; }
.ac-tabela tbody tr:hover { background: #fbfaff; }
.ac-data { color: var(--texto-suave); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-nome { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--roxo); cursor: pointer; text-align: left; }
.ac-nome:hover { text-decoration: underline; }
.ac-in { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 6px 8px; width: 100%; font-size: 13px; }
.ac-in:hover { border-color: var(--borda); }
.ac-in:focus { border-color: var(--roxo-vivo); background: #fff; outline: none; }
.ac-obs { min-width: 170px; }
.ac-origem { display: flex; align-items: center; gap: 4px; }
.ac-emoji { font-size: 16px; }
.ac-status { width: auto; min-width: 132px; padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--c); border-color: var(--c); border-radius: 8px; background: color-mix(in srgb, var(--c) 10%, #fff); }
.ac-resp { width: auto; min-width: 90px; padding: 6px 8px; font-size: 12.5px; border-color: transparent; background: transparent; }
.ac-resp:hover { border-color: var(--borda); }
.chip-mini { display: inline-block; font-size: 10px; font-weight: 600; color: #fff; padding: 2px 7px; border-radius: 12px; margin: 1px 2px 1px 0; white-space: nowrap; }
.ac-etqs { max-width: 160px; }
.ac-vazio { text-align: center; color: var(--texto-suave); padding: 40px !important; }

/* ---------- reações nas mensagens (estilo WhatsApp) ---------- */
.msg { position: relative; }
.msg-react-btn { position: absolute; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .12s; border: none; background: #fff; color: var(--texto-suave); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(38,32,82,.18); font-size: 14px; line-height: 1; }
.msg.in .msg-react-btn { right: -32px; }
.msg.out .msg-react-btn { left: -32px; }
.msg:hover .msg-react-btn { opacity: 1; }
.msg-reacao { position: absolute; bottom: -12px; background: #fff; border: 1px solid var(--borda); border-radius: 20px; padding: 1px 6px; font-size: 13px; box-shadow: 0 2px 6px rgba(38,32,82,.12); }
.msg.in .msg-reacao { left: 8px; }
.msg.out .msg-reacao { right: 8px; }
.reacao-pop { position: fixed; z-index: 3000; display: flex; gap: 2px; background: #fff; border: 1px solid var(--borda); border-radius: 24px; padding: 5px 7px; box-shadow: 0 10px 30px rgba(38,32,82,.22); }
.reacao-pop button { border: none; background: none; font-size: 20px; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; line-height: 1; padding: 0; }
.reacao-pop button:hover { background: var(--roxo-suave); transform: scale(1.15); }
.reacao-pop button.rem { font-size: 13px; color: var(--texto-suave); }

/* números por usuário (modal) */
.u-numeros { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; max-height: 150px; overflow-y: auto; background: #faf9fe; }
.u-num-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--texto); cursor: pointer; }

/* ---------- gravador de áudio (pausar/continuar/ouvir) ---------- */
.chat-rodape { position: relative; }
.chat-rec { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border-radius: inherit; z-index: 5; }
.chat-rec.oculto { display: none; }
.rec-btn { border: none; background: var(--roxo-suave); color: var(--roxo); border-radius: 20px; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; white-space: nowrap; }
.rec-btn:hover { background: #e4dbff; }
.rec-enviar { background: var(--roxo); color: #fff; }
.rec-parar { background: #fee2e2; color: #dc2626; }
.rec-cancelar { background: transparent; font-size: 16px; padding: 8px 6px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; animation: recpulse 1.1s infinite; flex: none; }
.rec-dot.pausado { background: #f59e0b; animation: none; }
@keyframes recpulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.rec-tempo { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--texto); }
.rec-status { color: var(--texto-suave); font-size: 12.5px; }
.rec-audio { flex: 1; height: 36px; }
.rec-btn.rec-pausa, .rec-btn.rec-parar { margin-left: auto; }
.rec-parar { margin-left: 6px; }

/* ---------- aba de contatos ---------- */
.contatos-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.contato-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 11px 13px; }
.contato-ava { width: 40px; height: 40px; border-radius: 50%; background: var(--roxo-vivo); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.contato-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.contato-nome { font-weight: 600; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contato-tel { font-size: 12.5px; color: var(--texto-suave); }
.contato-badge { font-size: 9.5px; font-weight: 600; color: var(--texto-suave); background: var(--fundo); border: 1px solid var(--borda); border-radius: 10px; padding: 0 6px; }
.contato-conversar { flex: none; }
