:root {
  /* Paleta estilo Facebook / Meta */
  --green: #0071e3;          /* azul do Facebook */
  --green-dark: #0062c4;     /* azul mais forte (hover) */
  --brand-grad: linear-gradient(180deg, #0077ed 0%, #0071e3 100%);
  --bg: #f0f2f5;
  --panel: #ffffff;
  --text: #1c1e21;
  --muted: #65676b;
  --border: #dadde1;
  --in: #ffffff;
  --out: #d9fdd3;
  --sidebar-active: #253341;
}
* { box-sizing: border-box; }
:root { --head-h: 72px; --title-size: 18px; }  /* altura única dos cabeçalhos e tamanho único dos títulos das abas */
/* fundo das conversas igual ao do WhatsApp (padrão de desenhos que se repete) */
:root { --wa-wallpaper: #e1dad1 url('../img/wa-bg.webp') repeat; --wa-wallpaper-size: 380px auto; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); }
a { color: var(--green-dark); }

/* Botões */
.btn { padding: 9px 16px; border: none; background: #e4e6eb; border-radius: 6px;
  cursor: pointer; font-size: 14px; font-weight: 600; color: #050505; text-decoration: none; display: inline-block; }
.btn:hover { background: #d8dbdf; }
.btn-primary { background: var(--brand-grad); color: #fff; border-color: transparent; }
.btn-primary:hover { background: var(--brand-grad); filter: brightness(1.06); color: #fff; }
.btn-primary:active { background: var(--green-dark); filter: none; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* Login */
.field input {
  padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; width: 100%; }
/* Tela de login (dark, sofisticada) */
.login-page { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1100px 620px at 50% -12%, #1b2444 0%, #0c1120 58%, #070a12 100%); }
.login-card { width: 100%; max-width: 390px; background: rgba(20,25,38,.78); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 36px 32px 32px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55); text-align: center; }
.login-logo { width: 190px; max-width: 72%; height: auto; display: block; margin: 6px auto 14px; }
.login-sub { color: #8b93a7; font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase; margin-bottom: 28px; }
.login-foot { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 12px; }
.login-foot a { color: #8b93a7; text-decoration: none; }
.login-foot a:hover { color: #cfd6e6; text-decoration: underline; }
.login-form { text-align: left; }
.login-label { display: block; color: #9aa3b8; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; margin: 16px 0 7px; }
.login-form input { width: 100%; padding: 13px 14px; background: #10141f; border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px; color: #fff; font-size: 15px; }
.login-form input::placeholder { color: #5b6476; }
.login-form input:focus { outline: none; border-color: #2f6bed; box-shadow: 0 0 0 3px rgba(47,107,237,.25); }
.login-btn { width: 100%; margin-top: 26px; padding: 14px; border: none; border-radius: 11px; cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .3px;
  background: linear-gradient(135deg, #3a7bff 0%, #1b3fa0 100%); box-shadow: 0 10px 24px rgba(47,107,237,.35); }
.login-btn:hover { filter: brightness(1.08); }
.login-error { color: #ff6b6b; font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }

/* Menu X4 suspenso (no lugar da barra lateral): ícone X4 + nome da página, abre embaixo */
.x4m-slot { display: inline-flex; align-items: center; margin: 0; min-width: 0; }
.x4m-trigger { display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent; padding: 6px 8px 6px 6px;
  margin-left: -6px; border-radius: 10px; cursor: pointer; font: inherit; font-size: var(--title-size); font-weight: 700; color: #111b21;
  white-space: nowrap; min-width: 0; }
.x4m-trigger:hover, .x4m-trigger.open { background: #f0f2f5; }
.x4m-trigger .x4m-logo { height: 14px; width: auto; flex: none; display: block; position: relative; top: 1px; }
.x4m-trigger .x4m-name { overflow: hidden; text-overflow: ellipsis; }
.x4m-trigger .x4m-chev { flex: none; color: #8a93a6; transition: transform .15s; }
.x4m-trigger.open .x4m-chev { transform: rotate(180deg); }
.x4m-float { position: fixed; top: 14px; left: 14px; z-index: 950; background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(11,20,26,.14); }
.x4m-pop, .x4m-sub { position: fixed; z-index: 1600; background: #fff; border-radius: 14px; color: #111b21; font-size: 14px;
  box-shadow: 0 10px 32px rgba(11,20,26,.2), 0 1px 3px rgba(11,20,26,.08); }
.x4m-pop { width: 260px; padding: 8px; max-height: calc(100vh - 24px); overflow-y: auto; }
.x4m-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 9px; background: #f0f2f5; color: #8a93a6; }
.x4m-search svg { width: 16px; height: 16px; flex: none; }
.x4m-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; padding: 0; font: inherit; font-size: 14px; color: #111b21; }
.x4m-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 9px;
  color: #111b21; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; }
.x4m-item svg { flex: none; width: 17px; height: 17px; color: #54656f; }
.x4m-item .x4m-go { margin-left: auto; width: 14px; height: 14px; color: #8a93a6; }
.x4m-item .x4m-hint { margin-left: auto; font-size: 12px; color: #8a93a6; font-weight: 500; }
.x4m-item:hover, .x4m-item.act { background: #f0f2f5; }
.x4m-item.on { font-weight: 700; }
.x4m-item.on svg { color: #111b21; }
.x4m-sep { height: 1px; background: #eef0f2; margin: 6px 4px; }
.x4m-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 4px; font-size: 13px; color: #8a93a6; }
.x4m-foot button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px;
  font-weight: 600; color: #3b4a54; cursor: pointer; }
.x4m-foot button:hover { background: #f5f6f6; }
.x4m-empty { padding: 10px; color: #8a93a6; font-size: 13px; }
/* submenu (mesmo visual do menu de Análises): título + itens com ícone */
.x4m-sub { width: 230px; padding: 8px; }
.x4m-sub-title { padding: 6px 10px 8px; font-size: 13px; font-weight: 700; color: #111b21; border-bottom: 1px solid #eef0f2; margin-bottom: 6px; }
.x4m-sub .x4m-item small { display: block; font-size: 12px; color: #8a93a6; font-weight: 400; }

/* Container / settings */
.container { max-width: 720px; margin: 24px auto; padding: 0 16px; }
.container h1 { margin: 0 0 4px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; margin-top: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card h3 { margin-top: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.msg { margin-top: 12px; font-size: 14px; min-height: 18px; }
.msg.ok { color: var(--green-dark); }
.msg.err { color: #c0392b; }

/* Chat layout */
.chat-layout { display: flex; height: 100vh; }
.conv-list { width: 340px; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; }
#convItems { flex: 1; min-height: 0; overflow-y: auto; }
.conv-header { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); padding: 0 16px;
  border-bottom: 1px solid var(--border); }
.conv-header h2 { margin: 0; font-size: var(--title-size); }
.conv-actions { display: flex; gap: 4px; }
.conv-icon-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent;
  color: #51607a; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .13s; }
.conv-icon-btn:hover { background: #eef1f5; color: #0062c4; }
.conv-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; }
.conv-item-body { flex: 1; min-width: 0; }
/* iniciais em cinza (padrão do WhatsApp para contato sem foto) */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #737373; color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex: none; }
.avatar.avatar-ph { background-size: cover; background-position: center; color: transparent; background-color: #e9edef; }
.conv-item:hover { background: var(--bg); }
.conv-item.unread .conv-name { font-weight: 700; }
.conv-name { font-weight: 600; }
.conv-last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { position: absolute; right: 14px; top: 14px; background: var(--green); color: #fff;
  border-radius: 999px; font-size: 11px; padding: 2px 7px; }
.empty { padding: 40px 24px; text-align: center; }

.chat-panel { flex: 1; display: flex; flex-direction: column; background: var(--wa-wallpaper); background-size: var(--wa-wallpaper-size); }
#chatView { flex: 1; display: flex; flex-direction: column; height: 100%; }
.chat-top { display: flex; align-items: center; gap: 12px; height: var(--head-h); flex: none; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--border); }
.chat-top .avatar { width: 38px; height: 38px; font-size: 15px; }
.chat-tabs { display: flex; gap: 6px; padding: 8px 20px; background: var(--panel); border-bottom: 1px solid var(--border); }
.chat-tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.det-scroll { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg, #f0f2f5); }
.det-scroll .detail-sec { background: var(--panel); }
.win-badge { flex: none; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.win-green { background: #e3f4e7; color: #1a7f37; }
.win-orange { background: #fff3e0; color: #b26a00; }
.win-red { background: #ffe0e0; color: #c0392b; }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 65%; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 1px 1px rgba(0,0,0,.06); word-wrap: break-word; }
.bubble.in { background: var(--in); align-self: flex-start; }
.bubble.out { background: var(--out); align-self: flex-end; }
.bubble-text { display: block; }
.bubble-who { display: block; font-size: 11px; font-weight: 600; color: #075e54; margin-bottom: 2px; }   /* quem da equipe mandou */
.bubble-meta { display: block; text-align: right; font-size: 10px; color: #667781; margin-top: 2px; }
/* mídias na conversa (imagem, áudio, vídeo, documento) */
.media-link { display: block; }
.media-img { display: block; max-width: 240px; max-height: 300px; width: auto; height: auto;
  border-radius: 10px; cursor: pointer; object-fit: cover; }
.media-video { display: block; max-width: 260px; max-height: 320px; border-radius: 10px; background: #000; }
/* player de áudio estilo WhatsApp */
.wa-aud { display: flex; align-items: center; gap: 9px; min-width: 210px; max-width: 260px; padding: 2px 0; }
.wa-aud-btn { flex: none; width: 34px; height: 34px; border: none; border-radius: 50%;
  background: #00a884; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.wa-aud-btn .ic-pause { display: none; }
.wa-aud.playing .wa-aud-btn .ic-play { display: none; }
.wa-aud.playing .wa-aud-btn .ic-pause { display: block; }
.wa-aud-wave { position: relative; flex: 1; height: 26px; cursor: pointer; }
.wa-aud-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.wa-aud-bars i { flex: 1; min-width: 2px; border-radius: 2px; background: #c3ccd3; }
.wa-aud-on { clip-path: inset(0 100% 0 0); }
.wa-aud-on i { background: #53bdeb; }
.bubble.out .wa-aud-on i { background: #25a28a; }
.wa-aud-time { flex: none; font-size: 11px; color: #667781; min-width: 30px; text-align: right; }
/* barra de gravação de áudio no compositor */
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-top: 1px solid var(--border); }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e53935; animation: recpulse 1.1s infinite; }
@keyframes recpulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.rec-time { font-size: 14px; font-weight: 600; color: #1c1e21; font-variant-numeric: tabular-nums; }
.rec-hint { color: var(--muted); font-size: 13px; }
.rec-cancel, .rec-send { border: none; background: none; cursor: pointer; display: flex; align-items: center; padding: 6px; border-radius: 50%; }
.rec-cancel { color: #e53935; }
.rec-cancel:hover { background: #fde8e8; }
.rec-send { color: #fff; background: #00a884; }
.rec-send:hover { background: #029376; }
.media-audio { display: block; width: 240px; max-width: 100%; margin: 2px 0; }
.media-cap { margin-top: 5px; }
.media-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 180px;
  background: rgba(0,0,0,.05); border-radius: 10px; text-decoration: none; color: inherit; }
.media-doc:hover { background: rgba(0,0,0,.08); }
.media-doc-ico { display: flex; color: #0062c4; flex: none; }
.media-doc-name { font-size: 13px; font-weight: 600; word-break: break-word; }
/* template na conversa: cabeçalho, rodapé e botões (estilo WhatsApp) */
.bubble-header { display: block; font-weight: 700; margin-bottom: 4px; }
.bubble-footer { display: block; font-size: 12px; color: #667781; margin-top: 4px; }
.bubble-btns { margin: 8px -12px -8px; border-top: 1px solid rgba(0,0,0,.08); }
.bubble-btn { text-align: center; padding: 8px; color: #0062c4; font-weight: 600; font-size: 13px;
  border-top: 1px solid rgba(0,0,0,.06); }
.bubble-btn:first-child { border-top: none; }
/* respostas de formulário (Flow) na conversa */
.form-reply { min-width: 180px; }
.form-reply-title { font-weight: 700; margin-bottom: 6px; }
.fr-item { display: flex; flex-direction: column; padding: 5px 0; border-top: 1px solid rgba(0,0,0,.06); }
.fr-item .fr-q { font-size: 11px; color: #667781; }
.fr-item .fr-a { font-size: 14px; }
.tick { color: #667781; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 2px; }
.tick svg { display: block; }
.tick.read { color: #53bdeb; }
.tick.fail { color: #c0392b; font-weight: 700; }
.reply { display: flex; gap: 8px; align-items: center; padding: 12px 16px; background: var(--panel); border-top: 1px solid var(--border); }
.reply input[type=text], .reply #replyText { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 20px; font-size: 15px; }
.reply-hint { display: block; padding: 0 20px 10px; background: var(--panel); }
.tpl-picker { background: var(--panel); border-top: 1px solid var(--border); max-height: 220px; overflow-y: auto; padding: 8px 16px; }
.tpl-picker-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.tpl-pick-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 14px; }
.tpl-pick-item:hover { background: var(--bg); }
.tplvar-inp { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 14px; }

/* Listas / páginas */
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 4px; }
.page-head h1 { margin: 0; }
.small { font-size: 12px; }
.card.row { display: flex; align-items: center; justify-content: space-between; }
.row-actions { display: flex; gap: 8px; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #e4e6eb; color: #65676b; margin-left: 6px; font-weight: 600; }
.pill-green { background: #e3f4e7; color: #1a7f37; }
textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; }

/* Builder layout */
.builder { display: flex; gap: 20px; padding: 20px 16px 40px; max-width: 1240px; margin: 0 auto; align-items: flex-start; }
.builder-left { flex: 1; min-width: 0; }
.builder-right { width: 440px; position: sticky; top: 16px; }
.screen-card { margin-top: 14px; }
.add-screen-btn { margin: 18px 0 6px; }
.screen-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.q-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin: 8px 0; background: #fafafa; }
.q-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-row select { padding: 6px; border-radius: 6px; border: 1px solid var(--border); }
.q-card input, .q-card textarea { width: 100%; margin-top: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.chk { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.builder-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Preview (tabs + celular) */
.preview-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab { padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.tab.active { background: #1c1e21; color: #fff; border-color: #1c1e21; }
.json-preview { background: #0d1117; color: #c9d1d9; padding: 14px; border-radius: 12px; font-size: 11px;
  overflow: auto; max-height: 75vh; line-height: 1.4; }
/* moldura de celular (prévia de Flow em builder/flows) */
.phone { background: #111; border-radius: 28px; padding: 14px; max-height: 78vh; overflow-y: auto; }
.phone-screen { background: #e5ddd5; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
/* iPhone 16 — tela cheia do WhatsApp (prévia de template) */
.iphone { position: relative; width: 300px; height: 620px; background: #000; border-radius: 48px;
  padding: 11px; margin: 0 auto; box-shadow: 0 16px 40px rgba(0,0,0,.3); flex: none; box-sizing: border-box; }
.iphone-island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #000; border-radius: 16px; z-index: 5; }
.iphone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden;
  display: flex; flex-direction: column; background: #e1dad1; }
.wa-top { background: #008069; color: #fff; padding-top: 10px; }
.ios-statusbar { display: flex; align-items: center; justify-content: space-between;
  padding: 6px 24px 2px; font-size: 14px; font-weight: 600; }
.ios-statusbar .sb-time { letter-spacing: .3px; }
.ios-statusbar .sb-icons { display: inline-flex; align-items: center; gap: 5px; }
.ios-statusbar .sb-icons svg { fill: #fff; }
.ios-statusbar .sb-icons b { font-size: 12px; font-weight: 700; }
.wa-header-full { display: flex; align-items: center; gap: 8px; padding: 4px 12px 12px; }
.phone-back { font-size: 24px; line-height: 1; }
.phone-avatar { width: 32px; height: 32px; border-radius: 50%; background: #0c6b58; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.phone-name { display: flex; flex-direction: column; line-height: 1.15; }
.phone-name b { font-size: 15px; }
.phone-name span { font-size: 11px; opacity: .85; }
.wa-actions { margin-left: auto; display: inline-flex; gap: 16px; align-items: center; }
.wa-chat { flex: 1; overflow-y: auto; padding: 14px 10px; }
.wa-chat.wa-bg { background: var(--wa-wallpaper); background-size: 260px auto; }
.wa-inputbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 14px; background: #f0f2f5; }
.wa-inputbar .wa-plus { font-size: 22px; color: #54656f; width: 20px; text-align: center; }
.wa-inputbar .wa-inputfield { flex: 1; background: #fff; border-radius: 18px; padding: 9px 14px;
  color: #98a0a6; font-size: 14px; }
.wa-inputbar .wa-mic { width: 36px; height: 36px; border-radius: 50%; background: #008069;
  display: flex; align-items: center; justify-content: center; flex: none; }
/* Flow dentro do iPhone (folha do WhatsApp) */
.iphone-screen.flow-sheet { background: #fff; }
.flow-head { display: flex; align-items: center; gap: 10px; padding: 38px 16px 12px; background: #fff; border-bottom: 1px solid #ececec; }
.flow-head .flow-close { font-size: 17px; color: #333; width: 20px; cursor: pointer; }
.flow-dots { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; }
.flow-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7ccd4; }
.flow-dot.on { background: var(--green); width: 18px; border-radius: 4px; }
.flow-count { margin-left: 8px; font-size: 11px; color: #667781; }
.flow-next { cursor: pointer; }
/* setas de navegação do preview do Flow */
#flowModal .modal-box { max-width: 500px; }
.flow-stage { display: flex; align-items: center; justify-content: center; gap: 8px; padding-bottom: 6px; }
.flow-nav { width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer; flex: none;
  background: #fff; color: #333; font-size: 26px; line-height: 1; padding: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; }
.flow-nav:hover { background: #f0f2f5; }
.flow-nav:disabled { opacity: .3; cursor: default; box-shadow: none; }
.flow-head .flow-htitle { flex: 1; text-align: center; font-weight: 700; font-size: 15px; color: #111; }
.flow-head .flow-menu { color: #777; width: 20px; text-align: right; }
.flow-body { flex: 1; overflow-y: auto; background: #f0f2f5; padding: 14px; }
.flow-scr { margin-bottom: 8px; }
.ps-title { font-size: 11px; color: #667; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.ps-h { font-size: 17px; font-weight: 700; margin: 4px 0; }
.ps-sub { font-size: 15px; font-weight: 600; margin: 4px 0; }
.ps-body { font-size: 13px; color: #333; margin: 4px 0 10px; }
.ps-field { background: #fff; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.ps-field > span { font-size: 12px; font-weight: 600; color: #444; display: block; margin-bottom: 4px; }
.ps-input { color: #aaa; }
.ps-opt { font-size: 13px; color: #333; padding: 2px 0; }
.ps-btn { background: var(--green); color: #fff; text-align: center; padding: 10px; border-radius: 20px;
  font-weight: 600; font-size: 14px; margin-top: 10px; }

/* Templates */
.seg { display: inline-flex; background: #e4e6eb; border-radius: 8px; padding: 3px; margin-bottom: 12px; gap: 3px; }
.seg-btn { border: none; background: transparent; padding: 7px 16px; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #444; }
.seg-btn.active { background: #fff; color: #1c1e21; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.field-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.two-col { display: flex; gap: 12px; }
.two-col .field { flex: 1; }
select { padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }
.tpl-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pill-red { background: #ffe0e0; color: #c0392b; }
.wa-bubble { position: relative; background: #fff; border-radius: 8px; border-top-left-radius: 0;
  padding: 8px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.18); font-size: 14px; max-width: 85%; }
.wa-bubble::before { content: ''; position: absolute; top: 0; left: -8px; width: 8px; height: 13px;
  background: #fff; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.wa-header { font-weight: 700; margin-bottom: 6px; }
.wa-body { color: #111; line-height: 1.4; white-space: normal; }
.wa-footer { color: #667781; font-size: 12px; margin-top: 8px; }
.wa-btns { margin-top: 8px; border-top: 1px solid #eee; padding-top: 4px; }
.wa-btn { text-align: center; color: #00a5f4; font-weight: 600; padding: 8px; font-size: 14px; border-top: 1px solid #f0f0f0; }
.wa-media-ph { background: #e9eef5; color: #667781; text-align: center; padding: 26px 8px; border-radius: 6px; font-size: 13px; margin-bottom: 8px; }
.tpl-item { border-bottom: 1px solid var(--border); border-radius: 8px; padding: 0 8px; transition: background .13s; }
.tpl-item.tpl-active { background: #eaf1ff; box-shadow: inset 3px 0 0 #0062c4; }
.tpl-item .tpl-row { border-bottom: none; }
.tpl-preview { padding: 4px 0 14px; max-width: 360px; }

/* Caixa de Entrada em tabela (estilo Meta) */
.inbox-wrap { display: flex; height: 100vh; overflow-x: auto; }
.inbox-main { flex: 1; min-width: 460px; display: flex; flex-direction: column; background: var(--panel); }
.inbox-head { display: flex; align-items: center; gap: 24px; height: var(--head-h); flex: none; padding: 0 20px; border-bottom: 1px solid var(--border); }
.inbox-head h1 { margin: 0; font-size: var(--title-size); white-space: nowrap; flex: none; }
.inbox-tabs { display: flex; gap: 6px; }
.itab { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 8px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.itab:hover { background: var(--bg); }
.itab.active { background: rgba(0,0,0,.08); color: #1c1e21; }
.inbox-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.inbox-search { flex: 0 1 360px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px; }
/* filtros no cabeçalho, encostados à direita */
.head-filters { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 200px; }
.head-filters .inbox-search { flex: 1; min-width: 0; }
.inbox-toolbar.toolbar-right { justify-content: flex-end; padding-top: 8px; padding-bottom: 8px; }
.inbox-table-wrap { flex: 1; overflow: auto; }
.inbox-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inbox-table.fixed-cols { table-layout: fixed; }
.inbox-table.fixed-cols td, .inbox-table.fixed-cols th { overflow: hidden; text-overflow: ellipsis; }
.inbox-table.fixed-cols td.col-cfg-td, .inbox-table.fixed-cols th.col-cfg-th { overflow: visible; }
.inbox-table thead th { position: relative; }
.col-rz { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
.col-rz:hover, .col-rz.rzing { background: rgba(21,96,208,.28); }
.inbox-table thead th { text-align: left; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 1; white-space: nowrap; }
.inbox-row { cursor: pointer; border-bottom: 1px solid var(--border); }
.inbox-row:hover { background: #f5f7fb; }
.inbox-row td { padding: 10px 14px; white-space: nowrap; }
.inbox-row.unread td { font-weight: 600; }
.cell-name { display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #444; }
.rotulo { display: inline-block; background: #e4e6eb; color: #444; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-right: 4px; }

.detail-panel { width: 440px; flex: none; border-left: 1px solid var(--border); background: var(--panel); overflow-y: auto; display: flex; flex-direction: column; }
.detail-head { display: flex; align-items: center; gap: 10px; height: var(--head-h); padding: 0 16px; border-bottom: 1px solid var(--border); flex: none; }
.detail-head b { display: block; }
.head-call { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; flex: none;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; transition: background .13s; }
.head-call:hover { background: #1fb858; }
.detail-head .btn { margin-left: auto; }
.detail-tabs { display: flex; border-bottom: 1px solid var(--border); }
.dtab { flex: 1; border: none; background: transparent; padding: 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.dtab.active { color: #1c1e21; border-bottom-color: #1c1e21; }
.dconv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.messages-sm { flex: 1; overflow-y: auto; padding: 12px; background: var(--wa-wallpaper); background-size: var(--wa-wallpaper-size); display: flex; flex-direction: column; gap: 6px; }
/* Conversa de SDR (Evolution): texto + mídia + áudio funcionam; template/Flow não existem na Evolution */
.reply.evo .icon-btn[data-free] { display: none; }
.evo-media { max-width: 240px; max-height: 300px; border-radius: 8px; display: block; cursor: pointer; }
video.evo-media { cursor: default; }
.evo-aud { height: 38px; max-width: 240px; }
.evo-doc { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; padding: 4px 2px; }
.evo-doc span { text-decoration: underline; word-break: break-word; }
.evo-poll { min-width: 190px; }
.evo-poll-q { font-weight: 600; margin-bottom: 6px; }
.evo-poll-o { border: 1px solid rgba(0,0,0,.12); border-radius: 8px; padding: 7px 10px; margin-top: 5px; font-size: 13px; }
.reply-sm { padding: 10px 10px; gap: 2px; }
.reply-sm .icon-btn { padding: 5px; }
.reply-sm .icon-btn svg { width: 18px; height: 18px; }
.reply-sm #dReply { border-radius: 18px; flex: 1; min-width: 0; margin-left: 6px; margin-right: 6px; padding: 10px 14px; }
.reply-sm .btn { flex: none; }
.icon-btn { border: none; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: #555; display: flex; align-items: center; }
.icon-btn:hover { background: #f0f2f5; color: var(--green); }
.icon-btn svg { width: 20px; height: 20px; }
.win-bar { display: flex; justify-content: center; padding: 8px 12px 2px; background: transparent; }
.win-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 999px; box-shadow: 0 1px 1px rgba(11,20,26,.12); }
.win-bar.win-green .win-pill { background: #e3f4e7; color: #1a7f37; }
.win-bar.win-orange .win-pill { background: #fff3e0; color: #b26a00; }
.win-bar.win-red .win-pill { background: #ffe0e0; color: #c0392b; }
.detail-sec { padding: 18px 16px 20px; border-bottom: 8px solid var(--bg, #f0f2f5); }
.detail-sec select, .detail-sec input, .detail-sec textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.detail-sec .field-label { margin-bottom: 12px; }
.detail-sec .readonly-field { background: #f5f6f8; color: #333; cursor: default; resize: none; }
/* espaçamento uniforme entre campos empilhados */
.detail-sec .fields { display: flex; flex-direction: column; gap: 16px; }
.detail-sec .fld { display: flex; flex-direction: column; }
.detail-sec .fld .field-mini { margin-bottom: 5px; }
.origin-box { display: flex; flex-direction: column; gap: 8px; }
.origin-row { display: flex; flex-direction: column; gap: 2px; }
.origin-row .ok { font-size: 12px; color: var(--muted); font-weight: 600; }
.origin-row .ov { word-break: break-all; }
/* grade de 2 colunas e rótulos pequenos na ficha do lead */
.detail-sec .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-mini { display: block; font-size: 11px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 3px; }
/* financeiro: procedimentos */
.proc-row { position: relative; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 8px 8px; margin-bottom: 8px; }
.proc-row .proc-nome { width: 100%; margin-bottom: 6px; padding-right: 22px; }
.proc-row .proc-sub { display: flex; gap: 6px; }
.proc-row .proc-sub input { flex: 1; min-width: 0; }
.proc-del { position: absolute; top: 4px; right: 6px; border: none; background: transparent;
  color: var(--red, #dc2626); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px; }
.proc-total { margin-top: 8px; text-align: right; font-size: 14px; }
.proc-total b { color: var(--green); }
@media (max-width: 900px) { .detail-panel { display: none !important; } }

/* Seletor de número ativo (topo da sidebar) */
.num-picker { padding: 10px 14px 4px; }
.num-picker-lbl { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.num-picker select { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--panel, #fff); }
/* Lista de números na tela de Conexão */
.num-list { display: flex; flex-direction: column; gap: 8px; }
.num-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .grid3, .card .grid2 { grid-template-columns: 1fr; } }

/* Construtor visual de fluxo (chatbot) */
.fb-wrap { display: flex; flex-direction: column; height: 100vh; }
.fb-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.fb-name { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; }
.fb-top select, .fb-top input { padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.fb-spacer { flex: 1; }
.fb-body { flex: 1; display: flex; min-height: 0; }
.fb-canvas { flex: 1; position: relative; overflow: auto; background: #eef1f6;
  background-image: radial-gradient(#d5dae2 1px, transparent 1px); background-size: 20px 20px; }
.fb-canvas.connecting { cursor: crosshair; }
.fb-edges { position: absolute; inset: 0; width: 3000px; height: 2000px; pointer-events: none; }
/* bolinha conectada: preenchida (clique nela para desconectar) */
.fb-handle.connected { background: var(--green); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--green); }
.fb-handle.connected:hover { background: #dc2626; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dc2626; }
.fb-node { position: absolute; width: 210px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.1); z-index: 1; }
.fb-node-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; cursor: move; border-radius: 10px 10px 0 0; }
.fb-trigger .fb-node-head { background: #e3f4e7; color: #1a7f37; }
.fb-message .fb-node-head { background: #e7f0fd; color: var(--green); }
.fb-wait .fb-node-head { background: #fff3e0; color: #b26a00; }
.fb-end .fb-node-head { background: #ffe0e0; color: #c0392b; }
.fb-tag_in .fb-node-head { background: #ede7fb; color: #6c3fd1; }
.fb-tag_out .fb-node-head { background: #e6f7f1; color: #0a7c58; }
.fb-delay .fb-node-head { background: #eef1f6; color: #445; }
.fb-schedule .fb-node-head { background: #fff3e0; color: #b26a00; }
/* pílulas de dias da semana (Agendamento) */
.dow-row { display: flex; flex-wrap: wrap; gap: 5px; }
.dow-chip { padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; cursor: pointer; user-select: none; }
.dow-chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.fb-node-body { padding: 10px; font-size: 13px; color: #333; cursor: pointer; min-height: 18px; white-space: pre-line; word-break: break-word; }
/* caixinha de status estilo SellFlux: 3 segmentos (aguardando · passou · falha) */
.fb-stat { display: flex; gap: 4px; padding: 6px 10px 8px; border-top: 1px dashed var(--border); background: #fafbfc; }
.fb-stat .seg { flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; height: 22px; border-radius: 5px; }
/* Página de lista de fluxos (resumo das campanhas) */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; margin-top: 14px; }
.flow-card { border: 1px solid var(--border); border-radius: 12px; background: var(--panel, #fff); padding: 16px;
  display: flex; flex-direction: column; }
.flow-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.flow-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.flow-badge.on { background: #e3f4e7; color: #1a7f37; }
.flow-badge.off { background: #f0f2f5; color: #667781; }
.flow-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.metric { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 10px; }
.metric .m-num { font-size: 22px; font-weight: 800; line-height: 1; }
.metric .m-lbl { font-size: 11px; opacity: .85; }
.metric .m-pct { font-size: 11px; font-weight: 700; opacity: .9; }
.metric.m-in { background: #e3f4e7; color: #1a7f37; }       /* Entraram — verde */
.metric.m-act { background: #ffe8cc; color: #c76a00; }      /* Interagiram — laranja */
.metric.m-out { background: #fdf0d5; color: #9a6a00; }      /* Saíram — amarelo */
.metric.m-fail { background: #fde8e8; color: #c0392b; }     /* Falharam — vermelho */
@media (max-width: 460px){ .flow-metrics { grid-template-columns: 1fr 1fr; } }
.flow-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.flow-card-actions .btn { white-space: nowrap; }
.flow-card-actions .btn-sm { padding: 7px 14px; }
.fb-stat .seg-wait { background: #eab308; }   /* amarelo — aguardando */
.fb-stat .seg-ok   { background: #16a34a; }   /* verde — passaram */
.fb-stat .seg-fail { background: #dc2626; }   /* vermelho — falhas */
.fb-outs { border-top: 1px dashed var(--border); }
.fb-out { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px; font-size: 12px; color: #667781; }
.fb-handle { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--green); cursor: crosshair; flex: none; margin-left: 8px; }
.fb-handle:hover { background: var(--green); box-shadow: 0 0 0 4px rgba(47,107,237,.2); }
/* bolinha de saída única: no meio da lateral direita, pro fio sair reto */
.fb-handle-side { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); margin-left: 0; z-index: 2; }
.fb-del { cursor: pointer; color: #c0392b; }
.fb-cfg { width: 320px; border-left: 1px solid var(--border); background: var(--panel); overflow-y: auto; padding: 14px; flex: none; }
.cfg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fb-cfg textarea, .fb-cfg input, .fb-cfg select { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; }

/* Paleta de blocos (lateral direita recolhível) */
.fb-palette { position: relative; width: 240px; border-left: 1px solid var(--border); background: var(--panel);
  overflow: visible; flex: none; transition: width .18s ease; }
.fb-pal-toggle { position: absolute; top: 16px; left: -15px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: #51607a; cursor: pointer; z-index: 8;
  display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.16); transition: background .15s; }
.fb-pal-toggle:hover { background: #eaf1ff; color: #0062c4; }
.fb-pal-inner { padding: 22px 16px; overflow-y: auto; max-height: 100%; }
.fb-pal-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: #8a93a6; margin: 0 0 16px 2px; }
.fb-pal-list { display: flex; flex-direction: column; gap: 12px; }
.fb-pal-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #f0f2f5; border: none; border-radius: 10px;
  padding: 13px 14px; font-size: 14px; font-weight: 600; color: #1c1e21;
  transition: background .13s, transform .05s; }
.fb-pal-btn:hover { background: #e6eaf0; }
.fb-pal-btn:active { transform: translateY(1px); }
.fb-pal-btn .pal-svg { width: 19px; height: 19px; flex: none; }
.fb-pal-tag_in   .pal-svg { color: #6c3fd1; }
.fb-pal-message  .pal-svg { color: #0062c4; }
.fb-pal-delay    .pal-svg { color: #8a93a6; }
.fb-pal-schedule .pal-svg { color: #b26a00; }
.fb-pal-wait     .pal-svg { color: #b26a00; }
.fb-pal-tag_out  .pal-svg { color: #0a7c58; }
.fb-pal-end      .pal-svg { color: #c0392b; }
.fb-palette.collapsed { width: 30px; }
.fb-palette.collapsed .fb-pal-inner { display: none; }
/* ícone SVG dentro do cabeçalho do bloco no canvas */
.fb-node-head .pal-svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }

/* Modal (visualizar Flow) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 420px; max-height: 92vh;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--border); }
.modal-box .phone { margin: 16px; overflow-y: auto; }

/* Disparos */
input[type=file] { margin: 8px 0; }
.preview-table { overflow-x: auto; margin-top: 12px; }
.preview-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table th, .preview-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.preview-table th { background: #f5f6f6; }
.var-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.var-row select, .var-row input { padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.progress { background: #eee; border-radius: 999px; height: 16px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { background: var(--green); height: 100%; width: 0; transition: width .4s; }
.recip-cols { display: flex; gap: 16px; margin-top: 14px; }
.recip-col { flex: 1; min-width: 0; }
.recip-head { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.recip-head.ok { color: var(--green-dark); }
.recip-head.err { color: #c0392b; }
.recip-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.recip-line { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--border); font-size: 13px; }
.recip-line:last-child { border-bottom: none; }
.recip-err { color: #c0392b; font-size: 12px; text-align: right; }
@media (max-width: 700px) { .recip-cols { flex-direction: column; } }

@media (max-width: 860px) {
  .builder { flex-direction: column; }
  .builder-right { width: 100%; position: static; }
  .two-col { flex-direction: column; }
}

/* Histórico do fluxo (quem respondeu qual opção e quando) */
#histModal .modal-box { max-width: 680px; }
.hist-filter { display: flex; gap: 8px; padding: 12px 18px 0; flex-wrap: wrap; }
.hist-chip { border: 1px solid #d7dce3; background: #fff; color: #51607a;
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.hist-chip.on { background: #2f6df6; border-color: #2f6df6; color: #fff; }
.hist-body { padding: 12px 18px 18px; overflow-y: auto; max-height: 70vh; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist-table th { text-align: left; color: #8a93a6; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; padding: 6px 8px; border-bottom: 1px solid #eceff3; }
.hist-table td { padding: 10px 8px; border-bottom: 1px solid #f1f3f7; vertical-align: top; }
.hist-when { white-space: nowrap; color: #51607a; }
.hist-opt { background: #eaf1ff; color: #1b4fc0; padding: 3px 10px; border-radius: 6px;
  font-weight: 600; display: inline-block; }
.hist-done { color: #13864a; font-weight: 600; }
.hist-in { color: #51607a; }

/* Ligações (registro manual na ficha do lead) */
.call-dial { display: inline-flex; align-items: center; }
.call-dial-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.call-reg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.call-reg select, .call-reg input { padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; }
.call-reg select { flex: none; }
.call-reg input { flex: 1; min-width: 120px; }
.call-list { display: flex; flex-direction: column; gap: 6px; }
.call-count { margin-bottom: 2px; }
.call-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; }
.call-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; background: #eef1f5; color: #51607a; }
.call-badge.ok { background: #e3f4e7; color: #1a7f37; }
.call-badge.warn { background: #fdf0d5; color: #9a6a00; }
.call-badge.bad { background: #fde8e8; color: #c0392b; }
.call-info { flex: 1; min-width: 0; }
.call-when { font-size: 12px; color: #51607a; }
.call-note { font-size: 13px; color: #1c1e21; margin-top: 2px; word-break: break-word; }
.call-del { border: none; background: none; color: #b0b8c4; cursor: pointer; font-size: 13px; padding: 0 2px; }
.call-del:hover { color: #c0392b; }
.call-item-body { flex: 1; min-width: 0; }

/* Sub-nav CRM | Ligações | WhatsApp (com badges): só ícone + nome; a aba ativa fica preta */
.lead-subnav { display: flex; gap: 4px; margin-left: 24px; flex-wrap: nowrap; }
.lsub { position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 10px; border-radius: 8px; color: #8a93a6;
  font-weight: 600; font-size: 14px; text-decoration: none; }
.lsub:hover { color: #3b4a54; }
.lsub.active { color: #111b21; }
.nbadge { display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e53935; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

/* Central de Ligações */
.date-inp { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 13px; font-family: inherit; }
.calls-table-wrap { flex: 1; min-height: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tag-ok { background: #e3f4e7; color: #1a7f37; }
.tag-no { background: #f1f3f5; color: #8a94a6; }
.perm-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.perm-sim { background: #e3f4e7; color: #1a7f37; }
.perm-nao { background: #fde8e8; color: #c0392b; }
.perm-aguard { background: #fff3e0; color: #b26a00; }
.perm-exp { background: #f1f3f5; color: #8a94a6; }
.perm-none { background: #f1f3f5; color: #aab2bf; }
.res-sel { border: 1px solid var(--border); border-radius: 7px; padding: 5px 7px; font-size: 13px; font-family: inherit; background: #fff; }

/* Gráfico analítico */

/* Atendedor global de ligações */
.call-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.call-card { background: var(--panel,#fff); border-radius: 18px; padding: 30px 28px; width: 100%; max-width: 340px;
  text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.call-pic { width: 72px; height: 72px; border-radius: 50%; background: #111b21; color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; animation: callpulse 1.3s ease-out infinite; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 rgba(17,27,33,.45); } 70% { box-shadow: 0 0 0 16px rgba(17,27,33,0); } 100% { box-shadow: 0 0 0 0 rgba(17,27,33,0); } }
.call-title { font-size: 13px; color: #8a93a6; text-transform: uppercase; letter-spacing: .4px; }
.call-name { font-size: 21px; font-weight: 700; margin: 4px 0 2px; color: var(--fg,#1c1e21); }
.call-num { font-size: 14px; color: #667781; margin-bottom: 22px; }
.call-btns { display: flex; gap: 12px; justify-content: center; }
.call-btns button { border: none; border-radius: 10px; padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer; }
.call-answer { background: #111b21; color: #fff; }
.call-answer:hover { background: #000; }
.call-reject { background: #fff; color: #111b21; border: 1.5px solid #111b21; }
.call-reject:hover { background: #111b21; color: #fff; }
/* Pop-up arrastável da ligação em andamento */
.call-pop { position: fixed; top: 20px; right: 20px; z-index: 1000; width: 244px;
  background: #0b3d2e; color: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
  padding: 16px 14px 14px; text-align: center; user-select: none; }
.ccp-head { cursor: grab; touch-action: none; }
.ccp-head:active { cursor: grabbing; }
.ccp-avatar { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; background: #737373;
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ccp-name { font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccp-status { font-size: 12px; opacity: .7; margin-top: 2px; text-transform: lowercase; }
.ccp-timer { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; margin-top: 6px; letter-spacing: .5px; }
.ccp-vol { display: flex; align-items: center; gap: 8px; margin: 12px 4px 2px; color: #cfe6dc; }
.ccp-vol input[type=range] { flex: 1; accent-color: #25D366; }
.ccp-btns { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.ccp-btn { width: 37px; height: 37px; flex: none; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; }
.ccp-btn svg { width: 18px; height: 18px; }
.ccp-btn:hover { background: rgba(255,255,255,.22); }
.ccp-btn.on { background: #fff; color: #0b3d2e; }
.ccp-end { background: #e5484d; }
.ccp-end:hover { background: #d13b40; }

/* Cartão do pedido de permissão de ligação (na conversa) */
.perm-card { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.08); }
.perm-ico { width: 26px; height: 26px; border-radius: 50%; background: #e8f5ee; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.perm-txt { font-size: 13px; font-weight: 600; color: #1c1e21; }

/* Bolha de "Ligação de voz" na conversa (estilo WhatsApp) */
.call-log { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.call-log .cl-ico { width: 34px; height: 34px; border-radius: 50%; background: #e3f4e7; color: #1a7f37;
  display: flex; align-items: center; justify-content: center; flex: none; }
.call-log.missed .cl-ico { background: #fde8e8; color: #c0392b; }
.call-log .cl-title { font-size: 14px; font-weight: 600; color: #1c1e21; line-height: 1.2; }
.call-log .cl-sub { font-size: 12px; color: #667781; display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.call-log.missed .cl-sub { color: #c0392b; }
.call-log .cl-arrow { display: inline-flex; }

/* Abas Registro / Transcrições (ligações na ficha) */
.call-tabs { display: flex; gap: 6px; margin: 10px 0 10px; }
.call-tab { border: none; background: #eef1f5; color: #51607a; border-radius: 999px;
  padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.call-tab.active { background: #1c1e21; color: #fff; }
/* cabeçalho da seção com ação à direita (ex: Ligações + ícone de ligar) */
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec-head-row .head-call { margin-left: auto; }
/* abas discretas (underline) — Registro | Transcrições */
.subtabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.subtab { border: none; background: none; padding: 7px 2px; margin-bottom: -1px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #8a93a6; border-bottom: 2px solid transparent; }
.subtab:hover { color: #51607a; }
.subtab.active { color: #1c1e21; border-bottom-color: #1c1e21; }
.src-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: #51607a; white-space: nowrap; }
/* painéis em cascata da Central de Ligações (mesma largura do painel do CRM) */
.lig-panel { width: 440px; }
.call-item.clickable { cursor: pointer; }
.call-item.clickable:hover { background: #eef3f7; }
.name-click { cursor: pointer; }
.name-click:hover span, .name-click:hover b { text-decoration: underline; }
.calls-body { margin-top: 4px; }
.calls-body .call-reg { margin-bottom: 16px; }
.trans-select { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.trans-text { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fafbfc; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; min-height: 60px; }
.trans-text.muted { color: #8a93a6; }

/* ---------- BI de Ligações ---------- */
.bi-body { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg, #f0f2f5); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.bi-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .bi-kpis { grid-template-columns: repeat(2, 1fr); } }
.bi-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.bi-kpi-lbl { font-size: 12px; font-weight: 600; color: #51607a; text-transform: uppercase; letter-spacing: .03em; }
.bi-kpi-val { font-size: 28px; font-weight: 700; color: #1c1e21; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.bi-kpi-sub { font-size: 13px; color: #6b7487; }
.bi-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 18px; min-width: 0; }
.bi-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bi-card-head h2 { font-size: 16px; margin: 0; color: #1c1e21; }
.bi-sub { font-size: 13px; color: #6b7487; margin-top: 3px; }
.bi-sub b { color: #1c1e21; }
.bi-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.bi-divider { height: 1px; background: var(--border); margin: 18px 0 16px; }
.bi-chart { width: 100%; }
.bi-svg { width: 100%; height: auto; display: block; overflow: visible; }
.bi-svg .bi-grid { stroke: #eceff3; stroke-width: 1; }
.bi-svg .bi-base { stroke: #c9ced6; stroke-width: 1; }
.bi-svg .bi-axis { fill: #8a93a6; font-size: 11px; font-variant-numeric: tabular-nums; }
.bi-svg .bi-cross { stroke: #9aa3b2; stroke-width: 1; stroke-dasharray: 3 3; }
.bi-svg .vb { transition: opacity .12s; }
.bi-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.bi-leg { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); font-size: 13px; font-weight: 600; color: #1c1e21; cursor: pointer; font-family: inherit; }
.bi-leg.off { opacity: .4; }
.bi-leg-key, .bi-key-inline { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bi-key-inline { margin-left: 4px; vertical-align: -1px; }
.hb-list { display: flex; flex-direction: column; gap: 12px; }
.hb-row { cursor: default; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.hb-lbl { color: #1c1e21; font-weight: 600; }
.hb-val { color: #1c1e21; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-track { height: 12px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 0 4px 4px 0; transition: width .3s; }
.bi-table-toggle { margin-top: 10px; }
.bi-table-toggle summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #51607a; }
.bi-table-wrap { overflow-x: auto; max-height: 360px; overflow-y: auto; }
.bi-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bi-table th { text-align: left; color: #6b7487; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
.bi-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; color: #1c1e21; }
.bi-lead { display: flex; flex-direction: column; }
.bi-lead .mono { font-size: 11px; }
.bi-tip { position: fixed; z-index: 1000; pointer-events: none; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 10px 12px; font-size: 13px; min-width: 170px; }
.bi-tip .tip-title { font-weight: 700; margin-bottom: 6px; color: #1c1e21; }
.bi-tip .tip-row { display: flex; align-items: center; gap: 8px; color: #51607a; padding: 1px 0; }
.bi-tip .tip-row b { margin-left: auto; color: #1c1e21; font-variant-numeric: tabular-nums; }
.bi-tip .tip-key { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- Disparos: prévia no iPhone + histórico ---------- */
.wa-media-img { display: block; width: 100%; border-radius: 6px; margin-bottom: 8px; max-height: 220px; object-fit: cover; }
.wa-meta { text-align: right; font-size: 11px; color: #667781; margin-top: 2px; }
.wa-tick { letter-spacing: -3px; margin-left: 3px; color: #8696a0; }
.wa-tick.read { color: #53bdeb; }
.wa-bubble.wa-failed { opacity: .75; }
.wa-bubble.wa-failed .wa-meta::after { content: ' ⚠'; color: #e34948; }
.pv-bar { align-items: center; justify-content: space-between; }
#pvTitle { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pv-nav .icon-btn { font-size: 22px; line-height: 1; padding: 2px 8px; }
.pv-who { font-size: 13px; font-weight: 600; color: #1c1e21; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-note { text-align: center; margin-top: 12px; min-height: 20px; }
.cd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cd-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cd-kpi { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cd-kpi-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6b7487; }
.cd-kpi-val { font-size: 22px; font-weight: 700; color: #1c1e21; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cd-kpi-pct { font-size: 13px; font-weight: 600; color: #51607a; }
.cd-kpi.bad .cd-kpi-pct { color: #c0392b; }
.cd-bar { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; background: #f0f2f5; margin-top: 14px; }
.cd-bar-sm { height: 7px; margin: 8px 0 6px; }
.cd-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-top: 8px; color: #1c1e21; }
.cd-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cd-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cd-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; }
.cd-tools .inbox-search { flex: 0 1 240px; }
.cd-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600;
  color: #51607a; cursor: pointer; font-family: inherit; }
.cd-chip.active { background: #1c1e21; border-color: #1c1e21; color: #fff; }
.cd-table-wrap { max-height: 360px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.cd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cd-table th { text-align: left; color: #6b7487; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; }
.cd-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.cd-table td:last-child { white-space: normal; }
.cd-table tbody tr { cursor: pointer; }
.cd-table tbody tr:hover { background: #f5f7fb; }
.cd-table tbody tr.active { background: #eaf1ff; box-shadow: inset 3px 0 0 #0062c4; }
.cd-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.cd-lida { background: #dbe9fb; color: #1c5cab; }
.cd-entregue { background: #eaf2fd; color: #256abf; }
.cd-enviada { background: #eef1f5; color: #51607a; }
.cd-pendente { background: #f4f5f7; color: #8a93a6; }
.cd-falha { background: #ffe0e0; color: #c0392b; }
.camp-row { padding: 12px 10px; border-bottom: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: background .13s; }
.camp-row:hover { background: #f5f7fb; }
.camp-row.active { background: #eaf1ff; box-shadow: inset 3px 0 0 #0062c4; }
.camp-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.camp-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #51607a; align-items: center; }
.camp-stats .pill { margin-left: 0; }
@media (max-width: 1100px) { .cd-kpis { grid-template-columns: repeat(3, 1fr); } }

/* Conversa do WhatsApp aberta por cima da tela durante a ligação (não derruba a chamada) */
.wa-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 900; background: var(--panel);
  display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
.wa-ov-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--border); flex: none; }
.wa-ov-bar span { color: var(--muted); font-size: 14px; }
.wa-ov-bar .btn { margin-left: auto; }
.wa-overlay iframe { flex: 1; width: 100%; border: 0; }
html.x4-embed .x4m-float { display: none; }
html.x4-in-nv .x4-navfoot { display: none !important; }   /* Nova versão: a faixa de ícones já faz o papel do rodapé */
html.x4-embed body:has(main) { padding-left: 0; }
html.x4-embed .chat-layout { height: 100vh; }

/* motivo da falha embaixo da mensagem não entregue */
.bubble-fail { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(192,57,43,.2); font-size: 12px; color: #c0392b; line-height: 1.35; }

/* CRM: cabeçalho da ficha (nome + abas) fixo; só o conteúdo da aba Detalhes rola */
#detailPanel { overflow: hidden; }
#detailPanel #dDet { flex: 1; min-height: 0; overflow-y: auto; }

/* menu dos três pontinhos da lista de conversas (estilo WhatsApp) */
.conv-menu-wrap { position: relative; }
.conv-menu { position: absolute; top: 42px; right: 0; z-index: 50; min-width: 230px; padding: 8px 0; background: #fff;
  border-radius: 12px; box-shadow: 0 4px 24px rgba(11,20,26,.18), 0 1px 3px rgba(11,20,26,.08); }
.conv-menu a, .conv-menu .soon { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 20px; font-size: 14.5px; color: #3b4a54; text-decoration: none; white-space: nowrap; }
.conv-menu a:hover { background: #f5f6f6; }
.conv-menu .soon { color: #a3adb5; cursor: default; }
.conv-menu .soon em { font-style: normal; font-size: 11px; font-weight: 600; background: #f0f2f5; color: #8a93a6; padding: 2px 7px; border-radius: 999px; }

/* WhatsApp: busca de conversas + filtros por lista */
.conv-header { flex: none; }
.conv-tools { flex: none; padding: 10px 12px 8px; border-bottom: 1px solid var(--border); }
.conv-search { display: flex; align-items: center; gap: 8px; background: #f0f2f5; border-radius: 20px; padding: 0 14px; color: #8a93a6; }
.conv-search input { flex: 1; border: none; background: transparent; padding: 9px 0; font-size: 14px; outline: none; color: #1c1e21; font-family: inherit; }
.conv-search:focus-within { background: #fff; box-shadow: 0 0 0 1.5px #25d366 inset; }
.conv-chips { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.conv-chips::-webkit-scrollbar { display: none; }
.conv-chip { flex: none; border: 1px solid var(--border); background: #fff; color: #54656f; border-radius: 999px; padding: 6px 13px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.conv-chip span { font-weight: 500; color: #8a93a6; margin-left: 2px; }
.conv-chip:hover { background: #f5f6f6; }
.conv-chip.active { background: #d9fdd3; border-color: #d9fdd3; color: #0a5c36; }
.conv-chip.active span { color: #0a5c36; }
.conv-item.active { background: #f0f2f5; }
/* topo da conversa: janela à esquerda, ligar + lupa à direita */
.chat-who { flex: 0 1 auto; min-width: 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.conv-icon-btn.on { background: #eef1f5; color: #0062c4; }
.msg-search { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.msg-search input { flex: 1; min-width: 0; border: none; background: #f0f2f5; border-radius: 18px; padding: 9px 14px; font-size: 14px; outline: none; font-family: inherit; }
.msg-search .muted { white-space: nowrap; min-width: 84px; text-align: right; }
mark.msg-hit { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }
mark.msg-hit.current { background: #ffd23f; }

/* Bolinha da janela de 24h, cores vivas e pulsando (verde aberta, amarela encerrando, vermelha fechada) */
.win-dot { --c: #00e05a; position: relative; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.win-dot.closing { --c: #ffc400; }
.win-dot.closed { --c: #ff1f3d; }
.win-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: win-pulse 1.6s ease-out infinite; }
@keyframes win-pulse { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .win-dot::after { animation: none; } }
/* na lista: bolinha no canto de baixo da inicial do lead (como selo de app) */
.avatar-wrap { position: relative; flex: none; }
.avatar-wrap .win-dot { position: absolute; right: 1px; bottom: 1px; width: 8px; height: 8px; box-shadow: 0 0 0 1.5px var(--panel); }
.win-badge { display: inline-flex; align-items: center; gap: 7px; }
.conv-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.conv-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-chip { display: inline-flex; align-items: center; gap: 6px; }
.chip-sep { flex: none; width: 1px; background: var(--border); margin: 4px 2px; }

/* títulos de todas as abas no mesmo tamanho do "WhatsApp" */
main h1, .page-head h1 { font-size: var(--title-size); font-weight: 700; }

/* bolinha da janela também nos avatares pequenos (tabelas do CRM e Ligações) e no topo */
.avatar-wrap .avatar-sm + .win-dot { width: 6px; height: 6px; right: 0; bottom: 0; box-shadow: 0 0 0 1.5px var(--panel); }
.chat-top .avatar-wrap, .detail-head .avatar-wrap { display: inline-flex; }

/* aviso da janela de 24h: "nuvenzinha" suspensa embaixo do nome (aparece, some, volta) */
#chatView { position: relative; }
.win-cloud { position: absolute; top: calc(var(--head-h) + 10px); left: 16px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(11,20,26,.16);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .35s, transform .35s; }
.win-cloud::before { content: ''; position: absolute; top: -6px; left: 16px; width: 12px; height: 12px;
  background: inherit; transform: rotate(45deg); border-radius: 2px; }
.win-cloud.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.win-cloud.win-green { background: #e3f4e7; color: #146c2e; }
.win-cloud.win-orange { background: #fff4d6; color: #8a5a00; }
.win-cloud.win-red { background: #ffe3e6; color: #b3132b; }

/* botão de enviar redondo preto com ícone branco (igual ao WhatsApp) */
.send-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: #111b21; color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .1s; }
.send-btn:hover { background: #2a3942; }
.send-btn:active { transform: scale(.94); }
.send-btn svg { margin-left: 2px; }
.send-btn-sm { width: 36px; height: 36px; }

/* linha de filtros fina (mesma altura da linha "Não lidas" do CRM) */
.toolbar-right { min-height: 37px; }
.toolbar-right .date-inp { padding: 3px 6px; font-size: 13px; height: 28px; }
.toolbar-right .btn-sm { padding: 4px 10px; height: 28px; }

/* balão de aviso (ação bloqueada): aparece perto do botão e some sozinho */
.x4-toast { position: fixed; z-index: 2000; max-width: 320px; padding: 10px 14px; border-radius: 12px; background: #111b21; color: #fff;
  font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.22); opacity: 0; transform: translateY(4px);
  transition: opacity .25s, transform .25s; pointer-events: none; }
.x4-toast.show { opacity: 1; transform: translateY(0); }
.x4-toast::after { content: ''; position: absolute; left: calc(var(--tail-x, 50%) - 6px); bottom: -6px; width: 12px; height: 12px;
  background: inherit; transform: rotate(45deg); border-radius: 2px; }
.x4-toast.below::after { bottom: auto; top: -6px; }

/* campo de mensagem travado (janela fechada) */
.reply.locked input:not([type=file]) { background: #f0f2f5; color: #8a93a6; cursor: not-allowed; }
.reply.locked .icon-btn, .reply.locked .send-btn { opacity: .35; cursor: not-allowed; }

/* player de áudio: bolinha que anda pela onda (arrastar pra voltar/adiantar) */
.wa-aud-wave { touch-action: none; }
.wa-aud-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #53bdeb; box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none; transition: transform .12s; }
.bubble.out .wa-aud-knob { background: #25a28a; }
.wa-aud.seeking .wa-aud-knob, .wa-aud-wave:hover .wa-aud-knob { transform: scale(1.25); }

/* linha do lead com o painel aberto */
.inbox-row.selected { background: #eef3fb; box-shadow: inset 3px 0 0 #111b21; }

/* ---------- filtro "Data" com calendário compacto e suspenso ---------- */
.x4df { display: inline-flex; align-items: center; gap: 2px; }
.x4df-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; color: #51607a;
  border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.x4df-btn:hover { background: #f5f6f6; }
.x4df-btn.on { background: #111b21; border-color: #111b21; color: #fff; }
.x4df-clear { border: none; background: transparent; color: #8a93a6; cursor: pointer; font-size: 12px; padding: 4px 6px; border-radius: 50%; }
.x4df-clear:hover { background: #f0f2f5; color: #1c1e21; }
.x4df-pop { position: fixed; z-index: 1500; width: 252px; padding: 10px 10px 8px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 32px rgba(11,20,26,.2), 0 1px 3px rgba(11,20,26,.08); font-size: 13px; }
.x4df-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.x4df-head b { text-transform: capitalize; font-size: 13px; color: #1c1e21; }
.x4df-head button { border: none; background: transparent; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; color: #51607a; cursor: pointer; }
.x4df-head button:hover { background: #f0f2f5; }
.x4df-week, .x4df-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.x4df-week span { font-size: 11px; font-weight: 700; color: #8a93a6; padding: 2px 0 4px; }
.x4df-day { position: relative; height: 30px; border: none; background: transparent; border-radius: 8px; font-size: 13px;
  color: #1c1e21; cursor: pointer; font-family: inherit; }
.x4df-day:hover { background: #f0f2f5; }
.x4df-day.today { font-weight: 800; color: #0062c4; }
.x4df-day.has::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #25d366; }
.x4df-day.sel { background: #e9edef; border-radius: 0; }
.x4df-day.start, .x4df-day.end { background: #111b21; color: #fff; border-radius: 8px; }
.x4df-day.start.has::after, .x4df-day.end.has::after { background: #fff; }
.x4df-foot { display: flex; justify-content: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f2f5;
  color: #51607a; text-align: center; font-size: 12px; line-height: 1.35; }
.x4df-foot span { color: #8a93a6; }
.x4df-foot button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px;
  font-weight: 600; color: #51607a; cursor: pointer; font-family: inherit; }
.x4df-foot button:hover { background: #f5f6f6; }

/* ícones da ligação: fone = gravação, texto = transcrição */
.call-icos { margin-left: auto; display: inline-flex; gap: 8px; color: #54656f; align-self: center; }
.call-ico { display: inline-flex; }
.call-ico.pending { color: #8a93a6; animation: ico-blink 1.2s ease-in-out infinite; }
@keyframes ico-blink { 50% { opacity: .3; } }

/* ---------- Reações nas mensagens (igual ao WhatsApp) ---------- */
.bubble { position: relative; }
.bubble.has-rx { margin-bottom: 12px; }
.rx-badges { position: absolute; bottom: -13px; left: 10px; background: #fff; border-radius: 999px; padding: 1px 6px;
  font-size: 13px; line-height: 20px; box-shadow: 0 1px 3px rgba(11,20,26,.18); white-space: nowrap; color: #54656f; }
.bubble.out .rx-badges { left: auto; right: 10px; }
.rx-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: #54656f; box-shadow: 0 1px 3px rgba(11,20,26,.18); display: flex; align-items: center;
  justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.bubble.in .rx-btn { right: -36px; }
.bubble.out .rx-btn { left: -36px; }
.bubble:hover .rx-btn, .rx-btn:focus-visible { opacity: 1; }
.rx-btn:hover { color: #111b21; }
.rx-picker { position: fixed; z-index: 1600; display: flex; gap: 2px; padding: 5px 7px; background: #fff; border-radius: 999px;
  box-shadow: 0 6px 24px rgba(11,20,26,.2); animation: rx-in .14s ease-out; }
.rx-picker button { width: 38px; height: 38px; border: none; background: transparent; border-radius: 50%; font-size: 22px; cursor: pointer;
  transition: transform .12s, background .12s; }
.rx-picker button:hover { transform: scale(1.22); }
.rx-picker button.on { background: #e9edef; }
@keyframes rx-in { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =================== BI (estilo clean: cinza claro → preto, fundo claro) =================== */
.bi2 { display: grid; grid-template-columns: 210px minmax(0, 1fr) 320px; height: 100vh; background: var(--panel); }
.bi2-nav { border-right: 1px solid var(--border); padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.bi2-nav-title, .x4-secnav-title { height: var(--head-h); display: flex; align-items: center; padding: 0 10px; font-size: var(--title-size); font-weight: 700;
  border-bottom: 1px solid var(--border); margin: 0 -10px 10px; padding-left: 20px; }
.bi2-nav a, .x4-secnav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #667781; text-decoration: none;
  font-size: 14px; font-weight: 600; }
.bi2-nav a:hover, .x4-secnav a:hover { background: #f5f6f6; color: #111b21; }
.bi2-nav a.on, .x4-secnav a.on { background: #f0f2f5; color: #111b21; }
.bi2-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bi2-head { height: var(--head-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 28px; border-bottom: 1px solid var(--border); }
.bi2-head h1 { margin: 0; font-size: var(--title-size); }
.bi2-filters { display: flex; align-items: center; gap: 8px; }
.bi2-select { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  color: #3b4a54; font-family: inherit; cursor: pointer; }
.bi2-body { flex: 1; overflow-y: auto; padding: 22px 28px 40px; }
/* métricas lado a lado sem caixinha */
.bi2-metrics { display: flex; flex-wrap: wrap; gap: 4px 0; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.bi2-metric { flex: 1 1 0; min-width: 96px; text-align: left; border: none; background: transparent; padding: 6px 18px 6px 0;
  font-family: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.bi2-metric.static { cursor: default; }
.bi2-metric .l { font-size: 13px; color: #8a93a6; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.bi2-metric .v { font-size: 22px; font-weight: 700; color: #111b21; font-variant-numeric: tabular-nums; }
.bi2-metric .s { font-size: 12px; color: #8a93a6; }
.bi2-metric.on .l { color: #111b21; }
.bi2-metric.on .l::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #111b21; }
.bi2-metric:not(.static):not(.on):hover .l { color: #3b4a54; }
.bi2-chart { padding: 18px 0 8px; }
.bi2-svg { display: block; overflow: visible; }
.bi2-svg .bi2-axis { fill: #a3adb5; font-size: 11px; font-variant-numeric: tabular-nums; }
.bi2-svg .bi2-base { stroke: #e9edef; }
.bi2-svg .bi2-cross { stroke: #c4c8cc; stroke-dasharray: 3 3; }
.bi2-svg .bi2-dot { fill: #111b21; stroke: #fff; stroke-width: 2; }
.bi2-tip { position: fixed; z-index: 2000; pointer-events: none; background: #111b21; color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.bi2-tip .t { color: #a3adb5; margin-bottom: 2px; }
.bi2-tip span { color: #c4c8cc; }
/* linhas com barra de fundo */
.bi2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px 28px; margin-top: 18px; }
.bi2-rows-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.bi2-rows-head b { color: #111b21; }
.bi2-rows-head span { color: #8a93a6; font-size: 12px; }
.bi2-row { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; margin-bottom: 4px; overflow: hidden; }
.bi2-row i { position: absolute; left: 0; top: 0; bottom: 0; background: #f0f2f5; border-radius: 8px; z-index: 0; }
.bi2-row .l, .bi2-row .v { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi2-row .l { color: #3b4a54; }
.bi2-row .v { color: #111b21; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.bi2-row .v em { font-style: normal; font-weight: 500; color: #8a93a6; margin-left: 4px; }
.bi2-empty { font-size: 13px; color: #a3adb5; padding: 8px 0; }
.bi2-soon { max-width: 440px; margin: 56px auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: #667781; font-size: 14px; line-height: 1.5; }
.bi2-soon-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #f0f2f5; color: #8a93a6; }
.bi2-soon-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a6d00; background: #fff3cd; border-radius: 999px; padding: 3px 10px; }
.bi2-soon b { color: #111b21; font-size: 17px; }
/* quadro da IA (à direita) */
.bi2-ai { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; padding: 0 14px; }
.bi2-ai-head { height: var(--head-h); flex: none; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); margin: 0 -14px; padding: 0 14px; }
.bi2-ai-head .bi2-select { flex: 1; min-width: 0; border-radius: 8px; text-overflow: ellipsis; }
.bi2-ai-box { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 10px 8px; background: #fff; flex: none; }
.bi2-ai-box:focus-within { border-color: #9aa1a7; }
.bi2-ai-box textarea { width: 100%; border: none; resize: none; outline: none; font-family: inherit; font-size: 14px; color: #111b21; }
.bi2-ai-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bi2-ai-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi2-ai-send { width: 30px; height: 30px; border-radius: 50%; border: none; background: #111b21; color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex: none; }
.bi2-ai-msgs { flex: 1; overflow-y: auto; padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.bi2-ai-q { align-self: flex-end; max-width: 88%; background: #f0f2f5; color: #111b21; border-radius: 12px 12px 4px 12px; padding: 8px 12px; font-size: 13px; }
.bi2-ai-a { font-size: 13px; line-height: 1.55; color: #3b4a54; }
.bi2-ai-a ul { margin: 4px 0; padding-left: 18px; }
.bi2-ai-a b { color: #111b21; }
.bi2-ai-a.pending { color: #a3adb5; animation: ico-blink 1.2s ease-in-out infinite; }
.bi2-ai-sug { display: flex; flex-direction: column; gap: 6px; }
.bi2-ai-sug button { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 13px;
  color: #3b4a54; cursor: pointer; font-family: inherit; }
.bi2-ai-sug button:hover { background: #f5f6f6; }
.bi2-ai-note { flex: none; font-size: 11px; color: #a3adb5; padding: 8px 0 12px; }
@media (max-width: 1200px) { .bi2 { grid-template-columns: 180px minmax(0, 1fr); } .bi2-ai { display: none; } }
/* painel lateral (Central de Ligações) */
.bi2-panel { width: 440px; }
.bi2-panel-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 20px; }
.bi2-metrics-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 0; padding-bottom: 14px; }
.bi2-metrics-2 .bi2-metric { min-width: 0; }
.bi2-metrics-2 .bi2-metric .v { font-size: 19px; }
.bi2-panel .bi2-chart { padding: 0; }
.bi2-more { align-self: flex-start; font-size: 13px; font-weight: 600; color: #111b21; text-decoration: none; }
.bi2-more:hover { text-decoration: underline; }
.icon-btn.on { background: #f0f2f5; color: #111b21; }
.bi2-filters .x4df-btn.on { background: #fff; color: #3b4a54; border-color: var(--border); }
.bi2-filters .x4df-clear { display: none !important; }
.bi2-metric .l, .bi2-metric .s { white-space: nowrap; }
/* tela /bi: cada métrica ocupa a largura do próprio texto (valores longos como R$ 39.196,49 não encostam no vizinho) */
.bi2-main .bi2-metric { flex: 1 1 auto; }
.bi2-main .bi2-metric .v { white-space: nowrap; }
.bi2-row .v em.al { display: inline-block; text-align: left; }
/* tela /bi: mais respiro entre as seções (gráfico, base de dados, blocos) */
.bi2-main .bi2-chart { padding-bottom: 16px; }
.bi2-main .bi2-grid { gap: 56px 56px; margin-top: 36px; padding-bottom: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .bi2-main .bi2-grid { grid-template-columns: minmax(0, 1fr); } }   /* em tela larga, sempre 2 colunas que ocupam a largura toda */
.bi2-main .bi2-rows-head { margin-bottom: 14px; font-size: 14px; }

/* ---------- menus suspensos (select) no visual do calendário: caixinha branca, letras pretas ---------- */
.x4sel-native { display: none !important; }
:where(.x4sel) { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #111b21; font: inherit; font-size: 14px; cursor: pointer;
  text-align: left; max-width: 100%; }
.x4sel { color: #111b21; }
.x4sel:hover { background: #f5f6f6; }
.x4sel.open { border-color: #111b21; }
.x4sel:disabled { opacity: .55; cursor: default; background: #f7f8f9; }
.x4sel-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4sel-chev { flex: none; color: #8a93a6; transition: transform .15s; }
.x4sel.open .x4sel-chev { transform: rotate(180deg); }
.detail-sec .x4sel, .num-picker .x4sel, .fb-cfg .x4sel, .x4sel.trans-select { width: 100%; }
.res-sel.x4sel { padding: 5px 9px; font-size: 13px; border-radius: 7px; }
.call-reg .x4sel, .q-row .x4sel, .var-row .x4sel, .fb-top .x4sel { padding: 7px 10px; font-size: 13px; }
.x4sel-pop { position: fixed; z-index: 1700; max-width: min(360px, calc(100vw - 16px)); padding: 6px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 32px rgba(11,20,26,.2), 0 1px 3px rgba(11,20,26,.08); overflow-y: auto; font-size: 14px; }
.x4sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 10px; border: none;
  background: transparent; border-radius: 9px; color: #111b21; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.x4sel-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4sel-opt svg { flex: none; }
.x4sel-opt.act { background: #f0f2f5; }
.x4sel-opt.on { font-weight: 700; }
.x4sel-opt:disabled { color: #a3adb5; cursor: default; }
.x4sel-grp { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a93a6; }
.x4sel-empty { padding: 10px; color: #8a93a6; font-size: 13px; }
.bi2-filters .x4sel, .head-filters .x4sel, .toolbar-right .x4sel { flex: none; }

/* sem a barra lateral: mais respiro da borda esquerda da página */
.inbox-head { padding-left: 14px; }
.inbox-toolbar { padding-left: 28px; }
.inbox-table th:first-child, .inbox-table td:first-child { padding-left: 28px; }
.conv-header { padding-left: 24px; }
.conv-tools { padding-left: 20px; }
.conv-item { padding-left: 24px; }
.fb-top { padding-left: 24px; }
.builder { padding-left: 28px; padding-right: 28px; }

/* páginas de Flows e Marketing: opções na lateral, igual à tela de Análises */
.x4-secnav { position: fixed; left: 0; top: 0; bottom: 0; width: 210px; z-index: 20; background: var(--panel, #fff);
  border-right: 1px solid var(--border); padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
body.has-secnav { padding-left: 210px; }
html.x4-embed .x4-secnav { display: none; }
html.x4-embed body.has-secnav { padding-left: 0; }
@media (max-width: 820px) { .x4-secnav { width: 64px; } .x4-secnav a span, .x4-secnav .x4m-name { display: none; } body.has-secnav { padding-left: 64px; } }
.x4-secnav a svg { width: 16px; height: 16px; flex: none; }

/* telefone no topo da conversa: ícone preto simples, igual ao WhatsApp (sem bolinha verde) */
.head-call { background: transparent; color: #111b21; width: 38px; height: 38px; }
.head-call:hover { background: #f0f2f5; }
.chat-top-actions .conv-icon-btn { color: #111b21; }
.chat-top-actions .conv-icon-btn:hover { background: #f0f2f5; color: #111b21; }
.chat-top-actions .conv-icon-btn.on { background: #e9edef; color: #111b21; }

/* transcrição dos áudios (Whisper): botão e texto embaixo do áudio */
.aud-tx-btn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 4px 10px; border: none; border-radius: 999px;
  background: rgba(11,20,26,.06); color: #3b4a54; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.aud-tx-btn:hover { background: rgba(11,20,26,.11); color: #111b21; }
.aud-tx-btn.err { color: #c62828; }
.aud-tx { margin: 6px 0 2px; padding: 8px 10px; border-radius: 8px; background: rgba(11,20,26,.05); color: #111b21; font-size: 13.5px;
  line-height: 1.45; max-width: 300px; white-space: normal; word-wrap: break-word; }
.aud-tx-lbl { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: #667781;
  text-transform: uppercase; letter-spacing: .03em; }
.aud-tx.pending { display: inline-flex; align-items: center; gap: 8px; color: #667781; font-size: 12.5px; }
.aud-tx-dots { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c5ccd1; border-top-color: #111b21; animation: aud-tx-spin .8s linear infinite; }
@keyframes aud-tx-spin { to { transform: rotate(360deg); } }

/* janela fechada: template e Flow continuam liberados */
.reply.locked [data-free] { opacity: 1; cursor: pointer; }
.tpl-pick-item.off { color: #a3adb5; cursor: default; }
.tpl-pick-item.off:hover { background: transparent; }

/* "Adicionar à lista" (estágio do CRM) no topo da conversa, igual ao WhatsApp Business */
.stage-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 14px; border: 1px solid #d1d7db; border-radius: 999px;
  background: #fff; color: #111b21; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 220px; }
.stage-btn:hover, .stage-btn.open { background: #f5f6f6; }
.stage-btn-txt { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stage-btn .x4sel-chev { color: #54656f; }
.stage-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.stage-pop { width: 260px; padding: 8px 6px; overflow-y: auto; }
.stage-opt { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 9px; cursor: pointer; color: #111b21; font-size: 14.5px; }
.stage-opt:hover { background: #f5f6f6; }
.stage-opt span { flex: 1; }
.stage-opt input { width: 18px; height: 18px; margin: 0; accent-color: #111b21; cursor: pointer; }
.detail-head .stage-btn { height: 32px; padding: 0 8px 0 11px; font-size: 13px; max-width: 200px; flex: none; }

/* número da API em cima da busca de conversas (clientes com mais de um número) */
.wa-num { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; color: #54656f; font-size: 13px; min-width: 0; }
.wa-num svg { flex: none; }
.wa-num-lbl { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a93a6; }
.wa-num-one { font-weight: 700; color: #111b21; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-num .x4sel { flex: 1 1 auto; min-width: 0; padding: 5px 10px; font-size: 13px; font-weight: 700; border-radius: 999px; }

/* ---------- barra lateral do simulador do WhatsApp Web ---------- */
.wa-rail { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 0 14px;
  background: #f0f2f5; border-right: 1px solid var(--border); }
.wa-rail-x4 { height: var(--head-h); display: flex; align-items: center; justify-content: center; margin: 0 0 4px; width: 100%; }
.wa-rail-x4 .x4m-trigger { margin: 0; padding: 8px; border-radius: 12px; }
.wa-rail-x4 .x4m-trigger .x4m-name, .wa-rail-x4 .x4m-trigger .x4m-chev { display: none; }
.wa-rail-x4 .x4m-trigger .x4m-logo { height: 12px; }
.wa-rail-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: transparent; color: #54656f; cursor: pointer;
  display: flex; align-items: center; justify-content: center; position: relative; }
.wa-rail-btn:hover { background: #e2e5e8; }
.wa-rail-btn.on { background: #d9dbdf; color: #111b21; }
.wa-rail-btn[data-soon] { color: #8696a0; }
.wa-rail-fill { flex: 1; }
.wa-rail-sep { width: 32px; height: 1px; background: #d1d7db; margin: 2px 0; }
.wa-rail-pic { width: 36px; height: 36px; border-radius: 50%; border: none; padding: 0; overflow: hidden; cursor: default;
  background: #737373; color: #fff; font: inherit; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wa-rail-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-rail-pic.op { width: 30px; height: 30px; font-size: 11.5px; }
html.x4-embed .wa-rail { display: none; }

/* mais respiro entre número, pesquisa e filtros (aba WhatsApp) */
.conv-tools { padding-top: 14px; padding-bottom: 12px; }
.wa-num { margin-bottom: 14px; }
.conv-chips { margin-top: 14px; }

/* listas laterais (Análises, CRM, Ligações, Flows, Marketing): sem caixinha de fundo,
   igual às pílulas de notificação — cinza parado, preto escuro quando clicado */
.bi2-nav a, .x4-secnav a { color: #8a93a6; background: transparent; }
.bi2-nav a:hover, .x4-secnav a:hover { background: transparent; color: #3b4a54; }
.bi2-nav a.on, .x4-secnav a.on { background: transparent; color: #111b21; font-weight: 700; }

/* barra lateral do simulador toda branca, com mais respiro nos ícones de baixo */
.wa-rail { background: #fff; padding-bottom: 20px; }
.wa-rail-btn:hover { background: #f0f2f5; }
.wa-rail-btn.on { background: #f0f2f5; }
.wa-rail-sep { margin: 10px 0; }
.wa-rail-pic { margin-top: 6px; }
.wa-rail-pic.op { margin-top: 12px; }

/* barra do simulador: ícones sem moldura — cinza parado, preto escuro quando clicado */
.wa-rail-btn, .wa-rail-btn:hover, .wa-rail-btn.on { background: transparent; }
.wa-rail-btn { color: #8a93a6; }
.wa-rail-btn:hover { color: #3b4a54; }
.wa-rail-btn.on { color: #111b21; }
.wa-rail-btn[data-soon] { color: #8a93a6; }
.wa-rail-pic { cursor: pointer; }
.wa-rail-pic.open { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111b21; }

/* pop do perfil (API / operador), no formato do cartão da ligação */
.rail-pop { position: fixed; z-index: 1600; width: 250px; padding: 18px 16px 16px; background: #fff; color: #111b21; border-radius: 16px;
  box-shadow: 0 16px 40px rgba(11,20,26,.22), 0 1px 3px rgba(11,20,26,.08); text-align: center; }
.rp-pic { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; background: #737373; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.rp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-num { margin-top: 3px; font-size: 14px; color: #3b4a54; }
.rp-num.muted { color: #8a93a6; font-size: 13px; }
.rp-tag { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: #f0f2f5; color: #54656f; font-size: 11.5px; font-weight: 600; }
.rp-connect { display: block; width: 100%; margin-top: 14px; padding: 9px 12px; border: none; border-radius: 999px; background: #111b21; color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rp-connect:hover { background: #2a3942; }
.rp-list { margin-top: 14px; padding-top: 10px; border-top: 1px solid #eef0f2; text-align: left; }
.rp-list-t { font-size: 11px; font-weight: 700; color: #8a93a6; text-transform: uppercase; letter-spacing: .04em; padding: 0 6px 6px; }
.rp-item { display: flex; flex-direction: column; width: 100%; padding: 7px 8px; border: none; background: transparent; border-radius: 9px;
  text-align: left; font: inherit; cursor: pointer; color: #8a93a6; }
.rp-item span { font-size: 14px; font-weight: 600; }
.rp-item small { font-size: 12px; }
.rp-item:hover { background: #f5f6f6; color: #3b4a54; }
.rp-item.on { color: #111b21; cursor: default; }
.x4-secnav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* WhatsApp do Comercial: o WhatsApp de verdade dentro da área da página */
.wa-hub-frame { flex: 1; width: 100%; min-height: 0; border: 0; display: block; background: #efeae2; }
.inbox-main:has(.wa-hub-frame) { height: 100vh; }
.conv-num-tag { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 600; color: #54656f;
  background: #f0f2f5; border-radius: 999px; padding: 1px 7px; }
.conv-item.unread .conv-num-tag { margin-right: 26px; }

/* CRM: a ficha é o padrão; WhatsApp e telefone abrem painéis ao lado (cinza parado, preto quando aberto) */
.crm-ficha { flex: 1; min-height: 0; overflow-y: auto; }
.crm-ficha .lf-calls-sec { display: none; }
#detailPanel #dWaBtn, #detailPanel #dCallBtn { color: #8a93a6; }
#detailPanel #dWaBtn:hover, #detailPanel #dCallBtn:hover { color: #3b4a54; background: transparent; }
#detailPanel #dWaBtn.on, #detailPanel #dCallBtn.on { color: #111b21; }
.inbox-main { min-width: 320px; }

/* ícone "Todos": fotos dos WhatsApps conectados, sobrepostas */
.wa-stack { display: inline-flex; flex: none; }
.wa-stack img, .wa-stack i { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; border: 1.5px solid #fff; margin-left: -7px;
  background: #737373; color: #fff; font-style: normal; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wa-stack > :first-child { margin-left: 0; }

/* números na barra lateral do WhatsApp (abaixo de Listas): sem moldura; o escolhido ganha anel preto */
.wa-rail-nums { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #e9edef; width: 40px; }
.wa-rail-nums:empty { display: none; }
.wa-rail-num { border: none; background: transparent; padding: 3px; border-radius: 50%; cursor: pointer; display: flex; opacity: .65; }
.wa-rail-num:hover { opacity: 1; }
.wa-rail-num.on { opacity: 1; box-shadow: 0 0 0 2px #111b21; }
.wa-rail-num .one, .wa-rail-num .wa-stack img, .wa-rail-num .wa-stack i { border-radius: 50%; object-fit: cover; background: #737373; color: #fff;
  font-style: normal; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wa-rail-num .one { width: 28px; height: 28px; font-size: 12px; }
.wa-rail-num .wa-stack img, .wa-rail-num .wa-stack i { width: 18px; height: 18px; font-size: 9px; }

/* painel de Ligações: ícones WhatsApp e telefone (cinza parado, preto quando aberto); telefone bloqueado = cadeado */
#sidePanel #sWaBtn, #sidePanel #sCallBtn { color: #3b4a54; }
#sidePanel #sWaBtn:hover { background: transparent; color: #111b21; }
#sidePanel #sWaBtn.on { color: #111b21; background: #f0f2f5; }
.head-call.locked { position: relative; color: #b0b8c4 !important; cursor: not-allowed; }
.head-call.locked:hover { background: transparent; }
.head-call.locked::after { content: ''; position: absolute; right: 5px; bottom: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e53935' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/9px no-repeat;
  box-shadow: 0 0 0 1px #fff; }

/* balão ao passar o mouse nos ícones da barra do WhatsApp (aparece na hora, ao lado do ícone) */
.wa-rail { position: relative; z-index: 30; }
.wa-rail [data-tip] { position: relative; }
.wa-rail [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%);
  white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: #111b21; color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(11,20,26,.25); opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 40; }
.wa-rail [data-tip]:hover::after, .wa-rail [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
/* "WhatsApp SDR" (Evolution API) ainda não existe: aparece apagado com "em breve" */
.lsub.lsub-soon { color: #b0b8c4; }
.lsub.lsub-soon:hover { color: #8a93a6; }
.x4m-item.soon { color: #8a93a6; }
.x4m-item.soon small { display: block; font-size: 11.5px; color: #a3adb5; font-weight: 400; }

/* ---------- WhatsApp SDR (Evolution API) ---------- */
.sdr-main { height: 100vh; min-width: 0; }
.sdr-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 28px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.sdr-inst { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; }
.sdr-chip { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 6px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  background: #fff; flex: none; color: #8a93a6; }
.sdr-chip:hover { color: #3b4a54; }
.sdr-chip.on { border-color: #111b21; color: #111b21; }
.sdr-chip-txt { display: flex; flex-direction: column; line-height: 1.15; }
.sdr-chip-txt b { font-size: 13px; }
.sdr-chip-txt small { font-size: 11.5px; color: #8a93a6; }
.sdr-chip-act { border: none; background: #111b21; color: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.sdr-chip-x { border: none; background: transparent; color: #a3adb5; cursor: pointer; font-size: 12px; padding: 2px 4px; }
.sdr-chip-x:hover { color: #e53935; }
img.sdr-photo { object-fit: cover; padding: 0; }
.sdr-body { flex: 1; display: flex; min-height: 0; }
.sdr-body .conv-list { display: flex; flex-direction: column; }
.sdr-body .conv-items { flex: 1; overflow-y: auto; }
.sdr-empty { flex: 1; align-items: center; justify-content: center; }
.sdr-empty-card { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 380px; text-align: center; padding: 30px; }
.sdr-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(11,20,26,.35); display: flex; align-items: center; justify-content: center; }
.sdr-modal-card { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(11,20,26,.3); overflow: hidden; }
.sdr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.sdr-modal-card .detail-tabs { padding: 0 8px; }
.sdr-pane { padding: 20px 22px 22px; overflow-y: auto; }
/* Minhas conexões: lista de canais com status */
.conn-list { display: flex; flex-direction: column; gap: 8px; }
.conn-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--border, #e9edef); border-radius: 12px; }
.conn-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #e7f0f6 center/cover no-repeat; display: grid; place-items: center; font-weight: 700; color: #5b6b78; font-size: 15px; }
.conn-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; margin-right: auto; }
.conn-tx b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-tx small { font-size: 12px; color: #8696a0; }
.conn-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.conn-st i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.conn-st.ok { color: #1a7f37; } .conn-st.ok i { background: #22c55e; }
.conn-st.off { color: #d12e3a; } .conn-st.off i { background: #ff1f3d; }
.conn-st.wait { color: #b26a00; } .conn-st.wait i { background: #f59e0b; }
.conn-recon { flex: none; }
.sdr-pane input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; }
.sdr-pane small { display: block; margin-top: 6px; }
.sdr-qr { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.sdr-qr img { width: 240px; height: 240px; object-fit: contain; background: #f5f6f6; border-radius: 12px; }
.sdr-qr ol { text-align: left; margin: 0; padding-left: 18px; }
.sdr-qr #qrStatus { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.sdr-bar > .btn { flex: none; white-space: nowrap; }
.sdr-body .reply input { flex: 1; min-width: 0; border: none; background: #f0f2f5; border-radius: 20px; padding: 10px 14px; font: inherit; font-size: 14px; outline: none; }
.sdr-inst { overflow-x: auto; scrollbar-width: none; }

/* ---------- tela de carregamento: X4 no meio, círculo girando em volta ---------- */
.x4-loader { position: fixed; inset: 0; z-index: 5000; background: #f5f6f6; display: flex; align-items: center; justify-content: center; transition: opacity .25s; }
.x4-loader.out { opacity: 0; pointer-events: none; }
.x4-loader-ring { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 2px solid transparent;
  border-top-color: #111b21; border-left-color: #111b21; animation: x4-spin .9s linear infinite; }
.x4-loader-logo { width: 26px; height: auto; }
@keyframes x4-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .x4-loader-ring { animation-duration: 2.4s; } }

/* ---------- Agenda ---------- */
.ag { display: grid; grid-template-columns: 230px minmax(0, 1fr); height: 100vh; background: var(--panel); }
.ag-nav { border-right: 1px solid var(--border); padding: 0 10px 20px; overflow-y: auto; }
.ag-sec-t { font-size: 13px; font-weight: 700; color: #111b21; padding: 14px 10px 6px; }
.ag-list { display: flex; flex-direction: column; gap: 2px; }
.ag-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.ag-item:hover { background: #f5f6f6; }
.ag-item input { width: 16px; height: 16px; margin: 0; flex: none; }
.ag-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-item-name small { display: block; font-size: 11.5px; color: #8a93a6; }
.ag-item-x { border: none; background: transparent; color: #b0b8c4; cursor: pointer; font-size: 11px; opacity: 0; }
.ag-item:hover .ag-item-x { opacity: 1; }
.ag-item-x:hover { color: #e53935; }
.ag-add { border: none; background: transparent; color: #54656f; font: inherit; font-size: 13.5px; padding: 7px 10px; cursor: pointer; text-align: left; width: 100%; border-radius: 9px; }
.ag-add:hover { background: #f5f6f6; color: #111b21; }
.ag-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: #ccc; }
.ag-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ag-head { height: var(--head-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.ag-head-l, .ag-head-r { display: flex; align-items: center; gap: 6px; }
.ag-month { border: none; background: transparent; font: inherit; font-size: var(--title-size); font-weight: 700; color: #111b21; padding: 6px 10px; border-radius: 10px; cursor: pointer; margin-right: 4px; }
.ag-month b { color: #8a93a6; font-weight: 600; }
.ag-month:hover { background: #f0f2f5; }
.ag-ico { width: 36px; height: 36px; border: none; background: transparent; border-radius: 50%; color: #3b4a54; font-size: 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.ag-ico:hover { background: #f0f2f5; }
.ag-today { border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: #3b4a54; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ag-today:hover { background: #f0f2f5; }
.ag-share { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #111b21; background: #fff; color: #111b21; border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; margin-left: 6px; }
.ag-share:hover { background: #f5f6f6; }
.ag-menu-wrap { position: relative; }
.ag-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 32px rgba(11,20,26,.2), 0 1px 3px rgba(11,20,26,.08); }
.ag-pop-wide { min-width: 300px; }
.ag-pop button, .ag-tog { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: none; background: transparent; border-radius: 9px;
  font: inherit; font-size: 14px; color: #111b21; text-align: left; cursor: pointer; }
.ag-pop button:hover, .ag-tog:hover { background: #f0f2f5; }
.ag-pop kbd { margin-left: auto; font: inherit; font-size: 12px; color: #8a93a6; }
.ag-ck { width: 14px; flex: none; font-weight: 700; }
.ag-pi { width: 18px; flex: none; text-align: center; }
.ag-tog span { flex: 1; }
.ag-tog input { width: 34px; height: 20px; margin: 0; accent-color: #111b21; cursor: pointer; }
.ag-pop-sub { display: block; padding: 0 10px 8px 38px; font-size: 12px; color: #8a93a6; text-decoration: none; }
.ag-pop-sub:hover { color: #111b21; }
.ag-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* grade de horas (dia, semana, equipe) */
.ag-gh, .ag-grid { display: grid; grid-template-columns: 56px repeat(var(--cols, 7), minmax(0, 1fr)); }
.ag-gh { flex: none; border-bottom: 1px solid var(--border); padding-right: 8px; }
.ag-gutter small { display: block; font-size: 10px; color: #8a93a6; text-align: right; padding: 12px 8px 0 0; }
.ag-ghc { padding: 12px 6px 10px; text-align: center; font-size: 14px; color: #3b4a54; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ag-ghc b { font-weight: 600; }
.ag-ghc.today b { background: #111b21; color: #fff; border-radius: 7px; padding: 2px 7px; }
.ag-ghc.we { color: #a3adb5; }
.ag-scroll { flex: 1; overflow-y: auto; padding-right: 8px; }
.ag-grid { position: relative; }
.ag-hl { position: relative; border-top: 1px solid transparent; }
.ag-hl span { position: absolute; top: -7px; right: 8px; font-size: 11px; color: #8a93a6; }
.ag-col { position: relative; border-left: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, var(--border) 55px, var(--border) 56px); cursor: pointer; }
.ag-col.we { background-color: #fafafa; }
.ag-off { position: absolute; left: 0; right: 0; background: rgba(240,242,245,.65); pointer-events: none; }
.ag-ev { position: absolute; z-index: 2; border-radius: 7px; padding: 3px 7px; overflow: hidden; font-size: 12px; line-height: 1.25; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 3px solid var(--c); color: #111b21; }
.ag-ev:hover { box-shadow: 0 2px 8px rgba(11,20,26,.15); }
.ag-ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev span { display: block; color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev.ag-lembrete { border-left-style: dashed; background: #fff; border: 1px dashed var(--c); }
.ag-now { position: absolute; left: 0; right: 0; z-index: 3; border-top: 2px solid #111b21; pointer-events: none; }
.ag-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #111b21; }
.ag-now span { position: absolute; left: -54px; top: -11px; background: #111b21; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
/* mês */
.ag-mh { flex: none; display: grid; grid-template-columns: repeat(var(--mc, 7), 1fr); border-bottom: 1px solid var(--border); }
.ag-mh { --mc: 7; }
.ag-mh div { padding: 10px; font-size: 13px; color: #8a93a6; font-weight: 600; text-align: center; }
.ag-month-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--mc), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); overflow-y: auto; }
.ag-md { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; min-height: 96px; cursor: pointer; overflow: hidden; }
.ag-md.out { background: #fafafa; color: #b0b8c4; }
.ag-mdn { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 6px; border-radius: 7px; margin-bottom: 4px; }
.ag-md.today .ag-mdn { background: #111b21; color: #fff; }
.ag-mev { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 4px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #111b21; }
.ag-mev:hover { background: #f0f2f5; }
.ag-mev i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.ag-more { font-size: 12px; color: #54656f; font-weight: 600; padding: 2px 4px; }
/* lista */
.ag-list-view { flex: 1; overflow-y: auto; padding: 16px 28px; }
.ag-lday { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ag-ld { width: 70px; flex: none; display: flex; flex-direction: column; }
.ag-ld b { font-size: 22px; } .ag-ld span { font-size: 12px; color: #8a93a6; }
.ag-lev { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ag-li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.ag-li:hover { background: #f5f6f6; }
.ag-lt { width: 110px; flex: none; color: #54656f; }
.ag-empty-day { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-weight: 600; color: #54656f; }
.ag-today-pill { background: #111b21; color: #fff; border-radius: 7px; padding: 3px 8px; }
/* janelas */
.ag-modal { position: fixed; inset: 0; z-index: 1300; background: rgba(11,20,26,.28); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ag-card { position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(11,20,26,.28); padding: 22px 24px 18px; }
.ag-card-sm { width: min(360px, 100%); }
.ag-card h3 { margin: 0 0 12px; font-size: 18px; }
.ag-x { position: absolute; right: 14px; top: 14px; border: none; background: transparent; color: #8a93a6; font-size: 15px; cursor: pointer; }
.ag-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.ag-tabs button { border: none; background: transparent; padding: 8px 0; font: inherit; font-size: 14px; color: #8a93a6; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ag-tabs button.on { color: #111b21; font-weight: 600; border-bottom-color: #111b21; }
.ag-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ag-row > .ag-dot, .ag-ri { flex: none; width: 18px; text-align: center; margin-top: 11px; font-size: 14px; }
.ag-row > input, .ag-row > textarea, .ag-row > select, .ag-row > .x4sel, .ag-card > input, .ag-inline input, .ag-client-box input {
  flex: 1; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.ag-row > input:focus, .ag-row > textarea:focus, .ag-card > input:focus { outline: none; border-color: #111b21; }
.ag-card > input { margin-bottom: 12px; }
.ag-when { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ag-when input { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.ag-client-box { position: relative; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ag-suggest { position: absolute; top: 44px; left: 0; right: 0; z-index: 5; background: #fff; border-radius: 12px; padding: 4px; box-shadow: 0 10px 28px rgba(11,20,26,.2); }
.ag-suggest button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.ag-suggest button:hover { background: #f0f2f5; }
.ag-suggest small { color: #8a93a6; }
.ag-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ag-primary { border: none; background: #111b21; color: #fff; border-radius: 999px; padding: 9px 20px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ag-primary:hover { background: #2a3942; }
.ag-del { border: none; background: transparent; color: #e53935; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ag-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 4px; }
.ag-swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.ag-swatches button.on { box-shadow: 0 0 0 2px #111b21; }
.ag-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.ag-inline label { color: #54656f; flex: none; }
.ag-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ag-days label { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; cursor: pointer; }
@media print { .ag-nav, .ag-head-r, .x4m-float { display: none !important; } .ag { grid-template-columns: 1fr; height: auto; } .ag-scroll { overflow: visible; } }

/* ---------- Adicionar cliente / Importar clientes ---------- */
.cl-card { width: min(760px, 100%); display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: hidden; }
.cl-card h3 { flex: none; }
.cl-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; flex: 1; min-height: 0; }
.cl-side { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6px; }
.cl-avatar { width: 64px; height: 64px; border-radius: 50%; background: #f0f2f5; color: #54656f; display: flex; align-items: center; justify-content: center; }
.cl-tab { align-self: stretch; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px; background: #f0f2f5; font-size: 14px; font-weight: 600; }
.cl-form { overflow-y: auto; padding: 0 6px 6px 18px; border-left: 1px solid var(--border); }
.cl-form label, .sv-l { display: block; font-size: 13px; color: #3b4a54; margin: 12px 0 5px; }
.cl-form input, .cl-form select, .sv-main input, .sv-main textarea, #bizModal input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.cl-form input:focus, .sv-main input:focus, .sv-main textarea:focus { outline: none; border-color: #111b21; }
.cl-sec { font-size: 14px; font-weight: 700; color: #111b21; margin-top: 4px; }
.cl-sep { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.cl-phone { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.cl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-foot { flex: none; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); background: #fff; }
.cl-link { display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; color: #3b4a54; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.cl-link:hover { color: #111b21; }
.cl-cancel { border: none; background: transparent; color: #54656f; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.im-card { width: min(480px, 100%); }
.im-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.im-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; font: inherit; cursor: pointer; }
.im-opt:hover { border-color: #111b21; }
.im-opt b { font-size: 14px; } .im-opt span { font-size: 12.5px; color: #667781; line-height: 1.4; } .im-opt em { font-style: normal; font-weight: 700; color: #8a93a6; }
.im-result { margin-top: 14px; font-size: 14px; line-height: 1.6; } .im-err { color: #c62828; }
@media (max-width: 640px) { .cl-grid { grid-template-columns: 1fr; } .cl-side { display: none; } .cl-form { border: none; padding-left: 0; } .im-opts { grid-template-columns: 1fr; } }

/* ---------- Agenda: serviço completo, membros, cliente no compromisso, prévia do link ---------- */
.sv-card { width: min(940px, 100%); padding: 0; }
.sv-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.sv-head h3 { margin: 0; }
.sv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding: 18px 22px 24px; }
.sv-img-row { display: flex; align-items: center; gap: 14px; margin: 12px 0 4px; }
.sv-img { width: 72px; height: 72px; border-radius: 14px; background: #f0f2f5 center/cover; color: #8a93a6; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.sv-img.has svg { display: none; }
.sv-title-row { display: flex; gap: 10px; align-items: center; }
.sv-title-row input { flex: 1; }
.sv-sw { flex: none; margin: 0; max-width: 160px; gap: 5px; } .sv-sw button { width: 18px; height: 18px; }
.sv-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sv-suf { position: relative; display: flex; align-items: center; }
.sv-suf input { padding-right: 70px; } .sv-suf span { position: absolute; right: 12px; color: #8a93a6; font-size: 13px; pointer-events: none; }
.sv-pre input { padding-left: 38px; padding-right: 12px; } .sv-pre span { left: 12px; right: auto; }
.sv-team { border-left: 1px solid var(--border); padding-left: 22px; }
.sv-search { margin: 12px 0 8px; } .sv-search input { border: none; background: transparent; padding: 9px 0; outline: none; font: inherit; flex: 1; }
.sv-mem { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 14px; cursor: pointer; }
.sv-mem input { width: 16px; height: 16px; accent-color: #111b21; }
.mem-card { width: min(720px, 100%); }
.mem-row { display: grid; grid-template-columns: 1fr 1fr 170px; gap: 10px; margin-bottom: 10px; }
.mem-row input, .mem-row select { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; width: 100%; }
.mem-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; } .mem-foot .muted { flex: 1; }
.ag-client-line { display: flex; gap: 6px; } .ag-client-line input { flex: 1; }
.ag-mini-btn { flex: none; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.ag-mini-btn:hover { border-color: #111b21; color: #111b21; }
.ag-prev-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a93a6; padding: 10px 10px 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.ag-prev { display: flex; gap: 10px; margin: 0 6px 6px; padding: 8px; border-radius: 10px; background: #e7fce3; border-left: 3px solid #25d366; }
.ag-prev img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: #fff; }
.ag-prev b { display: block; font-size: 13px; } .ag-prev span { display: block; font-size: 12px; color: #54656f; line-height: 1.3; } .ag-prev small { color: #8a93a6; font-size: 11px; }
@media (max-width: 760px) { .sv-grid { grid-template-columns: 1fr; } .sv-team { border: none; padding: 0; } .mem-row { grid-template-columns: 1fr; } }
.ag-month, .ag-ghc { white-space: nowrap; }
.ag-row > .ag-dot { width: 12px; height: 12px; margin: 15px 3px 0; border-radius: 50%; }

/* botão do menu X4 nas listas laterais: mais respiro da borda esquerda (igual ao da direita) */
.bi2-nav-title, .x4-secnav-title { padding-left: 18px; padding-right: 18px; }
.bi2-nav-title .x4m-trigger, .x4-secnav-title .x4m-trigger { margin-left: 0; }

/* ---------- Ficha inteira do lead (pop grande estilo ClickUp) ---------- */
.bf-overlay { position: fixed; inset: 0; z-index: 1250; background: rgba(11,20,26,.35); display: flex; align-items: center; justify-content: center; padding: 3vh 2vw; }
.bf-card { width: min(1240px, 100%); height: min(94vh, 980px); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(11,20,26,.3);
  display: flex; flex-direction: column; overflow: hidden; }
.bf-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex: none; }
.bf-head .avatar-wrap { display: inline-flex; }
.bf-who { display: flex; flex-direction: column; } .bf-who b { font-size: 18px; } .bf-who span { font-size: 13px; }
.bf-head .head-call { color: #3b4a54; }
.bf-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); }
.bf-left { overflow-y: auto; padding: 8px 18px 30px; }
.bf-left #dDet { max-width: 720px; }
.bf-right { display: flex; flex-direction: column; min-height: 0; background: #fafbfc; border-left: 1px solid var(--border); }
.bf-act-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.bf-chips { display: flex; gap: 4px; }
.bf-chips button { border: none; background: transparent; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: #8a93a6; cursor: pointer; }
.bf-chips button.on { background: #fff; color: #111b21; box-shadow: 0 0 0 1px var(--border); }
.bf-feed { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.bf-ev { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: #54656f; line-height: 1.45; }
.bf-ev i { width: 6px; height: 6px; border-radius: 50%; background: #c5ccd1; flex: none; transform: translateY(-1px); }
.bf-ev span:first-of-type { flex: 1; min-width: 0; } .bf-ev b { color: #111b21; font-weight: 600; }
.bf-t { flex: none; font-size: 11.5px; color: #a3adb5; white-space: nowrap; }
.bf-old { text-decoration: line-through; color: #a3adb5; } .bf-new { color: #111b21; font-weight: 600; }
.bf-com { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.bf-com-h { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; } .bf-com-h .bf-t { margin-left: auto; }
.bf-com-b { font-size: 14px; color: #111b21; line-height: 1.5; white-space: normal; word-wrap: break-word; }
.bf-del { border: none; background: transparent; color: #c5ccd1; cursor: pointer; font-size: 11px; } .bf-del:hover { color: #e53935; }
.bf-compose { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); background: #fff; }
.bf-compose textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; min-height: 64px; }
.bf-compose textarea:focus { outline: none; border-color: #111b21; }
.bf-compose .ag-primary { align-self: flex-end; }
@media (max-width: 900px) { .bf-body { grid-template-columns: 1fr; grid-template-rows: 1fr 46%; } .bf-right { border-left: none; border-top: 1px solid var(--border); } }

/* ---------- Agenda: modos (calendário · sua marca · relatórios) ---------- */
.ag-modes { display: flex; flex-direction: column; gap: 2px; }
.ag-modes button { border: none; background: transparent; text-align: left; padding: 8px 10px; border-radius: 9px; font: inherit; font-size: 14px; color: #8a93a6; cursor: pointer; display: flex; align-items: center; gap: 9px; }
.ag-modes button:hover { color: #3b4a54; }
.ag-modes button.on { color: #111b21; font-weight: 700; }
.ag-mode-ic { display: inline-flex; align-items: center; flex: none; }
/* ícones SVG no lugar de emojis: alinhamento dentro das pílulas/linhas */
.ag-pi { display: inline-flex; align-items: center; justify-content: center; }
.ag-pi svg, .ag-ri svg { display: block; }
.fn-ic { display: inline-flex; align-items: center; color: #8a93a6; flex: none; }
.fn-all.on .fn-ic, .fn-head.on .fn-ic { color: #111b21; }
svg.ico { vertical-align: -2px; }
.br-title { font-size: var(--title-size); padding: 0 8px; }
.br-prog { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #54656f; margin-left: 6px; }
.br-prog circle:last-child { transition: stroke-dashoffset .3s; }
.ag-primary:disabled { opacity: .35; cursor: default; }
/* Sua marca */
.br { overflow: hidden; }
.br-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 28px; padding: 0 24px; overflow: hidden; }
.br-form { overflow-y: auto; padding: 20px 4px 60px 0; }
.br-form input, .br-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.br-form input:focus, .br-form textarea:focus { outline: none; border-color: #111b21; }
.br-banner { position: relative; display: flex; align-items: flex-end; justify-content: flex-end; height: 150px; margin-top: 12px; padding: 12px; border-radius: 14px;
  background: #f0f2f5 center/cover; cursor: pointer; border: 1px dashed #d1d7db; }
.br-banner.has { border-style: solid; border-color: transparent; }
.br-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(17,27,33,.7); color: #fff; font-size: 11px; cursor: pointer; display: none; }
.br-banner.has .br-x, .br-gal > div .br-x, .br-link .br-x { display: block; }
.br-logo-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.br-logo { width: 76px; height: 76px; border-radius: 50%; background: #f0f2f5 center/cover; flex: none; cursor: pointer; border: 1px dashed #d1d7db; }
.br-logo.has { border-style: solid; border-color: transparent; }
.br-url { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.br-url span { padding: 0 2px 0 12px; color: #8a93a6; font-size: 14px; white-space: nowrap; }
.br-url input { border: none !important; padding-left: 0 !important; }
.br-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.br-colors button, .br-custom { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; position: relative; }
.br-colors .on { box-shadow: 0 0 0 2px #111b21; }
.br-custom { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); overflow: hidden; }
.br-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: none; }
.br-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.br-opts button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
  font: inherit; font-size: 14px; color: #3b4a54; cursor: pointer; }
.br-opts button.on { border-color: #111b21; box-shadow: 0 0 0 1px #111b21; color: #111b21; font-weight: 600; }
.br-opts i { display: block; width: 46px; height: 16px; border: 2px solid currentColor; }
.bo-pill { border-radius: 999px; } .bo-round { border-radius: 5px; } .bo-rect { border-radius: 0; }
.br-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.br-gal > div { position: relative; aspect-ratio: 1; border-radius: 10px; background: #f0f2f5 center/cover; }
.br-gal-add { aspect-ratio: 1; border: 1px dashed #c5ccd1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #54656f; font-size: 22px; cursor: pointer; } .br-gal-add span { font-size: 12px; font-weight: 600; }
.br-hrs { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.br-link { position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr) 28px; gap: 8px; margin-top: 8px; align-items: center; }
.br-link .br-x { position: static; background: transparent; color: #a3adb5; }
.br-prev { padding: 20px 0; display: flex; flex-direction: column; min-height: 0; }
.br-prev-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.br-dev { display: flex; gap: 4px; } .br-dev button { border: none; background: transparent; border-radius: 8px; padding: 4px 8px; cursor: pointer; opacity: .5; }
.br-dev button.on { background: #f0f2f5; opacity: 1; }
.br-urlbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-bottom: none; border-radius: 12px 12px 0 0; font-size: 13px; color: #54656f; }
.br-urlbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-frame { flex: 1; min-height: 420px; border: 1px solid var(--border); border-radius: 0 0 12px 12px; background: #e9edef; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding: 16px 0; position: relative; }
.br-frame iframe { border: 0; background: #fff; }
.br-frame.mobile iframe { width: 375px; height: 760px; border-radius: 26px; box-shadow: 0 0 0 8px #111b21, 0 10px 30px rgba(0,0,0,.25); transform: scale(.62); transform-origin: top center; }
.br-frame.desktop iframe { width: 1200px; height: 900px; transform: scale(.36); transform-origin: top center; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); position: absolute; top: 14px; left: 50%; margin-left: -600px; }
/* Relatórios */
.rp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--border); }
.rp-filters input, .rp-filters select, .rp-filters .x4sel { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; font: inherit; font-size: 14px; background: #fff; }
.rp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 120px 20px; }
.rp-empty b { font-size: 24px; }
.rp-table { margin-top: 4px; }
@media (max-width: 1100px) { .br-grid { grid-template-columns: 1fr; overflow-y: auto; } .br-form { overflow: visible; } }

/* ---------- CRM: funis na lateral (pasta → etapas, estilo ClickUp) ---------- */
.fn-tree { display: flex; flex-direction: column; gap: 1px; padding-bottom: 20px; overflow-y: auto; }
.fn-tree a, .fn-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: #54656f; text-decoration: none; font-size: 13.5px; cursor: pointer; }
.fn-tree a:hover, .fn-head:hover { background: #f5f6f6; color: #111b21; }
.fn-tree a.on, .fn-head.on { background: #f0f2f5; color: #111b21; font-weight: 700; }
.fn-tree em { margin-left: auto; font-style: normal; font-size: 11.5px; color: #a3adb5; }
.fn-all { font-weight: 600; margin-bottom: 6px; }
.fn-head { font-weight: 600; color: #111b21; }
.fn-head small { font-size: 10.5px; font-weight: 700; color: #8a93a6; background: #f0f2f5; border-radius: 999px; padding: 1px 7px; flex: none; }
.fn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-car { width: 14px; flex: none; color: #8a93a6; font-size: 11px; transition: transform .15s; }
.fn-folder.closed .fn-car { transform: rotate(-90deg); }
.fn-folder.closed .fn-stages { display: none; }
.fn-edit { border: none; background: transparent; color: #a3adb5; cursor: pointer; opacity: 0; font-size: 13px; padding: 0 2px; }
.fn-head:hover .fn-edit { opacity: 1; }
.fn-stages { padding-left: 18px; }
.fn-st i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fn-st span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; font-size: 12px; letter-spacing: .02em; }
.fn-new { border: none; background: transparent; text-align: left; padding: 8px 10px; font: inherit; font-size: 13px; color: #8a93a6; cursor: pointer; border-radius: 8px; margin-top: 6px; }
.fn-new:hover { color: #111b21; background: #f5f6f6; }
/* WhatsApp SDR: lista lateral de WhatsApps (API + SDRs) */
#x4SideBody { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.wa-tree { display: flex; flex-direction: column; gap: 1px; padding-bottom: 20px; overflow-y: auto; }
.wa-src { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: #54656f; text-decoration: none; cursor: pointer; }
.wa-src:hover { background: #f5f6f6; color: #111b21; }
.wa-src.on { background: #f0f2f5; color: #111b21; }
.wa-src-ic { flex: none; display: grid; place-items: center; width: 20px; color: #8a93a6; font-size: 15px; }
.wa-src.on .wa-src-ic { color: #111b21; }
.wa-src-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wa-src-tx b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-src.on .wa-src-tx b { font-weight: 700; }
.wa-src-tx small { font-size: 11.5px; color: #8a93a6; }
.wa-src { position: relative; }
.wa-kind { margin-left: auto; align-self: flex-start; margin-top: 1px; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .03em; color: #8a93a6; background: #f0f2f5; border-radius: 999px; padding: 2px 7px; flex: none; transition: opacity .12s; }
.wa-kind.sdr { color: #1d9bf0; background: #e7f3ff; }
/* status da conexão, embaixo do número */
.wa-st { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 10.5px; font-weight: 600; }
.wa-st i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.wa-st.ok { color: #1a7f37; } .wa-st.ok i { background: #22c55e; }
.wa-st.off { color: #d12e3a; } .wa-st.off i { background: #ff1f3d; }
.wa-st.wait { color: #b26a00; } .wa-st.wait i { background: #f59e0b; }
.wa-recon { align-self: flex-start; margin-top: 3px; padding: 0; border: none; background: none; font: inherit; font-size: 11px; font-weight: 700; color: #1d9bf0; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.wa-recon:hover { color: #0d6efd; }
/* lixeira some do fluxo (fica absoluta) pra os balõezinhos API/SDR/... ficarem todos alinhados à direita */
.wa-del { position: absolute; right: 7px; top: 7px; width: 24px; height: 24px; display: grid; place-items: center; border: none;
  background: transparent; color: #c0392b; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s; }
.wa-src.has-del:hover .wa-del { opacity: .75; }
.wa-src.has-del:hover .wa-kind { opacity: 0; }   /* a lixeira ocupa o lugar do balãozinho ao passar o mouse */
.wa-del:hover { opacity: 1 !important; background: #fde8e8; }
.wa-connect { border: none; background: transparent; text-align: left; padding: 9px 10px; font: inherit; font-size: 13px; color: #8a93a6; cursor: pointer; border-radius: 8px; margin-top: 8px; }
.wa-connect:hover { color: #111b21; background: #f5f6f6; }
body.nav-collapsed .wa-src-tx, body.nav-collapsed .wa-kind, body.nav-collapsed .wa-st, body.nav-collapsed .wa-del, body.nav-collapsed .wa-connect { display: none; }
/* SDR: coluna "Última mensagem" — clicável, abre a conversa à direita */
.sdr-lastmsg { max-width: 280px; cursor: pointer; }
.sdr-lastmsg .lastmsg-tx { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #54656f; font-size: 13px; }
.sdr-lastmsg:hover .lastmsg-tx { color: #111b21; text-decoration: underline; }
.fn-card { width: min(460px, 100%); }
.fn-in { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.fn-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fn-row input[type=color] { width: 30px; height: 30px; border: none; padding: 0; background: none; cursor: pointer; flex: none; }
.fn-row .fn-n { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; }
.fn-row button { border: none; background: transparent; color: #a3adb5; cursor: pointer; font-size: 13px; }
.fn-row button:hover { color: #111b21; } .fn-row .fn-x:hover { color: #e53935; }
.fn-drag { color: #c5ccd1; font-size: 12px; letter-spacing: -2px; }
/* barra da tabela: escopo + agrupar por */
.crm-bar { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.crm-scope { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.crm-scope .ag-dot { width: 10px; height: 10px; }
.crm-group-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 8px;
  padding: 5px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.crm-group-btn:hover { background: #e0e7ff; }
.crm-group-pop { left: auto; right: 0; min-width: 200px; }   /* botão fica no canto direito: menu abre pra dentro da página */
.crm-group-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a93a6; padding: 6px 10px 4px; }
.grp-row td { padding: 16px 14px 6px 28px !important; background: #fff; cursor: pointer; border-bottom: none !important; }
.grp-row:hover td { background: #fafbfc; }
.grp-car { display: inline-block; width: 16px; color: #8a93a6; font-size: 11px; transition: transform .15s; }
.grp-row.closed .grp-car { transform: rotate(-90deg); }
.grp-chip { display: inline-block; padding: 3px 10px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 70%, #111b21);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.grp-n { margin-left: 8px; color: #8a93a6; font-size: 12.5px; font-weight: 600; }
.st-pill { background: color-mix(in srgb, var(--c) 16%, #fff) !important; color: color-mix(in srgb, var(--c) 65%, #111b21) !important; }
/* responsáveis (rostinhos) */
.ppl { display: inline-flex; } .ppl-av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; border: 2px solid #fff; margin-left: -6px; flex: none; }
.ppl .ppl-av:first-child { margin-left: 0; } .ppl-more { background: #e9edef !important; color: #54656f; }
.ppl-empty { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed #b0b8c4; color: #8a93a6; display: inline-flex; align-items: center; justify-content: center; }
/* avatar com foto do membro + botão de trocar foto no seletor de pessoas */
.ppl-av.ppl-ph { background-size: cover; background-position: center; color: transparent; }
.ppl-pick { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.ppl-pick .ppl-cam { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: #0062c4; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; opacity: 0; transition: opacity .12s; }
.ppl-row:hover .ppl-pick .ppl-cam, .ppl-pick:hover .ppl-cam { opacity: 1; }
.ppl-btn { border: none; background: transparent; padding: 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; font: inherit; }
.ppl-btn:hover { background: #f0f2f5; }
.ppl-pop { width: 260px; padding: 8px; }
.ppl-search { margin-bottom: 6px; } .ppl-search input { border: none; background: transparent; outline: none; flex: 1; padding: 8px 0; font: inherit; font-size: 13.5px; }
.ppl-list { max-height: 260px; overflow-y: auto; }
.ppl-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ppl-row:hover { background: #f5f6f6; } .ppl-row .ppl-av { margin: 0; } .ppl-n { flex: 1; } .ppl-row input { accent-color: #111b21; width: 16px; height: 16px; }
.ppl-add { display: block; width: 100%; border: none; background: transparent; text-align: left; padding: 8px 6px; border-radius: 8px; font: inherit; font-size: 13.5px; color: #3b4a54; cursor: pointer; font-weight: 600; }
.ppl-add:hover { background: #f5f6f6; } .ppl-hint { padding: 6px 6px 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.lf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lf-two .field-label { margin-bottom: 6px; }
.lf-ppl { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-size: 14px; text-align: left; }
.lf-ppl:hover { border-color: #b0b8c4; } .lf-ppl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "salvar na ficha" ao lado do reagir */
.sv-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: #fff; color: #54656f;
  box-shadow: 0 1px 3px rgba(11,20,26,.18); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .12s; }
.bubble.in .sv-btn { right: -70px; } .bubble.out .sv-btn { left: -70px; }
.bubble:hover .sv-btn, .sv-btn:focus-visible { opacity: 1; } .sv-btn:hover { color: #111b21; }

/* ---------- Ficha inteira: layout ClickUp ---------- */
.bf-overlay.full { padding: 0; } .bf-overlay.full .bf-card { width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
.bf-crumb { font-size: 13px; color: #3b4a54; font-weight: 600; }
.bf-layout { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; margin-right: 4px; }
.bf-layout button { border: none; background: transparent; width: 30px; height: 28px; border-radius: 7px; color: #8a93a6; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bf-layout button:hover { color: #111b21; } .bf-layout button.on { background: #111b21; color: #fff; }
.bf-left { padding: 22px 30px 40px; }
.bf-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.bf-title h2 { margin: 0; font-size: 26px; line-height: 1.2; } .bf-title .avatar-wrap { display: inline-flex; }
.bf-props { display: flex; flex-direction: column; gap: 4px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.bf-p { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; min-height: 34px; }
.bf-k { font-size: 13.5px; color: #667781; }
.bf-v { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.bf-stage { display: inline-flex; align-items: center; gap: 7px; border: none; border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; background: color-mix(in srgb, var(--c, #9e9e9e) 18%, #fff); color: color-mix(in srgb, var(--c, #9e9e9e) 70%, #111b21); }
.bf-stage i { width: 9px; height: 9px; border-radius: 50%; } .bf-car { font-size: 10px; opacity: .7; }
.bf-pn { font-size: 13.5px; color: #3b4a54; }
.bf-date { display: inline-flex; flex-direction: column; padding: 2px 12px 2px 0; margin-right: 6px; border-right: 1px solid var(--border); font-size: 13.5px; }
.bf-date:last-child { border-right: none; } .bf-date small { font-size: 11px; color: #8a93a6; }
.bf-lab { display: inline-flex; align-items: center; gap: 4px; } .bf-lab button { border: none; background: transparent; color: #8a93a6; cursor: pointer; font-size: 10px; padding: 0; }
.bf-label-in { border: none; background: transparent; font: inherit; font-size: 13.5px; padding: 4px 2px; width: 110px; outline: none; color: #3b4a54; }
.bf-sec { padding: 18px 0; border-bottom: 1px solid var(--border); }
.bf-sec-t { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: #111b21; margin-bottom: 10px; cursor: default; }
.bf-sec-t .ag-mini-btn { margin-left: auto; }
.bf-sec textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; }
.bf-sec textarea:focus { outline: none; border-color: #111b21; }
.bf-fields > summary { list-style: none; cursor: pointer; } .bf-fields > summary::-webkit-details-marker { display: none; }
.bf-fields > summary::before { content: '▾'; font-size: 11px; color: #8a93a6; margin-right: 4px; } .bf-fields:not([open]) > summary::before { content: '▸'; }
.bf-fields #dDet { max-width: none; }
.bf-files { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bf-file { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; }
.bf-thumb { width: 54px; height: 54px; border-radius: 8px; background: #f0f2f5 center/cover; flex: none; }
.bf-doc { width: 54px; height: 54px; border-radius: 8px; background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; flex: none; }
.bf-aud { flex: none; width: 260px; } .bf-aud .wa-aud { margin: 0; }
.bf-fi { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.bf-fi a { color: #111b21; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-fi small { color: #8a93a6; font-size: 11.5px; }
.bf-msg { max-width: 88%; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.bf-msg.in { align-self: flex-start; background: #fff; border: 1px solid var(--border); }
.bf-msg.out { align-self: flex-end; background: #e7fce3; } .bf-msg.out.auto { background: #eef2ff; }
.bf-msg-h { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 3px; } .bf-msg-h .bf-t { margin-left: auto; }
.bf-tag { font-size: 10.5px; font-weight: 700; color: #4338ca; background: #e0e7ff; border-radius: 999px; padding: 1px 7px; }
.bf-msg-b { color: #111b21; word-wrap: break-word; }
/* lateral um pouco mais larga pros nomes dos funis caberem */
.x4-secnav { width: 250px; } body.has-secnav { padding-left: 250px; }
.fn-name { font-size: 13.5px; }
.lsub { white-space: nowrap; }

/* ---------- perfil no topo (atualizar · lupa · foto) e X4 em círculo ---------- */
.head-filters .icon-btn[title="Atualizar"] { order: -1; }
.me-btn { width: 36px; height: 36px; border-radius: 50%; border: none; padding: 0; overflow: hidden; cursor: pointer; flex: none; background: #737373; color: #fff;
  font: inherit; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }
.me-btn img, .me-pop .rp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-btn:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #111b21; }
.me-out { display: block; width: 100%; margin-top: 8px; border: none; background: transparent; color: #54656f; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px; }
.me-out:hover { color: #e53935; }
.wa-rail-x4 .x4m-trigger { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }
.wa-rail-x4 .x4m-trigger:hover, .wa-rail-x4 .x4m-trigger.open { border-radius: 50%; background: #f0f2f5; }

/* código único do lead */
.lead-code { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: #f0f2f5; color: #667781; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; vertical-align: middle; }
.lf-code { margin-left: auto; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: #667781; background: #f0f2f5; padding: 2px 8px; border-radius: 6px; cursor: pointer; user-select: all; transition: background .12s, color .12s; }
.lf-code:hover { background: #111b21; color: #fff; }
.grp-money { margin-left: 12px; font-size: 12.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 2px 10px; }
.grp-money.rec { color: #15803d; background: #dcfce7; }

/* ---------- Kanban (quadro do funil) ---------- */
.kb-switch { display: none; gap: 2px; background: #f0f2f5; border-radius: 8px; padding: 2px; margin-left: 8px; }   /* a visão é escolhida pelas abas Pessoas/Funis */
.kb-sw-btn { display: grid; place-items: center; width: 30px; height: 26px; border: none; background: transparent; color: #8a93a6; border-radius: 6px; cursor: pointer; }
.kb-sw-btn:hover { color: #111b21; }
.kb-sw-btn.on { background: #fff; color: #111b21; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.kanban-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.kb-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border,#e9edef); flex: none; }
.kb-top > b { font-size: 14px; color: #111b21; }
.kb-top-i { font-size: 12.5px; font-weight: 700; color: #54656f; background: #f0f2f5; border-radius: 999px; padding: 3px 11px; }
.kb-top-i.rec { color: #15803d; background: #dcfce7; }
.kb-top-i.mesa { color: #b45309; background: #fef3c7; }
.kb-board { flex: 1; min-height: 0; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 14px 16px; align-items: flex-start; }
.kb-col { flex: 0 0 272px; max-width: 272px; display: flex; flex-direction: column; max-height: 100%; background: #f7f8fa; border: 1px solid var(--border,#e9edef); border-radius: 12px; }
.kb-col-h { padding: 10px 12px; border-bottom: 1px solid var(--border,#e9edef); border-top: 3px solid var(--c,#9e9e9e); border-radius: 12px 12px 0 0; }
.kb-col-t { display: flex; align-items: center; gap: 7px; }
.kb-col-t b { font-size: 13px; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c,#9e9e9e); flex: none; }
.kb-n { margin-left: auto; font-size: 12px; font-weight: 700; color: #54656f; background: #eceff1; border-radius: 999px; padding: 1px 8px; flex: none; }
.kb-col-money { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kb-col-money .kb-rec { font-size: 12px; font-weight: 700; color: #15803d; }
.kb-col-money .kb-rec.zero { color: #9aa4ab; }
.kb-col-money .kb-mesa { font-size: 11.5px; font-weight: 700; color: #6b7280; }
.kb-cards { flex: 1; min-height: 40px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kb-cards.over { background: #e8f0fe; outline: 2px dashed #94b7f5; outline-offset: -4px; border-radius: 8px; }
.kb-empty { color: #aeb6bd; font-size: 12px; text-align: center; padding: 12px 0; }
.kb-card { background: #fff; border: 1px solid var(--border,#e9edef); border-radius: 10px; padding: 9px 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kb-card:hover { border-color: #cfd6da; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.kb-card.dragging { opacity: .5; }
.kb-card-top { display: flex; align-items: center; gap: 8px; }
.kb-card-nm { font-size: 13px; font-weight: 600; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-card-money { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0 32px; }
.kb-card-money .kb-rec { font-size: 12px; font-weight: 700; color: #15803d; }
.kb-card-money .kb-mesa { font-size: 11.5px; font-weight: 700; color: #b45309; }
/* ícones $ no card: verde = receita, cor-mesa = na mesa (valor no hover) */
.kb-card-money .kb-ic { display: inline-flex; align-items: center; cursor: default; }
.kb-card-money .kb-ic.rec { color: #15803d; }
.kb-card-money .kb-ic.mesa { color: #b45309; }
/* valor do orçamento editável no Financeiro (parece texto, vira campo ao focar) */
.fin-edit-v { width: 100%; max-width: 120px; border: 1px solid transparent; background: transparent; font: inherit; font-weight: 700; color: inherit; padding: 1px 5px; border-radius: 5px; box-sizing: border-box; }
.fin-edit-v:hover { background: rgba(0,0,0,.05); }
.fin-edit-v:focus { border-color: var(--blue, #0062c4); background: #fff; outline: none; }
.kb-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 32px; }
.kb-card-foot { display: flex; align-items: center; gap: 8px; margin: 7px 0 0 32px; }
.kb-card-foot .muted { margin-left: auto; font-size: 11px; }
body.nav-collapsed .kb-col { flex-basis: 272px; }

/* ---------- ficha em seções ---------- */
.lf-sec { padding: 14px 16px 16px; border-bottom: 6px solid #f0f2f5; }
.lf-sec-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #111b21; margin-bottom: 10px; }
.lf-sec .field-mini { display: block; margin: 10px 0 4px; }
.lf-sec input:not([type=checkbox]), .lf-sec select, .lf-sec textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.lf-sec input:focus, .lf-sec textarea:focus { outline: none; border-color: #111b21; }
.lf-sec input:disabled { background: #f5f6f6; color: #8a93a6; }
/* Notas e textos longos: largura fixa (não arrasta pros lados), mas dá pra esticar pra baixo p/ escrever mais */
.lf-sec textarea { resize: vertical; min-height: 92px; }
/* Agendamentos na ficha (sincroniza com a Agenda) */
.lf-appt-form { margin: 2px 0 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.lf-appt-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.lf-appt-list { display: flex; flex-direction: column; gap: 6px; }
.lf-appt-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.lf-appt-item i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lf-appt-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lf-appt-tx b { font-size: 13.5px; }
.lf-appt-tx span { font-size: 12px; color: #667781; text-transform: capitalize; }
.lf-appt-item.past { opacity: .55; }
.lf-appt-del { border: none; background: transparent; color: #a3adb5; cursor: pointer; font-size: 13px; padding: 2px 4px; flex: none; }
.lf-appt-del:hover { color: #e53935; }
.lf-sec .lf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lf-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lf-lock { font-size: 11px; }
.lf-money { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 14px; padding: 14px 16px; border: 1px solid #111b21;
  border-radius: 12px; background: #111b21; cursor: pointer; font: inherit; text-align: left; }
.lf-money:hover { filter: brightness(1.25); }
.lf-money small { display: block; font-size: 11.5px; color: #aeb6bd; font-weight: 600; }
.lf-money b { font-size: 26px; letter-spacing: -.02em; color: #fff; }
.lf-money-r { text-align: right; } .lf-money-r em { font-style: normal; font-size: 13px; font-weight: 700; color: #fff; }
.lf-more { margin-top: 10px; } .lf-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #54656f; list-style: none; }
.lf-more summary::-webkit-details-marker { display: none; } .lf-more summary::before { content: '＋ '; } .lf-more[open] summary::before { content: '－ '; }
.lf-link { margin-left: auto; border: none; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: #111b21; cursor: pointer; }
.lf-chks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.lf-chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.lf-chk input { width: 16px; height: 16px; accent-color: #111b21; }
.lf-full-only { display: none; }
.bf-overlay.full .lf-full-only { display: block; }
.lf-calls-sec .field-label { display: none; }

/* ---------- Financeiro (lateral ou popup) ---------- */
.fin-wrap { position: fixed; inset: 0; z-index: 1450; }
.fin-side { background: rgba(11,20,26,.12); }
.fin-side .fin-card { position: absolute; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); border-radius: 0; box-shadow: -10px 0 40px rgba(11,20,26,.18); }
.fin-modal { background: rgba(11,20,26,.35); display: flex; align-items: center; justify-content: center; padding: 3vh 2vw; }
.fin-modal .fin-card { width: min(820px, 100%); max-height: 92vh; border-radius: 16px; box-shadow: 0 24px 60px rgba(11,20,26,.3); }
.fin-card { background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.fin-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 16px; }
.fin-x { border: none; background: transparent; color: #a3adb5; cursor: pointer; font-size: 13px; padding: 2px 6px; } .fin-x:hover { color: #e53935; }
.fin-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.fin-sum { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.fin-sum > div { padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.fin-sum small { display: block; font-size: 11.5px; color: #667781; font-weight: 600; } .fin-sum b { font-size: 16px; }
.fin-rev { background: #111b21; border-color: #111b21 !important; } .fin-rev small { color: #a3adb5; } .fin-rev b { color: #fff; font-size: 24px; }
.fin-table b, .fin-nums .fin-table { color: #b45309; }
.fin-sec-t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 6px 0 10px; } .fin-sec-t .ag-mini-btn:first-of-type { margin-left: auto; }
.fin-buds { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.fin-bud { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.fin-bud.perdido { opacity: .55; } .fin-bud.fechado { border-color: #bbf7d0; background: #f7fef9; }
.fin-bud-h { display: flex; align-items: center; gap: 8px; } .fin-bud-h b { flex: 1; font-size: 14.5px; }
.fin-bud-h select, .fin-bud-h .x4sel { padding: 4px 10px; font-size: 12.5px; border-radius: 999px; }
.fin-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 8px; font-size: 14px; font-weight: 700; }
.fin-nums small { display: block; font-size: 11px; color: #8a93a6; font-weight: 600; }
.fin-bar { height: 6px; border-radius: 999px; background: #f0f2f5; overflow: hidden; } .fin-bar i { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.fin-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.fin-acts button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fin-acts button:hover { border-color: #111b21; } .fin-acts .muted { margin-left: auto; }
.fin-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; padding: 10px; background: #fafbfc; border-radius: 10px; }
.fin-form input, .fin-form select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13.5px; flex: 1 1 120px; min-width: 0; }
.fin-hist { display: flex; flex-direction: column; }
.fin-ent { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; }
.fin-ent-k { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.fin-ent-k.desconto { background: #fee2e2; color: #b91c1c; }
.fin-ent-b { flex: 1; min-width: 0; } .fin-ent-m { flex: none; text-align: right; font-size: 13px; } .fin-ent-m small { display: block; color: #8a93a6; font-size: 11.5px; }
.fm-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.fm-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .fm-h small { margin-left: auto; color: #8a93a6; }
.fm-src { font-size: 11px; font-weight: 700; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 2px 8px; }
.fm-qa { padding: 6px 0; border-top: 1px solid #f5f6f6; } .fm-qa small { display: block; color: #8a93a6; font-size: 12px; } .fm-qa span { font-size: 14px; }
@media (max-width: 640px) { .fin-sum, .fin-nums { grid-template-columns: 1fr 1fr; } }
.inbox-head .head-filters { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.inbox-head .head-filters .inbox-search { flex: 0 1 300px; min-width: 170px; }
.lf-sec .x4sel { width: 100%; }
.fin-side .fin-sum { grid-template-columns: 1fr 1fr; }
.fin-side .fin-nums { grid-template-columns: 1fr 1fr; }
.inbox-head .head-filters .inbox-search { min-width: 0; flex: 1 1 240px; }
.inbox-head .lead-subnav { flex: none; }

/* ===== CRM: busca menor + ficha com fundo branco ===== */
.inbox-head .head-filters .inbox-search { flex: 0 1 220px !important; min-width: 140px; max-width: 220px; padding: 7px 12px; font-size: 13.5px; }
#detailPanel, #detailPanel #dDet, .crm-ficha, .bf-left, .bf-left #dDet { background: #fff; }
.lf-sec { border-bottom: 1px solid #eef0f2; background: #fff; }

/* ===== Marketing: biblioteca de estratégias (Cadência · SMS · E-mail) ===== */
.lib-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 28px 60px; }
.lib-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.lib-head h1 { margin: 0; }
.lib-plus { width: 40px; height: 40px; border-radius: 50%; border: none; background: #111b21; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(17,27,33,.18); }
.lib-plus:hover { background: #2a3942; }
.lib-cfg { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.lib-cfg:hover { border-color: #111b21; }
.lib-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0a020; }
.lib-cfg.ok .lib-dot { background: #25a55f; }
.lib-sec { margin-top: 10px; }
.lib-sec-t { font-size: 14px; font-weight: 700; color: #111b21; margin: 14px 0 10px; }
.lib-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-tools .inbox-search { flex: 0 1 260px; padding: 8px 12px; font-size: 13.5px; }
.lib-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-cats button { border: 1px solid var(--border); background: #fff; color: #667781; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.lib-cats button.on { background: #111b21; border-color: #111b21; color: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lib-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; font: inherit; color: #3b4a54; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.lib-card:hover { border-color: #111b21; box-shadow: 0 6px 18px rgba(17,27,33,.08); transform: translateY(-1px); }
.lib-card > b { font-size: 15px; color: #111b21; line-height: 1.3; }
.lib-card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lib-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.lib-ico svg { width: 17px; height: 17px; }
.lib-whatsapp { background: #e7f8ee; color: #128c4b; } .lib-sms { background: #eef2ff; color: #4338ca; } .lib-email { background: #fff4e5; color: #c2410c; }
.lib-cat { font-size: 11.5px; font-weight: 700; color: #667781; background: #f0f2f5; border-radius: 999px; padding: 3px 9px; }
.lib-desc { font-size: 13px; color: #667781; line-height: 1.45; }
.lib-bubble { margin-top: 6px; background: #f5f6f6; border-radius: 10px 10px 10px 2px; padding: 8px 10px; font-size: 12.5px; color: #3b4a54; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card-f { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; font-size: 12px; color: #8a93a6; }
.lib-card-f em { font-style: normal; font-weight: 700; color: #111b21; opacity: 0; transition: opacity .15s; }
.lib-card:hover .lib-card-f em { opacity: 1; }
.lib-blank { align-items: center; justify-content: center; text-align: center; border-style: dashed; min-height: 200px; color: #667781; }
.lib-blank b { color: #111b21; }
.lib-blank-i { width: 44px; height: 44px; border-radius: 50%; background: #111b21; color: #fff; display: grid; place-items: center; font-size: 24px; line-height: 1; margin-bottom: 6px; }
.lib-mine { display: flex; flex-direction: column; gap: 8px; }
.lib-mine-c { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.lib-mine-b { flex: 1; min-width: 0; } .lib-mine-b b { display: block; color: #111b21; font-size: 14px; } .lib-mine-b span { font-size: 12.5px; color: #8a93a6; }
.lib-cfg-card { width: min(520px, 100%); }
.lib-cfg-card .field-mini { display: block; margin: 10px 0 4px; font-size: 12.5px; font-weight: 600; color: #3b4a54; }
.lib-cfg-card input { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; box-sizing: border-box; }
.lib-cfg-card .lf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lib-help { font-size: 13.5px; color: #3b4a54; line-height: 1.5; margin: 0 0 8px; }
.lib-steps { font-size: 13px; color: #3b4a54; line-height: 1.5; padding-left: 18px; margin: 4px 0 8px; }
.lib-warn { font-size: 12.5px; color: #667781; background: #f5f6f6; border-radius: 10px; padding: 9px 11px; margin: 12px 0 0; line-height: 1.45; }
.lib-presets { display: flex; gap: 6px; margin: 4px 0 2px; flex-wrap: wrap; }
.lib-presets button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.lib-presets button:hover { border-color: #111b21; }
.lib-test { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef0f2; }
.lib-test input { flex: 1; }
@media (max-width: 640px) { .lib-wrap { padding: 16px; } .lib-cfg-card .lf-two { grid-template-columns: 1fr; } .lib-mine-c { flex-wrap: wrap; } }

/* ===== Construtor: canais (SMS/E-mail), nó selecionado e prévia no celular ===== */
.fb-node.fb-sms .fb-node-head { background: #eef2ff; color: #4338ca; }
.fb-node.fb-email .fb-node-head { background: #fff4e5; color: #c2410c; }
.fb-node.sel { border-color: #2f6bed; box-shadow: 0 0 0 3px rgba(47,107,237,.15), 0 2px 6px rgba(0,0,0,.1); }
.fb-ch { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.fb-ch-whatsapp { background: #e7f8ee; color: #128c4b; } .fb-ch-sms { background: #eef2ff; color: #4338ca; } .fb-ch-email { background: #fff4e5; color: #c2410c; }
.fb-vars { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: #8a93a6; }
.fb-vars button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12px; cursor: pointer; color: #3b4a54; }
.fb-vars button:hover { border-color: #111b21; }
.fb-count { margin-top: 6px; font-size: 12px; color: #667781; } .fb-count.warn b { color: #c2410c; }
.fb-prev { width: 290px; flex: none; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px; border-left: 1px solid var(--border); background: #f7f8fa; overflow-y: auto; }
.fb-prev-t { font-size: 12px; font-weight: 700; color: #667781; text-transform: uppercase; letter-spacing: .04em; }
.fb-prev .iphone { zoom: .84; flex: none; }
.fb-prev .wa-bubble { max-width: 88%; }
.fb-wa-btn { margin: 6px -9px -6px; padding: 9px; border-top: 1px solid #eef0f2; text-align: center; color: #027eb5; font-weight: 600; font-size: 14px; }
.iphone-screen.fb-ph-sms, .iphone-screen.fb-ph-email { background: #fff; display: flex; flex-direction: column; }
.fb-ph-sb { color: #111; padding: 16px 26px 6px; font-size: 13px; font-weight: 600; }
.fb-sms-h { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 10px; border-bottom: 1px solid #eef0f2; background: #f7f7f8; }
.fb-sms-av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(#a8adb7, #858a94); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.fb-sms-h b { font-size: 13px; color: #111; } .fb-sms-h small { font-size: 11px; color: #8a8a8e; }
.fb-sms-chat { flex: 1; overflow-y: auto; padding: 14px 12px; }
.fb-sms-b { max-width: 82%; background: #e9e9eb; color: #111; border-radius: 18px; padding: 9px 13px; font-size: 14px; line-height: 1.35; word-break: break-word; }
.fb-sms-in { padding: 8px 12px 26px; } .fb-sms-in span { display: block; border: 1px solid #d8d8dc; border-radius: 999px; padding: 7px 14px; font-size: 13px; color: #b0b0b5; }
.fb-mail-h { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.fb-mail-h .fb-sms-av { width: 34px; height: 34px; font-size: 14px; }
.fb-mail-h b { display: block; font-size: 13px; color: #111; } .fb-mail-h small { font-size: 11px; color: #8a8a8e; }
.fb-mail-s { padding: 2px 14px 10px; font-size: 16px; font-weight: 700; color: #111; border-bottom: 1px solid #eef0f2; }
.fb-mail-f { flex: 1; width: 100%; border: 0; background: #f4f5f7; }
@media (max-width: 1100px) { .fb-prev { display: none !important; } }
.lib-bubble { line-height: 1.4; max-height: calc(2.8em + 16px); }
/* com a configuração aberta, a paleta recolhe pra sobrar canvas */
.fb-cfg[style*="block"] ~ .fb-palette { width: 30px; }
.fb-cfg[style*="block"] ~ .fb-palette .fb-pal-inner { display: none; }

/* ===== Editor visual de e-mail (blocos) ===== */
.ee { position: fixed; inset: 0; z-index: 1500; background: #fff; display: flex; flex-direction: column; }
.ee-top { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.ee-top > b { font-size: 17px; color: #111b21; }
.ee-back { border: 0; background: none; font: inherit; font-size: 13px; color: #667781; cursor: pointer; }
.ee-ico { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; color: #3b4a54; cursor: pointer; }
.ee-ico:hover { border-color: #111b21; }
.ee-warn { margin: 10px 18px 0; background: #fdecec; color: #c0392b; border-radius: 10px; padding: 9px 14px; font-size: 13px; }
.ee-body { flex: 1; min-height: 0; display: flex; }
.ee-left { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.ee-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 16px; border-bottom: 1px solid var(--border); min-height: 52px; box-sizing: border-box; font-size: 13px; }
.ee-tl { font-weight: 700; color: #111b21; margin-right: 4px; }
.ee-tools select, .ee-in { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; background: #fff; }
.ee-in { width: 220px; } .ee-wide { width: 280px; }
.ee-grp { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ee-grp button { border: 0; background: #fff; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 14px; color: #3b4a54; }
.ee-grp button + button { border-left: 1px solid var(--border); }
.ee-grp button.on, .ee-grp button:hover { background: #f0f2f5; color: #111b21; }
.ee-color { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #667781; cursor: pointer; }
.ee-color input { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 7px; padding: 1px; background: #fff; cursor: pointer; }
.ee-rng { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #667781; }
.ee-tb { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ee-tb:hover { border-color: #111b21; }
.ee-vars button { border: 1px dashed #c4c9d0; background: #fff; border-radius: 999px; padding: 4px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.ee-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.ee-links span { display: inline-flex; gap: 4px; } .ee-links input { border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; width: 130px; }
.ee-links input.ee-need { border-color: #e8665a; background: #fff6f5; }
.ee-links span button { border: 0; background: none; color: #8a93a6; cursor: pointer; }
.ee-links em { font-style: normal; font-size: 12px; color: #8a93a6; }
.ee-canvas { flex: 1; overflow-y: auto; padding: 26px 20px 60px; }
.ee-mail { max-width: 600px; margin: 0 auto; border-radius: 14px; padding: 10px 0 20px; box-shadow: 0 2px 14px rgba(17,27,33,.06); }
.ee-b { position: relative; padding: 6px 32px; border: 1.5px solid transparent; }
.ee-b:hover { border-color: #c7d2fe; } .ee-b.sel { border-color: #6366f1; }
.ee-b h1 { margin: 6px 0; line-height: 1.25; outline: none; }
.ee-rt { line-height: 1.6; outline: none; min-height: 1.6em; } .ee-rt a { color: inherit; }
.ee-btn { display: inline-block; padding: 12px 26px; font-weight: 700; font-size: 15px; outline: none; min-width: 40px; }
.ee-drop { border: 1.5px dashed #c4c9d0; border-radius: 12px; background: #f7f8fa; padding: 34px 10px; text-align: center; color: #667781; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ee-drop i { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; font-style: normal; }
.ee-drop.over { border-color: #6366f1; background: #eef2ff; }
.ee-sp { background: repeating-linear-gradient(45deg, transparent 0 6px, #f5f6f6 6px 8px); }
.ee-foot { text-align: center; font-size: 12.5px; color: #667781; padding: 14px 0 4px; border-top: 1px solid #eef0f2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ee-foot img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.ee-foot b { color: #111b21; font-size: 14px; } .ee-foot u { color: #3b4a54; } .ee-foot u.ee-bad { color: #e8665a; }
.ee-muted { color: #b0b6bf; }
.ee-acts { position: absolute; left: -44px; top: 4px; display: none; flex-direction: column; gap: 2px; }
.ee-b:hover .ee-acts, .ee-b.sel .ee-acts { display: flex; }
.ee-acts button { width: 30px; height: 26px; border: 1px solid var(--border); background: #fff; border-radius: 7px; cursor: pointer; font-size: 12px; color: #3b4a54; }
.ee-plus { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; border: 0; background: #6366f1; color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: none; z-index: 2; }
.ee-b:hover .ee-plus, .ee-b.sel .ee-plus { display: block; }
.ee-addend { display: block; margin: 18px auto 0; border: 1.5px dashed #c4c9d0; background: #fff; border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 13px; color: #3b4a54; cursor: pointer; }
.ee-addmenu { position: fixed; z-index: 1600; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 8px; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 250px; }
.ee-addmenu button { border: 0; background: none; border-radius: 10px; padding: 8px 2px; font: inherit; font-size: 11.5px; color: #3b4a54; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ee-addmenu button:hover { background: #f0f2f5; }
.ee-addmenu i { font-style: normal; width: 30px; height: 30px; border-radius: 8px; background: #f0f2f5; display: grid; place-items: center; font-weight: 700; color: #111b21; }
.ee-right { width: 360px; flex: none; background: #f4f5f7; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 10px; overflow-y: auto; }
.ee-notif { width: 280px; display: flex; gap: 10px; background: rgba(255,255,255,.92); border-radius: 14px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); font-size: 12.5px; }
.ee-notif i { font-style: normal; width: 30px; height: 30px; border-radius: 8px; background: #111b21; color: #fff; display: grid; place-items: center; flex: none; }
.ee-notif b { display: block; color: #111b21; } .ee-notif span { display: block; color: #3b4a54; } .ee-notif small { display: block; color: #8a93a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.ee-seg { display: inline-flex; background: #e6e8eb; border-radius: 999px; padding: 3px; }
.ee-seg button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; color: #667781; cursor: pointer; }
.ee-seg button.on { background: #fff; color: #111b21; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ee-phone { zoom: .88; }
.ee-ib-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 14px 8px; font-size: 14px; color: #007aff; }
.ee-ib-h b { color: #111; font-size: 15px; }
.ee-ib-s { margin: 0 12px 6px; background: #eeeef0; border-radius: 10px; padding: 7px 10px; font-size: 13px; color: #8a8a8e; }
.ee-ib-row { padding: 9px 14px 9px 24px; border-bottom: 1px solid #f0f0f2; position: relative; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ee-ib-row > div { display: flex; justify-content: space-between; } .ee-ib-row b { color: #111; } .ee-ib-row em { font-style: normal; color: #8a8a8e; font-size: 12px; }
.ee-ib-row span { color: #111; } .ee-ib-row small { color: #8a8a8e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ee-ib-row.new > i { position: absolute; left: 9px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: #007aff; }
.ee-ib-row.ghost b, .ee-ib-row.ghost span, .ee-ib-row.ghost small { display: block; height: 9px; border-radius: 5px; background: #eef0f2; }
.ee-ib-row.ghost b { width: 40%; } .ee-ib-row.ghost span { width: 70%; } .ee-ib-row.ghost small { width: 85%; }
@media (max-width: 1000px) { .ee-right { display: none; } .ee-acts { left: 2px; top: -28px; flex-direction: row; } }

/* ===== Listas e segmentos ===== */
.ls-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.ls-tabs button { border: 0; background: none; padding: 9px 14px; font: inherit; font-size: 14px; color: #667781; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ls-tabs button.on { color: #111b21; font-weight: 700; border-color: #111b21; }
.ls-concepts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.ls-concepts div { background: #f7f8fa; border-radius: 10px; padding: 9px 11px; font-size: 12px; color: #667781; line-height: 1.4; }
.ls-concepts b { display: block; color: #111b21; font-size: 13px; margin-bottom: 2px; }
.ls-tablewrap { border: 1px solid var(--border); border-radius: 12px; overflow: auto; background: #fff; }
.ls-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ls-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #8a93a6; font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.ls-table td { padding: 10px 14px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.ls-click { cursor: pointer; } .ls-click:hover { background: #fafbfc; }
.ls-go { color: #111b21; font-weight: 600; font-size: 13px; text-align: right; white-space: nowrap; }
.ls-nm { display: inline-flex; align-items: center; gap: 10px; } .ls-nm small { display: block; color: #8a93a6; font-size: 12px; }
.ls-nm .lib-ico { width: 28px; height: 28px; }
.ls-empty { text-align: center; color: #8a93a6; padding: 28px !important; }
.ls-h2 { margin: 10px 0 2px; font-size: 20px; }
.ls-models { margin-top: 6px; }
.ls-dhead { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; }
.ls-name { font-size: 20px; font-weight: 700; color: #111b21; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; font-family: inherit; min-width: 200px; }
.ls-name:hover, .ls-name:focus { border-color: var(--border); outline: none; }
.ls-kind { font-size: 12px; font-weight: 700; color: #667781; background: #f0f2f5; border-radius: 999px; padding: 4px 10px; }
.ls-builder { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; margin-bottom: 14px; }
.ls-bt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.ls-match { font-size: 13px; color: #667781; } .ls-match select { border: 1px solid var(--border); border-radius: 7px; padding: 4px 6px; font: inherit; }
.ls-cond { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f7f8fa; border-radius: 10px; padding: 9px 10px; font-size: 13px; color: #667781; }
.ls-cond select, .ls-cond input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; background: #fff; }
.ls-fsel { font-weight: 600; color: #111b21; }
.ls-num { width: 70px; }
.ls-val { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ls-glue { position: relative; text-align: left; margin: 6px 0; height: 14px; }
.ls-glue::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; border-top: 1px solid #e6e8eb; }
.ls-glue span { position: relative; background: #fff; font-size: 11px; font-weight: 700; color: #6366f1; padding: 0 8px 0 0; }
.ls-x { border: 0; background: none; color: #8a93a6; cursor: pointer; font-size: 14px; } .ls-x:hover { color: #c0392b; }
.ls-add { margin-top: 10px; border: 1px dashed #c4c9d0; background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.ls-bfoot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef0f2; flex-wrap: wrap; }
.ls-static { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ls-find { position: relative; flex: 1; min-width: 220px; }
.ls-find input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13.5px; }
#dFindRes { position: absolute; left: 0; right: 0; top: 40px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; overflow: hidden; }
#dFindRes button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 9px 14px; font: inherit; cursor: pointer; } #dFindRes button:hover { background: #f5f6f6; }
#dFindRes small { display: block; color: #8a93a6; font-size: 12px; }
.ls-rescount { font-size: 14px; color: #3b4a54; margin: 6px 0 8px; } .ls-rescount b { color: #111b21; font-size: 16px; }
.ls-chip { display: inline-block; background: #f0f2f5; border-radius: 999px; padding: 2px 8px; margin: 1px 3px 1px 0; font-size: 11.5px; color: #3b4a54; }
.ls-unsub { font-size: 11px; color: #c0392b; background: #fdecec; border-radius: 999px; padding: 1px 7px; }
@media (max-width: 900px) { .ls-concepts { grid-template-columns: 1fr 1fr; } }

/* ===== Campanha de e-mail (estilo Brevo) ===== */
.cp-wrap { max-width: 900px; }
.cp-crumb { font-size: 13px; color: #667781; margin-bottom: 8px; } .cp-crumb a { color: #667781; } .cp-crumb span { color: #111b21; font-weight: 600; }
.cp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-head #cpActions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-status { font-size: 12px; font-weight: 700; color: #667781; background: #f0f2f5; border-radius: 999px; padding: 4px 10px; }
.cp-status.sch { background: #fff4e5; color: #c2410c; } .cp-status.run { background: #eef2ff; color: #4338ca; } .cp-status.ok { background: #e3f4e7; color: #1a7f37; }
.cp-test { display: inline-flex; gap: 6px; } .cp-test input { border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; width: 180px; }
.cp-warnlink { font-size: 13px; color: #c2410c; font-weight: 600; }
.cp-card { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.cp-row { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px; border-bottom: 1px solid #eef0f2; }
.cp-row:last-child { border-bottom: 0; }
.cp-ok { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d0d5db; flex: none; margin-top: 2px; box-sizing: border-box; }
.cp-ok.done { background: #1a7f37; border-color: #1a7f37; position: relative; }
.cp-ok.done::after { content: '✓'; color: #fff; font-size: 12px; font-style: normal; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; }
.cp-main { flex: 1; min-width: 0; } .cp-main > b { font-size: 18px; color: #111b21; }
.cp-sum { font-size: 14px; color: #3b4a54; margin-top: 4px; line-height: 1.5; }
.cp-miss { color: #8a93a6; }
.cp-btn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13.5px; font-weight: 600; color: #111b21; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cp-btn:hover { border-color: #111b21; }
.cp-edit { display: none; margin-top: 12px; }
.cp-row.editing .cp-edit { display: block; } .cp-row.editing .cp-sum, .cp-row.editing .cp-btn { display: none; }
.cp-edit input:not([type=checkbox]) { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; }
.cp-edit .field-mini { display: block; margin: 10px 0 4px; font-size: 12.5px; font-weight: 600; }
.cp-edit .lf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-ebtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cp-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cp-li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 13.5px; }
.cp-li:has(input:checked) { border-color: #111b21; background: #fafbfc; }
.cp-li .lib-ico { width: 26px; height: 26px; font-size: 13px; } .cp-li small { margin-left: auto; color: #8a93a6; font-size: 12px; white-space: nowrap; }
.cp-chk { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; }
.cp-thumb { margin-top: 12px; width: 300px; height: 300px; border-radius: 12px; overflow: hidden; background: #f4f5f7; border: 1px solid var(--border); cursor: pointer; position: relative; }
.cp-thumb iframe { width: 640px; height: 640px; border: 0; transform: scale(.47); transform-origin: 0 0; pointer-events: none; }
.cp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.cp-stats div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.cp-stats span { display: block; font-size: 12px; color: #667781; font-weight: 600; } .cp-stats b { font-size: 22px; color: #111b21; } .cp-stats small { font-size: 12px; color: #1a7f37; }
.cp-sends { margin-top: 18px; }
@media (max-width: 700px) { .cp-row { flex-wrap: wrap; } .cp-lists, .cp-edit .lf-two { grid-template-columns: 1fr; } .cp-stats { grid-template-columns: 1fr 1fr; } }
.ls-tablink { margin-left: auto; align-self: center; font-size: 13px; color: #3b4a54; font-weight: 600; }

/* ===== Construtor: WhatsApp gratuito/pago, templates, áudio, e-mail ===== */
.fb-cfg { width: 340px; }
.fb-lbl { font-size: 14px; font-weight: 700; color: #111b21; margin: 14px 0 8px; }
.fb-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-mode button { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 10px 11px; font: inherit; cursor: pointer; }
.fb-mode button b { display: block; font-size: 13px; color: #111b21; } .fb-mode button span { font-size: 11.5px; color: #8a93a6; line-height: 1.35; display: block; margin-top: 2px; }
.fb-mode button.on { border-color: #111b21; box-shadow: 0 0 0 1px #111b21; }
.fb-sub { display: grid; grid-auto-flow: column; gap: 6px; margin: 10px 0; }
.fb-sub button { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 7px 6px; font: inherit; font-size: 12.5px; color: #3b4a54; cursor: pointer; }
.fb-sub button.on { background: #111b21; border-color: #111b21; color: #fff; }
.fb-search { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; }
.fb-tplhead { display: flex; justify-content: space-between; font-size: 12.5px; color: #667781; margin: 4px 0 8px; } .fb-tplhead a { color: #2f6bed; font-weight: 600; }
.fb-tpls { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-bottom: 10px; }
.fb-tpl { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 11px; font: inherit; cursor: pointer; }
.fb-tpl b { display: block; font-size: 13px; color: #111b21; } .fb-tpl span { font-size: 12px; color: #667781; line-height: 1.4; }
.fb-tpl.on { border-color: #25a55f; background: #f2fbf5; }
.fb-tpl-empty { border: 1px solid var(--border); border-radius: 12px; padding: 28px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fb-tpl-empty span { font-size: 30px; } .fb-tpl-empty b { color: #111b21; } .fb-tpl-empty small { color: #8a93a6; }
.fb-rec { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.fb-rec-bar { display: flex; align-items: center; gap: 10px; background: #f0f2f5; border-radius: 999px; padding: 6px 12px 6px 6px; }
.fb-rec-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #d4f36b; color: #111b21; font-size: 13px; cursor: pointer; flex: none; }
.fb-rec-btn.on { background: #e8665a; color: #fff; animation: x4pulse 1s infinite; }
@keyframes x4pulse { 50% { opacity: .6; } }
.fb-wave { flex: 1; height: 16px; background: radial-gradient(circle, #9aa3ad 1.4px, transparent 1.6px) 0 50% / 6px 6px repeat-x; }
.fb-rec audio { width: 100%; height: 34px; }
.fb-rec-acts { display: flex; gap: 6px; } .fb-rec-acts label { cursor: pointer; }
.fb-editmail { width: 100%; margin: 14px 0 8px; border: 0; background: #d4f36b; color: #111b21; border-radius: 999px; padding: 11px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fb-editmail:hover { filter: brightness(.95); }
.fb-wa-media { background: #e9edef; border-radius: 6px; padding: 26px 0; text-align: center; color: #667781; font-size: 12px; margin: -3px -4px 6px; }
.fb-wa-foot { color: #8696a0; font-size: 12px; margin-top: 4px; }
.fb-wa-audio { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.fb-wa-av { width: 34px; height: 34px; border-radius: 50%; background: #dfe5e7; color: #54656f; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.fb-wa-play { color: #54656f; font-size: 15px; }
.fb-wa-dur { display: flex; justify-content: space-between; font-size: 11px; color: #667781; padding-left: 64px; }
.fb-mseg { margin-bottom: 8px; }
.lf-lists { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 36px; }
.lf-lchip { display: inline-flex; align-items: center; gap: 4px; background: #e7f8ee; color: #128c4b; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.lf-lchip.segment { background: #eef2ff; color: #4338ca; }
.lf-lchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 11px; padding: 0; }
.lf-ladd { border: 1px dashed #c4c9d0 !important; border-radius: 999px !important; padding: 3px 8px !important; font-size: 12px !important; width: auto !important; background: #fff; }

/* ===== Menu lateral recolhível (botão na emenda) ===== */
.x4-secnav, .bi2-nav, .ag-nav { position: relative; }
.x4-secnav { position: fixed; }
.x4-collapse { position: fixed; top: 59px; left: 0; z-index: 30; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: #3b4a54; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: grid; place-items: center; padding: 0 0 2px; }
.x4-collapse:hover { border-color: #111b21; color: #111b21; }
body.nav-collapsed .x4-secnav { width: 64px; }
body.nav-collapsed.has-secnav { padding-left: 64px; }
body.nav-collapsed .x4-secnav a span, body.nav-collapsed .x4-secnav .x4m-name, body.nav-collapsed .x4-secnav .x4m-chev,
body.nav-collapsed .bi2-nav a span, body.nav-collapsed .bi2-nav .x4m-name, body.nav-collapsed .bi2-nav .x4m-chev,
body.nav-collapsed .ag-nav .x4m-name, body.nav-collapsed .ag-nav .x4m-chev { display: none; }
body.nav-collapsed .x4-secnav-title, body.nav-collapsed .bi2-nav-title { padding-left: 14px !important; padding-right: 0 !important; }
body.nav-collapsed .x4-secnav > *:not(.x4-secnav-title):not(a):not(.x4-collapse):not(.fn-tree):not(#x4SideBody) { display: none; }
body.nav-collapsed .bi2 { grid-template-columns: 64px minmax(0, 1fr) 320px; }
body.nav-collapsed .ag { grid-template-columns: 64px minmax(0, 1fr); }
body.nav-collapsed .ag-nav > *:not(.bi2-nav-title):not(.x4-collapse):not(.ag-modes) { display: none; }
@media (max-width: 1200px) { body.nav-collapsed .bi2 { grid-template-columns: 64px minmax(0, 1fr); } }
/* Menu recolhido: mostra só os ícones das opções da seção (CRM/SDR e Agenda) */
body.nav-collapsed .x4-secnav .fn-tree, body.nav-collapsed .x4-secnav #x4SideBody { padding: 4px 0; overflow: visible; }
body.nav-collapsed .fn-all, body.nav-collapsed .fn-head, body.nav-collapsed .wa-src { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
body.nav-collapsed .fn-name, body.nav-collapsed .fn-tx, body.nav-collapsed .fn-tree em,
body.nav-collapsed .fn-head small, body.nav-collapsed .fn-edit, body.nav-collapsed .fn-car,
body.nav-collapsed .fn-stages, body.nav-collapsed .fn-new { display: none; }
body.nav-collapsed .x4-secnav .fn-ic, body.nav-collapsed .x4-secnav .wa-src-ic { display: inline-grid; place-items: center; }
body.nav-collapsed .ag-modes { padding: 0; gap: 2px; }
body.nav-collapsed .ag-modes button { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
body.nav-collapsed .ag-mode-tx { display: none; }
.x4m-ext svg { width: 14px; height: 14px; }

/* ===== WhatsApp: data no chat, hora na lista, ligar em 2 cliques, histórico de ligações ===== */
.msg-day { align-self: center; margin: 6px 0 2px; position: sticky; top: 4px; z-index: 2; }
.msg-day span { display: inline-block; background: rgba(255,255,255,.95); color: #54656f; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(11,20,26,.12); }
.conv-time { margin-left: auto; flex: none; font-style: normal; font-size: 11.5px; font-weight: 400; color: #8a93a6; padding-left: 8px; }
.conv-item.unread .conv-time { color: #1fa855; font-weight: 600; }
.conv-list.calls-on #convItems, .conv-list.calls-on .conv-tools, .conv-list.calls-on #convChips, .conv-list.calls-on #convEmpty, .conv-list.calls-on .conv-actions { display: none !important; }
#callHist { flex: 1; overflow-y: auto; }
.ch-day { padding: 14px 24px 6px; font-size: 12px; font-weight: 700; color: #8a93a6; text-transform: uppercase; letter-spacing: .04em; background: #fff; position: sticky; top: 0; z-index: 1; }
.ch-arrow { font-style: normal; font-weight: 700; color: #1fa855; } .ch-arrow.miss { color: #e34948; }
.ch-miss { color: #e34948; }
.ca-card { width: min(360px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 28px; }
.ca-av { width: 64px; height: 64px; border-radius: 50%; background: #dfe5e7; color: #54656f; display: grid; place-items: center; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.ca-name { font-size: 18px; color: #111b21; } .ca-num { font-size: 13px; color: #8a93a6; }
.ca-msg { font-size: 14px; color: #3b4a54; line-height: 1.5; margin: 12px 0 4px; } .ca-msg small { color: #8a93a6; }
.ca-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.ca-go { border: 0; background: #1fa855; color: #fff; border-radius: 999px; padding: 10px 22px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ca-go:hover { background: #178f47; }
.conv-item.unread .conv-name { padding-right: 30px; }

@media print { .x4-collapse { display: none; } }

/* ===== CRM: lateral com caixinhas dos funis + listas, filtros estilo ClickUp, alerta no Kanban ===== */
.fn2-boxes { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.fn2-box { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 10px; cursor: pointer; text-decoration: none; color: #3b4a54; position: relative; }
.fn2-box:hover { background: #f5f6f6; }
.fn2-ini { width: 40px; height: 40px; flex: none; border: 1px solid #111b21; border-radius: 10px; background: #fff; color: #111b21; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.fn2-box.on .fn2-ini { background: #111b21; color: #fff; }
.fn2-box.on .fn2-name { color: #111b21; font-weight: 700; }
.fn2-name { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn2-box em, .fn-list em { font-style: normal; font-size: 12px; color: #8a93a6; }
.fn2-box .fn-edit { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none; border: 0; background: #fff; color: #8a93a6; cursor: pointer; padding: 3px; border-radius: 6px; }
.fn2-box:hover .fn-edit { display: block; } .fn2-box:hover em { visibility: hidden; }
.fn2-sep { height: 1px; background: #eef0f2; margin: 10px 4px; }
.fn-list { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; color: #8a93a6; font-size: 13.5px; }
.fn-list .fn-tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-list:hover { color: #3b4a54; } .fn-list.on { color: #111b21; font-weight: 700; }
.fn2-more { border: 0; background: none; color: #667781; font: inherit; font-size: 12.5px; padding: 6px 10px; cursor: pointer; text-align: left; }
.fn2-more:hover { color: #111b21; }
.fn2-gear { display: flex; align-items: center; gap: 10px; margin-top: 10px; border: 0; background: none; color: #8a93a6; font: inherit; font-size: 13px; padding: 8px 10px; cursor: pointer; border-top: 1px solid #eef0f2; width: 100%; }
.fn2-gear:hover { color: #111b21; }
body.nav-collapsed .fn2-name, body.nav-collapsed .fn2-box em, body.nav-collapsed .fn-list .fn-tx, body.nav-collapsed .fn-list em, body.nav-collapsed .fn2-more, body.nav-collapsed .fn2-gear span { display: none; }
.flt-btn.on { background: #111b21; color: #fff; border-color: #111b21; }
.flt-pop { right: 0; left: auto; width: min(620px, 92vw); padding: 12px; }
.flt-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.flt-clear { border: 0; background: none; color: #667781; font: inherit; font-size: 12.5px; cursor: pointer; } .flt-clear:hover { color: #c0392b; }
.flt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.flt-row select, .flt-row input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; background: #fff; max-width: 190px; }
.flt-glue { width: 52px; font-size: 12.5px; color: #667781; } .flt-glue select { width: 52px; padding: 5px 2px; }
.flt-num { width: 80px; }
.flt-x { border: 0; background: none; color: #8a93a6; cursor: pointer; margin-left: auto; } .flt-x:hover { color: #c0392b; }
.flt-add { border: 0; background: none; color: #2f6bed; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0 0; }
.kb-card-top { position: relative; }
.kb-alert { margin-left: auto; width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; background: #fdecec; color: #e34948; display: grid; place-items: center; cursor: pointer; }
.kb-alert.in { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.kb-cad { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #3b4a54; margin-top: 6px; }
.kb-cad i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.kb-cad span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-cad { display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 9px 12px; font-size: 13px; color: #3b4a54; margin-bottom: 8px; }
.lf-cad small { display: block; font-size: 11px; color: #8a93a6; font-weight: 600; }
.lf-cad.in { background: #f5f7ff; } .lf-cad.out { background: #fdecec; }
.lf-cad-sq { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.lf-cad-warn { color: #e34948; font-size: 16px; }
.lf-track { display: flex; gap: 3px; margin-bottom: 10px; }
.lf-tr { flex: 1; min-width: 0; height: 22px; line-height: 22px; font-size: 10.5px; text-align: center; background: #f0f2f5; color: #8a93a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; border-radius: 3px; }
.lf-tr.done { background: #dfe5ea; color: #54656f; }
.lf-tr.cur { background: #111b21; color: #fff; font-weight: 700; flex: 2; }

/* ===== Página Inicial (cards que dá pra mover) ===== */
.hm-wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px 60px; }
.hm-top { height: var(--head-h); display: flex; align-items: center; }
.hm-top h1 { margin: 0; }
.hm-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 20px; }
.hm-hello h2 { margin: 0 0 2px; font-size: 26px; color: #111b21; }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.hm-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.hm-card.dragging { opacity: .45; border-style: dashed; }
.hm-card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #f0f2f5; cursor: grab; font-size: 14px; color: #111b21; }
.hm-grip { color: #c4c9d0; font-size: 12px; letter-spacing: -2px; }
.hm-n { font-size: 12px; font-weight: 700; background: #f0f2f5; color: #3b4a54; border-radius: 999px; padding: 1px 8px; }
.hm-n.warn { background: #fdecec; color: #e34948; }
.hm-more { font-size: 12.5px; color: #667781; text-decoration: none; } .hm-more:hover { color: #111b21; }
.hm-card-b { padding: 6px 8px 10px; max-height: 360px; overflow-y: auto; }
.hm-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; text-decoration: none; color: #3b4a54; font-size: 13.5px; }
.hm-row:hover { background: #f7f8fa; }
.hm-row > span:not(.avatar):not(.hm-miss) { flex: 1; min-width: 0; }
.hm-row b { display: block; color: #111b21; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row small { display: block; color: #8a93a6; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row em { font-style: normal; font-size: 12px; color: #8a93a6; flex: none; } .hm-row em.late, .hm-rem small.late { color: #e34948; font-weight: 600; }
.hm-time { width: 46px; flex: none; color: #111b21; }
.hm-miss { width: 28px; height: 28px; border-radius: 50%; background: #fdecec; color: #e34948; display: grid; place-items: center; font-weight: 700; flex: none; }
.hm-empty { color: #8a93a6; font-size: 13px; padding: 14px 6px; }
.hm-rem-add { display: flex; gap: 6px; padding: 6px; }
.hm-rem-add input { border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; min-width: 0; }
.hm-rem-add input:first-child { flex: 1; } .hm-rem-add input[type=date] { width: 130px; }
.hm-rem-add .ag-primary { padding: 6px 14px; }
.hm-rem { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; font-size: 13.5px; color: #111b21; cursor: pointer; }
.hm-rem:hover { background: #f7f8fa; }
.hm-rem > span { flex: 1; min-width: 0; } .hm-rem small { display: block; font-size: 11.5px; color: #8a93a6; }
.hm-rem.done > span { text-decoration: line-through; color: #8a93a6; }
.hm-rem button { border: 0; background: none; color: #c4c9d0; cursor: pointer; visibility: hidden; } .hm-rem:hover button { visibility: visible; }
.hm-money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 6px; }
.hm-money small { display: block; font-size: 12px; color: #667781; font-weight: 600; } .hm-money b { font-size: 21px; color: #111b21; }
.hm-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; }
.hm-shortcuts a { border: 1px solid var(--border); border-radius: 10px; padding: 10px 6px; text-align: center; font-size: 13px; color: #111b21; text-decoration: none; font-weight: 600; }
.hm-shortcuts a:hover { border-color: #111b21; }
@media (max-width: 640px) { .hm-wrap { padding: 0 16px 40px; } .hm-grid { grid-template-columns: 1fr; } }
/* filtros: os botões do .ag-pop não podem ocupar a linha inteira */
.flt-pop .flt-row { flex-wrap: nowrap; }
.flt-pop .flt-row > button.x4sel { width: auto !important; flex: 0 1 auto; min-width: 120px; max-width: 200px; margin: 0; }
.flt-pop .flt-row > input { flex: 0 1 160px; }
.flt-pop button.flt-x, .flt-pop button.flt-clear, .flt-pop button.flt-add { width: auto !important; display: inline-block; flex: none; padding: 4px 6px; }
.flt-pop .flt-glue .x4sel { min-width: 52px !important; width: 52px !important; }
.flt-h b { flex: 1; }
.inbox-head .head-filters .inbox-search { min-width: 90px !important; }

/* ===== Sino de notificações + avisos ao vivo (canto esquerdo) ===== */
.x4-bell { position: relative; }
.x4-bell-n { position: absolute; top: -2px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e34948; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-sizing: border-box; }
.x4-bellpop { position: fixed; z-index: 1400; width: 380px; max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 34px rgba(11,20,26,.16); overflow: hidden; }
.x4-bp-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #eef0f2; font-size: 14px; color: #111b21; }
.x4-bp-h button { border: 0; background: none; color: #667781; font: inherit; font-size: 12.5px; cursor: pointer; } .x4-bp-h button:hover { color: #111b21; }
.x4-bp-list { overflow-y: auto; }
.x4-bp-it { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f3f4f6; background: #fff; padding: 11px 14px; font: inherit; cursor: pointer; position: relative; }
.x4-bp-it:hover { background: #f7f8fa; }
.x4-bp-it.new { background: #f5f8ff; } .x4-bp-it.new::after { content: ''; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #2f6bed; }
.x4-bp-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #f0f2f5; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #3b4a54; }
.k-erro .x4-bp-ic { background: #fdecec; color: #e34948; } .k-pagamento .x4-bp-ic { background: #e3f4e7; } .k-mencao .x4-bp-ic { background: #eef2ff; color: #4338ca; }
.x4-bp-tx { flex: 1; min-width: 0; padding-right: 14px; }
.x4-bp-tx small { display: block; font-size: 11.5px; color: #8a93a6; }
.x4-bp-tx b { display: block; font-size: 13.5px; color: #111b21; font-weight: 600; }
.x4-bp-tx em { display: block; font-style: normal; font-size: 12.5px; color: #667781; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.x4-bp-empty { padding: 28px 14px; text-align: center; color: #8a93a6; font-size: 13px; }
.x4-ntfs { position: fixed; left: 16px; bottom: 16px; z-index: 1450; display: flex; flex-direction: column-reverse; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.x4-ntf { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; box-shadow: 0 10px 28px rgba(11,20,26,.16); cursor: pointer; animation: x4ntfIn .25s ease; transition: opacity .35s, transform .35s; }
.x4-ntf.out { opacity: 0; transform: translateX(-12px); }
.x4-ntf .x4-bp-tx { padding-right: 0; }
.x4-ntf-x { border: 0; background: none; color: #b0b6bf; cursor: pointer; font-size: 12px; }
@keyframes x4ntfIn { from { opacity: 0; transform: translateY(10px); } }
.plan-cell { display: flex; gap: 6px; } .plan-cell input { border: 1px solid var(--border); border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 13px; }

/* ===== Dashboards livres (estilo ClickUp) ===== */
.dz-wrap { padding: 0 28px 60px; max-width: 1500px; margin: 0 auto; }
.dz-head { height: var(--head-h); display: flex; align-items: center; }
.dz-public .dz-head { display: none; }
.dz-top { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.dz-h { margin: 0; font-size: 20px; }
.dz-dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.dz-dcard { text-decoration: none; min-height: 120px; }
.dz-shared { color: #1a7f37; font-weight: 600; }
.dz-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 16px; }
.dz-pubname { font-size: 22px; font-weight: 700; color: #111b21; }
.dz-public { padding-top: 24px; }
.dz-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
.dz-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; min-height: 300px; min-width: 0; }
.dz-card.dragging { opacity: .45; border-style: dashed; }
.dz-w1 { grid-column: span 1; } .dz-w2 { grid-column: span 2; } .dz-w3 { grid-column: span 3; } .dz-w4 { grid-column: span 4; }
.dz-w1:has(.dz-num) { min-height: 170px; }
.dz-h2 { min-height: 600px; }
.dz-card-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; cursor: grab; }
.dz-card-h b { font-size: 14px; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-per { font-size: 11.5px; color: #8a93a6; white-space: nowrap; margin-left: auto; }
.dz-menu-btn { border: 0; background: none; color: #8a93a6; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.dz-menu-btn:hover { background: #f0f2f5; color: #111b21; }
.dz-card-b { flex: 1; min-height: 0; padding: 6px 14px 14px; position: relative; overflow: hidden; }
.dz-card-b svg { display: block; overflow: visible; }
.dz-blank { grid-column: span 4; min-height: 340px; border: 2px dashed #d0d5db; border-radius: 16px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font: inherit; color: #667781; cursor: pointer; }
.dz-blank:hover { border-color: #111b21; } .dz-blank b { color: #111b21; font-size: 16px; }
.dz-num { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.dz-num b { font-size: 34px; letter-spacing: -.02em; color: #111b21; }
.dz-goal-bar { height: 10px; border-radius: 999px; background: #eef0f2; overflow: hidden; }
.dz-goal-bar i { display: block; height: 100%; background: #2a78d6; border-radius: 999px; }
.dz-goal span { display: block; font-size: 12.5px; color: #667781; margin-top: 6px; }
.dz-ax { font-size: 11px; fill: #8a93a6; } .dz-val { font-size: 11.5px; fill: #3b4a54; font-weight: 600; }
.dz-gl { stroke: #eef0f2; stroke-width: 1; }
.dz-cross { stroke: #9aa3ad; stroke-width: 1; stroke-dasharray: 3 3; }
.dz-donut-v { font-size: 17px; font-weight: 700; fill: #111b21; }
.dz-pie { display: flex; align-items: center; gap: 16px; height: 100%; }
.dz-legs { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; max-height: 100%; overflow-y: auto; }
.dz-leg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #3b4a54; }
.dz-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dz-leg span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-leg b { color: #111b21; font-weight: 600; } .dz-leg em { font-style: normal; color: #8a93a6; width: 38px; text-align: right; }
.dz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dz-table th { text-align: left; font-size: 11px; color: #8a93a6; text-transform: uppercase; letter-spacing: .04em; padding: 6px 4px; border-bottom: 1px solid #eef0f2; }
.dz-table td { padding: 7px 4px; border-bottom: 1px solid #f3f4f6; color: #3b4a54; } .dz-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.dz-card-b:has(.dz-table) { overflow-y: auto; }
.dz-empty { color: #8a93a6; font-size: 13px; padding: 24px 4px; text-align: center; }
.dz-tip { position: fixed; z-index: 2000; background: #111b21; color: #fff; font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; pointer-events: none; display: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.dz-pick { width: min(560px, 100%); }
.dz-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dz-types button { border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 14px 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.dz-types button:hover { border-color: #111b21; }
.dz-types i { font-style: normal; font-size: 20px; width: 44px; height: 44px; border-radius: 12px; background: #f0f2f5; display: grid; place-items: center; color: #2a78d6; font-weight: 700; }
.dz-types b { font-size: 13.5px; color: #111b21; } .dz-types span { font-size: 11.5px; color: #8a93a6; line-height: 1.3; }
.dz-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 1350; background: #fff; border-left: 1px solid var(--border); box-shadow: -10px 0 30px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.dz-drawer[style*="block"] { display: flex !important; }
.dz-dr-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eef0f2; font-size: 16px; }
.dz-dr-b { padding: 6px 18px 12px; overflow-y: auto; flex: 0 1 auto; }
.dz-dr-b .field-mini { display: block; margin: 12px 0 5px; font-size: 12.5px; font-weight: 600; color: #3b4a54; }
.dz-dr-b input, .dz-dr-b select { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.dz-dr-b .x4sel { width: 100%; }
.dz-filt { margin-top: 14px; padding: 10px 12px 12px; border-radius: 10px; background: #f7f8fa; } .dz-filt > b { font-size: 13px; }
.dz-dr-prev { flex: 1; min-height: 220px; margin: 0 18px; border: 1px solid #eef0f2; border-radius: 12px; display: flex; }
.dz-dr-prev .dz-card-b { padding: 14px; }
.dz-dr-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid #eef0f2; }
.dz-menu { min-width: 200px; z-index: 1360; }
.dz-sizes { display: flex; align-items: center; gap: 4px; padding: 6px 10px; font-size: 12px; color: #8a93a6; }
.dz-sizes button { width: auto !important; padding: 3px 8px !important; border: 1px solid var(--border) !important; border-radius: 6px !important; font-size: 12px !important; }
.dz-sizes button.on { background: #111b21 !important; color: #fff !important; border-color: #111b21 !important; }
.dz-menu .dz-del { color: #c0392b; }
.dz-share { display: flex; gap: 8px; } .dz-share input { flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
@media (max-width: 1100px) { .dz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dz-w3, .dz-w4 { grid-column: span 2; } }
@media (max-width: 640px) { .dz-wrap { padding: 0 16px 40px; } .dz-grid { grid-template-columns: 1fr; } .dz-w1, .dz-w2, .dz-w3, .dz-w4, .dz-blank { grid-column: span 1; } .dz-types { grid-template-columns: repeat(2, 1fr); } }

/* ===== Mais respiro: campos da ficha e ícones do topo direito ===== */
.lf-sec { padding: 18px 18px 22px; }
.lf-sec-t { margin-bottom: 14px; }
.lf-sec .field-mini { margin: 16px 0 6px; }
.lf-sec .lf-two { gap: 16px; }
.lf-sec .lf-two > div > .field-mini:first-child, .lf-sec .lf-sec-t + .field-mini, .lf-sec .lf-sec-t + .lf-two .field-mini { margin-top: 4px; }
.lf-sec input:not([type=checkbox]), .lf-sec select, .lf-sec textarea { padding: 10px 11px; }
.lf-cad { margin-bottom: 12px; } .lf-track { margin-bottom: 14px; }
.inbox-head .head-filters { gap: 14px; }
.inbox-head .head-filters .icon-btn, .inbox-head .head-filters .me-btn { flex: none; }
.ag-head-r { display: flex; align-items: center; gap: 14px; }
/* topo estreito (ex.: ficha aberta): as abas viram só ícones e nada se sobrepõe */
.inbox-head { container-type: inline-size; }
@container (max-width: 900px) {
  .inbox-head .lead-subnav .lsub > span:not(.nbadge) { display: none; }
  .inbox-head .lead-subnav .lsub { padding-left: 10px; padding-right: 10px; }
}
@container (max-width: 640px) { .inbox-head .head-filters .inbox-search { display: none; } }

/* menu recolhido do Comercial: as caixinhas dos funis e os ícones das listas continuam aparecendo (menores) */
body.nav-collapsed .x4-secnav .fn2-box { justify-content: center; padding: 3px 0; }
body.nav-collapsed .x4-secnav .fn2-ini { display: grid !important; width: 34px; height: 34px; font-size: 10.5px; border-radius: 9px; }
body.nav-collapsed .x4-secnav .fn2-box .fn-edit { display: none !important; }
body.nav-collapsed .x4-secnav .fn-list { justify-content: center; padding: 8px 0; }
body.nav-collapsed .x4-secnav .fn-list .fn-ic { display: inline-flex !important; }
body.nav-collapsed .x4-secnav .fn2-gear { justify-content: center; padding: 8px 0; }
body.nav-collapsed .x4-secnav .fn2-sep { margin: 8px 6px; }
body.nav-collapsed .x4-secnav .fn2-boxes { align-items: center; }
/* sino um pouco mais longe da bolinha do perfil */
#x4Bell { margin-right: 10px; }

/* ===== Quem está atendendo ===== */
.op-card { width: min(420px, 100%); }
.op-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 300px; overflow-y: auto; }
.op-list button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14px; color: #111b21; cursor: pointer; text-align: left; }
.op-list button:hover { border-color: #111b21; }
.op-new { display: flex; gap: 8px; } .op-new input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 14px; }
.op-skip { display: block; margin: 12px auto 0; border: 0; background: none; color: #8a93a6; font: inherit; font-size: 13px; cursor: pointer; }
.me-op { display: block; width: 100%; border: 0; background: #f5f6f6; border-radius: 10px; padding: 8px 10px; margin: 8px 0 4px; font: inherit; font-size: 12.5px; color: #3b4a54; cursor: pointer; }
.me-op:hover { background: #eef0f2; }

/* ===== Painel de controle ===== */
.pc-wrap { max-width: 1400px; margin: 0 auto; padding: 0 28px 60px; }
.pc-top { height: var(--head-h); display: flex; align-items: center; gap: 12px; }
.pc-top h1 { margin: 0; }
.pc-day { display: flex; align-items: center; gap: 6px; }
.pc-day input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13.5px; }
.pc-alerts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.pc-al { background: #f5f6f6; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: #3b4a54; text-decoration: none; }
.pc-al.warn { background: #fdecec; color: #c0392b; }
.pc-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pc-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pc-kpi small { font-size: 12px; color: #667781; font-weight: 600; } .pc-kpi > b { font-size: 26px; color: #111b21; letter-spacing: -.02em; }
.pc-bar { height: 8px; border-radius: 999px; background: #eef0f2; overflow: hidden; } .pc-bar i { display: block; height: 100%; background: #2a78d6; border-radius: 999px; }
.pc-bar.ok i { background: #1a7f37; } .pc-bar.sm { height: 5px; }
.pc-goaltxt { font-size: 11.5px !important; color: #8a93a6 !important; font-weight: 400 !important; }
.pc-month { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: #8a93a6; margin-top: 4px; border-top: 1px solid #f0f2f5; padding-top: 6px; }
.pc-month b { color: #3b4a54; }
.pc-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.pc-card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f0f2f5; flex-wrap: wrap; } .pc-card-h > b { font-size: 15px; color: #111b21; }
.pc-tablewrap { border: 0; border-radius: 0; }
.pc-table td, .pc-table th { white-space: nowrap; }
.pc-who { display: inline-flex; align-items: center; gap: 8px; }
.pc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; } .pc-dot.on { background: #1fa855; box-shadow: 0 0 0 3px #e3f4e7; } .pc-dot.away { background: #f0a020; } .pc-dot.off { background: #d0d5db; }
.pc-on { color: #1a7f37; font-weight: 600; }
.pc-seg { display: inline-flex; background: #f0f2f5; border-radius: 999px; padding: 3px; }
.pc-seg button { border: 0; background: none; border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; color: #667781; cursor: pointer; } .pc-seg button.on { background: #fff; color: #111b21; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .pc-two .pc-card { margin-bottom: 0; }
.pc-n { font-size: 12px; font-weight: 700; background: #f0f2f5; border-radius: 999px; padding: 1px 8px; }
.pc-obj-add { display: flex; gap: 6px; padding: 12px 14px 6px; } .pc-obj-add input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px; }
.pc-obj-add select { border: 1px solid var(--border); border-radius: 8px; padding: 7px; font: inherit; font-size: 13px; max-width: 150px; }
#pcObjs { padding: 4px 8px 12px; }
.pc-feed { max-height: 420px; overflow-y: auto; padding: 6px 10px 12px; }
.pc-ev { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-bottom: 1px solid #f5f6f6; font-size: 13.5px; color: #3b4a54; }
.pc-ev > span:nth-child(2) { flex: 1; min-width: 0; } .pc-ev b { color: #111b21; } .pc-ev em { font-style: normal; font-size: 12px; color: #8a93a6; flex: none; }
.pc-goals-card { width: min(980px, 100%); }
.pc-gt input { width: 100px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.pc-gsub { font-weight: 700; color: #111b21; margin: 18px 0 8px; font-size: 14px; }
@media (max-width: 1200px) { .pc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .pc-two { grid-template-columns: 1fr; } .pc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pc-wrap { padding: 0 16px 40px; } }

/* caixinhas dos funis: sem preto e sem borda. Selecionado = fundo cinza na linha e caixinha branca */
.fn2-ini { border: 0 !important; background: transparent; color: #111b21; }
.fn2-box.on { background: #f0f2f5; }
.fn2-box.on .fn2-ini { background: #fff !important; color: #111b21 !important; box-shadow: 0 1px 2px rgba(17,27,33,.08); }
.fn2-box:hover { background: #f5f6f6; }
.fn2-box .fn-edit { display: block; opacity: 0; transition: opacity .15s; }
.fn2-box:hover .fn-edit { opacity: 1; }
.fn2-boxes + .fn2-gear { margin-top: 12px; }
/* menu recolhido: só as iniciais */
body.nav-collapsed .x4-secnav .fn2-box { padding: 4px 0; background: transparent; }
body.nav-collapsed .x4-secnav .fn2-ini { width: 40px; height: 32px; font-size: 11px; }
body.nav-collapsed .x4-secnav .fn2-box.on .fn2-ini { background: #f0f2f5 !important; box-shadow: none; }
.fn-two { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.fn-ini { text-transform: uppercase; text-align: center; font-weight: 700; letter-spacing: .04em; }
/* ficha: mais espaço entre um campo e o de baixo */
.lf-sec .field-mini { margin-top: 22px !important; }
.lf-sec .lf-two { margin-top: 2px; }
.lf-sec .lf-two > div > .field-mini:first-child { margin-top: 22px !important; }
.lf-sec .lf-sec-t + .lf-two > div > .field-mini:first-child, .lf-sec .lf-sec-t + .field-mini, .lf-sec .lf-cad + .lf-two > div > .field-mini:first-child { margin-top: 6px !important; }
/* menu recolhido: iniciais num círculo do mesmo tamanho da caixinha aberta (40px), cinza quando selecionado — igual ao X4 */
body.nav-collapsed .x4-secnav .fn2-ini { width: 40px !important; height: 40px !important; border-radius: 50% !important; font-size: 10.5px; }
body.nav-collapsed .x4-secnav .fn2-box.on .fn2-ini { background: #f0f2f5 !important; box-shadow: none !important; }
body.nav-collapsed .x4-secnav .fn2-box:hover .fn2-ini { background: #f5f6f6; }
body.nav-collapsed .x4-secnav .fn2-box { padding: 3px 0 !important; }
/* botões "Agrupar por" e "Filtros" em preto */
/* brancos por padrão; pretos só quando em uso (.on) */
.crm-group-btn { background: #fff !important; color: #3b4a54 !important; border-color: var(--border, #e9edef) !important; }
.crm-group-btn:hover { background: #f5f6f6 !important; }
.crm-group-btn svg { color: #3b4a54; }
.crm-group-btn.on { background: #111b21 !important; color: #fff !important; border-color: #111b21 !important; }
.crm-group-btn.on:hover { background: #2a3942 !important; }
.crm-group-btn.on svg { color: #fff; }

/* ---------- kanban: recolher coluna (estilo ClickUp) ---------- */
.kb-fold { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #8696a0; border-radius: 6px; cursor: pointer; padding: 0; opacity: .6; transition: opacity .15s, background .15s; }
.kb-col:hover .kb-fold, .kb-fold:focus-visible { opacity: 1; }
.kb-fold:hover { background: #e4e8eb; color: #111b21; }
.kb-col-t .kb-n + .kb-fold { margin-left: -2px; }
.kb-col.folded { flex: 0 0 44px; max-width: 44px; align-items: center; gap: 8px; padding: 8px 0 12px; border-top: 3px solid var(--c,#9e9e9e); cursor: pointer; align-self: stretch; max-height: none; }
.kb-col.folded:hover { background: #eef1f4; }
.kb-col.folded .kb-fold { opacity: 1; }
.kb-col.folded .kb-n { margin: 0; }
.kb-fold-t { writing-mode: vertical-rl; font-size: 13px; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 260px; }
body.nav-collapsed .kb-col.folded { flex-basis: 44px; }

/* menu recolhido: iniciais dos funis como os ícones (sem círculo) — selecionado preto forte, demais claros */
body.nav-collapsed .x4-secnav .fn2-ini { background: transparent !important; box-shadow: none !important; border: 0 !important; color: #aeb6bd !important; font-weight: 600 !important; width: 40px !important; height: 30px !important; }
body.nav-collapsed .x4-secnav .fn2-box.on .fn2-ini { background: transparent !important; color: #111b21 !important; font-weight: 800 !important; }
body.nav-collapsed .x4-secnav .fn2-box:hover .fn2-ini { background: transparent !important; color: #54656f !important; }
body.nav-collapsed .x4-secnav .fn2-box.on:hover .fn2-ini { color: #111b21 !important; }
body.nav-collapsed .x4-secnav .fn2-box, body.nav-collapsed .x4-secnav .fn2-box.on { background: transparent !important; }

/* ---------- campo de data + hora (calendário suspenso) ---------- */
.lf-dt { width: 100%; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 1px solid var(--border,#e9edef); border-radius: 8px; background: #fff; color: #111b21; font-size: 13px; cursor: pointer; text-align: left; font-family: inherit; }
.lf-dt:hover { border-color: #cfd6da; background: #fafbfb; }
.lf-dt svg { flex: none; color: #8696a0; }
.lf-dt .ph { color: #aeb6bd; }
.lf-dt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-dt:disabled { cursor: not-allowed; opacity: .7; }
.lf-dt.due-today { background: #fef9c3; border-color: #facc15; color: #854d0e; }
.lf-dt.due-today svg { color: #ca8a04; }
.lf-dt.due-late { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
.lf-dt.due-late svg { color: #dc2626; }
.lf-dt.due-win { background: #dcfce7; border-color: #4ade80; color: #15803d; }
.lf-dt.due-win svg { color: #16a34a; }
.lf-four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lf-four .lf-dt { padding: 0 8px; gap: 6px; }
.lf-four .lf-wide { grid-column: span 2; }
.x4dt-time { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 4px 0; border-top: 1px solid #f0f2f5; font-size: 12.5px; color: #54656f; font-weight: 600; }
.x4dt-time input { border: 1px solid var(--border,#e9edef); border-radius: 8px; padding: 5px 8px; font-size: 13px; font-family: inherit; }
.x4df-foot .x4dt-ok { background: #111b21; color: #fff; border-color: #111b21; }
.x4df-foot .x4dt-ok:hover { background: #2a3942; }
.kb-unfold { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border,#e9edef); background: #fff; color: #3b4a54; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.kb-unfold:hover { background: #f5f6f6; }

/* menu recolhido: só ícones; nome aparece num balãozinho ao passar o mouse */
.bi2-nav a svg, .x4-secnav a svg, .ag-nav a svg { flex: none; }
body.nav-collapsed .bi2-nav a, body.nav-collapsed .x4-secnav > a, body.nav-collapsed .ag-nav a { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
body.nav-collapsed .bi2-nav a > :not(svg), body.nav-collapsed .ag-nav a > :not(svg) { display: none; }
body.nav-collapsed .bi2-nav { padding: 0 6px; }
.x4-navtip { position: fixed; z-index: 3000; transform: translateY(-50%); background: #111b21; color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.x4-navtip::before { content: ''; position: absolute; left: -4px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 0; border-right-color: #111b21; }

/* kanban: ocultar / mostrar estágios */
.kb-stg-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border,#e9edef); background: #fff; color: #3b4a54; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.kb-top .kb-stg-btn { margin-left: auto; }
.kb-top .kb-unfold + .kb-stg-btn, .kb-top .kb-unfold { margin-left: 0; }
.kb-top .kb-unfold { margin-left: auto; }
.kb-stg-btn:hover { background: #f5f6f6; }
.kb-stg-btn.on { border-color: #111b21; color: #111b21; }
.kb-stg-pop { position: fixed; z-index: 1600; width: 250px; max-height: 60vh; overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05); padding: 8px; }
.kb-stg-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; border-bottom: 1px solid #f0f2f5; margin-bottom: 4px; }
.kb-stg-h b { font-size: 12.5px; color: #111b21; }
.kb-stg-h button { border: 0; background: transparent; color: #0062c4; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.kb-stg-h button:disabled { color: #aeb6bd; cursor: default; }
.kb-stg-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #111b21; }
.kb-stg-row:hover { background: #f5f6f6; }
.kb-stg-row input { accent-color: #111b21; margin: 0; }
.kb-stg-row i { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- ficha: detalhes compactos (lado a lado, caixas pequenas) ---------- */
.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.lf-grid .field-mini { margin-top: 10px !important; margin-bottom: 4px; }
.lf-sec .lf-grid input:not([type=checkbox]), .lf-sec .lf-grid select, .lf-grid .lf-dt, .lf-grid .lf-ppl { height: 32px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.lf-grid .lf-ppl { gap: 6px; overflow: hidden; white-space: nowrap; }
.lf-grid .lf-ppl * { font-size: 12.5px; }
.lf-grid .lf-lists { min-height: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* Detalhes em 2 colunas: principal (esq.) + datas (dir.) */
.lf-det2 { display: flex; gap: 20px; align-items: flex-start; }
.lf-det-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.lf-det-side { width: 190px; flex: none; display: flex; flex-direction: column; gap: 8px; }
.lf-det2 .field-mini { display: block; margin: 0 0 4px; }
.lf-det2 input:not([type=checkbox]), .lf-det2 select, .lf-det2 .lf-dt, .lf-det2 .lf-ppl { width: 100%; height: 32px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; box-sizing: border-box; }
.lf-det2 .lf-ppl { gap: 6px; overflow: hidden; white-space: nowrap; }
.lf-det2 .lf-lists { min-height: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
@media (max-width: 640px) { .lf-det2 { flex-direction: column; } .lf-det-side { width: 100%; } }
/* Dados do lead estilo ClickUp: linhas label → valor (campo discreto, aparece ao focar) */
.lf-rows { display: flex; flex-direction: column; }
.lf-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.lf-row:last-child { border-bottom: none; }
/* rótulo e campo dividem o espaço meio a meio (50/50), mais afastados — na ficha aberta ou minimizada */
.lf-row-k { flex: 1 1 50%; min-width: 0; width: auto; font-size: 12px; color: var(--text-2, #667781); display: flex; align-items: center; gap: 5px; }
.lf-sec .lf-row .lf-row-v, .lf-sec .lf-row input.lf-row-v, .lf-sec .lf-row select.lf-row-v {
  flex: 1 1 50%; min-width: 0; height: 30px; border: 1px solid transparent; background: transparent;
  padding: 0 8px; font-size: 13px; border-radius: 6px; box-sizing: border-box; color: var(--text, #1c1e21); }
.lf-sec .lf-row .lf-row-v:hover { background: var(--bg, #f0f2f5); }
.lf-sec .lf-row input.lf-row-v:focus, .lf-sec .lf-row select.lf-row-v:focus { border-color: var(--blue, #0062c4); background: var(--bg-white, #fff); outline: none; }
.lf-row-v.lf-wa { display: flex; align-items: center; }
.lf-row-v.lf-wa input { flex: 1; border: none; background: transparent; padding: 0 4px 0 0; font-size: 13px; }
/* cabeçalho do Detalhes sem título (só o código, à direita — estilo ClickUp) */
.lf-sec-t-min { justify-content: flex-end; min-height: 0; margin-bottom: 2px; }
.lf-sec .lf-notes { margin-top: 2px; min-height: 64px; font-size: 13px; resize: vertical; background: #fffdf3; border-color: #f1e7b8; }
.lf-sec .lf-notes:focus { border-color: #d6b94a; }
/* receita ao lado do nome */
.lf-money-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; margin-left: 8px; border-radius: 999px; border: 1px solid #bbf7d0; background: #f0fdf4; cursor: pointer; font-family: inherit; vertical-align: middle; white-space: nowrap; }
.lf-money-pill b { font-size: 12px; color: #15803d; }
.lf-money-pill span { font-size: 11px; font-weight: 700; color: #b45309; padding-left: 6px; border-left: 1px solid #d1fae5; }
.lf-money-pill:hover { background: #dcfce7; }
.bf-title h2 + .lf-money-pill { margin: 4px 0 2px; }
.detail-head .lf-money-pill { margin: 3px 0 0; height: 20px; padding: 0 7px; }
.detail-head .lf-money-pill b { font-size: 11px; }
.detail-head .lf-money-pill span { font-size: 10.5px; }
/* WhatsApp do lead: travado + checagem */
.lf-wa { position: relative; }
.lf-wa input { padding-right: 28px !important; background: #f5f6f6 !important; color: #3b4a54; cursor: not-allowed; }
.lf-wa-lock { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #8696a0; }
.lf-wachk { margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: #8696a0; }
.lf-wachk a { color: #0062c4; text-decoration: none; }
.lf-wachk a:hover { text-decoration: underline; }
.lf-wachk.ok { color: #15803d; }
.lf-wachk.bad { color: #b91c1c; }

/* Mesclar ficha (mesma pessoa em canais diferentes) */
.lf-merge-ov { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); padding: 20px; }
.lf-merge-box { width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 80px); overflow: auto;
  background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.lf-merge-h { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 16px; color: #111b21; margin-bottom: 6px; }
.lf-merge-x { border: none; background: none; font-size: 18px; color: #8696a0; cursor: pointer; line-height: 1; }
.lf-merge-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.lf-merge-it { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.lf-merge-it:hover { border-color: #0062c4; background: #eef5ff; }
.lf-merge-it b { font-size: 14px; color: #111b21; }

/* ---------- ficha: atividade estilo ClickUp ---------- */
.bf-title > div { min-width: 0; }
.bf-title h2 { display: inline-block; vertical-align: middle; }
.bf-title #bfPhone { display: block; }
.bf-feed-note { font-size: 11.5px; color: #8696a0; padding: 2px 2px 4px; border-bottom: 1px dashed #e9edef; }
.bf-com-f { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #f0f2f5; }
.bf-rx { height: 24px; padding: 0 7px; border-radius: 999px; border: 1px solid #e9edef; background: #f7f8fa; font-size: 12px; cursor: pointer; font-family: inherit; }
.bf-rx.me { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.bf-rx-add { width: 26px; height: 24px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: #8696a0; cursor: pointer; display: inline-grid; place-items: center; }
.bf-rx-add:hover { background: #f0f2f5; color: #111b21; }
.bf-reply { border: 0; background: transparent; color: #54656f; font-size: 12px; font-weight: 600; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.bf-reply:hover { background: #f0f2f5; color: #111b21; }
.bf-rx-pop { position: fixed; z-index: 2600; display: flex; gap: 2px; padding: 5px; background: #fff; border-radius: 999px; box-shadow: 0 8px 26px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05); }
.bf-rx-pop button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 50%; font-size: 18px; cursor: pointer; transition: transform .1s; }
.bf-rx-pop button:hover { background: #f0f2f5; transform: scale(1.15); }
.bf-replies { margin-top: 8px; padding-left: 14px; border-left: 2px solid #e9edef; display: flex; flex-direction: column; gap: 6px; }
.bf-com.bf-rep { display: block; border: 0; background: #f7f8fa; padding: 8px 10px; }
.bf-com-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bf-com-img img { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid #e9edef; object-fit: cover; }
.bf-com-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #e9edef; border-radius: 8px; font-size: 12.5px; color: #111b21; text-decoration: none; }
.bf-at { color: #1d4ed8; background: #eff6ff; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.bf-compose { gap: 6px; }
.bf-compose-bar { display: flex; align-items: center; gap: 6px; }
.bf-compose .bf-compose-bar .ag-primary { align-self: auto; }
.bf-cbtn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #e9edef; display: inline-grid; place-items: center; color: #54656f; cursor: pointer; }
.bf-cbtn:hover { background: #f0f2f5; color: #111b21; }
.bf-att { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-att:empty { display: none; }
.bf-att-i { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid #e9edef; border-radius: 8px; font-size: 12px; max-width: 200px; }
.bf-att-i img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; }
.bf-att-i em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-att-i button { border: 0; background: transparent; color: #8696a0; cursor: pointer; }
.bf-replyto { font-size: 12px; color: #3b4a54; background: #f0f2f5; border-radius: 8px; padding: 6px 10px; display: flex; gap: 4px; align-items: center; }
.bf-replyto button { margin-left: auto; border: 0; background: transparent; cursor: pointer; color: #8696a0; }
.bf-replyto[hidden] { display: none; }
/* canais das mensagens */
.bf-ch { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #eef2f5; color: #54656f; margin-left: 4px; }
.bf-ch.ch-wa_api { background: #dcfce7; color: #15803d; }
.bf-ch.ch-wa_evo { background: #e0f2fe; color: #0369a1; }
.bf-ch.ch-sms { background: #fef3c7; color: #92400e; }
.bf-ch.ch-email { background: #ede9fe; color: #5b21b6; }
/* ligações com transcrição */
.bf-call { border: 1px solid #e9edef; border-radius: 10px; background: #fff; overflow: hidden; }
.bf-call-h { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; }
.bf-call-h[role=button] { cursor: pointer; }
.bf-call-h[role=button]:hover { background: #f7f8fa; }
.bf-call-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; flex: none; }
.bf-call.ok .bf-call-ic { background: #dcfce7; color: #15803d; }
.bf-call.miss .bf-call-ic { background: #fee2e2; color: #b91c1c; }
.bf-call-tx { flex: 1; min-width: 0; color: #3b4a54; }
.bf-call-tx small { display: block; font-size: 11.5px; color: #8696a0; }
.bf-call-car { color: #8696a0; font-size: 11px; }
.bf-tr { padding: 10px 12px 12px; border-top: 1px solid #f0f2f5; background: #fafbfb; }
.bf-tr-aud { width: 100%; height: 34px; margin-bottom: 8px; }
.bf-tr-txt { font-size: 13px; line-height: 1.55; color: #111b21; max-height: 260px; overflow-y: auto; white-space: normal; }
/* favoritos (recortes salvos da conversa) */
.bf-fav { border: 1px solid #fde68a; background: #fffdf3; border-radius: 10px; padding: 8px 10px; }
.bf-fav-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.bf-fav-h small { color: #8696a0; }
.bf-fav-h .bf-t { margin-left: auto; }
.bf-fav-b { margin-top: 6px; font-size: 13.5px; line-height: 1.45; padding: 7px 10px; border-radius: 9px; background: #fff; border: 1px solid #f1e7b8; }
.bf-fav-b.in { background: #fff; } .bf-fav-b.out { background: #e7fce3; border-color: #c8efc0; }
.bf-fav-b.media { padding: 6px; }
.bf-fav-img img { display: block; max-width: 100%; max-height: 240px; border-radius: 7px; }
.bf-fav-vid { width: 100%; max-height: 240px; border-radius: 7px; }

/* menu do topo (Pessoas · Funis · …) alinhado com o título e a 1ª coluna da tabela */
.inbox-head .lead-subnav { margin-left: 4px; }
.detail-head #dName, .detail-head #lfName { display: inline; vertical-align: middle; }
.detail-head .lf-money-pill { margin: 0 0 0 6px !important; vertical-align: middle; }
.detail-head #dPhone, .detail-head #lfPhone { display: block; }

/* ---------- Caixa de entrada (WhatsApp) ---------- */
.inbox-table td.mny { white-space: nowrap; font-size: 12.5px; font-weight: 700; }
.inbox-table td.mny.rec { color: #15803d; }
.inbox-table td.mny.mesa { color: #b45309; }
.lst-chip { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: #eef2ff; color: #3730a3; margin: 1px 3px 1px 0; }
.lst-chip.seg { background: #ecfeff; color: #0e7490; }
.lc-cell { display: flex; flex-direction: column; line-height: 1.25; }
.lc-cell small { font-size: 10.5px; color: #8696a0; }
.wa-lbls { display: flex; flex-wrap: wrap; gap: 3px; margin: 3px 0 0 38px; }
.wa-lbl { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; color: #fff; background: var(--c, #8696a0); }
.flt-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; border-bottom: 1px solid #f0f2f5; margin-bottom: 4px; }
.flt-h b { font-size: 12.5px; }
.cp-ficha { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
/* abas de canal da conversa: WhatsApp Oficial × SDR (Evolution) */
/* Cabeçalho da conversa: avatar + nome + número + atalhos (expandir, ficha, transcrições) */
#convPanel .cp-av { flex: none; }
#convPanel .cp-id.cp-link { cursor: pointer; }
#convPanel .cp-id.cp-link:hover b { text-decoration: underline; }
/* Abas da conversa (WhatsApp Oficial × SDR): visual igual às abas Histórico/Transcrições */
.cp-tabs { display: flex; gap: 0; padding: 0 8px; background: var(--panel, #fff); border-bottom: 1px solid var(--border); }
.cp-tab { flex: 1; border: none; background: transparent; padding: 11px 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; white-space: nowrap; border-bottom: 2px solid transparent; }
.cp-tab:hover { color: #51607a; }
.cp-tab.active { color: #1c1e21; border-bottom-color: #1c1e21; }
.bi-range { height: 28px; border: 1px solid var(--border, #e9edef); border-radius: 8px; font: inherit; font-size: 12px; padding: 0 6px; background: #fff; margin-right: 4px; }

/* ícones SVG no lugar dos emojis */
.x4i { display: inline-block; vertical-align: -2px; flex: none; }
.x4i.star { color: #eab308; fill: #fde047; }
.x4-prev { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.x4-prev .x4i { color: #8696a0; }
.x4-bp-ic .x4i { vertical-align: middle; }
.x4-toast .x4i.fill { color: #fff; fill: #fff; vertical-align: -2px; }
.lf-wachk .x4i { vertical-align: -1px; }
.perm-ico .x4i, .fb-tpl-empty .x4i { vertical-align: middle; }

/* ---------- financeiro no topo da ficha (lado oposto ao nome) ---------- */
.lf-money-pill { display: none !important; }
.bf-title { margin-bottom: 26px !important; gap: 14px; }
.bf-title > div { flex: 1; min-width: 0; }
.bf-title #bfPhone { margin-top: 4px; }
.lf-money-box, .lf-money-strip { display: flex; align-items: center; gap: 14px; border: 1px solid #111b21; background: #111b21; color: #fff; border-radius: 12px; cursor: pointer; font-family: inherit; text-align: left; }
.lf-money-box { flex: none; margin-left: auto; padding: 9px 14px; }
.lf-money-box:hover, .lf-money-strip:hover { filter: brightness(1.25); }
.lfm-c { display: flex; flex-direction: column; line-height: 1.15; }
.lfm-c small { font-size: 10.5px; font-weight: 600; color: #aeb6bd; }
.lfm-c b { font-size: 17px; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
.lfm-c.mesa b { color: #fcd34d; font-size: 14px; }
.lf-money-box em, .lf-money-strip em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; opacity: .85; white-space: nowrap; }
/* ficha lateral: faixa no topo; na ficha grande ela some (o quadro fica ao lado do nome) */
.lf-money-strip { width: 100%; padding: 9px 12px; margin: 0 0 14px; }
.lf-money-strip em { margin-left: auto; }
.bf-overlay .lf-money-strip { display: none; }

/* ---------- seletor de colunas (Pessoas e Caixa de entrada) ---------- */
.crm-col-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border, #e9edef); background: #fff; color: #3b4a54; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.crm-col-btn:hover { background: #f5f6f6; }
.col-pop { right: 0; left: auto; width: 250px; max-height: 70vh; overflow-y: auto; padding: 8px; }
.col-hint { padding: 0 6px 6px; }
.col-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; font-size: 13px; color: #111b21; cursor: grab; user-select: none; }
.col-row:hover { background: #f5f6f6; }
.col-row.fixed { cursor: default; color: #8696a0; }
.col-row.dragging { opacity: .4; }
.col-row input { accent-color: #111b21; margin: 0; }
.col-grip { width: 12px; color: #aeb6bd; font-size: 11px; letter-spacing: -2px; }
.inbox-table td .kb-cad { margin: 0; }
/* engrenagem das colunas: no fim do cabeçalho da tabela */
.inbox-table th.col-cfg-th { width: 40px; padding: 0 8px !important; text-align: right; position: sticky; right: 0; background: inherit; }
.col-cfg { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #8696a0; cursor: pointer; display: inline-grid; place-items: center; }
.col-cfg:hover { background: #f0f2f5; color: #111b21; }
.col-pop { position: fixed; z-index: 1600; right: auto; }

/* ---------- ficha: cadência no topo, Listas sem buraco, Notas + Agendamentos lado a lado ---------- */
.lf-grid > .lf-lists-cell { grid-column: auto / -1; }
.lf-na .lf-sec-t { margin-bottom: 8px; }
.lf-na-appt { margin-top: 16px; }
.bf-overlay .lf-na { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bf-overlay .lf-na-appt { margin-top: 0; }
.bf-overlay .lf-na .lf-notes { min-height: 96px; }
.bf-overlay #lfCad { display: none; }
.bf-cad { display: none; }
.bf-overlay .bf-cad { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; max-width: 240px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; color: #3b4a54; }
.bf-cad small { display: block; font-size: 10.5px; color: #8a93a6; font-weight: 600; }
.bf-cad b { white-space: nowrap; }
.bf-cad span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bf-cad.out { background: #fdecec; color: #b91c1c; } .bf-cad.out .x4i { color: #dc2626; }
.bf-cad.in { background: #f5f7ff; }
.bf-overlay .bf-cad + .lf-money-box { margin-left: 0; }
/* minimizar a coluna de atividade */
.bf-act-min, .bf-act-open { border: 0; background: transparent; color: #8696a0; cursor: pointer; border-radius: 7px; display: inline-grid; place-items: center; }
.bf-act-min { width: 28px; height: 28px; margin-right: -4px; }
.bf-act-min:hover, .bf-act-open:hover { background: #f0f2f5; color: #111b21; }
.bf-act-head { justify-content: flex-start !important; }
.bf-act-head .bf-chips { margin-left: auto; }
.bf-act-open { display: none; }
.bf-card.act-min .bf-body { grid-template-columns: minmax(0, 1fr) 44px; }
.bf-card.act-min .bf-right > :not(.bf-act-open) { display: none !important; }
.bf-card.act-min .bf-act-open { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 0; border-radius: 0; height: 100%; justify-content: flex-start; }
.bf-card.act-min .bf-act-open span { writing-mode: vertical-rl; font-size: 12.5px; font-weight: 700; color: #3b4a54; }
/* caixa de entrada: conversa à esquerda, ficha à direita */
body.sdr-page #convPanel { order: 1; }
body.sdr-page #detailPanel { order: 2; }
body.sdr-page .inbox-wrap > aside:not(#convPanel):not(#detailPanel) { order: 3; }
#cpSub.cp-link { cursor: pointer; color: #0062c4; }
#cpSub.cp-link:hover { text-decoration: underline; }

/* conversa lateral: aviso da janela igual ao da tela do WhatsApp; abas dos WhatsApps rolam pro lado */
#dConv { position: relative; }
.win-cloud.cp-cloud { top: 10px; left: 12px; right: auto; max-width: calc(100% - 24px); }
.cp-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scroll-behavior: smooth; }
.cp-tabs::-webkit-scrollbar { height: 4px; }
.cp-tabs::-webkit-scrollbar-thumb { background: #d1d7db; border-radius: 4px; }
.cp-tab { flex: 0 0 auto !important; padding-left: 14px !important; padding-right: 14px !important; }

/* ---------- Caixa de entrada: selo da plataforma no avatar ---------- */
.plat-wrap { display: inline-flex; }
.plat-badge { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 5px; background: #fff; box-shadow: 0 0 0 1.5px var(--panel, #fff); display: block; }
.plat-badge svg { display: block; width: 16px; height: 16px; }
.plat-badge .win-dot { position: absolute; top: -3px; right: -3px; width: 7px !important; height: 7px !important; box-shadow: 0 0 0 1.5px var(--panel, #fff); }

/* ---------- Instagram Direct / Messenger ---------- */
.reply.social .icon-btn { display: none; }           /* por enquanto só texto (sem anexo, template, flow ou áudio) */
.src-plat { display: inline-grid; width: 16px; height: 16px; }
.src-plat svg { width: 16px; height: 16px; display: block; border-radius: 4px; }
.wa-kind.ig { background: #fdf2f8; color: #be185d; }
.wa-kind.fb { background: #eff6ff; color: #1d4ed8; }
.soc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.soc-list:empty { display: none; }
.soc-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, #e9edef); border-radius: 10px; }
.soc-item .src-plat, .soc-item .src-plat svg { width: 22px; height: 22px; }
.soc-item span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.soc-item small { color: #8696a0; font-size: 11.5px; }
.soc-item em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: #15803d; }
/* checkbox não deve esticar com a largura dos campos de texto do modal */
.sdr-pane input[type="checkbox"] { width: auto; flex: none; margin: 0; }
/* bloco "Conectar uma Página" separado da lista de canais já conectados */
.soc-form { border: 1px solid var(--border, #e9edef); border-radius: 12px; padding: 14px 14px 16px; }
.soc-form-head { font-weight: 700; font-size: 13.5px; color: #1c1e21; margin-bottom: 10px; }
.soc-opt { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.45; margin: 0 0 12px; padding: 10px 12px; background: #f7f9fb; border-radius: 10px; cursor: pointer; }
.soc-opt > span { flex: 1; min-width: 0; }
.soc-opt input[type="checkbox"] { margin-top: 2px; }
#socFields { display: flex; flex-direction: column; gap: 4px; }
#socFields .field-label:first-child { margin-top: 0; }
.soc-kinds { display: flex; gap: 12px; margin-top: 14px; font-size: 13px; }
.soc-kinds label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border, #e9edef); border-radius: 10px; flex: 1; cursor: pointer; font-weight: 500; }
.soc-kinds label:hover { background: #f7f9fb; }
.soc-kinds label:has(input:checked) { border-color: #1d9bf0; background: #eef7ff; }
/* Caixa de entrada: a ficha não precisa do botão de WhatsApp (a conversa já está aberta ao lado) */
body.sdr-page #dWaBtn { display: none !important; }
.soc-sync { margin-left: auto; border: 1px solid var(--border, #e9edef); background: #fff; border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 11.5px; font-weight: 600; color: #3b4a54; cursor: pointer; white-space: nowrap; }
.soc-sync:hover { background: #f5f6f6; }
.soc-item .soc-sync + em { margin-left: 8px; }
.soc-item { flex-wrap: wrap; }
.soc-st { flex-basis: 100%; font-size: 11.5px; line-height: 1.4; color: #8696a0; padding-left: 32px; }
.soc-st.ok { color: #15803d; }
.soc-st.info { color: #6b7a86; }
.soc-st.err { color: #b91c1c; }
.soc-sync:disabled { opacity: .6; cursor: default; }

/* Pessoas: mais respiro entre um estágio e outro (o 1º grupo continua colado no topo) */
.grp-row td { padding-top: 52px !important; padding-bottom: 16px !important; }
.inbox-table tbody tr.grp-row:first-child td { padding-top: 26px !important; }

/* Clientes › Equipe (usuários com login próprio) */
.team-row td { background: #f7f8fa !important; }
.team-box { padding: 10px 6px; }
.team-tb { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 13px; }
.team-tb th { text-align: left; font-size: 11px; text-transform: uppercase; color: #8696a0; padding: 4px 8px; }
.team-tb td { padding: 6px 8px; border-top: 1px solid #e9edef; background: #fff; }
.team-add { display: flex; gap: 8px; flex-wrap: wrap; }
.team-add input { flex: 1; min-width: 160px; height: 32px; border: 1px solid var(--border, #e9edef); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; }
.im-sum { margin: 8px 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }
/* histórico de importações */
.im-hist { margin-top: 16px; }
.im-hist:empty { display: none; }
.im-hist-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #8696a0; margin-bottom: 6px; }
.im-hrow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border, #e9edef); border-radius: 10px; margin-bottom: 6px; }
.im-hrow.off { opacity: .6; }
.im-hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.im-hinfo b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-hinfo small { font-size: 11.5px; color: #54656f; }
.im-hinfo small b { font-size: 11.5px; }
.im-gone { color: #b91c1c !important; }
.im-del { flex: none; border: 1px solid #fecaca; background: #fff; color: #b91c1c; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.im-del:hover { background: #fef2f2; }
.im-del:disabled { opacity: .6; cursor: default; }

/* ---------- Equipe › Atividade (mesma estética do Painel de controle) ---------- */
.eq-tabs { display: inline-flex; background: #f0f2f5; border-radius: 999px; padding: 3px; margin-left: 8px; }
.eq-tabs button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; color: #54656f; cursor: pointer; }
.eq-tabs button.on { background: #fff; color: #111b21; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.eq-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; font-size: 13px; color: #54656f; }
.eq-filters label { display: inline-flex; align-items: center; gap: 6px; }
.eq-filters input[type=date], .eq-filters select { height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; color: #111b21; }
.eq-quick { display: inline-flex; background: #f0f2f5; border-radius: 999px; padding: 3px; }
.eq-quick button { border: 0; background: transparent; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: #54656f; cursor: pointer; }
.eq-quick button.on { background: #111b21; color: #fff; }
.eq-btn { height: 32px; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.eq-btn:hover { background: #f5f6f6; }
.eq-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.eq-kl { font-size: 11.5px; font-weight: 600; color: #8696a0; }
.eq-kv { font-size: 22px; letter-spacing: -.02em; color: #111b21; font-variant-numeric: tabular-nums; }
@media (max-width: 1200px) { .eq-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.eq-tw { overflow-x: auto; }
.eq-tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.eq-tb th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #8696a0; padding: 10px 12px; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.eq-tb td { padding: 10px 12px; border-bottom: 1px solid #f5f6f6; color: #111b21; white-space: nowrap; }
.eq-tb .n { text-align: right; font-variant-numeric: tabular-nums; }
.eq-tb td.warn { color: #b91c1c; font-weight: 700; }
.eq-row { cursor: pointer; } .eq-row:hover td { background: #fafbfb; } .eq-row.on td { background: #f0f2f5; }
.eq-who { display: inline-flex; align-items: center; gap: 10px; }
.eq-who span { display: flex; flex-direction: column; line-height: 1.25; } .eq-who small { color: #8696a0; font-size: 11.5px; }
.eq-av { width: 30px; height: 30px; border-radius: 50%; background: #111b21; color: #fff; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; flex: none; }
.eq-bar { display: block; height: 3px; background: #eef0f2; border-radius: 999px; margin-top: 4px; overflow: hidden; } .eq-bar i { display: block; height: 100%; background: #111b21; border-radius: 999px; }
.eq-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.eq-chips button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); background: #fff; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.eq-chips button i { width: 8px; height: 8px; border-radius: 50%; }
.eq-chips button em { font-style: normal; color: #8696a0; font-weight: 600; }
.eq-chips button.on { background: #111b21; border-color: #111b21; color: #fff; } .eq-chips button.on em { color: #c8cdd2; }
.eq-feed { max-height: 620px; overflow-y: auto; padding: 4px 16px 14px; }
.eq-day { position: sticky; top: 0; background: #fff; z-index: 1; font-size: 11.5px; font-weight: 700; color: #8696a0; text-transform: capitalize; padding: 12px 0 6px; }
.eq-ev { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f5f6f6; font-size: 13.5px; color: #3b4a54; }
.eq-ev.sens { background: #fef2f2; margin: 2px -8px; padding: 7px 8px; border-radius: 8px; border-bottom: 0; }
.eq-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.eq-tx { flex: 1; min-width: 0; line-height: 1.45; } .eq-tx b { color: #111b21; } .eq-tx a { color: #0062c4; text-decoration: none; } .eq-tx a:hover { text-decoration: underline; }
.eq-t { flex: none; font-size: 12px; color: #8696a0; font-variant-numeric: tabular-nums; padding-top: 3px; }
.eq-kv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(16px, 1.55vw, 22px); }

/* etiquetas e tags já criadas: chips pra marcar com um clique */
.lf-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lf-chips:empty { display: none; }
.lf-chip { height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid #d1d7db; background: #fff; color: #3b4a54; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lf-chip:hover { border-color: #3b4a54; }
.lf-chip.on { background: #3b4a54; border-color: #3b4a54; color: #fff; }
.lf-chip.more { border-style: dashed; color: #8696a0; font-weight: 500; }
/* Marketing: "Ver origem" mais afastado do campo Follow */
.lf-origin-btn { display: inline-block; margin-top: 18px !important; }
/* WhatsApp do lead: lápis pra corrigir o número */
.lf-wa-edit { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #8696a0; cursor: pointer; display: grid; place-items: center; }
.lf-wa-edit:hover { background: #e9edef; color: #111b21; }
.lf-wa input.editing { background: #fff !important; cursor: text !important; color: #111b21 !important; border-color: #111b21 !important; }

/* ficha: mais respiro entre uma seção e outra (Detalhes, Dados do lead, Comercial, Marketing…) */
.lf-sec { padding-top: 30px !important; padding-bottom: 32px !important; border-bottom: 8px solid #f0f2f5 !important; }
.lf-sec-t { margin-bottom: 18px !important; font-size: 14.5px !important; }
#lfForm > .lf-sec:first-child { padding-top: 18px !important; }

/* etiquetas/tags: chips na frente do campo (2 visíveis + "+N" embaixo abre o resto) */
.lf-chipfield { display: flex; align-items: flex-start; gap: 8px; }
.lf-chipfield > input { flex: 1 1 auto; min-width: 0; }
.lf-chipfield .lf-chips { position: relative; flex: 0 0 46%; max-width: 46%; margin-top: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
.lf-chips-top { display: flex; gap: 4px; max-width: 100%; min-height: 22px; align-items: center; }
.lf-chips-top .lf-chip { min-width: 0; flex: 0 1 auto; }
.lf-chips-pop { position: absolute; top: 100%; right: 0; z-index: 30; margin-top: 4px; width: 240px; max-height: 220px; overflow-y: auto;
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fff; border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.05); }
/* chips na coluna da direita da ficha, na frente do campo (onde ficam Vencimento/Retorno, que é mais curta) */
.lf-det2 .lf-chipfield { display: block; position: relative; }
.lf-det2 .lf-chipfield > input { width: 100%; }
.lf-det2 .lf-chipfield .lf-chips { position: absolute; top: 0; left: calc(100% + 20px); width: 190px; max-width: 190px; min-height: 32px; justify-content: center; }
.lf-chips-top .lf-chip { max-width: 92px; }
.lf-det2 .lf-chips-pop { right: auto; left: 0; }
@media (max-width: 640px) { .lf-det2 .lf-chipfield .lf-chips { position: static; width: auto; max-width: none; margin-top: 6px; } }

/* Pessoas: tags/etiquetas na tabela (2 na frente + "+N" abre o resto) */
.tb-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tb-chips-top { display: flex; gap: 4px; }
.tb-chip { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 21px; line-height: 21px;
  padding: 0 8px; border-radius: 999px; background: #3b4a54; color: #fff; font-size: 11px; font-weight: 600; }
.tb-more { border: 1px dashed #c3cad0; background: #fff; color: #8696a0; border-radius: 999px; height: 19px; padding: 0 7px; font: inherit; font-size: 10.5px; cursor: pointer; }
.tb-more:hover { border-color: #3b4a54; color: #3b4a54; }
.tb-chips-pop { position: fixed; z-index: 1700; max-width: 260px; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fff; border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.05); }
.tb-chips-pop .tb-chip { max-width: 220px; }
.inbox-table td:has(> .tb-chips) { min-width: 200px; }
.tb-chips-top .tb-chip { max-width: 92px; }

/* Configurações da conta do SDR (foto, nome, senha) */
.acc-card { width: min(440px, calc(100vw - 32px)); }
.acc-sec { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid #eef0f3; }
.acc-sec:first-of-type { border-top: 0; }
.acc-sec p { margin: -4px 0 2px; }
.acc-sec input:not([type=file]) { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; }
.acc-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.acc-row input { flex: 1; }
.acc-photo { flex-direction: row; align-items: center; gap: 14px; }
.acc-photo small { display: block; color: #8a93a6; font-size: 12px; margin: 2px 0 8px; }
.acc-pic { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #e9edf1; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #3b4a54; flex: none; }
.acc-pic img { width: 100%; height: 100%; object-fit: cover; }
.acc-btn { display: inline-block; padding: 6px 12px; border: 1px solid #dfe3e8; border-radius: 8px; font-size: 13px; cursor: pointer; background: #fff; }
.acc-btn:hover { background: #f5f6f8; }
.acc-msg:empty { display: none; }
.acc-msg.ok { color: #138a5a; } .acc-msg.err { color: #c62828; }
.me-pop button.me-acc { border: 0; background: none; width: 100%; cursor: pointer; font: inherit; }

/* Estágios de vitória (troféu) e derrota (X): editor do funil, ficha e cartão do quadro */
.fn-res { display: inline-flex; gap: 4px; flex: none; }
.fn-res button { width: 28px; height: 28px; border: 1px solid #dfe3e8; border-radius: 8px; background: #fff; color: #9aa3ad; display: grid; place-items: center; cursor: pointer; padding: 0; }
.fn-res button:hover { color: #3b4a54; }
.fn-res button[data-r=win].on { background: #e8f6ee; border-color: #8fd3ae; color: #138a5a; }
.fn-res button[data-r=loss].on { background: #fdecec; border-color: #f2b1b1; color: #c62828; }
.fn-res-help { margin: -2px 0 8px; }
.lf-cad.out.win { background: #eaf7ef; } .lf-cad.out.win .lf-cad-warn { color: #138a5a; }
.lf-cad.out.loss { background: #f3f4f6; } .lf-cad.out.loss .lf-cad-warn { color: #6b7280; }
.bf-cad.out.win { background: #eaf7ef; color: #11633f; } .bf-cad.out.win .x4i { color: #138a5a; }
.bf-cad.out.loss { background: #f3f4f6; color: #4b5563; } .bf-cad.out.loss .x4i { color: #6b7280; }
.kb-alert.win { background: #e8f6ee; color: #138a5a; }
.kb-alert.loss { background: #f1f2f4; color: #6b7280; }
/* valores no cartão do quadro: fechado (verde) e em aberto (âmbar) */
.kb-card-money .kb-ic { gap: 2px; font-size: 12px; }
.kb-card-money .kb-ic svg { width: 13px; height: 13px; }
.kb-card-money .kb-ic b { font-weight: 700; }
.kb-card-money .kb-ic small { font-size: 10.5px; font-weight: 600; opacity: .8; margin-left: 2px; }

/* cartão do funil: fechado e em aberto sempre visíveis, lado a lado */
.kb-card-money { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 0; }
.kb-card-money .kb-ic { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 8px; border-radius: 8px; font-size: 12.5px; line-height: 1.25; }
.kb-card-money .kb-ic small { margin: 0; font-size: 10px; font-weight: 600; opacity: 1; text-transform: uppercase; letter-spacing: .02em; }
.kb-card-money .kb-ic.rec { background: #eaf7ef; color: #15803d; } .kb-card-money .kb-ic.rec small { color: #4d8a65; }
.kb-card-money .kb-ic.mesa { background: #fdf3e2; color: #b45309; } .kb-card-money .kb-ic.mesa small { color: #a87a3c; }
.kb-card-money .kb-ic.zero { background: #f5f6f8; color: #9aa3ad; } .kb-card-money .kb-ic.zero small { color: #9aa3ad; }

/* vitória sem valor lançado: troféu vermelho (falta lançar o fechamento) */
.kb-alert.win.owe { background: #fdecec; color: #e34948; }
.lf-cad.out.win.owe { background: #fdecec; cursor: pointer; } .lf-cad.out.win.owe .lf-cad-warn { color: #e34948; }
.lf-cad.out.win.owe b { color: #b91c1c; }
.bf-cad.out.win.owe { background: #fdecec; color: #b91c1c; cursor: pointer; } .bf-cad.out.win.owe .x4i { color: #dc2626; }

/* oportunidade sem orçamento: troféu laranja (falta lançar o orçamento) */
.kb-alert.budget { background: #fff1e3; color: #ea7a12; }
.lf-cad.out.budget { background: #fff4e8; cursor: pointer; } .lf-cad.out.budget .lf-cad-warn { color: #ea7a12; } .lf-cad.out.budget b { color: #b45309; }
.bf-cad.out.budget { background: #fff4e8; color: #b45309; cursor: pointer; } .bf-cad.out.budget .x4i { color: #ea7a12; }
/* estágio travado (Fechamento): texto nítido + cadeado no lugar da setinha */
.x4sel.lf-locked:disabled { opacity: 1; cursor: not-allowed; background: #f3f4f6; color: #24313a; }
.x4sel.lf-locked svg { display: none; }
.x4sel.lf-locked::after { content: ""; width: 12px; height: 12px; flex: none; margin-left: auto; opacity: .7;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }

/* botão do modo escuro (rodapé do menu X4 e janela do perfil) */
.x4m-theme { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e6ea; background: #fff; color: #3b4a54; border-radius: 8px;
  padding: 4px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; margin-left: auto; margin-right: 6px; }
.x4m-theme:hover { background: #f3f4f6; }
.x4m-theme svg { width: 14px; height: 14px; }
.me-pop .me-theme { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; background: none; cursor: pointer; font: inherit; }
.me-pop .me-theme svg { width: 15px; height: 15px; }
.x4m-theme { white-space: nowrap; flex: none; }
.x4m-foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4m-foot .x4m-theme { border-radius: 999px; padding: 4px 10px; }
/* X4 Growth: seletor de cliente no topo do menu lateral (cartão "Cliente · Nome ⌄") */
.x4-wsc { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 12px; }
.x4-wsc-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #54656f; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; align-self: flex-start; border-radius: 6px; }
.x4-wsc-back:hover { color: #111b21; background: #f3f4f6; }
.x4-wsc-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.x4-wsc-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid #e6e8eb; background: #fff; border-radius: 12px;
  padding: 8px 10px; cursor: pointer; font: inherit; box-shadow: 0 1px 3px rgba(17,27,33,.06); transition: border-color .15s, box-shadow .15s; }
.x4-wsc-card:hover { border-color: #cfd4da; box-shadow: 0 2px 8px rgba(17,27,33,.08); }
.x4-wsc-card .x4m-chev { margin-left: auto; color: #8a93a6; flex: none; }
.x4-wsc-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--c); color: #fff; font-style: normal; font-weight: 800; font-size: 11.5px; display: grid; place-items: center; flex: none; }
.x4-wsc-logo.home { background: #fff; box-shadow: inset 0 0 0 1px #e6e8eb; }
.x4-wsc-logo.home svg { width: 20px; height: auto; }
.x4-wsc-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.x4-wsc-tx small { font-size: 10.5px; color: #8a93a6; font-weight: 600; }
.x4-wsc-tx b { font-size: 13.5px; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tela sem menu lateral: cartão compacto ao lado do botão X4 */
.x4-wsc.inline { flex-direction: row; align-items: center; padding: 0; margin-left: 10px; display: inline-flex; vertical-align: middle; }
.x4-wsc.inline .x4-wsc-card { width: auto; max-width: 240px; padding: 4px 8px; }
.x4-wsc.inline .x4-wsc-logo { width: 24px; height: 24px; font-size: 10px; border-radius: 7px; }
.x4-wsc.inline .x4-wsc-back span { display: none; }
/* menu lateral recolhido: só o logo do cliente */
body.nav-collapsed .x4-secnav > .x4-wsc, body.nav-collapsed .ag-nav > .x4-wsc { display: flex !important; padding: 4px 8px 10px; }
body.nav-collapsed .x4-wsc:not(.inline) .x4-wsc-tx, body.nav-collapsed .x4-wsc:not(.inline) .x4m-chev, body.nav-collapsed .x4-wsc:not(.inline) .x4-wsc-back span { display: none; }
body.nav-collapsed .x4-wsc:not(.inline) .x4-wsc-card { justify-content: center; padding: 6px 0; }
body.nav-collapsed .x4-wsc:not(.inline) .x4-wsc-back { align-self: center; }
/* lista de clientes */
.x4-wsc-pop { position: fixed; z-index: 1600; width: 290px; max-height: min(70vh, 520px); display: flex; flex-direction: column; background: #fff; border: 1px solid #e6e8eb;
  border-radius: 14px; box-shadow: 0 12px 32px rgba(17,27,33,.16); padding: 8px; }
.x4-wsc-pop .x4m-search { margin-bottom: 6px; }
.x4-wsc-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.x4-wsc-it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 7px 8px; cursor: pointer; font: inherit; }
.x4-wsc-it:hover { background: #f3f4f6; }
.x4-wsc-it.on { background: #f1f3f5; }
.x4-wsc-it.busy { opacity: .5; }
.x4-wsc-it .x4-wsc-tx small { order: 2; font-weight: 500; }
.x4-wsc-ok { margin-left: auto; color: #111b21; font-weight: 800; }
/* menu lateral estreito (Análises): cartão mais enxuto */
.x4-wsc-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x4-wsc-back { max-width: 100%; }
.bi2-nav > .x4-wsc { padding: 2px 0 10px; }
.bi2-nav > .x4-wsc .x4-wsc-card { padding: 6px 8px; gap: 8px; }
.bi2-nav > .x4-wsc .x4-wsc-logo { width: 26px; height: 26px; font-size: 10px; border-radius: 8px; }
.bi2-nav > .x4-wsc .x4-wsc-tx b { font-size: 12.5px; }
.bi2-nav > .x4-wsc .x4-wsc-back { font-size: 12px; padding-left: 0; }
/* seletor de cliente alinhado com as opções do menu (mesma margem; logo na mesma linha dos ícones) e com respiro embaixo */
.x4-secnav > .x4-wsc { padding: 6px 0 16px; margin-bottom: 10px; border-bottom: 1px solid #eef0f3; }   /* o menu já tem 10px de margem */
.bi2-nav > .x4-wsc, .ag-nav > .x4-wsc { padding: 6px 0 16px; margin-bottom: 10px; border-bottom: 1px solid #eef0f3; }
.x4-secnav > .x4-wsc .x4-wsc-card, .bi2-nav > .x4-wsc .x4-wsc-card, .ag-nav > .x4-wsc .x4-wsc-card { padding: 8px 10px 8px 9px; gap: 10px; }
.x4-secnav > .x4-wsc .x4-wsc-back, .bi2-nav > .x4-wsc .x4-wsc-back, .ag-nav > .x4-wsc .x4-wsc-back { padding: 2px 6px 2px 10px; margin-bottom: 2px; }
.x4-wsc-logo.all { background: #111b21; color: #fff; }
.x4-wsc-logo.all svg { width: 15px; height: 15px; }
body.nav-collapsed .x4-secnav > .x4-wsc { border-bottom: 0; margin-bottom: 0; }

/* versão de teste: faixa fixa pra ninguém confundir com o sistema dos clientes */
/* (a faixa fixa saiu do canto: o aviso fica no próprio menu) */
.x4m-trigger { position: relative; }
.x4m-stg { position: absolute; left: 0; top: calc(100% + 1px); background: #f59e0b; color: #1f1300; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 1px 7px; border-radius: 999px; line-height: 1.5; pointer-events: none; white-space: nowrap; }
body.nav-collapsed .x4m-stg { display: none; }
.x4m-stg-row { display: flex; gap: 9px; align-items: flex-start; margin: 2px 8px 4px; padding: 8px 10px; border-radius: 10px; background: #fff4e0; color: #7a4a00; }
.x4m-stg-row svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.x4m-stg-row b { display: block; font-size: 12.5px; } .x4m-stg-row small { display: block; font-size: 11px; line-height: 1.35; opacity: .85; }
.x4m-ver { padding: 2px 12px 0; font-size: 11px; color: #9aa3ad; }

/* mesma formatação em todas as telas: canto direito do topo com sino + foto, e menu lateral com os blocos da tela */
.x4-tr { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.x4-tr-fixed { position: fixed; top: 12px; right: 20px; z-index: 60; }
.ag-head-r .x4-tr, .head-filters .x4-tr { margin-left: 0; }
.x4-autoside { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 20px; overflow-y: auto; }
.x4-autoside a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes x4flash { 0% { box-shadow: 0 0 0 3px rgba(17,27,33,.18); } 100% { box-shadow: 0 0 0 3px rgba(17,27,33,0); } }
.x4-flash { animation: x4flash 1.1s ease-out; }

/* ===== Visão de águia (Inicial): funil Agendamentos → Comparecimentos → Vendas (branco → preto) + vendas e contatos ===== */
.eg { background: #f6f7f9; border: 1px solid var(--border); border-radius: 18px; margin: 0 0 22px; overflow: hidden; }
.eg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e8eaee; flex-wrap: wrap; }
.eg-head b { font-size: 14.5px; color: #111b21; }
.eg-sp { flex: 1; }
.eg-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.eg-head select, .eg-head .x4sel { min-width: 150px; }
.eg-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 320px; }
.eg-funnel { position: relative; display: flex; flex-direction: column; padding-bottom: 18px; }
.eg-stages { display: grid; grid-template-columns: repeat(3, 1fr); }
.eg-st { padding: 16px 18px 12px; border-right: 1px solid #e3e6ea; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eg-st:last-child { border-right: 0; }
.eg-num { font-size: 12px; color: #8a93a6; font-weight: 600; letter-spacing: .04em; }
.eg-st b { font-size: 17px; color: #111b21; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.eg-st strong { font-size: 24px; color: #111b21; margin-top: 4px; line-height: 1.1; }
.eg-st small { font-size: 12px; color: #8a93a6; }
.eg-shape { width: 100%; height: 210px; display: block; margin-top: 8px; }
.eg-shape .eg-empty { opacity: .45; }
.eg-outline { stroke: #c9ced5; stroke-width: 2; }
.eg-i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1.3px solid #a3abb5; color: #8a93a6;
  font-style: normal; font-size: 9px; font-weight: 800; cursor: help; flex: none; line-height: 1; }
.eg-card { margin: 14px 14px 14px 0; background: #fff; border: 1px solid #e3e6ea; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 28px rgba(17,27,33,.07); }
.eg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.eg-top b { display: block; font-size: 28px; font-weight: 800; color: #111b21; letter-spacing: -.01em; }
.eg-top small { font-size: 12.5px; color: #8a93a6; }
.eg-spark { color: #111b21; }
.eg-spark.big svg { width: 100%; height: 34px; display: block; }
.eg-line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eg-dash { stroke: #b6bcc4; stroke-width: 1.2; stroke-dasharray: 3 3; }
.eg-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid #eceef1; border-radius: 12px; background: #fafbfc; }
.eg-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.eg-row span { font-size: 12.5px; color: #54656f; display: flex; align-items: center; gap: 6px; }
.eg-row b { font-size: 20px; color: #111b21; }
.eg-row svg { color: #111b21; flex: none; }
.eg-go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid #e3e6ea; color: #111b21; flex: none; text-decoration: none; }
.eg-go:hover { background: #111b21; color: #fff; border-color: #111b21; }
.eg-go.big { width: 30px; height: 30px; background: #111b21; color: #fff; border-color: #111b21; }
.eg-go.big:hover { background: #3b4a54; }
@media (max-width: 980px) { .eg-body { grid-template-columns: 1fr; } .eg-card { margin: 0 14px 14px; } }
@media (max-width: 640px) { .eg-st { padding: 12px 10px; } .eg-st b { font-size: 14px; } .eg-st strong { font-size: 19px; } }
/* linha do cartão: nome em cima; número, linha fina e botão embaixo */
.eg-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "t t go" "n s go"; align-items: center; column-gap: 12px; row-gap: 2px; }
.eg-row .eg-rt { grid-area: t; }
.eg-row .eg-rn { grid-area: n; }
.eg-row .eg-rs { grid-area: s; display: flex; justify-content: flex-end; }
.eg-row .eg-go { grid-area: go; }

/* ===== Inicial: 4 caixas do dia + Atividades recentes ===== */
.dy { margin: 0 0 18px; }
.dy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dy-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.dy-t { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 0; font-size: 13px; color: #54656f; font-weight: 600; }
.dy-ic { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; color: #111b21; display: grid; place-items: center; font-style: normal; }
.dy-n { display: flex; align-items: baseline; gap: 6px; padding: 2px 14px 0; flex-wrap: wrap; cursor: help; }
.dy-n b { font-size: 28px; font-weight: 800; color: #111b21; line-height: 1.1; }
.dy-n small { font-size: 12.5px; color: #8a93a6; }
.dy-p { font-style: normal; font-size: 12px; font-weight: 700; color: #111b21; background: #eef0f3; border-radius: 999px; padding: 1px 8px; margin-left: auto; }
.dy-s { padding: 4px 14px 12px; font-size: 11.5px; color: #9aa3ad; }
.dy-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid #f0f2f5;
  font-size: 12.5px; font-weight: 600; color: #111b21; text-decoration: none; }
.dy-f:hover { background: #f7f8fa; }
.fd { background: #fff; border: 1px solid var(--border); border-radius: 16px; margin: 0 0 22px; overflow: hidden; }
.fd-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #eef0f3; flex-wrap: wrap; }
.fd-head b { font-size: 14.5px; color: #111b21; }
.fd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fd-chip { border: 1px solid #e3e6ea; background: #fff; color: #54656f; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fd-chip.on { background: #111b21; color: #fff; border-color: #111b21; }
.fd-btn { display: inline-flex; align-items: center; gap: 6px; background: #111b21; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.fd-btn:hover { background: #3b4a54; }
.fd-list { max-height: 520px; overflow-y: auto; padding: 6px 8px; }
.fd-load { padding: 18px; color: #8a93a6; font-size: 13px; }
.fd-it { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; text-decoration: none; color: #3b4a54; }
a.fd-it:hover { background: #f7f8fa; }
.fd-ic { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; color: #111b21; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; }
.fd-it.k-mencao .fd-ic, .fd-it.k-ligacao .fd-ic { background: #111b21; color: #fff; }
.fd-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fd-tx b { font-size: 13.5px; color: #111b21; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-tx small { font-size: 12px; color: #8a93a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-it em { font-style: normal; font-size: 12px; color: #9aa3ad; flex: none; }
.fd-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 46px 20px 50px; color: #8a93a6; font-size: 13px; }
.fd-empty b { color: #111b21; font-size: 14.5px; }
.fd-art { position: relative; width: 120px; height: 76px; margin-bottom: 8px; }
.fd-art span { position: absolute; left: 30px; top: 0; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9ced5); }
.fd-art i { position: absolute; left: 4px; right: 4px; top: 26px; height: 26px; border-radius: 7px; background: #111b21; box-shadow: 0 8px 18px rgba(17,27,33,.18); }
.fd-art i::before, .fd-art i::after { content: ""; position: absolute; left: 12px; height: 3px; border-radius: 2px; background: #5f6b75; }
.fd-art i::before { top: 8px; width: 70%; } .fd-art i::after { top: 15px; width: 50%; }
@media (max-width: 1100px) { .dy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dy-grid { grid-template-columns: 1fr; } }

/* ===== Inicial: Campanhas ===== */
.cp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 14px; }
.cp-list > .fd-empty { grid-column: 1 / -1; }
.cp-card { border: 1px solid #e6e8eb; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: #fafbfc; }
.cp-card.encerrada { opacity: .7; }
.cp-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cp-h b { font-size: 15px; color: #111b21; }
.cp-st { font-size: 11.5px; font-weight: 700; color: #3b4a54; background: #eef0f3; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.cp-card.ativa .cp-st { background: #111b21; color: #fff; }
.cp-per { font-size: 12px; color: #8a93a6; }
.cp-obj { margin: 2px 0 4px; font-size: 13px; color: #3b4a54; }
.cp-goal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.cp-goal span { font-size: 12.5px; color: #54656f; font-weight: 600; }
.cp-goal b { font-size: 16px; color: #111b21; } .cp-goal b small { font-size: 12px; color: #8a93a6; font-weight: 500; }
.cp-bar { height: 8px; border-radius: 999px; background: #e6e8eb; overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: #111b21; border-radius: 999px; }
.cp-pct { font-size: 11.5px; color: #8a93a6; }
.cp-acts { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; border-top: 1px solid #eceef1; padding-top: 8px; }
.cp-act { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3b4a54; cursor: pointer; padding: 3px 0; }
.cp-act.done span { text-decoration: line-through; color: #9aa3ad; }
/* ===== Inicial: Indicadores + radar ===== */
.kp-body { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0; }
.kp-list { padding: 8px 16px 14px; }
.kp-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid #f0f2f5; }
.kp-row:last-child { border-bottom: 0; }
.kp-row.garg { background: #fdf2f2; border-radius: 10px; }
.kp-l { font-size: 13.5px; color: #3b4a54; }
.kp-n { font-size: 18px; color: #111b21; text-align: right; }
.kp-r { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.kp-r b { font-size: 14px; color: #111b21; } .kp-r small { font-size: 11.5px; color: #8a93a6; }
.kp-r.ok b { color: #15803d; } .kp-r.mid b { color: #b45309; } .kp-r.bad b { color: #c62828; }
.kp-money .kp-l { font-weight: 700; color: #111b21; }
.kp-radar { border-left: 1px solid #eef0f3; padding: 14px 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kp-rh { align-self: stretch; display: flex; flex-direction: column; } .kp-rh b { font-size: 13.5px; color: #111b21; } .kp-rh small { font-size: 11.5px; color: #8a93a6; }
.kp-svg { width: 100%; max-width: 360px; height: auto; }
.kp-ring { fill: none; stroke: #e6e8eb; stroke-width: 1; } .kp-ring.ideal { stroke: #111b21; stroke-dasharray: 4 4; stroke-opacity: .55; }
.kp-axis { stroke: #eceef1; stroke-width: 1; }
.kp-lbl { font-size: 11.5px; fill: #54656f; font-weight: 600; } .kp-lbl.bad { fill: #c62828; font-weight: 800; }
.kp-tick { font-size: 9.5px; fill: #a3abb5; }
.kp-shape { fill: rgba(17,27,33,.08); stroke: #111b21; stroke-width: 2.4; stroke-linejoin: round; }
.kp-dot { fill: #111b21; stroke: #fff; stroke-width: 2; } .kp-dot.bad { fill: #c62828; }
.kp-garg { align-self: stretch; display: flex; align-items: center; gap: 8px; background: #fdecec; color: #8f1d1d; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.kp-garg.ok { background: #eaf7ef; color: #11633f; }
.kp-noradar { padding: 30px 10px; text-align: center; color: #8a93a6; font-size: 13px; }
@media (max-width: 1100px) { .kp-body { grid-template-columns: 1fr; } .kp-radar { border-left: 0; border-top: 1px solid #eef0f3; } }
/* Painel: taxas ideais e campanhas */
.pr-body { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 13.5px; color: #3b4a54; }
.pr-in { display: inline-flex; align-items: center; gap: 6px; } .pr-in input { width: 100px; padding: 7px 9px; border: 1px solid #dfe3e8; border-radius: 8px; font: inherit; text-align: right; }
.pr-in em { font-style: normal; color: #8a93a6; font-size: 12.5px; width: 22px; }
.cpn-card { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; }
.cpn-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 14px; }
.cpn-it { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #eceef1; border-radius: 10px; }
.cpn-it > div { flex: 1; min-width: 0; } .cpn-it b { display: block; font-size: 14px; } .cpn-it small { font-size: 12px; color: #8a93a6; }
.cpn-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #eceef1; padding-top: 14px; }
.cpn-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #54656f; font-weight: 600; }
.cpn-form input, .cpn-form textarea, .cpn-form select { padding: 8px 10px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; font-weight: 400; color: #111b21; }
.cpn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cpn-h { display: flex; align-items: center; justify-content: space-between; } .cpn-h b { font-size: 14.5px; color: #111b21; }
.kp-svg { max-width: 420px; }
.kp-row { grid-template-columns: minmax(0, 1fr) 150px 110px; }
.kp-n { white-space: nowrap; }
/* Agenda: links de visualização */
.vl-card { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; }
.vl-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.vl-it { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 1px solid #eceef1; border-radius: 10px; flex-wrap: wrap; }
.vl-it > div { flex: 1; min-width: 200px; } .vl-it b { display: block; font-size: 14px; } .vl-it small { font-size: 12px; color: #8a93a6; }
.vl-it a.cl-cancel { text-decoration: none; }
.vl-off { color: #c62828 !important; }
.vl-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #eceef1; padding-top: 14px; }
.vl-form > label:not(.vl-ck) { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #54656f; font-weight: 600; }
.vl-form input[name=label] { padding: 8px 10px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; }
.vl-cals { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; } .vl-cals > span { font-size: 12.5px; color: #54656f; font-weight: 600; width: 100%; }
.vl-ck { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #3b4a54; }

/* ===== Assinatura (mensalidade pelo Asaas) ===== */
.bl-wrap { max-width: 980px; }
.bl-card { margin-bottom: 16px; }
.bl-load { padding: 18px; color: #8a93a6; font-size: 13px; }
.bl-alert { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 12px; }
.bl-alert.bad { background: #fdecec; color: #8f1d1d; } .bl-alert.late { background: #fff4e0; color: #7a4a00; } .bl-alert.test { background: #eef0f3; color: #3b4a54; }
.bl-plan { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; flex-wrap: wrap; }
.bl-plan small { display: block; font-size: 12px; color: #8a93a6; font-weight: 600; }
.bl-plan b { font-size: 30px; color: #111b21; } .bl-plan b span { font-size: 14px; color: #8a93a6; font-weight: 500; }
.bl-st { display: inline-block; margin-left: 10px; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; vertical-align: middle; }
.bl-st.ok { background: #e8f6ee; color: #11633f; } .bl-st.wait { background: #eef0f3; color: #3b4a54; } .bl-st.late { background: #fff1e3; color: #b45309; } .bl-st.bad { background: #fdecec; color: #c62828; }
.bl-plan dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 16px; font-size: 13px; align-content: center; }
.bl-plan dt { color: #8a93a6; } .bl-plan dd { margin: 0; color: #111b21; font-weight: 600; }
.bl-note { margin: 0 20px 18px; padding: 12px 14px; background: #f6f7f9; border-radius: 10px; font-size: 13px; color: #3b4a54; }
.bl-form { border-top: 1px solid #eef0f3; padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.bl-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #54656f; font-weight: 600; }
.bl-form input { padding: 9px 11px; border: 1px solid #dfe3e8; border-radius: 9px; font: inherit; font-weight: 400; }
.bl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bl-foot { display: flex; justify-content: flex-end; }
.bl-tabs { display: flex; gap: 6px; padding: 12px 16px 0; }
.bl-tabs button { border: 1px solid #e3e6ea; background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: #3b4a54; }
.bl-tabs button.on { background: #111b21; color: #fff; border-color: #111b21; }
.bl-pane { padding: 16px; }
.bl-pix { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.bl-pix img { width: 200px; height: 200px; border: 1px solid #e3e6ea; border-radius: 12px; padding: 6px; background: #fff; }
.bl-pix > div, .bl-boleto { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.bl-pix textarea, .bl-boleto textarea { width: 100%; min-height: 70px; padding: 9px 10px; border: 1px solid #dfe3e8; border-radius: 9px; font: 12px ui-monospace, Menlo, monospace; resize: none; color: #3b4a54; background: #fafbfc; }
.bl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .bl-row a { text-decoration: none; }
.bl-cardpay { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; } .bl-cardpay p { margin: 0; font-size: 13.5px; color: #3b4a54; }
.bl-btn { text-decoration: none; display: inline-block; }
.bl-pill { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #eef0f3; color: #3b4a54; white-space: nowrap; }
.bl-pill.s-RECEIVED, .bl-pill.s-CONFIRMED, .bl-pill.s-RECEIVED_IN_CASH { background: #e8f6ee; color: #11633f; } .bl-pill.s-OVERDUE { background: #fdecec; color: #c62828; }
.bl-table a { color: #111b21; font-weight: 600; font-size: 12.5px; }
.bl-safe { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #8a93a6; margin: 4px 2px 30px; } .bl-safe svg { flex: none; margin-top: 2px; }
.x4-bill { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.x4-bill.atrasado { background: #fff1e3; color: #b45309; } .x4-bill.bloqueado { background: #fdecec; color: #c62828; }
.x4-nv-pill { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  background: #18181b; color: #fff !important; }
.x4-nv-pill:hover { background: #000; }
@media (max-width: 640px) { .bl-two { grid-template-columns: 1fr; } }
.bl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c4c9d0; vertical-align: middle; }
.bl-dot.em_dia { background: #22c55e; } .bl-dot.aguardando { background: #9aa3ad; } .bl-dot.atrasado { background: #f59e0b; } .bl-dot.bloqueado { background: #e34948; }

/* ===== Assinatura: novo visual ===== */
.bl-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  border: 1px solid var(--border); background: #fff; }
.bl-hero-l { background: linear-gradient(135deg, #111b21 0%, #2b3640 100%); color: #fff; padding: 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.bl-tag { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.65); font-weight: 700; }
.bl-hero-l > b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.bl-hero-l > b small { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.65); margin-left: 4px; }
.bl-hero-l .bl-st { align-self: flex-start; margin: 4px 0 0; }
.bl-hero-l p { margin: 10px 0 0; font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.45; max-width: 380px; }
.bl-hero-r { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 14px 20px; }
.bl-mini { display: flex; gap: 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid #f0f2f5; }
.bl-mini:last-child { border-bottom: 0; }
.bl-mini > svg { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: #f3f4f6; color: #111b21; box-sizing: border-box; }
.bl-mini span { display: flex; flex-direction: column; min-width: 0; }
.bl-mini small { font-size: 11.5px; color: #8a93a6; font-weight: 600; } .bl-mini b { font-size: 14.5px; color: #111b21; } .bl-mini i { font-style: normal; font-size: 11.5px; color: #8a93a6; }
.bl-payrow { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.bl-payic { width: 40px; height: 40px; border-radius: 12px; background: #fff1e3; color: #b45309; display: grid; place-items: center; flex: none; }
.bl-paytx { flex: 1; min-width: 240px; } .bl-paytx b { font-size: 15px; color: #111b21; } .bl-paytx p { margin: 3px 0 0; font-size: 13px; color: #54656f; }
.bl-payact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bl-list { padding: 4px 10px 10px; }
.bl-li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 110px; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid #f0f2f5; }
.bl-li:last-child { border-bottom: 0; }
.bl-li-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #f3f4f6; color: #8a93a6; }
.bl-li-ic.ok { background: #e8f6ee; color: #15803d; } .bl-li-ic.bad { background: #fdecec; color: #c62828; }
.bl-li-ic svg { width: 16px; height: 16px; }
.bl-li-tx { display: flex; flex-direction: column; min-width: 0; } .bl-li-tx b { font-size: 14.5px; color: #111b21; } .bl-li-tx small { font-size: 12px; color: #8a93a6; }
.bl-li-a { justify-self: end; font-size: 12.5px; font-weight: 700; color: #111b21; text-decoration: none; border: 1px solid #e3e6ea; border-radius: 999px; padding: 4px 11px; }
.bl-li-a:hover { background: #f5f6f8; }
@media (max-width: 760px) { .bl-hero { grid-template-columns: 1fr; } .bl-li { grid-template-columns: 32px minmax(0, 1fr); } .bl-li .bl-pill, .bl-li .bl-li-a { grid-column: 2; justify-self: start; } }

/* ===== Clientes (admin X4 Growth): novo visual ===== */
.cl2 .pc-top { gap: 12px; }
.cl2-asaas { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #54656f; font-weight: 600; border: 1px solid #e3e6ea; border-radius: 999px; padding: 5px 11px; background: #fff; }
.cl2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.cl2-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cl2-kpi small { font-size: 12.5px; color: #54656f; font-weight: 600; } .cl2-kpi b { font-size: 26px; color: #111b21; font-weight: 800; } .cl2-kpi span { font-size: 11.5px; color: #9aa3ad; }
.cl2-kpi.late b { color: #b45309; } .cl2-kpi.bad b { color: #c62828; }
.cl2-card .pc-card-h { flex-wrap: wrap; gap: 10px; }
.cl2-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.cl2-filters button { border: 1px solid #e3e6ea; background: #fff; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; font-weight: 600; color: #54656f; cursor: pointer; }
.cl2-filters button.on { background: #111b21; color: #fff; border-color: #111b21; }
.cl2-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e6ea; border-radius: 999px; padding: 5px 12px; background: #fff; color: #8a93a6; }
.cl2-search input { border: 0; outline: none; font: inherit; font-size: 13px; width: 190px; background: none; color: #111b21; }
.cl2-head, .cl2-row { display: grid; grid-template-columns: minmax(220px, 2fr) 110px 170px 130px 100px 210px; align-items: center; gap: 12px; padding: 0 18px; }
.cl2-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9aa3ad; font-weight: 700; padding-top: 10px; padding-bottom: 8px; border-bottom: 1px solid #eef0f3; }
.cl2-row { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #f2f3f5; }
.cl2-row:hover { background: #fafbfc; }
.cl2-row.adm { background: #f8f7ff; }
.cl2-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cl2-av { width: 36px; height: 36px; border-radius: 11px; background: var(--c); color: #fff; font-style: normal; font-weight: 800; font-size: 12.5px; display: grid; place-items: center; flex: none; }
.cl2-who > span { display: flex; flex-direction: column; min-width: 0; } .cl2-who b { font-size: 14px; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl2-who small { font-size: 11.5px; color: #9aa3ad; }
.cl2-val b { font-size: 14.5px; color: #111b21; } .cl2-val small { font-size: 11.5px; color: #9aa3ad; }
.cl2-row .bl-st { margin: 0; } .bl-st.none { background: #f3f4f6; color: #8a93a6; }
.cl2-unl { display: block; font-size: 11px; color: #9aa3ad; margin-top: 3px; }
.cl2-due { font-size: 13px; color: #3b4a54; } .cl2-due .late { color: #c62828; font-size: 12.5px; }
.cl2-num { font-size: 12.5px; color: #8a93a6; }
.cl2-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.cl2-btn { padding: 6px 12px !important; font-size: 12.5px !important; }
.cl2-ic { width: 32px; height: 32px; border-radius: 9px; border: 1px solid #e3e6ea; background: #fff; color: #3b4a54; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cl2-ic:hover { background: #111b21; color: #fff; border-color: #111b21; }
.cl2-team > div { padding: 0 18px 14px; }
.cl2-head, .cl2-row { grid-template-columns: minmax(180px, 2fr) minmax(90px, 1fr) minmax(120px, 1.2fr) minmax(100px, 1fr) 90px auto; }
@media (max-width: 860px) { .cl2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cl2-head { display: none; }
  .cl2-row { grid-template-columns: 1fr auto; } .cl2-row > span:nth-child(n+2):not(.cl2-act) { grid-column: 1; } .cl2-act { grid-column: 2; grid-row: 1 / span 5; } }
.cl2-btn { white-space: nowrap; }
.cl2-act { flex-wrap: nowrap; }
@media (max-width: 1240px) {
  .cl2-head, .cl2-row { grid-template-columns: minmax(170px, 2fr) minmax(90px, 1fr) minmax(110px, 1.2fr) minmax(90px, 1fr) auto; gap: 10px; }
  .cl2-head > span:nth-child(5), .cl2-row > .cl2-num { display: none; }
}
/* painel de segurança (admin) */
.sec-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 60vh; overflow: auto; }
.sec-it { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid #eceef1; border-radius: 10px; }
.sec-it i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; flex: none; }
.sec-it.ok i { background: #e8f6ee; color: #15803d; } .sec-it.bad i { background: #fdecec; color: #c62828; }
.sec-it b { display: block; font-size: 13.5px; color: #111b21; } .sec-it small { font-size: 12px; color: #54656f; }

/* Cobrança: escolha entre tabela e valor fixo */
.bl-mode { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.bl-mode label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; cursor: pointer; font-weight: 400; }
.bl-mode label:has(input:checked) { border-color: currentColor; }
.bl-mode input { margin-top: 3px; width: auto; }
.bl-mode span { display: flex; flex-direction: column; gap: 2px; }
.bl-mode small { font-size: 12.5px; }
/* Assinatura: como o valor é calculado */
.bl-calc { margin: 6px 0 0; font-size: 13px; opacity: .85; }

/* ===== Agenda dentro do Comercial: D1 (abas) em cima, a barra do calendário vira a D2 ===== */
.ag-wrapcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.ag-wrapcol > .ag-main { flex: 1 1 auto; min-height: 0; }
.ag-d1 .lead-subnav { margin-left: 0; }
.ag-wrapcol .ag-head { height: auto; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }

/* =====================================================================
   Layout padrão das telas: D1 (abas + sino + perfil), D2 (o que é da tela:
   título/funil, visualizações, pesquisa pela lupa, filtros, novo, exportar), D3 (conteúdo)
   ===================================================================== */
.x4-d2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
.x4-d2 .d2-l, .x4-d2 .d2-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.x4-d2 .d2-r { margin-left: auto; gap: 8px; }
.x4-d2 .crm-scope { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.d2-title { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 8px;
  font: inherit; font-size: 15px; color: #111b21; cursor: pointer; }
.d2-title:hover { background: #f0f2f5; }
.d2-title b, .d2-title-tx { font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.d2-views { display: inline-flex; align-items: center; gap: 2px; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border, #e9edef); }
.d2-views button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent;
  color: #667781; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.d2-views button:hover { background: #f0f2f5; color: #111b21; }
.d2-views button.on { background: #111b21; color: #fff; }
.d2-sep { width: 1px; height: 22px; background: var(--border, #e9edef); margin: 0 2px; }
#kbTools { display: inline-flex; align-items: center; gap: 6px; }
#kbTools:empty { display: none; }
#kbTools .kb-unfold { margin-left: 0; }
.fun-pick { min-width: 220px; z-index: 60; }
.fun-pick .fun-pick-new { border-top: 1px solid var(--border, #e9edef); color: #3b4a54; }
/* pesquisa: só a lupa; abre ao clicar */
.x4-search { display: inline-flex; align-items: center; gap: 6px; height: 32px; width: 32px; padding: 0 8px; border-radius: 999px; border: 1px solid transparent;
  color: #3b4a54; cursor: pointer; overflow: hidden; transition: width .2s ease, border-color .2s ease, background .2s ease; flex: none; }
.x4-search:hover { background: #f0f2f5; }
.x4-search svg { flex: none; margin-left: -1px; }
.x4-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; width: 0; padding: 0; opacity: 0; color: #111b21; }
.x4-search.open { width: 270px; border-color: var(--border, #e9edef); background: #fff; cursor: text; }
.x4-search.open input { width: 100%; opacity: 1; }
.crm-bar.x4-d2 .chk { white-space: nowrap; }

/* ===== Kanban compacto: cabeçalho da etapa sem caixa, bolinha pulsando na cor da etapa ===== */
.kc-board { gap: 0; padding: 10px 6px 14px; }
.kb-col.kc-col { flex: 0 0 282px; max-width: 282px; background: transparent; border: 0; border-radius: 0; padding: 0 8px; border-left: 1px solid #e3e7eb; }
.kb-col.kc-col:first-child { border-left: 0; }
.kc-col-h { display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px; min-width: 0; }
.kc-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #9e9e9e); animation: kcPulse 2.2s ease-out infinite; }
@keyframes kcPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, #9e9e9e) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c, #9e9e9e) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .kc-dot { animation: none; } }
.kc-col-t { font-size: 13.5px; font-weight: 700; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kc-col-n { font-size: 12.5px; color: #8696a0; flex: none; }
.kc-col-sp { flex: 1; }
.kc-col-v { font-size: 12px; color: #54656f; font-weight: 600; white-space: nowrap; flex: none; }
.kc-col-late { display: inline-flex; align-items: center; gap: 3px; color: #9aa4ab; flex: none; }
.kc-col-late.on { color: #54656f; }
.kc-col-late b { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #e53935; color: #fff; font-size: 10.5px; display: inline-grid; place-items: center; }
.kc-col-m { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: transparent; color: #8696a0; border-radius: 6px; cursor: pointer; }
.kc-col-m:hover { background: #eef1f4; color: #111b21; }
.kc-col-pop { min-width: 170px; z-index: 60; }
.kc-col .kb-cards { background: #f3f5f7; border-radius: 12px; padding: 8px; gap: 8px; }

/* ficha do kanban */
.kb-card.kc { padding: 11px 12px 9px; border-radius: 10px; border: 1px solid #e8ecef; box-shadow: 0 1px 2px rgba(17, 27, 33, .05); display: flex; flex-direction: column; gap: 6px; }
.kb-card.kc:hover { border-color: #d5dbe0; box-shadow: 0 2px 6px rgba(17, 27, 33, .08); }
.kb-card.kc.late { background: #fdf1f1; border-color: #f5d0d0; }
.kc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kc-id { display: flex; flex-direction: column; min-width: 0; }
.kc-code { font-size: 11px; color: #9aa3ab; letter-spacing: .02em; line-height: 1.3; }
.kc-name { font-size: 14px; font-weight: 700; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.kc-who { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #eef1f4; display: grid; place-items: center; overflow: hidden; margin-top: 1px; }
.kc-who i { width: 100%; height: 100%; background-size: cover; background-position: center; }
.kc-who b { font-size: 10.5px; color: #54656f; font-weight: 700; }
.kc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.kc-tags span { font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--c); padding: 3px 7px; border-radius: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-tags em { font-style: normal; font-size: 11px; color: #8696a0; align-self: center; }
.kc-val { font-size: 13.5px; font-weight: 700; color: #111b21; }
.kc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.kc-when { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #8696a0; white-space: nowrap; }
.kc-when.late { color: #d93025; font-weight: 700; }
.kc-when.none { color: #b45309; font-weight: 600; }
.kc-r { display: inline-flex; align-items: center; gap: 6px; }
.kc-res { display: inline-grid; place-items: center; }
.kc-res.win { color: #16a34a; } .kc-res.win.owe { color: #d93025; } .kc-res.loss { color: #8696a0; } .kc-res.budget { color: #f59e0b; }
.kc-msg { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border: 0; border-radius: 999px; background: #f0f2f5; color: #8696a0; cursor: pointer; }
.kc-msg:hover { color: #111b21; background: #e7eaed; }
.kc-msg.on { color: #54656f; }
.kc-msg b { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #e53935; color: #fff; font-size: 10.5px; display: inline-grid; place-items: center; }
.late .kc-msg { background: #fbe3e3; }

/* Relatórios do funil (mesmo visual das Análises) */
.fr-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 32px; }
.fr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fr-head b { font-size: 15px; }
.fr-head select { margin-left: auto; }

/* =====================================================================
   Ficha do lead (grande): topo com código, temperatura e score; menu de botões
   à esquerda (uma parte por vez); financeiro + histórico em abas à direita
   ===================================================================== */
.bf2 .bf-card { display: flex; flex-direction: column; }
.bf2 .bf-head { padding: 10px 18px; }
.bf2-hero { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border, #e9edef); flex: none; }
.bf2-hero #bfAvatar .avatar { width: 52px; height: 52px; font-size: 20px; }
.bf2-id { flex: 1; min-width: 0; }
.bf2-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bf2-code { font-size: 12px; color: #8696a0; letter-spacing: .02em; }
.bf2-temp { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.bf2-temp:empty, .bf2-score:empty { display: none; }
.bf2-temp.frio { background: #e0f2fe; color: #0369a1; }
.bf2-temp.morno { background: #fef3c7; color: #b45309; }
.bf2-temp.quente { background: #fee2e2; color: #c62828; }
.bf2-score { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 4px; border: 1px solid var(--border, #e9edef); border-radius: 999px; font-size: 11.5px; color: #54656f; cursor: help; }
.bf2-score i { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#111b21 calc(var(--p) * 1%), #e5e8eb 0); -webkit-mask: radial-gradient(circle, transparent 3.5px, #000 4px); mask: radial-gradient(circle, transparent 3.5px, #000 4px); }
.bf2-score b { color: #111b21; }
.bf2-id h2 { margin: 2px 0 0; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf2-sub { display: flex; gap: 10px; font-size: 12.5px; color: #8696a0; margin-top: 2px; }
.bf2-sub span:empty { display: none; }
.bf2-sub #bfAge::before { content: '·'; margin-right: 8px; }
.bf2-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.bf2-acts .bf-cad:empty { display: none; }
.bf2-talk { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 5px; border: 0; border-radius: 999px; background: #111b21; color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.bf2-talk span { width: 28px; height: 28px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; }
.bf2-talk:hover { background: #2a3942; }
.bf2-more { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border, #e9edef); background: #fff; color: #54656f; display: grid; place-items: center; cursor: pointer; }
.bf2-more:hover { color: #111b21; background: #f5f6f7; }

.bf2 .bf-body { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); }
.bf2 .bf-left { padding: 16px 18px 30px; overflow-y: auto; }
.bf2-nav { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border, #e9edef); border-radius: 12px; overflow: hidden; background: #fff; }
.bf2-nav button { height: 44px; border: 0; border-right: 1px solid var(--border, #e9edef); border-bottom: 1px solid var(--border, #e9edef); background: transparent; color: #667781; display: grid; place-items: center; cursor: pointer; }
.bf2-nav button:nth-child(5n) { border-right: 0; }
.bf2-nav button:hover { background: #f5f6f7; color: #111b21; }
.bf2-nav button.on { background: #111b21; color: #fff; }
.bf2-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 6px; }
.bf2-sec-h b { font-size: 17px; letter-spacing: -.01em; }
.bf2-paged .lf-sec:not(.bf-cur) { display: none !important; }
.bf2-paged .lf-full-only.bf-cur { display: block; }
.bf2-paged .lf-sec.bf-cur { border-top: 0 !important; margin-top: 0 !important; padding-top: 4px !important; }
.bf2 .bf-left #dDet { max-width: none; }
.bf2-files .bf-sec-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bf2 .bf-right { background: #f7f8fa; padding: 16px 18px 0; display: flex; flex-direction: column; min-height: 0; }
.bf2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: none; }
.bf2-kpi { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 14px 12px; border-radius: 12px; border: 1px solid var(--border, #e9edef);
  background: #fff; text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.bf2-kpi:hover { border-color: #cfd6db; }
.bf2-kpi b { font-size: 17px; letter-spacing: -.01em; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bf2-kpi span { font-size: 12px; color: #667781; }
.bf2-kpi i { position: absolute; right: 12px; bottom: 12px; color: #9aa4ab; }
.bf2-tabs { display: flex; gap: 2px; margin-top: 16px; overflow-x: auto; flex: none; border-bottom: 1px solid var(--border, #e9edef); }
.bf2-tabs button { flex: none; height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: #667781; cursor: pointer; white-space: nowrap; }
.bf2-tabs button:hover { color: #111b21; }
.bf2-tabs button.on { color: #111b21; border-bottom-color: #111b21; }
.bf2-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border, #e9edef); border-top: 0; border-radius: 0 0 12px 12px; margin-bottom: 14px; }
.bf2-tools { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; flex-wrap: wrap; }
.bf2-tools[hidden], .bf2 .bf-compose[hidden] { display: none; }
.bf2-search { flex: 1 1 220px; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--border, #e9edef); border-radius: 999px; color: #8696a0; background: #fafbfb; }
.bf2-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: #111b21; min-width: 0; }
.bf2 .bf-chips { flex-wrap: wrap; }
.bf2 .bf-feed { padding: 8px 16px 16px; gap: 6px; }
.bf2-day { font-size: 11px; font-weight: 700; color: #8696a0; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.bf2-day::after { content: ''; flex: 1; height: 1px; background: #eceff1; }
.bf2-empty { padding: 26px 8px; text-align: center; color: #8696a0; font-size: 13px; }
/* linha do tempo */
.tl-it { position: relative; display: flex; gap: 12px; padding: 6px 0 8px; }
.tl-it::before { content: ''; position: absolute; left: 15px; top: 38px; bottom: -6px; width: 1px; background: #e3e7ea; }
.tl-it:has(+ .bf2-day)::before, .tl-it:last-child::before { display: none; }
.tl-ic { flex: none; width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #eef2ef; color: #3f6b4f; border: 1px solid #dfe8e2; }
.tl-event .tl-ic { background: #e6f3f7; color: #1f6f86; border-color: #d3e9f0; }
.tl-stage .tl-ic { background: #efeefe; color: #5b4ff5; border-color: #e1defd; }
.tl-finance .tl-ic { background: #e8f6ee; color: #15803d; border-color: #d3eedd; }
.tl-call .tl-ic { background: #fff4e5; color: #b45309; border-color: #fbe6c6; }
.tl-change .tl-ic, .tl-file .tl-ic { background: #f1f3f5; color: #54656f; border-color: #e5e8eb; }
.tl-b { flex: 1; min-width: 0; padding-top: 5px; }
.tl-h { display: flex; align-items: center; gap: 8px; }
.tl-h b { flex: 1; font-size: 13.5px; color: #111b21; }
.tl-t { font-size: 11.5px; color: #8696a0; }
.tl-who { width: 22px; height: 22px; border-radius: 50%; background: #d9f2e3; color: #166534; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; flex: none; }
.tl-who.sys { background: #eef1f4; color: #8696a0; }
.tl-l { font-size: 12.5px; color: #3b4a54; margin-top: 3px; line-height: 1.45; }
.tl-l span { color: #8696a0; }
.tl-l b { color: #111b21; }
.tl-tag { display: inline-block; margin-top: 5px; font-size: 10.5px; color: #667781; background: #f0f2f5; padding: 2px 7px; border-radius: 5px; }
/* formulários, compras e oportunidades */
.bf2-card { border: 1px solid var(--border, #e9edef); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.bf2-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.bf2-qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px dashed #edf0f2; font-size: 12.5px; }
.bf2-qa span { color: #667781; }
.bf2-list-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 4px; }
.bf2-fin-open { border: 1px solid var(--border, #e9edef); background: #fff; border-radius: 999px; height: 28px; padding: 0 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.bf2-fin-open:hover { background: #f5f6f7; }
.bf2-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #f0f2f4; }
.bf2-row-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bf2-row-tx b { font-size: 13.5px; } .bf2-row-tx small { color: #8696a0; font-size: 12px; }
.bf2-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1f3f5; color: #54656f; flex: none; }
.bf2-ic.ok, .bf2-ic.fechado { background: #e8f6ee; color: #15803d; } .bf2-ic.aberto { background: #fff4e5; color: #b45309; }
.bf2-pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #f1f3f5; color: #54656f; }
.bf2-pill.aberto { background: #fff4e5; color: #b45309; } .bf2-pill.fechado { background: #e8f6ee; color: #15803d; }
@media (max-width: 1000px) { .bf2 .bf-body { grid-template-columns: 1fr; overflow-y: auto; } .bf2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bf2 .bf-body { grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); }
.bf2-paged .lf-code { display: none; }
.bf2-paged .lf-na { display: flex !important; flex-direction: column; gap: 16px; }
.bf2-paged .lf-na.bf-cur { display: flex !important; }
.bf2-paged .lf-na:not(.bf-cur) { display: none !important; }
.bf2-paged .lf-na .lf-na-appt { margin-top: 0; }
.bf2-paged .lf-money-strip { display: none !important; }

/* ===== Adicionar lead: nome + um canal, prévia ao lado ===== */
.ag-card.cl2-card { width: min(820px, calc(100vw - 32px)); padding: 0; overflow: hidden; border-radius: 16px; }
.cl2-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border, #e9edef); position: relative; }
.cl2-hic { width: 42px; height: 42px; border-radius: 12px; background: #eef7f0; color: #15803d; display: grid; place-items: center; flex: none; }
.cl2-head b { display: block; font-size: 16px; }
.cl2-head span { font-size: 12.5px; color: #667781; }
.cl2-x { position: static !important; margin-left: auto; }
.cl2-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.cl2-form { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cl2-l { font-size: 13px; font-weight: 700; color: #111b21; }
.cl2-in, .cl2-phone input, .cl2-phone select { height: 42px; border: 1px solid var(--border, #dfe3e6); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; color: #111b21; min-width: 0; }
.cl2-in:focus, .cl2-phone input:focus, .cl2-phone select:focus { outline: 0; border-color: #111b21; box-shadow: 0 0 0 3px rgba(17, 27, 33, .08); }
.cl2-ch-h { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.cl2-ch-h b { font-size: 13px; } .cl2-ch-h i { font-style: normal; color: #16a34a; margin-left: 4px; }
.cl2-ch-h span { font-size: 12px; color: #8696a0; }
.cl2-ch { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: center; }
.cl2-ci { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border, #dfe3e6); display: grid; place-items: center; color: #8696a0; transition: background .15s, color .15s; }
.cl2-ci.on { background: #e8f6ee; border-color: #c9ead6; color: #15803d; }
.cl2-phone { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 6px; }
.cl2-prev { background: #f7f8fa; border-left: 1px solid var(--border, #e9edef); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cl2-prev-t { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8696a0; }
.cl2-pc { background: #fff; border: 1px solid var(--border, #e9edef); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.cl2-pc-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cl2-pc-h div { min-width: 0; } .cl2-pc-h b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl2-pc-h small { font-size: 11.5px; color: #8696a0; }
.cl2-av { width: 40px; height: 40px; border-radius: 50%; background: #e8f6ee; color: #15803d; font-weight: 800; display: grid; place-items: center; flex: none; }
.cl2-pl { display: flex; align-items: center; gap: 8px; color: #9aa4ab; min-width: 0; }
.cl2-pl b { font-size: 12.5px; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl2-pl i { flex: 1; height: 7px; border-radius: 4px; background: #eef1f4; max-width: 130px; }
.cl2-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 4px; }
.cl2-bar i { height: 4px; border-radius: 3px; background: #e3e7ea; transition: background .2s; }
.cl2-bar i.on { background: #16a34a; }
.cl2-cnt { font-size: 12px; color: #667781; }
.cl2-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border, #e9edef); }
.cl2-tg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #3b4a54; cursor: pointer; }
.cl2-tg input { position: absolute; opacity: 0; pointer-events: none; }
.cl2-tg span { width: 34px; height: 20px; border-radius: 999px; background: #d7dce0; position: relative; transition: background .15s; }
.cl2-tg span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cl2-tg input:checked + span { background: #111b21; } .cl2-tg input:checked + span::after { left: 16px; }
.cl2-tg input:focus-visible + span { outline: 2px solid #111b21; outline-offset: 2px; }
.cl2-go { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 18px; border: 0; border-radius: 999px; background: #111b21; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cl2-go span { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #111b21; display: grid; place-items: center; }
.cl2-go:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) { .cl2-body { grid-template-columns: 1fr; } .cl2-prev { border-left: 0; border-top: 1px solid var(--border, #e9edef); } .cl2-foot { flex-wrap: wrap; } }
.cl2-head b { text-transform: none !important; letter-spacing: -.01em !important; color: #111b21 !important; font-size: 16px !important; font-weight: 700; }
.cl2-head span { text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; }
.cl2-phone { grid-template-columns: 82px minmax(0, 1fr); }

/* =====================================================================
   Ficha do lead em páginas (lateral e ficha grande iguais)
   ===================================================================== */
.lf-paged > section.lf-sec:not(.lf-cur) { display: none !important; }
.lf-paged > section.lf-sec.lf-cur { display: block !important; border-top: 0 !important; margin-top: 0 !important; padding-top: 2px !important; }
#bigFicha .lf-side-only, #bigFicha .lf-hero { display: none !important; }
.lf-hero { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 12px; }
.lf-hero-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lf-hero-code { font-size: 12px; color: #8696a0; }
.lf-nav { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--border, #e9edef); border-radius: 12px; overflow: hidden; background: #fff; }
.lf-nav button { height: 42px; border: 0; border-right: 1px solid var(--border, #e9edef); border-bottom: 1px solid var(--border, #e9edef); background: transparent; color: #667781; display: grid; place-items: center; cursor: pointer; }
.lf-nav button:nth-child(6n) { border-right: 0; }
.lf-nav button:hover { background: #f5f6f7; color: #111b21; }
.lf-nav button.on { background: #111b21; color: #fff; }
#bigFicha .lf-nav { grid-template-columns: repeat(5, 1fr); }
#bigFicha .lf-nav button:nth-child(6n) { border-right: 1px solid var(--border, #e9edef); }
#bigFicha .lf-nav button:nth-child(5n) { border-right: 0; }
.lf-pg-h { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 8px; min-height: 30px; }
.lf-pg-h b { font-size: 17px; letter-spacing: -.01em; }
.lf-pg-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border, #e9edef); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: #111b21; }
.lf-pg-btn:hover { background: #f5f6f7; }
/* cartões do Perfil (Contato e Dados) */
.lf-card-t { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #667781; margin: 12px 2px 6px; }
.lf-card-t .lf-code { text-transform: none; letter-spacing: 0; font-weight: 600; }
.lf-card { border: 1px solid var(--border, #e9edef); border-radius: 12px; background: #fff; overflow: hidden; }
.lf-crow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 10px; border-top: 1px solid #eef1f3; }
.lf-crow:first-child { border-top: 0; }
.lf-ci { color: #8696a0; display: grid; place-items: center; }
.lf-crow .lf-row-v, .lf-crow input { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 13.5px; font-weight: 600; color: #111b21; min-width: 0; height: 40px; padding: 0 4px; }
.lf-crow input::placeholder { font-weight: 400; color: #9aa4ab; }
.lf-crow .lf-wa { display: flex; align-items: center; gap: 4px; }
.lf-cacts { display: inline-flex; gap: 4px; }
.lf-cbtn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f0f2f5; color: #54656f; display: grid; place-items: center; cursor: pointer; }
.lf-cbtn:hover { background: #e4e7ea; color: #111b21; }
.lf-card.lf-rows { padding: 2px 0; }
.lf-card.lf-rows .lf-row { padding: 0 12px; border-top: 1px solid #f2f4f5; }
.lf-card.lf-rows .lf-row:first-child { border-top: 0; }
/* atribuir a conversa */
.lf-assign { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border: 1px solid var(--border, #e9edef); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; color: #3b4a54; flex: none; }
.lf-assign:hover { background: #f5f6f7; }
.lf-assign span:not(.lf-as-av) { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.lf-assign small { font-size: 10px; color: #8696a0; }
.lf-assign b { font-size: 12.5px; color: #111b21; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-as-av { width: 28px; height: 28px; border-radius: 50%; background: #d9f2e3; color: #166534; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; }
.lf-as-av.off { background: #f0f2f5; color: #667781; font-size: 16px; font-weight: 400; }
.lf-as-pop { position: fixed; z-index: 1400; min-width: 230px; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--border, #e9edef); border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 20, 26, .16); padding: 6px; }
.lf-as-h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #8696a0; padding: 6px 8px 8px; }
.lf-as-pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; color: #111b21; cursor: pointer; text-align: left; }
.lf-as-pop button:hover, .lf-as-pop button.on { background: #f3f5f7; }
.lf-as-pop button i { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; flex: none; }
.lf-as-pop button em { margin-left: auto; font-style: normal; color: #16a34a; }
.lf-as-pop .lf-as-none { color: #c62828; border-top: 1px solid #f0f2f4; border-radius: 0 0 8px 8px; margin-top: 4px; }
/* agendamentos (cartão do próximo + semana) */
.lf-ap-card { background: #111b21; color: #fff; border-radius: 14px; padding: 14px; margin-bottom: 8px; }
.lf-ap-top { display: flex; align-items: center; gap: 12px; }
.lf-ap-day { width: 52px; height: 52px; border-radius: 12px; background: #d9fbe6; color: #0b3b22; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1; }
.lf-ap-day small { font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.lf-ap-day b { font-size: 21px; margin-top: 2px; }
.lf-ap-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lf-ap-tx b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-ap-tx small { font-size: 12px; color: #aebac1; }
.lf-ap-acts { display: flex; gap: 6px; margin-top: 12px; }
.lf-ap-acts button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: #2a3942; color: #e9edef; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lf-ap-acts button:hover { background: #374953; }
.lf-ap-acts .lf-ap-del { background: transparent; color: #aebac1; }
.lf-ap-acts .lf-ap-del:hover { color: #ff8a80; background: transparent; }
.lf-ap-empty { padding: 14px; border: 1px dashed #dfe3e6; border-radius: 12px; font-size: 13px; color: #667781; margin-bottom: 8px; }
.lf-ap-week { display: grid; grid-template-columns: 22px repeat(7, 1fr) 22px; gap: 3px; align-items: center; margin: 6px 0 4px; }
.lf-ap-nav { border: 0; background: transparent; color: #8696a0; font-size: 18px; cursor: pointer; height: 46px; }
.lf-ap-nav:hover { color: #111b21; }
.lf-ap-d { height: 52px; border: 0; border-radius: 10px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; font: inherit; color: #3b4a54; }
.lf-ap-d small { font-size: 10.5px; color: #8696a0; font-weight: 700; }
.lf-ap-d b { font-size: 14px; }
.lf-ap-d i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.lf-ap-d.has i { background: #16a34a; }
.lf-ap-d:hover { background: #f0f2f5; }
.lf-ap-d.today { background: #111b21; color: #fff; } .lf-ap-d.today small { color: #aebac1; }
.lf-ap-past { display: flex; gap: 10px; font-size: 12.5px; padding: 7px 2px; border-top: 1px solid #f0f2f4; color: #667781; }
.lf-ap-past b { color: #3b4a54; font-weight: 600; }
.lf-appt-ft { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
/* compras na lateral */
.lf-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.lf-kpis .bf2-kpi { padding: 12px; }
.lf-kpis .bf2-kpi b { font-size: 15px; }
.fin-inline { background: transparent !important; box-shadow: none !important; border: 0 !important; width: auto !important; max-height: none !important; }
.fin-inline .fin-body { padding: 0 !important; overflow: visible !important; }
#bfFeed .fin-inline { padding-top: 6px; }
/* histórico na lateral */
.lf-hist .tl-ic::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lf-hist .tl-ic { width: 22px; height: 22px; }
.lf-hist .tl-it::before { left: 10.5px; top: 30px; }
.lf-hist .tl-msg .tl-ic { background: #eef1f4; color: #8696a0; border-color: #e5e8eb; }
.lf-files-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
/* menu ⋮ da etapa no Kanban: menor */
.kc-col-pop { min-width: 0 !important; width: max-content; padding: 4px !important; border-radius: 10px !important; }
.kc-col-pop button { font-size: 12.5px !important; padding: 6px 10px !important; min-height: 0 !important; height: auto !important; }
.lf-money-box#bfMoney, .lf-money-strip { display: none !important; }
.lf-crow .lf-wa { flex-wrap: wrap; row-gap: 0; padding: 4px 0; }
.lf-crow .lf-wa input { flex: 1 1 140px; height: 30px; }
.lf-crow .lf-wachk { font-size: 10.5px; white-space: nowrap; order: 3; flex-basis: 100%; padding-left: 4px; }
.lf-crow .lf-wachk:empty { display: none; }

/* Kanban: responsável com foto e primeiro nome */
.kc-who { width: auto; height: 24px; border-radius: 999px; background: #f0f2f5; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 2px; overflow: visible; max-width: 110px; }
.kc-who-av { width: 20px; height: 20px; border-radius: 50%; background: #dde2e6; display: grid; place-items: center; overflow: hidden; flex: none; }
.kc-who-av i { width: 100%; height: 100%; background-size: cover; background-position: center; }
.kc-who-av b { font-size: 9px; color: #54656f; font-weight: 800; }
.kc-who em { font-style: normal; font-size: 11.5px; font-weight: 600; color: #3b4a54; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =====================================================================
   Ficha do lead: organização (margens, cartões e campos iguais em todas as páginas)
   ===================================================================== */
#lfForm.lf-paged { padding: 14px 16px 28px; display: flex; flex-direction: column; }
#bigFicha #lfForm.lf-paged { padding: 0 0 24px; }
.lf-paged > section.lf-sec { padding: 0 !important; border: 0 !important; margin: 0 !important; background: transparent !important; }
.lf-paged > section.lf-sec.lf-cur + section.lf-sec.lf-cur { margin-top: 14px !important; }
.lf-paged .lf-sec-t { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #667781; margin: 14px 2px 8px; }
.lf-paged .lf-sec-t .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lf-paged .lf-card-t .lf-link, .lf-paged .lf-sec-t .lf-link { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; }
.lf-paged .field-mini { display: block; font-size: 11px; font-weight: 600; color: #667781; margin: 10px 2px 5px; text-transform: none; letter-spacing: 0; }
.lf-paged > section input:not([type=checkbox]):not([type=radio]):not(.lf-row-v):not(.lf-crow input),
.lf-paged > section select:not(.lf-row-v), .lf-paged > section textarea {
  width: 100%; min-height: 38px; border: 1px solid var(--border, #dfe3e6); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 13.5px; background: #fff; color: #111b21; box-sizing: border-box; }
.lf-paged > section textarea { padding: 10px 12px; min-height: 84px; resize: vertical; line-height: 1.45; }
.lf-paged > section input:focus, .lf-paged > section select:focus, .lf-paged > section textarea:focus { outline: 0; border-color: #111b21; box-shadow: 0 0 0 3px rgba(17, 27, 33, .07); }
.lf-paged .lf-two, .lf-paged .lf-four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.lf-paged .lf-det2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.lf-paged .lf-det-main, .lf-paged .lf-det-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.lf-paged .lf-det-main > div:nth-child(n+4) { grid-column: 1 / -1; }
.lf-paged .lf-chks { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-paged .lf-chk { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--border, #e3e7ea); border-radius: 999px; font-size: 12.5px; background: #fff; cursor: pointer; }
.lf-paged .lf-chk:has(input:checked) { border-color: #111b21; background: #f3f5f7; }
.lf-paged .lf-cad { margin: 0 0 6px; }
.lf-empty { padding: 14px; border: 1px dashed #dfe3e6; border-radius: 12px; font-size: 13px; color: #8696a0; text-align: center; }
.lf-card .lf-empty { border: 0; }
.lf-li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid #f0f2f4; font-size: 13px; min-width: 0; }
.lf-li:first-child { border-top: 0; }
.lf-li span { color: #8696a0; font-size: 12px; white-space: nowrap; }
.lf-li b { font-weight: 600; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lf-li span:first-child:not(:only-child) { white-space: nowrap; }
.lf-chipwrap { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-top: 1px dashed #eef1f3; font-size: 12.5px; }
.lf-qa span { color: #667781; }
.lf-form-card + .lf-form-card { margin-top: 8px; }
.lf-paged .lf-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; min-height: 42px; }
.lf-paged .lf-row-k { font-size: 12.5px; color: #667781; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-paged .lf-row-v { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 13.5px; color: #111b21; min-width: 0; height: 38px; padding: 0 6px; width: 100%; }
.lf-paged .lf-row-v::placeholder { color: #9aa4ab; }
.lf-cf-del { border: 0; background: transparent; color: #b0b8bf; cursor: pointer; padding: 4px; }
.lf-cf-del:hover { color: #c62828; }
.lf-cf-form { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border, #e9edef); border-radius: 12px; margin-bottom: 8px; background: #fafbfb; }
.lf-cf-acts { display: flex; justify-content: flex-end; gap: 8px; }
/* financeiro: visão rápida + cartões */
.fin-ov { border: 1px solid var(--border, #e9edef); border-radius: 12px; background: #fff; padding: 12px; }
.fin-ov-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #eef1f3; gap: 2px; }
.fin-ov-bar i { display: block; height: 100%; }
.fin-ov-bar .r, .fin-ov-lg .r { background: #16a34a; } .fin-ov-bar .t, .fin-ov-lg .t { background: #0ea5e9; } .fin-ov-bar .o, .fin-ov-lg .o { background: #f59e0b; }
.fin-ov-lg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 9px; font-size: 12px; color: #54656f; }
.fin-ov-lg span { display: inline-flex; align-items: center; gap: 6px; }
.fin-ov-lg i { width: 8px; height: 8px; border-radius: 2px; }
.fin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fin-kpis .bf2-kpi:nth-child(4), .fin-kpis .bf2-kpi:nth-child(5) { }
.fin-kpis .bf2-kpi { padding: 12px; }
.fin-kpis .bf2-kpi b { font-size: 15px; }
.fin-kpis .k-r b { color: #15803d; } .fin-kpis .k-o b { color: #b45309; } .fin-kpis .k-t b { color: #0369a1; }
.lf-kpis { display: block !important; margin-bottom: 4px; }
#bfKpis.bf2-kpis { display: block; }
#bfKpis .fin-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#bfKpis .fin-ov { padding: 10px 12px; }
/* tarefas */
.lf-task-new { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border, #e9edef); border-radius: 12px; background: #fafbfb; margin-bottom: 12px; }
.lf-task-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.lf-tasks { display: flex; flex-direction: column; gap: 6px; }
.lf-task { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--border, #e9edef); border-radius: 12px; background: #fff; }
.lf-task-ck { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #c3cbd1; background: #fff; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center; margin-top: 1px; }
.lf-task.done .lf-task-ck { background: #16a34a; border-color: #16a34a; }
.lf-task-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lf-task-tx b { font-size: 13.5px; font-weight: 600; color: #111b21; }
.lf-task-tx small { font-size: 12px; color: #8696a0; }
.lf-task.done .lf-task-tx b { text-decoration: line-through; color: #8696a0; }
.lf-task.late { border-color: #f5c6c6; background: #fdf4f4; } .lf-task.late small { color: #d93025; }
.lf-task-x { border: 0; background: transparent; color: #b0b8bf; cursor: pointer; }
.lf-task-x:hover { color: #c62828; }
/* automações */
.lf-auto-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border, #e9edef); background: #fff; }
.lf-auto-now i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #16a34a); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #16a34a) 18%, transparent); }
.lf-auto-now.off i { background: #d93025; --c: #d93025; }
.lf-auto-now span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lf-auto-now b { font-size: 13.5px; } .lf-auto-now small { font-size: 12px; color: #8696a0; }
/* participações */
.lf-pt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lf-pt-stats div { border: 1px solid var(--border, #e9edef); border-radius: 12px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.lf-pt-stats b { font-size: 18px; } .lf-pt-stats span { font-size: 12px; color: #667781; }
/* quel ia */
.lf-ai-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-ai-sug button { border: 1px solid var(--border, #e3e7ea); background: #fff; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12.5px; color: #3b4a54; cursor: pointer; }
.lf-ai-sug button:hover { border-color: #111b21; color: #111b21; }
.lf-ai-msgs { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 380px; overflow-y: auto; }
.lf-ai-msgs:empty { display: none; }
.lf-ai-q { align-self: flex-end; background: #111b21; color: #fff; border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: 13px; max-width: 85%; }
.lf-ai-a { align-self: flex-start; background: #f3f5f7; border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: 13px; line-height: 1.5; max-width: 95%; color: #111b21; }
.lf-ai-a.pending { color: #8696a0; }
.lf-ai-ask { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-top: 10px; }
.lf-ai-ask .ag-primary { height: 38px; border-radius: 10px; font-size: 16px; }
.lf-ai-note { margin-top: 8px; }
/* ficha grande: a esquerda tem as páginas; a direita fica com o financeiro e o histórico */
.bf2 .bf-body { grid-template-columns: minmax(400px, 470px) minmax(0, 1fr); }
.bf2 .bf-left { padding: 16px 18px 30px; }
.lf-paged .lf-sec-t .muted { display: none; }
.lf-paged .fin-kpis .bf2-kpi:nth-child(5) { grid-column: 1 / -1; }
#bfKpis .fin-kpis .bf2-kpi:nth-child(5) { grid-column: auto; }
.lf-paged .fin-kpis .bf2-kpi:nth-child(5) { grid-column: auto; }
#bfKpis .fin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* ficha grande: abas da direita e conversas por número */
.bf2-tabs button { padding: 0 10px; font-size: 12px; }
.bf2-numtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; position: sticky; top: 0; background: #fff; z-index: 1; }
.bf2-numtabs button { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border, #e3e7ea); background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: #54656f; cursor: pointer; }
.bf2-numtabs button.on { background: #111b21; border-color: #111b21; color: #fff; }
.bf2-numtabs em { font-style: normal; opacity: .6; margin-left: 2px; }
.bf2 .bf-compose { position: relative; }
.bf-mention { position: absolute; left: 16px; bottom: calc(100% - 8px); z-index: 5; min-width: 200px; background: #fff; border: 1px solid var(--border, #e3e7ea); border-radius: 10px; box-shadow: 0 10px 28px rgba(11, 20, 26, .14); padding: 4px; }
.bf-mention button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.bf-mention button:hover { background: #f3f5f7; }
.bf-mention .lf-as-av { width: 22px; height: 22px; font-size: 10px; }
.bf2-tabs { flex-wrap: wrap; overflow: visible; }
/* ficha lateral: só 4 botões (Perfil, Agenda, Compras, Automações) numa linha */
.lf-nav { grid-template-columns: repeat(4, 1fr); }
.lf-nav button { border-bottom: 0; }
.lf-nav button:nth-child(6n) { border-right: 1px solid var(--border, #e9edef); }
.lf-nav button:last-child { border-right: 0; }
#bigFicha .lf-nav button { border-bottom: 1px solid var(--border, #e9edef); }
/* ficha lateral: 6 botões; Compras, Automações e Participações só para ver (edita expandindo) */
.lf-nav { grid-template-columns: repeat(6, 1fr); }
#bigFicha .lf-nav { grid-template-columns: repeat(5, 1fr); }
.lf-pg-exp { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border, #e3e7ea); background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.lf-pg-exp:hover { border-color: #111b21; color: #111b21; }
.lf-expand { width: 100%; margin-top: 12px; height: 38px; border-radius: 10px; border: 1px dashed #c9d0d5; background: #fafbfb; font: inherit; font-size: 13px; font-weight: 600; color: #3b4a54; cursor: pointer; }
.lf-expand:hover { border-color: #111b21; color: #111b21; }
.lf-ro > section.lf-cur input:disabled, .lf-ro > section.lf-cur select:disabled, .lf-ro > section.lf-cur textarea:disabled { background: #f7f8fa !important; color: #3b4a54; cursor: default; opacity: 1; }


/* =====================================================================
   IDENTIDADE X4 — preto, branco e azul (base: página do iPhone Pro da Apple)
   Claro: fundo branco/cinza-gelo, texto quase preto, azul #0071e3.
   Escuro: fundo preto, superfícies grafite, texto branco-gelo, azul #2997ff nos links.
   O tema escuro de cada tela é gerado pelo static/js/dark.js a partir destas cores.
   ===================================================================== */
:root {
  --x4-black: #000000; --x4-ink: #1d1d1f; --x4-white: #ffffff; --x4-snow: #f5f5f7;
  --x4-blue: #0071e3; --x4-blue-hover: #0077ed; --x4-link: #0066cc;
  --x4-gray: #86868b; --x4-gray-2: #6e6e73; --x4-line: #d2d2d7;
  --x4-radius-pill: 980px;
  /* tipografia: um só desenho de letra, poucos pesos (400 texto, 500 rótulos, 600 títulos) */
  --x4-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --x4-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme=dark] {
  color-scheme: dark; background: #000;
  --bg: #000000; --panel: #161617; --text: #f5f5f7; --muted: #86868b; --border: #2c2c2e;
  --in: #1c1c1e; --out: #12402f; --sidebar-active: #2c2c2e;
  --green: #0071e3; --green-dark: #2997ff; --brand-grad: linear-gradient(180deg, #0077ed 0%, #0071e3 100%);
  --wa-wallpaper: #0b0b0c;
  --x4-ink: #f5f5f7; --x4-link: #2997ff; --x4-line: #2c2c2e; --x4-snow: #1d1d1f;
}
html[data-theme=dark] body { background: #000; }
html[data-theme=dark] img { color-scheme: normal; }
html[data-theme=dark] ::selection { background: rgba(41,151,255,.35); }
html[data-theme=dark] input::placeholder, html[data-theme=dark] textarea::placeholder { color: #6e6e73; }

/* ---- Tipografia ---- */
body { font-family: var(--x4-font); letter-spacing: -0.011em; text-rendering: optimizeLegibility; }
h1, h2, h3, .d2-title b, .d2-title-tx, .x4m-trigger { font-family: var(--x4-font-display); letter-spacing: -0.022em; }
h1 { font-weight: 600; } h2, h3 { font-weight: 600; }
b, strong { font-weight: 600; }
small, .small { letter-spacing: -0.004em; }
/* textos coloridos são finos: link e etiquetas coloridas sem negrito pesado */
a { font-weight: 400; color: var(--x4-link); }
a.btn, a.icon-btn { font-weight: 500; }
input, select, textarea, button { letter-spacing: inherit; }

/* ---- Botões: pílula (como os "Links rápidos" da Apple); só ícone = círculo ---- */
.btn, .btn-sm, .btn-primary, .btn-ghost, .crm-group-btn, .sv-btn, .rx-btn, .send-btn, .x4df-btn, .me-btn, .ccp-btn, .cp-btn,
.seg-btn, .ppl-btn, .lf-cbtn, .fd-btn, .eq-btn, .cl2-btn, .bf-cbtn, .acc-btn, .bl-btn, .ee-btn, .kb-unfold, .x4m-theme, .wa-btn,
.fb-wa-btn, .add-screen-btn, .lf-origin-btn, .stage-btn, .kb-stg-btn, .dz-menu-btn, .ps-btn, .aud-tx-btn, .d2-views button {
  border-radius: var(--x4-radius-pill) !important; }
.icon-btn, .conv-icon-btn, .ag-mini-btn, .wa-rail-btn, .mic-btn, .crm-col-btn, .lf-pg-btn { border-radius: 50% !important; }
.btn { font-weight: 500; letter-spacing: -0.01em; }
.btn-primary { background: var(--x4-blue); }
.btn-primary:hover { background: var(--x4-blue-hover); filter: none; }

/* ---- D2 limpa (todas as telas): ações à esquerda, filtros à direita só com o ícone ---- */
.x4-d2 .d2-l { flex-wrap: nowrap; }
.d2-acts { display: inline-flex; align-items: center; gap: 4px; }
.d2-ic { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; flex: none;
  border: 0; border-radius: 50% !important; background: transparent; color: #1d1d1f; cursor: pointer; transition: background .15s, color .15s; }
.d2-ic:hover { background: #f0f0f2; }
.d2-ic > span { display: none; }   /* o nome fica só na dica (title) */
.d2-ic.on, .d2-tg:has(input:checked) { background: #1d1d1f; color: #ffffff; }
.d2-ic-main { background: #0071e3; color: #ffffff; }
.d2-ic-main:hover { background: #0077ed; }
.d2-ic[data-n]:not([data-n=""])::after { content: attr(data-n); position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #0071e3; color: #ffffff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #ffffff; }
.d2-tg input { display: none; }
.d2-count { font-size: 12px; color: #86868b; font-variant-numeric: tabular-nums; margin-right: 2px; white-space: nowrap; }
.x4-d2 .d2-sep { margin: 0 6px; }
.x4-d2 #kbTools { gap: 2px; }
.x4-d2 .x4-search { width: 34px; height: 34px; border-radius: 999px; color: #1d1d1f; }
.x4-d2 .x4-search.open { width: 260px; }
.d2-views button { font-weight: 500; }

/* =====================================================================
   Agenda do Comercial (/crm/agenda): semana com horários, por funil, unidade e profissional
   ===================================================================== */
.ca-page .inbox-main { display: flex; flex-direction: column; min-height: 0; }
.ca-d2 .d2-l { gap: 6px; }
.ca-today { height: 32px; padding: 0 14px; border-radius: 980px; border: 1px solid #d2d2d7; background: #ffffff; color: #1d1d1f; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ca-today:hover { border-color: #86868b; }
.ca-range { font-family: var(--x4-font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: #1d1d1f; white-space: nowrap; margin-left: 4px; }
.ca-range .muted { font-weight: 400; color: #86868b; }
.ca-body { flex: 1 1 auto; min-height: 0; display: flex; }
.ca-side { flex: 0 0 264px; border-right: 1px solid #e8e8ed; padding: 14px 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; background: #ffffff; }
.ca-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #ffffff; }
.ca-loading { padding: 40px; text-align: center; color: #86868b; font-size: 13px; }

/* mini calendário */
.ca-mini-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ca-mini-h b { font-size: 13px; font-weight: 600; color: #1d1d1f; }
.ca-mini-h .d2-ic { width: 28px; height: 28px; }
.ca-mini-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ca-mini-g .w { font-size: 11px; font-weight: 600; color: #86868b; padding: 4px 0; }
.ca-mini-g button { position: relative; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #1d1d1f; font: inherit; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.ca-mini-g button:hover { background: #f0f0f2; }
.ca-mini-g button.out { color: #c7c7cc; }
.ca-mini-g button.sel { background: #f0f0f2; }
.ca-mini-g button.today { background: #0071e3; color: #ffffff; font-weight: 600; }
.ca-mini-g button.has::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #0071e3; }
.ca-mini-g button.today.has::after { background: #ffffff; }

/* filtros */
.ca-flt { display: flex; flex-direction: column; gap: 12px; }
.ca-flt-h { display: flex; align-items: baseline; justify-content: space-between; }
.ca-flt-h b { font-size: 15px; font-weight: 600; color: #1d1d1f; }
.ca-clear { border: 0; background: none; color: #0066cc; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.ca-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #1d1d1f; }
.ca-f span { font-weight: 500; }
.ca-f select { height: 38px; padding: 0 34px 0 14px; border: 1px solid #d2d2d7; border-radius: 12px; background: #ffffff; color: #1d1d1f; font: inherit; font-size: 13px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.ca-f select:focus { outline: none; border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.ca-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: #6e6e73; }
.ca-leg-t { width: 100%; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #86868b; }
.ca-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ca-legend i { width: 8px; height: 8px; border-radius: 50%; }

/* grade de horários */
.ca-grid { --gut: 58px; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ca-head, .ca-all { display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); border-bottom: 1px solid #e8e8ed; }
.ca-head { padding-right: var(--sbw, 0px); }
.ca-dh { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 12px 6px 10px; font-size: 13px; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-dh b { font-size: 20px; font-weight: 600; color: #1d1d1f; letter-spacing: -0.02em; }
.ca-dh.today { box-shadow: inset 0 3px 0 #0071e3; }
.ca-dh.today b { color: #0071e3; }
.ca-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c7c7cc; margin-right: 2px; align-self: center; }
.ca-all .ca-gut { font-size: 10.5px; color: #86868b; padding: 8px 6px; text-align: right; }
.ca-all-c { padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid #f0f0f2; }
.ca-all-c .ca-ev { position: static; }
.ca-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ca-rows { position: relative; display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); }
.ca-rows > .ca-gut { position: relative; }
.ca-rows > .ca-gut span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; color: #86868b; font-variant-numeric: tabular-nums; }
.ca-rows > .ca-gut span:first-child { display: none; }
.ca-col { position: relative; border-left: 1px solid #e8e8ed; cursor: copy;
  background-image: linear-gradient(#ececf0 1px, transparent 1px), linear-gradient(#f5f5f7 1px, transparent 1px);
  background-size: 100% 64px, 100% 32px; }
.ca-col.today { background-color: rgba(0,113,227,.025); }
.ca-off { position: absolute; left: 0; right: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0 6px, transparent 6px 12px); }
.ca-now { position: absolute; left: -1px; right: 0; height: 2px; background: #ff3b30; z-index: 3; pointer-events: none; }
.ca-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; }

/* agendamento: fundinho na cor do status, barrinha à esquerda */
.ca-ev { position: absolute; z-index: 2; overflow: hidden; padding: 5px 8px 5px 10px; border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--c, #8e8e93) 16%, #ffffff); color: #1d1d1f; font-size: 12px; line-height: 1.3;
  box-shadow: inset 3px 0 0 var(--c, #8e8e93); transition: box-shadow .15s, transform .15s; user-select: none; touch-action: none; }
.ca-ev:hover { box-shadow: inset 3px 0 0 var(--c, #8e8e93), 0 4px 14px rgba(0,0,0,.10); z-index: 4; }
.ca-ev.drag { opacity: .85; box-shadow: inset 3px 0 0 var(--c), 0 10px 26px rgba(0,0,0,.18); z-index: 6; cursor: grabbing; }
.ca-ev.ext { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c, #8e8e93) 12%, #ffffff) 0 8px, color-mix(in srgb, var(--c, #8e8e93) 6%, #ffffff) 8px 16px); cursor: pointer; }
.ca-ev-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-ev.sm { padding-top: 0; padding-bottom: 0; display: flex; align-items: center; }
.ca-ev.sm .ca-ev-n { font-size: 11.5px; }
.ca-ev.sm .ca-ev-n .ca-ev-t { font-weight: 400; margin-left: 4px; }
.ca-ev-s { font-weight: 400; color: #424245; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-ev-t { font-weight: 400; color: #6e6e73; font-variant-numeric: tabular-nums; font-size: 11px; }

/* mês */
.ca-month { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ca-mh { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid #e8e8ed; }
.ca-mh div { padding: 10px; font-size: 12px; color: #86868b; text-align: center; }
.ca-mg { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(96px, 1fr); overflow-y: auto; }
.ca-mc { border-right: 1px solid #f0f0f2; border-bottom: 1px solid #f0f0f2; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: copy; }
.ca-mc.out { background: #fafafc; }
.ca-mc.out .ca-mn { color: #c7c7cc; }
.ca-mn { align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 500; color: #1d1d1f; cursor: pointer; }
.ca-mn:hover { background: #f0f0f2; }
.ca-mc.today .ca-mn { background: #0071e3; color: #ffffff; }
.ca-chip { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.ca-chip:hover { background: #f0f0f2; }
.ca-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ca-chip em { font-style: normal; color: #86868b; font-variant-numeric: tabular-nums; }
.ca-more { align-self: flex-start; border: 0; background: none; color: #0066cc; font: inherit; font-size: 11.5px; cursor: pointer; padding: 2px 6px; }

/* janelinha */
.ca-pop { position: fixed; z-index: 1700; width: 320px; max-width: calc(100vw - 16px); background: #ffffff; color: #1d1d1f; border-radius: 18px; padding: 14px 16px 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05); font-size: 13px; }
.ca-pop-h { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ca-pop-h > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 6px; }
.ca-pop-h > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ca-pop-h b { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.ca-pop-h span { font-size: 12px; color: #86868b; }
.ca-pop-h .d2-ic { width: 28px; height: 28px; margin: -4px -6px 0 0; }
.ca-pop dl { display: grid; grid-template-columns: 92px 1fr; gap: 7px 10px; margin: 0 0 14px; }
.ca-pop dt { color: #86868b; }
.ca-pop dd { margin: 0; min-width: 0; }
.ca-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #1d1d1f; }
.ca-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ca-acts { display: flex; gap: 8px; }
.ca-resch, .ca-new { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.ca-row { display: flex; gap: 8px; }
.ca-row.end { justify-content: flex-end; }
.ca-row input { flex: 1; min-width: 0; }
.ca-pop input, .ca-pop select { height: 36px; padding: 0 12px; border: 1px solid #d2d2d7; border-radius: 10px; background: #ffffff; color: #1d1d1f; font: inherit; font-size: 13px; width: 100%; }
.ca-pop input:focus, .ca-pop select:focus { outline: none; border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.ca-lead { position: relative; }
.ca-res { display: flex; flex-direction: column; margin-top: 4px; max-height: 200px; overflow-y: auto; }
.ca-res button { display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 13px; color: #1d1d1f; cursor: pointer; }
.ca-res button:hover { background: #f0f0f2; }
.ca-res button span { color: #86868b; font-size: 12px; }

/* no escuro: o fundinho mistura a cor do status com o grafite (o resto o dark.js resolve) */
html[data-theme=dark] .ca-ev { background: color-mix(in srgb, var(--c, #8e8e93) 24%, #1c1c1e); color: #f5f5f7; }
html[data-theme=dark] .ca-ev.ext { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c, #8e8e93) 18%, #1c1c1e) 0 8px, color-mix(in srgb, var(--c, #8e8e93) 10%, #1c1c1e) 8px 16px); }
html[data-theme=dark] .ca-ev-s { color: #d2d2d7; }
html[data-theme=dark] .ca-ev-t { color: #a1a1a6; }
html[data-theme=dark] .ca-col { background-image: linear-gradient(#2c2c2e 1px, transparent 1px), linear-gradient(#1f1f21 1px, transparent 1px); }
html[data-theme=dark] .ca-off { background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 6px, transparent 6px 12px); }

@media (max-width: 900px) {
  .ca-side { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
  .ca-body { position: relative; }
  .ca-range { font-size: 13px; }
}
.d1-title { font-family: var(--x4-font-display); font-size: var(--title-size); font-weight: 600; letter-spacing: -0.022em; color: #1d1d1f; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.d1-title span { font-family: var(--x4-font); font-size: 13px; font-weight: 400; letter-spacing: -0.01em; color: #86868b; }
.ca-pop [hidden], .ca-side[hidden] { display: none !important; }
.d2-per { min-width: 250px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.d2-per label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #6e6e73; }
.d2-per-q { display: flex; gap: 6px; }
.d2-per-q button { flex: 1; height: 30px; border: 1px solid #d2d2d7; border-radius: 980px; background: #ffffff; color: #1d1d1f; font: inherit; font-size: 12.5px; cursor: pointer; }
.d2-per-q button:hover { border-color: #86868b; }
.pc-acts { margin-left: 4px; } .pc-day { display: inline-flex; align-items: center; gap: 4px; }
.ag-pop.ag-pop-l { left: 0; right: auto; }
/* textos coloridos finos (padrão X4): status, avisos e links não usam negrito pesado */
.kc-when, .kc-when.late, .kc-when.none, .lf-link, .ca-clear, .ca-more, .muted a, .x4-link { font-weight: 400 !important; }
.kc-tags span { font-weight: 600; border-radius: 980px; padding: 3px 8px; letter-spacing: .04em; }

/* balãozinho dos botões só de ícone */
.x4-tip { position: fixed; z-index: 3000; pointer-events: none; max-width: 260px; padding: 6px 10px; border-radius: 8px;
  background: #1d1d1f; color: #ffffff; font-size: 12px; font-weight: 500; line-height: 1.35; letter-spacing: -0.005em;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); animation: x4TipIn .12s ease-out; }
.x4-tip::before { content: ""; position: absolute; left: var(--ax, 50%); top: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.x4-tip.up::before { top: auto; bottom: -4px; }
.x4-tip[hidden] { display: none; }
@keyframes x4TipIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
/* Funis: escolher a visualização numa listinha (Kanban ⌄), ao lado do + */
.d2-vbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border: 0; border-radius: 980px; background: transparent;
  color: #1d1d1f; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.d2-vbtn:hover { background: #f0f0f2; }
.d2-vbtn #viewIco { display: inline-flex; }
.d2-vbtn .d2-vchev { color: #86868b; }
.d2-vpop { right: auto; left: 0; min-width: 190px; }
.d2-vpop button { font-size: 13px; color: #1d1d1f; }
.d2-vpop button span { flex: 1; text-align: left; }
.d2-vpop button.on { font-weight: 600; }
.d2-vpop button.on .d2-vok::before { content: "✓"; font-style: normal; color: #0071e3; }

/* ===== D1 igual em todas as telas (a mesma barra da Comercial) ===== */
.x4-d1 { position: sticky; top: 0; z-index: 40; background: var(--panel); }
.x4-d1 .head-filters { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.x4-d1 .head-filters > * { flex: none; }
.x4-d1-old { display: none !important; }
body.has-d1 main.container, body.has-d1 main .page-head { margin-top: 20px; }
body.has-d1 .hm-wrap, body.has-d1 .pc-wrap, body.has-d1 .lib-wrap, body.has-d1 .dz-wrap { padding-top: 20px; }
/* Análises: o cabeçalho dela vira a mesma D1 */
.bi2-head { padding: 0 20px 0 14px; border-bottom: 1px solid var(--border); background: var(--panel); }
.bi2-head h1 { font-family: var(--x4-font-display); font-weight: 600; letter-spacing: -0.022em; }
.x4-d1 .lead-subnav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.x4-d1 .lead-subnav::-webkit-scrollbar { display: none; }
.x4-d1 .lsub svg { width: 16px; height: 16px; flex: none; }
.x4-d1 .head-filters { margin-left: auto; flex: 0 0 auto; min-width: 0; }
/* área com muitas abas (Marketing): sem espaço, só a aba aberta mostra o nome; as outras ficam no ícone (o nome aparece no balãozinho) */
@media (max-width: 1640px) { .x4-d1 .lead-subnav .lsub:not(.active) > span:not(.nbadge) { display: none; } .x4-d1 .lead-subnav .lsub:not(.active) { padding-left: 10px; padding-right: 10px; } }
.x4-d1 .lib-plus, .x4-d2-row .lib-plus { background: #0071e3 !important; color: #ffffff !important; border-radius: 50% !important; }
body.has-d1 .fb-wrap { height: calc(100vh - var(--head-h)); }
/* a setinha de recolher o menu fica sempre por cima da D1 */
.x4-collapse { z-index: 60; }
/* cabeçalho antigo da tela vira a D2 (ações à direita) */
.x4-d2-row { height: auto !important; min-height: 52px; margin: 0 0 8px !important; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.x4-d2-row > h1.x4-d1-old, .x4-d2-row > h2.x4-d1-old { display: none !important; }
.bi2-d2 { padding: 8px 20px 8px 14px; border-bottom: 1px solid var(--border); background: var(--panel); justify-content: flex-end; }
.bi2-d2 .bi2-filters { margin-left: auto; }
/* título da D1 no mesmo lugar do "Pessoas" da Comercial: ícone a 28px da borda, texto a 51px */
.d1-title { display: flex; align-items: center; gap: 7px; margin-left: 14px; }
.d1-title > svg { width: 16px; height: 16px; flex: none; color: #1d1d1f; }
.d1-title > b, .d1-title > h1 { font: inherit; font-weight: 600; margin: 0; }
.bi2-head { justify-content: flex-start; }
.bi2-head .x4-tr { margin-left: auto; }
/* filtro de data "no período": data inicial até data final */
.flt-range { display: inline-flex; align-items: center; gap: 6px; }
.flt-range em { font-style: normal; font-size: 12px; color: #86868b; }
.flt-range input[type=date] { width: 138px; }
.flt-pop .flt-row:has(.flt-range) { flex-wrap: wrap; }

/* =====================================================================
   Inicial (nova): limpa, sem caixas; lateral à direita com Atividades, Agenda, Menções, Lembretes e Quel IA
   ===================================================================== */
main.hm-wrap.hm2 { max-width: none; margin: 0; padding: 0 !important; }
.hm2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: calc(100vh - var(--head-h)); }
.hm2-main { min-width: 0; padding: 22px 36px 60px; display: flex; flex-direction: column; gap: 34px; }
.hm2 .hm-hello { margin: 0; }
.hm2 .hm-hello h2 { font-family: var(--x4-font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 2px; }
.hm2-sec { min-width: 0; }
.hm2-h { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; min-height: 34px; }
.hm2-h b { font-family: var(--x4-font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: #1d1d1f; }
.hm2-h .sp { flex: 1; }
.hm2-sel { height: 32px; padding: 0 30px 0 12px; border: 1px solid #d2d2d7; border-radius: 980px; background: #ffffff; color: #1d1d1f; font: inherit; font-size: 12.5px; cursor: pointer;
  appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 13px; }
.hm2-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #0066cc; text-decoration: none; font-weight: 400; }
.hm2-link:hover { text-decoration: underline; }
.hm2-load, .hm2-empty { padding: 18px 2px; color: #86868b; font-size: 13px; }

/* Visão de águia */
.eg2-chart { position: relative; height: 470px; user-select: none; }
.eg2-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); pointer-events: none; }
.eg2-col { display: flex; flex-direction: column; justify-content: space-between; padding: 0 16px 0 18px; border-left: 1px dashed #d2d2d7; transition: background .2s; }
.eg2-col.on { background: linear-gradient(180deg, rgba(0,0,0,.025), rgba(0,0,0,0)); }
.eg2-top { display: flex; flex-direction: column; gap: 4px; }
.eg2-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #424245; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eg2-lbl i { width: 7px; height: 7px; border-radius: 50%; background: #c7c7cc; flex: none; }
.eg2-col:nth-child(2) .eg2-lbl i, .eg2-col:nth-child(3) .eg2-lbl i { background: #86868b; }
.eg2-col:nth-child(4) .eg2-lbl i { background: #6e6e73; }
.eg2-n { font-family: var(--x4-font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.035em; color: #1d1d1f; line-height: 1.1; font-variant-numeric: tabular-nums; }
.eg2-d { font-size: 12.5px; font-weight: 400; color: #86868b; }
.eg2-d.up { color: #1a7f37; } .eg2-d.down { color: #d70015; }
.eg2-top small { font-size: 12px; color: #86868b; }
.eg2-bot { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding-bottom: 4px; }
.eg2-cl { font-size: 12px; color: #86868b; }
.eg2-bot b { font-size: 16px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.eg2-bar { display: block; width: min(190px, 90%); height: 5px; border-radius: 99px; background: #e8e8ed; overflow: hidden; }
.eg2-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1d1d1f, #6e6e73); }
.eg2-band { position: absolute; left: 0; right: 0; top: 135px; height: 220px; }
.eg2-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.eg2-hatch { opacity: 0; transition: opacity .18s; }
.eg2-seg { cursor: crosshair; }
.eg2-seg.on .eg2-hatch { opacity: 1; }
.eg2-chart.hov .eg2-col:not(.on) .eg2-top, .eg2-chart.hov .eg2-col:not(.on) .eg2-bot { opacity: .45; transition: opacity .2s; }
.eg2-tip { position: absolute; z-index: 5; pointer-events: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 8px;
  background: #1d1d1f; color: #f5f5f7; font-size: 12.5px; white-space: nowrap; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.eg2-tip i { width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(45deg, #f5f5f7 0 2px, #86868b 2px 4px); }
.eg2-tip b { font-weight: 600; }
.eg2-tip[hidden] { display: none; }

/* barras no estilo "Fonte" */
.hm2-bars { display: flex; flex-direction: column; gap: 6px; }
.hm2-bars[hidden], .kp-radar[hidden], .cp-radial[hidden] { display: none !important; }
.br-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 10px; color: #1d1d1f; text-decoration: none; overflow: hidden; }
.br-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; background: #f0f0f2; transition: width .4s ease; }
a.br-row:hover .br-fill { background: #e8e8ed; }
.br-l, .br-n, .br-p { position: relative; }
.br-l { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-n { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-n small, .br-p small { font-weight: 400; color: #86868b; font-size: 11.5px; }
.br-p { min-width: 46px; text-align: right; font-style: normal; font-size: 13px; color: #86868b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-row.garg .br-fill { background: #fdecea; }
.br-row.bad .br-p { color: #d70015; } .br-row.ok .br-p { color: #1a7f37; }
.br-row.off { opacity: .55; }
.hm2-bars.sm .br-row { min-height: 32px; }
.hm2-bars.sm .br-l { font-size: 12.5px; }

/* O dia: 4 colunas sem caixa */
.dy2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dy2-col { display: flex; flex-direction: column; gap: 4px; padding: 0 18px; border-left: 1px dashed #d2d2d7; min-width: 0; }
.dy2-col .eg2-n { font-size: 30px; }
.dy2-u { font-size: 12px; color: #86868b; margin-bottom: 10px; }
.dy2-col .hm2-link { margin-top: 10px; }

/* Indicadores e Campanhas lado a lado */
.hm2-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.hm2-two .hm2-h .d2-ic.on { background: #1d1d1f; color: #ffffff; }
.cp-radial { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cp-rsvg { width: 220px; height: 220px; flex: none; }
.cp-leg { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #1d1d1f; min-width: 0; }
.cp-leg span { display: flex; align-items: center; gap: 8px; }
.cp-leg i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cp-leg b { margin-left: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Atividades (lista inteira) */
.fd2 .fd-list { display: flex; flex-direction: column; }

/* Lateral */
.hm2-side { position: sticky; top: var(--head-h); align-self: start; height: calc(100vh - var(--head-h)); display: flex; flex-direction: column;
  border-left: 1px solid #e8e8ed; background: #ffffff; min-width: 0; }
.hs-tabs { display: flex; gap: 4px; padding: 14px 14px 10px; border-bottom: 1px solid #f0f0f2; }
.hs-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 980px;
  background: transparent; color: #6e6e73; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.hs-tabs button > span:last-child { display: none; }
.hs-tabs button.on { background: #1d1d1f; color: #ffffff; padding: 0 12px 0 10px; }
.hs-tabs button.on > span:last-child { display: inline; }
.hs-tabs button:not(.on):hover { background: #f0f0f2; color: #1d1d1f; }
.hs-ic { display: inline-grid; place-items: center; width: 16px; height: 16px; font-weight: 600; font-size: 14px; }
.hs-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 20px; }
.hs-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #86868b; margin: 4px 2px 10px; }
.hs-h .hm2-link { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.hs-ag { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 10px; text-decoration: none; color: #1d1d1f; box-shadow: inset 3px 0 0 var(--c, #c7c7cc); margin-bottom: 4px; }
.hs-ag:hover { background: #f5f5f7; }
.hs-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 42px; padding-left: 6px; }
.hs-ag span { display: flex; flex-direction: column; min-width: 0; }
.hs-ag span b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-ag small { font-size: 12px; color: #86868b; }
.hs-body .fd-it { padding: 9px 6px; }
.hs-body .hm-rem-add { display: flex; gap: 6px; margin-bottom: 10px; }
.hs-body .hm-rem-add input { min-width: 0; height: 34px; border: 1px solid #d2d2d7; border-radius: 10px; padding: 0 10px; font: inherit; font-size: 13px; background: #ffffff; color: #1d1d1f; }
.hs-body .hm-rem-add input:first-child { flex: 1; }
.hs-body .hm-rem-add input[type=date] { width: 120px; }
.hs-ia { border: 0; padding: 0; background: transparent; height: auto; }

@media (max-width: 1200px) {
  .hm2-grid { grid-template-columns: minmax(0, 1fr); }
  .hm2-side { position: static; height: auto; border-left: 0; border-top: 1px solid #e8e8ed; }
  .hm2-two { grid-template-columns: minmax(0, 1fr); }
  .dy2 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .eg2-n { font-size: 26px; }
}
/* no escuro: o fundinho das barras e a lateral */
html[data-theme=dark] .br-fill { background: #232325; }
html[data-theme=dark] a.br-row:hover .br-fill { background: #2c2c2e; }
html[data-theme=dark] .br-row.garg .br-fill { background: #3a1d1d; }
html[data-theme=dark] .eg2-bar i { background: linear-gradient(90deg, #f5f5f7, #86868b); }
html[data-theme=dark] .eg2-col.on { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); }
.hs-ia { display: flex !important; border-left: 0 !important; padding: 0 !important; }
.hm2-grid { background: var(--panel); }
.hm2-bars.sm .br-row { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.hm2-bars.sm .br-l { white-space: normal; line-height: 1.25; }
.hm2-bars.sm .br-p { min-width: 38px; }

/* Inicial: sem divisórias entre os dados; números nas etapas; Análise do WhatsApp ao lado do funil */
.eg2-col, .dy2-col { border-left: 0 !important; }
.eg2-col { padding: 0 12px 0 0; }
.eg2-num { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #1d1d1f; color: #ffffff;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.eg2-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.eg2-chart { height: 400px; }
.eg2-band { top: 120px; height: 180px; }
.eg2-n { font-size: 28px; }
.wa2 { display: flex; flex-direction: column; gap: 12px; padding-left: 24px; border-left: 1px solid #e8e8ed; min-width: 0; }
.wa2-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.wa2-h b { display: block; font-size: 14px; font-weight: 600; color: #1d1d1f; }
.wa2-h small { font-size: 12px; color: #86868b; }
.wa2 .bi2-metrics { margin: 0; }
.wa2 .bi2-chart { margin: 0; min-height: 120px; }
.wa2 .bi2-block { margin: 0; }
@media (max-width: 1400px) { .eg2-row { grid-template-columns: minmax(0, 1fr); } .wa2 { padding-left: 0; border-left: 0; border-top: 1px solid #e8e8ed; padding-top: 18px; } }
.eg2-lbl { white-space: normal; line-height: 1.2; align-items: flex-start; } .eg2-lbl .eg2-num { margin-top: -1px; }
/* números das etapas sem cortar */
.eg2-lbl { overflow: visible; padding-top: 2px; }
.eg2-lbl .eg2-num { margin-top: 0; }
/* embaixo do funil: Indicadores | Campanhas */
.eg2-left { min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.eg2-left .hm2-two { gap: 32px; }
.eg2-left .hm2-h { flex-wrap: wrap; }
.cp-rtx { font-size: 10px; font-weight: 600; fill: #ffffff; paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 2px; }
.cp-radial { justify-content: center; }

/* ===== Inicial: tudo alinhado em grade (nome | número | % | extra) ===== */
.br-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 58px; gap: 0 10px; align-items: center; min-height: 36px; }
.hm2-bars:has(.br-x) .br-row { grid-template-columns: minmax(0, 1fr) 56px 54px 78px; }
.hm2-bars.cp:has(.br-x) .br-row { grid-template-columns: minmax(0, 1fr) 112px 46px 70px; }
.br-n { text-align: right; }
.br-p, .br-x { min-width: 0; text-align: right; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-x { font-size: 11.5px; color: #86868b; }
.br-row.garg .br-l { font-weight: 500; }
.hm2-money { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f2; }
.hm2-money div { display: flex; flex-direction: column; gap: 2px; }
.hm2-money span { font-size: 12px; color: #86868b; }
.hm2-money b { font-size: 18px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hm2-money small { font-size: 11.5px; color: #86868b; }
/* listas do dia: mesmo formato */
.dy-box2 { display: flex; flex-direction: column; gap: 16px; }
.hm2-blk-h { font-size: 13px; font-weight: 600; color: #1d1d1f; margin-bottom: 6px; }
.dy-box2 .br-row { grid-template-columns: minmax(0, 1fr) 40px 52px; min-height: 32px; }
.dy-box2 .br-l { font-size: 12.5px; }
/* gráfico aberto no lugar da outra coluna */
.eg2-left .hm2-two { position: relative; }
.eg2-left .hm2-two[data-chart="kp"] #hmCamp, .eg2-left .hm2-two[data-chart="cp"] #hmKpi { display: none; }
.eg2-left .hm2-two[data-chart="kp"] #hmChart { grid-column: 2; grid-row: 1; }
.eg2-left .hm2-two[data-chart="cp"] #hmChart { grid-column: 1; grid-row: 1; }
.hm2-chartpane[hidden] { display: none !important; }
.hm2-chartpane { border-radius: 16px; background: #fafafc; padding: 14px 16px 18px; animation: hmPane .2s ease-out; }
.hm2-chartpane .kp-svg { width: 100%; height: auto; max-height: 300px; }
@keyframes hmPane { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html[data-theme=dark] .hm2-chartpane { background: #1c1c1e; }
.eg2-left .hm2-bars .br-row { grid-template-columns: minmax(0, 1fr) 44px 48px; padding: 0 10px; }
.eg2-left .hm2-bars.cp .br-row { grid-template-columns: minmax(0, 1fr) 78px 44px; }
.eg2-left .hm2-bars .br-l { font-size: 13px; }
.eg2-left .hm2-two { gap: 28px; }
/* filtros da Inicial: uma setinha só (o seletor do sistema já desenha a dele) e o período do funil colado no título */
.hm2-sel { background-image: none; padding-right: 12px; }
.x4sel.hm2-sel, .hm2-h .x4sel { border-radius: 980px; }
.eg2-h { gap: 12px; }
/* Inicial mais respirada: nome da etapa ↔ número, e linhas da Análise do WhatsApp */
.eg2-top { gap: 0; }
.eg2-top .eg2-lbl { margin-bottom: 12px; }
.eg2-top .eg2-n { margin-bottom: 6px; }
.eg2-top small { margin-top: 2px; }
.eg2-bot { gap: 6px; }
.eg2-h { margin-bottom: 22px; }
.wa2 { gap: 18px; }
.wa2 .bi2-metrics { row-gap: 18px; padding-bottom: 20px; }
.wa2 .bi2-metric { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; padding-bottom: 4px; }
.wa2 .bi2-metric .v { line-height: 1.1; }
.dy-box2 { gap: 22px; }
.hm2-blk-h { margin-bottom: 10px; }
.hm2-bars { gap: 8px; }
.dy-box2 .br-row { min-height: 34px; }
.eg2-chart { height: 440px; } .eg2-band { top: 158px; height: 180px; }
/* filtro do funil: à direita, terminando onde começa a Análise do WhatsApp (mesma linha) */
.eg2-h { justify-content: flex-end; margin-right: 328px; }
@media (max-width: 1400px) { .eg2-h { margin-right: 0; } }

/* ===== Ficha: "Agendado para" (verde futuro · vermelho passou e ainda Agendado/Remarcação · cinza+troféu compareceu) ===== */
.lf-hero-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lf-hero-code, .bf2-code { cursor: copy; }
.lf-hero-code:hover, .bf2-code:hover { text-decoration: underline; text-underline-offset: 2px; }
.lf-apfor[hidden], .bf-apfor[hidden] { display: none !important; }
.lf-apfor-c { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; border-radius: 980px; font-size: 12px; white-space: nowrap; }
.lf-apfor-c small { font-size: 11.5px; opacity: .85; }
.lf-apfor-c b { font-weight: 600; }
.lf-apfor-c.fut { background: #e8f6ee; color: #1a7f37; }
.lf-apfor-c.late { background: #fdecea; color: #d70015; }
.lf-apfor-c.won { background: #f0f0f2; color: #6e6e73; }
.lf-apfor-c.past { background: #f0f0f2; color: #6e6e73; }
.bf-cad.bf-apfor { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; cursor: default; }
/* histórico "Anteriores": clica e abre os detalhes (só leitura) */
details.lf-ap-past { border-bottom: 1px solid #f0f0f2; }
details.lf-ap-past summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; }
details.lf-ap-past summary::-webkit-details-marker { display: none; }
details.lf-ap-past summary b { font-size: 13px; font-weight: 500; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.lf-ap-past summary span { font-size: 12.5px; color: #6e6e73; font-variant-numeric: tabular-nums; }
.lf-ap-chev { width: 8px; height: 8px; border-right: 1.6px solid #86868b; border-bottom: 1.6px solid #86868b; transform: rotate(45deg); transition: transform .15s; margin-top: -4px; }
details[open] .lf-ap-chev { transform: rotate(-135deg); margin-top: 4px; }
.lf-ap-more { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 12px; }
.lf-ap-more div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; font-size: 12.5px; }
.lf-ap-more span { color: #86868b; }
.lf-ap-more b { font-weight: 500; color: #1d1d1f; }
html[data-theme=dark] .lf-apfor-c.fut { background: #0f2e1c; color: #4ade80; }
html[data-theme=dark] .lf-apfor-c.late { background: #3a1416; color: #ff6b6b; }
/* Perfil: mais espaço entre o título (Contato / Dados) e os campos; "tem WhatsApp" alinhado */
.lf-perfil .lf-card-t { margin: 18px 2px 10px; }
.lf-perfil > .lf-card-t:first-child { margin-top: 6px; }
.lf-row-v.lf-wa { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; row-gap: 2px; }
.lf-row-v.lf-wa input { grid-column: 1; grid-row: 1; }
.lf-row-v.lf-wa .lf-wa-edit { grid-column: 2; grid-row: 1; }
.lf-row-v.lf-wa .lf-wachk { grid-column: 1 / -1; grid-row: 2; margin-left: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.lf-row-v.lf-wa .lf-wa-edit { position: static; transform: none; } .lf-row-v.lf-wa input { padding-right: 4px !important; }
.bf-cad.bf-apfor { max-width: none !important; flex: none; overflow: visible; } .bf-cad.bf-apfor .lf-apfor-c { height: 30px; }
.lf-newsvc { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .lf-newsvc[hidden] { display: none; } .lf-newsvc #lfNewSvcName { flex: 1 1 160px; min-width: 0; } .lf-newsvc #lfNewSvcMin { width: 64px; }
/* filtro "no período": as duas datas numa linha só, alinhadas com os campos de cima */
.flt-pop .flt-row:has(.flt-range) { flex-wrap: wrap; row-gap: 8px; }
.flt-pop .flt-row:has(.flt-range) .flt-range { order: 10; flex: 1 0 100%; padding-left: 58px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; }
.flt-pop .flt-row:has(.flt-range) .flt-x { order: 5; margin-left: auto; }
.flt-range input[type=date] { width: 150px; height: 34px; }
/* ficha: mais espaço entre o código e os botões das páginas */
.lf-hero { padding-bottom: 14px; margin-bottom: 4px; }
.lf-nav { margin-top: 10px; }

/* ===== Ficha: topo arrumado (código · temperatura · score numa linha, "Agendado para" embaixo; atendente à direita) ===== */
.lf-hero { align-items: flex-start; gap: 12px; padding: 4px 0 16px; border-bottom: 1px solid #f0f0f2; margin-bottom: 12px; }
.lf-hero-l { gap: 10px; flex: 1 1 auto; }
.lf-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lf-hero-meta > span { display: inline-flex; align-items: center; height: 24px; border-radius: 980px; font-size: 12px; line-height: 1; box-sizing: border-box; }
.lf-hero-code { padding: 0 9px; background: #f0f0f2; color: #424245; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px !important; font-weight: 500; }
.lf-hero-meta .bf2-temp, .lf-hero-meta .bf2-score { padding: 0 9px; gap: 5px; }
.lf-hero-meta .bf2-temp:empty, .lf-hero-meta .bf2-score:empty { display: none; }
.lf-apfor-c { height: 26px; }
.lf-hero .lf-assign { flex: none; margin-top: 1px; }
.lf-nav { margin-top: 0; }
/* WhatsApp: número e "tem WhatsApp" começam no mesmo ponto do telefone de ligação */
.lf-crow:has(.lf-wa) { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; min-height: 58px; }
.lf-crow:has(.lf-wa) .lf-ci, .lf-crow:has(.lf-wa) .lf-cacts { margin-top: 4px; }
.lf-row-v.lf-wa { padding-left: 11px !important; row-gap: 4px; }
.lf-row-v.lf-wa input { padding-left: 0 !important; height: 26px; }
.lf-row-v.lf-wa .lf-wachk { padding-left: 0; margin: 0; }
/* ficha mais respirada: topo → ícones → título da página → campos */
.lf-hero { padding-bottom: 22px; margin-bottom: 20px; }
.lf-nav { margin-bottom: 22px; }
.lf-pg-h { margin: 0 0 16px; }
#lfForm .lf-card-t { margin: 24px 2px 12px; }
#lfForm .lf-sec > .lf-card-t:first-child, #lfForm .lf-perfil > .lf-card-t:first-child { margin-top: 4px; }
#lfForm .lf-sec-t { margin: 24px 0 12px; }
/* Anteriores: uma informação embaixo da outra */
details.lf-ap-past summary { grid-template-columns: minmax(0, 1fr) 14px; align-items: start; padding: 12px 2px; }
.lf-ap-st { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lf-ap-st b { font-size: 13.5px; font-weight: 600; color: #1d1d1f; }
.lf-ap-st small { font-size: 12.5px; color: #6e6e73; font-variant-numeric: tabular-nums; }
details.lf-ap-past .lf-ap-chev { margin-top: 6px; }
.lf-ap-more { gap: 5px; padding: 0 2px 14px; }
.lf-ap-more div { display: block; font-size: 12.5px; }
.lf-ap-more span { color: #86868b; }
/* Confirmação: duas colunas alinhadas, sem borda, só as caixinhas */
#lfForm .lf-chks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
#lfForm .lf-chk { display: flex; align-items: center; gap: 8px; border: 0 !important; background: none !important; padding: 0 !important; border-radius: 0 !important; font-size: 13px; color: #1d1d1f; cursor: pointer; }
#lfForm .lf-chk input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: #0071e3; }
details.lf-ap-past { display: block !important; padding: 0 !important; background: none; } .lf-ap-more { display: flex !important; flex-direction: column; }

/* ===== Inicial: Análise (receita) + Overview diário (Caixa diário) ===== */
.an2 { display: flex; flex-direction: column; gap: 18px; }
.an2-big { display: flex; flex-direction: column; gap: 4px; }
.an2-big span, .an2-grid span { font-size: 12.5px; color: #86868b; }
.an2-big b { font-family: var(--x4-font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.035em; color: #1d1d1f; font-variant-numeric: tabular-nums; line-height: 1.1; }
.an2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; padding-bottom: 18px; border-bottom: 1px solid #f0f0f2; }
.an2-grid div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an2-grid b { font-size: 20px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.an2-grid small { font-size: 11.5px; color: #86868b; }
.ov2-h { margin-top: 10px; padding-top: 18px; border-top: 1px solid #f0f0f2; }
.cx-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 10px 10px; }
.cx-total span { font-size: 13px; color: #424245; }
.cx-total b { font-size: 22px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; border-radius: 10px; }
.cx-row:nth-child(odd) { background: #fafafc; }
.cx-l { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #1d1d1f; min-width: 0; }
.cx-l small { font-size: 11px; color: #86868b; }
.cx-row b { font-size: 13.5px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-sep { height: 1px; background: #f0f0f2; margin: 8px 0; }
html[data-theme=dark] .cx-row:nth-child(odd) { background: #1c1c1e; }
/* Indicadores e Campanhas: largura toda, um embaixo do outro; o gráfico abre ao lado da lista */
.eg2-left .hm2-two.hm2-stack { display: flex; flex-direction: column; gap: 36px; margin-top: 0 !important; }
.hm2-stack > .hm2-sec.with-chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
.hm2-stack > .hm2-sec.with-chart > .hm2-h { grid-column: 1 / -1; }
.hm2-stack > .hm2-sec.with-chart > .hm2-bars { grid-column: 1; }
.hm2-stack > .hm2-sec.with-chart > .hm2-money { grid-column: 1; }
.hm2-stack > .hm2-sec.with-chart > #hmChart { grid-column: 2; grid-row: 2 / span 3; }
.eg2-left .hm2-bars .br-row { grid-template-columns: minmax(0, 1fr) 80px 64px; }
.eg2-left .hm2-bars.cp .br-row { grid-template-columns: minmax(0, 1fr) 110px 64px; }
/* ficha: retorno programado */
.lf-ret { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lf-ret label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #86868b; }
.lf-ret input { height: 36px; border: 1px solid #d2d2d7; border-radius: 10px; padding: 0 10px; font: inherit; font-size: 13px; color: #1d1d1f; background: #ffffff; }

/* ===== Inicial: saudação na D1, D2 "Análise" com um filtro só, receita em lista, lateral que fecha ===== */
.d1-title .d1-sub { font-family: var(--x4-font-display); font-size: inherit; font-weight: 400; letter-spacing: -0.02em; color: #86868b; margin-left: 4px; }
.hm2-main { padding-top: 6px; gap: 26px; }
.hm2-d2 { padding: 6px 0 4px; min-height: 48px; border-bottom: 1px solid #f0f0f2; margin-bottom: -6px; }
.hm2-d2-t { font-size: 13px; font-weight: 600; color: #6e6e73; letter-spacing: -0.005em; }
.eg2-h { display: none; }
/* receita: um embaixo do outro, todos do mesmo tamanho (só a receita grande) */
.an2-list { display: flex; flex-direction: column; gap: 0; padding-bottom: 14px; border-bottom: 1px solid #f0f0f2; }
.an2-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f7; cursor: default; }
.an2-list > div:last-child { border-bottom: 0; }
.an2-list span { font-size: 13px; color: #6e6e73; }
.an2-list b { font-size: 15px; font-weight: 600; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.an2-big { padding-bottom: 6px; }
/* divisória mais clara entre a esquerda e a direita */
.wa2 { border-left-color: #f0f0f2; }
.ov2-h { border-top-color: #f0f0f2; margin-top: 18px; padding-top: 22px; }
/* Caixa diário: sem subtítulos (o detalhe aparece no balão ao passar o mouse) */
.cx-row { cursor: default; min-height: 36px; }
.cx-row[data-x4tip]:hover { background: #f0f0f2; }
html[data-theme=dark] .cx-row[data-x4tip]:hover { background: #2c2c2e; }
/* lateral direita: bolinha na emenda (linha da D2 x borda da lateral), igual à setinha do menu */
.hm2-side { position: sticky; overflow: visible; }
.hs-tabs { box-sizing: border-box; height: var(--hm-d2-h, 60px); align-items: center; padding: 0 14px 0 22px; }
.hm2-side-x { position: absolute; z-index: 45; left: -13px; top: calc(var(--hm-d2-h, 60px) - 13px); width: 26px; height: 26px; padding: 0 0 2px; border-radius: 50%;
  border: 1px solid #e8e8ed; background: #ffffff; color: #3b4a54; font-size: 16px; line-height: 1; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.hm2-side-x:hover { border-color: #1d1d1f; color: #1d1d1f; }
/* fechada: fica só a coluna de ícones, como o menu da esquerda */
body.hm-side-off .hm2-grid { grid-template-columns: minmax(0, 1fr) 56px; }
body.hm-side-off .hs-body { display: none; }
body.hm-side-off .hs-tabs { flex-direction: column; height: auto; padding: calc(var(--hm-d2-h, 60px) + 14px) 0 0; gap: 8px; border-bottom: 0; }
body.hm-side-off .hs-tabs button, body.hm-side-off .hs-tabs button.on { padding: 0; width: 34px; }
body.hm-side-off .hs-tabs button > span:last-child { display: none; }
body.hm-side-off .hs-tabs button.on { background: transparent; color: #6e6e73; }
body.hm-side-off .hs-tabs button:hover { background: #f0f0f2; color: #1d1d1f; }
body.hm-side-off .hs-tabs::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--hm-d2-h, 60px) - 1px); border-top: 1px solid #f0f0f2; }
@media (max-width: 1200px) { .hm2-side-x { display: none; } body.hm-side-off .hm2-grid { grid-template-columns: minmax(0, 1fr); } body.hm-side-off .hs-body { display: block; } }
/* Campanhas mais afastada dos Indicadores */
.eg2-left .hm2-two.hm2-stack { gap: 64px; }
.hm2-d2 { margin-bottom: 18px; } /* mais espaço entre a D2 e o conteúdo */
/* CRM: colunas de Confirmação (uma por marcação) */
.cf-cell { text-align: center; }
.cf-ok { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; }
.cf-no { color: var(--muted, #9aa0a6); }
/* Ficha: apagar cadastro (só administrador) */
.lf-danger { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border, #e9edef); }
.lf-del-btn { background: none; border: 1px solid #e8b4ae; color: #c0392b; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.lf-del-btn:hover { background: #fdf0ee; }
.lf-del-ask { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #3b4a54; }
.lf-del-ask > div { display: flex; gap: 8px; }
.lf-del-yes { background: #c0392b; color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.lf-del-no { background: none; border: 1px solid var(--border, #e9edef); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }

/* ===== Menu lateral novo: D1 logo · D2 Quel IA · D3 ☰ + página · rodapé do workspace ===== */
.x4-rail-brand { height: var(--head-h); flex: none; display: flex; align-items: center; justify-content: center; position: relative;
  border-bottom: 1px solid var(--border); margin: 0 -10px; padding: 0 14px; text-decoration: none; }
.x4-rail-brand .x4-logo-menu { height: 20px; width: auto; max-width: 100%; display: block; mix-blend-mode: multiply; }
html[data-theme=dark] .x4-rail-brand .x4-logo-menu { filter: invert(1); mix-blend-mode: screen; }
.x4-rail-brand .x4-logo-mini { display: none; }
.x4-rail-brand .x4-logo-mini svg { height: 15px; width: auto; display: block; }
html[data-theme=dark] .x4-logo-mini path, html[data-theme=dark] .x4-ws-av.x4 path, html[data-theme=dark] .me-x4-big path { fill: #f5f5f7; }
.x4-rail-brand .x4m-stg { left: 50%; transform: translateX(-50%); top: auto; bottom: 5px; }
.x4-rail-quel { flex: none; padding: 10px 0 4px; }
.x4-rail-quel button { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--panel, #fff);
  color: var(--text, #111b21); border-radius: 12px; padding: 7px 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.x4-rail-quel button:hover { background: #f5f6f6; }
html[data-theme=dark] .x4-rail-quel button:hover { background: #1f1f21; }
.x4-rail-quel img { width: 26px; height: 26px; border-radius: 50%; flex: none; display: block; }
.x4-secnav-title.x4-rail-menu, .bi2-nav-title.x4-rail-menu { height: 46px !important; padding-left: 8px !important; padding-right: 8px !important; }
.x4-rail-menu .x4m-trigger { font-size: 15px; padding: 6px 8px; margin-left: 0; gap: 10px; width: 100%; justify-content: flex-start; }
.x4-rail-menu .x4m-trigger svg { width: 18px; height: 18px; flex: none; }
.x4m-trigger > svg:first-child:not(.x4m-logo) { width: 18px; height: 18px; flex: none; }
html[data-theme=dark] .x4m-trigger { color: var(--text); }
html[data-theme=dark] .x4m-trigger:hover, html[data-theme=dark] .x4m-trigger.open { background: #1f1f21; }
.ag-nav.x4-rail { display: flex; flex-direction: column; }
/* rodapé em L: barra na base da tela, emendada na lateral do menu */
:root { --x4-foot: 0px; --x4-navw: 250px; }
body.has-navfoot { --x4-foot: 54px; padding-bottom: var(--x4-foot); }
.x4-navfoot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; height: var(--x4-foot); display: flex; align-items: center;
  background: var(--panel, #fff); border-top: 1px solid var(--border); }
.x4-nf-ws { width: var(--x4-navw); flex: none; height: 100%; display: flex; align-items: center; padding: 0 10px; border-right: 1px solid var(--border); box-sizing: border-box; }
.x4-nf-acts { display: flex; align-items: center; gap: 6px; padding: 0 12px; }   /* botões logo ao lado do cliente, à esquerda */
.x4-up-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 7px 14px;
  background: #111b21; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.x4-up-btn svg { width: 15px; height: 15px; }
.x4-up-btn:hover { background: #2a3942; }
html[data-theme=dark] .x4-up-btn { background: #f5f5f7; color: #111; }
.x4-ws-pill { width: 100%; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: transparent;
  color: var(--text, #111b21); border-radius: 10px; padding: 5px 6px; font: inherit; cursor: pointer; text-align: left; }
.x4-ws-pill:hover { background: #f0f2f5; }
html[data-theme=dark] .x4-ws-pill:hover, html[data-theme=dark] .x4-nf-ic:hover { background: #1f1f21; }
.x4-ws-ud { margin-left: auto; flex: none; color: var(--muted, #8a93a6); display: grid; }
.x4-ws-ud svg { width: 15px; height: 15px; }
.x4-ws-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.x4-ws-tx b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4-ws-tx small { font-size: 10.5px; color: var(--muted, #8a93a6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4-ws-av { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--c, #6b7280); overflow: hidden; }
.x4-ws-av.x4 { background: #fff; border: 1px solid var(--border); }
html[data-theme=dark] .x4-ws-av.x4 { background: #111; }
.x4-ws-av.x4 svg { width: 70%; height: auto; }
.x4-nf-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 0; background: transparent; color: var(--text, #3b4a54);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.x4-nf-ic svg { width: 18px; height: 18px; }
.x4-nf-ic:hover { background: #f0f2f5; }
/* a lateral e as telas de altura cheia terminam em cima da barra */
body.has-navfoot .x4-secnav { bottom: var(--x4-foot); }
body.has-navfoot .bi2, body.has-navfoot .ag, body.has-navfoot .inbox-wrap, body.has-navfoot .sdr-main, body.has-navfoot .ag-wrapcol,
body.has-navfoot .inbox-main:has(.wa-hub-frame) { height: calc(100vh - var(--x4-foot)); }
body.has-navfoot.has-d1 .fb-wrap { height: calc(100vh - var(--head-h) - var(--x4-foot)); }
body.has-navfoot .hm2-side { height: calc(100vh - var(--head-h) - var(--x4-foot)); }
body.has-navfoot .hm2-grid { min-height: calc(100vh - var(--head-h) - var(--x4-foot)); }
.x4-ws-card { position: fixed; z-index: 1600; width: 250px; background: var(--panel, #fff); color: var(--text, #111b21); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px; box-shadow: 0 10px 32px rgba(11,20,26,.2); display: flex; flex-direction: column; gap: 2px; }
.x4-ws-head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.x4-ws-head .x4-ws-av { width: 36px; height: 36px; font-size: 13px; }
.x4-ws-head b { display: block; font-size: 14px; } .x4-ws-head small { display: block; font-size: 11.5px; color: var(--muted, #8a93a6); }
.x4-ws-ver { font-size: 11px; color: var(--muted, #8a93a6); padding: 2px 8px 6px; }
.x4-ws-li { display: block; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; font-size: 13.5px; padding: 8px; border-radius: 8px;
  cursor: pointer; text-decoration: none; }
.x4-ws-li:hover { background: #f0f2f5; }
html[data-theme=dark] .x4-ws-li:hover { background: #1f1f21; }
/* menu recolhido: só os ícones, um embaixo do outro */
body.nav-collapsed .x4-rail-brand { padding-left: 0; justify-content: center; }
body.nav-collapsed .x4-rail-brand img, body.nav-collapsed .x4-rail-brand .x4m-stg { display: none !important; }
body.nav-collapsed .x4-ws-tx, body.nav-collapsed .x4-ws-ud { display: none; }
body.nav-collapsed .x4-nf-ws { padding: 0; justify-content: center; }
body.nav-collapsed .x4-ws-pill { width: auto; }
body.nav-collapsed .x4-rail-brand .x4-logo-mini { display: block; }
body.nav-collapsed .x4-rail-quel button { justify-content: center; padding: 6px 0; border-color: transparent; }
body.nav-collapsed .x4-rail-quel span { display: none; }
body.nav-collapsed .x4-secnav-title.x4-rail-menu, body.nav-collapsed .bi2-nav-title.x4-rail-menu { padding-left: 0 !important; justify-content: center; }
body.nav-collapsed .x4-rail-menu .x4m-trigger { justify-content: center; width: auto; }
body.nav-collapsed .x4-secnav > .x4-rail-brand, body.nav-collapsed .ag-nav > .x4-rail-brand { display: flex !important; }
body.nav-collapsed .x4-secnav > .x4-rail-quel, body.nav-collapsed .ag-nav > .x4-rail-quel { display: block !important; }
@media (max-width: 820px) { .x4-rail-brand img { display: none !important; } .x4-rail-brand .x4-logo-mini { display: block; } .x4-rail-quel span, .x4-up-btn span, .x4-ws-tx, .x4-ws-ud { display: none; } }
/* perfil da X4 Growth: grande = X4, bolinha = clínica aberta */
.me-btn.me-x4 { overflow: visible; position: relative; background: #fff; border: 1px solid var(--border); }
html[data-theme=dark] .me-btn.me-x4 { background: #111; }
.me-x4-big { display: grid; place-items: center; width: 100%; height: 100%; }
.me-x4-big svg { width: 62%; height: auto; }
.me-ws-badge { position: absolute; right: -4px; bottom: -4px; }
.me-ws-badge .x4-ws-av { width: 18px; height: 18px; font-size: 8px; box-shadow: 0 0 0 2px var(--panel, #fff); }
.me-ws { margin: 10px 0 6px; padding: 10px; border-radius: 12px; background: #f5f6f7; text-align: left; }
html[data-theme=dark] .me-ws { background: #1f1f21; }
.me-ws > small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8a93a6); margin-bottom: 6px; }
.me-ws-row { display: flex; align-items: center; gap: 10px; }
.me-ws-row > span { flex: 1; min-width: 0; } .me-ws-row b { display: block; font-size: 14px; } .me-ws-row em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted, #8a93a6); }
.me-ws-all { border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
/* lista lateral da área: títulos de grupo e itens "Em breve" */
.x4-secnav-head { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8a93a6); padding: 14px 10px 4px; }
.x4-secnav a.x4-soon { opacity: .6; }
.x4-secnav a.x4-soon em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--muted, #8a93a6); white-space: nowrap; }
body.nav-collapsed .x4-secnav-head, body.nav-collapsed .x4-secnav a.x4-soon em { display: none; }
/* Central de contas */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.cc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel, #fff); }
.cc-card b { font-size: 14px; } .cc-card small { color: var(--muted, #667781); font-size: 12px; line-height: 1.35; flex: 1; }
.cc-card .btn { margin-top: 4px; }
.cc-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.cc-wa { background: #25d366; } .cc-evo { background: #128c7e; } .cc-ig { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.cc-fb { background: #0866ff; } .cc-mail { background: #6b7280; }
.cc-soon { opacity: .65; } .cc-tag { font-size: 11px; font-weight: 600; color: var(--muted, #667781); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.cc-h { margin: 22px 0 10px; }
.cc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
/* Visão geral: período escolhido (início e fim) */
.hm2-custom { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.hm2-custom[hidden] { display: none; }
.hm2-custom input { border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; background: var(--panel, #fff); color: inherit; }
.hm2-custom em { font-style: normal; font-size: 12px; color: var(--muted, #667781); }
/* administrador de rede: símbolo do grupo no perfil; aviso da conta da empresa (SDR) */
.me-x4-big.me-grp { font-size: 13px; font-weight: 800; color: var(--text, #111b21); }
.x4-ws-note { font-size: 12px; line-height: 1.4; color: var(--muted, #667781); padding: 4px 8px 8px; }
/* ===== Quel IA (página) ===== */
.ql-main { max-width: 860px; display: flex; flex-direction: column; min-height: calc(100vh - var(--head-h) - var(--x4-foot, 0px) - 24px); }
.ql-wrap { flex: 1; display: flex; flex-direction: column; }
.ql-hello { margin: auto 0; text-align: center; padding: 30px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ql-hello[hidden] { display: none; }
.ql-orb { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.ql-hello h2 { margin: 8px 0 0; font-size: 22px; text-wrap: balance; }
.ql-hello p { margin: 0; color: var(--muted, #667781); max-width: 480px; }
.ql-sugs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; max-width: 640px; }
.ql-sugs button { border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.ql-sugs button:hover { background: #f0f2f5; }
html[data-theme=dark] .ql-sugs button:hover { background: #1f1f21; }
.ql-msgs { display: flex; flex-direction: column; gap: 14px; padding: 10px 0 16px; }
.ql-msg { display: flex; gap: 10px; align-items: flex-start; }
.ql-msg.me { justify-content: flex-end; }
.ql-av { width: 28px; height: 28px; border-radius: 50%; flex: none; margin-top: 2px; }
.ql-bub { max-width: min(640px, 85%); min-width: 0; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 14px; overflow-wrap: anywhere; }
.ql-msg.me .ql-bub { background: #111b21; color: #fff; border-bottom-right-radius: 4px; }
html[data-theme=dark] .ql-msg.me .ql-bub { background: #f5f5f7; color: #111; }
.ql-msg.ai .ql-bub { background: var(--panel, #fff); border: 1px solid var(--border); border-top-left-radius: 4px; }
.ql-msg.wait .ql-bub { color: var(--muted, #667781); }
.ql-bub p { margin: 0 0 6px; } .ql-bub p:last-child { margin-bottom: 0; }
.ql-bub ul { margin: 4px 0 8px; padding-left: 18px; } .ql-bub li { margin: 2px 0; }
.ql-leads { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ql-leads a { font-size: 12.5px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; text-decoration: none; color: inherit; }
.ql-leads a:hover { background: #f0f2f5; }
.ql-note { margin-top: 8px; font-size: 11.5px; color: var(--muted, #667781); }
.ql-input { position: sticky; bottom: calc(var(--x4-foot, 0px) + 10px); display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 14px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--panel, #fff); box-shadow: 0 6px 24px rgba(11,20,26,.08); }
.ql-input textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; color: inherit; font: inherit; font-size: 14.5px; line-height: 1.45; padding: 6px 0; max-height: 160px; }
.ql-send { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: #111b21; color: #fff; display: grid; place-items: center; cursor: pointer; }
.ql-send:disabled { opacity: .45; cursor: default; }
html[data-theme=dark] .ql-send { background: #f5f5f7; color: #111; }
.ql-foot { text-align: center; margin: 8px 0 4px; }
/* ===== Créditos da Quel IA (rodapé + janela de compra) ===== */
.x4-nf-gap { width: 10px; flex: none; }
.x4-cred { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text, #111b21); font: inherit; font-size: 13.5px; cursor: pointer; }
.x4-cred svg { width: 14px; height: 14px; color: #3b82f6; }
.x4-cred:hover { background: #f0f2f5; }
.x4-cred.low b { color: #c0392b; }
.x4-cred-buy { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel, #fff); color: var(--text, #111b21); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.x4-cred-buy svg { width: 15px; height: 15px; }
.x4-cred-buy:hover { background: #f0f2f5; }
html[data-theme=dark] .x4-cred:hover, html[data-theme=dark] .x4-cred-buy:hover { background: #1f1f21; }
body.nav-collapsed .x4-cred-buy span { display: none; }
.x4-cr-ov { position: fixed; inset: 0; z-index: 1700; background: rgba(11,20,26,.45); display: grid; place-items: center; padding: 16px; }
.x4-cr-card { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel, #fff); color: var(--text, #111b21);
  border-radius: 18px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 14px; }
.x4-cr-h { display: flex; align-items: center; justify-content: space-between; } .x4-cr-h b { font-size: 18px; }
.x4-cr-x { border: 0; background: none; color: inherit; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.x4-cr-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.x4-cr-me > span:first-child { display: flex; align-items: center; gap: 10px; } .x4-cr-me b { font-size: 15px; }
.x4-cr-left { text-align: right; } .x4-cr-left small { display: block; font-size: 12px; color: var(--muted, #667781); }
.x4-cr-left b { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; } .x4-cr-left svg { width: 14px; height: 14px; color: #3b82f6; }
.x4-cr-sub { margin: 0; font-size: 13px; color: var(--muted, #667781); }
.x4-cr-pend { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: #fff4e0; color: #7a4a00; line-height: 1.5; }
html[data-theme=dark] .x4-cr-pend { background: #2a2010; color: #f5c46b; }
.x4-cr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .x4-cr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.x4-cr-pk { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--panel, #fff); color: inherit; font: inherit; cursor: pointer; }
.x4-cr-pk.on { border-color: #111b21; box-shadow: 0 0 0 1px #111b21; }
html[data-theme=dark] .x4-cr-pk.on { border-color: #f5f5f7; box-shadow: 0 0 0 1px #f5f5f7; }
.x4-cr-pk em { font-style: normal; font-size: 11px; font-weight: 700; color: #2563eb; background: #e8f0fe; border-radius: 6px; padding: 1px 6px; }
html[data-theme=dark] .x4-cr-pk em { background: #1b2a44; color: #8ab4f8; }
.x4-cr-pk em.base { color: var(--muted, #667781); background: transparent; }
.x4-cr-pk b { display: inline-flex; align-items: center; gap: 5px; font-size: 19px; } .x4-cr-pk b svg { width: 15px; height: 15px; color: #3b82f6; }
.x4-cr-pk span { font-size: 13px; } .x4-cr-pk s { color: var(--muted, #667781); font-size: 12px; }
.x4-cr-pk small { font-size: 11px; color: var(--muted, #667781); }
.x4-cr-form { display: flex; flex-direction: column; gap: 6px; } .x4-cr-form small { font-size: 12px; color: var(--muted, #667781); }
.x4-cr-form input { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 14px; background: var(--panel, #fff); color: inherit; }
.x4-cr-go { border: 0; border-radius: 12px; padding: 13px; background: #111b21; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.x4-cr-go:disabled { opacity: .6; cursor: default; }
html[data-theme=dark] .x4-cr-go { background: #f5f5f7; color: #111; }
.x4-cr-msg { font-size: 13px; line-height: 1.45; } .x4-cr-msg:empty { display: none; }
.x4-cr-note { margin: 0; font-size: 11.5px; color: var(--muted, #667781); line-height: 1.45; text-align: center; }
.ql-buy { border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
/* créditos em azul, presente com bolinha e etiqueta de desconto */
.x4-cred b { color: #2563eb; font-weight: 700; }
html[data-theme=dark] .x4-cred b { color: #60a5fa; }
.x4-cred.low b { color: #c0392b; }
.x4-gift { position: relative; }
.x4-gift i { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 2px var(--panel, #fff); }
.x4-cred-tag { border: 0; border-radius: 7px; padding: 4px 8px; background: #e8f0fe; color: #2563eb; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
html[data-theme=dark] .x4-cred-tag { background: #1b2a44; color: #8ab4f8; }
body.nav-collapsed .x4-cred-tag { display: none; }
/* créditos da Quel IA no canto direito da barra do rodapé */
.x4-nf-cred { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 0 16px; }
/* Clientes: painel da Quel IA (compras e uso) */
.cl2-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.cl2-two > div { min-width: 0; overflow-x: auto; }
@media (max-width: 1100px) { .cl2-two { grid-template-columns: minmax(0, 1fr); } }
/* Calendário: conectar Google Agenda */
.gc-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; }
.gc-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.55; }
.gc-card input { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; background: var(--panel, #fff); color: inherit; }
.gc-msg { font-size: 13px; color: #c0392b; } .gc-msg:empty { display: none; }
.ag-ev.ag-google, .ag-mev.ag-google { opacity: .9; }

/* ===== Marketing: mesmas regras das outras telas (D1 título, D2 descrição + ação, cartões) ===== */
.mk .mk-sub { margin-right: auto; color: var(--muted, #667781); font-size: 13.5px; max-width: 720px; }
.x4-d2-row.pc-top .mk-sub { order: -1; }
.mk .x4-d2-row { justify-content: space-between; }
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-col .pc-card { margin-bottom: 0; }
@media (max-width: 1000px) { .mk-grid { grid-template-columns: minmax(0, 1fr); } }
.mk-card .pc-card-h > b { font-size: 15px; }
.mk-body { padding: 16px; }
.mk-body .field { margin-bottom: 14px; }
.mk .field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted, #667781); margin-bottom: 5px; }
.mk input, .mk select, .mk textarea { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px;
  background: var(--panel, #fff); color: inherit; width: 100%; box-sizing: border-box; }
.mk input:focus, .mk select:focus, .mk textarea:focus { outline: none; border-color: #111b21; box-shadow: 0 0 0 3px rgba(17,27,33,.08); }
html[data-theme=dark] .mk input:focus, html[data-theme=dark] .mk select:focus, html[data-theme=dark] .mk textarea:focus { border-color: #f5f5f7; box-shadow: 0 0 0 3px rgba(245,245,247,.1); }
.mk .card { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: none; margin-bottom: 16px; }
.mk .card h3 { margin: 0 0 14px; font-size: 15px; }
.mk .builder-actions .btn-primary { background: #111b21; border-color: #111b21; border-radius: 10px; }
html[data-theme=dark] .mk .builder-actions .btn-primary { background: #f5f5f7; border-color: #f5f5f7; color: #111; }
.mk .btn { border-radius: 10px; }
/* WhatsApp Flows: editor e prévia lado a lado dentro do mesmo padrão */
.mk-flows .builder { padding: 0; max-width: none; }
.mk-flows .builder-right { top: calc(var(--head-h) + 12px); }
.mk-flows .preview-tabs .tab { border-radius: 999px; }
html[data-theme=dark] .pc-card { background: var(--panel); }
/* Campanhas (editor em tela cheia): barra de ferramentas no visual da D2 */
.fb-top { min-height: 56px; gap: 8px; padding-top: 8px; padding-bottom: 8px; background: var(--panel, #fff); }
.fb-top select, .fb-top input { border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13.5px; background: var(--panel, #fff); color: inherit; }
.fb-top .fb-name { font-weight: 600; min-width: 200px; }
.fb-top .btn-primary { background: #111b21; border-color: #111b21; border-radius: 10px; padding: 7px 16px; }
html[data-theme=dark] .fb-top .btn-primary { background: #f5f5f7; border-color: #f5f5f7; color: #111; }
.fb-top .btn-ghost { border-radius: 10px; }
/* explicação curta na D2 das telas de Marketing: o que é e com qual WhatsApp funciona */
.mk-wa { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted, #667781); }
.mk-wa b { color: var(--text, #111b21); font-weight: 600; }
.fb-info { flex-basis: 100%; font-size: 13px; color: var(--muted, #667781); line-height: 1.45; padding-top: 2px; }
.fb-info > b { color: var(--text, #111b21); }
/* ===== Campanhas (lista): resumo em números e cartões no padrão do sistema ===== */
.cp2-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cp2-kpis:empty { display: none; }
@media (max-width: 900px) { .cp2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cp2-kpi { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cp2-kpi span { font-size: 12.5px; color: var(--muted, #667781); } .cp2-kpi b { font-size: 24px; } .cp2-kpi small { font-size: 12px; color: var(--muted, #667781); }
.cp2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .cp2-grid { grid-template-columns: minmax(0, 1fr); } }
.cp2-card { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cp2-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cp2-card header b { display: block; font-size: 15px; } .cp2-card header small { display: block; font-size: 12px; color: var(--muted, #667781); margin-top: 2px; }
.cp2-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #f0f2f5; color: #54656f; white-space: nowrap; }
.cp2-st i { width: 7px; height: 7px; border-radius: 50%; background: #9aa3ab; }
.cp2-st.on { background: #e7f6ec; color: #1e7a3c; } .cp2-st.on i { background: #22c55e; }
html[data-theme=dark] .cp2-st { background: #26262a; color: #c7c7cc; } html[data-theme=dark] .cp2-st.on { background: #12301e; color: #6ee7a0; }
.cp2-ms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cp2-m { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp2-m b { font-size: 20px; } .cp2-m span { font-size: 11.5px; color: var(--muted, #667781); }
.cp2-m i { display: block; height: 4px; border-radius: 4px; background: #eef0f3; margin-top: 6px; position: relative; overflow: hidden; }
html[data-theme=dark] .cp2-m i { background: #2c2c2e; }
.cp2-m i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 4px; background: var(--c, #111b21); }
.cp2-m small { font-size: 11px; color: var(--muted, #667781); }
.cp2-m.in { --c: #111b21; } html[data-theme=dark] .cp2-m.in { --c: #f5f5f7; }
.cp2-m.act { --c: #3b82f6; } .cp2-m.out { --c: #22c55e; } .cp2-m.fail { --c: #e8665a; }
.cp2-m.fail b { color: #c0392b; } html[data-theme=dark] .cp2-m.fail b { color: #f28b82; }
.cp2-card footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp2-btn { padding: 7px 16px !important; text-decoration: none; }
.cp2-b { border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.cp2-b:hover { background: #f0f2f5; } html[data-theme=dark] .cp2-b:hover { background: #1f1f21; }
.cp2-del { border: 0; background: none; color: #c0392b; font: inherit; font-size: 13px; cursor: pointer; padding: 7px 8px; border-radius: 8px; }
.cp2-del:hover { background: #fdf0ee; } html[data-theme=dark] .cp2-del:hover { background: #2a1614; }
.cp2-empty { grid-column: 1 / -1; background: var(--panel, #fff); border: 1px dashed var(--border); border-radius: 14px; padding: 28px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.cp2-empty span { color: var(--muted, #667781); font-size: 13.5px; }
/* ===== D2 das telas de Marketing e Mensagens: barra branca embaixo da D1, alinhada com a linha do menu ===== */
.x4-d2bar { position: sticky; top: var(--head-h); z-index: 39; background: var(--panel, #fff); border-bottom: 1px solid var(--border);
  padding-left: 28px; padding-right: 28px; box-sizing: border-box; }
.x4-d2bar .d2-l { flex: 1; min-width: 0; }
.x4-d2bar .d2-info { font-size: 13.5px; color: var(--text, #111b21); line-height: 1.45; max-width: 980px; }
.x4-d2bar .d2-info .mk-wa { margin-top: 3px; }
.x4-d2bar .d2-r { flex: none; }
.x4-d2bar .d2-r .btn, .x4-d2bar .d2-r .ag-primary, .x4-d2bar .d2-r button, .x4-d2bar .d2-r a { white-space: nowrap; }
.x4-d2-gone { display: none !important; }
body.has-d2bar main.pc-wrap, body.has-d2bar main.builder, body.has-d2bar main.container, body.has-d2bar main.lib-wrap { padding-top: 20px; }
@media (max-width: 820px) { .x4-d2bar { padding-left: 16px; padding-right: 16px; } .x4-d2bar .d2-r { margin-left: 0; } }
/* ===== Central de contas em abas, com passo a passo ===== */
.cc2 { max-width: 980px; }
.cc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 18px; overflow-x: auto; }
.cc-tabs button { border: 0; background: none; color: var(--muted, #667781); font: inherit; font-size: 14px; font-weight: 600; padding: 10px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cc-tabs button:hover { color: var(--text, #111b21); }
.cc-tabs button.on { color: var(--text, #111b21); border-bottom-color: currentColor; }
.cc-pane[hidden] { display: none; }
.cc-guide { background: var(--panel, #fff); border: 1px solid var(--border); border-left: 3px solid #3b82f6; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.cc-guide > b { font-size: 14px; }
.cc-guide ol { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.55; }
.cc-guide li { margin: 4px 0; }
.cc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.cc-lead { background: #111b21; }
/* ===== Painel de controle em 4 telas: cada uma mostra só a sua parte ===== */
.pc-wrap[data-view] .pc-only-avisos, .pc-wrap[data-view] .pc-only-kpis, .pc-wrap[data-view] .pc-only-times, .pc-wrap[data-view] .pc-only-movimentos { display: none; }
.pc-v-avisos .pc-only-avisos, .pc-v-times .pc-only-times, .pc-v-movimentos .pc-only-movimentos { display: block; }
.pc-v-kpis section.pc-only-kpis { display: block; }
.pc-v-kpis .pc-kpis.pc-only-kpis { display: grid; }
.pc-v-times .pc-two, .pc-v-movimentos .pc-two { grid-template-columns: minmax(0, 1fr); }
.pc-wrap[data-view]:not(.pc-v-kpis) .pc-acts, .pc-wrap[data-view]:not(.pc-v-kpis) .pc-acts + .d2-sep { display: none; }
.pc-alerts-v { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.pc-alerts-v .pc-al { margin: 0; }
.pc-al-none { color: var(--muted, #667781); font-size: 14px; padding: 6px 2px; }
.pc-okr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
@media (max-width: 820px) { .pc-okr { grid-template-columns: minmax(0, 1fr); } }
.pc-okr-b { text-align: left; border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 12px; padding: 12px 14px; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; }
.pc-okr-b:hover { border-color: #111b21; } html[data-theme=dark] .pc-okr-b:hover { border-color: #f5f5f7; }
.pc-okr-b b { font-size: 14px; } .pc-okr-b small { font-size: 12.5px; color: var(--muted, #667781); }

/* ===== Telas novas (Comercial e Vendas & Recuperação): D1 abas · D2 título + filtros · D3 cabeçalho da tabela ===== */
.x4p { min-height: calc(100vh - var(--head-h) - var(--x4-foot, 0px)); }
.x4p-d2 { position: sticky; top: var(--head-h); z-index: 39; background: var(--panel, #fff); border-bottom: 1px solid var(--border); padding-left: 28px; padding-right: 28px; }
.x4p-head { display: flex; flex-direction: column; min-width: 0; }
.x4p-title { font-size: 15px; }
.x4p-info { font-size: 12.5px; color: var(--muted, #667781); line-height: 1.4; }
.x4p-d2 .d2-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x4p-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; color: var(--muted, #667781); }
.x4p-search input { border: 0; outline: none; background: transparent; color: var(--text, #111b21); font: inherit; font-size: 13px; width: 150px; }
.x4p-sel, .x4p-cus input { border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; background: var(--panel, #fff); color: inherit; }
.x4p-cus { display: inline-flex; align-items: center; gap: 6px; } .x4p-cus[hidden] { display: none; } .x4p-cus em { font-style: normal; font-size: 12px; color: var(--muted, #667781); }
.x4p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 28px 0; }
.x4p-kpis:empty { display: none; }
@media (max-width: 900px) { .x4p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px 0; } .x4p-d2 { padding-left: 16px; padding-right: 16px; } }
.x4p-kpi { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.x4p-kpi span { font-size: 12.5px; color: var(--muted, #667781); } .x4p-kpi b { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x4p-kpi small { font-size: 11.5px; color: var(--muted, #667781); }
.x4p-body { padding: 16px 28px 28px; }
@media (max-width: 900px) { .x4p-body { padding: 12px 16px 24px; } }
.x4p-tw { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; overflow: auto; max-height: calc(100vh - var(--head-h) - var(--x4p-d2h, 56px) - var(--x4-foot, 0px) - 40px); }
.x4p-tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.x4p-tb thead th { position: sticky; top: 0; z-index: 1; background: var(--panel, #fff); text-align: left; font-size: 12px; font-weight: 600; color: var(--muted, #667781);
  padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
.x4p-tb thead th.asc::after { content: " ↑"; } .x4p-tb thead th.desc::after { content: " ↓"; }
.x4p-tb td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.x4p-tb tbody tr:last-child td { border-bottom: 0; }
.x4p-tb tbody tr:hover td { background: #f7f8f9; } html[data-theme=dark] .x4p-tb tbody tr:hover td { background: #1c1c1e; }
.x4p-tb .num { text-align: right; white-space: nowrap; }
.x4p-lead { color: inherit; font-weight: 600; text-decoration: none; } .x4p-lead:hover { text-decoration: underline; }
.x4p-tag { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 9px; background: #f0f2f5; color: #3b4a54; white-space: nowrap; }
html[data-theme=dark] .x4p-tag { background: #26262a; color: #d1d1d6; }
.x4p-tag.t-fechada, .x4p-tag.t-feito, .x4p-tag.t-fechamento { background: #e7f6ec; color: #1e7a3c; }
.x4p-tag.t-perdida, .x4p-tag.t-atrasado, .x4p-tag.t-perdido { background: #fdecea; color: #b42318; }
.x4p-tag.t-em-aberto, .x4p-tag.t-hoje { background: #fff4e0; color: #8a5300; }
.x4p-tag.t-recuperado { background: #e8f0fe; color: #1d4ed8; }
.x4p-empty, .x4p-load { color: var(--muted, #667781); padding: 22px 14px; text-align: center; }
.x4p-foot { font-size: 12px; color: var(--muted, #667781); padding: 8px 4px 0; }
.x4p-card, .x4p-soon { background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.x4p-soon { max-width: 720px; line-height: 1.55; } .x4p-soon ul { margin: 6px 0 10px; padding-left: 20px; }
.x4p-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.x4p-form input, .x4p-form select { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; background: var(--panel, #fff); color: inherit; }
.x4p-form input[name=name] { min-width: 200px; } .x4p-form input[name=options] { flex: 1; min-width: 220px; }
.x4p-msg { font-size: 13px; color: #c0392b; margin-top: 6px; } .x4p-msg:empty { display: none; }
.x4p-del { border: 0; background: none; color: #c0392b; font: inherit; font-size: 13px; cursor: pointer; }
.x4p-cfg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.x4p-cfgi { display: flex; flex-direction: column; gap: 4px; background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit; }
a.x4p-cfgi:hover { border-color: #111b21; } html[data-theme=dark] a.x4p-cfgi:hover { border-color: #f5f5f7; }
.x4p-cfgi em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted, #667781); }
.x4p-cfgi b { font-size: 15px; } .x4p-cfgi small { font-size: 12.5px; color: var(--muted, #667781); line-height: 1.45; flex: 1; }
.x4p-cfgi span { font-size: 13px; font-weight: 600; margin-top: 6px; } .x4p-cfgi.soon span { color: var(--muted, #667781); font-weight: 500; }
/* abas novas do Comercial: menus "Outros" e "Configurações" */
.lsub-dd { position: relative; display: inline-flex; }
.lsub-dd > button.lsub { border: 0; background: none; font: inherit; cursor: pointer; }
.lsub-car { font-style: normal; font-size: 10px; opacity: .7; }
.lsub-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 250px; background: var(--panel, #fff); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(11,20,26,.16); padding: 6px; }
.lsub-dd.open .lsub-menu { display: block; }
.lsub-menu a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.lsub-menu a:hover, .lsub-menu a.on { background: #f0f2f5; } html[data-theme=dark] .lsub-menu a:hover, html[data-theme=dark] .lsub-menu a.on { background: #1f1f21; }
.lsub-menu a b { font-size: 13.5px; } .lsub-menu a small { font-size: 11.5px; color: var(--muted, #667781); }
.x4-d1-tabs .lead-subnav { margin-left: 0; overflow-x: auto; }
/* Painel: metas, taxas e campanhas (ícones da D2) só na tela KPI & OKRs */
body[data-pcview]:not([data-pcview="kpis"]) .pc-acts, body[data-pcview]:not([data-pcview="kpis"]) .pc-acts + .d2-sep { display: none !important; }
.x4-d2bar .pc-day { display: inline-flex; align-items: center; gap: 4px; }
/* Analytics: explicação à esquerda da D2, filtros à direita */
.bi2-d2 { justify-content: space-between; }
.bi2-info { flex: 1; min-width: 0; font-size: 13px; color: var(--muted, #667781); line-height: 1.4; }
.bi2-d2 .bi2-filters { margin-left: auto; }

/* Calendário: D1 só com o título; D2 (mês, setas, Hoje e botões) branca e enxuta; D3 = cabeçalho dos dias */
.ag-d1 { background: var(--panel, #fff); }
.ag-wrapcol .ag-head { background: var(--panel, #fff); padding-left: 28px; padding-right: 20px; }
.ag-wrapcol .ag-head-l { gap: 2px; }
.ag-wrapcol .ag-head-r { gap: 6px; }
.ag-wrapcol .ag-month { font-size: 15px; padding: 6px 8px; }
.ag-wrapcol .ag-today { border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; margin-left: 6px; }
.ag-wrapcol .ag-share { border-color: var(--border); padding: 6px 12px; font-size: 13px; }
.ag-wrapcol .ag-share:hover { border-color: #111b21; }
html[data-theme=dark] .ag-wrapcol .ag-share { background: var(--panel); color: var(--text); }
/* D3: abas/filtros da tela, logo abaixo da D2 (mesmo visual da linha de colunas do CRM) */
.x4-d3bar { position: sticky; top: calc(var(--head-h) + var(--x4-d2h, 52px)); z-index: 38; background: var(--panel, #fff); border-bottom: 1px solid var(--border);
  padding: 0 28px; min-height: 44px; display: flex; align-items: center; gap: 8px; box-sizing: border-box; }
.x4-d3bar > * { margin: 0 !important; border-bottom: 0 !important; }
.x4-d3bar .cc-tabs button { padding: 12px 12px 11px; }
.x4-d3bar .eq-filters { padding: 6px 0; flex-wrap: wrap; }
@media (max-width: 820px) { .x4-d3bar { padding: 0 16px; } }
/* ===== D2 igual à do CRM: uma linha só (título curto + ⓘ à esquerda, botões compactos à direita) e conteúdo em fundo branco ===== */
.x4-d2bar { min-height: 52px !important; height: auto; flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
.x4-d2bar .d2-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.x4-d2bar .d2-ttl { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-help { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted, #667781);
  font: 700 11px/1 Georgia, serif; font-style: italic; display: grid; place-items: center; cursor: help; padding: 0; }
.d2-help:hover { color: var(--text, #111b21); border-color: currentColor; }
.x4-d2bar .d2-r { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.x4-d2bar .d2-r .ag-primary, .x4-d2bar .d2-r .btn, .x4-d2bar .d2-r .lib-cfg, .x4-d2bar .d2-r .cl-cancel, .x4-d2bar .d2-r a {
  height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.x4-d2bar .d2-r .ag-primary { background: #0071e3; border-color: #0071e3; color: #fff; }
.x4-d2bar .d2-r .ag-primary:hover { background: #0062c4; }
.x4-d2bar .d2-r .lib-plus { width: 34px; height: 34px; border-radius: 50%; background: #0071e3; color: #fff; border: 0; display: grid; place-items: center; }
.x4-d2bar .d2-r .lib-plus svg { width: 18px; height: 18px; }
.x4-d2bar .d2-r .d2-ic { width: 34px; height: 34px; }
body.has-d2bar { background: var(--panel, #fff); }
body.has-d2bar main.pc-wrap, body.has-d2bar main.builder, body.has-d2bar main.container, body.has-d2bar main.lib-wrap { background: transparent; }
body.has-d2bar .mk .pc-card, body.has-d2bar .mk .card { box-shadow: none; }
/* ===== Listas no padrão do CRM: D3 = linha de colunas (presa embaixo da D2), linhas brancas de ponta a ponta ===== */
body.has-d2bar main.cp2 { max-width: none; padding-left: 0; padding-right: 0; padding-top: 0 !important; }
.x4-list { width: 100%; }
.x4-lt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.x4-lt thead th { position: sticky; top: calc(var(--head-h) + 52px); z-index: 5; background: var(--panel, #fff); text-align: left; font-size: 13px; font-weight: 500;
  color: var(--muted, #667781); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.x4-lt thead th:first-child, .x4-lt td:first-child { padding-left: 28px; }
.x4-lt thead th:last-child, .x4-lt td:last-child { padding-right: 28px; }
.x4-lt td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.x4-lt tbody tr { cursor: pointer; } .x4-lt tbody tr:hover td { background: #f7f8f9; } html[data-theme=dark] .x4-lt tbody tr:hover td { background: #1c1c1e; }
.x4-lt td b { display: block; font-weight: 600; } .x4-lt td small { display: block; font-size: 12px; color: var(--muted, #667781); margin-top: 1px; }
.x4-lt .num { text-align: right; white-space: nowrap; } .x4-lt .num em { font-style: normal; font-size: 11.5px; color: var(--muted, #667781); margin-left: 4px; }
.x4-lt .num.bad { color: #c0392b; }
.x4-lt .acts { text-align: right; white-space: nowrap; }
.x4-lt-b { border: 1px solid var(--border); background: var(--panel, #fff); color: inherit; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none; margin-left: 4px; display: inline-block; }
.x4-lt-b:hover { background: #f0f2f5; } html[data-theme=dark] .x4-lt-b:hover { background: #1f1f21; }
.x4-lt-b.del { border-color: transparent; color: #c0392b; }
.x4-lt-empty { color: var(--muted, #667781); text-align: center; padding: 28px 14px !important; cursor: default; }
.x4-count { font-size: 12.5px; color: var(--muted, #667781); white-space: nowrap; margin-right: 6px; }
.au-card { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.au-card h3 { margin: 0 0 4px; }
/* ===== Telas lista | criar (Templates, Disparos, Flows): D3 com abas, lista de ponta a ponta ===== */
.x4-tabs3 { display: flex; gap: 4px; }
.x4-tabs3 button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted, #667781); padding: 12px 10px 11px; cursor: pointer; border-bottom: 2px solid transparent; }
.x4-tabs3 button.on { color: var(--text, #111b21); border-bottom-color: currentColor; }
main[data-vw="list"] .vw-form, main[data-vw="form"] .vw-list { display: none !important; }
main[data-vw="list"], main[data-vw="list"] .builder { max-width: none !important; padding: 0 !important; margin: 0 !important; display: block; }
main[data-vw="list"] .builder-left { max-width: none; }
main[data-vw="list"] .vw-list.card { border: 0; border-radius: 0; margin: 0; padding: 0; background: transparent; box-shadow: none; }
main[data-vw="list"] .vw-list > .page-head { display: none; }
main[data-vw="list"] .vw-list .tpl-row, main[data-vw="list"] .vw-list .camp-row { padding: 12px 28px; border-radius: 0; margin: 0; }
main[data-vw="list"] .vw-list .tpl-row:hover { background: #f7f8f9; } html[data-theme=dark] main[data-vw="list"] .vw-list .tpl-row:hover { background: #1c1c1e; }
main[data-vw="list"] #campDetail { margin: 16px 28px; border: 1px solid var(--border); border-radius: 14px; }
main[data-vw="list"] #flowEmpty { padding: 24px 28px !important; }
main[data-vw="form"] { padding-top: 20px; }
/* ===== Assinatura do sistema: mesmas regras em Painel, E-mail/SMS e Vendas (lista de ponta a ponta, D3 presa embaixo da D2) ===== */
/* Painel de controle */
body[data-pcview] main.pc-wrap { max-width: none; padding: 0 0 28px; }
body[data-pcview] .pc-card { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; margin: 0; }
body[data-pcview] .pc-card-h { padding: 12px 28px; }
body[data-pcview] .pc-card-h > b { font-size: 13px; font-weight: 600; color: var(--muted, #667781); }
body[data-pcview] .pc-kpis { padding: 16px 28px; margin: 0; }
body[data-pcview] .pc-two { gap: 0; }
body[data-pcview] .pc-tablewrap { border: 0; border-radius: 0; }
body[data-pcview] .pc-alerts-v { padding: 14px 28px; }
body[data-pcview] .pc-okr { padding: 14px 28px 18px; }
body[data-pcview] .pc-feed { padding-left: 28px; padding-right: 28px; }
body[data-pcview] .pc-obj-add { padding-left: 28px; padding-right: 28px; }
/* E-mail, SMS e Cadências */
body.has-d2bar main.lib-wrap { max-width: none; padding: 0 0 28px; }
body.has-d2bar main.lib-wrap .lib-sec { padding: 16px 28px 0; margin: 0; }
body.has-d2bar main.lib-wrap #campSec { padding: 0; }
body.has-d2bar main.lib-wrap #campSec .ls-tablewrap { border: 0; border-radius: 0; }
body.has-d2bar main.lib-wrap #campSec thead th { position: sticky; top: calc(var(--head-h) + var(--x4-d2h, 52px) + 44px); z-index: 4; background: var(--panel, #fff); }
body.has-d2bar main.lib-wrap #campSec th:first-child, body.has-d2bar main.lib-wrap #campSec td:first-child { padding-left: 28px; }
/* Vendas & Recuperação e telas novas do Comercial: tabela de ponta a ponta, cabeçalho (D3) preso embaixo da D2 */
.x4p-body { padding: 0 0 28px; }
.x4p-tw { border: 0; border-radius: 0; max-height: none; overflow: visible; background: transparent; }
.x4p-tb thead th { top: calc(var(--head-h) + var(--x4p-d2h, 52px)); font-size: 13px; font-weight: 500; }
.x4p-tb thead th:first-child, .x4p-tb td:first-child { padding-left: 28px; }
.x4p-tb thead th:last-child, .x4p-tb td:last-child { padding-right: 28px; }
.x4p-kpis { padding: 16px 28px; border-bottom: 1px solid var(--border); }
.x4p-foot { padding: 10px 28px 0; }
.x4p-body > .x4p-card, .x4p-body > .x4p-soon, .x4p-body > .x4p-cfg { margin: 16px 28px; }
.x4p-cfg { margin: 16px 28px; }
.x4p { background: var(--panel, #fff); }
.x4p-d2 .d2-l { display: flex; align-items: center; gap: 8px; }
/* ===== Alinhamento: tudo começa na mesma linha do ícone do título da D1 (28px) ===== */
.x4-d3bar .x4-tabs3 button:first-child, .x4-d3bar .cc-tabs button:first-child, .x4-d3bar .ls-tabs > :first-child { padding-left: 0; margin-left: 0; }
.x4-d3bar .eq-filters { padding-left: 0; }
main[data-vw="list"] .vw-list > div:not(.page-head) { padding-left: 28px; padding-right: 28px; }
main[data-vw="list"] .vw-list .tpl-row, main[data-vw="list"] .vw-list .camp-row { padding-left: 0; padding-right: 0; }
main[data-vw="list"] .vw-list > div:not(.page-head):not(:has(.tpl-row)):not(:has(.camp-row)) { padding-top: 16px; color: var(--muted, #667781); }
.x4-d1-tabs .lead-subnav { margin-left: 14px; }
.x4-d2bar, .x4-d3bar, .x4p-d2 { padding-left: 28px !important; }
@media (max-width: 820px) { .x4-d2bar, .x4-d3bar, .x4p-d2 { padding-left: 16px !important; } main[data-vw="list"] .vw-list > div:not(.page-head) { padding-left: 16px; padding-right: 16px; } }

/* Marketing › Funis e páginas (X4 Funil): o construtor ocupa a tela toda abaixo da D2 */
main.fn-main { max-width: none !important; margin: 0; padding: 0 !important; background: #fff; }
main.fn-main .fn-frame { display: block; width: 100%; border: 0; background: #fff; min-height: 420px; }

/* Calendário e Agenda do Comercial: zoom da grade e cartões maiores (nome, procedimento e horário) */
.x4-zoom { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--border, #dadde1); border-radius: 8px; background: #fff; overflow: hidden; flex: none; }
.x4-zoom button { width: 28px; height: 100%; border: 0; background: transparent; font-size: 16px; line-height: 1; color: #1c1e21; cursor: pointer; }
.x4-zoom button:hover { background: #f0f2f5; }
.x4-zoom span { min-width: 44px; text-align: center; font-size: 12px; font-weight: 600; color: #65676b; font-variant-numeric: tabular-nums; border-left: 1px solid #e4e6eb; border-right: 1px solid #e4e6eb; line-height: 28px; }
html[data-theme=dark] .x4-zoom { background: #1c1c1e; border-color: #3a3a3c; }
html[data-theme=dark] .x4-zoom button { color: #f5f5f7; }
html[data-theme=dark] .x4-zoom button:hover { background: #2c2c2e; }
html[data-theme=dark] .x4-zoom span { border-color: #3a3a3c; color: #a1a1a6; }

.ag-ev { padding: 6px 8px 6px 10px; font-size: 12.5px; line-height: 1.3; border-radius: 8px; display: flex; flex-direction: column; gap: 1px; }
.ag-ev b { font-size: 13px; }
.ag-ev .ag-ev-what { color: #3b4a54; }
.ag-ev .ag-ev-t { color: #667781; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ag-ev.sm { padding-top: 0; padding-bottom: 0; justify-content: center; }
.ag-ev.sm b { font-size: 12px; }
.ag-ghc { padding: 14px 6px 12px; font-size: 14px; }
.ag-ghc b { font-size: 20px; letter-spacing: -.02em; }
html[data-theme=dark] .ag-ev .ag-ev-what { color: #d2d2d7; }
html[data-theme=dark] .ag-ev .ag-ev-t { color: #a1a1a6; }

.ca-ev { padding: 6px 9px 6px 11px; font-size: 12.5px; display: flex; flex-direction: column; gap: 1px; }
.ca-ev-n { font-size: 13px; }
.ca-ev-s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ca-ev.sm { flex-direction: row; }
/* linhas das horas acompanham o zoom (--hour vem da tela) */
.ag-col { background: linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% var(--hour, 56px),
                      linear-gradient(#f3f4f6 1px, transparent 1px) 0 calc(var(--hour, 56px) / 2) / 100% var(--hour, 56px); }
.ag-col.we { background-color: #fafafa; }
.ca-col { background-size: 100% var(--hour, 64px), 100% calc(var(--hour, 64px) / 2); }
html[data-theme=dark] .ag-col { background: linear-gradient(#2c2c2e 1px, transparent 1px) 0 0 / 100% var(--hour, 56px); }

/* cartão de informações ao passar o mouse num agendamento */
.x4-hc { position: fixed; z-index: 9000; width: 280px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid #e4e6eb; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 12px 14px; font-size: 12.5px; color: #1c1e21; pointer-events: none; }
.x4-hc-h { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 8px; }
.x4-hc-h i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, #8e8e93); margin-top: 4px; flex: none; }
.x4-hc-h b { display: block; font-size: 14px; line-height: 1.25; }
.x4-hc-h span { display: block; color: #65676b; margin-top: 1px; }
.x4-hc dl { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 5px 8px; margin: 0; }
.x4-hc dt { color: #8a8d91; }
.x4-hc dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.x4-hc .x4-hc-st { display: inline-block; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c, #8e8e93) 16%, #fff); font-weight: 600; font-size: 11.5px; }
.x4-hc-foot { margin-top: 9px; color: #8a8d91; font-size: 11.5px; }
html[data-theme=dark] .x4-hc { background: #1c1c1e; border-color: #3a3a3c; color: #f5f5f7; }
html[data-theme=dark] .x4-hc-h span, html[data-theme=dark] .x4-hc dt, html[data-theme=dark] .x4-hc-foot { color: #a1a1a6; }

/* Campanhas: bloco WhatsApp não oficial (Evolution / número do SDR) e prévia da enquete */
.fb-node.fb-evo .fb-node-head { background: #e3f5ea; color: #128c4a; }
.fb-pal-evo .pal-svg { color: #128c4a; }
.fb-wa-poll { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.fb-wa-poll div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.fb-wa-poll i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8696a0; flex: none; }

/* Campanhas: janela "Leads da campanha" (carregar e ver quem está nela) */
.ld-card { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; }
.ld-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e4e6eb; margin: 6px 0 14px; }
.ld-tabs button { border: 0; background: none; padding: 8px 12px; font-weight: 600; color: #65676b; cursor: pointer; border-bottom: 2px solid transparent; }
.ld-tabs button.on { color: #1c1e21; border-bottom-color: #0071e3; }
.ld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-row .field select[multiple] { height: auto; }
.ld-chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; margin: 2px 0 10px; }
.ld-chk input { width: auto; margin: 0; }
.ld-acts { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.ld-sum { margin: 10px 0 8px; font-size: 14px; }
.ld-tw { max-height: 320px; overflow: auto; border: 1px solid #e4e6eb; border-radius: 10px; }
.ld-tw thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.ld-off td { color: #8a8d91; }
.ld-ok { color: #128c4a; font-weight: 600; font-size: 12px; }
.ld-no { color: #b42318; font-size: 12px; }
.ld-badge:not(:empty) { margin-left: 4px; background: #0071e3; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
@media (max-width: 640px) { .ld-row { grid-template-columns: 1fr; } }
.ld-alert { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }
.ld-fail td { background: #fffbfa; }
.ld-why { color: #b42318; font-size: 12px; margin: 2px 0; max-width: 420px; }
.ld-x { border: 1px solid #fecdca; background: #fff; color: #b42318; border-radius: 6px; padding: 1px 7px; font-size: 12px; cursor: pointer; }
.ld-x:hover { background: #fef3f2; }

/* =====================================================================
   Telas atuais abertas DENTRO da Nova versão (iframe; classe x4-in-nv no <html>):
   sem a barra de abas antiga, fundo branco e o visual simples da Nova versão.
   ===================================================================== */
html.x4-in-nv:not([data-theme=dark]) {
  --bg: #ffffff; --border: #e7e7ea; --x4-line: #e7e7ea; --x4-snow: #f4f4f5; --text: #18181b; --muted: #71717a;
  --x4-blue: #18181b; --x4-blue-hover: #000000; --brand-grad: #18181b;
}
html[data-theme=dark].x4-in-nv { --x4-blue: #f4f4f5; --x4-blue-hover: #ffffff; --brand-grad: #f4f4f5; }
html.x4-in-nv body { background: var(--panel) !important; padding-bottom: 0 !important; }
html.x4-in-nv .inbox-head:has(.lead-subnav), html.x4-in-nv .lead-subnav, html.x4-in-nv #x4D1 { display: none !important; }
html.x4-in-nv .inbox-wrap, html.x4-in-nv .inbox-main { background: var(--panel); }
html.x4-in-nv .inbox-toolbar, html.x4-in-nv .x4-d2 { padding-left: 22px; padding-right: 22px; }
html.x4-in-nv .btn { border-radius: 8px; font-size: 13px; }
html.x4-in-nv .btn-primary, html.x4-in-nv .ag-primary { background: var(--x4-blue) !important; color: var(--panel) !important; border-radius: 8px; }
html.x4-in-nv .ag-primary { padding: 8px 14px; font-size: 13px; }
html.x4-in-nv .inbox-table th, html.x4-in-nv .ls-table th { font-weight: 500; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--muted); }
html.x4-in-nv .pc-top, html.x4-in-nv .hm-top, html.x4-in-nv .lib-head, html.x4-in-nv .dz-head { padding-left: 22px; padding-right: 22px; }
html.x4-in-nv .x4-d2, html.x4-in-nv .x4p-d2 { top: 0 !important; }   /* sem a barra antiga em cima: a faixa de ferramentas gruda no topo */
html.x4-in-nv .x4-rail-brand { display: none !important; }   /* a Nova versão já tem a marca na faixa de ícones */
html.x4-in-nv .x4-nv-info { margin: 0 6px; align-self: center; }
html.x4-in-nv a.ag-primary, html.x4-in-nv a.btn { text-decoration: none; }
/* Construtor › Público por status: escolher as etapas do funil que recebem a campanha */
.aud-st-wrap { position: relative; display: inline-flex; }
.aud-st-btn { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-st-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 280px; max-height: 360px; overflow-y: auto; padding: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.aud-st-pop[hidden] { display: none; }
.aud-st-h { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px 8px; }
.aud-st-f { display: flex; flex-direction: column; margin-bottom: 6px; }
.aud-st-f > b { font-size: 12px; padding: 4px; }
.aud-st-o { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.aud-st-o:hover { background: var(--bg); }
.aud-st-o input { width: auto; margin: 0; flex: none; }
.aud-st-o i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.aud-st-o small { margin-left: auto; }
.aud-st-foot { display: flex; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--border); }
/* Disparos: agendar data e hora */
.when-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.when-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.when-opt input { width: auto; margin: 0; }
.pill.pill-sched { background: #fff4e0; color: #b45309; }
/* Automações: público por status do funil */
.aud-chips { flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aud-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.aud-chip i { width: 8px; height: 8px; border-radius: 50%; }
.aud-chip.on { background: #111b21; border-color: #111b21; color: #fff; }
/* mídia do cabeçalho do template (salva) */
.tplmedia { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; font-size: 12.5px; }
.tplmedia-i { flex: 1; min-width: 180px; color: var(--muted); }
.tplmedia-b { cursor: pointer; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; background: var(--panel); }
/* Construtor › Público por filtros (status, fonte, período e tag juntos) */
.aud-f-pop { width: min(760px, 92vw); max-height: 70vh; }
.aud-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.aud-f-sec { min-width: 0; max-height: 46vh; overflow-y: auto; }
.aud-f-dates { display: flex; align-items: center; gap: 6px; }
.aud-f-dates input { flex: 1; min-width: 0; }
.aud-f-dates span { font-size: 12px; color: var(--muted); }
.aud-f-tags { width: 100%; }
.aud-f-count { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 12.5px; }
#ldSrcCfg:has(.ld-fbox) { grid-column: 1 / -1; flex-basis: 100%; }
.ld-fbox { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.ld-row:has(.ld-fbox) { flex-wrap: wrap; }
@media (max-width: 760px) { .aud-f { grid-template-columns: 1fr; } }
.ld-fbox label.aud-st-o, .aud-f-pop label.aud-st-o { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; text-transform: none; letter-spacing: 0; }
.ld-fbox .aud-st-o i { display: inline-block; }
/* Adicionar lead: indicação */
.cl2-ref { position: relative; }
.cl2-ref-res { display: flex; flex-direction: column; }
.cl2-ref-res button { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--border); background: var(--panel); cursor: pointer; font: inherit; font-size: 13px; }
.cl2-ref-res button:hover { background: var(--bg); }
.cl2-ref-res small { color: var(--muted); }
.cl2-ref-pick { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #eef4ff; font-size: 13px; }
.cl2-ref-pick[hidden] { display: none; }
.cl2-ref-pick button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.cl2-dup { margin-top: 12px; padding: 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5d79a; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cl2-dup[hidden] { display: none; }
.cl2-dup span { color: var(--muted); }
.cl2-dup-b { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* Ficha › Dados › Indicação (liga a ficha de quem indicou) */
.lf-ind { position: relative; display: flex; flex-direction: column; padding: 0 !important; }
.lf-ind input { width: 100%; }
.lf-ind-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; }
.lf-ind-link[hidden], .lf-row[hidden] { display: none; }
.lf-ind-link a, .lf-indicou a { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.lf-ind-link a:hover, .lf-indicou a:hover { text-decoration: underline; }
.lf-ind-link button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.lf-ind-res { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--panel); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.lf-ind-res:empty { display: none; }
.lf-ind-res button { display: flex; justify-content: space-between; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--border); background: var(--panel); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.lf-ind-res button:hover { background: var(--bg); }
.lf-ind-res small { color: var(--muted); }
.lf-indicou { padding: 6px 8px !important; line-height: 1.6; }
.cl2-ref, .cl2-ref .cl2-in { width: 100%; box-sizing: border-box; }
/* template com mídia no cabeçalho, na conversa */
.tpl-hdr { display: block; margin: -2px -4px 6px; max-width: 100%; border-radius: 6px; }
video.tpl-hdr { width: 100%; max-height: 360px; background: #000; }
.tpl-hdr-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 90px; margin: -2px -4px 6px;
  border-radius: 6px; background: rgba(0,0,0,.06); color: #54656f; font-size: 13px; font-weight: 600; }
.tpl-hdr-ph small { font-weight: 400; font-size: 11px; opacity: .8; }
/* Disparos: custo e respondidos */
.camp-cost { font-weight: 600; color: #1c1e21; }
.recip-reply { color: #1a7f37; font-weight: 500; }
.cd-kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }   /* 7 blocos: público, enviados, entregues, lidos, respondidos, falhas, custo */
/* Caixa de mensagem que cresce (WhatsApp API, conversa do CRM/Inbox e WhatsApp do SDR) */
textarea[data-grow] { display: block; resize: none; overflow-y: hidden; min-height: 42px; max-height: 150px; line-height: 20px;
  font: inherit; font-size: 15px; box-sizing: border-box; }
.reply #replyText, .reply-sm #dReply, .sdr-body .reply #sdrText { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 20px; }
.reply #replyText { border: 1px solid var(--border); }
.reply-sm #dReply { border: 1px solid var(--border); margin-left: 6px; margin-right: 6px; font-size: 14px; }
.sdr-body .reply #sdrText { border: none; background: #f0f2f5; font-size: 14px; outline: none; }
.reply:has(textarea[data-grow]), .reply-sm:has(textarea[data-grow]) { align-items: flex-end; }
.reply.locked textarea { background: #f0f2f5; color: #8a93a6; cursor: not-allowed; }
/* WhatsApp do SDR: pra onde vão as mensagens (webhook) */
.conn-hook { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.evo-hook { font-size: 11.5px; color: var(--muted); }
.evo-hook.ok { color: #1a7f37; }
.evo-hook.warn { color: #b45309; }
.evo-hook-btn { padding: 3px 10px !important; font-size: 12px !important; }

/* ---- LOXI: telas antigas dentro da nova versão seguem o cabeçalho padrão ----
   O título padrão (16px, semibold) é desenhado pela LOXI em cima da tela; aqui somem o título antigo, o botão
   "Quel IA", o "☰ + nome da tela" e o selo "Versão de teste" (já estão na LOXI). Os botões e filtros de cada tela ficam. */
html.x4-in-nv { --head-h: 52px; --title-size: 16px; }
html.x4-in-nv .x4-rail-quel, html.x4-in-nv .x4-rail-menu, html.x4-in-nv .x4m-trigger, html.x4-in-nv .x4m-stg,
html.x4-in-nv .x4-nv-info { display: none !important; }
html.x4-in-nv .pc-top > h1, html.x4-in-nv .lib-head > h1, html.x4-in-nv .hm-top > h1, html.x4-in-nv .dz-head > h1,
html.x4-in-nv .ql-head > h1, html.x4-in-nv .d1-title, html.x4-in-nv main > .page-head:first-child > h1 { display: none !important; }
/* cabeçalho antigo que ficou só com os botões: sem a faixa alta, alinhado à borda de 20px da LOXI */
html.x4-in-nv .pc-top, html.x4-in-nv .hm-top, html.x4-in-nv .dz-head { height: auto; min-height: 0; padding: 0 20px 12px; }
html.x4-in-nv .pc-wrap { padding-left: 0; padding-right: 0; }
html.x4-in-nv .pc-wrap > :not(.pc-top) { margin-left: 20px; margin-right: 20px; }
html.x4-in-nv .lib-wrap { padding: 0 20px 60px; }
html.x4-in-nv .lib-head { margin-bottom: 12px; }
html.x4-in-nv .pc-top:not(:has(> :not(h1):not(.x4-nv-info):not(.x4m-stg))),
html.x4-in-nv .lib-head:not(:has(> :not(h1):not(.x4-nv-info))) { display: none !important; }   /* só tinha o título */
html.x4-in-nv .bi2-head, html.x4-in-nv .ag-d1 { height: auto; min-height: 44px; padding: 0 20px 8px; }
html.x4-in-nv .inbox-toolbar, html.x4-in-nv .x4-d2, html.x4-in-nv .x4p-d2 { padding-left: 20px; padding-right: 20px; }
/* Loxi (IA da LOXI) na tela de perguntas */
.ql-is-loxi .ql-orb { width: 96px; height: auto; border-radius: 0; box-shadow: none; }
.ql-is-loxi .ql-av { width: 30px; height: 27px; border-radius: 0; }
.ql-think { display: inline-flex; gap: 4px; padding: 6px 2px; }
.ql-think i { width: 6px; height: 6px; border-radius: 50%; background: #2f6bff; opacity: .3; animation: qlDot 1.2s infinite; }
.ql-think i:nth-child(2) { animation-delay: .15s; } .ql-think i:nth-child(3) { animation-delay: .3s; }
@keyframes qlDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.loxi-float { animation: qlFloat 3.2s ease-in-out infinite; }
@keyframes qlFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .ql-think i, .loxi-float { animation: none; } }
/* LOXI: telas antigas alinhadas à esquerda junto com o título (sem largura máxima centralizada) */
html.x4-in-nv .pc-wrap { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
html.x4-in-nv .x4p-title, html.x4-in-nv .builder .page-head > h1 { display: none !important; }
html.x4-in-nv .builder { padding-left: 20px; padding-right: 20px; }
html.x4-in-nv .x4p-d2 .d2-ttl { display: none !important; }   /* Receitas, Vendas…: o título já está no cabeçalho LOXI */
html.x4-in-nv .x4p-d2 .d2-l .d2-help { display: none !important; }   /* a explicação vai pro "i" do cabeçalho LOXI */
html.x4-in-nv main.builder { padding-left: 20px !important; padding-right: 20px !important; }
html.x4-in-nv .lib-wrap, html.x4-in-nv .dz-wrap { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important;
  padding-left: 20px !important; padding-right: 20px !important; padding-top: 0 !important; }
html.x4-in-nv .dz-top > .dz-h { display: none !important; }   /* "Seus dashboards" repetia o título */

.x4-nv-pill { display: inline-flex; align-items: center; gap: 5px; background: #0a1433 !important; color: #fff !important; letter-spacing: .4px; }
.x4-nv-pill img { width: 17px; height: 15px; }

/* Disparos: ritmo em lotes, aviso de quem recebeu há pouco, pausar/retomar */
.pace-box { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #f4f6fa; font-size: 13.5px; }
.pace-box input[type=number] { width: 76px; display: inline-block; margin: 0 4px; padding: 4px 8px; }
.recent-warn { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 10px; background: #fff4e0; border: 1px solid #f5d29a; color: #7a4a06; font-size: 13.5px; }
.cd-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.pause-msg { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #fff4e0; color: #7a4a06; font-size: 13.5px; }
.pause-msg.wait { background: #eaf2ff; color: #1d4f9c; }
/* CRM: botão "Ver mais" no fim de cada coluna do Kanban (desenha 40 cartões por vez) */
.kb-more-btn { display: block; width: 100%; margin: 6px 0 2px; padding: 8px; border: 1px dashed #d4d4d8; border-radius: 8px; background: transparent; font: inherit; font-size: 12.5px; color: #52525b; cursor: pointer; }
.kb-more-btn:hover { background: #f4f4f5; }
