/* ProspectZyra — TELAS / layout (HUD, navegação, painéis). Tokens em tokens.css */
/* ============================== HUD ============================== */
.hud {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  padding: 15px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--hud-line);
  background: var(--hud-bg);
  color: var(--hud-ink);
  box-shadow: 0 10px 30px -18px rgba(2, 6, 23, 0.6);
}
.hud::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc-2), transparent);
  opacity: 0.7;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; font-size: 24px; color: #fff;
  background: var(--acc);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--r-sm);
}
.logo::after { display: none; }
.brand h1 { margin: 0; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: 0.02em; font-weight: 800; color: var(--hud-ink); }
.brand h1 span { color: #7aa2ff; }
.tagline {
  margin: 4px 0 0;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--hud-muted);
}
.player { display: flex; align-items: center; gap: 18px; }
.level-ring {
  position: relative; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#3b82f6 var(--p, 0%), #93c5fd calc(var(--p, 0%) + 10%), rgba(255, 255, 255, 0.14) 0);
}
.level-ring::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--hud-bg-2); }
.level-ring span { position: relative; font-size: 22px; font-weight: 800; color: #fff; font-family: var(--display); }
.level-ring small { position: absolute; bottom: 8px; font-family: var(--display); font-size: 7px; letter-spacing: 0.16em; color: var(--hud-muted); }
.player-info { min-width: 214px; }
.player-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.player-top strong { font-family: var(--display); font-size: 14px; letter-spacing: 0.01em; color: var(--hud-ink); }
.streak { font-size: 12px; color: #fbbf24; }
.xp-bar { position: relative; height: 18px; border-radius: var(--r-pill); overflow: hidden; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--hud-line); }
.xp-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #3b82f6, #60a5fa); transition: width 0.6s var(--ease); }
.xp-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; letter-spacing: 0.04em; color: #fff; font-weight: 700; }
.conn { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--hud-muted); }
.conn i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.conn[data-status='connected'] i { background: #34d399; }
.conn[data-status='qr'] i, .conn[data-status='connecting'] i { background: #fbbf24; animation: pulse 1.1s infinite; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }
.dot.on { background: var(--green); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ============================== NAV ============================== */
.tabs { position: relative; z-index: 40; display: flex; gap: 6px; flex-wrap: wrap; padding: 14px clamp(16px, 4vw, 44px) 0; max-width: var(--container); margin: 0 auto; width: 100%; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--body); font-weight: 600; font-size: 13.5px; letter-spacing: 0;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  padding: 9px 15px; border-radius: var(--r-sm); cursor: pointer; transition: 0.15s var(--ease);
}
.tab:hover { color: var(--ink); background: var(--panel-3); }
.tab.active { color: #fff; background: var(--acc); border-color: var(--acc); box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25); }
.menu-toggle.active { color: #fff; background: var(--acc); }
.subnav { position: relative; z-index: 39; display: none; flex-wrap: wrap; gap: 6px; padding: 12px clamp(16px, 4vw, 44px) 0; max-width: var(--container); margin: 0 auto; width: 100%; animation: fade 0.2s var(--ease); }
.subnav.open { display: flex; }
.subnav .tab { font-size: 12.5px; padding: 7px 13px; background: var(--panel); border-color: var(--line); }
.subnav .tab.active { color: #fff; background: var(--acc); border-color: var(--acc); }
/* grupos da navegação (Visão geral · Funil · Operação · Inteligência · Automação) */
.nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); }
.nav-group:first-child { padding-left: 0; border-left: 0; }
.nav-group-label { font-family: var(--mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-right: 3px; white-space: nowrap; }
@media (max-width: 720px) { .nav-group { flex-basis: 100%; padding-left: 0; border-left: 0; margin-top: 4px; } .nav-group:first-child { margin-top: 0; } }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }

/* ============================== MAIN ============================= */
main {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto; width: 100%;
  padding: 16px clamp(16px, 4vw, 44px) 80px;
}
.page-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.page-head .ph-ico {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  font-size: 22px; color: var(--acc);
  background: var(--acc-soft);
  border: 1px solid #d7e2fb; border-radius: var(--r-sm);
}
.page-head .ph-text { flex: 1; min-width: 200px; }
.page-head h2 { font-size: 20px; }
.page-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.page-head .ph-crumb {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 3px;
}
.page-head .ph-crumb b { color: var(--acc); }
.panel { display: none; }
.panel.active { display: flex; flex-direction: column; gap: 16px; animation: fade 0.3s var(--ease); }

/* ============================= CARDS ============================= */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.card::before { display: none; }
.card h2 {
  margin: 0 0 12px; font-size: 13px; font-family: var(--display);
  letter-spacing: 0.02em; text-transform: none; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card h2::before { content: ''; width: 4px; height: 16px; background: var(--acc); border-radius: 2px; }
.card.narrow { max-width: 620px; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.tiny { font-size: 11.5px; }
code { font-family: var(--mono); font-size: 12px; background: var(--acc-soft); color: var(--acc-2); padding: 1px 6px; border-radius: 6px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; overflow: hidden; }
.stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); }
.stat-ico { font-size: 18px; color: var(--acc); }
.stat b { font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat small { color: var(--muted); font-size: 11px; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.badges-card { margin-top: 0; }
.section-title { font-family: var(--display); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.list-head .section-title { margin: 0; }

/* ============================ MISSOES =========================== */
.missions, .events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mission {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px;
  background: var(--panel-3);
}
.mission .m-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 9px; }
.mission .reward { color: var(--acc); font-family: var(--mono); font-size: 11.5px; }
.mission .track { height: 7px; border-radius: var(--r-pill); background: #e9edf4; overflow: hidden; }
.mission .track i { display: block; height: 100%; background: var(--acc-2); transition: width 0.5s var(--ease); }
.mission.ready { border-color: #bcd0f7; background: var(--acc-soft); }
.mission.claimed { opacity: 0.55; }
.events li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 9px 11px; border-radius: var(--r-xs); background: var(--panel-3); }
.events .xp { color: var(--acc); }
.events .when { color: var(--muted-2); font-size: 10.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 9px; }
.badge {
  padding: 7px 14px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
  font-family: var(--body); letter-spacing: 0;
  background: var(--acc-soft);
  border: 1px solid #d7e2fb; color: var(--acc-2);
}
.empty { color: var(--muted-2); font-size: 13px; font-style: normal; }

/* ============================ LEADS ============================= */
.lead-list { display: flex; flex-direction: column; gap: 11px; }
.lead {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  border: 1px solid var(--line); border-radius: var(--r); padding: 15px 17px;
  background: var(--panel);
  transition: 0.16s var(--ease);
}
.lead:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.lead h3 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 0 0 7px; font-size: 15px; font-family: var(--display); }
.lead .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.lead .actions { display: flex; flex-direction: column; gap: 7px; flex: none; align-items: stretch; }
.lead .actions .btn { justify-content: center; }
.pill { font-size: 10px; padding: 3px 10px; border-radius: var(--r-pill); font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--panel-3); color: var(--ink-2); }
.pill.novo { background: var(--sig-soft); color: var(--sig-2); }
.pill.contatado { background: var(--amber-soft); color: var(--amber); }
.pill.respondeu { background: var(--pink-soft); color: var(--pink); }
.pill.convertido { background: var(--green-soft); color: var(--green); }
.pill.perdido { background: var(--red-soft); color: var(--red); }
.pill.agendado { background: var(--violet-soft); color: var(--violet); }
.pill.qualificado { background: var(--acc-soft); color: var(--acc); }
.pill.oportunidade { background: var(--violet-soft); color: var(--violet); }
.score { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.score.hi { background: var(--green-soft); color: var(--green); }
.score.mid { background: var(--amber-soft); color: var(--amber); }
.score.lo { background: var(--red-soft); color: var(--red); }
.mbadge { font-size: 10.5px; color: var(--muted); background: var(--panel-3); border: 1px solid var(--line); padding: 2px 9px; border-radius: var(--r-pill); }
.mbadge.ok { color: var(--green); border-color: #bfe6d2; }
.mbadge.ai { color: var(--acc); border-color: #cdddf9; }
.mbadge.ag { color: var(--violet); border-color: #d9cdfa; }
.last-act { font-size: 11.5px; color: var(--muted); margin: 7px 0; }
.lead-contacts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.cico { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 11px; border-radius: var(--r-pill); background: var(--panel-3); border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; cursor: pointer; transition: 0.15s var(--ease); font-family: var(--body); }
.cico:hover { border-color: var(--acc); color: var(--acc); }
.cico.wa { background: var(--green-soft); border-color: #bfe6d2; color: var(--green); }
.cico.wa:hover { border-color: var(--green); }
.cico.ig { background: var(--pink-soft); border-color: #f3c6de; color: var(--pink); }
.cico.ig:hover { border-color: var(--pink); }
.cico.primary { background: var(--green-soft); border-color: var(--green); }
.cico .ic { color: currentColor; }

/* ========================== DESCOBRIR =========================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { font-size: 12px; padding: 6px 13px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: 0.15s var(--ease); font-family: var(--body); }
.chip:hover { color: var(--acc); border-color: var(--acc); background: var(--acc-soft); }
.cat-wrap { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.cat-wrap > summary { cursor: pointer; padding: 11px 14px; font-family: var(--display); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cat-wrap[open] > summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.cat-wrap .inner, #nicheCatalog { padding: 12px 14px; }
.cat-group { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 10px 12px; margin-bottom: 10px; }
.cat-group b { display: block; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }

/* ============================ HERMES ============================ */
.kv { margin: 14px 0 0; padding: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.kv dd { margin: 0; color: var(--ink); }
.qr-box {
  display: grid; place-items: center; min-height: 280px;
  border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 16px;
  background: var(--panel-3);
}
.qr-box img { width: 270px; height: 270px; border-radius: var(--r-xs); background: #fff; padding: 10px; }

/* ============================== IA ============================== */
.providers { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.providers li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 11px 13px; border-radius: var(--r-xs); background: var(--panel-3); border: 1px solid var(--line); }
.providers small { color: var(--muted); font-size: 11px; display: block; }
.chat { display: flex; flex-direction: column; gap: 9px; height: 300px; overflow: auto; padding: 6px; margin-bottom: 10px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--acc); color: #fff; border: 1px solid var(--acc); border-bottom-right-radius: 4px; }
.msg.me .who { color: rgba(255, 255, 255, 0.75); }
.msg.ai { align-self: flex-start; background: var(--panel-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .who { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; font-family: var(--mono); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }

/* ============================ FLUXO ============================= */
.flowbar {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.flow-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.flow-head h2 { margin: 0; }
.flow-head h2 small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted-2); margin-left: 6px; font-size: 10.5px; font-family: var(--body); }
.flowwrap { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.flow-node {
  position: relative; min-width: 150px; flex: 1 1 150px; max-width: 210px;
  background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; transition: 0.18s var(--ease); cursor: pointer;
}
.flow-node:hover { border-color: var(--acc); box-shadow: var(--shadow-2); }
.flow-node::after { content: '↗'; position: absolute; top: 8px; right: 11px; font-size: 11px; color: var(--muted-2); opacity: 0; transition: 0.2s; }
.flow-node:hover::after { opacity: 1; color: var(--acc); }
.flow-node .fn-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; font-family: var(--display); }
.flow-node .fn-ico { font-size: 16px; color: var(--acc); }
.flow-node .fn-val { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--ink); }
.flow-node .fn-hint { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.flow-node.ready { border-color: #bfe6d2; }
.flow-node.ready .fn-val { color: var(--green); }
.flow-node.active { border-color: var(--acc); box-shadow: 0 0 0 3px var(--ring); }
.flow-arrow { align-self: center; color: var(--muted-2); font-size: 16px; padding: 0 1px; }
.flow-arrow small { display: block; font-size: 8.5px; color: var(--muted-2); text-align: center; }
.flowbar.collapsed > .flowwrap, .flowbar.collapsed > .automations { display: none; }
.flowbar.collapsed .flow-head { margin-bottom: 0; }

/* automacoes */
.automations { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.automation { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; background: var(--panel-3); transition: 0.15s var(--ease); }
.automation .a-top { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; font-family: var(--display); }
.automation .a-sched { margin-left: auto; font-size: 10px; color: var(--acc); }
.automation .a-desc { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.automation .a-last { font-size: 10px; color: var(--muted-2); margin-top: 7px; }
.automation.clickable { cursor: pointer; }
.automation.clickable:hover { border-color: var(--acc); box-shadow: var(--shadow-2); }
.automation .a-go { margin-top: 9px; font-size: 11.5px; color: var(--acc); font-weight: 600; font-family: var(--body); }
.automations.full { grid-template-columns: 1fr; }

/* ============================ OFERTAS =========================== */
.offer-list, .tpl-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.offer-item, .tpl-item { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; background: var(--panel-3); transition: 0.15s var(--ease); }
.offer-item.active, .tpl-item.active { border-color: #bcd0f7; background: var(--acc-soft); }
.offer-item.editing { border-color: var(--acc); box-shadow: 0 0 0 3px var(--ring); }
.offer-item.saved { animation: savedflash 3s var(--ease); }
.offer-item .oi-body, .tpl-item .ti-body { flex: 1; min-width: 0; }
.offer-item h4, .tpl-item h4 { margin: 0 0 5px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer-item .oi-meta, .tpl-item .ti-meta { font-size: 11px; color: var(--muted); }
.offer-item .oi-desc { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.45; }
.tpl-item .ti-actions, .offer-item .ti-actions { display: flex; flex-direction: column; gap: 6px; }
.mode-badge { padding: 2px 9px; border-radius: var(--r-pill); font-size: 9.5px; font-weight: 700; font-family: var(--body); text-transform: uppercase; letter-spacing: 0.05em; }
.mode-badge.auto { background: var(--sig-soft); color: var(--sig-2); }
.mode-badge.fixed { background: var(--amber-soft); color: var(--amber); }
.mode-badge.editando { background: var(--green-soft); color: var(--green); }
.mode-badge.inativo { background: var(--panel-3); color: var(--muted); }
.delay-badge { font-size: 10px; color: var(--muted-2); margin-left: 8px; }

/* ===================== TEMPLATES (previa) ======================= */
.preview-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 16px 0 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.pt-lead select { min-width: 180px; }
.pt-var { display: flex; gap: 6px; align-items: center; }
.variations { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.variation { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; background: var(--panel-3); }
.variation .v-idx { font-family: var(--mono); font-size: 9.5px; color: var(--acc); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.08em; }
.variation .v-text { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.variation .v-actions { display: flex; gap: 7px; margin-top: 11px; }
.seq-step { border-left: 2px solid var(--acc); padding: 9px 0 9px 13px; margin-bottom: 9px; }
.seq-step b { font-size: 12.5px; font-family: var(--display); }
.seq-step .ss-meta { font-size: 9.5px; color: var(--muted-2); margin-left: 8px; }
.seq-step .ss-text { font-size: 13px; white-space: pre-wrap; margin-top: 6px; color: var(--ink-2); }

/* ===================== TEMPLATES (sequencia) ==================== */
.seq-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.schip { font-size: 11px; padding: 4px 11px; border-radius: var(--r-pill); background: var(--panel-3); border: 1px solid var(--line); color: var(--muted); }
.schip b { color: var(--acc); }
.seq { position: relative; list-style: none; margin: 12px 0 0; padding: 0; }
.seq::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.seq-item { position: relative; display: flex; gap: 13px; align-items: flex-start; padding: 12px 14px 12px 0; cursor: pointer; transition: 0.15s var(--ease); }
.seq-item:hover { background: var(--panel-3); }
.seq-item.editing { background: var(--acc-soft); }
.seq-item.off { opacity: 0.5; }
.seq-num { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--acc); color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.seq-num.small { width: 26px; height: 26px; font-size: 11px; }
.seq-body { flex: 1; min-width: 0; }
.seq-title { font-family: var(--display); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seq-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.seq-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }

/* =========================== ANTI-BAN =========================== */
.antiban-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.antiban-head .ab-summary { display: flex; flex-direction: column; gap: 4px; }
.antiban-head .ab-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-family: var(--display); font-weight: 700; }
.risk { padding: 4px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: 10px; font-family: var(--body); text-transform: uppercase; letter-spacing: 0.06em; }
.risk.low { background: var(--green-soft); color: var(--green); }
.risk.medium { background: var(--amber-soft); color: var(--amber); }
.risk.high { background: #fce6cf; color: var(--amber-2); }
.risk.critical { background: var(--red-soft); color: var(--red); }
.risk.off { background: var(--panel-3); color: var(--muted); }
.ab-reasons { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.ab-reasons li::before { content: '▸ '; color: var(--acc); }
.antiban-stats { margin-top: 0; }
.ab-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; }
.ab-card h3 { margin: 0 0 10px; font-size: 11px; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); }
.ab-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.ab-row:last-child { border-bottom: none; }
.ab-row span:first-child { color: var(--muted); }
.meter { height: 7px; border-radius: var(--r-pill); background: #e9edf4; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--acc-2); transition: width 0.5s var(--ease); }
.meter.warn i { background: var(--amber); }
.meter.danger i { background: var(--red); }
.rawjson { max-height: 340px; overflow: auto; background: #0b1220; border: 1px solid var(--line); border-radius: var(--r-xs); padding: 12px; font-size: 11px; white-space: pre-wrap; color: #93c5fd; }
.ab-controls { margin-top: 12px; width: 100%; }

/* ======================== DIAG / BRIEF ========================== */
.diag { margin: 14px 0; padding: 15px 17px; border-radius: var(--r-sm); background: var(--panel-3); border: 1px solid var(--line); }
.diag-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 10px; font-family: var(--display); }
.diag-score { font-weight: 700; }
.diag-bar { height: 7px; border-radius: var(--r-pill); background: #e9edf4; overflow: hidden; margin-bottom: 11px; }
.diag-bar i { display: block; height: 100%; transition: width 0.5s var(--ease); }
.diag ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.diag li::before { content: '▸ '; color: var(--acc); }
.brief { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.brief > summary { cursor: pointer; padding: 11px 14px; font-family: var(--display); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.brief[open] > summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.brief pre, .brief p, .brief textarea { margin: 12px 14px; width: calc(100% - 28px); }
.brief .row { margin: 8px 14px; }
.brief #playbookLearnings { margin: 0 14px 14px; }

/* ==================== FLUXO DETALHADO / EDGES =================== */
.flowfull { display: flex; flex-direction: column; gap: 10px; }
.ff-node { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: var(--panel-3); }
.ff-node .ff-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-xs); background: var(--acc-soft); border: 1px solid #d7e2fb; color: var(--acc); }
.ff-node .ff-body { flex: 1; min-width: 0; }
.ff-node h4 { margin: 0; font-size: 14.5px; font-family: var(--display); }
.ff-node .ff-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ff-node .ff-val { font-size: 24px; font-weight: 700; color: var(--green); min-width: 40px; text-align: right; }
.ff-node .ff-hint { font-size: 10px; color: var(--muted-2); margin-top: 4px; }
.ff-conn { text-align: center; color: var(--muted-2); padding: 3px 0; font-size: 12px; }
.edges { display: flex; flex-direction: column; gap: 8px; }
.edge { display: flex; align-items: center; gap: 8px; font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.edge .e-arrow { color: var(--muted-2); }
.edge .e-cond { color: var(--acc); font-size: 10.5px; margin-left: auto; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: var(--muted); }
.legend .dot { display: inline-block; margin-right: 6px; }

/* ============================ INBOX (atendimento) =============== */
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: calc(100vh - 250px); min-height: 480px; }
.inbox-list { border: 1px solid var(--line); border-radius: var(--r); overflow-y: auto; background: var(--panel); }
.inbox-empty { padding: 20px; }
.conv { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: none; background: transparent; color: var(--ink); padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: 0.14s var(--ease); }
.conv:hover { background: var(--panel-3); }
.conv.active { background: var(--acc-soft); box-shadow: inset 3px 0 0 var(--acc); }
.conv-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-weight: 700; font-family: var(--display); font-size: 14px; }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.conv-top b { font-family: var(--display); }
.conv-top small { color: var(--muted-2); font-size: 10.5px; font-family: var(--mono); }
.conv-last { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-badge { flex: none; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 2px 7px; }
.inbox-chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-3); }
.chat-title { display: flex; flex-direction: column; }
.chat-title small { color: var(--muted-2); font-size: 11px; font-family: var(--mono); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat-empty { margin: auto; }
.chat-body .bubble { max-width: 72%; }
.b-time { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 4px; text-align: right; font-family: var(--mono); }
.bubble.sending { opacity: 0.6; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--panel-3); align-items: flex-end; }
.chat-input input, .chat-field { flex: 1; }
.chat-field { display: flex; align-items: center; gap: 8px; }
.chat-field textarea { flex: 1; width: 100%; resize: none; min-height: 42px; max-height: 170px; line-height: 1.45; }
.parts-hint { flex: none; font-size: 10.5px; font-family: var(--mono); color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-soft); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.parts-hint.hidden { display: none; }

/* =========================== RESPONSIVO ========================= */
@media (max-width: 980px) {
  .hud { gap: 14px; }
  .player-info { min-width: 160px; }
}
@media (max-width: 820px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 320px; }
  .inbox-chat { min-height: 420px; }
  .lead { flex-direction: column; }
  .lead .actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hud { padding: 12px 16px; }
  .brand h1 { font-size: 17px; }
  .player-info { min-width: 0; flex: 1; }
  .toolbar { gap: 8px; }
  .form-inline { flex-direction: column; align-items: stretch; }
  .stat b { font-size: 24px; }
}

/* acessibilidade: respeita quem pede menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}


/* ---------- Atendimento: barra de ferramentas, scroll e separadores ---------- */
.inbox-list { display: flex; flex-direction: column; overflow: hidden; }
.inbox-tools { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--panel-3); }
.inbox-tools .inbox-search { flex: 1; }
.btn.icon { padding: 8px 10px; line-height: 1; }
.inbox-scroll { flex: 1; overflow-y: auto; }
.day-sep { align-self: center; font-size: 10.5px; color: var(--muted-2); background: var(--panel-3); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; margin: 8px 0; font-family: var(--mono); }
.b-tick { margin-left: 4px; color: #bfe6d2; }
.b-tick.err { color: #f4c2bd; }

/* ---------- Atendimento: toolbar de resposta + popover de templates ---------- */
.chat-input .btn.icon { flex: none; }
.reply-pop { border-top: 1px solid var(--line); background: var(--panel); max-height: 280px; overflow-y: auto; }
.reply-pop[hidden] { display: none; }
.reply-pop .rp-head { padding: 8px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted-2); font-family: var(--mono); border-bottom: 1px solid var(--line); }
.reply-pop .rp-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.reply-pop .rp-item:hover { background: var(--acc-soft); }
.reply-pop .rp-pick { flex: 1; min-width: 0; text-align: left; border: none; background: transparent; color: var(--ink); padding: 10px 12px; cursor: pointer; }
.reply-pop .rp-item b { font-family: var(--display); font-size: 13px; }
.reply-pop .rp-item small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.reply-pop .rp-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; border: none; border-left: 1px solid var(--line); background: transparent; color: var(--acc); cursor: pointer; }
.reply-pop .rp-send:hover { background: var(--acc); color: #fff; }
.reply-pop .rp-badge { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.reply-pop .rp-badge.auto { background: var(--acc-soft); color: var(--acc); }
.reply-pop .rp-badge.fixed { background: var(--panel-3); color: var(--muted); }
#inboxAutoReply.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ============================== Painel (dashboard) ============================== */
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.dash-kpis .kpi { display: flex; align-items: center; gap: 14px; padding: 16px; }
.kpi-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.kpi-ico svg { width: 22px; height: 22px; }
.kpi b { font-family: var(--display); font-size: 26px; line-height: 1; }
.kpi small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi-sub { display: block; color: var(--muted-2); font-size: 11px; margin-top: 3px; }
.dash-hint { color: var(--muted-2); font-size: 11.5px; font-family: var(--mono); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.funnel { display: flex; flex-direction: column; gap: 11px; }
.fn-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; }
.fn-label { font-size: 12.5px; color: var(--muted); }
.fn-track { height: 16px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.fn-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: 99px; transition: width 0.5s var(--ease); }
.fn-val { text-align: right; font-family: var(--mono); font-size: 13px; }

.rates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rate { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; }
.rate b { font-family: var(--display); font-size: 24px; display: block; color: var(--acc); }
.rate small { color: var(--muted); font-size: 11.5px; }

.week { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.wk-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.wk-bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.wk-bars i { width: 10px; min-height: 2px; border-radius: 3px 3px 0 0; }
.wk-bars .s { background: var(--acc); }
.wk-bars .r { background: var(--green); }
.wk-day { font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
.wk-num { font-size: 10.5px; color: var(--muted); }

.ops { display: flex; flex-direction: column; gap: 2px; }
.op { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.op:last-child { border-bottom: none; }
.op b { font-family: var(--display); font-size: 15px; }
.op small { display: block; color: var(--muted); font-size: 11.5px; }

.toplist { display: flex; flex-direction: column; }
.top-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: transparent; border-bottom: 1px solid var(--line); padding: 10px 4px; cursor: pointer; color: var(--ink); }
.top-item:hover { background: var(--panel-3); }
.ti-score { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; }
.ti-score.hi { background: var(--green-soft); color: var(--green); }
.ti-score.mid { background: var(--acc-soft); color: var(--acc); }
.ti-score.lo { background: var(--panel-3); color: var(--muted); }
.ti-main { flex: 1; min-width: 0; }
.ti-main b { font-family: var(--display); font-size: 13.5px; }
.ti-main small { display: block; color: var(--muted); font-size: 11.5px; }
.ti-go { color: var(--acc); }

@media (max-width: 900px) { .dash-kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Templates de resposta: blocos + anexos ---------- */
.small { font-size: 12px; }
#replyBlocksHint { margin: 4px 0 2px; }
#replyBlocksHint.multi { color: var(--acc); font-weight: 600; }
.att-block { margin: 10px 0 4px; padding: 11px 13px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--panel-3); }
.att-head { font-family: var(--display); font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.att-head .small { font-weight: 400; color: var(--muted); }
.att-uploads { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.att-list { display: flex; flex-wrap: wrap; gap: 7px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 4px 6px 4px 10px; font-size: 12px; max-width: 100%; }
.att-chip .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.att-del { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 50%; }
.att-del:hover { color: #c0392b; background: #fff; }

/* ---------- Painel: cockpit de prospecção ---------- */
.cockpit-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cockpit-title { font-family: var(--display); font-size: 20px; letter-spacing: .06em; margin: 0; }
.game-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; font-size: 12.5px; }
.game-strip .gs-lvl b { font-family: var(--display); }
.game-strip .gs-xp { display: flex; align-items: center; gap: 7px; }
.gs-bar { display: inline-block; width: 90px; height: 7px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.game-strip .badges { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.game-strip .badge { font-size: 11px; }

.dash-hero { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-sub.up { color: var(--green); }
.kpi-sub.down { color: #c0392b; }

.actions-card #dashActions { display: flex; flex-direction: column; gap: 10px; }
.act { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-3); }
.act.primary { border-color: var(--acc); background: var(--acc-soft); }
.act-ico { font-size: 22px; }
.act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.act-main > b { font-size: 10px; letter-spacing: .08em; color: var(--acc); }
.act-big { font-family: var(--display); font-size: 15px; font-weight: 600; }
.act-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fn-row { grid-template-columns: 96px 1fr 46px 52px; }
.fn-rate { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--acc); }

.bottleneck { text-align: center; padding: 6px 0 12px; }
.bn-flow { font-size: 13px; color: var(--muted); }
.bn-num { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.bn-gap { font-size: 12px; font-family: var(--mono); margin-bottom: 10px; }
.bn-gap.bad { color: #c0392b; }
.bn-gap.ok { color: var(--green); }
.sep { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; text-align: center; }
.stat b { font-family: var(--display); font-size: 20px; display: block; }
.stat small { color: var(--muted); font-size: 11px; }
.goal { margin-bottom: 12px; }
.goal-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.goal .track { height: 12px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.goal .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.goal-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.prod-week > b { font-family: var(--display); font-size: 12.5px; }

.proj-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.proj ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.proj li { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; font-size: 12.5px; }

.perf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.perf-card { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.perf-card small { color: var(--muted); font-size: 11px; }
.perf-card b { font-family: var(--display); font-size: 15px; }
.perf-card span { font-size: 11.5px; color: var(--muted-2); }
.perf-hours { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.perf-hours .hr { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.perf-hours .hr i { width: 100%; max-width: 26px; min-height: 2px; background: linear-gradient(180deg, var(--acc), var(--acc-2)); border-radius: 3px 3px 0 0; }
.perf-hours .hr span { font-size: 9.5px; color: var(--muted-2); font-family: var(--mono); }

.top-item { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 4px; background: transparent; cursor: default; }
.ti-reason { display: block; font-size: 11px; color: var(--muted-2); }
.top-item .btn { flex: none; }

@media (max-width: 1100px) { .dash-hero { grid-template-columns: repeat(3, 1fr); } .perf-cards { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .dash-hero { grid-template-columns: repeat(2, 1fr); } .stat-row { grid-template-columns: repeat(2, 1fr); } .proj ul { grid-template-columns: 1fr; } .act { flex-wrap: wrap; } }


/* ================= EMPRESA & ESTRATÉGIA — o "cérebro" da prospecção ================= */
.brain-hero { display: flex; gap: 20px; align-items: stretch; justify-content: space-between;
  background: linear-gradient(135deg, var(--hud-bg), var(--hud-bg-2)); color: var(--hud-ink);
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 16px; }
.brain-hero-main { flex: 1; min-width: 0; }
.brain-kicker { font-size: 11px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--hud-muted); font-family: var(--mono); }
.brain-hero h2 { font-family: var(--display); font-size: var(--fs-xl); margin: 4px 0 6px; color: #fff; }
.brain-sub { color: var(--hud-muted); font-size: var(--fs-sm); max-width: 62ch; margin-bottom: 14px; }
.brain-hero .form-inline { margin-top: 0; }
.brain-hero .form-inline input { background: rgba(255,255,255,0.08); border-color: var(--hud-line); color: #fff; }
.brain-hero .form-inline input::placeholder { color: var(--hud-muted); }
.brain-hero #companyStatus { color: #cfe0ff; font-size: var(--fs-sm); margin-top: 10px; min-height: 18px; }
.brain-ready { flex: none; width: 154px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.brain-ready-label { font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--hud-muted); font-family: var(--mono); }
.brain-dial { --p: 0%; width: 104px; height: 104px; border-radius: 50%;
  background: conic-gradient(var(--acc-2) var(--p), rgba(255,255,255,0.12) 0);
  display: grid; place-items: center; position: relative; transition: background .4s ease; }
.brain-dial::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--hud-bg); }
.brain-dial span { position: relative; font-family: var(--display); font-size: 25px; font-weight: 700; color: #fff; }
.brain-ready-state { font-size: 11.5px; color: var(--hud-muted); }

.brain { display: flex; flex-direction: column; gap: 14px; }
.brain-empty { background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted); }
.brain-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.bc-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--panel-3); }
.bc-head h3 { font-family: var(--display); font-size: var(--fs-md); margin: 0; flex: 1; }
.bc-ico { font-size: 18px; line-height: 1; }
.bc-body { padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; }
.sub-h { font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); font-family: var(--mono); margin-top: 4px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 16px; }
.checklist li { font-size: var(--fs-sm); color: var(--ink-2); }
.checklist li.ok { color: var(--ink); }
.checklist li.off { color: var(--muted-2); }
.checklist.neg li.off { color: var(--red); }

.site-url { font-size: var(--fs-sm); }
.site-url b { font-family: var(--mono); color: var(--acc); }
.icp-text { font-size: var(--fs-base); color: var(--ink); line-height: var(--lh-normal); white-space: pre-wrap; }
.conf-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.conf-row b { font-family: var(--display); }
.brain-bar { flex: 1; max-width: 220px; height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.brain-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.brain-details { border-top: 1px dashed var(--line); padding-top: 8px; }
.brain-details > summary { cursor: pointer; font-size: var(--fs-sm); color: var(--acc); font-weight: 600; }
.brain-details .reasons { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }

.prio { font-size: 11px; font-weight: 600; white-space: nowrap; }
.prio.alta { color: var(--green); }
.prio.media { color: var(--amber); }
.prio.baixa { color: var(--muted); }
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.brain-table { width: 100%; border-collapse: collapse; }
.brain-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); vertical-align: middle; }
.brain-table td:nth-child(2) { width: 55%; }
.brain-table .brain-bar { max-width: none; width: 100%; }

.score-grid { display: flex; flex-direction: column; gap: 7px; }
.score-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.score-row span { flex: 1; }
.score-row input { width: 74px; flex: none; text-align: right; padding: 6px 9px; }
.score-row em { color: var(--muted); font-style: normal; }
.score-total { display: flex; justify-content: space-between; border-top: 2px solid var(--line-2); padding-top: 8px; font-size: var(--fs-sm); font-weight: 600; }
.score-total b { font-family: var(--display); font-size: var(--fs-md); }

.tone-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tone-chip { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 7px 14px; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); }
.tone-chip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); font-weight: 600; }
.goal-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.goal-row .radio { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; }
.goal-row .radio input { width: auto; }
.goal-row .radio input { accent-color: var(--acc); }
.var-chip { display: inline-block; font-family: var(--mono); font-size: 11px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; margin: 0 6px 4px 0; color: var(--acc); }
.base-preview { display: none; white-space: pre-wrap; font-size: var(--fs-sm); background: var(--green-soft); border: 1px solid var(--green); border-radius: var(--r-sm); padding: 10px 12px; }
.base-preview.on { display: block; }

.rule-callout { background: var(--amber-soft); border-left: 3px solid var(--amber-2); border-radius: 4px; padding: 10px 12px; font-size: var(--fs-sm); }
.rule-callout b { color: var(--amber); }
.rule-callout p { margin: 4px 0 0; color: var(--ink-2); }

.rec { background: var(--acc-soft); border: 1px solid var(--acc-soft); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rec b { font-size: var(--fs-sm); color: var(--acc); }
.rec p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.rec .btn { align-self: flex-start; }

.cap-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.cap-stat { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 8px; text-align: center; }
.cap-stat b { display: block; font-family: var(--display); font-size: var(--fs-xl); }
.cap-stat small { color: var(--muted); font-size: 11px; }
.cap-goal { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.cap-goal input { width: 84px; }

.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.health-item { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.health-item span { flex: 1; }
.health-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted-2); }
.health-item .dot.ok { background: var(--green); }
.health-item .dot.warn { background: var(--amber-2); }
.health-item .dot.bad { background: var(--red); }
.health-item small { color: var(--muted); font-size: 11px; }
.health-opp { background: var(--amber-soft); border: 1px solid var(--amber-2); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.health-opp b { color: var(--amber); font-size: var(--fs-sm); }
.health-opp p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.health-opp .btn { align-self: flex-start; }

/* ------------------- editor de mensagem "em partes" ------------------- */
.blocks-hidden { display: none !important; }
.blocks-editor { display: flex; flex-direction: column; gap: 10px; }
.blocks-list { display: flex; flex-direction: column; gap: 10px; }
.block-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--panel-3); }
.block-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); font-family: var(--mono); margin-bottom: 6px; }
.block-head .bx { display: flex; gap: 6px; }
.block-input { background: #fff; }
.blocks-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.blocks-count { font-size: 11.5px; color: var(--muted); }
.blocks-count.multi { color: var(--acc); font-weight: 600; }

@media (max-width: 820px) {
  .brain-hero { flex-direction: column; }
  .brain-ready { width: auto; }
  .split2, .goal-row, .checklist, .health-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= OFERTA & PRODUTO — centro comercial da IA ================= */
.stack { display: flex; flex-direction: column; gap: 16px; }
.sec-label { font-family: var(--display); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 2px; }
.offer-list { display: flex; flex-direction: column; gap: 12px; }
.offer-item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.offer-item.teste { border-color: var(--amber-2); background: var(--amber-soft); }
.offer-item.pausada, .offer-item.arquivada { opacity: 0.7; }
.offer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.offer-name { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 15px; font-weight: 700; }
.offer-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted-2); }
.offer-dot.ativa { background: var(--green); }
.offer-dot.teste { background: var(--amber-2); }
.offer-dot.pausada { background: var(--muted-2); }
.offer-dot.arquivada { background: var(--line-2); }
.offer-price { font-family: var(--mono); font-size: 13px; color: var(--acc); margin-top: 2px; }
.offer-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.offer-stats .st { text-align: center; }
.offer-stats .st b { display: block; font-family: var(--display); font-size: 17px; }
.offer-stats .st small { color: var(--muted); font-size: 10px; }
.offer-rates { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.offer-rates b { font-family: var(--mono); }
.ob-bar { height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.ob-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.offer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dist-list { display: flex; flex-direction: column; gap: 10px; }
.dist-row { display: grid; grid-template-columns: 1fr 44px; gap: 4px 10px; align-items: center; }
.dist-row .dn { font-size: 13px; }
.dist-row .dp { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.dist-row .db { grid-column: 1 / -1; height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.dist-row .db i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.reco { background: var(--acc-soft); border: 1px solid #d7e2fb; border-radius: var(--r-sm); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.reco b { color: var(--acc-2); font-family: var(--display); }
.reco p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.reco .btn { align-self: flex-start; }
.obj-list { display: flex; flex-direction: column; gap: 8px; }
.obj-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: start; }
.obj-row textarea { min-height: 40px; }
.cmp-table { display: flex; flex-direction: column; }
.cmp-row { display: grid; grid-template-columns: 1fr 78px 78px; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: center; }
.cmp-row.head { color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom-color: var(--line-2); }
.cmp-row b { font-family: var(--mono); text-align: right; }
.cmp-row .cn { text-align: left; }
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exp-col { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: var(--panel-3); }
.exp-col.win { border-color: var(--green); background: var(--green-soft); }
.exp-col .ttl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.exp-col p { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }
.exp-col b { font-family: var(--display); font-size: 18px; }
.exp-wrap { display: flex; flex-direction: column; gap: 10px; }
.exp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-perf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.offer-perf .pf { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.offer-perf .pf small { color: var(--muted); font-size: 10.5px; display: block; }
.offer-perf .pf b { font-family: var(--display); font-size: 16px; }
[hidden] { display: none !important; }


/* ================= Jornadas (Motor Comercial + Motor de Clientes) ================= */
.stage-board { display: block; }
.stage-summary { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 14px; flex-wrap: wrap; }
.stage-count { font-family: var(--display); font-size: 15px; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.stage-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); }
.stage-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-name { font-family: var(--display); font-size: 15px; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.sc-meta .score { font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--panel-3); color: var(--ink-2); }
.stage-card footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.sc-move { font-size: 12px; padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-3); color: var(--ink-2); margin-left: auto; }

/* KPIs de clientes */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 6px; }
.kpi-row .kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-1); }
.kpi-v { display: block; font-family: var(--display); font-size: 24px; line-height: 1; }
.kpi-l { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.cli-autonote { margin: 10px 2px 16px; }
.cc-services { margin: 2px 0; gap: 6px; }
.cc-services .chip { cursor: default; pointer-events: none; font-size: 11px; padding: 4px 10px; }
.cc-progress { display: flex; flex-direction: column; gap: 5px; }
.cc-progress .bar { height: 6px; background: var(--panel-3); border-radius: var(--r-pill); overflow: hidden; }
.cc-progress .bar i { display: block; height: 100%; background: var(--acc); border-radius: var(--r-pill); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

/* pílulas de status (cliente / etapa) */
.cpill { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--panel-3); color: var(--ink-2); }
.st-ativo, .st-concluido { background: var(--green-soft); color: var(--green); }
.st-pausado, .st-andamento { background: var(--amber-soft); color: var(--amber); }
.st-encerrado { background: var(--red-soft); color: var(--red); }
.st-pendente { background: var(--panel-3); color: var(--muted); }
.pill.followup { background: var(--amber-soft); color: var(--amber); }
.pill.proposta { background: var(--violet-soft); color: var(--violet); }
.pill.negociacao { background: var(--acc-soft); color: var(--acc); }
.pill.contrato { background: var(--sig-soft); color: var(--sig-2); }

/* modal do cliente (reusa #modal360) */
.cli-modal { display: flex; flex-direction: column; gap: 12px; }
.cli-modal h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.cli-modal-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.cli-modal-meta b { color: var(--muted); font-weight: 600; }
.cli-modal-services { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.cli-modal-services .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cli-modal-services input, .cli-modal-services select { flex: 1; min-width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--body); font-size: 13px; }
.cli-stages { display: flex; flex-direction: column; gap: 8px; }
.cli-stage { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-3); overflow: hidden; }
.cli-stage > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.cli-stage > summary::-webkit-details-marker { display: none; }
.cli-stage[open] > summary { border-bottom: 1px solid var(--line); }
.cs-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--acc-soft); color: var(--acc); flex: none; }
.cli-stage > summary b { font-family: var(--display); font-size: 13.5px; }
.cs-status { margin-left: auto; }
.cs-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.cs-body label.tiny { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.cs-body select, .cs-body textarea, .cs-new-item { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--body); font-size: 13px; }
.cs-items { display: flex; flex-direction: column; gap: 6px; }
.cs-item { display: flex; align-items: center; gap: 8px; }
.cs-item input.cs-item-text { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12.5px; }
.cs-items-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.cs-items-actions .cs-new-item { flex: 1; }
.cli-modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

