:root {
  /* Paleta estilo Facebook / Meta */
  --green: #1877f2;          /* azul do Facebook */
  --green-dark: #1560d0;     /* azul mais forte (hover) */
  --brand-grad: linear-gradient(135deg, #4a9bff 0%, #1877f2 60%, #1560d0 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: #1560d0; }
.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-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: #1560d0; 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: #1560d0; 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 #1560d0; }
.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: #1560d0; }
.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: #1560d0; }
.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 #1560d0; }
.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 #1560d0; }
.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-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: #1560d0; }
.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: #1560d0; }
.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; }

/* ---------- 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: 0; right: auto; min-width: 200px; }
.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: #1560d0; 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, #1560d0); 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: #1560d0; 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, #1560d0); 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: #1560d0; 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: #1560d0; 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: #1560d0; }
#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: #1560d0; 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; }

/* ================= Modo escuro =================
   A página inteira é invertida (claro vira escuro e escuro vira claro, mantendo a cor de cada coisa),
   assim nenhum texto some, nem os que têm cor escrita direto na tela. Fotos, vídeos, figurinhas e
   prévias de e-mail/página são "desinvertidos" pra aparecerem com as cores reais. */
html[data-theme=dark] { filter: invert(.92) hue-rotate(180deg); background: #fff; }
html[data-theme=dark] body { background: #fff; }
html[data-theme=dark] img,
html[data-theme=dark] video,
html[data-theme=dark] .fb-mail-f,
html[data-theme=dark] #cpThumb,
html[data-theme=dark] #brIframe,
html[data-theme=dark] [style*="background-image"],   /* fotos desenhadas como fundo (avatares de responsável, lead, canal…) */
html[data-theme=dark] .x4emo,                       /* emojis (o sistema embrulha cada um num <span class="x4emo">) */
html[data-theme=dark] [data-keep-colors],
html[data-theme=dark] #lfMoneyStrip, html[data-theme=dark] #bfMoney { filter: invert(1) hue-rotate(180deg); }   /* faixa de dinheiro já é escura: fica como está */
/* imagem dentro de algo já desinvertido não inverte de novo */
html[data-theme=dark] [data-keep-colors] img, html[data-theme=dark] [data-keep-colors] video,
html[data-theme=dark] [style*="background-image"] img, html[data-theme=dark] [style*="background-image"] .x4emo,
html[data-theme=dark] [data-keep-colors] .x4emo, html[data-theme=dark] #lfMoneyStrip .x4emo, html[data-theme=dark] #bfMoney .x4emo { filter: none; }
.x4emo { display: inline-block; }
/* sombras invertidas viram brilho claro: no escuro ficam bem mais leves */
html[data-theme=dark] .x4m-pop, html[data-theme=dark] .x4m-sub, html[data-theme=dark] .rail-pop, html[data-theme=dark] .ag-card,
html[data-theme=dark] .x4-bellpop, html[data-theme=dark] .x4-ntf, html[data-theme=dark] .kb-card { box-shadow: 0 0 0 1px rgba(0,0,0,.10) !important; }

/* 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; }
/* modo escuro: o fundo atrás das janelas escurece (sem isso, invertido, ele clareava) */
html[data-theme=dark] .modal-overlay, html[data-theme=dark] .call-modal, html[data-theme=dark] .sdr-modal, html[data-theme=dark] .ag-modal,
html[data-theme=dark] .bf-overlay, html[data-theme=dark] .fin-modal, html[data-theme=dark] .lf-merge-ov { background: rgba(255,255,255,.55); }
html[data-theme=dark] .fin-side { background: rgba(255,255,255,.35); }

/* 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; }
html[data-theme=dark] .x4-wsc-logo:not(.home) { filter: invert(1) hue-rotate(180deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }   /* cor do cliente fica a real */
/* 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 */
.x4-staging { position: fixed; right: 14px; bottom: 14px; z-index: 5000; background: #f59e0b; color: #1f1300; font-size: 11.5px; font-weight: 800;
  letter-spacing: .04em; padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: auto; cursor: help; }
html.x4-embed .x4-staging { display: none; }
.x4m-ver { padding: 2px 12px 0; font-size: 11px; color: #9aa3ad; }
