/* Bellone Sales AI — visual baseado no painel de demonstração enviado pelo Bellone */
:root {
  --fundo: #f4f6f8; --texto: #182331; --suave: #748190; --borda: #e6e9ee; --branco: #fff;
  --lateral: #101d2d; --lateral2: #263a50; --azul: #245b89; --azul-claro: #eaf1f7; --acento: #2fb5a8;
  --quente: #d56b25; --quente-fundo: #fff0e6; --morno: #b7871a; --morno-fundo: #fff8e7; --frio: #4b6a88; --frio-fundo: #eef3f8;
  --ok: #23834d; --ok-fundo: #e6f6ed; --erro: #b42318; --erro-fundo: #fdecea;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--azul); }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 8px; }
.carregando { padding: 40px; color: var(--suave); }
.app { display: flex; min-height: 100vh; }

/* Lateral */
.lateral { width: 240px; background: var(--lateral); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.marca { padding: 26px 22px; display: flex; align-items: center; gap: 12px; letter-spacing: 1.6px; }
.marca .ico { background: #254b73; padding: 10px; border-radius: 12px; display: grid; place-items: center; }
.marca strong { font-size: 17px; display: block; }
.marca small { display: block; color: #9bb5cc; font-size: 10px; margin-top: 3px; }
.menu { padding: 8px 12px; display: grid; gap: 4px; overflow-y: auto; }
.menu button { background: transparent; border: 0; color: #b9c6d5; text-align: left; padding: 12px 14px; border-radius: 10px; display: flex; gap: 12px; align-items: center; }
.menu button.ativo, .menu button:hover { background: var(--lateral2); color: #fff; }
.menu .badge { margin-left: auto; background: var(--quente); color: #fff; border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.lateral-rodape { margin-top: auto; padding: 18px 20px; color: #b6c4d0; font-size: 12px; border-top: 1px solid #2b3b4b; }
.lateral-rodape small { display: block; margin: 6px 0 0 16px; color: #8495a6; }
.lateral-rodape button { margin-top: 12px; background: transparent; border: 1px solid #2b3b4b; color: #b6c4d0; border-radius: 8px; padding: 7px 10px; width: 100%; }
.ponto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f4b34c; margin-right: 6px; }
.ponto.ok { background: #3ccf7a; } .ponto.erro { background: #ef5b4c; }

main { flex: 1; min-width: 0; padding: 26px 30px 40px; }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.topo p { color: var(--suave); margin: 0; }
.menu-celular { display: none; border: 0; background: #fff; padding: 9px 12px; border-radius: 8px; margin-right: 8px; }

/* Cartões e indicadores */
.indicadores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.ind { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ind span { font-size: 12px; color: var(--suave); display: flex; align-items: center; gap: 8px; }
.ind span svg { color: #2e638c; }
.ind strong { font-size: 26px; letter-spacing: -.5px; }
.ind small { color: var(--suave); font-size: 11px; }
.ind.destaque { border-color: #f6d3bb; background: linear-gradient(180deg, #fff, #fff7f1); }
.painel { background: #fff; border: 1px solid var(--borda); border-radius: 14px; overflow: hidden; }
.painel + .painel { margin-top: 16px; }
.painel-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #edf0f3; flex-wrap: wrap; }
.painel-corpo { padding: 16px 18px; }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grade2 > .painel + .painel { margin-top: 0; }
.dica { color: var(--suave); margin: 0; font-size: 13px; }
.contador { background: #eff3f7; border-radius: 20px; padding: 3px 9px; font-size: 12px; }

/* Botões e etiquetas */
.btn { border: 0; border-radius: 9px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; background: var(--azul-claro); color: var(--azul); white-space: nowrap; }
.btn.primario { background: var(--azul); color: #fff; }
.btn.perigo { background: var(--erro-fundo); color: var(--erro); }
.btn.ok { background: var(--ok-fundo); color: var(--ok); }
.btn.quente { background: var(--quente); color: #fff; }
.btn.pequeno { padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.btn.link { background: transparent; padding: 4px 6px; color: var(--azul); font-weight: 500; }
.etq { border-radius: 30px; padding: 4px 10px; background: #f1f3f6; font-size: 11px; white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.etq.verde { background: var(--ok-fundo); color: var(--ok); }
.etq.azul { background: #e8f0ff; color: #3265aa; }
.etq.quente { background: var(--quente-fundo); color: var(--quente); }
.etq.morno { background: var(--morno-fundo); color: var(--morno); }
.etq.frio { background: var(--frio-fundo); color: var(--frio); }
.etq.cinza { background: #f1f3f6; color: #5d6a78; }
.etq.vermelho { background: var(--erro-fundo); color: var(--erro); }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Conversas */
.trabalho { display: grid; grid-template-columns: minmax(260px, 33%) minmax(0, 1fr); gap: 16px; align-items: start; }
.filtros { display: flex; gap: 6px; padding: 12px 14px 0; flex-wrap: wrap; }
.filtros button { border: 1px solid var(--borda); background: #fff; border-radius: 20px; padding: 5px 11px; font-size: 12px; color: #4f5b69; }
.filtros button.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }
.busca { margin: 12px 14px; display: flex; align-items: center; gap: 9px; background: #f5f7f9; border-radius: 9px; padding: 9px 10px; color: #84919f; }
.busca input { border: 0; background: transparent; outline: 0; width: 100%; }
.lista { padding: 0 8px 10px; max-height: calc(100vh - 290px); overflow-y: auto; }
.contato { border: 0; width: 100%; display: flex; align-items: center; text-align: left; background: #fff; padding: 11px 10px; border-radius: 10px; gap: 10px; }
.contato:hover { background: #f6f8fb; }
.contato.sel { background: #eaf2f9; }
.avatar { background: #e2eaf1; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-weight: 700; color: #37617f; flex-shrink: 0; }
.cinfo { flex: 1; min-width: 0; }
.cinfo strong, .cinfo small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinfo small { color: #7d8996; margin-top: 3px; font-size: 12px; }
.cinfo .linha { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.nota { background: #f0f3f7; padding: 4px 8px; border-radius: 7px; font-weight: 700; font-size: 12px; min-width: 34px; text-align: center; }
.nota.quente { background: var(--quente-fundo); color: var(--quente); }
.nota.morno { background: var(--morno-fundo); color: var(--morno); }
.naolidas { background: var(--acento); color: #fff; border-radius: 20px; font-size: 11px; padding: 1px 7px; font-weight: 700; }

.chat { display: flex; flex-direction: column; min-height: calc(100vh - 160px); }
.chat-topo { padding: 16px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #edf0f3; gap: 10px; flex-wrap: wrap; }
.chat-topo small { display: block; margin-top: 4px; color: #7b8998; }
.faixa-humano { background: #e8f0ff; color: #3265aa; padding: 8px 18px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faixa-alerta { background: var(--quente-fundo); color: #8c4513; padding: 10px 18px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-meio { display: grid; grid-template-columns: minmax(0, 1fr) 270px; flex: 1; min-height: 0; }
.mensagens { padding: 18px; background: #f9fafc; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 330px); min-height: 320px; }
.bolha { max-width: 78%; padding: 10px 13px; border-radius: 12px; line-height: 1.5; word-wrap: break-word; }
.txt-msg { white-space: pre-wrap; }
.bolha .meta { display: flex; gap: 8px; font-size: 10px; color: #7c8996; margin-bottom: 4px; align-items: center; }
.bolha.entrada { background: #fff; border: 1px solid #e8edf1; align-self: flex-start; }
.bolha.saida { background: #e5f1fc; align-self: flex-end; }
.bolha.saida.bellone { background: #dff5ec; }
.bolha.saida.sistema { background: #f1f3f6; color: #5d6a78; font-size: 13px; }
.bolha.historico { opacity: .7; }
.bolha.falhou { border: 1px solid #f3b3ad; background: var(--erro-fundo); }
.bolha .corrigir { border: 0; background: transparent; color: var(--azul); font-size: 10px; padding: 0; margin-left: auto; }
.lateral-chat { border-left: 1px solid #edf0f3; padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: calc(100vh - 330px); }
.lateral-chat .bloco { border: 1px solid #edf0f3; border-radius: 10px; padding: 11px; }
.lateral-chat dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12px; }
.lateral-chat dt { color: var(--suave); }
.lateral-chat dd { margin: 0; font-weight: 600; text-align: right; }
.sinal { font-size: 12px; padding: 5px 0; border-bottom: 1px dashed #edf0f3; }
.sinal:last-child { border: 0; }
.sinal b { color: var(--azul); }
.compositor { display: flex; padding: 12px 16px; gap: 8px; border-top: 1px solid #edf0f3; align-items: flex-end; }
.compositor textarea { flex: 1; min-width: 0; border: 1px solid #e3e8ed; border-radius: 9px; padding: 10px 12px; outline: 0; resize: none; min-height: 44px; max-height: 140px; }
.vazio { padding: 50px 20px; text-align: center; color: var(--suave); }

/* Formulários */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label, .rotulo { font-weight: 600; font-size: 13px; }
.campo small { color: var(--suave); font-size: 12px; }
.campo input, .campo select, .campo textarea, input.txt, select.txt, textarea.txt { border: 1px solid #dce3e9; border-radius: 8px; padding: 10px 12px; background: #fff; width: 100%; outline: 0; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .txt:focus { border-color: #8db3d6; box-shadow: 0 0 0 3px #e5eff8; }
.campo textarea { min-height: 90px; resize: vertical; }
.linha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: start; }
.checar { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 10px 12px; border: 1px solid #e6e9ee; border-radius: 9px; background: #fafbfc; }
.checar input { margin-top: 3px; }
.aviso { background: var(--morno-fundo); border: 1px solid #ebd7a5; color: #7a5a14; padding: 11px 14px; border-radius: 10px; font-size: 13px; }
.aviso.info { background: #eef5fc; border-color: #cfe0f1; color: #2c4f72; }
.aviso.erro { background: var(--erro-fundo); border-color: #f3c3bd; color: var(--erro); }
.aviso.ok { background: var(--ok-fundo); border-color: #bfe5cd; color: var(--ok); }

/* Tabelas */
.tabela-rolagem { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: 12px 14px; border-bottom: 1px solid #edf0f3; white-space: nowrap; vertical-align: middle; }
th { color: #7a8794; font-size: 12px; font-weight: 600; }
td.quebra { white-space: normal; min-width: 240px; }
tr:last-child td { border-bottom: 0; }

/* Abas */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; overflow-x: auto; }
.abas button { border: 0; background: transparent; padding: 10px 14px; border-bottom: 2px solid transparent; color: var(--suave); font-weight: 600; white-space: nowrap; }
.abas button.ativo { color: var(--azul); border-color: var(--azul); }

/* Itens de treinamento / reativação */
.item { border: 1px solid #edf0f3; border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.item + .item { margin-top: 10px; }
.item .cliente-disse { background: #f6f8fb; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #4f5b69; }
.item .resposta { background: #e5f1fc; border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; }
.faixas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.faixa { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 12px; text-align: center; }
.faixa strong { display: block; font-size: 22px; }
.faixa span { font-size: 12px; color: var(--suave); }
.funil { display: grid; gap: 8px; }
.funil-linha { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.funil-barra { height: 10px; background: #eef2f6; border-radius: 10px; overflow: hidden; }
.funil-barra i { display: block; height: 100%; background: var(--azul); border-radius: 10px; }
.tarefa { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #f0f2f5; }
.tarefa:last-child { border: 0; }
.tarefa .tico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul); flex-shrink: 0; }
.tarefa .tico.quente { background: var(--quente-fundo); color: var(--quente); }
.tarefa div { flex: 1; min-width: 0; }
.tarefa small { color: var(--suave); display: block; }
.alerta-texto { white-space: pre-wrap; font-size: 13px; background: #fff8f2; border: 1px solid #f6dcc8; border-radius: 10px; padding: 10px 12px; }
.proposta-mini { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--borda); background: #f3f5f8; }
.resultado-sim { display: grid; gap: 8px; }
.resultado-sim .grande { background: #eef8f6; border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: center; }
.resultado-sim .grande strong { font-size: 24px; }

/* Testar bot */
.sandbox { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 420px; }
.sandbox .mensagens { max-height: none; flex: 1; }

/* Modal e avisos */
.sobreposicao { position: fixed; inset: 0; background: #14233488; display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; padding: 22px; border-radius: 16px; box-shadow: 0 20px 70px #0003; }
.modal.largo { width: min(820px, 100%); }
.modal-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: #182331; color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: 0 10px 30px #0003; font-size: 13px; white-space: pre-wrap; }
.toast.erro { background: var(--erro); }
.toast.quente { background: var(--quente); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, #101d2d, #1d3552); }
.login .caixa { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 28px; box-shadow: 0 30px 80px #0005; }
.login .marca { padding: 0 0 18px; color: var(--texto); }

@media (max-width: 1100px) { .chat-meio { grid-template-columns: 1fr; } .lateral-chat { border-left: 0; border-top: 1px solid #edf0f3; max-height: none; } }
@media (max-width: 950px) {
  main { padding: 20px; } .indicadores { grid-template-columns: repeat(2, 1fr); } .trabalho, .grade2 { grid-template-columns: 1fr; }
  .faixas { grid-template-columns: repeat(3, 1fr); } .lista { max-height: 380px; } .mensagens { max-height: 60vh; }
}
@media (max-width: 650px) {
  .lateral { position: fixed; z-index: 15; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .lateral.aberta { transform: translateX(0); box-shadow: 0 0 60px #0006; }
  .menu-celular { display: inline-block; }
  .topo { align-items: flex-start; } .topo h1 { font-size: 20px; }
  main { padding: 14px; } .ind { padding: 12px; } .ind strong { font-size: 22px; } .indicadores { gap: 9px; }
  .bolha { max-width: 92%; } .faixas { grid-template-columns: repeat(2, 1fr); }
  .funil-linha { grid-template-columns: 100px 1fr 32px; }
}
