/* Zap — wireframe navegavel (sindicancia 117 / tarefa #2144). Tudo no navegador, sem backend. */
:root {
  --verde: #16a34a;
  --verde-zap: #25d366;
  --verde-escuro: #075e54;
  --verde-teal: #128c7e;
  --verde-claro: #dcfce7;
  --fundo: #f6f7f9;
  --card: #ffffff;
  --borda: #e5e7eb;
  --texto: #111827;
  --cinza: #6b7280;
  --escuro: #0f172a;
  --amarelo: #f59e0b;
  --vermelho: #ef4444;
  --azul: #3b82f6;
  --roxo: #8b5cf6;
  --raio: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 14px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Botoes e Chips com area de toque minima para acessibilidade (44px) */
.btn {
  border: 1px solid var(--borda);
  background: #fff;
  color: var(--texto);
  border-radius: 9px;
  padding: 10px 16px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn.prim { background: #15803d; border-color: #15803d; color: #fff; }
.btn.prim:hover { background: #166534; }
.btn.peq { padding: 6px 12px; font-size: 13px; min-height: 44px; }
.btn.alt { background: transparent; border-color: transparent; color: var(--cinza); }
.btn.alt:hover { background: #f1f5f9; color: var(--texto); }
.btn:disabled { opacity: 0.5; cursor: default; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  color: #1e293b;
  white-space: nowrap;
}
.chip.ok { background: var(--verde-claro); color: #14532d; }
.chip.breve { background: #fef3c7; color: #78350f; }
.chip.azul { background: #dbeafe; color: #1e3a8a; }
.chip.verm { background: #fee2e2; color: #7f1d1d; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #052e16, #14532d 55%, #15803d); padding: 16px; }
.login .caixa { background: #fff; border-radius: 18px; padding: 34px; width: min(92vw, 420px); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.marca .logo { width: 36px; height: 36px; border-radius: 10px; background: #15803d; display: grid; place-items: center; color: #fff; font-size: 20px; }
.login label { display: block; font-size: 13px; font-weight: 600; color: var(--cinza); margin: 14px 0 4px; }
.login input { width: 100%; padding: 11px 12px; border: 1px solid var(--borda); border-radius: 9px; font-size: 14px; min-height: 44px; }
.login .btn { width: 100%; margin-top: 18px; padding: 12px; min-height: 46px; }
.login small { display: block; margin-top: 12px; color: var(--cinza); text-align: center; font-size: 13px; }

/* Casca e Navegacao */
.casca { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--escuro) 240px, transparent 240px); }
.lateral { background: var(--escuro); color: #cbd5e1; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lateral .marca { color: #fff; font-size: 19px; padding: 4px 8px 16px; }
.lateral .grupo { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #cbd5e1; margin: 16px 10px 6px; font-weight: 700; }
.lateral a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; min-height: 44px; }
.lateral a:hover { background: #1e293b; color: #fff; }
.lateral a.ativo { background: #15803d; color: #fff; font-weight: 600; }
.lateral a .ic { width: 22px; text-align: center; font-size: 16px; }

.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 20; }
.topo .busca { flex: 1; max-width: 380px; padding: 9px 12px; border: 1px solid var(--borda); border-radius: 9px; background: var(--fundo); min-height: 44px; font-size: 13px; }
.topo .direita { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #fde68a; display: grid; place-items: center; font-weight: 800; cursor: pointer; user-select: none; }
.hamb { display: none; border: 0; background: none; font-size: 24px; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--texto); align-items: center; justify-content: center; }

.conteudo { padding: 24px 26px 80px; min-width: 0; max-width: 1400px; }
h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: #475569; margin: 0 0 18px; font-size: 13.5px; }

/* Grid e Cards */
.grade { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* KPIs */
.kpi { display: flex; flex-direction: column; justify-content: space-between; }
.kpi .r { font-size: 13px; color: #475569; }
.kpi .n { font-size: 26px; font-weight: 800; margin: 4px 0; color: var(--texto); }
.kpi .up { color: #15803d; font-weight: 700; }
.kpi .down { color: #b91c1c; font-weight: 700; }

/* Tabelas e Wrappers responsivos */
.tabela-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--borda); font-size: 13px; vertical-align: middle; }
th { color: var(--cinza); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
.barra { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin: 4px 0; }
.barra i { display: block; height: 100%; background: var(--verde); border-radius: 99px; }

/* Funcoes do Catalogo */
.funcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.funcao { border: 1px solid var(--borda); border-radius: 10px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.funcao b { font-size: 13.5px; }
.funcao span { font-size: 13px; color: #475569; line-height: 1.35; flex: 1; }

/* Setores / Modelos de Negocio */
.setores { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.setor { border: 2px solid var(--borda); border-radius: 12px; padding: 12px 8px; text-align: center; background: #fff; cursor: pointer; min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.15s; }
.setor .em { font-size: 26px; line-height: 1.2; }
.setor b { font-size: 13px; line-height: 1.2; margin-top: 4px; color: var(--texto); }
.setor.sel { border-color: var(--verde); background: #f0fdf4; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2); }
.mods { display: flex; flex-wrap: wrap; gap: 6px; }
.fluxo-pronto { border-left: 4px solid var(--verde); padding: 12px 14px; background: #f8fafc; border-radius: 8px; margin-bottom: 10px; }

/* Passos / Wizard */
.passos { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.passo { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--borda); font-size: 13px; color: #475569; min-height: 44px; display: flex; align-items: center; }
.passo b { display: block; color: var(--texto); font-size: 13px; }
.passo.at { border-color: var(--verde); background: #f0fdf4; font-weight: 700; }
.passo.feito b::after { content: " ✓"; color: var(--verde); }
.solta { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 28px 16px; text-align: center; background: #fff; }
.campo { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.campo label { font-size: 13px; color: #475569; font-weight: 600; }
.campo input, .campo select, .campo textarea { padding: 10px 12px; border: 1px solid var(--borda); border-radius: 8px; font: inherit; background: #fff; min-height: 44px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.vars button { border: 1px solid var(--borda); background: #f8fafc; border-radius: 99px; padding: 6px 12px; font-size: 13px; min-height: 44px; font-weight: 600; }

/* Celular Mockup */
.celular { width: 310px; max-width: 100%; border: 10px solid #111; border-radius: 32px; background: #efeae2; margin: 0 auto; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.celular .cab-cel { background: #075e54; color: #fff; padding: 10px 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.celular .msgs { padding: 12px; min-height: 330px; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bal { max-width: 85%; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.35; box-shadow: 0 1px 1px rgba(0,0,0,0.1); white-space: pre-wrap; word-break: break-word; }
.bal.ent { background: #fff; align-self: flex-start; }
.bal.sai { background: #d9fdd3; align-self: flex-end; }
.bal .hora { display: block; text-align: right; font-size: 13px; color: #475569; margin-top: 3px; }
.opcs { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.opcs button { background: #fff; border: 1px solid #cfe9dd; color: #0369a1; border-radius: 16px; padding: 8px 12px; font-size: 13px; font-weight: 600; min-height: 44px; }
.audio-bal { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.audio-bal .onda { flex: 1; height: 22px; background: repeating-linear-gradient(90deg, #8696a0 0 2px, transparent 2px 5px); opacity: 0.7; border-radius: 3px; }

/* Editor de Fluxo */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; max-width: 100%; }
.tela-fluxo { position: relative; height: 600px; background: #fff radial-gradient(#e5e7eb 1.5px, transparent 1.5px) 0 0/20px 20px; border: 1px solid var(--borda); border-radius: var(--raio); overflow: auto; max-width: 100%; }
.tela-fluxo .plano { position: relative; width: 1180px; height: 900px; }
.tela-fluxo svg { position: absolute; inset: 0; pointer-events: none; }
.no { position: absolute; width: 200px; background: #fff; border: 2px solid var(--borda); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.06); cursor: grab; user-select: none; }
.no.sel { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15); }
.no .t { padding: 8px 12px; border-radius: 10px 10px 0 0; font-size: 13px; font-weight: 800; color: #fff; display: flex; justify-content: space-between; }
.no .c { padding: 9px 12px; font-size: 13px; line-height: 1.35; }
.no .op { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 12px; border-top: 1px solid #f1f5f9; color: #0369a1; }
.no.inicio .t { background: #0f172a; }
.no.pergunta .t { background: #1d4ed8; }
.no.mensagem .t { background: #15803d; }
.no.acao .t { background: #6d28d9; }
.no.condicao .t { background: #b45309; }
.no.humano .t { background: #b91c1c; }
.no.espera .t { background: #475569; }
.paleta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.paleta button { border: 1px solid var(--borda); background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; min-height: 44px; }
.lado { display: flex; flex-direction: column; gap: 14px; max-width: 100%; min-width: 0; }

/* Inbox Multiatendente */
.inbox { display: grid; grid-template-columns: 290px minmax(0, 1fr) 260px; height: calc(100vh - 160px); min-height: 540px; border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; background: #fff; max-width: 100%; }
.inbox .lista { border-right: 1px solid var(--borda); overflow-y: auto; }
.conv { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; display: flex; gap: 10px; align-items: center; min-height: 64px; }
.conv:hover, .conv.sel { background: #f0fdf4; }
.conv .av { width: 40px; height: 40px; border-radius: 50%; background: #e2e8f0; color: #1e293b; display: grid; place-items: center; font-weight: 700; flex: none; font-size: 14px; }
.conv.sel .av { background: #15803d; color: #ffffff; }
.conv .meio { flex: 1; min-width: 0; }
.conv .meio b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .meio span { display: block; font-size: 13px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .chat { display: flex; flex-direction: column; background: #efeae2; min-width: 0; }
.inbox .chat .msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.inbox .escrever { display: flex; gap: 8px; padding: 10px 12px; background: #f0f2f5; align-items: center; }
.inbox .escrever button { min-width: 44px; min-height: 44px; padding: 8px 12px; font-size: 14px; }
.inbox .escrever input { flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--borda); min-height: 44px; font-size: 13.5px; min-width: 0; }
.inbox .ficha { border-left: 1px solid var(--borda); padding: 16px; overflow-y: auto; }
.inb-voltar-mob { display: none; }
.inb-mob-topo-lista { display: none; }

/* Abas e Gravador */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 14px; overflow-x: auto; }
.abas button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: #475569; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; font-size: 13px; }
.abas button.at { color: #15803d; border-color: #15803d; font-weight: 700; }
.gravador { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--borda); border-radius: 12px; background: #f8fafc; }
.rec { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--vermelho); color: #fff; font-size: 22px; min-height: 54px; min-width: 54px; display: grid; place-items: center; }
.rec.on { animation: pulso 1s infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0.25); } }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 100; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); font-weight: 500; pointer-events: none; }

/* Estado Vazio */
.estado-vazio { text-align: center; padding: 40px 16px; background: #fff; border: 2px dashed var(--borda); border-radius: var(--raio); margin: 14px 0; }
.estado-vazio .ico { font-size: 42px; margin-bottom: 10px; }
.estado-vazio h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.estado-vazio p { color: var(--cinza); margin: 0 0 16px; font-size: 13px; max-width: 440px; margin-left: auto; margin-right: auto; line-height: 1.4; }

/* Modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 110; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-caixa { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 40px rgba(0,0,0,0.25); }
.modal-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-topo h3 { margin: 0; font-size: 17px; }
.modal-fechar { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--cinza); min-height: 44px; min-width: 44px; display: grid; place-items: center; }

/* Responsividade Mobile (390x844 e tablets) */
.mob-nav { display: none; }
@media (max-width: 900px) {
  .casca { grid-template-columns: minmax(0, 1fr); background: none; max-width: 100vw; overflow-x: hidden; }
  .lateral { position: fixed; left: -270px; width: 260px; z-index: 40; transition: left 0.2s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 4px 0 20px rgba(0,0,0,0.2); visibility: hidden; pointer-events: none; }
  .lateral.aberta { left: 0; visibility: visible; pointer-events: auto; }
  .hamb { display: inline-flex; }
  .topo { padding: 10px 14px; max-width: 100vw; overflow-x: hidden; }
  .topo .busca { display: none; }
  .topo .direita .chip.azul { display: none; }
  .conteudo { padding: 14px 12px 90px; max-width: 100vw; overflow-x: hidden; }
  .card { max-width: 100%; }
  .tabela-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .solta { max-width: 100%; word-break: break-word; }
  .solta b, .solta p { word-break: break-word; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3, .g2 { grid-template-columns: 1fr; }
  .editor { grid-template-columns: minmax(0, 1fr); max-width: 100%; }
  .tela-fluxo { height: 440px; max-width: 100%; }
  .lado { max-width: 100%; min-width: 0; }
  .paleta { max-width: 100%; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: auto; max-width: 100%; }
  .inbox .ficha { display: none; }
  .inbox .lista { max-height: none; max-width: 100%; }
  .inbox .chat { min-height: 450px; max-width: 100%; }
  .inbox.mob-ver-chat .lista { display: none !important; }
  .inbox.mob-ver-chat .chat { display: flex !important; }
  .inbox.mob-ver-lista .chat { display: none !important; }
  .inbox.mob-ver-lista .lista { display: block !important; }
  .inb-voltar-mob { display: inline-flex !important; }
  .inb-mob-topo-lista { display: flex !important; }
  .mob-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--borda); z-index: 30; justify-content: space-around; padding: 4px 2px; }
  .mob-nav a { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: #475569; gap: 2px; min-height: 44px; min-width: 44px; flex: 1; justify-content: center; padding: 0 2px; }
  .mob-nav a.ativo { color: #15803d; font-weight: 700; }
  .mob-nav a .ic { font-size: 19px; }
  .passo { min-width: 0; flex: 1 1 45%; font-size: 13px; }
  .passo b { font-size: 13px; }
  .grade > * { min-width: 0; max-width: 100%; }
  .campo { min-width: 0; max-width: 100%; }
  select, input, textarea { max-width: 100%; box-sizing: border-box; }
  small, .sub, .busca-item span { font-size: 13px !important; }
  .amostra-card { flex-wrap: wrap; }
  .clonagem-box { padding: 12px; max-width: 100%; box-sizing: border-box; }
}

/* Automação de Vídeo e Clonagem de Voz (#2256) */
.video-bal { width: 100%; border-radius: 8px; overflow: hidden; background: #0f172a; position: relative; margin-bottom: 6px; }
.video-thumb { width: 100%; height: 160px; background: linear-gradient(135deg, #1e293b, #0f172a); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; cursor: pointer; gap: 8px; border-radius: 8px 8px 0 0; }
.video-thumb .play-btn { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.25); display: grid; place-items: center; font-size: 22px; backdrop-filter: blur(4px); }
.video-legend { padding: 8px 10px; font-size: 13px; background: #d9fdd3; color: var(--texto); line-height: 1.35; border-radius: 0 0 8px 8px; }
.clonagem-box { border: 1px solid var(--borda); border-radius: 12px; padding: 16px; background: #f8fafc; margin-top: 10px; max-width: 100%; box-sizing: border-box; }
.amostra-card { border: 1px solid var(--borda); border-radius: 10px; padding: 12px; background: #fff; display: flex; align-items: center; gap: 12px; margin-top: 8px; max-width: 100%; box-sizing: border-box; }
.busca-wrap { position: relative; flex: 1; max-width: 380px; }
.busca-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--borda); border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); max-height: 320px; overflow-y: auto; z-index: 50; }
.busca-item { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.busca-item:hover { background: #f0fdf4; }
.busca-item b { font-size: 13px; color: var(--texto); }
.busca-item span { font-size: 13px; color: #475569; }

/* #4062 / #4485 home publica polida e responsiva */
.home { min-height: 100vh; background: linear-gradient(135deg, #052e16 0%, #14532d 55%, #15803d 100%); color: #fff; display: flex; flex-direction: column; overflow-x: hidden; }
.home-topo { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,0.12); width: 100%; box-sizing: border-box; }
.home-topo-dir { display: flex; align-items: center; gap: 12px; }
.home-marca { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.home-corpo { max-width: 1040px; margin: 0 auto; padding: 40px 20px 60px; text-align: center; box-sizing: border-box; width: 100%; }
.home-hero { max-width: 820px; margin: 0 auto 36px; }
.home-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); border-radius: 99px; font-size: 13px; font-weight: 700; color: #dcfce7; margin-bottom: 20px; }
.home-corpo h1 { font-size: clamp(26px, 4.8vw, 42px); margin: 0 0 16px; line-height: 1.25; font-weight: 800; }
.home-corpo p.home-lead { font-size: 17px; color: #dcfce7; margin: 0 auto 28px; line-height: 1.55; max-width: 720px; }
.home-cta-grupo { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 36px; }
.home .btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; text-decoration: none; border-radius: 9px; font-weight: 700; font-size: 14px; box-sizing: border-box; }
.home-btn-prim { background: #22c55e !important; border: 1px solid #16a34a !important; color: #052e16 !important; min-height: 48px !important; padding: 0 24px !important; }
.home-btn-prim:hover { background: #16a34a !important; color: #fff !important; }
.home-btn-sec { background: rgba(255,255,255,0.12) !important; border: 1px solid rgba(255,255,255,0.3) !important; color: #fff !important; min-height: 48px !important; padding: 0 20px !important; }
.home-btn-sec:hover { background: rgba(255,255,255,0.22) !important; }

/* Pilares / Métricas */
.home-pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0 0 44px; text-align: left; }
.pilar-card { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); border-radius: 12px; padding: 16px; backdrop-filter: blur(6px); }
.pilar-ic { font-size: 22px; margin-bottom: 6px; }
.pilar-tit { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.pilar-txt { font-size: 13px; color: #dcfce7; line-height: 1.4; margin: 0; }

/* Título de Seções na Home */
.home-secao-tit { font-size: clamp(22px, 3.8vw, 30px); font-weight: 800; margin: 44px 0 10px; color: #fff; }
.home-secao-sub { font-size: 15px; color: #dcfce7; margin: 0 auto 28px; max-width: 640px; line-height: 1.5; }

/* Grid de Módulos (Estilo Cartões do Painel) */
.home-grid-modulos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 44px; text-align: left; }
.modulo-card { background: #ffffff; color: var(--texto); border-radius: 14px; padding: 20px; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 6px 20px rgba(0,0,0,0.12); display: flex; flex-direction: column; justify-content: space-between; }
.modulo-card-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modulo-card-ic { font-size: 26px; }
.modulo-card h2 { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: #0f172a; }
.modulo-card p { font-size: 13.5px; color: #475569; line-height: 1.5; margin: 0; }

/* Passos */
.home-passos { list-style: none; padding: 0; margin: 0 0 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.home-passos li { background: rgba(255,255,255,0.12); border-radius: 12px; padding: 18px; text-align: left; border: 1px solid rgba(255,255,255,0.18); }
.home-passos b { display: block; margin-bottom: 6px; font-size: 15px; color: #fff; }
.home-passos span { color: #dcfce7; font-size: 13.5px; line-height: 1.45; }

/* Planos */
.home-planos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 0 0 44px; text-align: left; }
.plano-card { background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.22); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.plano-card.destaque { background: rgba(255,255,255,0.18); border: 2px solid #4ade80; box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
.plano-nome { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.plano-preco { font-size: 26px; font-weight: 800; color: #4ade80; margin: 4px 0 10px; }
.plano-desc { font-size: 13px; color: #dcfce7; line-height: 1.45; margin: 0 0 16px; }

/* Rodapé */
.home-rodape { padding: 30px 20px; text-align: center; border-top: 1px solid rgba(255,255,255,0.15); color: #dcfce7; font-size: 13px; line-height: 1.6; }
.home-rodape a { color: #fff; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; box-sizing: border-box; }

/* UX de Login e Tratamento de Erro Claro */
.alerta-erro-login { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; margin: 14px 0; color: #991b1b; text-align: left; box-sizing: border-box; }
.alerta-erro-titulo { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: #991b1b; display: flex; align-items: center; gap: 6px; }
.alerta-erro-texto { font-size: 13px; line-height: 1.45; color: #7f1d1d; margin: 4px 0 12px; }
.alerta-erro-botoes { display: flex; gap: 8px; flex-direction: column; }
.btn-wa-erro { background: #15803d !important; color: #fff !important; border: 1px solid #166534 !important; min-height: 44px !important; padding: 8px 12px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 600 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; }
.btn-wa-erro:hover { background: #166534 !important; }
.btn-conv-erro { background: #fff !important; color: #374151 !important; border: 1px solid #d1d5db !important; min-height: 44px !important; padding: 8px 12px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 600 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
.btn-conv-erro:hover { background: #f9fafb !important; }
.login-divisor { display: flex; align-items: center; text-align: center; margin: 18px 0 12px; color: #475569; font-size: 13px; font-weight: 600; }
.login-divisor::before, .login-divisor::after { content: ''; flex: 1; border-bottom: 1px solid #cbd5e1; }
.login-divisor span { padding: 0 8px; color: #475569; }
.alt-btn-login { width: 100%; min-height: 44px; border: 1px solid #d1d5db; background: #f8fafc; color: #1e293b; font-size: 13px; font-weight: 600; border-radius: 8px; margin-bottom: 10px; display: inline-flex; align-items: center; justify-content: center; }
.alt-btn-login:hover { background: #f1f5f9; }
.link-suporte-login { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: #15803d; font-weight: 600; text-decoration: underline; min-height: 44px; }
.link-voltar-home { display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #6b7280; text-decoration: none; min-height: 44px; padding: 0 10px; }
.link-voltar-home:hover { text-decoration: underline; }

/* Troca de Senha */
#f-troca-senha .campo { margin-bottom: 10px; }
#f-troca-senha label { display: block; font-size: 13px; font-weight: 600; color: var(--cinza); margin-bottom: 4px; }
#f-troca-senha input { width: 100%; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 8px; font-size: 14px; min-height: 44px; box-sizing: border-box; }

/* #4112 legibilidade e ações das linhas */
tr[role="button"] { cursor:pointer; }
tr[role="button"]:hover,tr[role="button"]:focus { background:#eff6ff; outline:2px solid #1d4ed8; outline-offset:-2px; }
#wa-corpo td,#tab-contatos td { font-size:15px; line-height:1.5; padding:12px; overflow-wrap:anywhere; }
#wa-corpo th { white-space:normal; }
.fone-legivel { font-size:18px; font-variant-numeric:tabular-nums; }
.acoes-contato { display:flex; gap:12px; flex-wrap:wrap; }
.conv { min-height:64px; flex-wrap:wrap; }
.conv .meio { min-width:0; overflow-wrap:anywhere; }
.conv small { white-space:normal; }
@media(max-width:600px) { #wa-corpo .tabela-wrap { overflow-x:visible; } #wa-corpo table { table-layout:fixed; width:100%; min-width:0; } #wa-corpo td,#wa-corpo th { padding:10px 6px; overflow-wrap:anywhere; } }

.atalho-real { color:var(--texto); text-decoration:none; display:block; min-height:110px; } .atalho-real:hover { outline:2px solid #1d4ed8; } .atalho-real h2 { font-size:20px; }

.paginacao-wa { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:12px; } .paginacao-wa span { flex:1; min-width:100px; font-size:14px; }

/* #4112: evita alvo de toque 43.x arredondado para44 no celular. */
tr[role="button"] { height:48px; }
#wa-corpo td,#tab-contatos td { min-height:48px; }

#tab-contatos { table-layout:fixed; width:100%; min-width:0; }
#tab-contatos th,#tab-contatos td { white-space:normal; overflow-wrap:anywhere; }

/* #4112: conversas em cartões no celular, datas completas em uma linha. */
@media(max-width:600px) {
  #wa-conversas table,#wa-conversas tbody { display:block; width:100%; }
  #wa-conversas thead { display:none; }
  #wa-conversas tr { display:block; height:auto; min-height:48px; margin-bottom:12px; border:1px solid var(--borda); border-radius:8px; padding:8px; }
  #wa-conversas td { display:block; width:100%; box-sizing:border-box; border:0; padding:6px; min-height:0; white-space:normal; overflow-wrap:break-word; }
  #wa-conversas td:first-child { font-size:17px; font-weight:700; }
  #wa-conversas td:nth-child(2)::before { content:'Mensagem: '; font-weight:600; }
  #wa-conversas td:nth-child(3)::before { content:'Quando: '; font-weight:600; }
  #wa-conversas td:nth-child(3) { white-space:nowrap; font-variant-numeric:tabular-nums; }
}

/* #9993929: responsividade do topo da home para mobile (390px) */
@media (max-width: 600px) {
  .home-topo { padding: 12px 16px; gap: 8px; }
  .home-topo-dir { gap: 8px; }
  .home-topo-dir .chip { display: none; }
  .marca-logo-img { height: 32px !important; }
}

/* #10003704: Campanha tipo Quiz (BuilderBot Engine) */
.quiz-bloco-etapa { background: #f8fafc; border: 1px solid var(--borda); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.quiz-bloco-etapa h4 { margin: 0 0 8px; font-size: 14px; color: #1e293b; display: flex; align-items: center; justify-content: space-between; }
.quiz-bloco-etapa textarea { width: 100%; min-height: 80px; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 6px; box-sizing: border-box; font-family: inherit; font-size: 13px; line-height: 1.4; resize: vertical; }
.quiz-preview-fone { max-width: 380px; margin: 0 auto; background: #efeae2; border-radius: 16px; border: 1px solid #cbd5e1; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.quiz-chat-corpo { height: 320px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.quiz-opcoes-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.quiz-opt-btn { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: 6px; padding: 8px 12px; min-height: 44px; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; display: flex; align-items: center; box-sizing: border-box; }
.quiz-opt-btn:hover { background: #dcfce7; }
.quiz-opt-btn:focus { outline: 2px solid #166534; outline-offset: 1px; }
