/* ===== AILOGIC HUB — camada global (fonte, animações, polimento) ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* Montserrat padrão: bold nos títulos, regular nos textos */
:root{ --font:Montserrat,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif; }
body{ font-family:var(--font); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
h1,h2,h3,h4,.headline h1,.panel-head h2,.panel-head h3,.brand strong,.kpi .value,.value{ font-family:var(--font); }
.headline h1,h1{ font-weight:700; letter-spacing:-.02em; }
h2,h3,.panel-head h2,.panel-head h3,.brand strong,.card h3{ font-weight:700; }
.kpi .value,.value{ font-weight:700; }
.badge,.btn,th,.section-title,.count,.chip2,.pill{ font-weight:700; }
p,.card p,.side-row span,.detail-item span,.rule span,td{ font-weight:400; }

/* ===== padronização (títulos · números · botões · cantos) ===== */
/* títulos: escala única em todas as telas */
.headline h1,h1{ font-size:24px !important; font-weight:700 !important; }
.panel-head h2,.panel-head h3{ font-size:15px !important; font-weight:700 !important; letter-spacing:-.01em; }
.kpi h3{ font-size:12px !important; font-weight:700 !important; }
.card h3{ font-size:14px !important; font-weight:700 !important; }
/* números: sempre Bold (700), nunca extrabold/black */
.value,.num,.count,.metric strong,.kpi strong,.donut .num,.kpi .value{ font-weight:700 !important; }
/* botões: fonte uniforme */
.btn,.pill{ font-size:13px !important; font-weight:700 !important; }
/* cantos generosos (visual XORA premium, muito respiro) */
:root{ --radius:16px; }
.panel,.kpi,.card,.alert-cell,.fstage,.fcard,.kbody,.fcol-body,.metric,.rule,.ph-card,.table-wrap table,table,.support{ border-radius:16px !important; }
.nav-item,.btn,.pill,select,input,.search,.chip2,.kpi-icon,.card-icon,.r-ico,.ai,.logo,.fi,.ph-ico,.fst-ic,.kpi-ic,.alc-ic,.ins-ic{ border-radius:11px !important; }

/* ===== varredura de fonte: Montserrat em TUDO + labels padronizadas em Bold ===== */
*{ font-family:Montserrat,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif !important; }
.trend{ font-weight:700 !important; }

/* ===== fundo do app claro azulado (respiro XORA) ===== */
:root:not([data-theme="dark"]) body{ background:var(--app-bg,#f4f7fc) !important; }
/* mais espacamento entre secoes/widgets */
.kpis{ gap:20px !important; }
.grid2,.grid2b,.grid3,.layout,.cards,.res{ gap:22px !important; }

/* ===== contorno suave dos widgets no MODO CLARO (borda sutil + sombra difusa) ===== */
:root:not([data-theme="dark"]) .kpi,
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .panel,
:root:not([data-theme="dark"]) .metric,
:root:not([data-theme="dark"]) .alert-cell,
:root:not([data-theme="dark"]) .ph-card,
:root:not([data-theme="dark"]) .table-wrap{
  background:#fff !important;
  border:1px solid var(--card-border,#eef1f7) !important;
  box-shadow:0 6px 20px rgba(20,40,80,.06) !important;
}

/* ===== KPI de destaque: primeiro card da linha em degrade azul + texto branco ===== */
.kpis > .kpi:first-child,.kpi.featured{
  background:var(--grad-blue,linear-gradient(135deg,#2f5bd6,#1b306e)) !important;
  border:0 !important; color:#fff !important;
  box-shadow:0 10px 28px rgba(27,48,110,.28) !important;
}
.kpis > .kpi:first-child h3,.kpi.featured h3,
.kpis > .kpi:first-child .value,.kpi.featured .value,
.kpis > .kpi:first-child .trend,.kpi.featured .trend,
.kpis > .kpi:first-child .label,.kpi.featured .label{ color:#fff !important; }
.kpis > .kpi:first-child .kpi-ic,.kpis > .kpi:first-child .kpi-icon,
.kpi.featured .kpi-ic,.kpi.featured .kpi-icon{ background:rgba(255,255,255,.18) !important; color:#fff !important; }
/* labels de secao discretas */
.kpi h3,.section-title{ color:var(--gray500) !important; }
.kpis > .kpi:first-child h3,.kpi.featured h3{ color:rgba(255,255,255,.85) !important; }

/* ===== badges sólidos: cor no box, fonte branca, fundo predominante + hover ===== */
.badge{ transition:transform .15s ease; }
.badge:hover{ transform:scale(1.05); }
.badge.green{ background:var(--green) !important; color:#fff !important; }
.badge.blue{ background:var(--blue) !important; color:#fff !important; }
.badge.orange{ background:var(--orange) !important; color:#fff !important; }
.badge.red{ background:var(--red) !important; color:#fff !important; }
.badge.purple{ background:var(--purple) !important; color:#fff !important; }
.badge.cyan{ background:var(--cyan) !important; color:#fff !important; }
.badge.gray{ background:var(--gray500) !important; color:#fff !important; }

/* ===== ícones do app: fundo navy (cor sidebar) + ícone branco + hover ===== */
.kpi-icon,.card-icon,.r-ico,.fi,.fst-ic,.kpi-ic,.ins-ic{ background:var(--accent-dk,#1b306e) !important; color:#fff !important; transition:transform .16s ease, box-shadow .16s ease; }
.kpi-icon:hover,.card-icon:hover,.r-ico:hover,.fi:hover,.fst-ic:hover,.kpi-ic:hover,.ins-ic:hover{ transform:scale(1.1); box-shadow:0 7px 18px rgba(27,48,110,.30); }
.fst.last .fst-ic,.fst.last .fi{ background:rgba(255,255,255,.16) !important; color:#fff !important; }
/* logo WhatsApp (marcador .wa-ico) com tamanho adequado */
.wa-ico .hub-ic{ font-size:18px; }
.wa-ico{ display:inline-flex; vertical-align:middle; line-height:0; }
/* caixa de alerta com logo WhatsApp fica branca (logo verde precisa de contraste) */
.ai:has(svg[fill="#25D366"]){ background:#fff !important; border:1px solid var(--gray200) !important; }

/* cor da sidebar: AZUL navy rico em degrade (pedido do cliente, sem quase-preto) */
.sidebar{ background:var(--sidebar-grad,linear-gradient(180deg,#152a63,#0e1c44)) !important; }
/* tipografia da sidebar: tudo normal, só o item selecionado em negrito */
.sidebar .nav-item{ font-weight:400 !important; color:#c8d5f0 !important; }
.sidebar .nav-item.active{ font-weight:700 !important; color:#fff !important; }
.sidebar .section-title{ font-weight:500 !important; color:#8ea3d4 !important; }
/* item ativo em azul mais vivo */
.sidebar .nav-item.active{ background:rgba(79,111,240,.28) !important; box-shadow:inset 0 0 0 1px rgba(120,150,255,.24); }
.sidebar .nav-item:hover:not(.active){ background:rgba(255,255,255,.07) !important; }
/* ícones do menu com traço mais fino */
.hub-ic svg{ stroke-width:1.8; }
.nav-item .ico .hub-ic svg{ stroke-width:1.8; }

/* ===== recolher sidebar (mini rail) ===== */
.app{ transition:grid-template-columns .25s ease; }
.sb-toggle{ display:flex; align-items:center; justify-content:center; width:28px; height:28px; margin:0 0 10px auto; padding:0; background:none; border:0; border-radius:8px; color:#6f86ab; cursor:pointer; transition:color .15s,transform .2s; }
.app.sb-collapsed .sb-toggle{ margin:0 auto 10px; }
.sb-toggle:hover{ color:#dce8ff; }
.app.sb-collapsed{ grid-template-columns:62px 1fr !important; }
.app.sb-collapsed .sidebar{ padding:22px 11px; }
.app.sb-collapsed .nav-item{ justify-content:center; padding:11px 0; }
.app.sb-collapsed .nav-label{ display:none; }
.app.sb-collapsed .section-title{ height:1px; padding:0; margin:16px 8px; overflow:hidden; color:transparent; background:rgba(255,255,255,.08); }
.app.sb-collapsed .brand{ justify-content:center; }
.app.sb-collapsed .brand > div:last-child{ display:none; }
.app.sb-collapsed .support{ justify-content:center; padding:13px 0; }
.app.sb-collapsed .support > div:last-child{ display:none; }
.app.sb-collapsed .profile{ justify-content:center; padding-left:0; padding-right:0; }
.app.sb-collapsed .profile > div:last-child{ display:none; }
.app.sb-collapsed .sb-toggle{ transform:rotate(180deg); }
@media (max-width:1050px){ .sb-toggle{ display:none; } .app.sb-collapsed{ grid-template-columns:1fr; } }

/* ícones SVG inline (substituem emojis) herdam a cor do contexto */
.hub-ic{ display:inline-flex; align-items:center; justify-content:center; line-height:0; }
.hub-ic svg{ width:1em; height:1em; }
.kpi-icon .hub-ic,.card-icon .hub-ic,.r-ico .hub-ic,.ai .hub-ic,.logo .hub-ic{ font-size:17px; }
/* icones do menu menores/clean (REV0c) */
.sidebar .nav-item .ico{ width:20px !important; font-size:15px; display:inline-flex; align-items:center; justify-content:center; }
.sidebar .nav-item .ico .hub-ic{ font-size:15px; }
.sidebar .nav-item .ico .hub-ic svg{ width:16px; height:16px; }
.ph-ico .hub-ic{ font-size:34px; }

/* animações: entrada da tela + cascata */
@keyframes hubFade{ from{opacity:0} to{opacity:1} }
@keyframes hubRise{ from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:none} }
@keyframes hubSide{ from{opacity:0; transform:translateX(-10px)} to{opacity:1; transform:none} }
/* entrada limpa: esconde o conteúdo antes do JS orquestrar (sidebar > tela > boxes > números) */
html.hub-pre .main{ opacity:0; }
html.hub-pre .kpis .kpi, html.hub-pre .main > .panel, html.hub-pre .layout > *, html.hub-pre .alert-cell, html.hub-pre .fstage, html.hub-pre .kcol, html.hub-pre .ph-card{ opacity:0; }
@keyframes hubSideItem{ from{opacity:0; transform:translateX(-16px)} to{opacity:1; transform:none} }
/* mobile "catraca": slide entre telas ao arrastar pro lado */
@keyframes hubSlideInR{ from{opacity:.3; transform:translateX(28px)} to{opacity:1; transform:none} }
@keyframes hubSlideInL{ from{opacity:.3; transform:translateX(-28px)} to{opacity:1; transform:none} }
/* dica de swipe (aparece 1x no mobile, some sozinha) */
@keyframes hubSwipeHint{ 0%,100%{opacity:0} 12%,88%{opacity:.55} 50%{transform:translateX(-10px)} }
.hub-swipe-hint{ position:fixed; bottom:96px; left:50%; transform:translateX(-50%); z-index:60; display:none; align-items:center; gap:8px; padding:7px 13px; border-radius:999px; background:rgba(6,22,41,.9); color:#dce8ff; font-size:12px; font-weight:600; pointer-events:none; }
@media (max-width:900px){ .hub-swipe-hint{ display:flex; animation:hubSwipeHint 3.4s ease 1 both; } }
.hub-side-item{ opacity:0; animation:hubSideItem .5s cubic-bezier(.22,.61,.36,1) both; }
.hub-rise{ opacity:0; animation:hubRise .55s cubic-bezier(.22,.61,.36,1) forwards; }
/* navegação fluida: sem pulinho; só uma leve escala no item, suave */
.nav-item{ transition:transform .2s cubic-bezier(.22,.61,.36,1), background .15s ease, box-shadow .15s ease; transform-origin:left center; }
.nav-item{ white-space:nowrap; }
.nav-label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav-item:hover{ background:rgba(255,255,255,.06); }
.nav-item:hover:not(.active){ transform:translateX(2px); }
.nav-item.active{ transform:scale(1.03); }
/* setas do funil em navy (estavam quase invisíveis) */
.fconn{ color:var(--accent-dk,#1b306e) !important; }
/* ===== clique dinâmico em TODOS os botões: sem quadrado de toque, só a animação ===== */
button, a, [role="button"], .btn, .pill, .icon-btn, .wa-tab, .chip, .chip2, .seg button,
.act button, .nav-item, .sb-toggle, .hub-logout, .snd-toggle, .modal-x, .crm-close,
.wa-back, .wa-crm-btn, .dd > button, .tool, .toggle{ -webkit-tap-highlight-color:transparent; }
.icon-btn,.wa-tab,.chip,.chip2,.seg button,.act button,.snd-toggle,.modal-x,.crm-close,.wa-back,.wa-crm-btn{ transition:transform .12s ease, filter .12s ease; }
.icon-btn:active,.wa-tab:active,.chip:active,.chip2:active,.seg button:active,.act button:active,.snd-toggle:active,.modal-x:active,.crm-close:active,.wa-back:active,.wa-crm-btn:active{ transform:scale(.9); }

/* botões/pills do header: menores, minimalistas, com hover e clique */
.pill,.btn{ height:34px !important; padding:0 13px !important; font-size:12px !important; border-radius:10px !important; transition:transform .14s ease, box-shadow .14s ease, background .14s ease; }
.pill:hover,.btn:hover{ transform:translateY(-1px); box-shadow:0 8px 18px rgba(15,23,42,.12); }
.pill:active,.btn:active{ transform:translateY(0) scale(.94); }
/* botões sólidos (cor de fundo predominante) padronizados em todo o sistema */
.btn{ background:var(--accent-dk,#1b306e) !important; color:#fff !important; border-color:var(--accent-dk,#1b306e) !important; box-shadow:none !important; }
.btn.primary{ background:var(--accent-dk,#1b306e) !important; border-color:var(--accent-dk,#1b306e) !important; }
.btn.blue{ background:var(--blue) !important; border-color:var(--blue) !important; color:#fff !important; }
.btn.red{ background:var(--red) !important; border-color:var(--red) !important; color:#fff !important; }
.btn.ghost{ background:#eef3fb !important; color:var(--gray700) !important; border-color:var(--gray200) !important; }
.btn:hover{ filter:brightness(1.12); }
.kpi,.card,.panel{ transition:transform .18s ease, box-shadow .18s ease; }
.kpi:hover,.card:hover{ transform:translateY(-3px); box-shadow:0 12px 30px rgba(20,40,80,.10); }
.kpi,.card,.panel{ transition:transform .18s ease, box-shadow .18s ease; }
.kpi:hover,.card:hover{ transform:translateY(-3px); box-shadow:0 12px 30px rgba(20,40,80,.10); }

/* ===== REV0c: loading (barrinha no topo + skeleton shimmer) ===== */
@keyframes hubTopbar{ 0%{left:-45%;width:45%} 60%{width:55%} 100%{left:100%;width:45%} }
.hub-topbar{ position:fixed; top:0; left:0; right:0; height:3px; z-index:9999; pointer-events:none; overflow:hidden; }
.hub-topbar::before{ content:""; position:absolute; top:0; height:100%; left:-45%; width:45%; background:linear-gradient(90deg,transparent,var(--blue,#0b66ff),transparent); animation:hubTopbar 1.05s ease-in-out infinite; }
.hub-topbar.done::before{ animation:none; left:0; width:100%; opacity:0; transition:opacity .35s ease; }
@keyframes hubShimmer{ 0%{background-position:-200px 0} 100%{background-position:200px 0} }
.hub-skel,.hub-skel-num{ color:transparent !important; border-radius:8px; background-image:linear-gradient(90deg, rgba(120,140,170,.13) 25%, rgba(120,140,170,.28) 50%, rgba(120,140,170,.13) 75%) !important; background-size:400px 100% !important; animation:hubShimmer 1.05s linear infinite; }
.hub-skel-num{ display:inline-block; min-width:54px; height:.86em; vertical-align:middle; }
.hub-skel{ min-height:15px; }

@media (prefers-reduced-motion: reduce){
  .main,.sidebar,.hub-rise,.hub-side-item{ animation:none !important; opacity:1 !important; transform:none !important; }
  .hub-topbar::before,.hub-skel,.hub-skel-num{ animation:none !important; }
  .hub-dock-item{ transition:none !important; }
}

/* ===== DOCK mobile (estilo Apple): navegação horizontal fixa embaixo ===== */
.hub-dock{ display:none; }
@media (max-width:900px){
  /* some com a sidebar vertical empilhada -> vira app nativo */
  .sidebar{ display:none !important; }
  .app{ grid-template-columns:1fr !important; }
  .main{ padding-bottom:calc(98px + env(safe-area-inset-bottom)) !important; }
  /* dock: barra de fundo cheia, mostra ~5, rola na horizontal com snap */
  .hub-dock{ position:fixed; left:0; right:0; bottom:0; z-index:80; display:block;
    background:#061629;   /* fundo navy sólido: sem backdrop-filter -> sem borrão/smear no GPU */
    border-top:1px solid rgba(255,255,255,.08); box-shadow:0 -8px 24px rgba(0,0,0,.28);
    padding-bottom:env(safe-area-inset-bottom); }
  /* scroll totalmente livre (sem snap = mais sensível) + momentum do sistema */
  .hub-dock-track{ display:flex; overflow-x:auto; overflow-y:hidden; scroll-snap-type:none;
    -webkit-overflow-scrolling:touch; scrollbar-width:none; scroll-padding:0; touch-action:pan-x; scroll-behavior:auto; }
  .hub-dock-track::-webkit-scrollbar{ display:none; }
  /* magnify é escrito por frame (rAF) -> transform NÃO entra na transição (senão borra).
     transição só p/ cor. A curva elástica fica na física do scroll/rAF. */
  .hub-dock-item{ flex:0 0 20vw; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:5px; height:84px; padding:10px 2px; background:none; border:0; color:#9db4d6; font:inherit; cursor:pointer;
    -webkit-tap-highlight-color:transparent; outline:none; -webkit-appearance:none; appearance:none;   /* sem quadrado de toque */
    will-change:transform; transform-origin:center center;   /* escala no lugar (não sobe) */
    transition:color .28s ease; }
  .hub-dock-item:focus, .hub-dock-item:focus-visible{ outline:none; background:none; }
  .hub-dock-ic{ position:relative; display:inline-flex; align-items:center; justify-content:center; font-size:26px; line-height:0; }
  .hub-dock-ic .hub-ic svg{ width:27px; height:27px; position:relative; z-index:1; }
  .hub-dock-lb{ font-size:10px; font-weight:600 !important; max-width:19vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .hub-dock-item.active{ color:#fff; transform:scale(1.12); }   /* só escala leve, sem subir */
  /* luz VIVA no selecionado: mesmo azul do sabre de carregamento (--blue #0b66ff) */
  .hub-dock-ic::before{ content:""; position:absolute; inset:-11px; border-radius:50%;
    background:radial-gradient(circle, rgba(11,102,255,.34) 0%, rgba(11,102,255,.14) 45%, transparent 70%);
    opacity:0; transform:scale(.6); transition:opacity .28s ease, transform .28s ease; pointer-events:none; z-index:0; }
  .hub-dock-item.active .hub-dock-ic::before{ opacity:1; transform:scale(1); }
  .hub-dock-item.active .hub-dock-ic{ filter:drop-shadow(0 0 10px rgba(11,102,255,.36)) drop-shadow(0 3px 8px rgba(11,102,255,.22)); }
  .hub-dock-item:active{ transform:scale(.92); }
  /* dica de swipe fica acima do dock */
  .hub-swipe-hint{ bottom:calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width:900px) and (prefers-reduced-motion:reduce){
  .hub-dock-item.active{ transform:none; }
}

/* ===== MODO APP mobile: frame fixo, vertical travado, encaixe dos widgets ===== */
@media (max-width:900px){
  /* app travado no zoom, mas ELÁSTICO ao arrastar (rubber-band + pull-to-refresh) */
  html,body{ height:100%; overflow:hidden !important; overscroll-behavior:auto; }
  body{ touch-action:manipulation; }
  .app{ grid-template-columns:1fr !important; height:100dvh !important; overflow:hidden !important; }
  /* miolo = ÚNICO scroller vertical (entre header fixo e dock fixo). whatsapp tem layout próprio -> excluído */
  html:not([data-scr="whatsapp"]) .main{
    height:100dvh !important; overflow-y:auto !important; overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch; overscroll-behavior:auto;
    padding:14px 14px calc(98px + env(safe-area-inset-bottom)) !important;
  }
  /* cabeçalho fixo no topo do miolo */
  html:not([data-scr="whatsapp"]) .main>.header{
    /* top negativo = o padding do miolo: o cabecalho preso encosta no topo, sem faixa de conteudo passando por cima */
    position:sticky; top:-14px; z-index:6; background:var(--bg, #f4f7fc);
    margin:-14px -14px 12px !important; padding:12px 14px !important;
    box-shadow:0 1px 0 var(--border);
  }
  /* telas da diretoria sem --bg proprio (diagnostico, limpeza, lancamento, mutirao, config-ia, rede): o cabecalho preso
     usa o fundo da pagina, senao fica transparente e o conteudo passa por baixo dele ao rolar */
  html[data-theme="dark"]:not([data-scr="whatsapp"]) .main>.header{ background:var(--bg, #0a1020); }
  /* nada estoura a largura; tabelas/kanban/funil rolam DENTRO do widget (ilha de scroll) */
  html:not([data-scr="whatsapp"]) .main img,
  html:not([data-scr="whatsapp"]) .main table{ max-width:100%; }
  html:not([data-scr="whatsapp"]) .table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  html:not([data-scr="whatsapp"]) .panel{ max-width:100%; }
  /* ===== encaixe dos widgets: 2 colunas de KPI + grades em 1 coluna ===== */
  html:not([data-scr="whatsapp"]) .kpis{ grid-template-columns:repeat(2,1fr) !important; gap:10px !important; }
  html:not([data-scr="whatsapp"]) .kpi{ padding:13px !important; }
  html:not([data-scr="whatsapp"]) .kpi .value{ font-size:22px !important; }
  html:not([data-scr="whatsapp"]) .kpi-ic{ width:34px !important; height:34px !important; }
  html:not([data-scr="whatsapp"]) .grid2,
  html:not([data-scr="whatsapp"]) .grid2b,
  html:not([data-scr="whatsapp"]) .grid3,
  html:not([data-scr="whatsapp"]) .layout,
  html:not([data-scr="whatsapp"]) .cards,
  html:not([data-scr="whatsapp"]) .res{ grid-template-columns:1fr !important; gap:12px !important; }
  html:not([data-scr="whatsapp"]) .headline h1{ font-size:21px !important; }
}

/* ===== padronização visual (status, botões, PTR, FAB, dock, whatsapp) ===== */
/* status = bolinha viva piscando (texto some, tooltip fica).
   Mira por id também: o JS de integrações reescreve className/innerHTML e apagaria a classe. */
.hub-statdot,
#statusPill, #cfg-statuspill, #b-wa, #b-ai, #b-db, #b-web{ font-size:0 !important; gap:4px !important; }
.hub-statdot .dot, .hub-statdot .d,
#statusPill .dot, #cfg-statuspill .dot, #b-wa .d, #b-ai .d, #b-db .d, #b-web .d{ animation:hubPulse 1.8s ease-in-out infinite; }
@keyframes hubPulse{ 0%,100%{ transform:scale(1); opacity:1 } 50%{ transform:scale(1.4); opacity:.5 } }

/* botões minimalistas: "＋" e ícones de linha */
.btn.btn-plus{ width:34px; padding:0 !important; justify-content:center; font-size:19px !important; line-height:1; }
.btn-ic{ display:inline-grid !important; place-items:center; }
.btn-ic .hub-ic svg{ width:16px; height:16px; }

/* pull-to-refresh (indicador no topo) */
.hub-ptr{ position:fixed; top:0; left:0; right:0; height:0; z-index:70; display:grid; place-items:center; overflow:hidden; pointer-events:none; }
.hub-ptr-spin{ width:22px; height:22px; margin-top:10px; border-radius:50%; border:2.5px solid rgba(11,102,255,.25); border-top-color:var(--blue,#0b66ff); }
.hub-ptr.ready .hub-ptr-spin, .hub-ptr.go .hub-ptr-spin{ animation:hubSpin .7s linear infinite; }
@keyframes hubSpin{ to{ transform:rotate(360deg) } }

/* FAB do agente (flutuante) */
.hub-fab{ position:fixed; right:16px; bottom:calc(20px + env(safe-area-inset-bottom)); z-index:90; width:52px; height:52px; border:0; border-radius:50%; background:var(--accent-dk,#1b306e); color:#fff; display:grid; place-items:center; cursor:pointer; box-shadow:0 10px 26px rgba(6,22,41,.4); transition:transform .16s ease; -webkit-tap-highlight-color:transparent; }
.hub-fab:hover{ transform:translateY(-2px); } .hub-fab:active{ transform:scale(.94); }
.hub-fab .hub-ic svg{ width:24px; height:24px; position:relative; z-index:1; }
/* luzinha circular fininha girando devagar, discreta */
.hub-fab::before{ content:""; position:absolute; inset:-3px; border-radius:50%; pointer-events:none; z-index:0;
  background:conic-gradient(from 0deg, transparent 0 62%, rgba(59,130,246,.15) 72%, rgba(59,130,246,.95) 84%, rgba(59,130,246,.15) 92%, transparent 100%);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation:hubFabSpin 3.4s linear infinite; }
@keyframes hubFabSpin{ to{ transform:rotate(360deg) } }
@media (prefers-reduced-motion:reduce){ .hub-fab::before{ animation:none; } }

/* box do agente (abre ao clicar no FAB) */
.hub-agent-box{ position:fixed; right:16px; bottom:calc(84px + env(safe-area-inset-bottom)); z-index:95;
  width:min(300px, calc(100vw - 32px)); background:#0f1f3a; color:#e8eefb; border:1px solid rgba(255,255,255,.10);
  border-radius:16px; box-shadow:0 20px 48px rgba(0,0,0,.42); overflow:hidden;
  opacity:0; transform:translateY(10px) scale(.97); transform-origin:bottom right; pointer-events:none;
  transition:opacity .2s ease, transform .2s cubic-bezier(.22,.61,.36,1); }
.hub-agent-box.open{ opacity:1; transform:none; pointer-events:auto; }
.hab-head{ display:flex; align-items:center; gap:9px; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.08); }
.hab-head strong{ font-size:14px; flex:1; font-weight:700; }
.hab-ic{ width:28px; height:28px; border-radius:8px; background:#0b66ff; display:grid; place-items:center; flex:none; }
.hab-ic .hub-ic svg{ width:17px; height:17px; }
.hab-x{ background:none; border:0; color:#9db4d6; font-size:20px; line-height:1; cursor:pointer; padding:0 2px; -webkit-tap-highlight-color:transparent; }
.hab-x:hover{ color:#fff; }
.hab-body{ padding:13px 14px; font-size:12.5px; color:#c3d0e6; line-height:1.55; }
.hub-agent-box.open{ width:min(380px, calc(100vw - 32px)); }
.hab-novo{ background:none; border:1px solid rgba(255,255,255,.14); color:#9db4d6; font:inherit; font-size:11px; font-weight:700; border-radius:7px; padding:3px 8px; cursor:pointer; }
.hab-novo:hover{ color:#fff; }
.hab-msgs{ height:min(380px, 52vh); overflow-y:auto; padding:12px 12px 4px; display:flex; flex-direction:column; gap:8px; overscroll-behavior:contain; }
.hab-vazio{ font-size:12.5px; color:#9db4d6; line-height:1.55; padding:4px 2px; }
.hab-m{ max-width:86%; padding:8px 11px; border-radius:13px; font-size:13px; line-height:1.5; word-wrap:break-word; }
.hab-m.eu{ align-self:flex-end; background:#0b66ff; color:#fff; border-bottom-right-radius:4px; }
.hab-m.ia{ align-self:flex-start; background:rgba(255,255,255,.07); color:#e8eefb; border-bottom-left-radius:4px; }
.hab-m.err{ color:#f5b8b8; background:rgba(220,38,38,.12); }
.hab-m.pens{ display:flex; gap:4px; padding:11px 13px; }
.hab-m.pens i{ width:6px; height:6px; border-radius:50%; background:#9db4d6; animation:habPens 1s infinite ease-in-out; }
.hab-m.pens i:nth-child(2){ animation-delay:.15s } .hab-m.pens i:nth-child(3){ animation-delay:.3s }
@keyframes habPens{ 0%,80%,100%{ opacity:.3; transform:none } 40%{ opacity:1; transform:translateY(-3px) } }
.hab-form{ display:flex; gap:8px; align-items:flex-end; padding:10px 12px 12px; border-top:1px solid rgba(255,255,255,.08); }
.hab-in{ flex:1; resize:none; min-height:38px; max-height:110px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:11px; color:#e8eefb; font:inherit; font-size:13.5px; padding:9px 11px; outline:none; }
.hab-in:focus{ border-color:#3b82f6; }
.hab-send{ width:38px; height:38px; flex:none; border:0; border-radius:11px; background:#0b66ff; color:#fff; font-size:15px; cursor:pointer; }
@media (max-width:900px){ .hub-agent-box{ bottom:calc(160px + env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion:reduce){ .hub-statdot .dot,.hub-statdot .d,.hub-ptr-spin{ animation:none !important; } }

@media (max-width:900px){
  /* dock: caixa de ícone uniforme -> proporção estável ao crescer no magnify */
  .hub-dock-ic{ width:30px; height:30px; }
  .hub-dock-ic .hub-ic{ width:100%; height:100%; }
  .hub-dock-ic .hub-ic svg{ width:26px !important; height:26px !important; }
  .hub-dock-item[data-slug="whatsapp"] .hub-ic svg{ width:23px !important; height:23px !important; }  /* WA é filled */
  /* FAB acima do dock */
  .hub-fab{ bottom:calc(104px + env(safe-area-inset-bottom)); width:48px; height:48px; }
  /* dentro da conversa do WhatsApp o dock some (padrão de app de chat) */
  body.wa-thread .hub-dock{ display:none !important; }
  body.wa-thread .hub-fab{ display:none !important; }
}

/* ===== sidebar em coluna: perfil no topo, rodapé colado embaixo ===== */
.sidebar{ display:flex; flex-direction:column; }
.sidebar .brand{ flex:0 0 auto; }
.sidebar .hub-gav{ flex:0 1 auto; }
/* perfil no topo (logo após a marca): separador embaixo em vez de acima */
.sidebar > .profile{ margin-top:2px; padding:0 4px 16px; border-top:0; border-bottom:1px solid rgba(255,255,255,.08); }
/* rodapé da sidebar: recolher (<) + sair */
/* rodape destacado (visual XORA): grupo inferior em painel translucido suave */
.hub-sb-footer{ margin-top:auto; display:flex; flex-direction:column; gap:6px; padding:10px 2px 2px; border-top:1px solid rgba(255,255,255,.08); background:none; border-radius:0; }
.hub-sb-footer > .profile{ display:flex; align-items:center; gap:10px; width:100%; margin:0; padding:0; border:0; }
.hub-sb-footer > .profile .avatar{ flex:0 0 auto; }
.hub-sb-footer > .profile > div{ min-width:0; overflow:hidden; }
.hub-sb-footer > .profile > div strong,.hub-sb-footer > .profile > div span{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hub-sb-footer .sb-toggle{ margin:0 !important; align-self:flex-start; }
.hub-sb-footer .hub-logout{ margin:0 0 0 auto !important; }
.app.sb-collapsed .hub-sb-footer{ align-items:center; gap:10px; }
.app.sb-collapsed .hub-sb-footer > .profile{ justify-content:center; }
.app.sb-collapsed .hub-sb-footer .sb-toggle{ align-self:center; }
.app.sb-collapsed .hub-sb-footer .sb-toggle,
.app.sb-collapsed .hub-sb-footer .hub-logout{ margin:0 !important; }

/* ===== olho de privacidade (borra/abre todos os valores) ===== */
.hub-eye{ flex:none; width:30px; height:30px; margin-left:auto; padding:0; border:0; background:none; color:#8aa0c4; border-radius:9px; display:grid; place-items:center; cursor:pointer; transition:color .15s, transform .12s; -webkit-tap-highlight-color:transparent; }
.hub-eye:hover{ color:#fff; }
.hub-eye:active{ transform:scale(.9); }
.hub-eye svg{ width:17px; height:17px; }
.app.sb-collapsed .hub-eye-side{ display:none; }

/* ===== valores desfocados por padrão (privacidade) + transição suave ===== */
.value,.num,.count,.kpi .value,.kpi strong,.metric strong,.donut .num{ transition:filter .28s ease; }
body.hub-values-hidden .value,
body.hub-values-hidden .num,
body.hub-values-hidden .count,
body.hub-values-hidden .kpi .value,
body.hub-values-hidden .kpi strong,
body.hub-values-hidden .metric strong,
body.hub-values-hidden .donut .num{ filter:blur(7px); -webkit-user-select:none; user-select:none; }

/* ===== legenda de carregamento (frase rápida por tela) ===== */
.hub-loadhint{ position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:9998; padding:5px 14px; border-radius:999px; background:rgba(6,22,41,.92); color:#dce8ff; font-size:12px; font-weight:600 !important; letter-spacing:.2px; box-shadow:0 6px 18px rgba(6,22,41,.28); pointer-events:none; opacity:1; transition:opacity .3s ease, transform .3s ease; white-space:nowrap; max-width:calc(100vw - 32px); overflow:hidden; text-overflow:ellipsis; }
.hub-loadhint.done{ opacity:0; transform:translateX(-50%) translateY(-6px); }
@media (prefers-reduced-motion:reduce){ .hub-loadhint{ transition:none; } }

/* ===== barra mobile: avatar + olho no topo (sidebar some no mobile) ===== */
.hub-mtop{ display:none; }
@media (max-width:900px){
  .hub-mtop{ display:flex; align-items:center; gap:9px; position:fixed; top:calc(9px + env(safe-area-inset-top)); right:12px; z-index:75; }
  .hub-mtop .hub-eye{ margin:0; width:34px; height:34px; background:rgba(6,22,41,.92); border-color:rgba(255,255,255,.16); color:#dce8ff; box-shadow:0 4px 14px rgba(6,22,41,.28); }
  .hub-mtop-av{ width:32px; height:32px; border-radius:50%; background:#0b66ff; color:#fff; display:grid; place-items:center; font-weight:800; font-size:12px; box-shadow:0 4px 14px rgba(6,22,41,.3); background-size:cover; background-position:center; }
  /* abre espaço no cabeçalho para não colidir com os controles do topo */
  html:not([data-scr="whatsapp"]) .main>.header{ padding-right:92px !important; }
}

/* =====================================================================
   REFINOS PROFISSIONAIS · camada global (v3)
   Mesma identidade (Montserrat, navy #1b306e, azul #0b66ff, cantos 16px);
   so acabamento: contraste, foco, hierarquia de botoes, modais, tablet e ritmo.
   ===================================================================== */
:root{
  --z-dock:80; --z-fab:90; --z-modal:1000; --z-toast:1100; --z-palette:1200;
  --ink-green:#0e7a50; --ink-orange:#9a5b00; --ink-red:#b42318;
  --ring:0 0 0 3px rgba(11,102,255,.28);
  --sh-modal:0 30px 70px rgba(6,25,54,.35);
  --ease-out:cubic-bezier(.2,.8,.2,1);
}

/* 1) contraste AA nos badges solidos (mesmas cores, tons mais profundos) */
.badge.green{ background:#0e7a50 !important; }
.badge.orange{ background:#b45309 !important; }
.badge.red{ background:#c62828 !important; }
.badge.cyan{ background:#0369a1 !important; }
.badge:hover{ transform:none; }
/* texto secundario legivel no KPI em destaque (fundo navy) */
.kpis > .kpi:first-child small,.kpi.featured small,
.kpis > .kpi:first-child .sub,.kpi.featured .sub,
.kpis > .kpi:first-child p,.kpi.featured p{ color:rgba(255,255,255,.82) !important; }

/* 2) foco visivel para teclado (nunca no clique do mouse) */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid #0b66ff !important; outline-offset:2px !important; box-shadow:var(--ring) !important; border-radius:8px;
}
.sidebar :where(a,button):focus-visible{ outline-color:#fff !important; box-shadow:0 0 0 3px rgba(255,255,255,.25) !important; }
.hub-dock-item:focus-visible{ outline:2px solid #fff !important; outline-offset:-4px !important; }
[role="dialog"][tabindex="-1"]:focus,[role="dialog"][tabindex="-1"]:focus-visible{ outline:none !important; }
.modal[role="dialog"][tabindex="-1"]:focus-visible{ box-shadow:var(--sh-modal) !important; }

/* 3) hierarquia de botoes: acao principal navy; Fechar/Cancelar/Voltar contornados */
.btn.hub-sec{ background:var(--panel,#fff) !important; color:var(--text,#0f172a) !important;
  border:1px solid var(--border2,#dfe7f2) !important; }
.btn.hub-sec:hover{ background:var(--panel2,#f6f9fe) !important; box-shadow:0 6px 14px rgba(15,23,42,.08); }
:root[data-theme="dark"] .btn.hub-sec{ background:transparent !important; color:#e7eefb !important; border-color:#2a3a5c !important; }
select.btn{ background:var(--panel,#fff) !important; color:var(--text,#0f172a) !important; border:1px solid var(--border2,#dfe7f2) !important; }
:root[data-theme="dark"] select.btn{ background:#111a2e !important; color:#e7eefb !important; border-color:#2a3a5c !important; }
.btn[disabled],.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none !important; box-shadow:none !important; }

/* 4) modais: sempre acima do dock/FAB, sombra profunda e entrada suave */
.modal-bg,.mbg,.drawer,.overlay{ z-index:var(--z-modal) !important; }
body.hub-modal-open :is(.hub-dock,.hub-fab,.hub-mtop,.hub-agent-box){ visibility:hidden !important; }
body.hub-modal-open{ overflow:hidden; }
.modal-bg.open .modal,.mbg.open .modal{ box-shadow:var(--sh-modal) !important; animation:hubModalIn .22s var(--ease-out); }
@keyframes hubModalIn{ from{ opacity:0; transform:translateY(10px) scale(.985); } to{ opacity:1; transform:none; } }
/* celular: modal vira bottom sheet (mais natural ao polegar) */
@media (max-width:600px){
  .modal-bg.open,.mbg.open{ align-items:flex-end !important; padding:0 !important; }
  .modal-bg.open .modal,.mbg.open .modal{ width:100% !important; max-width:100% !important; border-radius:20px 20px 0 0 !important;
    max-height:92dvh !important; overflow:auto !important; animation:hubSheetIn .26s var(--ease-out); }
  .modal-f{ position:sticky; bottom:0; background:inherit; }
}
@keyframes hubSheetIn{ from{ transform:translateY(40px); opacity:.6; } to{ transform:none; opacity:1; } }

/* 5) menu lateral: nomes completos (sem "Funil de Negóci...") */
.sidebar .nav-item .nav-label,.sidebar .hub-leaf .nav-label{ white-space:normal !important; line-height:1.25 !important; }

/* 6) tablet (901-1200px): menu vira trilho de icones em vez de empilhar no topo */
@media (min-width:901px) and (max-width:1200px){
  /* so troca a coluna do menu; altura e rolagem continuam as de cada tela (o WhatsApp depende disso) */
  .app.hub-rail{ grid-template-columns:72px 1fr !important; }
  .app.hub-rail > .sidebar{ position:sticky !important; top:0 !important; height:100vh !important; overflow-y:auto !important; display:flex !important; align-self:start !important; }
}

/* 7) numeros: algarismos tabulares e alinhados a direita em tabelas */
td.num,th.num,td[data-num],.money{ font-variant-numeric:tabular-nums; text-align:right; }

/* 8) cabecalho fixo ganha sombra ao rolar (profundidade discreta) */
.main.hub-scrolled > .header,.main.hub-scrolled > header{ box-shadow:0 8px 20px -14px rgba(15,23,42,.35); transition:box-shadow .2s ease; }

/* 9) toasts (avisos nao bloqueantes) */
.hub-toasts{ position:fixed; right:18px; bottom:18px; z-index:var(--z-toast); display:flex; flex-direction:column; gap:8px; pointer-events:none; }
.hub-toast{ pointer-events:auto; min-width:240px; max-width:380px; background:#0f1b3d; color:#fff; border-radius:12px; padding:11px 14px;
  font-size:13px; font-weight:600; box-shadow:0 14px 34px rgba(6,22,41,.35); display:flex; gap:10px; align-items:flex-start;
  animation:hubToastIn .22s var(--ease-out); border-left:4px solid #0b66ff; }
.hub-toast.ok{ border-left-color:#16a56f; } .hub-toast.err{ border-left-color:#e94242; } .hub-toast.warn{ border-left-color:#f59e0b; }
.hub-toast button{ margin-left:auto; background:none; border:0; color:#9fb4dc; font-weight:800; cursor:pointer; font-size:12px; }
.hub-toast.out{ animation:hubToastOut .18s ease forwards; }
@keyframes hubToastIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
@keyframes hubToastOut{ to{ opacity:0; transform:translateY(6px); } }
@media (max-width:900px){ .hub-toasts{ left:12px; right:12px; bottom:calc(100px + env(safe-area-inset-bottom)); } .hub-toast{ max-width:none; } }

/* 10) paleta de comandos (Ctrl/Cmd + K) */
.hub-pal-bg{ position:fixed; inset:0; z-index:var(--z-palette); background:rgba(6,16,38,.45); backdrop-filter:blur(3px);
  display:flex; align-items:flex-start; justify-content:center; padding-top:12vh; animation:hubFade .15s ease; }
@keyframes hubFade{ from{ opacity:0; } to{ opacity:1; } }
.hub-pal{ width:min(620px,calc(100vw - 24px)); background:var(--panel,#fff); color:var(--text,#0f172a); border-radius:18px;
  box-shadow:var(--sh-modal); overflow:hidden; border:1px solid var(--border,#eef2f7); animation:hubModalIn .18s var(--ease-out); }
:root[data-theme="dark"] .hub-pal{ background:#111a2e; color:#e7eefb; border-color:#1f2c48; }
.hub-pal input{ width:100%; border:0; outline:none !important; box-shadow:none !important; padding:18px 20px; font:600 15px var(--font); background:transparent; color:inherit;
  border-bottom:1px solid var(--border,#eef2f7); }
:root[data-theme="dark"] .hub-pal input{ border-bottom-color:#1f2c48; }
.hub-pal ul{ list-style:none; margin:0; padding:8px; max-height:52vh; overflow:auto; }
.hub-pal li{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:11px; cursor:pointer; font-size:13.5px; font-weight:600; }
.hub-pal li small{ margin-left:auto; color:#64748b; font-weight:600; font-size:11.5px; }
.hub-pal li .hub-pal-ic{ width:30px; height:30px; border-radius:9px; background:#1b306e; color:#fff; display:grid; place-items:center; flex:none; }
.hub-pal li .hub-pal-ic svg{ width:16px; height:16px; }
.hub-pal li[aria-selected="true"]{ background:#eaf2ff; color:#0a3a8c; }
:root[data-theme="dark"] .hub-pal li[aria-selected="true"]{ background:#1a2547; color:#fff; }
.hub-pal-empty{ padding:22px; text-align:center; color:#64748b; font-size:13px; }
.hub-pal-foot{ display:flex; gap:14px; padding:9px 16px; border-top:1px solid var(--border,#eef2f7); font-size:11px; color:#64748b; }
:root[data-theme="dark"] .hub-pal-foot{ border-top-color:#1f2c48; }
.hub-pal kbd{ font:700 10.5px var(--font); background:#eef2f7; color:#334155; border-radius:5px; padding:2px 6px; margin-right:4px; }
:root[data-theme="dark"] .hub-pal kbd{ background:#1f2c48; color:#cbd6ee; }
.hub-kbd-hint{ display:flex; align-items:center; justify-content:space-between; gap:6px; width:calc(100% - 24px); box-sizing:border-box;
  font:700 11.5px var(--font); color:#9fb4dc !important; background:rgba(255,255,255,.06) !important; cursor:pointer; padding:8px 12px;
  border-radius:10px; border:1px solid rgba(255,255,255,.10) !important; margin:10px 12px 4px; letter-spacing:.01em; transition:background .15s ease, color .15s ease; }
.hub-kbd-hint:hover{ background:rgba(255,255,255,.12) !important; color:#fff !important; }
.hub-kbd-hint b{ font-weight:800; font-size:10.5px; background:rgba(255,255,255,.10); border-radius:6px; padding:2px 6px; color:#dce8ff; }
.sb-collapsed .hub-kbd-hint{ display:none; }

/* 11) movimento: respeita quem pediu menos animacao (sistema operacional) */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ===== v3.1 · acabamento (correcoes apontadas na revisao) ===== */
/* botoes: <a>, <label> e <button> com .btn identicos (texto centrado, mesma caixa, sem MAIUSCULAS
   herdadas dos rotulos de formulario). display sem !important para nao reexibir botoes que as telas
   escondem via style.display; [hidden] continua escondendo. */
.btn:not(select){ display:inline-flex; align-items:center; justify-content:center; gap:6px; vertical-align:middle;
  line-height:1.1 !important; text-transform:none !important; letter-spacing:0 !important; white-space:nowrap;
  text-decoration:none !important; box-sizing:border-box; cursor:pointer; }
.btn[hidden]{ display:none !important; }
label.btn{ margin:0 !important; font-weight:700 !important; }

/* menu recolhido: marca vira so o simbolo (sem o cartao em degrade espremido) */
.app.sb-collapsed .sidebar .brand{ background:none !important; box-shadow:none !important; padding:0 !important;
  border-radius:0 !important; gap:0 !important; margin-bottom:18px !important; align-items:center !important; }
.app.sb-collapsed .sidebar .brand img,.app.sb-collapsed .sidebar .brand .logo{ width:40px !important; height:40px !important; border-radius:12px !important; }
/* menu recolhido: rodape em coluna, centralizado (avatar, sair e recolher sem estourar a coluna) */
.app.sb-collapsed .hub-sb-footer{ padding:12px 0 2px !important; }
.app.sb-collapsed .hub-sb-footer > .profile{ flex-direction:column !important; align-items:center !important; gap:8px !important; }
.app.sb-collapsed .hub-sb-footer > .profile > div:not(.avatar){ display:none !important; }
.app.sb-collapsed .hub-sb-footer > .profile .avatar{ width:36px !important; height:36px !important; font-size:12px !important; }
.app.sb-collapsed .hub-sb-footer .hub-logout{ margin:0 !important; }
.app.sb-collapsed .sidebar{ overflow-x:hidden !important; }
/* rodape expandido: nome inteiro (ate 2 linhas em vez de "Gabriel Pere..."); icones mais compactos */
.app:not(.sb-collapsed) .hub-sb-footer > .profile{ gap:8px !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile > div{ flex:1 1 auto; }
.app:not(.sb-collapsed) .hub-sb-footer .hub-eye-side,.app:not(.sb-collapsed) .hub-sb-footer .hub-logout{ width:28px !important; height:28px !important; }
.hub-sb-footer > .profile > div strong{ font-size:12.5px; line-height:1.2; white-space:normal !important; overflow-wrap:anywhere;
  display:-webkit-box !important; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.hub-sb-footer > .profile > div span{ color:#8fa6cf !important; font-weight:600; font-size:11px; }
/* indicadores: a grade se ajusta aos cards VISIVEIS (o perfil esconde alguns); sem buraco a direita.
   minimo de 150px mantem 2 colunas no celular e ate 7 no desktop largo */
.main .kpis{ grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) !important; }
.main .hub-solo{ grid-column:1 / -1 !important; }
/* sino no cabecalho do WhatsApp (tela sem .icon-btn): mesmo formato dos botoes do cabecalho */
html[data-scr="whatsapp"] .hub-bell:not(.hub-bell-fixed){ position:relative; flex:none; width:34px; height:34px; padding:0; display:inline-grid; place-items:center;
  border-radius:10px; background:var(--panel,#fff); border:1px solid var(--border2,#dfe7f2); color:var(--heading,#0b1830); cursor:pointer; box-shadow:none; }
html[data-scr="whatsapp"] .hub-bell:not(.hub-bell-fixed) svg{ width:17px; height:17px; }
:root[data-theme="dark"] html[data-scr="whatsapp"] .hub-bell:not(.hub-bell-fixed),
html[data-theme="dark"][data-scr="whatsapp"] .hub-bell:not(.hub-bell-fixed){ background:#111a2e; border-color:#2a3a5c; color:#e7eefb; }
html[data-scr="whatsapp"] .hub-bell:not(.hub-bell-fixed) .hub-bell-badge{ top:-5px; right:-5px; }
/* WhatsApp: o botao flutuante do assistente sobe acima da caixa de mensagem (nao cobre o Enviar) */
@media (min-width:901px){ html[data-scr="whatsapp"] .hub-fab{ bottom:124px !important; } }
.main .badge.hub-vazio{ display:none !important; }
/* WhatsApp: compositor (refino 15/10/2026) -> botoes do mesmo tamanho; Enviar verde com aviao de papel desenhado
   (sem a seta de texto, que saia pesada e torta); desabilitado em cinza claro */
html[data-scr="whatsapp"] .composer-line{ gap:6px !important; }
html[data-scr="whatsapp"] .composer-ic{ width:40px !important; height:40px !important; display:grid !important; place-items:center !important; color:var(--muted) !important; }
html[data-scr="whatsapp"] .composer-ic svg{ width:20px; height:20px; }
html[data-scr="whatsapp"] #waSend{ width:42px !important; height:42px !important; min-width:42px; padding:0 !important; border:0 !important; border-radius:50% !important; font-size:0 !important;
  background:#00a884 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4l3 8-3 8 17-8z'/%3E%3Cpath d='M7 12h14'/%3E%3C/svg%3E") 56% 50% / 19px 19px no-repeat !important;
  box-shadow:0 4px 12px rgba(0,168,132,.28); transition:background-color .15s ease, transform .12s ease, box-shadow .15s ease; }
html[data-scr="whatsapp"] #waSend::after{ content:none !important; }
html[data-scr="whatsapp"] #waSend:hover:not(:disabled){ background-color:#008f6f !important; transform:translateY(-1px); }
html[data-scr="whatsapp"] #waSend:active:not(:disabled){ transform:scale(.94); }
html[data-scr="whatsapp"] #waSend:disabled{ background-color:var(--border2,#dfe7f2) !important; box-shadow:none; opacity:.75; cursor:default; }
/* WhatsApp: cabecalho da conversa -> nome em 1 linha; se os botoes nao couberem, descem juntos para a linha de baixo */
html[data-scr="whatsapp"] .chat-header{ flex-wrap:wrap !important; row-gap:8px !important; }
html[data-scr="whatsapp"] .chat-header > .client{ flex:1 1 220px !important; min-width:0 !important; }
html[data-scr="whatsapp"] .chat-header > .client *{ min-width:0; }
html[data-scr="whatsapp"] .chat-header > .client strong,html[data-scr="whatsapp"] .chat-header > .client span,
html[data-scr="whatsapp"] .chat-header > .client small{ white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; display:block; }
html[data-scr="whatsapp"] .chat-header > .chat-actions{ flex:0 1 auto !important; flex-wrap:nowrap !important; margin-left:auto; }

/* ===== uma cor por perfil (selo solido, letra branca): Administrador, Corretores e demais listas ===== */
.badge[class*="pf-"]{ color:#fff !important; border:0; }
.badge.pf-diretoria{ background:#1b306e !important; } .badge.pf-admin{ background:#2563eb !important; } .badge.pf-gestor{ background:#0e7490 !important; }
.badge.pf-corretor{ background:#16a34a !important; } .badge.pf-autonomo{ background:#b7791f !important; } .badge.pf-estagiario{ background:#0891b2 !important; }
.badge.pf-advogado{ background:#7c3aed !important; } .badge.pf-associado{ background:#ea580c !important; } .badge.pf-financeiro{ background:#0f766e !important; }
.badge.pf-marketing{ background:#db2777 !important; } .badge.pf-outro{ background:#64748b !important; }

/* ===== rodape da barra lateral (pedido do cliente, 15/10/2026) =====
   menu aberto: cartao com foto + nome/cargo numa linha e, embaixo, tres botoes iguais com legenda
   (Valores, Seguranca, Sair); "Recolher menu" como botao de texto. Menu recolhido: segue como antes. */
.app:not(.sb-collapsed) .hub-sb-footer{ gap:8px !important; padding:12px 2px 4px !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile{
  display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:10px 6px !important;
  padding:10px !important; border-radius:14px !important; background:rgba(255,255,255,.045) !important; border:1px solid rgba(255,255,255,.07) !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .avatar{ width:38px !important; height:38px !important; font-size:13px !important; flex:none !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile > div:not(.avatar){ flex:1 1 calc(100% - 48px) !important; min-width:0 !important; overflow:hidden !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile > div:not(.avatar) strong{ display:block !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; font-size:13.5px !important; line-height:1.25 !important; color:#fff !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile > div:not(.avatar) span{ display:block !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; font-size:11.5px !important; color:#8fa6cc !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-eye-side,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-seg,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-logout{
  flex:0 0 calc((100% - 12px) / 3) !important; min-width:0 !important; max-width:none !important; width:auto !important; padding:0 2px !important; height:46px !important; margin:0 !important; display:flex !important; flex-direction:column !important;
  align-items:center !important; justify-content:center !important; gap:3px !important; border-radius:10px !important; border:0 !important;
  background:rgba(255,255,255,.05) !important; color:#b9c8e4 !important; text-decoration:none !important; font:inherit !important; cursor:pointer; transition:background .15s ease,color .15s ease; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-eye-side svg,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-seg svg,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-logout svg{ width:17px !important; height:17px !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-eye-side::after{ content:"Valores"; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-seg::after{ content:"Segurança"; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-logout::after{ content:"Sair"; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-eye-side::after,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-seg::after,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-logout::after{ font-size:10px; font-weight:700; letter-spacing:0; line-height:1; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-eye-side:hover,
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-seg:hover{ background:rgba(255,255,255,.1) !important; color:#fff !important; }
.app:not(.sb-collapsed) .hub-sb-footer > .profile .hub-logout:hover{ background:rgba(255,99,99,.14) !important; color:#ffb4b4 !important; }
.app:not(.sb-collapsed) .hub-sb-footer .sb-toggle{
  width:100% !important; height:30px !important; margin:0 !important; display:flex !important; align-items:center !important; justify-content:center !important; gap:6px !important;
  border-radius:9px !important; color:#7f97bf !important; font:inherit !important; font-size:11.5px !important; font-weight:700 !important; }
.app:not(.sb-collapsed) .hub-sb-footer .sb-toggle::after{ content:"Recolher menu"; }
.app:not(.sb-collapsed) .hub-sb-footer .sb-toggle:hover{ background:rgba(255,255,255,.06) !important; color:#dce8ff !important; }

/* cor do perfil pelo atributo data-perfil: independe da ordem de carregamento dos scripts */
.badge[data-perfil]{ color:#fff !important; border:0; background:#64748b !important; }
.badge[data-perfil="diretoria"],.badge[data-perfil="diretor"]{ background:#1b306e !important; }
.badge[data-perfil="admin"],.badge[data-perfil="administrador"]{ background:#2563eb !important; }
.badge[data-perfil="gestor"],.badge[data-perfil="gerente"]{ background:#0e7490 !important; }
.badge[data-perfil="corretor"]{ background:#16a34a !important; }
.badge[data-perfil="corretor_autonomo"],.badge[data-perfil="autonomo"]{ background:#b7791f !important; }
.badge[data-perfil="estagiario"]{ background:#0891b2 !important; }
.badge[data-perfil="advogado"],.badge[data-perfil="juridico"]{ background:#7c3aed !important; }
.badge[data-perfil="associado"]{ background:#ea580c !important; }
.badge[data-perfil="financeiro"]{ background:#0f766e !important; }
.badge[data-perfil="marketing"]{ background:#db2777 !important; }

/* Mãozinha em tudo que é clicável (padrão do sistema, 10/11/2026). :where() deixa a regra fraca: uma tela que
   precise de outro cursor (desabilitado, arrastar) continua mandando. */
:where(button, [role="button"], [role="tab"], [role="option"], [role="menuitem"], [role="switch"], a[href], summary, select,
  label[for], label:has(> input[type="checkbox"]), label:has(> input[type="radio"]), input[type="checkbox"], input[type="radio"],
  input[type="file"], input[type="color"], input[type="range"], .btn, [data-a], [data-href], [data-acao], [onclick], td.open, tr.au-row, tbody tr[data-id], .clicavel):not(:disabled):not([aria-disabled="true"]) { cursor: pointer; }
:where(button, select, input, .btn):disabled { cursor: not-allowed; }
