/* CRM IA — visual do sistema (área logada). Bootstrap 5.3 + estas variáveis. */
:root {
  --ci-fundo: #f5f6fb;
  --ci-card: #ffffff;
  --ci-borda: #e6e8f2;
  --ci-texto: #151834;
  --ci-suave: #636a8a;
  --ci-roxo: #6d4aff;
  --ci-roxo-2: #4f46e5;
  --ci-ciano: #22d3ee;
  --ci-laranja: #f97316;
  --ci-verde: #10b981;
  --ci-lateral: #0f1124;
  --ci-lateral-2: #171a36;
  --ci-raio: 14px;
  --ci-sombra: 0 1px 2px rgba(21, 24, 52, .04), 0 6px 24px rgba(21, 24, 52, .06);
  --ci-grad: linear-gradient(135deg, #6d4aff 0%, #4f46e5 55%, #0ea5e9 100%);
  --bs-primary: #6d4aff;
  --bs-primary-rgb: 109, 74, 255;
  --bs-link-color: #5b3df0;
  --bs-link-hover-color: #4329c9;
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --bs-body-color: var(--ci-texto);
  --bs-border-radius: 10px;
}

body { background: var(--ci-fundo); color: var(--ci-texto); -webkit-font-smoothing: antialiased; }
.ag-icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; }

/* ---------- botões e formulários */
.btn-primary { --bs-btn-bg: var(--ci-roxo); --bs-btn-border-color: var(--ci-roxo); --bs-btn-hover-bg: #5b3df0;
  --bs-btn-hover-border-color: #5b3df0; --bs-btn-active-bg: #4329c9; --bs-btn-disabled-bg: #a996ff;
  --bs-btn-disabled-border-color: #a996ff; font-weight: 600; }
.btn-outline-primary { --bs-btn-color: var(--ci-roxo); --bs-btn-border-color: #cfc6ff; --bs-btn-hover-bg: var(--ci-roxo);
  --bs-btn-hover-border-color: var(--ci-roxo); --bs-btn-active-bg: #4329c9; font-weight: 600; }
.btn-ia { background: var(--ci-grad); color: #fff; border: 0; font-weight: 600; box-shadow: 0 6px 18px rgba(109, 74, 255, .28); }
.btn-ia:hover, .btn-ia:focus { color: #fff; filter: brightness(1.06); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--ci-borda); }
.form-control, .form-select { border-color: #dcdfeb; }
.form-control:focus, .form-select:focus { border-color: #a996ff; box-shadow: 0 0 0 .2rem rgba(109, 74, 255, .14); }
.form-check-input:checked { background-color: var(--ci-roxo); border-color: var(--ci-roxo); }
.form-label { font-weight: 600; font-size: .86rem; color: #2a2f55; }

/* ---------- casca: barra lateral + conteúdo */
.ci-app { display: flex; min-height: 100vh; }
.ci-lateral { width: 248px; flex-shrink: 0; background: var(--ci-lateral); color: #c9cbe6; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; z-index: 1030; }
.ci-marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem;
  text-decoration: none; padding: 4px 8px 18px; letter-spacing: -.01em; }
.ci-marca:hover { color: #fff; }
.ci-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--ci-grad); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(109, 74, 255, .45); }
.ci-logo svg { width: 20px; height: 20px; color: #fff; }
.ci-marca .ia { background: linear-gradient(90deg, #a78bfa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ci-grupo { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6f739b; padding: 14px 10px 6px; font-weight: 700; }
.ci-link { display: flex; align-items: center; gap: 10px; color: #c9cbe6; text-decoration: none; padding: 8px 10px;
  border-radius: 10px; font-size: .92rem; font-weight: 500; margin-bottom: 2px; }
.ci-link:hover { background: var(--ci-lateral-2); color: #fff; }
.ci-link.ativo { background: linear-gradient(90deg, rgba(109, 74, 255, .28), rgba(109, 74, 255, .08)); color: #fff;
  box-shadow: inset 3px 0 0 #8b6cff; }
.ci-link .breve { margin-left: auto; white-space: nowrap; font-size: .62rem; background: #23264a; color: #9ea2cc; padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.ci-link.desligado { opacity: .55; pointer-events: none; }
.ci-lateral-pe { margin-top: auto; padding-top: 14px; border-top: 1px solid #23264a; }
.ci-usuario { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: #fff; text-decoration: none; }
.ci-avatar { width: 34px; height: 34px; border-radius: 50%; background: #2b2f5c; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.ci-usuario small { display: block; color: #8f93bd; font-size: .72rem; }
.ci-conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-topo { display: none; }
.ci-main { padding: 28px clamp(16px, 3.4vw, 76px) 48px; flex: 1; width: 100%; } /* largura do monitor, ~2 cm de cada lado (06/12/2026) */
.ci-rodape { color: #9aa0bf; font-size: .78rem; text-align: center; padding: 18px; }

@media (max-width: 991.98px) {
  .ci-lateral { position: fixed; left: -260px; transition: left .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .ci-lateral.aberta { left: 0; }
  .ci-topo { display: flex; align-items: center; justify-content: space-between; background: var(--ci-lateral);
    color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 1020; }
  .ci-topo .ci-marca { padding: 0; font-size: 1rem; }
  .ci-topo button { background: transparent; border: 0; color: #fff; }
  .ci-main { padding: 18px 14px 40px; }
  .ci-veu { position: fixed; inset: 0; background: rgba(10, 12, 30, .45); z-index: 1025; display: none; }
  .ci-veu.aberto { display: block; }
}

/* ---------- cabeçalho de página */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-head .sub { color: var(--ci-suave); margin-top: 4px; max-width: 760px; }
.sobretitulo { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--ci-roxo); }

/* ---------- cards */
.card { border: 1px solid var(--ci-borda); border-radius: var(--ci-raio); box-shadow: var(--ci-sombra); }
.card-header { background: transparent; border-bottom: 1px solid var(--ci-borda); font-weight: 700; padding: 14px 18px; }
.card-footer { background: #fafbff; border-top: 1px solid var(--ci-borda); }
.card-body { padding: 18px; }

.kpi { background: #fff; border: 1px solid var(--ci-borda); border-radius: var(--ci-raio); padding: 16px 18px; box-shadow: var(--ci-sombra); height: 100%; }
.kpi .rotulo { color: var(--ci-suave); font-size: .8rem; font-weight: 600; }
.kpi .valor { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.kpi .extra { color: var(--ci-suave); font-size: .78rem; }
.kpi.destaque { background: var(--ci-grad); color: #fff; border: 0; }
.kpi.destaque .rotulo, .kpi.destaque .extra { color: rgba(255, 255, 255, .82); }

.hero-app { background: radial-gradient(1200px 300px at 10% -40%, rgba(167, 139, 250, .55), transparent),
  linear-gradient(120deg, #13153a 0%, #1f1b55 45%, #2b1f6f 100%); color: #fff; border-radius: 18px; padding: 26px 28px;
  position: relative; overflow: hidden; }
.hero-app::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 65%); }
.hero-app h1, .hero-app h2 { font-weight: 800; letter-spacing: -.02em; }
.hero-app p { color: #cfd0f3; }

/* ---------- ramos */
.ramo-card { position: relative; border-radius: var(--ci-raio); background: #fff; border: 1px solid var(--ci-borda);
  padding: 16px 18px; height: 100%; box-shadow: var(--ci-sombra); transition: transform .12s ease, box-shadow .12s ease;
  display: flex; flex-direction: column; }
.ramo-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(21, 24, 52, .10); }
.ramo-card .faixa { position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; }
.ramo-card h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 4px; }
.ramo-card .oferta { color: var(--ci-suave); font-size: .86rem; }
.ramo-card.inativo { opacity: .6; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: #f0eeff; color: #4c34c9; margin: 0 4px 4px 0; white-space: nowrap; }
.chip.cinza { background: #eef0f6; color: #4a5072; }
.chip.verde { background: #dcfce7; color: #166534; }
.chip.laranja { background: #ffedd5; color: #9a3412; }
.chip.ciano { background: #cffafe; color: #155e75; }
.chip.ia { background: var(--ci-grad); color: #fff; }

.cnae-linha { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--ci-borda); font-size: .88rem; }
.cnae-linha:last-child { border-bottom: 0; }
.cnae-cod { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; color: #4c34c9; min-width: 88px; }

.pb-lista { list-style: none; padding: 0; margin: 0; }
.pb-lista li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px solid #f0f1f7; }
.pb-lista li:last-child { border-bottom: 0; }
.pb-lista li::before { content: ""; position: absolute; left: 6px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: #c4b5fd; }
.pb-lista.dores li::before { background: #fda4af; }
.pb-lista.argumentos li::before { background: #6ee7b7; }

.cadencia { position: relative; padding-left: 22px; }
.cadencia::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e4e0ff; }
.cadencia .passo { position: relative; padding: 6px 0 10px; }
.cadencia .passo::before { content: ""; position: absolute; left: -20px; top: 12px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ci-roxo); }
.cadencia .dia { font-weight: 800; font-size: .78rem; color: var(--ci-roxo); text-transform: uppercase; letter-spacing: .04em; }

.msg-modelo { white-space: pre-wrap; background: #fafbff; border: 1px solid var(--ci-borda); border-radius: 12px; padding: 14px; font-size: .9rem; }

/* editor */
.seg-grupo { border: 1px solid var(--ci-borda); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.seg-grupo h6 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ci-suave); margin: 0 0 6px; font-weight: 700; }
.seg-opcao { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 4px 10px; border: 1px solid #dcdfeb;
  border-radius: 999px; font-size: .82rem; cursor: pointer; user-select: none; background: #fff; }
.seg-opcao input { display: none; }
.seg-opcao.marcado { background: #efeaff; border-color: #b9a8ff; color: #3b22b8; font-weight: 600; }
.segs-rolagem { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.cnae-sugestoes { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--ci-borda); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(21, 24, 52, .14); width: 100%; max-height: 320px; overflow-y: auto; display: none; }
.cnae-sugestoes button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 12px; font-size: .86rem; }
.cnae-sugestoes button:hover { background: #f5f3ff; }
.nav-tabs .nav-link { font-weight: 600; color: var(--ci-suave); }
.nav-tabs .nav-link.active { color: var(--ci-roxo); }

.aviso-ia { border: 1px solid #ddd6fe; background: linear-gradient(135deg, #faf8ff, #f0fbff); border-radius: var(--ci-raio); padding: 16px 18px; }
.vazio { text-align: center; padding: 48px 20px; color: var(--ci-suave); }
.vazio .ag-icon { width: 44px; height: 44px; color: #b9a8ff; margin-bottom: 8px; }

/* passo a passo do onboarding */
.passos { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.passos span { font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: #eceefa; color: #59608a; }
.passos span.feito { background: #dcfce7; color: #166534; }
.passos span.atual { background: var(--ci-grad); color: #fff; }

/* carregando (botões de IA) */
.carregando { position: fixed; inset: 0; background: rgba(15, 17, 36, .55); z-index: 2000; display: none; align-items: center; justify-content: center; }
.carregando.ativo { display: flex; }
.carregando .caixa { background: #fff; border-radius: 18px; padding: 26px 30px; text-align: center; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.pulso { width: 54px; height: 54px; border-radius: 50%; background: var(--ci-grad); margin: 0 auto 14px; animation: pulso 1.2s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { transform: scale(.85); opacity: .75; } 50% { transform: scale(1); opacity: 1; } }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(900px 500px at 15% 10%, rgba(109, 74, 255, .45), transparent),
  radial-gradient(700px 400px at 90% 90%, rgba(34, 211, 238, .25), transparent), #0f1124; }
.auth-card { width: 100%; max-width: 440px; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.auth-logo span.ia { background: var(--ci-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eef0f6; color: #4a5072; }
.table > :not(caption) > * > * { padding: .7rem .8rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ci-suave); font-weight: 700; border-bottom-width: 1px; }
.alert { border-radius: 12px; }

/* ---------- busca de empresas */
.frase-box { border: 1px solid #ddd6fe; background: linear-gradient(135deg, #faf8ff 0%, #f0fbff 100%); border-radius: var(--ci-raio);
  padding: 16px 18px; box-shadow: var(--ci-sombra); }
.frase-box .form-control-lg { font-size: 1rem; border-color: #d8d2fb; }
.frase-box .entendi { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .86rem; }
.frase-box .entendi > div { flex-basis: 100%; }
.ramos-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ramo-pilula { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--ci-borda);
  background: #fff; color: var(--ci-texto); font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .12s ease; }
.ramo-pilula:hover { border-color: #b9a8ff; color: var(--ci-texto); }
.ramo-pilula .bolinha { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, #6d4aff); }
.ramo-pilula.ativo { background: var(--ci-lateral); border-color: var(--ci-lateral); color: #fff; box-shadow: 0 4px 14px rgba(15, 17, 36, .18); }
.facetas { padding: 6px 0; }
.faceta-grupo { padding: 10px 16px; border-bottom: 1px solid #f0f1f7; }
.faceta-grupo:last-child { border-bottom: 0; }
.faceta-grupo h6 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ci-suave); font-weight: 800; margin: 0 0 6px; }
.faceta-rolagem { max-height: 220px; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.faceta { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; font-size: .84rem;
  color: var(--ci-texto); text-decoration: none; min-width: 0; }
.faceta:hover { background: #f5f3ff; color: var(--ci-texto); }
.faceta .caixa { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #c3c7da; flex-shrink: 0; background: #fff; }
.faceta.on .caixa { background: var(--ci-roxo) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m4 8 3 3 5-6'/%3e%3c/svg%3e") center/11px no-repeat; border-color: var(--ci-roxo); }
.faceta.on { font-weight: 700; color: #3b22b8; }
.faceta.zero { opacity: .45; }
.faceta .qtd { margin-left: auto; color: var(--ci-suave); font-size: .76rem; font-variant-numeric: tabular-nums; padding-left: 6px; }
.chip.filtro-on { background: #efeaff; color: #3b22b8; text-decoration: none; }
.chip.filtro-on .ag-icon { width: .9em; height: .9em; }
.chip.filtro-on:hover { background: #e2d9ff; }
.tabela-busca tbody tr.marcada { background: #f7f4ff; }
.tabela-busca tbody tr.ja-trazida { background: #fbfcfe; }
.nota { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; cursor: help; }
.nota-alta { background: #dcfce7; color: #166534; box-shadow: inset 0 0 0 2px #86efac; }
.nota-media { background: #fef9c3; color: #854d0e; box-shadow: inset 0 0 0 2px #fde047; }
.nota-baixa { background: #f1f2f7; color: #5b6180; box-shadow: inset 0 0 0 2px #dfe2ee; }
.nota-itens { list-style: none; padding: 0; margin: 0 0 0 46px; font-size: .84rem; }
.nota-itens li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed #eef0f6; }
.nota-itens li.ok span:last-child { color: #15803d; font-weight: 700; }
.nota-itens li.nao { color: var(--ci-suave); }
.barra-acoes { position: sticky; bottom: 12px; z-index: 10; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: rgba(15, 17, 36, .94); color: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 17, 36, .28);
  backdrop-filter: blur(6px); }
.barra-acoes .text-muted { color: #b8bce0 !important; }
.ficha dt { color: var(--ci-suave); font-weight: 600; font-size: .86rem; }
.ficha dd { margin-bottom: .7rem; }

/* ---------- prospecção */
.min-w-0 { min-width: 0; }
.nota.mini { width: 28px; height: 28px; font-size: .74rem; vertical-align: middle; }
.funil-passos { display: flex; flex-wrap: wrap; gap: 6px; }
.funil-passos form { margin: 0; }
.passo-funil { border: 1px solid var(--ci-borda); background: #fff; color: var(--ci-suave); font-weight: 600; font-size: .82rem;
  padding: 7px 14px 7px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.passo-funil::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cor); opacity: .5; }
.passo-funil:hover { border-color: var(--cor); color: var(--ci-texto); }
.passo-funil.feito { color: var(--ci-texto); }
.passo-funil.feito::before { opacity: 1; }
.passo-funil.atual { background: var(--cor); border-color: var(--cor); color: #fff; box-shadow: 0 4px 14px rgba(15, 17, 36, .15); }
.passo-funil.atual::before { background: #fff; opacity: 1; }
.tipos-atividade { display: flex; flex-wrap: wrap; gap: 6px; }
.tipos-atividade .tipo input { display: none; }
.tipos-atividade .tipo span { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid #dcdfeb; font-size: .82rem;
  cursor: pointer; background: #fff; user-select: none; }
.tipos-atividade .tipo input:checked + span { background: #efeaff; border-color: #b9a8ff; color: #3b22b8; font-weight: 700; }
.tipos-atividade .tipo.bloq span { opacity: .45; cursor: not-allowed; }
.linha-tempo { position: relative; }
.linha-tempo .evento { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.linha-tempo .evento::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: #eceefa; }
.linha-tempo .evento:last-child::before { display: none; }
.linha-tempo .bolha { width: 32px; height: 32px; border-radius: 50%; background: #efeaff; color: #4c34c9; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.linha-tempo .evento.sistema .bolha { background: #f1f2f7; color: #7a809f; }
.linha-tempo .evento.ganho .bolha { background: #dcfce7; color: #15803d; }
.linha-tempo .corpo { flex-grow: 1; min-width: 0; font-size: .88rem; }
.linha-tempo .evento.sistema .corpo { color: var(--ci-suave); }
.linha-tempo .topo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.linha-tempo .quando { margin-left: auto; color: var(--ci-suave); font-size: .76rem; }
.linha-tempo .texto { white-space: pre-wrap; margin-top: 2px; }
.linha-tempo .proximo { margin-top: 4px; font-size: .8rem; color: #9a3412; background: #fff7ed; display: inline-block; padding: 3px 10px; border-radius: 8px; }
.linha-tempo .proximo.feito { color: var(--ci-suave); background: #f5f6fb; }
.cadencia-lista .passo-cad { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: .86rem;
  border: 1px solid transparent; }
.cadencia-lista .passo-cad + .passo-cad { margin-top: 4px; }
.cadencia-lista .dia { width: 74px; flex-shrink: 0; font-weight: 800; font-size: .76rem; color: var(--ci-roxo); text-transform: uppercase; }
.cadencia-lista .dia small { display: block; color: var(--ci-suave); font-weight: 600; text-transform: none; }
.cadencia-lista .feito, .cadencia-lista .pulado { opacity: .6; }
.cadencia-lista .proximo { background: #f7f4ff; border-color: #ddd6fe; }
.cadencia-lista .hoje { background: #eff6ff; border-color: #bfdbfe; }
.cadencia-lista .atrasado { background: #fef2f2; border-color: #fecaca; }
.cadencia-lista .atrasado .dia small { color: #b91c1c; }
.card-ia { border-color: #ddd6fe; background: linear-gradient(180deg, #fbfaff, #fff 40%); }
.card-ia .gancho { background: #f5f3ff; border-radius: 10px; padding: 8px 10px; }
.etapa-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--cor) 14%, #fff); color: color-mix(in srgb, var(--cor) 75%, #000); white-space: nowrap; }
.msg-editor { font-size: .95rem; line-height: 1.5; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { flex: 0 0 272px; background: #eef0f7; border-radius: 14px; padding: 10px; border-top: 4px solid var(--cor); min-height: 200px;
  transition: background .12s; }
.kanban-col.alvo { background: #e4e0ff; }
.kanban-topo { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: .9rem; }
.kanban-topo .bolinha, .kanban-resumo .bolinha { width: 9px; height: 9px; border-radius: 50%; background: var(--cor); }
.kanban-topo .qtd, .kanban-resumo .qtd { margin-left: auto; font-size: .76rem; font-weight: 700; color: var(--ci-suave); background: #fff;
  padding: 1px 8px; border-radius: 999px; }
.kanban-cartoes { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 290px); overflow-y: auto; }
.kcard { display: block; background: #fff; border-radius: 11px; padding: 10px 11px; border: 1px solid var(--ci-borda); color: var(--ci-texto);
  text-decoration: none; box-shadow: 0 1px 2px rgba(21, 24, 52, .05); cursor: grab; font-size: .88rem; }
.kcard:hover { border-color: #b9a8ff; color: var(--ci-texto); }
.kcard.arrastando { opacity: .45; }
.kcard.naocontatar { opacity: .6; }
.kcard-pe { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.kcard-pe .chip { margin: 0; padding: 2px 6px; }
.kcard-pe .ponto { width: 8px; height: 8px; border-radius: 50%; }
.avatar-mini { width: 22px; height: 22px; border-radius: 50%; background: #eef0f6; color: #4a5072; font-size: .7rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }
.kanban-vazio { border: 2px dashed #d5d8e6; border-radius: 10px; text-align: center; color: #9aa0bd; font-size: .8rem; padding: 18px 0; }
.kanban-fim { flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px; }
.kanban-resumo { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--ci-borda); border-left: 4px solid var(--cor);
  border-radius: 12px; padding: 10px 12px; color: var(--ci-texto); text-decoration: none; font-weight: 600; font-size: .88rem; }

/* meu dia */
.agenda-titulo { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--ci-suave); margin: 14px 0 8px; }
.agenda-titulo:first-child { margin-top: 0; }
.agenda-titulo.atrasado { color: #b91c1c; }
.agenda-titulo.hoje { color: var(--ci-roxo); }
.agenda-titulo .qtd { background: #eef0f6; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.agenda-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ci-borda); border-radius: 12px; }
.agenda-item + .agenda-item { margin-top: 6px; }
.agenda-item.atrasado { border-left: 4px solid #ef4444; }
.agenda-item.hoje { border-left: 4px solid var(--ci-roxo); }
.agenda-item .quando { width: 46px; font-weight: 800; font-size: .82rem; color: var(--ci-suave); flex-shrink: 0; }
.agenda-item .canal { width: 34px; height: 34px; border-radius: 50%; background: #f5f3ff; color: #4c34c9; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.funil-barra { display: grid; grid-template-columns: 130px 1fr 44px; gap: 8px; align-items: center; padding: 5px 0; color: var(--ci-texto); font-size: .84rem; }
.funil-barra .rot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funil-barra .barra { height: 10px; background: #f0f1f7; border-radius: 999px; overflow: hidden; }
.funil-barra .barra span { display: block; height: 100%; border-radius: 999px; min-width: 3px; }
.funil-barra .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-group-item.active { background: var(--ci-roxo); border-color: var(--ci-roxo); }

/* ---------- busca com IA na web */
.status-pesquisa { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: #eef0f6; color: #4a5072; }
.status-pesquisa.pronta { background: #dcfce7; color: #166534; }
.status-pesquisa.rodando, .status-pesquisa.pendente { background: var(--ci-grad); color: #fff; }
.status-pesquisa.erro { background: #fee2e2; color: #991b1b; }
.resultados-ia { display: flex; flex-direction: column; gap: 8px; }
.res-ia { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--ci-borda); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--ci-sombra); }
.res-ia.marcada { border-color: #b9a8ff; background: #fbfaff; }
.res-ia.trazido, .res-ia.ja_existe, .res-ia.descartado { opacity: .62; box-shadow: none; }

/* ---------- negócios, propostas e atendimento */
.kanban-total { background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; font-size: .86rem; }
.status-prop, .status-cham { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #eef0f6; color: #4a5072; }
.status-prop.enviada { background: #e0f2fe; color: #075985; }
.status-prop.aceita, .status-cham.resolvido, .status-cham.fechado { background: #dcfce7; color: #166534; }
.status-prop.recusada, .status-prop.vencida { background: #fee2e2; color: #991b1b; }
.status-cham.aberto { background: #ede9fe; color: #5b21b6; }
.status-cham.andamento { background: #e0f2fe; color: #075985; }
.status-cham.aguardando { background: #fef9c3; color: #854d0e; }
.prio { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef0f6; color: #4a5072; }
.prio.alta { background: #ffedd5; color: #9a3412; }
.prio.urgente { background: #ef4444; color: #fff; }
.prio.baixa { background: #f1f5f9; color: #64748b; }
tr.table-danger-subtle > td { background: #fff5f5; }
.tabela-itens td { padding: .45rem .5rem; }
.linha-resumo { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--ci-borda);
  color: var(--ci-texto); text-decoration: none; }
.linha-resumo:last-child { border-bottom: 0; }
.linha-resumo:hover { color: var(--ci-roxo); }

/* ---------- gestão: indicadores, metas, como vender mais */
.funil-degrau { margin-bottom: 10px; }
.funil-degrau .barra, .barra-meta { height: 10px; background: #f0f1f7; border-radius: 999px; overflow: hidden; margin-top: 4px; position: relative; }
.funil-degrau .barra span { display: block; height: 100%; border-radius: 999px; min-width: 3px; }
.meta-linha { margin-bottom: 14px; }
.barra-meta { height: 12px; overflow: visible; }
.barra-meta span { display: block; height: 100%; border-radius: 999px; background: var(--ci-grad); }
.barra-meta span.ok { background: #10b981; }
.barra-meta span.atras { background: #f59e0b; }
.barra-meta i { position: absolute; top: -3px; bottom: -3px; border-left: 2px dashed #475569; }
.sugestao-ia { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid #e9e4ff; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; }
.sugestao-ia .form-check-input { margin-top: 3px; flex-shrink: 0; }
.acoes-lista { display: flex; flex-direction: column; gap: 8px; }
.acao-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--ci-borda); border-radius: 12px; padding: 12px 14px; box-shadow: var(--ci-sombra); }
.acao-card.feita, .acao-card.descartada { opacity: .6; box-shadow: none; }
.acao-card.andamento { border-left: 4px solid #0ea5e9; }
.acao-controles { display: grid; grid-template-columns: 1fr; gap: 6px; width: 190px; flex-shrink: 0; }
.filtros-ind .form-select { width: auto; min-width: 160px; }

/* ---------- etapa 11: assistente do vendedor e WhatsApp */
.assist-card, .wpp-card { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 440px; }
.assist-conversa, .wpp-conversa { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.assist-boas-vindas { margin: auto; text-align: center; max-width: 460px; }
.assist-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--ci-grad); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; margin-bottom: 10px; }
.assist-logo .ag-icon { width: 28px; height: 28px; }
.assist-msg { display: flex; flex-direction: column; max-width: 82%; }
.assist-msg.eu { align-self: flex-end; align-items: flex-end; }
.assist-msg.ia { align-self: flex-start; }
.assist-msg .balao { padding: 10px 14px; border-radius: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.assist-msg.eu .balao { background: var(--ci-roxo); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.assist-msg.ia .balao { background: #f5f3ff; border: 1px solid #e9e4ff; border-bottom-left-radius: 4px; }
.assist-msg.ia .balao p:last-child, .assist-msg.ia .balao ul:last-child, .assist-msg.ia .balao ol:last-child { margin-bottom: 0; }
.assist-msg.ia .balao ul, .assist-msg.ia .balao ol { padding-left: 1.2rem; margin-bottom: .5rem; }
.assist-msg.erro .balao { background: #fff5f5; border-color: #fecaca; color: #991b1b; }
.assist-acao { margin-top: 6px; background: #fff; border: 1px solid #c4b5fd; border-left: 4px solid var(--ci-roxo); border-radius: 10px; padding: 10px 12px; max-width: 520px; }
.assist-acao.feita { border-left-color: var(--ci-verde); border-color: #a7f3d0; }
.assist-acao.cancelada { opacity: .6; border-left-color: #94a3b8; border-color: var(--ci-borda); }
.assist-sugestoes { display: flex; gap: 6px; flex-wrap: wrap; overflow-x: auto; padding: 8px 18px; border-top: 1px solid var(--ci-borda); }
.assist-sugestoes .chip { white-space: nowrap; border: 1px solid #e9e4ff; background: #faf8ff; cursor: pointer; }
.assist-entrada, .wpp-entrada { display: flex; gap: 8px; padding: 10px 18px 8px; border-top: 1px solid var(--ci-borda); align-items: flex-end; }
.assist-entrada textarea, .wpp-entrada textarea { resize: none; }
.assist-entrada .btn, .wpp-entrada .btn { height: 42px; width: 48px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wpp-conversa { background: #f4f1ea; }
.wpp-msg { max-width: 78%; padding: 7px 10px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.wpp-msg.ela { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wpp-msg.nos { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.wpp-msg.falhou { background: #fee2e2; }
.wpp-msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.wpp-msg .rodape { font-size: .7rem; color: #667085; text-align: right; margin-top: 2px; }
.wpp-avatar { background: #25d366; color: #fff; flex-shrink: 0; }
.wpp-lista .list-group-item { padding: 12px 16px; }
@media (max-width: 991.98px) {
  .assist-card, .wpp-card { height: calc(100vh - 230px); }
  .assist-msg, .wpp-msg { max-width: 92%; }
  .assist-sugestoes { flex-wrap: nowrap; }
}
