/* ===========================================================================
 * Painel de Conversas WhatsApp. Vocatel (MOCKUP) · v2 PREMIUM
 * Tema claro, menu no topo, paleta da marca (grafite + ciano).
 * ========================================================================= */

:root {
  /* marca */
  --brand:        #1592b4;   /* ciano "Conectando Empresas" (sóbrio) */
  --brand-strong: #0c7591;
  --brand-mid:    #3aa9c6;
  --brand-soft:   #eaf4f8;
  --brand-soft-2: #d7e9f0;
  --ink:          #1e293b;   /* grafite "VOCATEL" */
  --ink-2:        #44505f;
  --muted:        #8b96a5;

  /* superfícies */
  --bg:        #eef1f5;
  --bg-2:      #f7f9fb;
  --surface:   #ffffff;
  --line:      #e6eaf0;
  --line-soft: #eff2f6;

  /* estados (sóbrios) */
  --green:  #0f9d77;  --green-soft: #e7f4ef;
  --red:    #d9596a;  --red-soft:   #f9ecee;
  --amber:  #c98a2b;  --amber-soft: #f7f0e2;
  --purple: #6a5acd;  --purple-soft:#ebe9f7;
  --blue:   #3f6fd1;

  /* bolhas */
  --bubble-out: #def4fb;  /* tint ciano (premium) */
  --bubble-in:  #ffffff;
  --thread-bg:  #f1f5f9;

  --r-lg: 14px; --r-md: 11px; --r-sm: 8px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 2px 8px rgba(16,24,40,.06);
  --sh-3: 0 16px 40px rgba(16,24,40,.13);
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c2d1; background-clip: content-box; }

/* ---- App shell --------------------------------------------------------- */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ============ TOP NAV ============ */
.topnav {
  height: var(--nav-h); flex-shrink: 0; background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  box-shadow: 0 1px 0 rgba(16,24,40,.02); z-index: 20;
}
/* "Central de Conversas" ao lado da logo é bonito, mas em tela de trabalho a
   busca vale mais: o texto sai antes de a busca ficar estreita. */
@media (max-width: 1560px) { .topnav .logo .sys, .topnav .logo .divider { display: none; } }
.topnav .logo { display: flex; align-items: center; flex-shrink: 0; cursor: pointer; }
.topnav .logo:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px; }
.topnav .logo img { height: 44px; width: auto; display: block; }
/* Logo nova (SVG da marca, mesma do site vocatel.com.br): "Chat" em navy no tema claro e em branco no escuro. */
.topnav .logo img.logo-dark { display: none; }
body.dark .topnav .logo img.logo-light { display: none; }
body.dark .topnav .logo img.logo-dark { display: block; }
.topnav .logo .divider { width: 1px; height: 38px; background: var(--line); margin: 0 6px 0 22px; }
.topnav .logo .sys { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .2px; line-height: 1.1; }
.topnav .logo .sys small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

/* O menu não encolhe: nome de aba cortado pela metade fica pior que busca curta.
   A busca fica com a folga que sobrar da barra. */
.nav { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.nav-item {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex-shrink: 0;
  padding: 8px 11px; border-radius: 10px; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; position: relative;
}
@media (max-width: 1620px) { .nav-item { padding: 8px 9px; font-size: 13px; gap: 6px; } }
.nav-item .lbl { white-space: nowrap; }
.nav-item svg { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { background: var(--bg-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
/* item que abre fora do Lemon (Operador, painel do PABX): setinha discreta de "abre em janela" */
.nav-item .nav-ext-ico { display: inline-flex; margin-left: -2px; }
.nav-item .nav-ext-ico svg { width: 11px; height: 11px; opacity: .55; }
.nav-item.nav-ext:hover .nav-ext-ico svg { opacity: .9; }
.nav-item .badge-count {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-item.active .badge-count { background: var(--red); }

.topnav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* O rótulo "Tempo real" só aparece quando há largura de sobra: abaixo disso fica
   o sinal, e o cartão do hover conta o resto. A busca é quem ganha o espaço. */
.live-wrap { position: relative; flex-shrink: 0; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--green);
  background: var(--green-soft); padding: 7px 11px; border-radius: 20px; cursor: default;
}
.live-pill:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.live-pill .live-t { display: none; }
@media (min-width: 1660px) { .live-pill .live-t { display: inline; } }
.live-tip { top: calc(100% + 10px); right: 0; width: 236px; }
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; }
.live-pill .dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: .5; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
.mock-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--amber);
  background: var(--amber-soft); padding: 6px 11px; border-radius: 8px;
}
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip .u-name { font-size: 13px; font-weight: 600; line-height: 1.1; }
.user-chip .u-role { font-size: 11px; color: var(--muted); }

/* ---- Conteúdo ---------------------------------------------------------- */
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-wrap { flex: 1; min-height: 0; overflow: auto; padding: 26px 30px; }
.view { display: none; }
.view.active { display: block; animation: viewIn .28s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
body.view-conversas .view-wrap { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
body.view-conversas #view-conversas.active { display: flex; flex: 1; min-height: 0; }
/* dashboard: preenche a tela, sem barra de rolagem */
body.view-dashboard .view-wrap { padding: 16px 18px; overflow: hidden; display: flex; flex-direction: column; }
body.view-dashboard #view-dashboard.active { display: flex; flex: 1; min-height: 0; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 23px; font-weight: 800; margin: 0; letter-spacing: -.4px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---- Avatares ---------------------------------------------------------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .3px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }

/* =======================================================================
 * DASHBOARD
 * ===================================================================== */
/* layout bento que preenche a tela (sem rolagem) */
.dash {
  flex: 1; min-height: 0; display: grid; gap: 14px;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr);
}
.ai-exec { grid-column: 1 / -1; grid-row: 1; }
.kpis { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.chart-panel   { grid-column: 1; grid-row: 3 / 5; }
.actions-panel { grid-column: 2 / 4; grid-row: 3; }
.rank-panel    { grid-column: 2; grid-row: 4; }
.lines-panel   { grid-column: 3; grid-row: 4; }

/* cartões KPI (compactos) */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 15px; box-shadow: var(--sh-1); overflow: hidden;
  transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; justify-content: center;
}
.card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.card .card-top { display: flex; align-items: center; gap: 11px; }
.card .card-ico {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong); flex-shrink: 0;
}
.card .card-ico svg { width: 19px; height: 19px; }
.card .card-ico.ic-green { background: var(--green-soft); color: var(--green); }
.card .card-ico.ic-amber { background: var(--amber-soft); color: var(--amber); }
.card .card-ico.ic-red   { background: var(--red-soft);   color: var(--red); }
.card .card-label { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.card .card-value { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: -.5px; margin-top: 2px; }
.card .card-foot { font-size: 11.5px; margin-top: 9px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.card .card-foot .up { color: var(--green); font-weight: 700; }
.card .card-foot .down { color: var(--red); font-weight: 700; }

/* cartão "Ativas × Passivas hoje", quem mandou a 1ª mensagem do dia */
.card .card-dual { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; white-space: nowrap; }
.card .card-dual .card-value { font-size: 21px; margin-top: 0; }
.card .card-dual .cd-a .card-value { color: var(--brand-strong); }
.card .card-dual .cd-p .card-value { color: var(--green); }
.card .card-dual .cd-lbl { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.card .card-dual .cd-sep { color: var(--line); font-weight: 700; }
.card .split-bar { height: 6px; border-radius: 3px; background: var(--green); overflow: hidden; margin-top: 10px; }
.card .split-bar > span { display: block; height: 100%; background: var(--brand-strong); transition: width .6s ease; }
.card .split-bar.empty { background: var(--line-soft); padding: 0; }   /* .empty genérico (estado vazio) dava 56 px de respiro à barra */

/* Canal oficial (Meta Cloud API) */
.badge-oficial {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
  background: var(--green-soft); color: var(--green); border: 1px solid currentColor;
}
.badge-srv { display:inline-block; vertical-align:middle; margin-left:6px; font-size:9px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; padding:2px 7px; border-radius:20px; background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; }
.nc-oficial-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); text-align: center; }
/* portfólio (BM) da Meta da linha oficial, 30/10/2026 */
.nc-bm { margin-top: 12px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); min-width: 0; }
.nc-bm svg { width: 15px; height: 15px; flex: none; }
.nc-bm span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-bm b { color: var(--ink); font-weight: 600; }
.nc-bm + .nc-oficial-note { margin-top: 8px; }
/* histórico de ligações do celular (03/11/2026) */
.nc-hist { margin-top: 12px; display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.nc-hist-ico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--surface); box-shadow: var(--sh-1); }
.nc-hist-ico svg { width: 14px; height: 14px; }
.nc-hist.sem { background: linear-gradient(135deg, var(--amber-soft), transparent 140%); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); color: var(--ink-2, var(--ink)); }
.nc-hist.sem .nc-hist-ico { color: var(--amber); }
.nc-hist.sem b { display: block; color: var(--ink); font-weight: 700; font-size: 12.5px; margin-bottom: 2px; }
.nc-hist.sem span b { display: inline; font-size: inherit; margin: 0; }
.nc-hist.ok { align-items: center; padding: 6px 10px; color: var(--muted); background: var(--bg); }
.nc-hist.ok .nc-hist-ico { width: 22px; height: 22px; color: var(--green, var(--brand)); box-shadow: none; }
.b-tick { font-size: 11px; margin-left: 4px; color: var(--muted); letter-spacing: -1.5px; }
.b-tick.lido { color: #53bdeb; }
.b-tick.falhou { color: var(--red); letter-spacing: 0; }
/* Motivo da não entrega à vista, dentro do balão (Wilton, 23/09/2026) */
.bubble .b-falhou {
  clear: both; margin-top: 6px; padding: 6px 9px; border-radius: 9px;
  background: var(--red-soft); color: var(--red);
  font-size: 11.5px; line-height: 1.35; font-weight: 500; white-space: normal;
}
/* ── Conectar número: escolha de canal (cards premium) ── */
.cnx-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; margin-top: 12px; font-family: inherit; color: var(--ink);
  position: relative; overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
.cnx-opt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px 70px at 0% 0%, var(--brand-soft), transparent 65%);
  transition: opacity .18s;
}
.cnx-opt:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-1px); }
.cnx-opt:hover::after { opacity: .85; }
.cnx-opt:active { transform: scale(.995); }
.co-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(0,0,0,.10);
}
.co-ico svg { width: 24px; height: 24px; }
.co-ico.qr   { background: linear-gradient(135deg, #25d366, #128c7e); }
.co-ico.meta { background: linear-gradient(135deg, #0064e0, #0082fb); }
.cnx-opt .co-tx { flex: 1; min-width: 0; }
.cnx-opt .co-tt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.chip-meta {
  font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 2.5px 8px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(135deg, #0064e0, #0082fb); color: #fff;
  box-shadow: 0 2px 6px rgba(0,100,224,.35);
}
.cnx-opt .co-sub { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.cnx-opt .co-arrow { color: var(--muted); flex-shrink: 0; transition: transform .15s, color .15s; }
.cnx-opt .co-arrow svg { width: 16px; height: 16px; }
.cnx-opt:hover .co-arrow { transform: translateX(3px); color: var(--brand-strong); }

/* ── Conectar número: formulário da API Oficial ── */
.mt-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(0,100,224,.09), rgba(0,130,251,.04));
  border: 1px solid rgba(0,130,251,.28);
}
body.dark .mt-head { background: linear-gradient(135deg, rgba(0,100,224,.22), rgba(0,130,251,.08)); }
.mt-head .co-ico { width: 38px; height: 38px; border-radius: 11px; }
.mt-head .co-ico svg { width: 21px; height: 21px; }
.mt-head .mh-t b { display: block; font-size: 13.5px; }
.mt-head .mh-t span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.mt-form .m-field { margin-bottom: 11px; }
.mt-form .m-field label { font-size: 12px; }
.mt-form .m-field label small { font-weight: 500; opacity: .6; }
.mt-form .m-field input { padding: 10px 12px; font-size: 13.5px; }
.mt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .mt-grid { grid-template-columns: 1fr; gap: 0; } }
.mt-vault {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 12px 14px 4px; margin: 4px 0 12px; background: var(--bg-2);
}
.mt-vault .mv-t {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px;
}
.mt-vault .mv-t svg { width: 13px; height: 13px; opacity: .7; }
.mt-vault .mv-sub { font-size: 11px; color: var(--muted); margin: -6px 0 10px 20px; }
/* guia embutido (tutorial em 5 passos, sem sair do modal) */
.mt-guia {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); margin-bottom: 12px; overflow: hidden;
}
.mt-guia summary {
  cursor: pointer; list-style: none; padding: 11px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
  transition: background .15s;
}
.mt-guia summary::-webkit-details-marker { display: none; }
.mt-guia summary:hover { background: var(--line-soft); }
.mt-guia summary::after { content: '▾'; margin-left: auto; opacity: .5; transition: transform .18s; }
.mt-guia[open] summary::after { transform: rotate(180deg); }
.mg-badge {
  font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 2.5px 8px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(135deg, #0064e0, #0082fb); color: #fff;
}
.mg-steps { margin: 0; padding: 4px 16px 14px 34px; }
.mg-steps li {
  font-size: 12px; color: var(--ink-2); line-height: 1.55;
  padding: 7px 0; border-bottom: 1px dashed var(--line-soft);
}
.mg-steps li:last-child { border-bottom: 0; }
.mg-steps li::marker { font-weight: 800; color: var(--brand-strong); }
.mg-link {
  display: inline-flex; align-items: center; margin-left: 8px;
  font-size: 11px; font-weight: 700; color: var(--brand-strong);
  text-decoration: none; white-space: nowrap;
  padding: 2px 8px; border: 1px solid var(--brand); border-radius: 20px;
  transition: background .15s, color .15s;
}
.mg-link:hover { background: var(--brand-strong); color: #fff; }

.mt-success { text-align: center; padding: 8px 0 2px; }
.mt-success .ok-ball {
  width: 64px; height: 64px; border-radius: 50%; margin: 2px auto 12px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #16b364, #0d9488);
  box-shadow: 0 10px 26px rgba(22,179,100,.38);
  animation: mtPop .4s cubic-bezier(.2,.9,.3,1.4);
}
.mt-success .ok-ball svg { width: 30px; height: 30px; }
.mt-success .ok-num { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.mt-success .ok-verif { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mt-success .ok-lines { text-align: left; margin-top: 14px; }
@keyframes mtPop { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1); margin-bottom: 22px;
}
.panel-head { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 9px; }
.panel-head h2 { font-size: 14px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.panel-head .panel-sub { font-size: 12px; color: var(--muted); }
.panel-head .head-spacer { flex: 1; }
.panel-body { padding: 16px; }

/* painéis do dashboard preenchem a célula e rolam por dentro */
.dash .panel { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.dash .panel .panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 13px 15px; }
.chart-panel .panel-body { overflow: hidden; }   /* gráfico não rola */

/* gráfico de área (linha), profissional, interativo */
.chart { position: relative; height: 100%; width: 100%; }
.ch-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch-grid line { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-area { fill: url(#chGrad); opacity: 0; animation: chFade .7s ease .25s forwards; }
.ch-line { fill: none; stroke: var(--brand); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: chDraw .9s ease forwards; }
@keyframes chDraw { to { stroke-dashoffset: 0; } }
@keyframes chFade { to { opacity: 1; } }
.ch-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--brand); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(12,117,145,.28); opacity: 0; animation: chFade .35s ease .6s forwards; transition: transform .12s; z-index: 2; pointer-events: none; }
.ch-dot.active { transform: translate(-50%, -50%) scale(1.6); }
.ch-val { position: absolute; transform: translate(-50%, -200%); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; opacity: 0; animation: chFade .35s ease .6s forwards; pointer-events: none; }
.ch-lbl { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 600; pointer-events: none; }
.ch-hz { position: absolute; top: 0; bottom: 16px; transform: translateX(-50%); cursor: pointer; z-index: 3; }
.ch-cross { position: absolute; top: 6px; bottom: 22px; width: 1px; background: var(--brand); opacity: 0; transform: translateX(-50%); transition: opacity .12s; }
.ch-cross.show { opacity: .35; }
.ch-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -160%); white-space: nowrap; opacity: 0; transition: opacity .12s; box-shadow: var(--sh-2); z-index: 6; }
.ch-tip.show { opacity: 1; }
.ch-tip b { color: var(--brand-mid); }

/* Central de Ações com rolagem própria */
.actions-panel .panel-body { overflow-y: auto; }

/* ranking (compacto) */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rank-row + .rank-row { border-top: 1px solid var(--line-soft); }
.rank-row .rank-id { flex: 1; min-width: 0; }
.rank-row .rank-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .rank-meta { font-size: 11px; color: var(--muted); }
.rank-row .rank-num { font-size: 15px; font-weight: 800; }

/* Central de Ações (compacto no dashboard) */
.dash .insight { padding: 9px 0; gap: 11px; }
.dash .insight .ins-ico { width: 34px; height: 34px; }
.dash .insight .ins-ico svg { width: 17px; height: 17px; }
.dash .insight .ins-title { font-size: 13px; }
.dash .insight .ins-sub { font-size: 11.5px; }
.dash .insight .ins-go { padding: 7px 12px; font-size: 12px; }

/* Linhas WhatsApp (resumo + só desconectadas) */
.lines-summary { display: flex; gap: 10px; margin-bottom: 10px; }
.ls-stat { flex: 1; border-radius: 11px; padding: 9px 12px; }
.ls-stat.ok  { background: var(--green-soft); }
.ls-stat.off { background: var(--red-soft); }
.ls-stat .ls-n { font-size: 22px; font-weight: 800; line-height: 1; }
.ls-stat.ok .ls-n { color: var(--green); }
.ls-stat.off .ls-n { color: var(--red); }
.ls-stat .ls-l { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.ls-h { font-size: 11px; color: var(--muted); font-weight: 600; margin: 2px 0 7px; }
.lines-list { display: flex; flex-wrap: wrap; gap: 7px; overflow: hidden; }
.num-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.num-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2);
}
.num-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.num-chip.on .dot { background: var(--green); }
.num-chip.off { color: var(--red); border-color: #f8d6dc; background: var(--red-soft); }
.num-chip.off .dot { background: var(--red); }

/* =======================================================================
 * CONVERSAS (3 colunas)
 * ===================================================================== */
.conv { display: grid; grid-template-columns: 360px 1fr 320px; flex: 1; min-height: 0; background: var(--surface); }
/* painel de detalhes recolhido (empurrado pro lado) */
body.details-collapsed .conv { grid-template-columns: 360px 1fr; }
body.details-collapsed .conv-details { display: none; }

.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.filters { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search-box input {
  width: 100%; padding: 11px 13px 11px 40px; border: 1px solid var(--line); border-radius: 11px;
  font-size: 14px; outline: none; background: var(--bg-2); color: var(--ink); transition: .15s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }
.filter-row { display: flex; gap: 10px; }
.filter-row select {
  flex: 1; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px;
  font-size: 12.5px; background: var(--bg-2); color: var(--ink-2); outline: none; transition: .15s;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
.filter-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background-color: #fff; }
.filter-count { font-size: 11.5px; color: var(--muted); padding: 0 2px; font-weight: 500; }

.list-scroll { overflow-y: auto; flex: 1; }
.conv-item {
  display: flex; gap: 13px; padding: 14px 16px; cursor: pointer; align-items: center;
  border-left: 3px solid transparent; transition: background .12s;
}
.conv-item + .conv-item { border-top: 1px solid var(--line-soft); }
.conv-item:hover { background: var(--bg-2); }
.conv-item.active { background: var(--brand-soft); border-left-color: var(--brand); }
.conv-item .ci-main { flex: 1; min-width: 0; }
.conv-item .ci-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.conv-item .ci-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .ci-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.conv-item .ci-last { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv-item .ci-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.conv-item .ci-agent { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.conv-item .ci-agent .agent-dot { width: 7px; height: 7px; border-radius: 50%; }
.conv-item .unread {
  margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* thread */
.conv-thread { display: flex; flex-direction: column; min-height: 0; background: var(--thread-bg); }
.thread-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 13px 20px; display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.thread-head .th-name { font-weight: 700; font-size: 15.5px; }
.thread-head .th-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.thread-head .th-tags { margin-left: auto; display: flex; gap: 6px; }
.thread-scroll { flex: 1; overflow-y: auto; padding: 22px 9%; }
.day-sep { text-align: center; margin: 16px 0; }
.day-sep span { background: #fff; color: var(--ink-2); font-size: 11.5px; font-weight: 600; padding: 5px 14px; border-radius: 16px; box-shadow: var(--sh-1); }
.bubble {
  max-width: 70%; padding: 9px 13px 7px; border-radius: 14px; margin-bottom: 9px;
  font-size: 14px; line-height: 1.45; box-shadow: var(--sh-1); position: relative; word-wrap: break-word;
}
.bubble.in  { background: var(--bubble-in); border-top-left-radius: 4px; margin-right: auto; }
.bubble.out { background: var(--bubble-out); border-top-right-radius: 4px; margin-left: auto; }
.bubble .b-time { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: right; }
.bubble.is-apagada { border: 1px dashed var(--red); }
.b-flag.apagada { font-size: 10.5px; font-weight: 700; color: var(--red); display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.b-flag.apagada svg { width: 13px; height: 13px; }
.b-edit { color: var(--amber); font-weight: 600; }
.bubble .b-agent { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.thread-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; gap: 14px; padding: 40px; }
.thread-empty .te-ico { width: 84px; height: 84px; border-radius: 26px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.thread-empty .te-ico svg { width: 40px; height: 40px; }
.thread-empty strong { color: var(--ink); font-size: 15px; }
.thread-footnote { background: var(--surface); border-top: 1px solid var(--line); padding: 11px 20px; font-size: 12px; color: var(--muted); text-align: center; flex-shrink: 0; }

/* detalhes */
.conv-details { border-left: 1px solid var(--line); overflow-y: auto; background: var(--surface); padding: 22px; position: relative; }
.detail-collapse { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 9px; background: var(--bg-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; z-index: 2; }
.detail-collapse:hover { background: var(--brand-soft); color: var(--brand-strong); }
.detail-collapse svg { width: 16px; height: 16px; }
.detail-empty { color: var(--muted); font-size: 13px; text-align: center; padding-top: 50px; }
.detail-card { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.detail-card .avatar { margin: 0 auto 12px; }
.detail-card .d-name { font-size: 18px; font-weight: 700; }
.detail-card .d-phone { font-size: 13px; color: var(--muted); margin-top: 3px; }
.detail-block { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.detail-block .d-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.detail-block .d-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 5px 0; }
.detail-block .d-line .d-k { color: var(--ink-2); }
.detail-block .d-line .d-v { font-weight: 600; text-align: right; }

.btn-ai {
  width: 100%; margin: 16px 0 8px; padding: 12px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 6px 16px rgba(21,168,204,.3); transition: filter .15s, transform .1s;
}
.btn-ai:hover { filter: brightness(1.07); }
.btn-ai:active { transform: scale(.98); }
.btn-ai svg { width: 17px; height: 17px; }
.ai-summary { background: var(--brand-soft); border: 1px solid var(--brand-soft-2); border-radius: 12px; padding: 14px; font-size: 13px; line-height: 1.55; color: var(--ink); margin-top: 6px; }
.ai-summary .ai-head { font-size: 10.5px; font-weight: 800; color: var(--brand-strong); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ai-summary .ai-head svg { width: 15px; height: 15px; }

/* tags */
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--bg); color: var(--ink-2); }
.tag.quente   { background: var(--red-soft);   color: #d83a52; }
.tag.frio     { background: #eaf2ff;           color: var(--blue); }
.tag.agendado { background: var(--green-soft);  color: var(--green); }
.tag.video    { background: var(--purple-soft); color: var(--purple); }
.tag.documentos { background: var(--amber-soft);color: #c97e10; }
.tag.perdido  { background: var(--bg);          color: var(--muted); }
.tag.reagendar{ background: var(--amber-soft);  color: #c2410c; }
.tag.novo     { background: var(--brand-soft);  color: var(--brand-strong); }

/* =======================================================================
 * ATENDENTES (tabela)
 * ===================================================================== */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 13px 18px; border-bottom: 1px solid var(--line); font-weight: 700; background: var(--bg-2); }
.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--bg-2); }
.cell-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-pill.online  { color: var(--green); } .status-pill.online .dot { background: var(--green); }
.status-pill.pausa   { color: var(--amber); } .status-pill.pausa .dot { background: var(--amber); }
.status-pill.offline { color: var(--muted); } .status-pill.offline .dot { background: var(--muted); }
.mini-bar-wrap { width: 100px; height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 10px; }
.mini-bar { height: 100%; background: linear-gradient(90deg, var(--brand-mid), var(--brand)); }

/* =======================================================================
 * NÚMEROS (cards)
 * ===================================================================== */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.num-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s; }
.num-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.num-card.off { border-color: #f6dce0; }
.num-card .nc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.num-card .nc-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); }
.num-card.off .nc-icon { background: var(--red-soft); color: var(--red); }
.num-card .nc-icon svg { width: 22px; height: 22px; }
.num-card .nc-num { font-weight: 700; font-size: 15px; }
.num-card .nc-status { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-weight: 600; }
.num-card .nc-status .dot { width: 7px; height: 7px; border-radius: 50%; }
.num-card.on .nc-status { color: var(--green); } .num-card.on .nc-status .dot { background: var(--green); }
.num-card.off .nc-status { color: var(--red); }  .num-card.off .nc-status .dot { background: var(--red); }
.num-card .nc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line-soft); }
.num-card .nc-row:first-of-type { border-top: 0; }
.num-card .nc-row .nc-k { color: var(--ink-2); }
.num-card .nc-row .nc-v { font-weight: 700; }
/* pessoa responsável pela linha (28/10/2026): trocar sem reconectar */
.num-card .nc-trocar { margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--brand-strong); background: transparent; border: 1px solid var(--line); cursor: pointer; }
.num-card .nc-trocar:hover { background: var(--surface-2, rgba(0,0,0,.04)); }
.num-card .nc-trocar:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 1px; }

/* =======================================================================
 * COMPONENTES INTELIGENTES (filtros, IA, ações, busca, toasts)
 * ===================================================================== */

/* busca global no topo */
.global-search { position: relative; flex: 1 1 200px; min-width: 150px; max-width: 620px; }
.global-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.global-search input { width: 100%; padding: 11px 14px 11px 42px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; background: var(--bg-2); outline: none; transition: .15s; }
.global-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }

.icon-btn { width: 40px; height: 40px; border-radius: 11px; background: var(--bg-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.icon-btn svg { width: 19px; height: 19px; }

/* chips de segmento (filtro inteligente), uma linha, rolagem horizontal */
.chips { display: flex; gap: 7px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { height: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); transition: .12s; white-space: nowrap; flex-shrink: 0; }
.chip:hover { background: #fff; border-color: var(--brand-soft-2); color: var(--ink); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 10px rgba(21,168,204,.25); }
.chip .chip-n { background: rgba(0,0,0,.07); padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.chip.active .chip-n { background: rgba(255,255,255,.28); }

/* seletor de segmento (dropdown com busca) */
.seg-filter { position: relative; }
.seg-btn { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2); font-size: 13.5px; font-weight: 600; color: var(--ink); transition: .12s; }
.seg-btn:hover { border-color: var(--brand-soft-2); background: var(--surface); }
.seg-btn .seg-ico { display: flex; color: var(--brand-strong); }
.seg-btn .seg-ico svg { width: 16px; height: 16px; }
.seg-btn .seg-cur { flex: 1; text-align: left; }
.seg-btn .seg-cur b { color: var(--brand-strong); margin-left: 6px; }
.seg-btn .seg-caret { display: flex; color: var(--muted); }
.seg-btn .seg-caret svg { width: 16px; height: 16px; transition: transform .2s; }
.seg-btn.open .seg-caret svg { transform: rotate(180deg); }
.seg-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); padding: 8px; z-index: 30; animation: toastIn .14s ease; }
.seg-pop[hidden] { display: none; }
.seg-search { position: relative; margin-bottom: 6px; }
.seg-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.seg-search input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); font-size: 13px; color: var(--ink); outline: none; }
.seg-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.seg-list { max-height: 248px; overflow-y: auto; }
.seg-opt { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.seg-opt svg { width: 16px; height: 16px; color: var(--ink-2); }
.seg-opt:hover { background: var(--bg-2); }
.seg-opt.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.seg-opt.active svg { color: var(--brand-strong); }
.seg-opt .seg-n { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--bg); padding: 1px 8px; border-radius: 10px; }
.seg-opt.active .seg-n { background: var(--surface); color: var(--brand-strong); }
.seg-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* filtros avançados (colapsável) */
.adv-toggle { display: flex; align-items: center; justify-content: space-between; }
.link-btn { font-size: 12.5px; color: var(--brand-strong); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.link-btn svg { width: 14px; height: 14px; transition: transform .2s; }
.link-btn.open svg { transform: rotate(180deg); }
.adv { display: none; flex-direction: column; gap: 10px; }
.adv.open { display: flex; }

/* barra de ações em massa */
.bulk-bar { display: none; align-items: center; gap: 10px; padding: 11px 16px; background: var(--brand-soft); border-bottom: 1px solid var(--brand-soft-2); font-size: 13px; font-weight: 700; color: var(--brand-strong); }
.bulk-bar.show { display: flex; }
.bulk-bar .bulk-actions { margin-left: auto; display: flex; gap: 6px; }
.btn-mini { padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; }
.btn-mini:hover { border-color: var(--brand); color: var(--brand-strong); }
/* No escuro o botão claro estourava sobre o cabeçalho da Telefonia: superfície
   escura com a borda um tom acima, e o realce da marca só no hover. */
body.dark .btn-mini { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
body.dark .btn-mini:hover { background: var(--surface); border-color: var(--brand); color: #fff; }
body.dark .btn-mini svg { color: inherit; }
.btn-mini svg { width: 14px; height: 14px; }

/* checkbox do item */
.ci-check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: .12s; background: #fff; }
.ci-check:hover { border-color: var(--brand); }
.conv-item.sel .ci-check { background: var(--brand); border-color: var(--brand); }
.ci-check svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.conv-item.sel .ci-check svg { opacity: 1; }
.conv-item.sel { background: var(--brand-soft); }

/* ações no topo da thread */
.th-actions { margin-left: auto; display: flex; gap: 6px; }

/* IA, sentimento, próximo passo, resposta sugerida */
.sentiment { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 9px; }
.sentiment.pos  { background: var(--green-soft); color: var(--green); }
.sentiment.neu  { background: var(--bg);         color: var(--ink-2); }
.sentiment.neg  { background: var(--red-soft);   color: var(--red); }
.sentiment.risk { background: var(--amber-soft); color: #c97e10; }
.next-step { background: #fff; border: 1px dashed var(--brand-soft-2); border-radius: 11px; padding: 11px 13px; font-size: 13px; margin-top: 10px; line-height: 1.45; }
.next-step .ns-h { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--brand-strong); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.next-step .ns-h svg { width: 14px; height: 14px; }
.sugg-reply { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; font-size: 13px; margin-top: 10px; color: var(--ink-2); line-height: 1.45; }
.sugg-reply .sr-h { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 5px; }
.sugg-reply .sr-text { font-style: italic; }
.sugg-reply .sr-actions { margin-top: 9px; display: flex; gap: 6px; }

/* botões de ação no painel de detalhes */
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.btn-act { padding: 10px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 7px; transition: .12s; }
.btn-act:hover { border-color: var(--brand); color: var(--brand-strong); background: #fff; }
.btn-act svg { width: 15px; height: 15px; }

/* Central de Ações (IA) no dashboard */
.insight { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.insight:last-child { border-bottom: 0; }
.insight .ins-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.insight .ins-ico svg { width: 20px; height: 20px; }
.insight.pri-high .ins-ico { background: var(--red-soft);   color: var(--red); }
.insight.pri-med  .ins-ico { background: var(--amber-soft); color: var(--amber); }
.insight.pri-low  .ins-ico { background: var(--brand-soft); color: var(--brand-strong); }
.insight .ins-main { flex: 1; min-width: 0; }
.insight .ins-title { font-size: 13.5px; font-weight: 600; }
.insight .ins-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.insight .ins-go { padding: 8px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; flex-shrink: 0; transition: .12s; }
.insight .ins-go:hover { background: var(--brand-strong); }

/* toasts */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 10px; animation: toastIn .25s ease; }
.toast svg { width: 17px; height: 17px; color: var(--brand-mid); flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Resumo executivo por IA */
.ai-exec { display: flex; align-items: center; gap: 13px; padding: 11px 16px; border-radius: var(--r-md); background: linear-gradient(100deg, var(--brand-soft), var(--surface) 75%); border: 1px solid var(--brand-soft-2); box-shadow: var(--sh-1); }
.ai-exec .ae-ico { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(12,117,145,.25); }
.ai-exec .ae-ico svg { width: 18px; height: 18px; }
.ai-exec .ae-text { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.ai-exec .ae-text b { color: var(--ink); font-weight: 700; }
.ai-exec .ae-tag { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--brand-strong); background: var(--surface); border: 1px solid var(--brand-soft-2); padding: 4px 9px; border-radius: 6px; flex-shrink: 0; }

/* variação (tendência) */
.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--red); font-weight: 700; }

/* modo escuro */
body.dark {
  --ink: #e7edf4; --ink-2: #aeb9c6; --muted: #7d8a9a;
  --bg: #0f1620; --bg-2: #19222e; --surface: #1b2531; --line: #2a3542; --line-soft: #232d3a;
  --brand-soft: rgba(58,169,198,.16); --brand-soft-2: rgba(58,169,198,.32);
  --green-soft: rgba(15,157,119,.18); --red-soft: rgba(217,89,106,.18); --amber-soft: rgba(201,138,43,.18); --purple-soft: rgba(106,90,205,.22);
  --bubble-in: #222e3c; --bubble-out: rgba(58,169,198,.24); --thread-bg: #131b25;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 2px 10px rgba(0,0,0,.45); --sh-3: 0 16px 40px rgba(0,0,0,.55);
}
/* Logo LemonChat é colorida com fundo transparente, lê bem em ambos os temas, sem inverter. */
body.dark .bubble.in { background: var(--bubble-in); }
body.dark .day-sep span { background: var(--surface); color: var(--ink-2); }

/* estado vazio (bonito) */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .empty-ico { width: 86px; height: 86px; border-radius: 26px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.empty .empty-ico svg { width: 42px; height: 42px; }
.empty .empty-title { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.empty .empty-sub { font-size: 13.5px; margin-top: 7px; max-width: 360px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.empty .empty-cta { margin-top: 18px; display: inline-flex; padding: 9px 16px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }
.empty .empty-cta:hover { background: var(--brand-strong); }

/* menu de opções (dropdown) */
.menu-anchor { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-3); padding: 8px; z-index: 60; animation: toastIn .16s ease; }
.menu-pop[hidden] { display: none; }
/* O menu nunca passa do fim da janela (Wilton, 21/09/2026): com zoom alto num
   notebook a lista da engrenagem ficava maior que a tela e os itens de baixo
   não tinham como ser alcançados. Agora ele tem altura máxima e rola por dentro. */
.menu-pop {
  max-height: calc(100vh - var(--nav-h) - 16px);
  max-height: calc(100dvh - var(--nav-h) - 16px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.menu-pop .mp-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 9px 12px 4px; }
.menu-pop .mp-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; font-size: 13.5px; color: var(--ink); width: 100%; text-align: left; transition: background .12s; }
.menu-pop .mp-item:hover { background: var(--bg-2); }
.menu-pop .mp-item svg { width: 18px; height: 18px; color: var(--ink-2); flex-shrink: 0; }
.menu-pop .mp-item.danger { color: var(--red); } .menu-pop .mp-item.danger svg { color: var(--red); }
.menu-pop .mp-sep { height: 1px; background: var(--line-soft); margin: 7px 8px; }
.menu-pop .mp-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px 6px; }
.menu-pop .mp-user .mu-name { font-size: 14px; font-weight: 700; }
.menu-pop .mp-user .mu-mail { font-size: 12px; color: var(--muted); margin-top: 1px; }
.user-chip { cursor: pointer; padding: 6px 10px 6px 14px; border-radius: 11px; transition: background .12s; }
.user-chip:hover { background: var(--bg-2); }
.user-chip .caret { color: var(--muted); display: flex; align-items: center; }
.user-chip .caret svg { width: 16px; height: 16px; }

/* =======================================================================
 * Responsivo (desktop largo → tablet → celular)
 * ===================================================================== */
/* Telas médias: desafoga o topo para o menu do perfil nunca ser cortado */
@media (max-width: 1560px) {
  .topnav .logo .sys, .topnav .logo .divider { display: none; }
}
/* Faixa apertada: compacta ainda mais as abas antes de virar só ícones */
@media (max-width: 1360px) {
  .nav-item { padding: 8px 10px; font-size: 13px; gap: 6px; }
  .topnav { gap: 12px; }
}
@media (max-width: 1240px) {
  .live-pill { display: none; }
}

/* ── a barra do topo sempre cabe ──
   Com a telefonia a barra ganhou LemonPABX, Ligar e a jornada, e o que cabe
   depende do conteúdo (nome do usuário, pausa com nome longo, "Atender"). O
   topoCabe() do app.js mede e liga os níveis abaixo, um por vez, até nada passar
   da borda; cada nível tira o que menos faz falta. Quem tem espaço sobrando
   continua vendo tudo por extenso. No celular (até 760 px) vale o layout próprio. */
.user-chip .avatar, .user-chip .caret { flex-shrink: 0; }
.user-chip .u-txt { min-width: 0; max-width: 180px; overflow: hidden; }
.user-chip .u-name, .user-chip .u-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search input { text-overflow: ellipsis; }
.vz-jtxt { min-width: 0; }
.vz-jtime, .vz-jcaret { flex-shrink: 0; }
/* 1: o texto ao lado da logo sai primeiro (a busca vale mais) */
body.topo-c1 .topnav .logo .sys, body.topo-c1 .topnav .logo .divider { display: none; }
/* 2: o nome do usuário (continua no menu dele) e o sinal de tempo real */
body.topo-c2 .user-chip .u-txt, body.topo-c2 .live-wrap { display: none; }
body.topo-c2 .user-chip { gap: 6px; padding-left: 10px; }
/* 3: o menu aperta o respiro e a pausa longa corta com reticências */
body.topo-c3 .topnav { gap: 10px; }
body.topo-c3 .topnav-right { gap: 6px; }
body.topo-c3 .nav { gap: 0; }
body.topo-c3 .nav-item { padding: 8px 8px; font-size: 12.5px; gap: 5px; }
body.topo-c3 .topnav .vz-jchip { max-width: 170px; }
/* 4: as abas fechadas ficam no ícone, com dica e nome acessível (index.php) */
body.topo-c4 .nav-item:not(.active) .lbl { display: none; }
body.topo-c4 .nav-item:not(.active) { padding: 9px 10px; }
/* 5: último recurso: a aba aberta também, o Ligar vira o círculo e a jornada
   fica no sinal e no tempo */
body.topo-c5 .nav-item .lbl, body.topo-c5 .vz-jtxt { display: none; }
body.topo-c5 .nav-item { padding: 9px 10px; }
body.topo-c5 .sf-chip .sf-chip-t { display: none; }
body.topo-c5 .sf-chip { padding: 0 4px; gap: 0; }

/* Conversas: some com a coluna de detalhes quando a tela aperta */
@media (max-width: 1180px) {
  .conv { grid-template-columns: 300px 1fr; }
  .conv-details { display: none; }
}

/* Tablet: o dashboard deixa de ser "tela cheia sem rolagem" e passa a rolar,
   empilhando os painéis em coluna única (bento vira lista). */
@media (max-width: 1024px) {
  body.view-dashboard .view-wrap { overflow: auto; padding: 18px; }
  body.view-dashboard #view-dashboard.active { display: block; }
  .dash { display: flex; flex-direction: column; gap: 14px; }
  .dash > .panel, .dash > .ai-exec, .dash > .kpis { grid-column: auto !important; grid-row: auto !important; }
  .dash .panel { min-height: auto; }
  .dash .panel .panel-body { overflow: visible; }
  .chart-panel .panel-body { height: 260px; overflow: hidden; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .topnav { gap: 16px; padding: 0 18px; }
  .global-search { flex: 1 1 240px; }
  .topnav .logo .sys { display: none; }
  .topnav .logo .divider { display: none; }
}

/* Faixa intermediária: navegação só com ícones, some textos auxiliares */
@media (max-width: 1140px) {
  .nav-item .lbl { display: none; }     /* só ícones: 5 abas não cabem com texto */
  .nav-item { padding: 9px 11px; }
}
@media (max-width: 900px) {
  .live-pill { display: none; }
  .user-chip .u-name, .user-chip .u-role { display: none; }
  .user-chip { padding-left: 0; border-left: 0; }
}

/* Tablet estreito / celular: topo empilhado, abas com scroll horizontal */
@media (max-width: 760px) {
  .topnav { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px 8px; align-items: center; }
  .topnav .logo { order: 1; flex: 0 0 auto; }
  .topnav .logo img { height: 32px; }
  .topnav-right { order: 2; margin-left: auto; gap: 6px; flex: 0 0 auto; }
  .topnav-right .icon-btn { width: 38px; height: 38px; }
  .global-search { order: 3; flex: 1 1 100%; min-width: 0; max-width: none; }
  .nav { order: 4; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; gap: 4px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { height: 0; }
  .nav-item .lbl { display: inline; }   /* labels voltam, com scroll horizontal */
  .nav-item { padding: 9px 14px; }
  .view-wrap { padding: 16px 14px; }
  body.view-dashboard .view-wrap { padding: 14px; }
  .page-head h1 { font-size: 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .conv { grid-template-columns: 1fr; }
  body.conv-open-mobile .conv-list { display: none; }
  body:not(.conv-open-mobile) .conv-thread { display: none; }
  .back-mobile { display: inline-flex !important; }
  #view-atendentes .panel-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #view-atendentes .table { min-width: 640px; }
  /* Detalhes/IA como painel de tela cheia no celular (abre pelo ícone de painel) */
  body.details-open-mobile .conv-details { display: block; position: fixed; inset: 0; z-index: 200; padding: 20px 18px 34px; overflow-y: auto; animation: mUp .22s ease; }
  body.details-open-mobile .detail-collapse { top: 16px; right: 16px; width: 40px; height: 40px; }
  /* ações do cabeçalho da conversa: compactas (só ícones) pra caber */
  .th-actions { gap: 4px; }
  .th-actions .btn-mini { font-size: 0; gap: 0; padding: 9px; }
}

/* Celular pequeno */
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .topnav .logo img { height: 32px; }
  .num-grid { grid-template-columns: 1fr; }
  .thread-scroll { padding: 16px 5%; }
  .bubble { max-width: 88%; }
  .page-head h1 { font-size: 18px; }
  .menu-pop { width: calc(100vw - 28px); }
  /* modais viram "bottom sheet", mais confortável no toque */
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn-primary, .modal-foot .btn-ghost { width: 100%; }
}
.back-mobile { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); color: var(--ink-2); margin-right: 2px; }
.back-mobile svg { width: 20px; height: 20px; }

/* ============ MODAL (configurações, perfil, integração) ============ */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: mFade .18s ease; }
body.dark .modal-back { background: rgba(0,0,0,.62); }
@keyframes mFade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-3); width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; animation: mUp .22s cubic-bezier(.2,.8,.3,1); }
@keyframes mUp { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 11px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.modal-head .mh-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-head .mh-ico svg { width: 18px; height: 18px; }
.modal-head h3 { font-size: 16px; font-weight: 700; margin: 0; flex: 1; color: var(--ink); }
.modal-head .mh-close { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; border: 0; }
.modal-head .mh-close:hover { background: var(--line); }
.modal-head .mh-close svg { width: 17px; height: 17px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-body p { color: var(--ink-2); font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.m-field { margin-bottom: 15px; } .m-field:last-child { margin-bottom: 0; }
.m-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.m-field input, .m-field select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 14px; }
.m-field input:focus, .m-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.m-field input:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; border: 0; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-primary:hover { filter: brightness(1.05); } .btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { background: var(--line); }
.m-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.m-row:last-child { border-bottom: 0; } .m-row .k { color: var(--muted); } .m-row .v { color: var(--ink); font-weight: 600; }
.m-list { display: flex; flex-wrap: wrap; gap: 8px; }
.m-stat { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); padding: 9px 0; }
.m-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; } .m-dot.on { background: #22c55e; } .m-dot.off { background: #ef4444; }
.m-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.m-msg { font-size: 13px; padding: 9px 12px; border-radius: 9px; margin-bottom: 13px; }
.m-msg.ok { background: rgba(34,197,94,.12); color: #16a34a; } .m-msg.err { background: rgba(239,68,68,.12); color: #dc2626; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .sr-t { font-size: 14px; color: var(--ink); font-weight: 500; } .switch-row .sr-d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sw { position: relative; width: 44px; height: 25px; flex-shrink: 0; } .sw input { display: none; }
.sw span { position: absolute; inset: 0; background: var(--line); border-radius: 20px; cursor: pointer; transition: .2s; }
.sw span::after { content: ''; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + span { background: var(--brand); } .sw input:checked + span::after { transform: translateX(19px); }

/* ============ GRUPOS ============ */
.avatar.grupo { background: linear-gradient(135deg, #64748b, #475569); color: #fff; }
.avatar.grupo svg { width: 20px; height: 20px; }
.avatar.grupo.sm svg { width: 16px; height: 16px; }
.avatar.grupo.lg svg { width: 28px; height: 28px; }
.badge-grupo { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #475569; background: #eef2f7; padding: 2px 8px; border-radius: 20px; }
.badge-grupo svg { width: 12px; height: 12px; }
.th-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: #475569; background: #eef2f7; padding: 1px 8px; border-radius: 20px; vertical-align: middle; margin-left: 6px; }
body.dark .badge-grupo, body.dark .th-badge { background: rgba(148,163,184,.18); color: #cbd5e1; }

/* ============ IMAGENS na thread ============ */
.b-img { max-width: 260px; max-height: 320px; border-radius: 10px; display: block; }
.b-img-wrap { display: block; margin-bottom: 4px; cursor: zoom-in; }
.b-img-load { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 22px 26px; background: var(--bg-2); border-radius: 10px; margin-bottom: 4px; }
.b-img-load svg { width: 15px; height: 15px; }
.bubble.has-img { max-width: 300px; }

/* ============ Conversa NÃO LIDA (destaque) ============ */
.conv-item.unread:not(.active) { background: #eefaf5; border-left-color: var(--green); }
.conv-item.unread .ci-name { font-weight: 800; color: var(--ink); }
.conv-item.unread .ci-last { color: var(--ink); font-weight: 600; }
body.dark .conv-item.unread:not(.active) { background: rgba(15,157,119,.12); }

/* ============ Usuários e permissões ============ */
.u-list { display: flex; flex-direction: column; }
.u-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.u-row:last-child { border-bottom: 0; }
.u-r-nome { font-size: 14px; font-weight: 600; color: var(--ink); }
.u-r-mail { font-size: 12px; color: var(--muted); margin-top: 1px; }
.u-you { font-size: 10px; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.u-r-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.u-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: #eef2f7; color: #475569; white-space: nowrap; }
.u-badge.admin { background: rgba(21,168,204,.14); color: var(--brand-strong); }
.u-badge.restrito { background: rgba(201,138,43,.16); color: var(--amber); }
.u-del { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-2); color: var(--red); display: flex; align-items: center; justify-content: center; }
.u-del:hover { background: var(--red-soft); }
.u-del svg { width: 15px; height: 15px; }

/* ============ MÍDIA: vídeo, áudio, documento ============ */
.bubble.has-media { max-width: 320px; }
.b-video { max-width: 280px; max-height: 340px; border-radius: 10px; display: block; margin-bottom: 4px; background: #000; }
.b-audio { display: block; margin-bottom: 4px; width: 250px; max-width: 100%; height: 40px; }
.b-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 4px; color: var(--ink); }
.b-doc:hover { background: var(--line-soft); }
.b-doc svg { width: 22px; height: 22px; color: var(--brand-strong); flex-shrink: 0; }
.b-doc-nome { flex: 1; font-size: 13px; font-weight: 600; word-break: break-word; line-height: 1.25; }
.b-doc-open { font-size: 11px; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.b-media-err { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--bg-2); border-radius: 10px; margin-bottom: 4px; }
.b-media-err svg { width: 14px; height: 14px; }

/* ============ Figurinha + Reações ============ */
.b-sticker { max-width: 120px; max-height: 120px; display: block; }
.bubble .b-react { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.b-react span { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 1px 7px; font-size: 13px; line-height: 1.5; }
.b-react b { font-size: 10px; font-weight: 700; color: var(--muted); }
body.dark .b-react span { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }

/* ── Visão Geral: abas (Resumo, Monitoria, Resultados, Conexões) e o filtro
      que vale para todas elas (pedido do Wilton, 17/09/2026) ── */
body.view-dashboard #view-dashboard.active { flex-direction: column; }
.rel-head { margin-bottom: 10px; flex: 0 0 auto; }
.rel-head .ph-tabs { justify-content: flex-start; }
.rel-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rel-pane[hidden] { display: none !important; }
#rel-monitoria, #rel-resultados, #rel-conexoes { overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
#rel-resumo { overflow: hidden; }

.rel-filtro {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 8px 12px; box-shadow: var(--sh-1); margin-bottom: 12px;
  position: relative; overflow: hidden;
}
/* filtro ligado: um traço da marca na lateral, para o gestor ver que a tela
   inteira está recortada */
.rel-filtro::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
body.rel-filtrado .rel-filtro::before { transform: scaleX(1); }
body.rel-filtrado .rel-filtro { border-color: var(--brand-soft); }
.rel-f { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rel-f[hidden] { display: none; }
.rel-f-i { display: inline-flex; color: var(--muted); }
.rel-f-i svg { width: 14px; height: 14px; }
.rel-l {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.rel-filtro select, .rel-filtro input[type="date"], .rel-filtro input[type="time"] {
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--ink);
  font: 600 12.5px inherit; padding: 6px 9px; outline: 0; max-width: 260px;
  transition: border-color .15s, box-shadow .15s;
}
.rel-filtro select { cursor: pointer; }
.rel-filtro select:focus-visible, .rel-filtro input:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rel-filtro select:disabled { opacity: .6; cursor: not-allowed; }
.rel-fixo {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand-strong); font: 700 12.5px inherit; white-space: nowrap;
}
.rel-fixo[hidden] { display: none; }
.rel-seg { display: inline-flex; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.rel-seg-b {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px;
  font: 700 12px inherit; color: var(--muted); background: transparent; border: 0; cursor: pointer; white-space: nowrap;
}
.rel-seg-b:hover { color: var(--ink); }
.rel-seg-b.on { background: var(--surface); color: var(--brand-strong); box-shadow: var(--sh-1); }
.rel-seg-b:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rel-seg-i { display: inline-flex; }
.rel-seg-i svg { width: 13px; height: 13px; }
.rel-datas, .rel-horas, .rel-durs { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rel-datas[hidden], .rel-horas[hidden], .rel-durs[hidden] { display: none; }
.rel-durs input[type=number] { width: 78px; }
.rel-f-dur[hidden] { display: none; }
.rel-escopo {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px;
  background: var(--amber-soft); color: var(--ink-2); font-size: 11.5px; font-weight: 600;
}
.rel-escopo[hidden] { display: none; }
.rel-escopo svg { width: 13px; height: 13px; color: var(--vz-amber); }
body.dark .rel-escopo { background: var(--vz-amber-soft); }
.rel-limpar {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink-2); border-radius: 9px; padding: 6px 10px; font: 700 12px inherit; cursor: pointer;
}
.rel-limpar:hover { border-color: var(--brand); color: var(--brand-strong); }
.rel-limpar[hidden] { display: none; }
.rel-limpar svg { width: 12px; height: 12px; }

/* avisos das abas: recorte que não se aplica, canal que não combina */
.rel-nota {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px;
  border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-soft);
  color: var(--muted); font-size: 12px;
}
.rel-nota[hidden] { display: none; }
.rel-nota-i { display: inline-flex; }
.rel-nota-i svg { width: 14px; height: 14px; }
.rel-canal-nota {
  display: flex; align-items: center; gap: 14px; padding: 22px 20px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1);
}
.rel-canal-nota .rcn-i {
  width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong); flex: 0 0 auto;
}
.rel-canal-nota .rcn-i svg { width: 22px; height: 22px; }
.rel-canal-nota .rcn-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rel-canal-nota .rcn-t b { font-size: 14.5px; }
.rel-canal-nota .rcn-t span { font-size: 12.5px; color: var(--muted); }
.rel-canal-nota .btn-primary { margin-left: auto; flex: 0 0 auto; }
.rel-vazio-mini { color: var(--muted); font-size: 12.5px; padding: 10px 2px; }

/* canal do filtro: Ligações esconde a metade de mensagens e vice-versa */
body.rel-canal-ligacoes #view-dashboard .dash > :not(.kpis-voz):not(.equipes-panel),
body.rel-canal-ligacoes #kg-msg,
body.rel-canal-ligacoes #dash-cards,
body.rel-canal-mensagens #kg-voz,
body.rel-canal-mensagens #vz-kpis,
body.rel-canal-mensagens #mn-panel-presenca { display: none !important; }

/* perfil atendente: sem Números, sem Atendentes e sem Conexões (17/09/2026) */
body.pf-atendente .nav-item[data-view="numeros"],
body.pf-atendente .nav-item[data-view="atendentes"],
body.pf-atendente #view-numeros,
body.pf-atendente #view-atendentes { display: none !important; }

.dash { grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr); }
.rank-row { border-radius: 8px; transition: background .12s; }
.rank-row:hover { background: var(--bg-2); }
.rank-row[data-rank-at] { cursor: pointer; }
.rank-row[data-rank-at]:focus-visible, .num-chip[data-dash-cx]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num-chip[data-dash-cx] { cursor: pointer; }
@media (max-width: 1024px) {
  .rel-filtro { gap: 8px 10px; }
  .rel-filtro select { max-width: 190px; }
  .rel-limpar { margin-left: 0; }
  .rel-pane { display: block; overflow: visible !important; }
}

/* ── Coexistência (app do celular + API oficial no mesmo número) ── */
.badge-coex {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #0064e0, #25d366);
  box-shadow: 0 2px 7px rgba(0,100,224,.3);
}
.b-cel { display: inline-flex; vertical-align: middle; margin-left: 4px; color: var(--muted); }
.b-cel svg { width: 11px; height: 11px; }

/* ── Coexistência: card, comparativo e tutorial ── */
.co-ico.coex { background: linear-gradient(135deg, #0064e0, #25d366); }
.cnx-opt.destaque { border-color: #b9d4ff; box-shadow: 0 6px 22px rgba(0,100,224,.13); }
.cnx-opt.destaque:hover { border-color: #0064e0; }
.chip-coex {
  font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2.5px 8px; border-radius: 20px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #0064e0, #25d366);
}
.chip-rec {
  font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2.5px 8px; border-radius: 20px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-strong); border: 1px solid currentColor;
}
.cnx-cmp {
  width: 100%; margin-top: 12px; padding: 10px; border: 0; background: transparent;
  color: var(--brand-strong); font: 700 12.5px inherit; cursor: pointer; text-decoration: underline;
}
.cnx-cmp:hover { color: var(--ink); }

.cmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.cmp-col { border: 1px solid var(--line); border-radius: 12px; padding: 12px 11px; background: var(--bg-2); position: relative; }
.cmp-col.rec { border-color: #0064e0; background: linear-gradient(180deg, rgba(0,100,224,.06), var(--surface)); }
.cmp-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 9px; border-radius: 20px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #0064e0, #25d366);
}
.cmp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.cmp-h .co-ico { width: 30px; height: 30px; border-radius: 9px; }
.cmp-h .co-ico svg { width: 16px; height: 16px; }
.cmp-h b { font-size: 12.5px; }
.cmp-l { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 11px; }
.cmp-l span { color: var(--muted); font-weight: 600; }
.cmp-l i { font-style: normal; color: var(--ink-2); }
@media (max-width: 620px) { .cmp-grid { grid-template-columns: 1fr; } }

.mt-head.coex { background: linear-gradient(135deg, rgba(0,100,224,.09), rgba(37,211,102,.08)); border-color: rgba(0,100,224,.28); }
.tut { margin: 4px 0 14px; }
.tut-p { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.tut-p:last-child { border-bottom: 0; }
.tut-n {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #0064e0, #25d366); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800;
}
/* Só o título do passo é bloco: negrito dentro da descrição fica na linha. */
.tut-c > b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.tut-c span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.tut-lk {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: 11px; font-weight: 700; color: #0064e0; text-decoration: none;
  padding: 4px 10px; border: 1px solid #b9d4ff; border-radius: 20px; transition: all .15s;
}
.tut-lk svg { width: 12px; height: 12px; }
.tut-lk:hover { background: #0064e0; color: #fff; border-color: #0064e0; }
.tut.compacto .tut-p { padding: 7px 0; }
#cx-conectar svg { width: 15px; height: 15px; vertical-align: -2px; }

.tut-guia {
  display: block; text-align: center; margin: 0 0 12px; padding: 11px;
  background: linear-gradient(135deg, rgba(0,100,224,.08), rgba(37,211,102,.08));
  border: 1px dashed #b9d4ff; border-radius: 11px;
  font-size: 12.5px; font-weight: 800; color: #0064e0; text-decoration: none;
  transition: background .15s;
}
.tut-guia:hover { background: linear-gradient(135deg, rgba(0,100,224,.16), rgba(37,211,102,.14)); }

/* ══ Conexões (relatório de conectou/desconectou) ══ */

.cx-resumo { display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:12px; margin-bottom:18px; }
.cx-kpi { background:var(--surface,#fff); border:1px solid var(--line,#e4e9f2); border-radius:14px; padding:16px 18px; box-shadow:0 1px 3px rgba(16,26,43,.05); }
.cx-kpi b { display:block; font-size:30px; font-weight:800; letter-spacing:-1px; line-height:1; }
.cx-kpi span { display:block; font-size:11.5px; color:var(--muted); margin-top:5px; font-weight:600; }
.cx-kpi.ok b { color:#16a37b; } .cx-kpi.bad b { color:#e5484d; } .cx-kpi.warn b { color:#d98a1f; } .cx-kpi.neu b { color:var(--ink-2,#3f4d63); }
@media (max-width:720px){ .cx-resumo{ grid-template-columns:1fr 1fr; } }

.cx-lista { display:flex; flex-direction:column; gap:12px; }
.cx-empty { text-align:center; color:var(--muted); padding:40px; font-size:13.5px; }
.cx-card { background:var(--surface,#fff); border:1px solid var(--line,#e4e9f2); border-radius:14px; padding:14px 16px; box-shadow:0 1px 3px rgba(16,26,43,.05); }
.cx-card.alerta { border-left:3px solid #d98a1f; }
.cx-card-h { display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.cx-st { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; padding:4px 10px; border-radius:20px; flex-shrink:0; }
.cx-st.on { background:#e6f8f1; color:#0b6f4e; } .cx-st.off { background:#fdecec; color:#b4262b; }
.cx-st-dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.cx-st.on .cx-st-dot { animation:cxpulse 1.8s infinite; }
@keyframes cxpulse { 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
.cx-card-id { flex:1; min-width:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.cx-card-id b { font-size:14.5px; letter-spacing:-.2px; }
/* número da linha ao lado do nome na aba Conexões (Wilton, 22/09/2026) */
.cx-card-id .cx-tel { font-size:12.5px; font-weight:500; color:var(--ink-2); font-variant-numeric:tabular-nums; white-space:nowrap; user-select:all; }
.cx-tag { font-size:9px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; padding:2px 7px; border-radius:20px; color:#fff; white-space:nowrap; }
.cx-tag.coex { background:linear-gradient(135deg,#0064e0,#25d366); } .cx-tag.meta { background:#0064e0; }
.cx-srv { font-size:10px; font-weight:800; color:var(--muted); background:var(--bg-2,#eef2f8); padding:3px 9px; border-radius:20px; }
.cx-quedas { font-size:11px; font-weight:800; color:#d98a1f; background:#fdf4e3; padding:4px 10px; border-radius:20px; }
.cx-quedas.ok { color:#0b6f4e; background:#e6f8f1; }
.cx-card-sub { font-size:11.5px; color:var(--muted); margin:6px 0 2px; }

.cx-tl { margin-top:10px; padding-top:10px; border-top:1px dashed var(--line,#e4e9f2); display:flex; flex-direction:column; gap:0; }
.cx-tl.vazio { font-size:12px; color:var(--muted); font-style:italic; }
.cx-ev { display:flex; align-items:center; gap:9px; padding:5px 0 5px 3px; position:relative; }
.cx-ev .cx-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.cx-ev.on .cx-dot { background:#16a37b; box-shadow:0 0 0 3px #e6f8f1; }
.cx-ev.off .cx-dot { background:#e5484d; box-shadow:0 0 0 3px #fdecec; }
.cx-ev-tx { font-size:12.5px; font-weight:700; min-width:92px; }
.cx-ev.on .cx-ev-tx { color:#0b6f4e; } .cx-ev.off .cx-ev-tx { color:#b4262b; }
.cx-ev-dt { font-size:11.5px; color:var(--muted); }

/* ── Diagnóstico da Meta por linha (token por linha) ──
   A linha aparece conectada e mesmo assim está muda: o token guardado para
   ela não alcança mais o número. O cartão precisa dizer isso sem rodeio e
   oferecer a saída no mesmo lugar. */
.cx-kpi.crit { border-color:#f3c7c8; background:linear-gradient(180deg,#fff7f7,var(--surface,#fff)); }
.cx-kpi.crit b { color:#c93a3f; }
.cx-st.warn { background:#fdf4e3; color:#8a5a10; }
.cx-st.warn .cx-st-dot { animation:cxpulse 1.4s infinite; }
.cx-card.reconectar { border-left:3px solid #e5484d; }
.cx-fix { display:flex; gap:11px; align-items:flex-start; margin-top:11px; padding:12px 13px; border-radius:12px; background:#fff6f6; border:1px solid #f3c7c8; }
.cx-fix-ico { width:26px; height:26px; border-radius:50%; flex:0 0 26px; display:flex; align-items:center; justify-content:center; background:#e5484d; color:#fff; }
.cx-fix-ico svg { width:15px; height:15px; }
.cx-fix-tx { flex:1; min-width:0; }
.cx-fix-tx b { display:block; font-size:13px; color:#8e2226; letter-spacing:-.1px; }
.cx-fix-tx span { display:block; font-size:12.5px; color:#8a4b4d; line-height:1.5; margin-top:3px; }
.cx-fix-tx i { display:block; font-size:11.5px; color:var(--muted); font-style:normal; margin-top:6px; }
.cx-fix-btn { flex-shrink:0; align-self:center; border:0; background:#e5484d; color:#fff; font:700 12.5px inherit; padding:9px 17px; border-radius:10px; cursor:pointer; box-shadow:0 2px 8px rgba(229,72,77,.26); transition:transform .15s, box-shadow .15s, background .15s; }
.cx-fix-btn:hover { background:#d0393e; transform:translateY(-1px); box-shadow:0 5px 14px rgba(229,72,77,.3); }
.cx-ver { display:flex; align-items:center; gap:7px; margin-top:9px; font-size:11.5px; font-weight:600; color:#0b6f4e; }
.cx-ver-ico { width:17px; height:17px; border-radius:50%; background:#e6f8f1; color:#0b6f4e; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.cx-ver-ico svg { width:10px; height:10px; }
@media (max-width:620px){ .cx-fix { flex-wrap:wrap; } .cx-fix-btn { width:100%; } }
body.dark .cx-kpi.crit { background:rgba(229,72,77,.09); border-color:rgba(229,72,77,.3); }
body.dark .cx-kpi.crit b { color:#ff8b8f; }
body.dark .cx-st.warn { background:rgba(217,138,31,.17); color:#f0c07a; }
body.dark .cx-fix { background:rgba(229,72,77,.10); border-color:rgba(229,72,77,.3); }
body.dark .cx-fix-tx b { color:#ff9a9d; }
body.dark .cx-fix-tx span { color:#e5b7b9; }
body.dark .cx-ver { color:#5fd7a9; }
body.dark .cx-ver-ico { background:rgba(22,163,123,.18); color:#5fd7a9; }

/* Mesmo aviso no card da linha, em Números. */
.num-card.rec { border-color:#f3c7c8; }
.num-card.rec .nc-status { color:#c93a3f; }
.num-card.rec .nc-status .dot { background:#c93a3f; }
.num-card .nc-sub2 { font-size:12px; color:var(--muted); margin-top:2px; }
/* "Conectado desde hoje às 09:10" no card da linha (Wilton, 22/09/2026) */
.num-card .nc-desde { font-size:11.5px; color:var(--muted); margin-top:3px; font-variant-numeric:tabular-nums; }
.nc-alerta { display:flex; gap:9px; align-items:flex-start; margin-top:12px; padding:10px 11px; border-radius:11px; background:#fff6f6; border:1px solid #f3c7c8; }
.nc-alerta-ico { width:22px; height:22px; border-radius:50%; flex:0 0 22px; background:#e5484d; color:#fff; display:flex; align-items:center; justify-content:center; }
.nc-alerta-ico svg { width:13px; height:13px; }
.nc-alerta b { display:block; font-size:12.5px; color:#8e2226; }
.nc-alerta span { display:block; font-size:11.5px; color:#8a4b4d; line-height:1.45; margin-top:2px; }
body.dark .nc-alerta { background:rgba(229,72,77,.10); border-color:rgba(229,72,77,.3); }
body.dark .nc-alerta b { color:#ff9a9d; }
body.dark .nc-alerta span { color:#e5b7b9; }
.btn-mini.forte { background:#e5484d; border-color:#e5484d; color:#fff; }
.btn-mini.forte:hover { background:#d0393e; border-color:#d0393e; color:#fff; }
body.dark .btn-mini.forte { background:#e5484d; border-color:#e5484d; color:#fff; }

/* ── Diagnóstico de erro da coexistência ── */
.cx-diag-top { display:flex; gap:12px; align-items:flex-start; background:#fdf4e3; border:1px solid #f2ddb4; border-radius:12px; padding:13px 15px; margin-bottom:14px; }
.cx-diag-ico { width:26px; height:26px; border-radius:50%; flex-shrink:0; background:#d98a1f; color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center; }
.cx-diag-top b { display:block; font-size:14px; color:#6d4a10; }
.cx-diag-top span { display:block; font-size:12.5px; color:#7a5b28; line-height:1.5; margin-top:2px; }
.cx-diag-list { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.cx-diag-c { display:flex; gap:11px; padding:11px 13px; border:1px solid var(--line); border-radius:11px; background:var(--surface); }
.cx-diag-n { width:22px; height:22px; border-radius:50%; flex-shrink:0; background:var(--brand-soft,#e9f1fe); color:var(--brand-strong,#0064e0); font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; }
.cx-diag-c b { display:block; font-size:13px; margin-bottom:2px; }
.cx-diag-c span { display:block; font-size:12px; color:var(--muted); line-height:1.55; }
.cx-diag-c .tut-lk { margin-top:8px; }
.cx-diag-c .btn-mini { margin-top:8px; }
.cx-appok { display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; color:#0b6f4e; background:#e6f8f1; border:1px solid #bfe6d7; border-radius:10px; padding:9px 12px; margin-bottom:12px; }
.cx-appok svg { width:15px; height:15px; }

/* ═══════════════ Tela de atendimento no estilo WhatsApp Web (pedido do Wilton, 28/08) ═══════════════ */
:root { --wa-thread: #efeae2; --wa-in: #ffffff; --wa-out: #d9fdd3; --wa-time: #667781; --wa-active: #f0f2f5; --wa-badge: #25d366; }
body.dark { --wa-thread: #0b141a; --wa-in: #202c33; --wa-out: #005c4b; --wa-time: #8696a0; --wa-active: #2a3942; --wa-badge: #00a884; }

/* lista da esquerda: branca e limpa como o app */
.conv-list { background: var(--surface); }
.conv-item { border-left-width: 0; padding: 12px 16px; }
.conv-item + .conv-item { border-top: 1px solid var(--line-soft); }
.conv-item:hover { background: var(--wa-active); }
.conv-item.active { background: var(--wa-active); border-left: 0; }
.conv-item.unread:not(.active) { background: transparent; border-left: 0; }
body.dark .conv-item.unread:not(.active) { background: transparent; }
.conv-item .unread { background: var(--wa-badge); color: #fff; }
.conv-item.unread .ci-name { font-weight: 700; }
.conv-item.unread .ci-last { font-weight: 500; }

/* área do chat: fundo cinza-claro com o padrão discreto do WhatsApp */
.conv-thread {
  background-color: var(--wa-thread);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.035' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='22' cy='22' r='7'/%3E%3Cpath d='M74 18l8 8M82 18l-8 8'/%3E%3Cpath d='M20 80c4-6 10-6 14 0'/%3E%3Crect x='70' y='70' width='14' height='10' rx='2'/%3E%3Cpath d='M100 45v14M93 52h14'/%3E%3Cpath d='M46 104a5 5 0 1 0 0-1'/%3E%3C/g%3E%3C/svg%3E");
}
.thread-scroll { padding: 18px 6%; }
.day-sep span { background: #fff; color: #54656f; font-size: 11.5px; font-weight: 600; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
body.dark .day-sep span { background: #182229; color: #8696a0; }

/* balões: ajustam ao conteúdo (nada de faixa larga para um "Ok") */
.bubble {
  width: fit-content; max-width: 65%; min-width: 64px;
  padding: 6px 8px 5px 9px; margin-bottom: 4px; border-radius: 8px;
  font-size: 14.2px; line-height: 1.42; color: #111b21;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
body.dark .bubble { color: #e9edef; }
.bubble.in  { background: var(--wa-in); border-top-left-radius: 0; }
.bubble.out { background: var(--wa-out); border-top-right-radius: 0; }
body.dark .bubble.in { background: var(--wa-in); }
/* rabicho */
.bubble.in::before, .bubble.out::before {
  content: ''; position: absolute; top: 0; width: 8px; height: 13px;
}
.bubble.in::before  { left: -8px;  background: var(--wa-in);  clip-path: polygon(100% 0, 100% 100%, 0 0); }
.bubble.out::before { right: -8px; background: var(--wa-out); clip-path: polygon(0 0, 0 100%, 100% 0); }
/* balões seguidos do mesmo lado: só o primeiro leva rabicho e mais espaço */
.bubble.in + .bubble.in::before, .bubble.out + .bubble.out::before { display: none; }
.bubble.in + .bubble.in  { border-top-left-radius: 8px; }
.bubble.out + .bubble.out { border-top-right-radius: 8px; }
.bubble.in + .bubble.out, .bubble.out + .bubble.in { margin-top: 10px; }
/* horário pequeno no canto, como no WhatsApp */
.bubble .b-time { font-size: 10.5px; color: var(--wa-time); margin: 2px -2px -2px 10px; text-align: right; float: right; line-height: 1; }
.bubble .b-time::after { content: ''; display: table; clear: both; }
.bubble .b-agent { font-size: 12px; margin-bottom: 2px; }
.bubble.has-img, .bubble.has-media { max-width: 330px; padding: 4px; }
.bubble.has-img .b-time, .bubble.has-media .b-time { padding: 0 6px 4px 0; }
.bubble.is-apagada { border: 1px dashed var(--red); }
@media (max-width: 900px) { .bubble { max-width: 82%; } .thread-scroll { padding: 14px 4%; } }
/* balões de mídia: largura fixa (o cartão do arquivo precisa de espaço), nome em uma linha */
.bubble.has-media { width: 300px; max-width: 82%; }
.bubble.has-img { width: auto; }
.b-doc { width: 100%; }
.b-doc-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; min-width: 0; }
.b-audio { width: 100%; }

/* ═══════════════ Composer: envio de texto pelo painel (estilo WhatsApp Web) ═══════════════ */
/* quebras de linha do texto (Shift+Enter e mensagens com várias linhas) aparecem como no app */
.bubble { white-space: pre-wrap; }
.bubble .b-agent { white-space: normal; }

.composer { flex-shrink: 0; position: relative; background: #f0f2f5; padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 7px; border-top: 1px solid rgba(11,20,26,.06); }
body.dark .composer { background: #202c33; border-top-color: rgba(233,237,239,.06); }

/* linha de status: chip da janela ou bloqueio */
.cp-status { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cp-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.cp-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.cp-chip .cp-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; animation: cpPulse 1.8s infinite; }
.cp-chip.ok { background: #d9fdd3; color: #0b6f4e; }
.cp-chip.warn { background: #fdf4e3; color: #8a5a12; }
body.dark .cp-chip.ok { background: rgba(0,168,132,.22); color: #7fe0c2; }
body.dark .cp-chip.warn { background: rgba(217,138,31,.2); color: #f5c66d; }
@keyframes cpPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.cp-block { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; width: 100%; padding: 10px 14px; border-radius: 10px; background: #fff; color: #54656f; font-size: 13px; box-shadow: 0 1px .5px rgba(11,20,26,.08); }
.cp-block > svg { width: 18px; height: 18px; color: #8696a0; flex-shrink: 0; }
.cp-block b { color: #111b21; font-weight: 700; }
.cp-block .btn-mini { margin-left: 4px; }
body.dark .cp-block { background: #2a3942; color: #aebac1; box-shadow: none; }
body.dark .cp-block b { color: #e9edef; }
body.dark .cp-block .btn-mini { background: #202c33; color: #e9edef; border-color: #3b4a54; }

/* barra: emoji + campo + enviar */
.cp-bar { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.cp-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #54656f; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s, transform .15s; }
.cp-btn svg { width: 24px; height: 24px; }
.cp-btn:hover:not(:disabled) { background: rgba(11,20,26,.07); }
.cp-btn:active:not(:disabled) { transform: scale(.94); }
.cp-btn:focus-visible { outline: 2px solid #00a884; outline-offset: 2px; }
.cp-btn.on { color: #00a884; }
.cp-btn:disabled { color: #8696a0; opacity: .55; cursor: not-allowed; }
body.dark .cp-btn { color: #8696a0; }
body.dark .cp-btn:hover:not(:disabled) { background: rgba(233,237,239,.08); }
body.dark .cp-btn.on { color: #00a884; }
.cp-send { background: #00a884; color: #fff; box-shadow: 0 1px 2px rgba(11,20,26,.18); }
.cp-send svg { width: 20px; height: 20px; margin-left: 2px; }
.cp-send:hover:not(:disabled) { background: #06cf9c; }
.cp-send:disabled { background: transparent; color: #8696a0; opacity: .55; box-shadow: none; }
.cp-input { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: #fff; color: #111b21; border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 14.5px; line-height: 20px; min-height: 38px; max-height: 138px; overflow-y: hidden; box-shadow: 0 1px .5px rgba(11,20,26,.08); transition: box-shadow .15s; }
.cp-input::placeholder { color: #8696a0; }
.cp-input:focus-visible { box-shadow: 0 0 0 2px rgba(0,168,132,.4); }
.cp-input:disabled { opacity: .6; cursor: not-allowed; }
body.dark .cp-input { background: #2a3942; color: #e9edef; box-shadow: none; }
body.dark .cp-input::placeholder { color: #8696a0; }

/* painel de emoji flutuante */
.cp-emoji { position: absolute; left: 14px; bottom: calc(100% + 6px); width: 344px; max-width: calc(100% - 28px); display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(11,20,26,.2); z-index: 30; animation: cpUp .16s ease; }
.cp-emoji[hidden] { display: none; }
.cp-emoji button { height: 38px; border: 0; background: transparent; border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; transition: background .12s, transform .12s; }
.cp-emoji button:hover { background: #f0f2f5; transform: scale(1.12); }
.cp-emoji button:focus-visible { outline: 2px solid #00a884; outline-offset: -2px; }
body.dark .cp-emoji { background: #233138; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
body.dark .cp-emoji button:hover { background: #2a3942; }
@keyframes cpUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* balões otimistas: enviando (relógio) e falhou (faixa vermelha com ações) */
.bubble.out.pendente { opacity: .85; }
.bubble.out.pendente .b-tick.pendente { color: var(--wa-time); letter-spacing: 0; }
.bubble.out.pendente .b-tick.pendente svg { width: 12px; height: 12px; vertical-align: -2px; }
.bubble.out.falhou { border: 1px solid var(--red); box-shadow: 0 1px 2px rgba(217,89,106,.25); }
.bubble.out.falhou::before { display: none; }
.b-fail { clear: both; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px -8px -5px -9px; padding: 7px 10px; border-top: 1px solid rgba(217,89,106,.35); border-radius: 0 0 8px 8px; background: var(--red-soft); color: #b4262b; font-size: 12px; line-height: 1.4; white-space: normal; }
.b-fail span { flex: 1 1 100%; }
.b-fail button { border: 0; background: transparent; padding: 2px 0; color: #b4262b; font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.b-fail button:hover { color: #8e1a22; }
.b-fail button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
body.dark .b-fail { color: #ffb3bd; border-top-color: rgba(217,89,106,.5); }
body.dark .b-fail button { color: #ffb3bd; }
body.dark .b-fail button:hover { color: #fff; }

/* celular: barra ocupa 100 %, botões de 40 px, painel de emoji encosta na borda */
@media (max-width: 760px) {
  .composer { padding: 6px 8px 8px; }
  .cp-btn { width: 40px; height: 40px; }
  .cp-emoji { left: 8px; max-width: calc(100% - 16px); grid-template-columns: repeat(8, 1fr); }
  .cp-block { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-emoji { animation: none; }
  .cp-btn, .cp-input, .cp-emoji button { transition: none; }
  .cp-btn:active:not(:disabled), .cp-emoji button:hover { transform: none; }
  .cp-chip .cp-dot { animation: none; }
}

/* ═══════════ Composer sprint 2: anexos, modelos, respostas rápidas, áudio gravado ═══════════ */
.conv-thread { position: relative; }
.cp-bar[hidden], .cp-rec[hidden], .cp-btn[hidden], .cp-attach-menu[hidden], .cp-quick[hidden], .cp-drop[hidden] { display: none; }
.cp-tpl-btn { color: #00a884; }
body.dark .cp-tpl-btn { color: #00a884; }
.cp-tpl-cta { display: inline-flex; align-items: center; gap: 5px; border-color: #d9a441; color: #8a5a12; background: #fff; }
.cp-tpl-cta:hover { border-color: #8a5a12; color: #6b4300; }
.cp-tpl-cta svg { width: 14px; height: 14px; }
body.dark .cp-tpl-cta { background: #2a3942; color: #f5c66d; border-color: rgba(217,138,31,.45); }
body.dark .cp-tpl-cta:hover { color: #fff; }

/* menu de anexos (clipe) */
.cp-attach-menu { position: absolute; left: 14px; bottom: calc(100% + 8px); min-width: 216px; padding: 6px; display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(11,20,26,.2); z-index: 31; animation: cpUp .16s ease; }
.cp-attach-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 0; background: transparent; border-radius: 10px; color: #111b21; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background .12s; }
.cp-attach-menu button:hover, .cp-attach-menu button:focus-visible { background: #f0f2f5; outline: none; }
.cp-am-ico { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.cp-am-ico svg { width: 18px; height: 18px; }
.cp-am-ico.foto { background: linear-gradient(135deg, #bf59cf, #7f66ff); }
.cp-am-ico.doc { background: linear-gradient(135deg, #5157ae, #6f76dd); }
.cp-am-ico.audio { background: linear-gradient(135deg, #f0692b, #f5a623); }
body.dark .cp-attach-menu { background: #233138; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
body.dark .cp-attach-menu button { color: #e9edef; }
body.dark .cp-attach-menu button:hover, body.dark .cp-attach-menu button:focus-visible { background: #2a3942; }

/* arrastar e soltar sobre a conversa */
.cp-drop { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(240,242,245,.86); backdrop-filter: blur(2px); pointer-events: none; animation: mFade .15s ease; }
.cp-drop-in { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 46px; border: 2px dashed #00a884; border-radius: 20px; background: #fff; color: #111b21; box-shadow: 0 14px 36px rgba(11,20,26,.16); }
.cp-drop-in svg { width: 40px; height: 40px; color: #00a884; margin-bottom: 6px; }
.cp-drop-in b { font-size: 16px; }
.cp-drop-in span { font-size: 12.5px; color: #667781; }
body.dark .cp-drop { background: rgba(11,20,26,.8); }
body.dark .cp-drop-in { background: #202c33; color: #e9edef; border-color: #00a884; }
body.dark .cp-drop-in span { color: #8696a0; }

/* modal de prévia antes de enviar */
.cp-prev-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; min-height: 110px; }
.cp-prev-img { max-width: 100%; max-height: 42vh; border-radius: 10px; object-fit: contain; }
.cp-prev-video { max-width: 100%; max-height: 42vh; border-radius: 10px; background: #000; }
.cp-prev-file { display: flex; align-items: center; gap: 12px; width: 100%; }
.cp-prev-ico { width: 48px; height: 48px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-strong); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cp-prev-ico svg { width: 24px; height: 24px; }
.cp-prev-info { min-width: 0; }
.cp-prev-nome { font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-word; }
.cp-prev-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cp-prev-audio { width: 100%; }
.cp-prev-line { font-size: 12px; color: var(--muted); margin: -4px 0 12px; text-align: center; word-break: break-word; }

/* barra de progresso fina no balão que está subindo */
.b-prog { clear: both; height: 3px; margin: 6px -4px -4px; background: rgba(11,20,26,.1); border-radius: 0 0 8px 8px; overflow: hidden; }
.b-prog-bar { height: 100%; width: 0; background: #00a884; transition: width .25s ease; }
body.dark .b-prog { background: rgba(233,237,239,.12); }
.b-tpl-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--wa-time); margin-bottom: 3px; white-space: normal; }
.b-tpl-tag svg { width: 12px; height: 12px; }
.bubble.out.pendente .b-img { opacity: .9; }

/* gravação de áudio */
.cp-rec { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; }
.cp-rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #ea3d3d; box-shadow: 0 0 0 0 rgba(234,61,61,.5); animation: cpRecPulse 1.1s ease-in-out infinite; flex-shrink: 0; margin-left: 4px; }
@keyframes cpRecPulse { 0% { box-shadow: 0 0 0 0 rgba(234,61,61,.55); opacity: 1; } 70% { box-shadow: 0 0 0 8px rgba(234,61,61,0); opacity: .55; } 100% { box-shadow: 0 0 0 0 rgba(234,61,61,0); opacity: 1; } }
.cp-rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14.5px; color: #111b21; min-width: 40px; }
.cp-rec-hint { flex: 1; font-size: 13px; color: #667781; }
.cp-rec-cancel { color: #ea3d3d; }
.cp-rec-cancel:hover:not(:disabled) { background: rgba(234,61,61,.12); }
.cp-mic { color: #54656f; }
body.dark .cp-rec-time { color: #e9edef; }
body.dark .cp-rec-hint { color: #8696a0; }

/* popover de respostas rápidas ("/") */
.cp-quick { position: absolute; left: 14px; right: 14px; bottom: calc(100% + 6px); max-height: 300px; overflow-y: auto; padding: 6px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(11,20,26,.2); z-index: 32; animation: cpUp .16s ease; }
.cp-quick-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 9px; text-align: left; cursor: pointer; color: #111b21; }
.cp-quick-item.on, .cp-quick-item:hover { background: #f0f2f5; }
.cp-quick-item:focus-visible { outline: 2px solid #00a884; outline-offset: -2px; }
.cp-quick-atalho { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 700; color: #00a884; background: rgba(0,168,132,.12); padding: 3px 8px; border-radius: 8px; flex-shrink: 0; }
.cp-quick-txt { display: flex; flex-direction: column; min-width: 0; }
.cp-quick-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-quick-txt small { font-size: 12px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-quick-empty { padding: 12px 14px; font-size: 13px; color: #667781; }
body.dark .cp-quick { background: #233138; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
body.dark .cp-quick-item { color: #e9edef; }
body.dark .cp-quick-item.on, body.dark .cp-quick-item:hover { background: #2a3942; }
body.dark .cp-quick-txt small, body.dark .cp-quick-empty { color: #8696a0; }

/* modelos aprovados (picker) */
.tpl-load { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; padding: 8px 0; }
.tpl-load svg { width: 16px; height: 16px; color: var(--brand); }
.tpl-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); margin-bottom: 12px; }
.tpl-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tpl-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.tpl-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; font-size: 14px; color: var(--ink); outline: none; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.tpl-item { display: block; width: 100%; text-align: left; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.tpl-item:hover, .tpl-item:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
.tpl-item:active { transform: scale(.995); }
.tpl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-nome { font-size: 14px; font-weight: 700; color: var(--ink); text-transform: capitalize; }
.tpl-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 20px; background: var(--bg); color: var(--ink-2); }
.tpl-cat.marketing { background: var(--purple-soft); color: var(--purple); }
.tpl-cat.utility { background: var(--green-soft); color: var(--green); }
.tpl-cat.authentication { background: var(--amber-soft); color: var(--amber); }
.tpl-lang { font-size: 11px; color: var(--muted); }
.tpl-body { font-size: 13px; color: var(--ink-2); margin-top: 5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.tpl-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.tpl-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.tpl-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-strong); padding: 4px 0; margin-bottom: 8px; }
.tpl-back svg { width: 15px; height: 15px; }
.tpl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tpl-prev { background: var(--wa-thread); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.tpl-bubble { position: relative; max-width: 100%; width: auto; margin-left: auto; }
.tpl-bubble::before { display: none; }
.tpl-prev-head { font-weight: 700; margin-bottom: 4px; }
.tpl-prev-media { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--wa-time); background: rgba(0,0,0,.06); border-radius: 8px; padding: 10px; margin-bottom: 6px; }
.tpl-prev-media svg { width: 16px; height: 16px; }
.tpl-prev-body { white-space: pre-wrap; }
.tpl-prev-foot { font-size: 12px; color: var(--wa-time); margin-top: 6px; }
.tpl-prev-btns { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; margin-left: auto; width: fit-content; min-width: 200px; max-width: 100%; }
.tpl-prev-btns span { display: block; text-align: center; padding: 7px 10px; border-radius: 8px; background: var(--wa-in); color: #027eb5; font-size: 13px; font-weight: 600; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
body.dark .tpl-prev-btns span { color: #53bdeb; }
.tpl-h4 { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.tpl-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.tpl-actions .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
.tpl-actions .btn-primary svg { width: 15px; height: 15px; }

/* respostas rápidas: gestão no modal de configurações */
.qr-list { display: flex; flex-direction: column; }
.qr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qr-row:last-child { border-bottom: 0; }
.qr-row.off .qr-info { opacity: .5; }
.qr-info { min-width: 0; flex: 1; }
.qr-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qr-atalho { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.qr-titulo { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-texto { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qr-edit { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.qr-edit:hover { background: var(--brand-soft); color: var(--brand-strong); }
.qr-edit svg { width: 15px; height: 15px; }
.qr-confirm { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.qr-confirm button { padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.qr-confirm .sim { background: var(--red); color: #fff; }
.qr-confirm .sim:disabled { opacity: .6; }
.qr-confirm .nao { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
.qr-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.qr-atalho-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.qr-atalho-wrap span { padding: 0 2px 0 13px; color: var(--muted); font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.qr-atalho-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.m-field .qr-atalho-wrap input { border: 0; background: transparent; padding-left: 4px; box-shadow: none; }
.m-field .qr-atalho-wrap input:focus { border: 0; box-shadow: none; background: transparent; }
.m-field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 14px; font-family: inherit; resize: vertical; min-height: 96px; line-height: 1.45; }
.m-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.qr-form-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 760px) {
  .cp-attach-menu, .cp-quick { left: 8px; }
  .cp-quick { right: 8px; }
  .cp-drop-in { padding: 24px 28px; }
  .tpl-list { max-height: 46vh; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-attach-menu, .cp-quick, .cp-drop { animation: none; }
  .cp-rec-dot { animation: none; box-shadow: none; }
  .b-prog-bar, .tpl-item { transition: none; }
  .tpl-item:active { transform: none; }
}

/* ═══════════ Sprint 3: menu do balão, citação, reações, nova conversa, agendamento ═══════════ */
/* botão discreto no canto do balão (aparece no hover; no toque o menu abre por toque longo) */
.b-more {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: #54656f; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(11,20,26,.18);
  opacity: 0; transform: translateY(-2px); transition: opacity .12s, transform .12s, background .12s;
}
.b-more svg { width: 15px; height: 15px; }
.bubble:hover .b-more, .bubble.menu-open .b-more, .b-more:focus-visible { opacity: 1; transform: none; }
.b-more:hover { background: #fff; color: #111b21; }
.b-more:focus-visible { outline: 2px solid #00a884; outline-offset: 1px; }
.bubble.out .b-more { background: rgba(217,253,211,.94); }
.bubble.has-img .b-more, .bubble.has-media .b-more { top: 6px; right: 6px; }
body.dark .b-more { background: rgba(32,44,51,.94); color: #aebac1; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
body.dark .bubble.out .b-more { background: rgba(0,92,75,.94); }
body.dark .b-more:hover { color: #fff; }

/* menu flutuante (ancorado ao balão, dentro de .conv-thread) */
.b-menu {
  position: absolute; z-index: 45; width: 250px; padding: 6px;
  background: #fff; border-radius: 12px; white-space: normal;
  box-shadow: 0 10px 30px rgba(11,20,26,.22), 0 0 0 1px rgba(11,20,26,.05);
  animation: bmIn .14s ease; transform-origin: top center;
}
.b-menu.up { transform-origin: bottom center; }
@keyframes bmIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.b-react-pick { display: flex; gap: 2px; padding: 2px 2px 6px; border-bottom: 1px solid #f0f2f5; margin-bottom: 4px; }
.b-react-pick button {
  flex: 1; height: 34px; border: 0; background: transparent; border-radius: 9px; padding: 0;
  font-size: 20px; line-height: 1; cursor: pointer; transition: transform .12s, background .12s;
}
.b-react-pick button:hover:not(:disabled) { background: #f0f2f5; transform: scale(1.18); }
.b-react-pick button.on { background: rgba(0,168,132,.14); box-shadow: inset 0 0 0 1.5px #00a884; }
.b-react-pick button.more { flex: 0 0 30px; color: #54656f; display: inline-flex; align-items: center; justify-content: center; }
.b-react-pick button.more svg { width: 16px; height: 16px; }
.b-react-pick button:disabled { opacity: .35; cursor: not-allowed; }
.b-react-pick button:focus-visible { outline: 2px solid #00a884; outline-offset: -2px; }
.b-react-all { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 2px 0 6px; margin-bottom: 4px; border-bottom: 1px solid #f0f2f5; max-height: 150px; overflow-y: auto; }
.b-react-all[hidden] { display: none; }
.b-react-all button { height: 29px; border: 0; background: transparent; border-radius: 7px; padding: 0; font-size: 18px; line-height: 1; cursor: pointer; transition: background .12s; }
.b-react-all button:hover, .b-react-all button.on { background: #f0f2f5; }
.b-react-all button.on { box-shadow: inset 0 0 0 1.5px #00a884; }
.bm-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; background: transparent; border-radius: 9px; color: #111b21;
  font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; transition: background .12s;
}
.bm-item svg { width: 17px; height: 17px; color: #54656f; flex-shrink: 0; }
.bm-item span { flex: 1; }
.bm-item small { font-size: 10.5px; color: #8696a0; font-weight: 600; }
.bm-item:hover:not(:disabled), .bm-item:focus-visible { background: #f0f2f5; outline: none; }
.bm-item:disabled { opacity: .45; cursor: not-allowed; }
.bm-item.danger { color: #c1272d; } .bm-item.danger svg { color: #c1272d; }
body.dark .b-menu { background: #233138; box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04); }
body.dark .b-react-pick, body.dark .b-react-all { border-bottom-color: rgba(255,255,255,.08); }
body.dark .b-react-pick button:hover:not(:disabled), body.dark .b-react-all button:hover, body.dark .b-react-all button.on,
body.dark .bm-item:hover:not(:disabled), body.dark .bm-item:focus-visible { background: #2a3942; }
body.dark .b-react-pick button.more { color: #aebac1; }
body.dark .bm-item { color: #e9edef; } body.dark .bm-item svg { color: #aebac1; }
body.dark .bm-item small { color: #8696a0; }
body.dark .bm-item.danger, body.dark .bm-item.danger svg { color: #ff8a92; }

/* reações: chips clicáveis; a que este painel enviou fica marcada */
.b-react span[data-e] { cursor: pointer; transition: transform .12s, background .12s, border-color .12s; }
.b-react span[data-e]:hover { transform: translateY(-1px); background: #fff; }
.b-react span.mine { border-color: #00a884; background: rgba(0,168,132,.12); }
body.dark .b-react span[data-e]:hover { background: rgba(255,255,255,.14); }
body.dark .b-react span.mine { border-color: #00a884; background: rgba(0,168,132,.2); }

/* citação dentro do balão */
.b-quote {
  display: flex; margin: 0 0 5px; border-radius: 7px; overflow: hidden; cursor: pointer;
  background: rgba(11,20,26,.06); white-space: normal; min-width: 170px; max-width: 100%;
  transition: background .12s;
}
.bubble.out .b-quote { background: rgba(11,20,26,.075); }
.b-quote:hover { background: rgba(11,20,26,.11); }
.b-quote:focus-visible { outline: 2px solid #00a884; outline-offset: -2px; }
.b-quote .bq-bar { width: 4px; flex-shrink: 0; background: #53bdeb; }
.b-quote.me .bq-bar { background: #06cf9c; }
.b-quote .bq-body { padding: 5px 10px 6px 8px; min-width: 0; }
.b-quote .bq-nome { font-size: 12px; font-weight: 700; color: #1f8fbf; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-quote.me .bq-nome { color: #06a06c; }
.b-quote .bq-txt { font-size: 12.5px; color: #667781; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b-quote.off { cursor: default; opacity: .8; }
.b-quote.off .bq-bar { background: #8696a0; } .b-quote.off .bq-nome { color: #8696a0; }
.bubble.has-img .b-quote, .bubble.has-media .b-quote { margin: 2px 2px 6px; }
body.dark .b-quote { background: rgba(255,255,255,.07); }
body.dark .bubble.out .b-quote { background: rgba(0,0,0,.22); }
body.dark .b-quote:hover { background: rgba(255,255,255,.12); }
body.dark .b-quote .bq-txt { color: #aebac1; }
body.dark .b-quote .bq-nome { color: #53bdeb; } body.dark .b-quote.me .bq-nome { color: #06cf9c; }
/* destaque breve ao chegar na mensagem citada */
.bubble.flash { animation: bFlash 1.4s ease; }
@keyframes bFlash { 0%, 30% { box-shadow: 0 0 0 3px rgba(0,168,132,.6), 0 1px .5px rgba(11,20,26,.13); } 100% { box-shadow: 0 1px .5px rgba(11,20,26,.13); } }

/* faixas do composer: "Respondendo a" e "Editando mensagem" */
.cp-faixas { display: flex; flex-direction: column; gap: 6px; }
.cp-faixas[hidden] { display: none; }
.cp-reply, .cp-editing {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 0; border-radius: 10px;
  background: #fff; box-shadow: 0 1px .5px rgba(11,20,26,.08); overflow: hidden; animation: cpUp .14s ease;
}
.cp-fx-bar { width: 4px; align-self: stretch; background: #06cf9c; border-radius: 10px 0 0 10px; flex-shrink: 0; margin-right: 2px; }
.cp-editing { padding-left: 10px; border-left: 4px solid #d9a441; }
.cp-fx-ico { display: inline-flex; color: #d9a441; flex-shrink: 0; } .cp-fx-ico svg { width: 18px; height: 18px; }
.cp-fx-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 2px 0; }
.cp-fx-txt b { font-size: 12.5px; color: #06a06c; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-editing .cp-fx-txt b { color: #8a5a12; }
.cp-fx-txt span { font-size: 12.5px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-fx-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: #54656f; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .12s; }
.cp-fx-x svg { width: 16px; height: 16px; }
.cp-fx-x:hover { background: rgba(11,20,26,.07); }
.cp-fx-x:focus-visible { outline: 2px solid #00a884; outline-offset: 1px; }
.composer.editing .cp-input { box-shadow: 0 0 0 2px rgba(217,164,65,.5); }
.composer.editing .cp-send { background: #d9a441; }
.composer.editing .cp-send:hover:not(:disabled) { background: #e4b558; }
.composer.editing .cp-send svg { margin-left: 0; }
body.dark .cp-reply, body.dark .cp-editing { background: #2a3942; box-shadow: none; }
body.dark .cp-fx-txt b { color: #06cf9c; } body.dark .cp-editing .cp-fx-txt b { color: #f5c66d; }
body.dark .cp-fx-txt span { color: #8696a0; }
body.dark .cp-fx-x { color: #aebac1; } body.dark .cp-fx-x:hover { background: rgba(233,237,239,.08); }

/* agendar: botão do composer + chip no cabeçalho da conversa */
.cp-sched-btn svg { width: 22px; height: 22px; }
/* bloco nome + subtítulo do cabeçalho: encolhe com reticências em vez de quebrar palavra por palavra (celular).
   A coluna da thread passa a minmax(0,1fr) e .conv-thread ganha min-width:0: texto sem quebra não pode
   empurrar a grade para além da viewport. */
.conv { grid-template-columns: 360px minmax(0, 1fr) 320px; }
body.details-collapsed .conv { grid-template-columns: 360px minmax(0, 1fr); }
.conv-thread { min-width: 0; }
@media (max-width: 1180px) { .conv { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 760px) { .conv, body.details-collapsed .conv { grid-template-columns: minmax(0, 1fr); } }
.thread-head .th-block { flex: 1 1 auto; min-width: 0; }
.thread-head .th-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-head .th-sub { display: flex; align-items: center; min-width: 0; }
.thread-head .th-sub-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-sched {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 9px 2px 7px; flex-shrink: 0;
  border-radius: 20px; border: 1px solid rgba(0,168,132,.35); background: rgba(0,168,132,.1); color: #0b6f4e;
  font-size: 11px; font-weight: 700; vertical-align: middle; cursor: pointer; transition: background .12s;
}
.th-sched svg { width: 13px; height: 13px; }
.th-sched:hover { background: rgba(0,168,132,.2); }
.th-sched[hidden] { display: none; }
body.dark .th-sched { color: #7fe0c2; background: rgba(0,168,132,.16); border-color: rgba(0,168,132,.4); }

/* nova conversa: botão ao lado da busca + modal */
.list-top { display: flex; align-items: center; gap: 8px; }
.list-top .search-box { flex: 1; min-width: 0; }
.btn-nova {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 13px; border-radius: 11px;
  background: linear-gradient(135deg, #00a884, #0b8f6f); color: #fff; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,168,132,.28); transition: filter .12s, transform .1s;
}
.btn-nova svg { width: 16px; height: 16px; }
.btn-nova:hover { filter: brightness(1.06); }
.btn-nova:active { transform: scale(.97); }
.btn-nova:focus-visible { outline: 2px solid #00a884; outline-offset: 2px; }
@media (max-width: 1180px) { .btn-nova span { display: none; } .btn-nova { width: 42px; padding: 0; justify-content: center; } }
.nc-tel { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.nc-tel span { padding: 0 6px 0 13px; color: var(--muted); font-weight: 700; font-size: 14px; }
.nc-tel:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.m-field .nc-tel input { border: 0; background: transparent; box-shadow: none; padding-left: 4px; letter-spacing: .3px; }
.m-field .nc-tel input:focus { border: 0; box-shadow: none; background: transparent; }
.nc-canal { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.nc-canal b { color: var(--ink-2); }
.nc-tag { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; color: #fff; margin-right: 4px; vertical-align: 1px; }
.nc-tag.meta { background: linear-gradient(135deg, #0064e0, #0082fb); }
.nc-tag.qr { background: linear-gradient(135deg, #25d366, #128c7e); }
.m-field label small { font-weight: 500; opacity: .7; }

/* agendamento: modal e lista */
.m-msg.warn { background: rgba(217,138,31,.14); color: #8a5a12; }
.m-msg b { font-weight: 700; }
body.dark .m-msg.warn { color: #f5c66d; }
.m-field input[type="datetime-local"] { font-family: inherit; }
.ag-para { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.ag-para svg { width: 14px; height: 14px; color: #00a884; flex-shrink: 0; }
.ag-para b { color: var(--ink-2); }
.ag-list { display: flex; flex-direction: column; }
.ag-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ag-row:last-child { border-bottom: 0; }
.ag-ico { width: 36px; height: 36px; border-radius: 11px; background: rgba(0,168,132,.12); color: #00a884; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ag-ico svg { width: 18px; height: 18px; }
.ag-row.st-enviada .ag-ico { background: var(--green-soft); color: var(--green); }
.ag-row.st-erro .ag-ico { background: var(--red-soft); color: var(--red); }
.ag-row.st-cancelada { opacity: .55; }
.ag-row.st-cancelada .ag-ico { background: var(--bg); color: var(--muted); }
.ag-info { flex: 1; min-width: 0; }
.ag-txt { font-size: 13.5px; color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.ag-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ag-st { font-weight: 700; }
.ag-st.pendente { color: #0b6f4e; } .ag-st.enviada { color: var(--green); } .ag-st.erro { color: var(--red); } .ag-st.cancelada { color: var(--muted); }
body.dark .ag-st.pendente { color: #7fe0c2; }
.ag-acts { flex-shrink: 0; }
.ag-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.ag-empty svg { width: 34px; height: 34px; color: #00a884; opacity: .6; }
/* botões do rodapé do modal com ícone (Agendar, Iniciar conversa, Apagar): ícone no tamanho do texto */
.modal-foot .btn-primary, .modal-foot .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.modal-foot .btn-primary svg, .modal-foot .btn-ghost svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary.danger { background: linear-gradient(135deg, #e5484d, #b4262b); display: inline-flex; align-items: center; gap: 7px; }
.btn-primary.danger svg { width: 15px; height: 15px; }
.bm-del-prev { background: var(--wa-thread); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.bm-del-prev .bubble { margin: 0; }

/* métricas discretas: nota no cartão do dashboard e "enviadas hoje" em Atendentes */
.card .card-note { font-size: 11px; color: var(--muted); margin-top: 4px; opacity: .85; }
.cell-sub { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.at-hoje { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -8px 0 14px; font-size: 12.5px; color: var(--muted); }
.at-hoje[hidden] { display: none; }
.at-hoje-h { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.at-hoje-h svg { width: 14px; height: 14px; color: #00a884; }
.at-hoje-h b { color: var(--ink); }
.at-hoje-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.at-hoje-chip b { color: #0b6f4e; font-weight: 800; }
body.dark .at-hoje-chip b { color: #7fe0c2; }

/* toque: sem botão no canto (menu por toque longo) e sem seleção acidental de texto no balão */
@media (hover: none) {
  .b-more { display: none; }
  .bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .b-menu { width: min(280px, calc(100vw - 24px)); }
}
@media (max-width: 760px) {
  .th-sched span { display: none; }
  .th-sched { padding: 3px 6px; margin-left: 6px; }
  /* painel de detalhes recolhido no desktop (localStorage) não pode virar 2 colunas no celular */
  body.details-collapsed .conv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .b-menu, .cp-reply, .cp-editing { animation: none; }
  .bubble.flash { animation: none; box-shadow: 0 0 0 3px rgba(0,168,132,.6); }
  .b-react-pick button, .b-react-all button, .b-react span[data-e], .b-more, .btn-nova, .th-sched, .b-quote, .bm-item, .cp-fx-x { transition: none; }
  .b-react-pick button:hover:not(:disabled), .b-react span[data-e]:hover, .btn-nova:active { transform: none; }
}

/* ═══════════ Arquivo: conversas arquivadas (automático após N dias sem andamento, manual pelo painel) ═══════════ */
/* alternador Ativas | Arquivadas: segmentado com cursor que desliza */
.ar-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); isolation: isolate; }
.ar-switch[hidden] { display: none; }
.ar-sw { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .18s; }
.ar-sw svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .8; }
.ar-sw b { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: rgba(16,24,40,.06); color: inherit; min-width: 22px; text-align: center; line-height: 1.5; }
.ar-sw.on { color: var(--ink); }
.ar-sw.on svg { opacity: 1; color: var(--brand-strong); }
.ar-sw.on b { background: var(--brand-soft); color: var(--brand-strong); }
.ar-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ar-sw-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(16,24,40,.14), 0 0 0 1px rgba(16,24,40,.04); transition: transform .22s cubic-bezier(.2,.8,.3,1); }
body.ar-modo .ar-sw-thumb { transform: translateX(100%); }
body.dark .ar-sw b { background: rgba(255,255,255,.08); }
body.dark .ar-sw-thumb { background: #2a3542; box-shadow: 0 1px 3px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04); }
/* no modo arquivo os filtros das ativas não se aplicam; o lote troca de ação */
body.ar-modo .seg-filter, body.ar-modo .adv-toggle, body.ar-modo .adv { display: none; }
body.ar-modo .bulk-actions [data-bulk] { display: none; }
.bulk-actions [data-arbulk] { display: none; }
body.ar-on:not(.ar-modo) .bulk-actions [data-arbulk="arquivar"] { display: inline-flex; }
body.ar-on.ar-modo .bulk-actions [data-arbulk="desarquivar"] { display: inline-flex; }

/* cabeçalho explicativo da lista de arquivadas */
.ar-head { display: flex; align-items: flex-start; gap: 11px; padding: 12px 16px; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 82%); border-bottom: 1px solid var(--line-soft); }
.ar-head-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--sh-1); }
.ar-head-ico svg { width: 18px; height: 18px; }
.ar-head-txt { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ar-head-txt b { display: block; color: var(--ink); font-weight: 600; font-size: 12.5px; }
.ar-head-cfg { flex-shrink: 0; align-self: center; font-size: 12px; font-weight: 700; color: var(--brand-strong); padding: 5px 11px; border-radius: 8px; border: 1px solid var(--brand-soft-2); background: var(--surface); transition: background .12s, border-color .12s; }
.ar-head-cfg:hover { background: var(--brand-soft); border-color: var(--brand); }
.ar-head.off { background: linear-gradient(135deg, var(--amber-soft), var(--surface) 82%); }
.ar-head.off .ar-head-ico { color: var(--amber); }

/* itens do arquivo: prévia, "Arquivada em dd/mm" e selo automático/manual */
.ar-list { transition: opacity .15s; }
.ar-list.ar-dim { opacity: .5; pointer-events: none; }
.ar-item .ci-last { color: var(--muted); }
.ar-item.active { background: var(--wa-active); }
.ar-selo { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; padding: 2px 7px 2px 6px; border-radius: 20px; white-space: nowrap; }
.ar-selo svg { width: 10px; height: 10px; }
.ar-selo.auto { background: var(--brand-soft); color: var(--brand-strong); }
.ar-selo.manual { background: var(--bg); color: var(--ink-2); }
body.dark .ar-selo.manual { background: rgba(255,255,255,.08); }
.ar-when { font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* esqueleto enquanto a primeira página chega */
.ar-sk { display: flex; gap: 13px; padding: 14px 16px; align-items: center; }
.ar-sk + .ar-sk { border-top: 1px solid var(--line-soft); }
.ar-sk-av { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.ar-sk-l { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ar-sk-b { display: block; height: 10px; border-radius: 6px; }
.ar-sk-av, .ar-sk-b, .ar-th-sk span { background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 40%, var(--line-soft) 60%); background-size: 400% 100%; animation: arShimmer 1.3s ease-in-out infinite; }
@keyframes arShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* rodapé da lista: carregar mais / carregando / fim */
.ar-foot { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 16px 20px; font-size: 11.5px; color: var(--muted); }
.ar-more { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; transition: border-color .12s, color .12s, transform .1s; }
.ar-more svg { width: 14px; height: 14px; }
.ar-more:hover { border-color: var(--brand); color: var(--brand-strong); }
.ar-more:active { transform: scale(.97); }
.ar-more:disabled { opacity: .6; cursor: wait; }
.ar-carregando { display: inline-flex; align-items: center; gap: 8px; }
.ar-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: arSpin .8s linear infinite; flex-shrink: 0; vertical-align: -2px; }
@keyframes arSpin { to { transform: rotate(360deg); } }
.empty .empty-cta { align-items: center; gap: 6px; border: 0; font-family: inherit; cursor: pointer; }
.empty .empty-cta svg { width: 15px; height: 15px; }

/* thread da arquivada: faixa no topo, esqueleto ao abrir e aviso acima do composer */
.ar-faixa { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #fdf4e3; color: #8a5a12; border-bottom: 1px solid rgba(217,138,31,.28); font-size: 12.5px; flex-shrink: 0; animation: cpUp .18s ease; }
.ar-faixa-ico { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; background: rgba(217,138,31,.16); align-items: center; justify-content: center; flex-shrink: 0; }
.ar-faixa-ico svg { width: 16px; height: 16px; }
.ar-faixa-txt { flex: 1; min-width: 0; line-height: 1.35; display: flex; flex-wrap: wrap; gap: 0 5px; }
.ar-faixa-txt b { font-weight: 700; }
.ar-faixa-txt span { color: #a5722a; }
.ar-faixa .btn-mini { flex-shrink: 0; border-color: #d9a441; color: #8a5a12; background: #fff; }
.ar-faixa .btn-mini:hover { border-color: #8a5a12; color: #6b4300; }
body.dark .ar-faixa { background: rgba(217,138,31,.14); color: #f5c66d; border-bottom-color: rgba(217,138,31,.3); }
body.dark .ar-faixa-ico { background: rgba(217,138,31,.18); }
body.dark .ar-faixa-txt span { color: #d9a441; }
body.dark .ar-faixa .btn-mini { background: #2a3942; color: #f5c66d; border-color: rgba(217,138,31,.45); }
body.dark .ar-faixa .btn-mini:hover { color: #fff; }
.ar-th-sk { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.ar-th-sk span { display: block; height: 36px; border-radius: 8px; width: 46%; }
.ar-th-sk span:nth-child(2n) { margin-left: auto; width: 38%; }
.ar-th-sk span:nth-child(3) { width: 58%; }
.ar-th-sk span:nth-child(5) { width: 30%; }
.ar-cp-note { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; font-size: 11.5px; font-weight: 500; color: #8a5a12; background: #fdf4e3; border-top: 1px solid rgba(217,138,31,.2); flex-shrink: 0; }
.ar-cp-note svg { width: 13px; height: 13px; }
body.dark .ar-cp-note { background: rgba(217,138,31,.12); color: #f5c66d; border-top-color: rgba(217,138,31,.25); }
.d-actions .ar-act { grid-column: 1 / -1; }

/* toast com ação (Desfazer) */
.toast.ar-toast { padding-right: 8px; max-width: min(560px, calc(100vw - 28px)); }
.toast .toast-act { margin-left: 6px; padding: 6px 11px; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 12.5px; font-weight: 700; flex-shrink: 0; transition: background .12s; }
.toast .toast-act:hover { background: rgba(255,255,255,.26); }
.toast .toast-act:focus-visible { outline: 2px solid var(--brand-mid); outline-offset: 1px; }

/* modal de confirmação (nomes em lote) e configuração (admin) */
.ar-conf-nomes { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.ar-conf-nomes span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-row.ar-cfg-row { gap: 16px; }
.ar-cfg-dias { display: flex; align-items: center; gap: 10px; }
.m-field .ar-cfg-dias input { width: 96px; text-align: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.ar-cfg-dias span { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.ar-cfg-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.ar-cfg-stat div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; min-width: 0; }
.ar-cfg-stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-cfg-stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.ar-cfg-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.ar-cfg-run .btn-ghost { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 13px; }
.ar-cfg-run .btn-ghost svg { width: 15px; height: 15px; }
.ar-cfg-run .m-hint { margin: 0; flex: 1 1 100%; }
.ar-cfg-res { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--green); min-height: 20px; }
.ar-cfg-res svg { width: 15px; height: 15px; }
.ar-cfg-res:empty { display: none; }

/* Visão Geral: nota clicável no cartão de conversas */
.card .card-note.ar-note { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border-radius: 6px; transition: color .12s; }
.card .card-note.ar-note svg { width: 12px; height: 12px; flex-shrink: 0; }
.card .card-note.ar-note:hover, .card .card-note.ar-note:focus-visible { color: var(--brand-strong); outline: none; }

@media (max-width: 760px) {
  .ar-sw { font-size: 12px; gap: 5px; }
  .ar-head { padding: 10px 14px; }
  .ar-faixa { padding: 8px 12px; font-size: 12px; gap: 8px; }
  .ar-faixa-txt { flex-direction: column; gap: 0; }
  .ar-faixa .btn-mini { padding: 7px 10px; }
  .ar-cfg-stat { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ar-sw { padding: 0 6px; }
  .toast.ar-toast { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 340px) { .ar-sw span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ar-sw, .ar-sw-thumb, .ar-list, .ar-more, .ar-head-cfg, .toast .toast-act, .card .card-note.ar-note { transition: none; }
  .ar-sk-av, .ar-sk-b, .ar-th-sk span, .ar-spin, .ar-faixa { animation: none; }
  .ar-more:active { transform: none; }
}

/* Aguardando resposta (03/11/2026): conversa começada pelo celular, cliente ainda sem número */
.lp-bloco { border-bottom: 1px solid var(--line-soft); background: linear-gradient(135deg, var(--amber-soft), var(--surface) 78%); }
.lp-head { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 16px; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.lp-head:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lp-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--surface); color: var(--amber); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--sh-1); }
.lp-ico svg { width: 17px; height: 17px; }
.lp-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lp-tit b { font-size: 12.5px; font-weight: 700; }
.lp-tit small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.lp-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--amber); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.lp-car { color: var(--muted); display: flex; transition: transform .18s; }
.lp-car svg { width: 18px; height: 18px; }
.lp-bloco.on .lp-car { transform: rotate(180deg); }
.lp-list { max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line-soft); background: var(--surface); }
.lp-item { cursor: pointer; }
.lp-av { background: var(--amber-soft); color: var(--amber); display: flex; align-items: center; justify-content: center; }
.lp-av svg { width: 18px; height: 18px; }
.lp-selo { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.lp-linha { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lp-mais { padding: 10px 16px; font-size: 11.5px; color: var(--muted); text-align: center; }
.lp-item { transition: background .14s; }
.lp-item:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.lp-n.pulsa { animation: lpPulsa 1.1s ease-out 1; }
@keyframes lpPulsa { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 55%, transparent); transform: scale(1.12); } 100% { box-shadow: 0 0 0 10px transparent; transform: scale(1); } }
.lp-list .lp-item { animation: lpEntra .22s ease-out both; }
@keyframes lpEntra { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
/* modal da conversa pendente: cabeçalho, conversa com a cara do WhatsApp e "Já sabe o telefone?" */
.lp-cab { display: flex; align-items: center; gap: 11px; padding: 2px 2px 14px; border-bottom: 1px solid var(--line-soft); }
.lp-cab-av { width: 40px; height: 40px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); display: flex; align-items: center; justify-content: center; flex: none; }
.lp-cab-av svg { width: 20px; height: 20px; }
.lp-cab > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lp-cab b { font-size: 14px; color: var(--ink); }
.lp-cab > div span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-thread { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; padding: 14px 18px; margin: 14px 0 0; border-radius: 12px;
  background-color: var(--wa-thread, var(--bg));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.035' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='22' cy='22' r='7'/%3E%3Cpath d='M74 18l8 8M82 18l-8 8'/%3E%3Cpath d='M20 80c4-6 10-6 14 0'/%3E%3Crect x='70' y='70' width='14' height='10' rx='2'/%3E%3Cpath d='M100 45v14M93 52h14'/%3E%3Cpath d='M46 104a5 5 0 1 0 0-1'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px var(--line-soft); }
.lp-thread:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lp-dia { display: flex; justify-content: center; margin: 2px 0 10px; }
.lp-dia span { background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 7px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.lp-msg { display: flex; margin-bottom: 3px; }
.lp-msg.out { justify-content: flex-end; }
.lp-bal { position: relative; width: fit-content; max-width: 78%; min-width: 64px; padding: 6px 9px 5px; border-radius: 8px; font-size: 13.5px; line-height: 1.42;
  white-space: pre-wrap; word-break: break-word; color: var(--ink); background: var(--wa-in, var(--surface)); box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.lp-msg.out .lp-bal { background: var(--wa-out, var(--brand-soft)); }
.lp-msg.out + .lp-msg.in, .lp-msg.in + .lp-msg.out { margin-top: 8px; }
.lp-bal span { float: right; margin: 6px -2px -3px 10px; font-size: 10.5px; line-height: 1; color: var(--wa-time, var(--muted)); }
.lp-achar { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-soft); }
.lp-achar label { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.lp-achar label b { font-size: 13px; color: var(--ink); }
.lp-achar label span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.lp-achar-l { display: flex; gap: 8px; }
.lp-achar-l input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; transition: border-color .12s, box-shadow .12s; }
.lp-achar-l input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lp-achar-btn { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; font-size: 13px; transition: filter .12s, transform .12s; }
.lp-achar-btn:active { transform: translateY(1px); }
.lp-achar-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lp-achar-btn svg { width: 15px; height: 15px; }
.lp-achar-btn.carregando { opacity: .75; cursor: progress; }
.lp-achar-btn.carregando svg { animation: arSpin .8s linear infinite; }
.lp-achar-msg { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lp-achar-msg.erro { color: var(--red, #d64545); }
.lp-achar-msg.ok { color: var(--green, var(--brand-strong)); font-weight: 600; }
.lp-rodape { margin: 10px 2px 0; font-size: 11.5px; color: var(--muted); }
.lp-spin-ico .ar-spin { width: 22px; height: 22px; }
@media (max-width: 520px) { .lp-achar-l { flex-direction: column; } .lp-achar-l input { flex: none; width: 100%; } .lp-thread { padding: 12px; } .lp-bal { max-width: 88%; } }
@media (prefers-reduced-motion: reduce) { .lp-car, .lp-item, .lp-achar-l input, .lp-achar-btn { transition: none; } .lp-n.pulsa, .lp-list .lp-item, .lp-achar-btn.carregando svg { animation: none; } }

/* faixa: filtro por linha e "esfriando" (sem resposta há mais de 24 h) */
.lp-chips { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; border-top: 1px solid var(--line-soft); background: var(--surface); scrollbar-width: thin; }
.lp-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2, var(--ink)); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.lp-chip b { font-size: 11px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-chip:hover { border-color: var(--amber); }
.lp-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.lp-chip.on { background: var(--amber); border-color: var(--amber); color: #fff; }
.lp-chip.on b { color: rgba(255,255,255,.85); }
.lp-chip.frio:not(.on) { color: #c2410c; border-color: color-mix(in srgb, #c2410c 35%, transparent); background: color-mix(in srgb, #c2410c 7%, var(--surface)); }
body.dark .lp-chip.frio:not(.on) { color: #fb923c; }
.lp-chip.frio.on { background: #c2410c; border-color: #c2410c; }
.lp-selo.frio { background: color-mix(in srgb, #c2410c 13%, transparent); color: #c2410c; }
body.dark .lp-selo.frio { color: #fb923c; }
.lp-item.frio .lp-av { background: color-mix(in srgb, #c2410c 13%, transparent); color: #c2410c; }
/* ligação provável dentro da conversa */
.lc-lista { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 0; }
.lc-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line-soft)); box-shadow: var(--sh-1);
  animation: lcEntra .28s ease-out both; transition: opacity .3s, transform .3s; }
@keyframes lcEntra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lc-card.enviando { opacity: .7; }
.lc-card.feita { border-color: var(--green, var(--brand)); transform: scale(.985); opacity: 0; }
.lc-card.saiu { opacity: 0; transform: translateX(8px); }
.lc-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); }
.lc-ico svg { width: 17px; height: 17px; }
.lc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-txt b { font-size: 13px; color: var(--ink); line-height: 1.3; }
.lc-txt span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.lc-acts { display: flex; gap: 6px; flex: none; }
.lc-sim, .lc-nao { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: filter .12s, background .12s, border-color .12s, transform .12s; }
.lc-sim { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); }
.lc-sim svg { width: 14px; height: 14px; }
.lc-sim:hover { filter: brightness(1.06); }
.lc-nao { border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.lc-nao:hover { color: var(--ink); border-color: var(--ink-2, var(--muted)); }
.lc-sim:active, .lc-nao:active { transform: translateY(1px); }
.lc-sim:focus-visible, .lc-nao:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lc-sim:disabled, .lc-nao:disabled { cursor: progress; }
@media (max-width: 760px) { .lc-card { flex-wrap: wrap; } .lc-acts { width: 100%; } .lc-sim { flex: 1; justify-content: center; } }
/* guia "Como atualizar o WhatsApp" */
.nc-hist-guia { display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--amber); cursor: pointer; }
.nc-hist-guia svg { width: 13px; height: 13px; transition: transform .14s; }
.nc-hist-guia:hover svg { transform: translateX(2px); }
.nc-hist-guia:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.gw-intro { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.gw-intro b { color: var(--ink); }
.gw-abas { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--bg); margin-bottom: 14px; }
.gw-aba { padding: 6px 16px; border-radius: 8px; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.gw-aba.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.gw-aba:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.gw-passos { margin: 0; padding: 0; list-style: none; counter-reset: gw; display: flex; flex-direction: column; gap: 10px; }
.gw-passos li { counter-increment: gw; display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.gw-passos li::before { content: counter(gw); flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gw-pe { margin-top: 18px; display: flex; justify-content: flex-end; }
.gw-copiar { display: inline-flex; align-items: center; gap: 7px; }
.gw-copiar svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .lc-card, .lp-chip, .gw-aba, .nc-hist-guia svg, .lc-sim, .lc-nao { transition: none; animation: none; } }

/* Monitoria: ligações do WhatsApp sem cliente identificado (03/11/2026) */
.mn-sc { margin-top: 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px 18px; box-shadow: var(--sh-1); }
.mn-sc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mn-sc-h h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); text-wrap: balance; }
.mn-sc-h span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mn-sc-p { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 72ch; }
.mn-sc-p b { color: var(--ink); }
.mn-sc-scroll { overflow-x: auto; }
.mn-sc-t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }
.mn-sc-t th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.mn-sc-t td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink); }
.mn-sc-t tr:last-child td { border-bottom: 0; }
.mn-sc-t td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mn-sc-t small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.mn-sc-res { display: inline-flex; font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.mn-sc-res.ok { background: var(--green-soft, var(--brand-soft)); color: var(--green, var(--brand-strong)); }
.mn-sc-res.nao { background: var(--amber-soft); color: var(--amber); }
.mn-sc-conv { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--brand-strong); font: inherit; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s; }
.mn-sc-conv:hover { background: var(--brand-soft); border-color: var(--brand); }
.mn-sc-conv:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mn-sc-conv svg { width: 14px; height: 14px; flex-shrink: 0; }
.mn-sc-conv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-sc-conv.pend { color: var(--amber); }
.mn-sc-conv.pend:hover { background: var(--amber-soft); border-color: var(--amber); }
.mn-sc-nada { font-size: 12px; color: var(--muted); }
.mn-sc-n { padding: 2px 9px; border-radius: 20px; background: var(--bg); font-weight: 700; color: var(--ink-2, var(--muted)); }
.mn-sc-t tbody tr { transition: background .12s; }
.mn-sc-t tbody tr:hover { background: var(--bg); }
.mn-sc-quem { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mn-sc-quem .avatar, .mn-sh-chip .avatar { width: 28px; height: 28px; font-size: 10.5px; flex: none; }
.mn-sc-tipo { display: inline-flex; width: 22px; height: 22px; margin-right: 7px; border-radius: 7px; align-items: center; justify-content: center; vertical-align: -6px; background: var(--brand-soft); color: var(--brand-strong); }
.mn-sc-tipo svg { width: 12px; height: 12px; }
.mn-sc-tipo.vid { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
body.dark .mn-sc-tipo.vid { color: #b49cff; }
.mn-sh { display: flex; gap: 11px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-soft), transparent 160%); border: 1px solid color-mix(in srgb, var(--amber) 26%, transparent); }
.mn-sh-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); color: var(--amber); display: flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--sh-1); }
.mn-sh-ico svg { width: 15px; height: 15px; }
.mn-sh > div { min-width: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2, var(--muted)); }
.mn-sh > div > b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; text-wrap: balance; }
.mn-sh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mn-sh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 12px; font-weight: 600; color: var(--ink); max-width: 100%; }
.mn-sh-chip .avatar { width: 22px; height: 22px; font-size: 9px; }
.mn-sh-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-sc > .mn-sc-h + .mn-sh { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .mn-sc-conv { transition: none; } }

/* ── Confirmação de leitura (Configurações) ────────────────────────────── */
.rc-opts { display: flex; flex-direction: column; gap: 8px; }
.rc-opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.rc-opt:hover { border-color: var(--brand); background: var(--surface); }
.rc-opt.on { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.rc-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.rc-opt .rc-mark {
  flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--line-2, var(--line)); background: var(--surface); transition: border-color .15s;
}
.rc-opt.on .rc-mark { border-color: var(--brand); box-shadow: inset 0 0 0 3.5px var(--brand); }
.rc-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.rc-opt .rc-txt { display: block; min-width: 0; }
.rc-opt .rc-txt b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rc-opt .rc-txt small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .rc-opt { transition: none; } }

/* ═══════════ Telefonia (LemonPABX): aba, presença, histórico, click2call, cards na conversa, jornada, config ═══════════ */
:root { --vz-blue: #2f6fe4; --vz-blue-soft: #e8effd; --vz-green: #0f9d77; --vz-green-soft: #e3f5ee; --vz-red: #d9596a; --vz-red-soft: #fbe9ec; --vz-amber: #c98a2b; --vz-amber-soft: #fbf1df; --vz-gray: #8b96a5; --vz-gray-soft: #eef1f5; --vz-purple: #6a5acd; --vz-purple-soft: #ecebf8; }
body.dark { --vz-blue: #6d9cff; --vz-blue-soft: rgba(109,156,255,.16); --vz-green: #38c79a; --vz-green-soft: rgba(56,199,154,.16); --vz-red: #ff8a92; --vz-red-soft: rgba(255,138,146,.16); --vz-amber: #f0b55a; --vz-amber-soft: rgba(240,181,90,.16); --vz-gray: #8a97a8; --vz-gray-soft: rgba(255,255,255,.07); --vz-purple: #a99cf0; --vz-purple-soft: rgba(169,156,240,.18); }
/* módulo inativo (state sem voz.ativo): nada da telefonia aparece */
body:not(.vz-on) .vz-only { display: none !important; }
.nav-item .vz-nav-badge { background: var(--vz-blue); }
.nav-item .vz-nav-badge:empty { display: none; }
.tabular, .vz-call-timer, .vz-pres-cron, .vz-td-dur b, .vz-kpi-v, .vz-jtime, .vz-pag span, .vz-cc-meta { font-variant-numeric: tabular-nums; }

/* ── cabeçalho da aba ── */
.vz-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vz-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vz-head-right .btn-mini { padding: 8px 12px; }
.vz-meu-ramal { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: var(--vz-green); background: var(--vz-green-soft); border: 1px solid transparent; }
.vz-meu-ramal svg { width: 15px; height: 15px; }
.vz-meu-ramal b { font-weight: 800; }
.vz-meu-ramal.off { color: var(--vz-amber); background: var(--vz-amber-soft); }

/* ── KPIs do dia ── */
.vz-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.vz-kpi { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s; min-width: 0; position: relative; overflow: hidden; }
.vz-kpi:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.vz-kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-kpi-ico svg { width: 20px; height: 20px; }
.vz-kpi-ico.ok { background: var(--vz-green-soft); color: var(--vz-green); }
.vz-kpi-ico.bad { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-kpi-ico.amber { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-kpi-ico.purple { background: var(--vz-purple-soft); color: var(--vz-purple); }
.vz-kpi-body { min-width: 0; }
.vz-kpi-l { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-kpi-v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; margin-top: 2px; white-space: nowrap; }
.vz-kpi-f { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-cf.ok { color: var(--vz-green); font-weight: 700; } .vz-cf.warn { color: var(--vz-amber); font-weight: 700; } .vz-cf.bad { color: var(--vz-red); font-weight: 700; }
.vz-kpi.loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%); background-size: 200% 100%; animation: arShimmer 1.4s ease-in-out infinite; pointer-events: none; }
body.dark .vz-kpi.loading::after { background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,.06) 50%, transparent 80%); background-size: 200% 100%; }

/* ── painéis da aba ── */
.vz-panel { margin-bottom: 18px; }
.vz-panel .panel-head { flex-wrap: wrap; row-gap: 8px; }
.vz-pres-resumo { display: flex; gap: 6px; flex-wrap: wrap; }
.vz-pr { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); padding: 3px 9px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.vz-pr i { width: 7px; height: 7px; border-radius: 50%; background: var(--vz-gray); }
.vz-pr.on i { background: var(--vz-green); } .vz-pr.call i { background: var(--vz-blue); } .vz-pr.pause i { background: var(--vz-amber); }
.vz-pr b { font-weight: 800; color: var(--ink); }

/* ── presença: cards por ramal ── */
.vz-pres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.vz-pres { position: relative; border: 1px solid var(--line); border-left: 4px solid var(--vz-gray); border-radius: 12px; padding: 11px 13px 11px 12px; background: var(--bg-2); cursor: pointer; transition: box-shadow .18s, transform .18s, border-color .18s; min-width: 0; }
.vz-pres:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: var(--brand-soft-2); border-left-color: inherit; }
.vz-pres-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vz-pres-num { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.vz-pres-st { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 20px; background: var(--vz-gray-soft); color: var(--vz-gray); white-space: nowrap; }
.vz-pres-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vz-pres-nome { font-size: 13px; font-weight: 600; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.vz-pres-nome em { font-style: normal; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--brand-strong); background: var(--brand-soft); padding: 1px 6px; border-radius: 10px; flex-shrink: 0; }
.vz-pres-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-pres-sub.off { font-style: italic; }
.vz-pres-det { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-2); }
.vz-pres-com { display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-pres-com svg { width: 13px; height: 13px; flex-shrink: 0; }
.vz-pres-cron { font-weight: 800; font-size: 12.5px; flex-shrink: 0; }
.vz-pres.on { border-left-color: var(--vz-green); } .vz-pres.on .vz-pres-st { background: var(--vz-green-soft); color: var(--vz-green); } .vz-pres.on .vz-pres-com svg { color: var(--vz-green); }
.vz-pres.call { border-left-color: var(--vz-blue); background: linear-gradient(135deg, var(--vz-blue-soft), var(--bg-2) 70%); } .vz-pres.call .vz-pres-st { background: var(--vz-blue-soft); color: var(--vz-blue); } .vz-pres.call .vz-pres-st i { animation: vzPulse 1.2s ease-in-out infinite; } .vz-pres.call .vz-pres-cron { color: var(--vz-blue); } .vz-pres.call .vz-pres-com svg { color: var(--vz-blue); }
.vz-pres.call::after { content: ''; position: absolute; inset: -1px; border-radius: 12px; border: 1px solid var(--vz-blue); opacity: .35; animation: vzRingCard 2s ease-out infinite; pointer-events: none; }
.vz-pres.pause { border-left-color: var(--vz-amber); } .vz-pres.pause .vz-pres-st { background: var(--vz-amber-soft); color: var(--vz-amber); } .vz-pres.pause .vz-pres-cron { color: var(--vz-amber); } .vz-pres.pause .vz-pres-com svg { color: var(--vz-amber); }
.vz-pres.off { border-left-color: var(--vz-gray); opacity: .75; }
.vz-pres.unk { border-left-style: dashed; }
.vz-pres.meu { box-shadow: 0 0 0 2px var(--brand-soft-2); }
.vz-pres.sk { cursor: default; display: flex; flex-direction: column; gap: 9px; min-height: 92px; }
.vz-pres.sk:hover { transform: none; box-shadow: none; }
.vz-sk-b { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 40%, var(--line-soft) 60%); background-size: 400% 100%; animation: arShimmer 1.3s ease-in-out infinite; }
@keyframes vzPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@keyframes vzRingCard { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.04); opacity: 0; } }

/* ── histórico: filtros ── */
.vz-hist-head .vz-hist-tools { display: flex; gap: 6px; }
.vz-hist-tools .btn-mini svg { width: 14px; height: 14px; }
.vz-filtros { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.vz-f-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vz-per { display: flex; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-shrink: 0; }
.vz-per-b { border: 0; background: transparent; font: 700 12px inherit; color: var(--muted); padding: 6px 11px; border-radius: 8px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.vz-per-b:hover { color: var(--ink); }
.vz-per-b.on { background: var(--brand-soft); color: var(--brand-strong); }
.vz-f-datas { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.vz-f-datas[hidden] { display: none; }
.vz-f-datas input, .vz-f-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); outline: none; font-family: inherit; transition: .15s; max-width: 190px; }
.vz-f-row select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; }
.vz-f-datas input:focus, .vz-f-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vz-f-busca { position: relative; flex: 1 1 200px; min-width: 160px; }
.vz-f-busca svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.vz-f-busca input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: var(--surface); color: var(--ink); outline: none; transition: .15s; }
.vz-f-busca input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vz-f-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand-strong); }
.vz-chip svg { width: 13px; height: 13px; }
.vz-chip button { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; background: rgba(0,0,0,.06); }
.vz-chip button svg { width: 11px; height: 11px; }
.vz-chip button:hover { background: rgba(0,0,0,.12); }
.vz-f-limpar { font-size: 12px; font-weight: 700; color: var(--brand-strong); text-decoration: underline; text-underline-offset: 2px; padding: 4px 2px; }

/* ── histórico: tabela ── */
.vz-table-wrap { overflow-x: auto; transition: opacity .15s; }
.vz-table-wrap.dim { opacity: .55; pointer-events: none; }
.vz-table th:first-child { width: 44px; border-top-left-radius: 0; }
.vz-table th:last-child { border-top-right-radius: 0; }
.vz-table td { padding: 11px 14px; font-size: 13px; }
.vz-table td small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.vz-td-dir { width: 44px; padding-right: 0 !important; }
.vz-dir { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--vz-gray-soft); color: var(--vz-gray); }
.vz-dir svg { width: 15px; height: 15px; }
.vz-dir.saida { background: var(--vz-green-soft); color: var(--vz-green); }
.vz-dir.entrada { background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-dir.perdida { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-dir.interna { background: var(--vz-purple-soft); color: var(--vz-purple); }
.vz-tr.st-miss .vz-dir.saida, .vz-tr.st-fail .vz-dir.saida, .vz-tr.st-busy .vz-dir.saida { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-link { font-weight: 600; color: var(--brand-strong); text-decoration: none; border-bottom: 1px dotted currentColor; }
.vz-link:hover { color: var(--brand); }
.vz-nome { font-weight: 600; }
.vz-muted { color: var(--muted); }
.vz-td-dur b { font-weight: 700; }
.vz-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--vz-gray-soft); color: var(--ink-2); white-space: nowrap; }
.vz-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: vzPulse 1.2s ease-in-out infinite; }
.vz-st.ok { background: var(--vz-green-soft); color: var(--vz-green); }
.vz-st.miss, .vz-st.fail { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-st.busy { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-st.cancel { background: var(--vz-gray-soft); color: var(--muted); }
.vz-st.wait, .vz-st.live { background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--vz-blue); animation: vzPulse 1.2s ease-in-out infinite; }
.vz-audio { display: block; width: 230px; max-width: 100%; height: 34px; }
.vz-sem-grav { font-size: 11.5px; font-style: italic; }
.vz-tabchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--vz-purple); background: var(--vz-purple-soft); padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-tabchip svg { width: 11px; height: 11px; flex-shrink: 0; }
.vz-row-tab { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; margin-left: 4px; vertical-align: middle; opacity: 0; transition: opacity .12s, background .12s; }
.vz-row-tab svg { width: 13px; height: 13px; }
.vz-tr:hover .vz-row-tab, .vz-row-tab:focus-visible { opacity: 1; }
.vz-row-tab:hover { background: var(--vz-purple-soft); color: var(--vz-purple); }
.vz-pag { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.vz-pag-btns { display: flex; align-items: center; gap: 8px; }
.vz-pag-btns .btn-mini { padding: 5px 7px; }
.vz-pag-btns .btn-mini:disabled { opacity: .4; cursor: not-allowed; }
.vz-pag-n { font-weight: 700; color: var(--ink-2); }
.vz-hist-sk { padding: 8px 16px; }
.vz-sk-row { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.vz-sk-row:last-child { border-bottom: 0; }
.vz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 38px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.vz-empty > svg { width: 36px; height: 36px; color: var(--brand); opacity: .6; margin-bottom: 4px; }
.vz-empty b { color: var(--ink); font-size: 14.5px; }
.vz-empty .empty-cta { margin-top: 10px; }

/* ── cards de ligação na linha do tempo ── */
.vz-call-card { display: flex; gap: 10px; width: fit-content; max-width: 78%; min-width: 250px; margin: 6px 0 8px; padding: 9px 12px 9px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--vz-green); box-shadow: 0 1px .5px rgba(11,20,26,.13); font-size: 13px; color: var(--ink); white-space: normal; position: relative; }
.vz-call-card.out { margin-left: auto; }
.vz-call-card.in { margin-right: auto; }
.vz-call-card.mid { margin-left: auto; margin-right: auto; }
.vz-call-card.dir-entrada { border-left-color: var(--vz-blue); }
.vz-call-card.dir-perdida { border-left-color: var(--vz-red); }
.vz-call-card.dir-interna { border-left-color: var(--vz-purple); }
.vz-call-card.st-miss, .vz-call-card.st-fail, .vz-call-card.st-busy, .vz-call-card.st-cancel { border-left-color: var(--vz-amber); }
.vz-call-card.dir-perdida.st-miss { border-left-color: var(--vz-red); }
.vz-call-card.live { border-left-color: var(--vz-blue); }
.vz-call-card.live::after { content: ''; position: absolute; inset: -1px; border-radius: 12px; border: 1px solid var(--vz-blue); opacity: .35; animation: vzRingCard 2s ease-out infinite; pointer-events: none; }
.vz-call-card.flash { animation: bFlash 1.4s ease; }
.vz-cc-ico { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--vz-green-soft); color: var(--vz-green); }
.vz-cc-ico svg { width: 17px; height: 17px; }
.vz-call-card.dir-entrada .vz-cc-ico { background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-call-card.dir-perdida .vz-cc-ico { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-call-card.dir-interna .vz-cc-ico { background: var(--vz-purple-soft); color: var(--vz-purple); }
.vz-call-card.st-miss .vz-cc-ico, .vz-call-card.st-fail .vz-cc-ico, .vz-call-card.st-busy .vz-cc-ico { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-call-card.dir-perdida.st-miss .vz-cc-ico { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-cc-main { min-width: 0; flex: 1; }
.vz-cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vz-cc-t { font-weight: 700; font-size: 13px; }
.vz-cc-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.vz-call-card .vz-audio { margin-top: 7px; width: 100%; min-width: 220px; }
.vz-call-tab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; font-size: 12px; color: var(--ink-2); background: var(--vz-purple-soft); border-radius: 8px; padding: 5px 9px; }
.vz-call-tab svg { width: 12px; height: 12px; color: var(--vz-purple); flex-shrink: 0; }
.vz-call-tab b { color: var(--vz-purple); }
.vz-call-tab span { flex: 1 1 100%; font-size: 11.5px; }
.vz-cc-tab { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 0; font-size: 11.5px; font-weight: 700; color: var(--brand-strong); background: transparent; opacity: .85; transition: opacity .12s; }
.vz-cc-tab svg { width: 12px; height: 12px; }
.vz-cc-tab:hover { opacity: 1; text-decoration: underline; }
body.dark .vz-call-card { background: #202c33; border-color: rgba(255,255,255,.06); box-shadow: none; color: #e9edef; }
/* Ligação/vídeo do WhatsApp na conversa (28/10/2026): mesmo cartão da telefonia, sem ações */
.vz-call-card.wa-call .wa-call-quem { margin-top: 1px; opacity: .85; }

/* ── botão Ligar (cabeçalho + detalhes) e telefone clicável ── */
.th-actions .vz-btn-ligar { color: var(--vz-green); border-color: rgba(15,157,119,.4); }
.th-actions .vz-btn-ligar:hover { background: var(--vz-green-soft); border-color: var(--vz-green); color: var(--vz-green); }
.vz-btn-ligar.sem-ramal { opacity: .55; }
.d-actions .vz-btn-ligar { grid-column: 1 / -1; background: linear-gradient(135deg, #16b364, #0d9488); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(22,179,100,.28); }
.d-actions .vz-btn-ligar:hover { filter: brightness(1.06); color: #fff; }
.d-actions .vz-btn-ligar.sem-ramal { background: var(--bg-2); color: var(--muted); box-shadow: none; border: 1px dashed var(--line); }
.vz-tel { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; text-decoration-color: var(--vz-green); white-space: nowrap; cursor: pointer; }
.vz-tel svg { width: 12px; height: 12px; vertical-align: -1px; margin-left: 2px; color: var(--vz-green); }
.vz-tel:hover { text-decoration-style: solid; }

/* ── modal de chamada (estados) ── */
.vz-call { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 2px; }
.vz-call-top { display: flex; flex-direction: column; align-items: center; }
.vz-call-av { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.vz-call-av .avatar.lg { width: 68px; height: 68px; font-size: 22px; }
.vz-call-av .avatar.vz-av-tel { background: linear-gradient(135deg, #16b364, #0d9488); }
.vz-call-av .avatar.vz-av-tel svg { width: 28px; height: 28px; }
.vz-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--vz-green); opacity: 0; }
.vz-call.st-chamando .vz-ring, .vz-call.st-ligando .vz-ring, .vz-call.st-discando .vz-ring { animation: vzRing 1.8s ease-out infinite; }
.vz-call.st-chamando .vz-ring.r2, .vz-call.st-ligando .vz-ring.r2, .vz-call.st-discando .vz-ring.r2 { animation-delay: .9s; }
.vz-call.st-em_andamento .vz-ring { opacity: .5; border-color: var(--vz-blue); animation: vzRingSoft 2.4s ease-in-out infinite; }
.vz-call.st-em_andamento .vz-ring.r2 { display: none; }
@keyframes vzRing { 0% { transform: scale(.72); opacity: .65; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes vzRingSoft { 0%, 100% { transform: scale(.98); opacity: .35; } 50% { transform: scale(1.06); opacity: .7; } }
.vz-call-ico { position: absolute; right: 2px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--vz-green); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18), 0 0 0 3px var(--surface); }
.vz-call-ico svg { width: 15px; height: 15px; }
.vz-call.st-em_andamento .vz-call-ico { background: var(--vz-blue); }
.vz-call.st-fim.st-miss .vz-call-ico, .vz-call.st-fim.st-fail .vz-call-ico, .vz-call.st-erro .vz-call-ico { background: var(--vz-red); }
.vz-call.st-fim.st-busy .vz-call-ico, .vz-call.st-fim.st-cancel .vz-call-ico { background: var(--vz-amber); }
.vz-call-nome { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.vz-call-tel { font-size: 13px; color: var(--muted); margin-top: 2px; }
.vz-call-estado { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--ink); }
.vz-call-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--vz-green); animation: vzPulse 1.2s ease-in-out infinite; }
.vz-call.st-em_andamento .vz-call-dot { background: var(--vz-blue); }
.vz-call.st-fim .vz-call-dot, .vz-call.st-erro .vz-call-dot { animation: none; }
.vz-call.st-fim.st-ok .vz-call-dot { background: var(--vz-green); }
.vz-call.st-fim.st-miss .vz-call-dot, .vz-call.st-fim.st-fail .vz-call-dot, .vz-call.st-erro .vz-call-dot { background: var(--vz-red); }
.vz-call.st-fim.st-busy .vz-call-dot, .vz-call.st-fim.st-cancel .vz-call-dot { background: var(--vz-amber); }
.vz-call-timer { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 4px; line-height: 1.1; color: var(--ink); }
.vz-call.st-em_andamento .vz-call-timer { color: var(--vz-blue); }
.vz-call-dica { font-size: 12.5px; color: var(--muted); margin-top: 6px; max-width: 360px; line-height: 1.5; }
.vz-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 16px 0 4px; width: 100%; max-width: 380px; }
.vz-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.vz-step i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); transition: background .2s, box-shadow .2s; }
.vz-step::before { content: ''; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: -1; }
.vz-step:first-child::before { display: none; }
.vz-step.done i, .vz-step.on i { background: var(--vz-green); box-shadow: 0 0 0 1px var(--vz-green); }
.vz-step.done::before, .vz-step.on::before { background: var(--vz-green); }
.vz-step.on { color: var(--vz-green); }
.vz-step.on i { animation: vzPulse 1.2s ease-in-out infinite; }
.vz-step.done { color: var(--ink-2); }
.vz-call-acts { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.vz-call-acts .btn-ghost, .vz-call-acts .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
.vz-call-acts svg { width: 15px; height: 15px; }
.vz-call-hint { flex: 1; text-align: left; font-size: 11.5px; color: var(--muted); }
.vz-tab { width: 100%; text-align: left; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.vz-tab-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; }
.vz-tab-h svg { width: 14px; height: 14px; color: var(--vz-purple); }
.vz-tab-h small { font-weight: 500; color: var(--muted); }
.vz-tab-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.vz-tab-opt { padding: 6px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); transition: all .12s; }
.vz-tab-opt:hover { border-color: var(--vz-purple); color: var(--vz-purple); }
.vz-tab-opt.on { background: var(--vz-purple); border-color: var(--vz-purple); color: #fff; box-shadow: 0 3px 10px rgba(106,90,205,.3); }
.vz-tab-obs { width: 100%; margin-top: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-family: inherit; resize: vertical; min-height: 48px; line-height: 1.4; }
.vz-tab-obs:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vz-tab-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--vz-green); }
.vz-tab-ok svg { width: 14px; height: 14px; }
.vz-tab-ctx { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 12px; }
.vz-tab-ctx > svg { width: 20px; height: 20px; color: var(--brand-strong); flex-shrink: 0; }
.vz-tab-ctx b { display: block; font-size: 13.5px; }
.vz-tab-ctx span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── detalhes: bloco Ligações ── */
.vz-dcount { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--brand-strong); margin-left: 4px; }
.vz-dl-list { display: flex; flex-direction: column; }
.vz-dl { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 9px; cursor: pointer; transition: background .12s; }
.vz-dl:hover { background: var(--bg-2); }
.vz-dl + .vz-dl { border-top: 1px solid var(--line-soft); }
.vz-dl-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--vz-green-soft); color: var(--vz-green); }
.vz-dl-ico svg { width: 14px; height: 14px; }
.vz-dl.dir-entrada .vz-dl-ico { background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-dl.dir-perdida .vz-dl-ico { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-dl.dir-interna .vz-dl-ico { background: var(--vz-purple-soft); color: var(--vz-purple); }
.vz-dl.st-miss .vz-dl-ico, .vz-dl.st-fail .vz-dl-ico, .vz-dl.st-busy .vz-dl-ico { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-dl.dir-perdida.st-miss .vz-dl-ico { background: var(--vz-red-soft); color: var(--vz-red); }
.vz-dl-txt { min-width: 0; display: flex; flex-direction: column; }
.vz-dl-txt b { font-size: 12.5px; font-weight: 600; }
.vz-dl-txt span { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.vz-dl-txt span svg { width: 11px; height: 11px; color: var(--vz-purple); }
.vz-dl-empty { font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.vz-dl-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--brand-strong); padding: 4px 0; }
.vz-dl-all svg { width: 13px; height: 13px; }
.vz-dl-all:hover { text-decoration: underline; }

/* ── Visão Geral: card Telefonia hoje ── */
body.vz-on .kpis { grid-template-columns: repeat(6, 1fr); }
.card .card-ico.ic-vz { background: var(--vz-green-soft); color: var(--vz-green); }
.card.vz-card { cursor: pointer; }
.card.vz-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card .card-note.vz-note { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-strong); font-weight: 600; }
.card .card-note.vz-note svg { width: 12px; height: 12px; }

/* ── jornada do operador (chip no topo) ── */
.vz-jornada { flex-shrink: 0; }
.vz-jchip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px 0 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; max-width: 260px; }
.vz-jchip:hover { border-color: var(--brand-soft-2); }
.vz-jchip.busy { opacity: .6; pointer-events: none; }
.vz-jdot { width: 8px; height: 8px; border-radius: 50%; background: var(--vz-gray); flex-shrink: 0; position: relative; }
.vz-jtxt { overflow: hidden; text-overflow: ellipsis; }
.vz-jtime { font-size: 11px; color: var(--muted); font-weight: 600; }
.vz-jtime:empty { display: none; }
.vz-jcaret { display: inline-flex; color: var(--muted); }
.vz-jcaret svg { width: 14px; height: 14px; }
.vz-jchip.disponivel { color: var(--vz-green); background: var(--vz-green-soft); border-color: transparent; }
.vz-jchip.disponivel .vz-jdot { background: var(--vz-green); }
.vz-jchip.disponivel .vz-jdot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--vz-green); opacity: .5; animation: pulse 1.8s ease-out infinite; }
.vz-jchip.disponivel .vz-jtime, .vz-jchip.disponivel .vz-jcaret { color: var(--vz-green); opacity: .8; }
.vz-jchip.pausa { color: var(--vz-amber); background: var(--vz-amber-soft); border-color: transparent; }
.vz-jchip.pausa .vz-jdot { background: var(--vz-amber); }
.vz-jchip.pausa .vz-jtime, .vz-jchip.pausa .vz-jcaret { color: var(--vz-amber); opacity: .85; }
.vz-jmenu { width: 290px; }
.vz-jm-sub { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 12px 2px; }
.vz-jm-empty { font-size: 12px; color: var(--muted); padding: 8px 12px; }
.vz-jm-pausa { justify-content: flex-start; }
.vz-jm-tipo { margin-left: auto; font-style: normal; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 2px 7px; border-radius: 10px; background: var(--vz-green-soft); color: var(--vz-green); }
.vz-jm-tipo.improd { background: var(--vz-amber-soft); color: var(--vz-amber); }

/* ── Configurações › Telefonia ── */
.vz-cfg-sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.vz-cfg-sec.last { border-bottom: 0; }
.vz-cfg-sec:first-of-type { padding-top: 0; }
.vz-cfg-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.vz-cfg-h svg { width: 15px; height: 15px; color: var(--brand-strong); }
.vz-cfg-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.vz-cfg-stat div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; min-width: 0; }
.vz-cfg-stat b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-cfg-stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.vz-cfg-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vz-cfg-acts .btn-ghost { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; font-size: 13px; }
.vz-cfg-acts .btn-ghost svg { width: 14px; height: 14px; }
.vz-cfg-res { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--vz-green); min-height: 20px; }
.vz-cfg-res svg { width: 14px; height: 14px; }
.vz-cfg-res:empty { display: none; }
.vz-cfg-sec .m-hint { margin-top: 8px; }
.vz-test-ok { background: var(--vz-green-soft); border: 1px solid rgba(15,157,119,.3); border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; }
.vz-test-h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--vz-green); }
.vz-test-h svg { width: 15px; height: 15px; }
.vz-test-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.vz-test-grid div { background: var(--surface); border-radius: 9px; padding: 8px 6px; text-align: center; }
.vz-test-grid b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); }
.vz-test-grid span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.vz-vinc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.vz-vinc-row:last-of-type { border-bottom: 0; }
.vz-vinc-u { flex: 1; min-width: 0; }
.vz-vinc-u b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-vinc-u small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.vz-vinc-sel { flex: 0 0 auto; width: 210px; max-width: 48%; padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 13px; font-family: inherit; outline: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.vz-vinc-sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vz-vinc-sel:disabled { opacity: .6; }
.vz-vinc-ok { width: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--vz-green); flex-shrink: 0; }
.vz-vinc-ok svg { width: 15px; height: 15px; }
.vz-wh { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.vz-wh code { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.vz-wh .btn-mini { flex-shrink: 0; }
.vz-receita { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.vz-receita li { margin-bottom: 4px; }
.vz-receita code { font-size: 11px; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.vz-soft-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; }
.vz-soft-btn svg { width: 15px; height: 15px; }

/* ── responsivo ── */
@media (max-width: 1400px) { body.vz-on .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .vz-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { body.vz-on .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .vz-jchip .vz-jtxt, .vz-jchip .vz-jtime, .vz-jchip .vz-jcaret { display: none; } .vz-jchip { width: 36px; padding: 0; justify-content: center; } }
@media (max-width: 760px) {
  .vz-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .vz-kpi { padding: 11px 12px; gap: 10px; }
  .vz-kpi-v { font-size: 20px; }
  .vz-head-right { width: 100%; }
  /* presença vira lista */
  .vz-pres-grid { grid-template-columns: 1fr; gap: 8px; }
  .vz-pres { padding: 10px 12px 10px 11px; }
  .vz-filtros { padding: 10px 12px; }
  .vz-f-row select, .vz-f-datas input { max-width: none; flex: 1 1 45%; }
  .vz-f-busca { flex-basis: 100%; }
  .vz-hist-tools .btn-mini span { display: none; }
  .vz-hist-tools .btn-mini { padding: 8px 9px; }
  /* histórico vira cards */
  .vz-table thead { display: none; }
  .vz-table, .vz-table tbody { display: block; }
  .vz-table tr.vz-tr { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "dir contato hora" "dir ramal dur" "dir st st" "dir grav grav"; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
  .vz-table td { display: block; padding: 0; border: 0; font-size: 13px; }
  .vz-table td::before { content: attr(data-l); display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; margin-bottom: 1px; }
  .vz-td-dir { grid-area: dir; padding-right: 0; } .vz-td-dir::before { display: none; }
  .vz-td-hora { grid-area: hora; text-align: right; } .vz-td-hora small { display: inline; margin-left: 4px; }
  .vz-td-contato { grid-area: contato; }
  .vz-td-ramal { grid-area: ramal; } .vz-td-ramal small { display: inline; margin-left: 4px; }
  .vz-td-dur { grid-area: dur; text-align: right; } .vz-td-dur small { display: inline; margin-left: 4px; }
  .vz-td-st { grid-area: st; margin-top: 4px; } .vz-td-st::before { display: none; }
  .vz-td-grav { grid-area: grav; margin-top: 6px; } .vz-td-grav::before { display: none; }
  .vz-row-tab { opacity: 1; }
  .vz-audio { width: 100%; }
  .vz-pag { flex-direction: column; align-items: stretch; text-align: center; }
  .vz-pag-btns { justify-content: center; }
  .vz-call-card { max-width: 92%; min-width: 220px; }
  .vz-call-av { width: 84px; height: 84px; }
  .vz-call-timer { font-size: 26px; }
  .vz-call-acts { flex-direction: column-reverse; align-items: stretch; }
  .vz-call-acts .btn-ghost, .vz-call-acts .btn-primary { justify-content: center; }
  .vz-call-hint { text-align: center; }
  .vz-cfg-stat, .vz-test-grid { grid-template-columns: 1fr 1fr; }
  .vz-vinc-row { flex-wrap: wrap; }
  .vz-vinc-sel { width: 100%; max-width: none; }
  .th-actions .vz-btn-ligar { color: var(--vz-green); }
  .vz-jmenu { right: auto; left: 0; }
}
@media (max-width: 480px) {
  .vz-kpis { grid-template-columns: 1fr 1fr; }
  .vz-kpi-ico { width: 34px; height: 34px; border-radius: 10px; }
  .vz-kpi-ico svg { width: 17px; height: 17px; }
  .vz-per { width: 100%; }
  .vz-per-b { flex: 1; padding: 6px 4px; }
  .vz-table tr.vz-tr { padding: 11px 12px; }
  .vz-jmenu { width: calc(100vw - 28px); }
  /* cabeçalho da conversa: o Ligar entrou na fila de ícones; as ações de demonstração saem para o nome do contato caber */
  body.vz-on .th-actions { gap: 3px; }
  body.vz-on .th-actions .btn-mini { padding: 8px 7px; }
  body.vz-on .th-actions [data-act="exportar"], body.vz-on .th-actions [data-act="atribuir"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vz-kpi, .vz-pres, .vz-table-wrap, .vz-per-b, .vz-tab-opt, .vz-dl, .vz-jchip, .vz-row-tab, .vz-cc-tab, .vz-step i { transition: none; }
  .vz-kpi:hover, .vz-pres:hover { transform: none; }
  /* !important: as regras de estado (.vz-pres.call .vz-pres-st i, .vz-call.st-chamando .vz-ring) são mais específicas */
  .vz-kpi.loading::after, .vz-sk-b, .vz-pres.call::after, .vz-call-card.live::after, .vz-pres-st i, .vz-st i, .vz-live-dot, .vz-ring, .vz-call-dot, .vz-step.on i, .vz-jchip.disponivel .vz-jdot::after { animation: none !important; }
  .vz-call.st-chamando .vz-ring, .vz-call.st-ligando .vz-ring, .vz-call.st-discando .vz-ring { opacity: .4; transform: none; }
  .vz-call-card.flash { animation: none; box-shadow: 0 0 0 3px rgba(0,168,132,.6); }
}

/* ═══════════ PABX gestão: sub-navegação da Telefonia, motor de recurso (tabela + drawer), telas premium ═══════════ */
:root { --px-line: var(--line); --px-tint: rgba(21,146,180,.06); }
body.dark { --px-tint: rgba(109,156,255,.07); }

/* ── sub-navegação (chips no topo da view, rolagem horizontal no celular) ── */
.px-subnav { margin: -6px 0 18px; }
.px-subnav[hidden] { display: none; }
.px-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-1); scrollbar-width: none; }
.px-tabs::-webkit-scrollbar { display: none; }
.px-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 9px 14px; border-radius: 10px; font: 700 12.5px/1 inherit; color: var(--muted); background: transparent; white-space: nowrap; transition: background .16s, color .16s, transform .16s; }
.px-tab .px-tab-i { display: inline-flex; }
.px-tab svg { width: 15px; height: 15px; }
.px-tab:hover { color: var(--ink); background: var(--bg-2); }
.px-tab.on { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 2px 10px rgba(12,117,145,.28); }
.px-tab.on:hover { color: #fff; }
.px-tab.off { color: var(--muted); opacity: .5; }
.px-tab.off:hover { opacity: .72; background: var(--bg-2); }
.px-tab.off.on { opacity: 1; }
.px-tab-off { display: inline-flex; }
.px-tab-off svg { width: 12px; height: 12px; }
.px-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── aviso de backend ainda não publicado ── */
.px-preparo { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--amber-soft); border: 1px solid transparent; color: var(--ink-2); }
.px-preparo svg { width: 20px; height: 20px; color: var(--vz-amber); flex-shrink: 0; margin-top: 1px; }
.px-preparo b { display: block; font-size: 13.5px; color: var(--ink); }
.px-preparo span { display: block; font-size: 12.5px; margin-top: 2px; line-height: 1.5; }
body.dark .px-preparo { background: var(--vz-amber-soft); }

/* ── cabeçalho de recurso ── */
.px-panel[hidden] { display: none; }
.px-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.px-head-t { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.px-head-t h2 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.px-cont { font-size: 12px; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.px-head-sub { font-size: 12.5px; color: var(--muted); }
.px-head-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.px-head-acts .btn-mini svg, .px-head-acts .btn-primary svg { width: 14px; height: 14px; }
.px-head-acts .btn-primary { padding: 8px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.px-busca { position: relative; flex: 0 1 240px; min-width: 170px; }
.px-busca svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.px-busca input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: var(--surface); color: var(--ink); outline: none; transition: .15s; font-family: inherit; }
.px-busca input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.px-sel-l { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.px-head-acts select, .px-filtros select { padding: 8px 26px 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); outline: none; font-family: inherit; max-width: 210px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.px-head-acts select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.px-leitura { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); background: var(--bg-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.px-leitura svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.px-topo { margin-bottom: 14px; }
.px-filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── sub-abas internas (Rotas, Discador) ── */
.px-sub { display: inline-flex; gap: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.px-sub-b { border: 0; background: transparent; font: 700 12.5px inherit; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.px-sub-b:hover { color: var(--ink); }
.px-sub-b.on { background: var(--surface); color: var(--brand-strong); box-shadow: var(--sh-1); }

/* ── tabela premium do motor de recurso ── */
.px-tab-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); transition: opacity .15s; }
.px-tab-wrap.dim { opacity: .55; pointer-events: none; }
.px-grid { width: 100%; }
.px-grid th { white-space: nowrap; }
.px-grid td { padding: 12px 18px; font-size: 13.5px; vertical-align: middle; }
.px-grid td small { color: var(--muted); font-size: 11px; }
.px-td-1 { font-weight: 700; }
.px-th-acts { width: 1%; }
.px-td-acts { width: 1%; white-space: nowrap; text-align: right; }
.px-acts { display: inline-flex; gap: 4px; justify-content: flex-end; opacity: .72; transition: opacity .15s; }
.px-tr:hover .px-acts { opacity: 1; }
.px-ab { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: all .15s; }
.px-ab svg { width: 15px; height: 15px; }
.px-ab:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.px-ab.ok:hover { border-color: var(--vz-green); color: var(--vz-green); background: var(--vz-green-soft); }
.px-ab.danger:hover { border-color: var(--vz-red); color: var(--vz-red); background: var(--vz-red-soft); }
.px-ab:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.px-rodape { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: right; }

/* chips de estado */
.px-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--vz-gray-soft); color: var(--vz-gray); white-space: nowrap; }
.px-chip.ok { background: var(--vz-green-soft); color: var(--vz-green); }
.px-chip.bad { background: var(--vz-red-soft); color: var(--vz-red); }
.px-chip.warn { background: var(--vz-amber-soft); color: var(--vz-amber); }
.px-chip.info { background: var(--vz-blue-soft); color: var(--vz-blue); }
.px-chip.gray { background: var(--vz-gray-soft); color: var(--vz-gray); }
.px-chip.pres i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.px-chip.pres.on { background: var(--vz-green-soft); color: var(--vz-green); }
.px-chip.pres.call { background: var(--vz-blue-soft); color: var(--vz-blue); }
.px-chip.pres.call i { animation: vzPulse 1.2s ease-in-out infinite; }
.px-chip.pres.pause { background: var(--vz-amber-soft); color: var(--vz-amber); }
.px-secreto { letter-spacing: 2px; color: var(--muted); }
.px-vazio { color: var(--muted); }
.px-hor { display: inline-flex; flex-direction: column; line-height: 1.3; }
.px-hor b { font-size: 12.5px; font-weight: 700; }
.px-hor small { font-size: 11px; color: var(--muted); }

/* esqueleto, vazio, erro e módulo indisponível */
.px-sk-tab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 0; box-shadow: var(--sh-1); }
.px-sk-row { display: flex; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.px-sk-row:last-child { border-bottom: 0; }
.px-sk-b { display: block; height: 10px; border-radius: 6px; flex: 1; background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 40%, var(--line-soft) 60%); background-size: 400% 100%; animation: arShimmer 1.3s ease-in-out infinite; }
.px-vazio-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.px-erro { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--vz-red-soft); border: 1px solid transparent; border-radius: var(--r-lg); padding: 16px 18px; color: var(--vz-red); font-size: 13.5px; }
.px-erro b { font-weight: 700; }
.px-indisp { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 40px 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.px-indisp-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--vz-gray-soft); color: var(--vz-gray); margin-bottom: 6px; }
.px-indisp-ico svg { width: 22px; height: 22px; }
.px-indisp b { font-size: 15px; color: var(--ink); }
.px-indisp span { font-size: 13px; color: var(--muted); max-width: 460px; line-height: 1.55; }
.px-indisp small { font-size: 11px; color: var(--muted); opacity: .8; margin-top: 2px; }
.px-indisp-cta { margin-top: 8px; font-size: 12.5px; color: var(--brand-strong); font-weight: 600; }

/* ── drawer lateral (formulário montado do schema) ── */
.px-drawer-back { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); z-index: 210; display: flex; justify-content: flex-end; opacity: 0; transition: opacity .18s ease; }
.px-drawer-back.on { opacity: 1; }
.px-drawer { width: min(520px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(16,24,40,.18); display: flex; flex-direction: column; transform: translateX(24px); transition: transform .22s cubic-bezier(.2,.8,.3,1); }
.px-drawer-back.on .px-drawer { transform: none; }
.px-dr-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.px-dr-t { flex: 1; min-width: 0; }
.px-dr-t h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.px-dr-t small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-dr-x { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.px-dr-x svg { width: 15px; height: 15px; }
.px-dr-x:hover { background: var(--bg-2); color: var(--ink); }
.px-dr-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.px-dr-load { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 12px 2px; }
.px-dr-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.px-dr-foot .btn-ghost, .px-dr-foot .btn-primary { padding: 10px 16px; font-size: 13.5px; }
.px-dr-msg { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.px-dr-msg.err { color: var(--vz-red); font-weight: 600; }
.px-dr-msg.ok { color: var(--vz-green); font-weight: 600; }

/* grupos do formulário */
.px-gr { border-bottom: 1px solid var(--line-soft); }
.px-gr:last-child { border-bottom: 0; }
.px-gr-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 2px; font: 800 12px inherit; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.px-gr-h:hover { color: var(--brand-strong); }
.px-gr-n { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--bg-2); border-radius: 20px; padding: 2px 7px; letter-spacing: 0; }
.px-gr-c { margin-left: auto; display: inline-flex; color: var(--muted); transition: transform .18s; }
.px-gr-c svg { width: 15px; height: 15px; }
.px-gr.open .px-gr-c { transform: rotate(180deg); }
.px-gr-b { display: none; padding: 0 2px 14px; }
.px-gr.open .px-gr-b { display: block; }

/* campos */
.px-f { margin-bottom: 15px; }
.px-f:last-child { margin-bottom: 0; }
.px-f > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.px-req { color: var(--vz-red); font-style: normal; margin-left: 3px; font-weight: 800; }
.px-f input[type="text"], .px-f input[type="number"], .px-f input[type="tel"], .px-f input[type="password"], .px-f input[type="time"], .px-f input[type="date"], .px-f select, .px-f textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 13.5px; font-family: inherit; outline: none; transition: .15s; }
.px-f select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.px-f input:focus, .px-f select:focus, .px-f textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.px-f input:disabled, .px-f select:disabled, .px-f textarea:disabled { opacity: .6; cursor: not-allowed; }
.px-f textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.px-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px !important; }
.px-ajuda { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.px-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 5px; }
.px-lock svg { width: 11px; height: 11px; }
.px-err { display: none; font-size: 11.5px; color: var(--vz-red); font-weight: 600; margin-top: 5px; }
.px-f.err > label { color: var(--vz-red); }
.px-f.err input, .px-f.err select, .px-f.err textarea { border-color: var(--vz-red); background: var(--vz-red-soft); }
.px-f.err .px-err { display: block; }

/* interruptor */
.px-sw, .px-f > label.px-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin-bottom: 0; }
.px-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.px-sw-t { width: 40px; height: 23px; border-radius: 20px; background: var(--line); position: relative; transition: background .18s; flex-shrink: 0; }
.px-sw-t::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.25); transition: transform .18s; }
.px-sw input:checked + .px-sw-t { background: var(--brand); }
.px-sw input:checked + .px-sw-t::after { transform: translateX(17px); }
.px-sw input:focus-visible + .px-sw-t { box-shadow: 0 0 0 3px var(--brand-soft); }
.px-sw-l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.px-sw input:disabled + .px-sw-t { opacity: .5; }

/* seleção múltipla e dias da semana */
.px-multi { display: flex; flex-wrap: wrap; gap: 6px; }
.px-mi { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.px-mi input { position: absolute; opacity: 0; width: 0; height: 0; }
.px-mi:hover { border-color: var(--brand-soft-2); }
.px-mi.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.px-dias .px-mi { min-width: 52px; }
.px-hs { display: grid; gap: 6px; }
.px-hs-l { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.px-hs-l .px-mi { padding: 8px 0; }
.px-hs-a { font-size: 12px; color: var(--muted); }
.px-hs-l input:disabled + .px-hs-a { opacity: .6; }

/* senha com mostrar/copiar/gerar */
.px-senha { display: flex; align-items: center; gap: 6px; }
.px-senha input { flex: 1; min-width: 0; }
.px-sb { width: 34px; height: 38px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); flex-shrink: 0; transition: all .15s; }
.px-sb svg { width: 15px; height: 15px; }
.px-sb:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }

/* ── Chamadas agora (Visão geral) ── */
.px-on-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--vz-blue); }
.px-on-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--vz-blue); animation: vzPulse 1.2s ease-in-out infinite; }
.px-on-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.px-on { border: 1px solid var(--line); border-left: 4px solid var(--vz-blue); border-radius: 12px; padding: 11px 13px; background: linear-gradient(135deg, var(--vz-blue-soft), var(--bg-2) 70%); }
.px-on-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.px-on-st { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--vz-blue); }
.px-on-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: vzPulse 1.2s ease-in-out infinite; }
.px-on-dur { font-size: 14px; font-weight: 800; color: var(--vz-blue); }
.px-on-par { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.px-on-par svg { width: 13px; height: 13px; color: var(--muted); flex-shrink: 0; }
.px-on-de, .px-on-para { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-on-kill { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 9px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--vz-red); color: var(--vz-red); background: transparent; font: 700 12px inherit; transition: all .15s; }
.px-on-kill svg { width: 14px; height: 14px; transform: rotate(133deg); }
.px-on-kill:hover { background: var(--vz-red); color: #fff; }

/* ── Dados SIP ── */
.px-sip { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.px-sip-r { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 7px 7px 12px; }
.px-sip-k { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; width: 92px; flex-shrink: 0; }
.px-sip-v { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-sip-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.px-sip-acts .btn-primary, .px-sip-acts .btn-ghost { display: inline-flex; align-items: center; gap: 7px; }
.px-sip-acts svg { width: 15px; height: 15px; }

/* ── arraste e solte (CSV e áudio) + progresso ── */
.px-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 26px 20px; border: 2px dashed var(--line); border-radius: 14px; background: var(--bg-2); cursor: pointer; transition: all .18s; }
.px-drop:hover, .px-drop:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.px-drop.on { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.01); }
.px-drop > svg { width: 30px; height: 30px; color: var(--brand); opacity: .75; margin-bottom: 4px; }
.px-drop b { font-size: 14px; color: var(--ink); }
.px-drop span { font-size: 12.5px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.px-drop-aud { margin-bottom: 16px; }
.px-aud-uso { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.px-aud-uso label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.px-aud-uso select { padding: 7px 26px 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); font-family: inherit; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.px-aud-uso select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.px-prog { width: 100%; max-width: 320px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 10px; }
.px-prog-b { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, var(--brand), var(--brand-strong)); transition: width .2s; }
.px-audio { height: 32px; max-width: 220px; }

/* ── importação de CSV ── */
.px-modal-larga { max-width: 720px; }
.px-csv-res { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-radius: 12px; padding: 11px 13px; margin-bottom: 14px; }
.px-csv-res > svg { width: 22px; height: 22px; color: var(--brand-strong); flex-shrink: 0; }
.px-csv-res div { flex: 1; min-width: 0; }
.px-csv-res b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-csv-res span { display: block; font-size: 11.5px; color: var(--ink-2); }
.px-csv-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.px-h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 18px 0 10px; }
.px-mapa { display: flex; flex-direction: column; gap: 7px; }
.px-mapa-r { display: flex; align-items: center; gap: 8px; }
.px-mapa-c { flex: 0 0 150px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.px-mapa-s { flex: 1; padding: 8px 26px 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); font-family: inherit; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.px-mapa-n { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: var(--bg-2); color: var(--ink); font-family: inherit; outline: none; }
.px-mapa-s:focus, .px-mapa-n:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.px-previa { max-height: 220px; overflow: auto; }
.px-previa td, .px-previa th { white-space: nowrap; font-size: 12px; padding: 8px 12px; }

/* ── SMS ── */
.px-card { margin-bottom: 18px; }
.px-sms-body { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.px-sms-num, .px-sms-txt { margin-bottom: 0; }
.px-sms-num label, .px-sms-txt label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.px-sms-num input, .px-sms-txt textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 13.5px; font-family: inherit; outline: none; transition: .15s; }
.px-sms-txt textarea { resize: vertical; line-height: 1.5; }
.px-sms-num input:focus, .px-sms-txt textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.px-sms-cont { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.px-sms-c { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.px-sms-c.warn { color: var(--vz-amber); font-weight: 700; }
.px-sms-cont .btn-primary { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; font-size: 13.5px; }
.px-sms-cont .btn-primary svg { width: 15px; height: 15px; }

/* ── Integrações e webhook ── */
.px-wh-stat { display: flex; align-items: flex-start; gap: 12px; border-radius: 12px; padding: 13px 15px; margin-bottom: 13px; }
.px-wh-stat > svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.px-wh-stat b { display: block; font-size: 13.5px; }
.px-wh-stat span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.px-wh-stat.on { background: var(--vz-green-soft); } .px-wh-stat.on > svg, .px-wh-stat.on b { color: var(--vz-green); }
.px-wh-stat.off { background: var(--vz-amber-soft); } .px-wh-stat.off > svg, .px-wh-stat.off b { color: var(--vz-amber); }
.px-wh-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 13px 0 4px; }
.px-wh-acts .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
.px-wh-acts .btn-primary svg { width: 15px; height: 15px; }
.px-wh-acts .btn-primary:disabled { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); filter: none; opacity: 1; cursor: default; }
.px-ig-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.px-ig { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg-2); }
.px-ig b { display: block; font-size: 13px; }
.px-ig small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.px-ig code { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── Rotas ── */
.px-rotas .px-rota-sel { width: 100%; max-width: 280px; padding: 8px 26px 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); font-family: inherit; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a3' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.px-rotas .px-rota-sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.px-rotas-foot { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.px-rotas-foot .px-dr-msg { flex: 1; justify-content: flex-end; }
.px-rotas-foot .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
.px-rotas-foot .btn-primary svg { width: 15px; height: 15px; }

/* botão vermelho de confirmação destrutiva */
.px-del-sim { background: linear-gradient(135deg, #e2687a, var(--vz-red)) !important; display: inline-flex; align-items: center; gap: 7px; }
.px-del-sim svg { width: 15px; height: 15px; }

/* ── responsivo ── */
@media (max-width: 1024px) { .px-sms-body { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .px-subnav { margin: -2px -4px 14px; }
  .px-tabs { border-radius: 12px; padding: 3px; }
  .px-tab { padding: 8px 11px; font-size: 12px; }
  .px-head { gap: 10px; }
  .px-head-t h2 { font-size: 16px; }
  .px-head-acts { width: 100%; }
  .px-busca { flex: 1 1 100%; }
  .px-head-acts .btn-mini span { display: none; }
  .px-head-acts select { flex: 1 1 40%; max-width: none; }
  .px-head-acts .btn-primary { flex: 1 1 100%; justify-content: center; }
  .px-sub { width: 100%; overflow-x: auto; }
  .px-sub-b { flex: 1; padding: 8px 10px; }
  .px-csv-2col { grid-template-columns: 1fr; gap: 0; }
  .px-mapa-r { flex-wrap: wrap; }
  .px-mapa-c { flex: 1 1 100%; }
  .px-modal-larga { max-width: none; }
  .px-drawer { width: 100%; border-left: 0; border-top-left-radius: 18px; border-top-right-radius: 18px; }
  .px-drawer-back { align-items: flex-end; }
  .px-drawer { height: 92%; transform: translateY(28px); }
  .px-dr-foot { position: sticky; bottom: 0; }
  .px-on-grid { grid-template-columns: 1fr; }
  /* tabela vira cartões */
  .px-grid thead { display: none; }
  .px-grid, .px-grid tbody { display: block; }
  .px-grid tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); position: relative; }
  .px-grid tr:last-child { border-bottom: 0; }
  .px-grid td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; font-size: 13px; }
  .px-grid td::before { content: attr(data-l); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; flex-shrink: 0; }
  .px-grid .px-td-1 { font-size: 14.5px; padding-bottom: 6px; }
  .px-grid .px-td-acts { justify-content: flex-end; padding-top: 8px; width: auto; }
  .px-grid .px-td-acts::before { display: none; }
  .px-acts { opacity: 1; }
  .px-previa td::before { display: none; }
  .px-previa .px-grid thead { display: table-header-group; }
  .px-previa .px-grid, .px-previa .px-grid tbody { display: table; width: 100%; }
  .px-previa .px-grid tr { display: table-row; }
  .px-previa .px-grid td { display: table-cell; }
  .px-rotas .px-rota-sel { max-width: none; }
}
@media (max-width: 480px) {
  .px-tab .px-tab-l { font-size: 11.5px; }
  .px-indisp { padding: 30px 16px; }
  .px-sip-k { width: 78px; font-size: 10.5px; }
  .px-audio { max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .px-tab, .px-ab, .px-drop, .px-mi, .px-sw-t, .px-sw-t::after, .px-gr-c, .px-drawer, .px-drawer-back, .px-prog-b { transition: none; }
  .px-drop.on { transform: none; }
  .px-sk-b, .px-on-live i, .px-on-st i, .px-chip.pres.call i { animation: none !important; }
}

/* ═══════════ Softphone (fase 3): o telefone do painel, dock arrastável, discador, chamada, controles ═══════════ */
/* Paleta: o ciano da marca conduz o telefone (visor, tecla ativa, botão Ligar), verde só para
   "atender/registrado", vermelho só para "encerrar/recusar". O vidro leve deixa a conversa
   aparecer por baixo, então o dock nunca parece uma janela de outro produto. */
:root {
  --sf-w: 322px;
  --sf-veil: rgba(255,255,255,.82);
  --sf-solid: #ffffff;
  --sf-line: rgba(15,32,51,.11);
  --sf-line-2: rgba(15,32,51,.07);
  --sf-key: linear-gradient(180deg, #ffffff, #eef3f8);
  --sf-key-h: linear-gradient(180deg, #ffffff, #e3ecf4);
  --sf-key-line: rgba(15,32,51,.08);
  --sf-key-sh: 0 1px 2px rgba(15,32,51,.10), 0 0 0 .5px rgba(15,32,51,.03), 0 1px 0 rgba(255,255,255,.9) inset;
  --sf-visor: linear-gradient(180deg, rgba(21,146,180,.07), rgba(21,146,180,.02));
  --sf-accent: #1592b4;
  --sf-accent-2: #0c7591;
  --sf-glow: rgba(21,146,180,.34);
  --sf-on: #0f9d77;
  --sf-warn: #c98a2b;
  --sf-bad: #d9596a;
  --sf-live: #2f6fe4;
  --sf-sh: 0 34px 68px -26px rgba(9,26,44,.44), 0 12px 28px -16px rgba(9,26,44,.26), 0 0 0 1px rgba(15,32,51,.05), 0 1px 0 rgba(255,255,255,.85) inset;
  --sf-sh-drag: 0 50px 92px -28px rgba(9,26,44,.54), 0 20px 44px -20px rgba(9,26,44,.34), 0 0 0 1px rgba(21,146,180,.28), 0 1px 0 rgba(255,255,255,.9) inset;
}
body.dark {
  --sf-veil: rgba(23,32,44,.84);
  --sf-solid: #172029;
  --sf-line: rgba(255,255,255,.11);
  --sf-line-2: rgba(255,255,255,.06);
  --sf-key: linear-gradient(180deg, #253141, #1d2734);
  --sf-key-h: linear-gradient(180deg, #2c3a4c, #232f3e);
  --sf-key-line: rgba(255,255,255,.07);
  --sf-key-sh: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.05) inset;
  --sf-visor: linear-gradient(180deg, rgba(109,156,255,.12), rgba(109,156,255,.03));
  --sf-accent: #3aa9c6;
  --sf-accent-2: #2b90ad;
  --sf-glow: rgba(58,169,198,.38);
  --sf-on: #38c79a;
  --sf-warn: #f0b55a;
  --sf-bad: #ff8a92;
  --sf-live: #6d9cff;
  --sf-sh: 0 34px 70px -24px rgba(0,0,0,.74), 0 12px 26px -14px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06), 0 1px 0 rgba(255,255,255,.05) inset;
  --sf-sh-drag: 0 52px 96px -26px rgba(0,0,0,.82), 0 20px 44px -18px rgba(0,0,0,.58), 0 0 0 1px rgba(58,169,198,.4), 0 1px 0 rgba(255,255,255,.07) inset;
}

/* ── botão Ligar no topo, ao lado da jornada, em todas as telas ──
   O rótulo diz o que o clique faz (Ligar, Atender, o cronômetro da chamada) e o
   círculo carrega o estado do ramal: verde com halo quando está registrado, anel
   girando enquanto conecta, âmbar sem ramal, vermelho sem conexão. O detalhe
   continua no cartão .sf-tip do hover. */
.sf-chip-wrap { flex-shrink: 0; position: relative; }
.sf-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 5px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 750; letter-spacing: -.1px; white-space: nowrap; position: relative;
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 0 rgba(255,255,255,.7) inset;
  transition: background .16s, border-color .16s, color .16s, box-shadow .2s, transform .14s cubic-bezier(.2,.9,.25,1);
}
.sf-chip:hover { border-color: var(--brand-soft-2); box-shadow: 0 6px 16px -8px rgba(16,24,40,.28), 0 1px 0 rgba(255,255,255,.7) inset; transform: translateY(-1px); }
.sf-chip:active { transform: translateY(0) scale(.97); }
.sf-chip:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-chip .sf-chip-i {
  position: relative; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .18s, color .18s, box-shadow .18s;
}
.sf-chip .sf-chip-i svg { width: 14px; height: 14px; position: relative; z-index: 1; }
.sf-chip .sf-chip-dot { position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px transparent; z-index: 2; }
.sf-chip .sf-chip-t { font-variant-numeric: tabular-nums; }
.sf-chip .sf-chip-t[hidden] { display: none; }
.sf-chip.aberto { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
/* registrado: o círculo vira o botão verde do discador, com um halo que respira */
.sf-chip.st-on .sf-chip-i { background: linear-gradient(135deg, #17b37f, var(--sf-on)); color: #fff; box-shadow: 0 4px 10px -4px rgba(15,157,119,.75), 0 1px 0 rgba(255,255,255,.3) inset; }
.sf-chip.st-on .sf-chip-i::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--sf-on); opacity: 0; animation: sfHalo 2.8s ease-out infinite; }
.sf-chip.st-on:hover { border-color: rgba(15,157,119,.38); }
/* conectando: anel girando em volta do fone */
.sf-chip.st-wait .sf-chip-i { background: var(--brand-soft); color: var(--brand-strong); box-shadow: none; }
.sf-chip.st-wait .sf-chip-i::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--brand); border-right-color: var(--brand); animation: arSpin .9s linear infinite; }
.sf-chip.st-off .sf-chip-t { color: var(--ink-2); }
.sf-chip.st-warn .sf-chip-i { background: var(--vz-amber-soft); color: var(--vz-amber); box-shadow: none; }
.sf-chip.st-warn .sf-chip-t { color: var(--vz-amber); }
.sf-chip.st-bad .sf-chip-i { background: var(--vz-red-soft); color: var(--vz-red); box-shadow: none; }
.sf-chip.st-bad .sf-chip-dot { background: var(--vz-red); box-shadow: 0 0 0 2px var(--surface); }
/* chamada: o botão inteiro fica azul e o rótulo vira o cronômetro */
.sf-chip.st-call, .sf-chip.st-ring { color: #fff; background: linear-gradient(135deg, var(--sf-live), #2554b8); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(47,111,228,.6), 0 1px 0 rgba(255,255,255,.22) inset; }
.sf-chip.st-call .sf-chip-i, .sf-chip.st-ring .sf-chip-i { background: rgba(255,255,255,.2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.sf-chip.st-ring .sf-chip-i::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #fff; opacity: 0; animation: sfHalo 1s ease-out infinite; }
.sf-chip.st-ring .sf-chip-i svg { animation: sfBalanca 1s ease-in-out infinite; }
@keyframes sfHalo { 0% { transform: scale(.86); opacity: .5; } 70%, 100% { transform: scale(1.42); opacity: 0; } }
@keyframes sfBalanca { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
body.dark .sf-chip:not(.st-call):not(.st-ring) { box-shadow: 0 1px 2px rgba(0,0,0,.3); }
body.dark .sf-chip:not(.st-call):not(.st-ring):hover { box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
body.dark .sf-chip.st-on:hover { border-color: rgba(56,199,154,.4); }

/* cartão de estado do chip: o que era texto no topo virou detalhe no hover */
.sf-tip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 90; width: 252px;
  padding: 12px 14px 11px; border-radius: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .16s ease, transform .18s cubic-bezier(.2,.9,.3,1); pointer-events: none;
}
.sf-tip.on { opacity: 1; transform: translateY(0) scale(1); }
.sf-tip[hidden] { display: none; }
.sf-tip::before {
  content: ''; position: absolute; top: -5px; right: 18px; width: 10px; height: 10px;
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.sf-tip .sf-tip-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.sf-tip .sf-tip-h b { font-weight: 750; }
.sf-tip .sf-tip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vz-gray); flex: 0 0 auto; position: relative; }
.sf-tip .sf-tip-r { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--bg-2); border-radius: 20px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.sf-tip .sf-tip-s { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; font-variant-numeric: tabular-nums; }
.sf-tip .sf-tip-n { margin-top: 3px; font-size: 12px; color: var(--muted); }
.sf-tip .sf-tip-k { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--muted); }
.sf-tip.st-on .sf-tip-dot { background: var(--sf-on); }
.sf-tip.st-on .sf-tip-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-on); opacity: .45; animation: pulse 1.9s ease-out infinite; }
.sf-tip.st-wait .sf-tip-dot { background: var(--brand); }
.sf-tip.st-warn .sf-tip-dot { background: var(--vz-amber); }
.sf-tip.st-bad .sf-tip-dot, .sf-tip.st-err .sf-tip-dot { background: var(--vz-red); }
.sf-tip.st-call .sf-tip-dot, .sf-tip.st-ring .sf-tip-dot { background: var(--sf-live); }
.sf-tip.st-ring .sf-tip-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-live); opacity: .6; animation: pulse .9s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .sf-tip { transition: none; transform: none; }
  .sf-tip.on { transform: none; }
  .sf-tip .sf-tip-dot::after { animation: none; }
}
@media (max-width: 700px) { .sf-tip { display: none !important; } }

/* ── o dock ── */
.sf-dock {
  position: fixed; left: 18px; top: 18px; z-index: 78; width: var(--sf-w);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--sf-line);
  background: var(--sf-veil);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  backdrop-filter: blur(20px) saturate(155%);
  box-shadow: var(--sf-sh); color: var(--ink);
  transition: box-shadow .22s ease, transform .2s cubic-bezier(.2,.9,.25,1), width .26s cubic-bezier(.2,.9,.25,1), border-radius .26s;
}
.sf-dock[hidden] { display: none !important; }
/* textura fina em diagonal só no cabeçalho: dá corpo ao vidro sem listrar as teclas */
.sf-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(128deg, rgba(255,255,255,.16) 0 1px, transparent 1px 6px);
  opacity: .5;
}
body.dark .sf-head::before { background: repeating-linear-gradient(128deg, rgba(255,255,255,.05) 0 1px, transparent 1px 6px); }
.sf-aurora {
  position: absolute; left: -22%; right: -22%; top: -70px; height: 190px; pointer-events: none; z-index: 0;
  background: radial-gradient(58% 78% at 24% 62%, var(--sf-glow), transparent 70%),
              radial-gradient(46% 70% at 84% 30%, rgba(124,99,255,.20), transparent 74%);
  filter: blur(4px);
}
body.dark .sf-aurora { background: radial-gradient(58% 78% at 24% 62%, var(--sf-glow), transparent 70%), radial-gradient(46% 70% at 84% 30%, rgba(169,156,240,.22), transparent 74%); }
.sf-dock.entrando { animation: sfIn .28s cubic-bezier(.2,.9,.25,1); }
.sf-dock.arrastando { box-shadow: var(--sf-sh-drag); transform: scale(1.012); }
.sf-dock.encaixando { transition: left .34s cubic-bezier(.22,1.15,.34,1), top .34s cubic-bezier(.22,1.15,.34,1), box-shadow .22s ease; }
@keyframes sfIn { from { opacity: 0; transform: translateY(14px) scale(.965); } to { opacity: 1; transform: none; } }

/* cabeçalho: alça de arraste, estado e ações */
.sf-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 10px 9px 10px 7px; border-bottom: 1px solid var(--sf-line-2); }
.sf-grip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 24px; height: 36px; border-radius: 9px; cursor: grab; touch-action: none; flex: 0 0 auto; transition: background .15s; }
.sf-grip i { width: 12px; height: 2px; border-radius: 2px; background: var(--muted); opacity: .5; transition: opacity .16s, width .16s; }
.sf-grip:hover { background: var(--sf-line-2); }
.sf-grip:hover i { opacity: .95; }
.sf-grip:hover i:nth-child(2) { width: 16px; }
.sf-grip:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 1px; background: var(--sf-line-2); }
.sf-dock.arrastando .sf-grip { cursor: grabbing; }
.sf-dock.arrastando .sf-grip i { opacity: 1; }
.sf-head-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sf-st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; letter-spacing: -.1px; color: var(--ink); }
.sf-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--vz-gray); position: relative; flex: 0 0 auto; }
.sf-st.k-on i { background: var(--sf-on); }
.sf-st.k-on i::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-on); opacity: .5; animation: pulse 1.9s ease-out infinite; }
.sf-st.k-wait i { background: var(--sf-accent); animation: cxpulse 1.1s ease-in-out infinite; }
.sf-st.k-warn i { background: var(--sf-warn); }
.sf-st.k-bad i { background: var(--sf-bad); }
.sf-st.k-call i { background: var(--sf-live); }
.sf-st.k-ring i { background: var(--sf-live); }
.sf-st.k-ring i::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sf-live); opacity: .6; animation: pulse .9s ease-out infinite; }
.sf-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-pill-timer { display: none; font-size: 13px; font-weight: 800; color: var(--sf-live); letter-spacing: -.2px; }
.sf-head-acts { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.sf-hb { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background .15s, color .15s; }
.sf-hb svg { width: 15px; height: 15px; }
.sf-hb:hover { background: var(--sf-line-2); color: var(--ink); }
.sf-hb.off:hover { background: var(--vz-red-soft); color: var(--vz-red); }
.sf-hb:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 1px; }
.sf-hb[hidden] { display: none; }
.sf-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sf-body { position: relative; z-index: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* 13/10/2026 (Rafael, Vocatel): em notebook de tela baixa ou com zoom o cartão do fim da ligação
   passava da janela e cortava "Ligar de novo" / "Salvar e concluir"; era preciso esperar a contagem.
   O dock nunca passa da altura da janela: o miolo rola e os botões do fim ficam presos embaixo. */
.sf-dock { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
.sf-dock .sf-head { flex: 0 0 auto; }
.sf-dock .sf-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-height: 820px) {
  .sf-dock[data-fase="fim"] .sf-body > .sf-acts {
    position: sticky; bottom: -14px; z-index: 2; margin: 0 -14px -14px; padding: 10px 14px 14px;
    background: var(--surface); border-top: 1px solid var(--sf-line-2);
  }
  .sf-dock[data-forma="call"][data-fase="fim"] .sf-body { gap: 10px; padding-top: 12px; }
}

/* forma recolhida: pílula com estado, nome e cronômetro */
.sf-dock[data-forma="pill"] { width: 232px; border-radius: 999px; }
.sf-dock[data-forma="pill"] .sf-body { display: none; }
.sf-dock[data-forma="pill"] .sf-head { border-bottom: 0; padding: 7px 8px 7px 6px; }
.sf-dock[data-forma="pill"] .sf-pill-timer { display: inline; }
.sf-dock[data-forma="pill"] .sf-sub { font-size: 11px; }
.sf-dock[data-forma="pill"] .sf-aurora { top: -110px; }

/* ── faixas de apoio (conectando, microfone) ── */
.sf-faixa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 11px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.sf-faixa svg { width: 15px; height: 15px; flex: 0 0 auto; }
.sf-faixa span { flex: 1; min-width: 0; }
/* o spinner também é span: sem isto ele esticava até virar um arco na faixa */
.sf-faixa .sf-spin { flex: 0 0 14px; width: 14px; height: 14px; }
.sf-faixa.off { background: var(--vz-amber-soft); color: var(--vz-amber); }
body.dark .sf-faixa.off { background: rgba(240,181,90,.14); color: var(--sf-warn); }
.sf-faixa.bad { background: var(--vz-red-soft); color: var(--vz-red); }
body.dark .sf-faixa { background: rgba(58,169,198,.14); color: #86d3e8; }
body.dark .sf-faixa.bad { background: rgba(255,138,146,.14); color: var(--sf-bad); }
.sf-inline { font: 800 11.5px/1 inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 2px 0; }
.sf-inline:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.sf-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: arSpin .8s linear infinite; flex: 0 0 auto; }

/* ── aviso de estado (sem ramal, microfone negado, erro, em preparação) ── */
.sf-aviso { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 18px 8px 8px; }
.sf-aviso-i { width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; background: var(--vz-amber-soft); color: var(--vz-amber); margin-bottom: 3px; }
.sf-aviso-i svg { width: 25px; height: 25px; }
.sf-aviso.k-bad .sf-aviso-i { background: var(--vz-red-soft); color: var(--vz-red); }
.sf-aviso b { font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; }
.sf-aviso-t { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.sf-aviso-acts { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── visor do discador ── */
.sf-visor { position: relative; border-radius: 15px; border: 1px solid var(--sf-line-2); background: var(--sf-visor); padding: 12px 46px 12px 14px; min-height: 62px; display: flex; flex-direction: column; justify-content: center; }
.sf-num { font-size: 23px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; font-variant-numeric: tabular-nums; word-break: break-all; min-height: 28px; }
.sf-num.vazio::before { content: 'Digite o número'; font-size: 14.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
/* ITEM3_TECLADO_SOFTPHONE: o número é um campo de texto (cursor, teclado físico e Ctrl+V) */
input.sf-num { display: block; width: 100%; border: 0; outline: 0; background: transparent; padding: 0; margin: 0; color: var(--ink); font-family: inherit; caret-color: var(--sf-accent); }
input.sf-num::placeholder { font-size: 14.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; opacity: 1; }
input.sf-num.vazio::before { content: none; }
.sf-visor:focus-within { border-color: var(--sf-accent); box-shadow: 0 0 0 3px rgba(21,146,180,.16); }
.sf-num-nome { font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 15px; }
.sf-num-nome.on { color: var(--sf-on); font-weight: 700; }
.sf-visor-acts { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.sf-vb { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background .15s, color .15s, opacity .15s; }
.sf-vb svg { width: 15px; height: 15px; }
.sf-vb:hover { background: var(--sf-line-2); color: var(--ink); }
.sf-vb:disabled { opacity: .32; pointer-events: none; }
.sf-vb:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 1px; }

/* ── teclado de 12 teclas ── */
.sf-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sf-tecla {
  position: relative; height: 50px; border-radius: 14px; border: 1px solid var(--sf-key-line);
  background: var(--sf-key); box-shadow: var(--sf-key-sh); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden;
  transition: transform .11s cubic-bezier(.2,.9,.25,1), box-shadow .16s, background .16s, border-color .16s;
}
.sf-tecla b { font-size: 19px; font-weight: 700; letter-spacing: -.3px; line-height: 1; }
.sf-tecla i { font-size: 8.5px; font-style: normal; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); line-height: 1; }
.sf-tecla:hover { background: var(--sf-key-h); border-color: rgba(21,146,180,.3); transform: translateY(-1px); }
.sf-tecla:active { transform: scale(.955); box-shadow: 0 1px 2px rgba(15,32,51,.14) inset; }
.sf-tecla:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; z-index: 1; }
/* onda ao pressionar, também quando a tecla vem do teclado físico */
.sf-tecla.bateu::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at center, var(--sf-glow), transparent 68%); animation: sfBateu .42s ease-out; }
@keyframes sfBateu { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(1.5); } }
.sf-pad.mini .sf-tecla { height: 38px; border-radius: 11px; }
.sf-pad.mini .sf-tecla b { font-size: 15px; }

/* ── botões principais ── */
.sf-acts { display: flex; gap: 8px; }
.sf-acts.duo > * { flex: 1; }
.sf-call, .sf-hang {
  flex: 1; height: 48px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14.5px; font-weight: 800; color: #fff; letter-spacing: -.2px;
  transition: transform .14s cubic-bezier(.2,.9,.25,1), box-shadow .18s, filter .18s;
}
.sf-call svg, .sf-hang svg { width: 19px; height: 19px; }
.sf-call { background: linear-gradient(135deg, #17b37f, var(--sf-on)); box-shadow: 0 8px 20px -8px rgba(15,157,119,.75), 0 1px 0 rgba(255,255,255,.28) inset; }
.sf-call:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(15,157,119,.85), 0 1px 0 rgba(255,255,255,.3) inset; }
.sf-call:disabled { background: var(--sf-key); color: var(--muted); border: 1px solid var(--sf-key-line); box-shadow: none; pointer-events: none; }
.sf-hang { background: linear-gradient(135deg, #e2687a, var(--vz-red)); box-shadow: 0 8px 20px -8px rgba(217,89,106,.7), 0 1px 0 rgba(255,255,255,.24) inset; }
.sf-hang:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(217,89,106,.82), 0 1px 0 rgba(255,255,255,.26) inset; }
.sf-call:focus-visible, .sf-hang:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sf-bt-ghost, .sf-bt-prim { height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 0 14px; transition: background .15s, box-shadow .18s, transform .14s; }
.sf-bt-ghost svg, .sf-bt-prim svg { width: 15px; height: 15px; }
.sf-bt-ghost { border: 1px solid var(--sf-line); background: var(--bg-2); color: var(--ink-2); }
.sf-bt-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--brand-soft-2); }
.sf-bt-prim { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; box-shadow: 0 6px 16px -8px rgba(12,117,145,.8); }
.sf-bt-prim:hover { transform: translateY(-1px); }
.sf-bt-prim:disabled { opacity: .5; pointer-events: none; }
.sf-bt-ghost:focus-visible, .sf-bt-prim:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }

/* ── últimos discados ── */
.sf-rec { border-top: 1px dashed var(--sf-line-2); padding-top: 10px; }
.sf-rec-l { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; }
.sf-rec-b2 { display: flex; flex-wrap: wrap; gap: 5px; }
.sf-rec-b { padding: 5px 10px; border-radius: 20px; border: 1px solid var(--sf-line-2); background: var(--bg-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .15s, color .15s, border-color .15s; }
.sf-rec-b:hover { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.sf-rec-b:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }

/* ── cartão em chamada ── */
.sf-dock[data-forma="call"] .sf-body { gap: 14px; padding-top: 16px; }
.sf-call-top { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sf-call-av { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; margin-bottom: 11px; }
.sf-call-av .avatar.lg { width: 66px; height: 66px; font-size: 21px; }
.sf-call-av .avatar.sf-av-tel { background: linear-gradient(135deg, #16b364, #0d9488); }
.sf-call-av .avatar.sf-av-tel svg { width: 27px; height: 27px; }
.sf-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sf-live); opacity: 0; }
.sf-call-av.tocando .sf-ring { animation: vzRing 1.8s ease-out infinite; }
.sf-call-av.tocando .sf-ring.r2 { animation-delay: .9s; }
.sf-call-ico { position: absolute; right: 0; bottom: 5px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sf-live); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2), 0 0 0 3px var(--sf-solid); }
.sf-call-ico svg { width: 15px; height: 15px; }
.sf-dock[data-fase="ativa"] .sf-call-ico { background: var(--sf-on); }
.sf-dock[data-fase="fim"] .sf-call-ico { background: var(--vz-amber); }
.sf-call-nome { font-size: 17px; font-weight: 800; letter-spacing: -.35px; line-height: 1.25; }
.sf-call-tel { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sf-call-est { font-size: 12.5px; font-weight: 700; color: var(--sf-live); margin-top: 9px; }
.sf-dock[data-fase="ativa"] .sf-call-est { color: var(--sf-on); }
.sf-dock[data-fase="fim"] .sf-call-est { color: var(--ink-2); }
.sf-timer { font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin-top: 3px; line-height: 1.15; }
.sf-timer.wait { color: var(--muted); font-size: 21px; }
/* equalizador: mostra que o áudio está passando; congela no mudo e na espera */
.sf-onda { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 16px; margin-top: 9px; }
.sf-onda i { width: 3px; border-radius: 3px; background: var(--sf-on); height: 5px; animation: sfOnda 1.05s ease-in-out infinite; }
.sf-onda i:nth-child(2) { animation-delay: .14s; } .sf-onda i:nth-child(3) { animation-delay: .28s; }
.sf-onda i:nth-child(4) { animation-delay: .42s; } .sf-onda i:nth-child(5) { animation-delay: .56s; }
.sf-onda.parada i { animation: none; height: 4px; background: var(--muted); opacity: .55; }
@keyframes sfOnda { 0%, 100% { height: 5px; } 50% { height: 15px; } }

/* controles da chamada */
.sf-ctrl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sf-cb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 60px; border-radius: 14px; border: 1px solid var(--sf-key-line); background: var(--sf-key); box-shadow: var(--sf-key-sh); color: var(--ink-2); font-size: 10.5px; font-weight: 700; transition: background .16s, color .16s, border-color .16s, transform .12s; }
.sf-cb svg { width: 19px; height: 19px; }
.sf-cb:hover { background: var(--sf-key-h); color: var(--ink); transform: translateY(-1px); }
.sf-cb.on { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(12,117,145,.85); }
.sf-cb:disabled { opacity: .4; pointer-events: none; }
.sf-cb:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-in-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sf-big { height: 58px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; font-size: 11.5px; font-weight: 800; transition: transform .14s cubic-bezier(.2,.9,.25,1), box-shadow .18s; }
.sf-big svg { width: 21px; height: 21px; }
.sf-big.ace { background: linear-gradient(135deg, #17b37f, var(--sf-on)); box-shadow: 0 10px 24px -10px rgba(15,157,119,.9), 0 1px 0 rgba(255,255,255,.28) inset; }
.sf-big.rec { background: linear-gradient(135deg, #e2687a, var(--vz-red)); box-shadow: 0 10px 24px -10px rgba(217,89,106,.85), 0 1px 0 rgba(255,255,255,.24) inset; }
.sf-big:hover { transform: translateY(-2px); }
.sf-big:disabled { opacity: .6; pointer-events: none; }
.sf-big:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sf-big.ace { animation: sfChama 1.7s ease-in-out infinite; }
@keyframes sfChama { 0%, 100% { box-shadow: 0 10px 24px -10px rgba(15,157,119,.9), 0 0 0 0 rgba(15,157,119,.45); } 60% { box-shadow: 0 10px 24px -10px rgba(15,157,119,.9), 0 0 0 10px rgba(15,157,119,0); } }

/* teclado de tons durante a chamada */
.sf-dtmf { display: flex; flex-direction: column; gap: 8px; }
.sf-dtmf-v { min-height: 22px; border-radius: 10px; background: var(--sf-line-2); padding: 3px 10px; font-size: 14px; font-weight: 700; letter-spacing: 2px; color: var(--ink-2); text-align: center; }

/* fim da chamada e tabulação */
.sf-fim { display: flex; flex-direction: column; gap: 10px; }
.sf-fim-l { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.45; }
.sf-tab { border-top: 1px dashed var(--sf-line-2); padding-top: 11px; }
.sf-tab-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.sf-tab-h svg { width: 13px; height: 13px; color: var(--vz-purple); }
.sf-tab-h small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.sf-tab-opts { display: flex; flex-wrap: wrap; gap: 5px; }
.sf-tab-opt { padding: 6px 11px; border-radius: 20px; border: 1px solid var(--sf-line-2); background: var(--bg-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.sf-tab-opt:hover { border-color: var(--vz-purple); color: var(--vz-purple); }
.sf-tab-opt.on { background: var(--vz-purple-soft); color: var(--vz-purple); border-color: transparent; font-weight: 800; }
.sf-tab-opt:focus-visible { outline: 2px solid var(--vz-purple); outline-offset: 2px; }
.sf-tab-obs { width: 100%; margin-top: 8px; border-radius: 11px; border: 1px solid var(--sf-line); background: var(--surface); color: var(--ink); padding: 8px 10px; font: 400 12.5px/1.45 inherit; resize: vertical; }
.sf-tab-obs:focus { outline: none; border-color: var(--sf-accent); box-shadow: 0 0 0 3px var(--brand-soft); }
.sf-tab-ok { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--sf-on); }
.sf-tab-ok svg { width: 14px; height: 14px; }
.sf-fim .m-msg { margin-top: 8px; }

/* ── ímãs dos cantos: aparecem só durante o arraste ── */
.sf-imas { position: fixed; inset: 0; z-index: 77; pointer-events: none; opacity: 0; transition: opacity .18s; }
.sf-imas.on { opacity: 1; }
.sf-ima { position: absolute; width: 108px; height: 108px; border: 2px dashed var(--sf-line); border-radius: 22px; opacity: .5; transition: border-color .18s, background .18s, transform .18s, opacity .18s; }
.sf-ima.tl { left: 18px; top: 18px; } .sf-ima.tr { right: 18px; top: 18px; }
.sf-ima.bl { left: 18px; bottom: 18px; } .sf-ima.br { right: 18px; bottom: 18px; }
.sf-ima.on { border-color: var(--sf-accent); border-style: solid; background: var(--sf-glow); opacity: 1; transform: scale(1.06); }

/* ── presença: o próprio ramal registrado no dock (integração 4.4) ── */
.vz-pres-sf { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 4px 9px; border-radius: 20px; background: var(--brand-soft); color: var(--brand-strong); font-size: 10.5px; font-weight: 800; letter-spacing: .1px; }
.vz-pres-sf svg { width: 12px; height: 12px; }

/* elemento de áudio da chamada: existe, mas não ocupa espaço */
.sf-audio-el { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
body.sf-arrastando { user-select: none; -webkit-user-select: none; cursor: grabbing; }
/* durante o arraste o corpo do dock nao recebe clique (tecla sem querer), mas a alca
   continua recebendo os eventos de ponteiro: e ela que captura o ponteiro */
body.sf-arrastando .sf-body { pointer-events: none; }

/* ── celular: folha ancorada embaixo, largura total ── */
@media (max-width: 900px) {
  .sf-chip .sf-chip-t { display: none; }
  .sf-chip { width: 38px; padding: 0; justify-content: center; gap: 0; }
}
@media (max-width: 480px) {
  .sf-dock {
    left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    width: auto !important; border-radius: 22px 22px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -22px 50px -18px rgba(9,26,44,.42), 0 0 0 1px rgba(15,32,51,.06);
  }
  body.dark .sf-dock { box-shadow: 0 -22px 50px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.07); }
  .sf-dock[data-forma="pill"] { border-radius: 22px 22px 0 0; }
  .sf-dock.entrando { animation: sfInBaixo .3s cubic-bezier(.2,.9,.25,1); }
  .sf-grip { width: 100%; height: 26px; flex-direction: row; gap: 0; cursor: pointer; position: absolute; left: 0; top: -2px; }
  .sf-grip i:nth-child(1), .sf-grip i:nth-child(3) { display: none; }
  .sf-grip i:nth-child(2) { width: 42px; height: 4px; border-radius: 4px; }
  .sf-head { padding-top: 22px; }
  .sf-imas { display: none; }
  .sf-tecla { height: 54px; }
  .sf-body { padding: 14px 16px 18px; }
}
@keyframes sfInBaixo { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .sf-dock, .sf-dock.encaixando, .sf-tecla, .sf-cb, .sf-call, .sf-hang, .sf-big, .sf-chip, .sf-grip i, .sf-bt-prim, .sf-bt-ghost, .sf-imas, .sf-ima, .sf-vb, .sf-hb, .sf-rec-b, .sf-tab-opt { transition: none; }
  .sf-dock.entrando { animation: none; }
  .sf-dock.arrastando { transform: none; }
  .sf-tecla:hover, .sf-cb:hover, .sf-call:hover, .sf-hang:hover, .sf-big:hover, .sf-bt-prim:hover { transform: none; }
  .sf-st i::after, .sf-st.k-wait i, .sf-chip .sf-chip-i::after, .sf-chip .sf-chip-i svg,
  .sf-ring, .sf-onda i, .sf-big.ace, .sf-spin, .sf-tecla.bateu::after { animation: none !important; }
  .sf-chip.st-on .sf-chip-i::after, .sf-chip.st-ring .sf-chip-i::after { display: none; }
  .sf-chip:hover { transform: none; }
  .sf-ring { display: none; }
}

/* =======================================================================
 * FASE 4: uma Visão Geral só, cabeçalho enxuto e tela de Monitoria
 * ===================================================================== */

/* ── cabeçalho enxuto: título, sub-abas e ações na mesma faixa ──
   Antes eram três blocos empilhados (título grande, subtítulo e a linha de
   sub-abas) e o primeiro dado útil nascia a 218 px do topo. Agora é uma
   faixa só e o dado sobe. */
.view-wrap { padding-top: 14px; }
.page-head { margin-bottom: 10px; }
.page-head h1 { font-size: 18px; letter-spacing: -.3px; }
.page-head p { margin: 0; font-size: 11.5px; line-height: 1.35; }
.page-head.ph-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
  padding-bottom: 9px; border-bottom: 1px solid var(--line-soft);
}
/* título e subtítulo na mesma linha: o subtítulo é dica do título, não bloco */
.ph-id { flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.ph-id h1 { flex: 0 0 auto; }
.ph-id p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1 1 0; overflow-x: auto; scrollbar-width: none; }
.ph-tabs::-webkit-scrollbar { display: none; }
.ph-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.ph-right .btn-mini { padding: 6px 10px; }
.ph-tab {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 7px 12px; border-radius: 9px; font: 700 12.5px/1 inherit;
  color: var(--muted); background: transparent; white-space: nowrap;
  transition: background .16s, color .16s;
}
.ph-tab .ph-tab-i { display: inline-flex; }
.ph-tab svg { width: 15px; height: 15px; }
.ph-tab:hover { color: var(--ink); background: var(--bg-2); }
.ph-tab.on { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 2px 10px rgba(12,117,145,.28); }
.ph-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* a sub-navegação do LemonPABX passa a viver dentro do cabeçalho */
.page-head .px-subnav { margin: 0; flex: 1 1 0; min-width: 0; overflow: visible; }
.page-head .px-tabs { background: transparent; border: 0; box-shadow: none; padding: 0; gap: 4px; min-width: 0; }
.page-head .px-tab { padding: 7px 12px; }
.page-head .px-preparo { padding: 8px 12px; font-size: 12px; }
/* quando as sub-abas nao cabem, uma borda esfumada avisa que tem mais */
.ph-tabs.rola { position: relative; }
.ph-tabs.rola::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 28px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--bg)); }
.page-head .px-preparo span { display: none; }
.vz-page-head .vz-meu-ramal { padding: 6px 11px; font-size: 12px; }
/* O LemonPABX tem nove sub-abas: elas mandam mais que a dica do título.
   Abaixo de 1800 px o subtítulo sai para as nove caberem sem rolagem. */
@media (max-width: 1800px) { .vz-page-head .ph-id p { display: none; } }
@media (max-width: 1360px) { .vz-head-right .btn-mini span { display: none; } }

/* ── Visão Geral: faixa do topo (filtro + resumo da IA na mesma linha) ── */
.dash-topo { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.dash-topo .ai-exec { flex: 1 1 0; min-width: 0; margin-bottom: 0; padding: 7px 13px; gap: 10px; cursor: pointer; }
.dash-topo .ai-exec .ae-ico { width: 27px; height: 27px; border-radius: 8px; }
.dash-topo .ai-exec .ae-ico svg { width: 15px; height: 15px; }
/* o resumo cabe em uma linha e abre no clique: espaço nobre não é para texto longo */
.dash-topo .ai-exec .ae-text { min-width: 0; font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-topo .ai-exec.aberto .ae-text { white-space: normal; }
.dash-topo .ai-exec .ae-tag { padding: 3px 8px; font-size: 9.5px; }
.dash-topo .ai-exec:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Visão Geral: duas metades (mensagens e voz) na mesma grade ── */
.kpis-duo { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kpis-duo .kpis { grid-column: auto; grid-row: auto; }
.kg { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 2px; }
.kg h2 {
  margin: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.kg .kg-i { display: inline-flex; color: var(--brand-strong); }
.kg .kg-i svg { width: 14px; height: 14px; }
#kg-voz .kg-i { color: var(--vz-blue); }
.kg .kg-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kg .kg-go { margin-left: auto; flex: 0 0 auto; padding: 5px 10px; font-size: 11.5px; }
.kg-live { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 6px; }
.kg-live::-webkit-scrollbar { display: none; }
.kg-live-off { font-size: 11.5px; color: var(--muted); font-style: italic; white-space: nowrap; }

/* fichas de chamada em andamento (com o Derrubar do administrador) */
.px-on-strip { display: flex; align-items: center; gap: 6px; }
.px-on-strip .px-on {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 4px 6px 4px 9px; border-radius: 20px; border: 1px solid var(--line);
  border-left: 3px solid var(--vz-blue); background: var(--vz-blue-soft);
  font-size: 11.5px; max-width: 320px; min-width: 0;
}
.px-on-strip .px-on-st { display: inline-flex; }
.px-on-strip .px-on-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--vz-blue); display: block; animation: vzPulse 1.2s ease-in-out infinite; }
.px-on-strip .px-on-dur { font-size: 12px; font-weight: 800; color: var(--vz-blue); }
.px-on-strip .px-on-par { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 11.5px; font-weight: 600; color: var(--ink); min-width: 0; }
.px-on-strip .px-on-par svg { width: 11px; height: 11px; color: var(--muted); }
.px-on-strip .px-on-de, .px-on-strip .px-on-para { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.px-on-strip .px-on-kill {
  width: 22px; height: 22px; margin: 0; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; color: var(--vz-red); background: transparent; flex: 0 0 auto;
}
.px-on-strip .px-on-kill svg { width: 13px; height: 13px; transform: rotate(133deg); }
.px-on-strip .px-on-kill:hover { background: var(--vz-red); color: #fff; }
.px-on-strip .px-on-kill:focus-visible { outline: 2px solid var(--vz-red); outline-offset: 1px; }

/* KPIs de voz na Visão Geral: mesma grade dos cartões, altura menor */
.dash .vz-kpis { grid-column: 1 / -1; margin-bottom: 0; gap: 14px; }
.dash .vz-kpi { padding: 10px 13px; gap: 10px; }
.dash .vz-kpi-ico { width: 32px; height: 32px; border-radius: 10px; }
.dash .vz-kpi-ico svg { width: 17px; height: 17px; }
.dash .vz-kpi-v { font-size: 19px; margin-top: 1px; }
.dash .vz-kpi-l, .dash .vz-kpi-f { font-size: 11px; }

/* recomposição da grade da Visão Geral (com e sem telefonia) */
.dash { grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr); }
.ai-exec { grid-column: auto; grid-row: auto; }
.kpis { grid-column: 1 / -1; grid-row: 2; }
.chart-panel   { grid-column: 1; grid-row: 3 / 5; }
.actions-panel { grid-column: 2 / 4; grid-row: 3; }
.rank-panel    { grid-column: 2; grid-row: 4; }
.lines-panel   { grid-column: 3; grid-row: 4; }

/* Resumo: Atendentes e Linhas WhatsApp nunca somem (Wilton, 18/09/2026). Com o
   título e o filtro da Visão Geral no topo, em tela mais baixa a grade espremia
   a última linha de painéis até zero. Agora cada linha de painéis tem altura
   mínima e, quando a tela não comporta tudo, o Resumo rola em vez de esconder. */
#rel-resumo { overflow-y: auto; overflow-x: hidden; }
#rel-resumo > .dash { min-height: 0; grid-template-rows: auto auto minmax(160px, 1fr) minmax(160px, 1fr); }

/* ── Monitoria ── */
.mn-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 8px 12px; box-shadow: var(--sh-1); margin-bottom: 12px;
}
.mn-f { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mn-f label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.mn-f select {
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--ink);
  font: 600 12.5px inherit; padding: 7px 10px; cursor: pointer; outline: 0; max-width: 280px;
}
.mn-f select:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mn-per { display: inline-flex; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.mn-per-b { padding: 6px 11px; border-radius: 8px; font: 700 12px inherit; color: var(--muted); background: transparent; }
.mn-per-b:hover { color: var(--ink); }
.mn-per-b.on { background: var(--surface); color: var(--brand-strong); box-shadow: var(--sh-1); }
.mn-per-b:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.mn-datas { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mn-datas[hidden] { display: none; }
.mn-datas input { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--ink); font: 600 12px inherit; padding: 6px 8px; }
.mn-bar .btn-mini svg { width: 14px; height: 14px; }
.mn-escopo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: var(--amber-soft); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.mn-escopo[hidden] { display: none; }
.mn-escopo svg { width: 13px; height: 13px; color: var(--vz-amber); }
body.dark .mn-escopo { background: var(--vz-amber-soft); }

/* foco em um atendente */
.mn-foco {
  display: flex; align-items: center; gap: 11px; margin-bottom: 12px; padding: 9px 13px;
  border-radius: var(--r-md); background: linear-gradient(90deg, var(--brand-soft), var(--surface) 55%);
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
}
.mn-foco b { font-size: 13.5px; display: block; }
.mn-foco span span, .mn-foco > div > span { font-size: 11.5px; color: var(--muted); }
.mn-foco .btn-mini { margin-left: auto; }
.mn-foco .btn-mini svg { width: 12px; height: 12px; }

/* cartões de resumo */
.mn-cards { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mn-cards[data-n="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mn-cards[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mn-cards[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mn-foco-eq { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); }
.mn-foco-eq svg { width: 16px; height: 16px; }
.mn-card {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 12px; box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s;
}
.mn-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.mn-c-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--vz-blue-soft); color: var(--vz-blue); }
.mn-c-ico svg { width: 17px; height: 17px; }
.mn-c-ico.ok { background: var(--vz-green-soft); color: var(--vz-green); }
.mn-c-ico.amber { background: var(--vz-amber-soft); color: var(--vz-amber); }
.mn-c-ico.purple { background: var(--vz-purple-soft); color: var(--vz-purple); }
.mn-c-ico.blue { background: var(--brand-soft); color: var(--brand-strong); }
.mn-c-b { min-width: 0; }
.mn-c-l { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-c-v { font-size: 20px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mn-c-p { font-size: 10.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-card.sk { flex-direction: column; align-items: stretch; gap: 8px; min-height: 66px; justify-content: center; }
.mn-card.sk:hover { transform: none; box-shadow: var(--sh-1); }

/* grade de gráficos */
.mn-graf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mn-g {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px 10px; box-shadow: var(--sh-1); min-width: 0;
}
.mn-g-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; min-width: 0; }
.mn-g-h h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; }
.mn-g-h span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx { position: relative; height: 168px; }
.gx canvas { width: 100%; height: 100%; display: block; border-radius: 8px; }
.gx canvas:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gx-tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 200px;
  background: var(--ink); color: var(--surface); border-radius: 9px; padding: 6px 9px;
  font-size: 11.5px; line-height: 1.35; box-shadow: var(--sh-3);
}
.gx-tip[hidden] { display: none; }
.gx-tip b { display: block; font-size: 12px; }
.gx-tip span { opacity: .82; }
body.dark .gx-tip { background: #0b111a; color: var(--ink); border: 1px solid var(--line); }
.mn-g-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; }
.mn-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.mn-lg i { width: 10px; height: 10px; border-radius: 3px; background: var(--mn-neutro); flex-shrink: 0; }
.mn-lg b { font-weight: 800; color: var(--ink); }
.mn-lg em { font-style: normal; color: var(--muted); }
.mn-lg.ok i { background: var(--mn-ok); }
/* textura na fatia "não atendidas": o par verde x vermelho colide sob
   deuteranopia, então a cor nunca fica sozinha */
.mn-lg.miss i { background: var(--mn-bad); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 1.6px, transparent 1.6px 4px); }
.mn-lg.busy i { background: var(--mn-warn); }
.mn-lg.fail i { background: var(--mn-alt); }
.mn-lg.cancel i { background: var(--mn-neutro); }
.mn-lg.jorn i { background: var(--mn-c1); }
.mn-lg.pause i { background: var(--mn-warn); }
.mn-lg.call i { background: var(--mn-alt); }
.mn-g.sk { display: flex; flex-direction: column; gap: 6px; }

/* lista de atendentes e tabelas compactas */
.mn-panel { margin-bottom: 12px; }
.mn-tab-wrap { overflow-x: auto; }
.mn-lista, .mn-pres { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mn-lista th, .mn-pres th {
  position: sticky; top: 0; z-index: 1; background: var(--bg-2); color: var(--muted);
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  text-align: left; padding: 0; border-bottom: 1px solid var(--line);
}
.mn-pres th { padding: 8px 12px; }
.mn-lista th.num { text-align: right; }
.mn-lista th.on { color: var(--brand-strong); }
.mn-th { display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 8px 12px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.mn-lista th.num .mn-th { justify-content: flex-end; }
.mn-th:hover { color: var(--ink); }
.mn-th:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mn-th-s { font-size: 8px; }
.mn-lista td, .mn-pres td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.mn-lista td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mn-lista td.num small { display: block; font-size: 10px; color: var(--muted); }
.mn-lista tbody tr, .mn-pres tbody tr { cursor: pointer; transition: background .12s; }
.mn-lista tbody tr:hover, .mn-pres tbody tr:hover { background: var(--bg-2); }
.mn-lista tbody tr:focus-visible, .mn-pres tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mn-lista tbody tr.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.mn-ram { font-variant-numeric: tabular-nums; font-weight: 800; }
.mn-voce { font-style: normal; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--brand-strong); background: var(--brand-soft); padding: 1px 6px; border-radius: 10px; margin-left: 6px; }
.mn-semvinc { font-size: 11.5px; color: var(--muted); font-style: italic; }
.mn-pres .vz-pres-st { font-size: 10px; }
.mn-pres .vz-pres-sf { margin: 0 0 0 6px; padding: 2px 7px; font-size: 9.5px; }
.mn-pres .vz-pres-cron { margin-left: 7px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mn-pz, .mn-cl { display: inline-flex; align-items: center; gap: 5px; }
.mn-ha { margin-left: 7px; font-size: 10.5px; color: var(--muted); }
.mn-ha + .vz-pres-cron { margin-left: 3px; }
.mn-pz svg, .mn-cl svg { width: 12px; height: 12px; color: var(--muted); }
.mn-pres-tr.call .mn-cl svg, .mn-pres-tr.call .vz-pres-cron { color: var(--vz-blue); }
.mn-pres-tr.pause .mn-pz svg, .mn-pres-tr.pause .vz-pres-cron { color: var(--vz-amber); }
.mn-pres-tr.off { opacity: .72; }
/* chips de estado usados fora dos cards de presença */
.vz-pres-st.on { background: var(--vz-green-soft); color: var(--vz-green); }
.vz-pres-st.call { background: var(--vz-blue-soft); color: var(--vz-blue); }
.vz-pres-st.call i { animation: vzPulse 1.2s ease-in-out infinite; }
.vz-pres-st.pause { background: var(--vz-amber-soft); color: var(--vz-amber); }
.vz-pres-st.off, .vz-pres-st.unk { background: var(--vz-gray-soft); color: var(--vz-gray); }

/* linha do tempo do dia */
.mn-tl { position: relative; padding: 4px 0 0; }
.mn-tl-track { position: relative; height: 58px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.mn-tl-b { position: absolute; top: 10px; height: 20px; border-radius: 5px; }
.mn-tl-b.jorn { background: var(--mn-c1); opacity: .28; top: 8px; height: 24px; }
.mn-tl-b.pause { background: var(--mn-warn); top: 10px; height: 20px; }
.mn-tl-b.call { background: var(--mn-alt); top: 10px; height: 20px; }
.mn-tl-c { position: absolute; bottom: 0; width: 4px; margin-left: -2px; border-radius: 3px 3px 0 0; background: var(--mn-alt); opacity: .85; }
.mn-tl-h { position: relative; height: 16px; margin-top: 4px; }
.mn-tl-h span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mn-tl-leg { display: flex; gap: 12px; flex-wrap: wrap; }
.mn-tl-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 13px; }
.mn-tl-hint svg { width: 15px; height: 15px; }

/* selo "enviadas pelo painel hoje" agora vive no cabeçalho de Atendentes */
.ph-right .at-hoje { margin: 0; padding: 5px 11px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); font-size: 11.5px; white-space: nowrap; }
.ph-right .at-hoje-h { font-size: 11.5px; }
.ph-right .at-hoje-h svg { width: 13px; height: 13px; }

/* "em preparação" (api/monitoria.php ainda não publicado) */
.mn-preparo {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 12px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.mnp-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); flex-shrink: 0; }
.mnp-ico svg { width: 24px; height: 24px; }
.mnp-txt b { display: block; font-size: 14.5px; }
.mnp-txt span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; max-width: 62ch; }
.mnp-fake { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin-left: auto; flex-shrink: 0; }
.mnp-fake span { width: 12px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--brand-soft-2), var(--brand-soft)); }

/* ── paleta dos gráficos ──
   Passou pelo validador de daltonismo da skill de dataviz: faixa de
   luminosidade OKLCH, piso de croma, contraste com a superfície e separação
   sob protanopia/deuteranopia. O par verde x vermelho do gráfico de
   resultado é intencional (é a linguagem de status do painel inteiro) e vem
   sempre com rótulo, valor e textura. */
:root {
  --mn-c1: #1592b4; --mn-ok: #0f9d77; --mn-warn: #b57e26; --mn-bad: #d9596a;
  --mn-alt: #6a5acd; --mn-neutro: #8b96a5; --mn-grade: #e6eaf0; --mn-trilho: #f1f4f8;
}
body.dark {
  --mn-c1: #35a0bd; --mn-ok: #28a684; --mn-warn: #b8863a; --mn-bad: #df6b79;
  --mn-alt: #8b7ce4; --mn-neutro: #78859a; --mn-grade: #2a3542; --mn-trilho: #222d3a;
}

/* ── responsivo ── */
@media (max-width: 1400px) {
  .mn-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mn-graf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .dash .vz-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .dash-topo { flex-direction: column; }
  .page-head.ph-row { align-items: flex-start; }
  .ph-right { margin-left: 0; }
  .mn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash > .kpis-duo { grid-column: auto !important; grid-row: auto !important; }
  .dash > .dash-topo { grid-column: auto !important; grid-row: auto !important; }
  .kg .kg-go { display: none; }
  .kg-live { width: 100%; margin-left: 0; }
  .mn-graf { grid-template-columns: 1fr; }
  .gx { height: 150px; }
  .mn-bar { padding: 8px 10px; }
  .mn-f select { max-width: 100%; width: 100%; }
  .mn-f { width: 100%; }
  .ph-id p { display: none; }
  .mn-preparo { flex-wrap: wrap; }
  .mnp-fake { display: none; }
  /* tabelas compactas viram cartões no celular */
  .mn-lista thead, .mn-pres thead { display: none; }
  .mn-lista tr, .mn-pres tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  .mn-lista td, .mn-pres td { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; border: 0; text-align: left !important; }
  .mn-lista td::before, .mn-pres td::before { content: attr(data-l); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
  .mn-lista td:first-child, .mn-pres td:first-child { grid-column: 1 / -1; }
  .mn-lista td:first-child::before, .mn-pres td:first-child::before { display: none; }
  .mn-lista td.num { justify-content: space-between; }
}
@media (max-width: 480px) {
  .mn-cards { grid-template-columns: 1fr 1fr; }
  .mn-card { padding: 9px 10px; }
  .mn-c-v { font-size: 17px; }
  .mn-tl-track { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .mn-card, .ph-tab, .mn-per-b, .mn-lista tbody tr, .mn-pres tbody tr { transition: none; }
  .mn-card:hover { transform: none; }
  .px-on-strip .px-on-st i, .vz-pres-st.call i { animation: none !important; }
}

/* ══ Usuários, perfis e importação de PESSOAS do PABX ══
   Tela larga com navegação interna. Perfil tem cor própria, o ramal aparece
   como chip e a senha provisória é dita com todas as letras. */
.modal.largo { max-width: 980px; }
.modal-back.travado { cursor: default; }

.ug-carreg { display: flex; flex-direction: column; gap: 10px; }
.ug-sk { display: grid; grid-template-columns: 40px 1fr 90px; grid-template-areas: 'a b c'; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; }
.ug-sk span { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 300% 100%; animation: ugSk 1.3s infinite; }
.ug-sk-av { grid-area: a; width: 38px; height: 38px; border-radius: 50%; }
.ug-sk-l1 { grid-area: b; height: 13px; width: 62%; }
.ug-sk-l2 { grid-area: c; height: 22px; border-radius: 20px; }
@keyframes ugSk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.ug-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ug-resumo { display: flex; gap: 7px; flex-wrap: wrap; }
.ug-rchip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 20px; }
.ug-rchip b { font-size: 13px; font-weight: 800; color: var(--ink); }
.ug-rchip.super_admin b { color: #7c3aed; } .ug-rchip.admin b { color: #0064e0; }
.ug-rchip.gestor b { color: #0e8f70; } .ug-rchip.atendente b { color: var(--ink-2); }
.ug-rchip.off b { color: #e5484d; } .ug-rchip.prov b { color: #d98a1f; }
.ug-top-acts { display: flex; gap: 8px; flex-shrink: 0; }
.ug-top-acts svg { width: 14px; height: 14px; }

.ug-busca { position: relative; margin-bottom: 12px; }
.ug-busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.ug-busca input { width: 100%; padding: 10px 13px 10px 36px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2); color: var(--ink); font-size: 13.5px; }
.ug-busca input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }

.ug-list { display: flex; flex-direction: column; gap: 9px; }
.ug-vazio { text-align: center; color: var(--muted); font-size: 13px; padding: 26px; }
.ug-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); flex-wrap: wrap; transition: border-color .15s, box-shadow .15s; }
.ug-row:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(16,26,43,.06); }
.ug-row.inativo { opacity: .72; background: var(--bg-2); }
.ug-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: #fff; background: hsl(var(--h,210) 62% 45%); }
.ug-id { flex: 1; min-width: 160px; }
.ug-nome { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.ug-mail { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ug-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ug-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 20px; }
.ug-chip svg { width: 11px; height: 11px; }
.ug-chip.fone { color: #0e8f70; background: rgba(22,163,123,.10); border-color: rgba(22,163,123,.26); }
.ug-chip.prov { color: #8a5a10; background: #fdf4e3; border-color: #f2ddb4; }
.ug-chip.off { color: #b4262b; background: #fdecec; border-color: #f3c7c8; }
.ug-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ug-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 4px 9px; border-radius: 20px; color: #fff; background: var(--ink-2); white-space: nowrap; }
.ug-badge.super_admin { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.ug-badge.admin { background: #0064e0; }
.ug-badge.gestor { background: #0e8f70; }
.ug-badge.atendente { background: var(--ink-2); }
.ug-badge.restrito { background: var(--muted); }
.ug-act { width: 31px; height: 31px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.ug-act svg { width: 15px; height: 15px; }
.ug-act:hover { border-color: var(--brand); color: var(--brand-strong); transform: translateY(-1px); }
.ug-act.del:hover { border-color: #e5484d; color: #e5484d; }
.ug-act.on { color: #0e8f70; border-color: rgba(22,163,123,.4); }
body.dark .ug-act { background: var(--bg-2); }
.ug-confirma { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 11px; padding: 11px 12px; border-radius: 11px; background: #fff6f6; border: 1px solid #f3c7c8; font-size: 12.5px; color: #8a4b4d; }
.ug-confirma span { flex: 1; min-width: 180px; }
.ug-del-ok { border: 0; background: #e5484d; color: #fff; font: 700 12.5px inherit; padding: 8px 15px; border-radius: 9px; cursor: pointer; }
.ug-del-ok:hover { background: #d0393e; }
body.dark .ug-confirma { background: rgba(229,72,77,.10); border-color: rgba(229,72,77,.3); color: #e5b7b9; }

.ug-nav { display: flex; align-items: center; gap: 13px; padding-bottom: 13px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.ug-back { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 700 12.5px inherit; padding: 7px 12px; border-radius: 9px; cursor: pointer; flex-shrink: 0; }
.ug-back svg { width: 13px; height: 13px; }
.ug-back:hover { border-color: var(--brand); color: var(--brand-strong); }
body.dark .ug-back { background: var(--bg-2); }
.ug-nav-t { min-width: 0; }
.ug-nav-t b { display: block; font-size: 14.5px; letter-spacing: -.2px; }
.ug-nav-t span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

.ug-form { max-width: 560px; }
.ug-desc { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.ug-form-acts { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.ug-form-acts button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.ug-form-acts button svg { width: 15px; height: 15px; flex-shrink: 0; }
.ug-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; border: 0; background: transparent; color: var(--brand-strong); font: 600 12.5px inherit; cursor: pointer; padding: 0; }
.ug-link svg { width: 14px; height: 14px; }
.ug-link:hover { text-decoration: underline; }

.ug-switch { display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 2px; cursor: pointer; }
.ug-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ug-sw { position: relative; flex: 0 0 40px; width: 40px; height: 23px; border-radius: 20px; background: var(--line); transition: background .18s; margin-top: 1px; }
.ug-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.ug-switch input:checked + .ug-sw { background: #16a37b; }
.ug-switch input:checked + .ug-sw::after { transform: translateX(17px); }
.ug-switch.travado { opacity: .7; cursor: not-allowed; }
.ug-sw-tx b { display: block; font-size: 13px; }
.ug-sw-tx small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.45; }

.ug-pass { display: flex; gap: 8px; align-items: stretch; }
.ug-pass input { flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5px; }
.ug-pass input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.ug-pass .btn-mini { flex-shrink: 0; }
.ug-pass .btn-mini svg { width: 14px; height: 14px; }

.ug-aviso { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 11px 13px; border-radius: 11px; background: #fdf4e3; border: 1px solid #f2ddb4; font-size: 12.5px; color: #7a5b28; line-height: 1.5; }
.ug-aviso svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #d98a1f; }
.ug-aviso.info { background: var(--brand-soft); border-color: rgba(0,100,224,.22); color: var(--ink-2); }
.ug-aviso.info svg { color: var(--brand-strong); }
body.dark .ug-aviso { background: rgba(217,138,31,.12); border-color: rgba(217,138,31,.3); color: #e8c896; }

.ug-imp-kpis { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 10px; margin-bottom: 14px; }
.ug-imp-kpi { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.ug-imp-kpi b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.ug-imp-kpi span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.ug-imp-kpi.novo b { color: #0e8f70; } .ug-imp-kpi.ja b { color: var(--ink-2); }
.ug-imp-kpi.fone b { color: var(--brand-strong); } .ug-imp-kpi.falta b { color: #d98a1f; }
.ug-imp-cfg { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 14px; align-items: start; padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-2); margin-bottom: 14px; }
.ug-imp-cfg .m-field { margin-bottom: 0; }
.ug-imp-tabela { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.ug-tab { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.ug-tab th { text-align: left; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ug-tab td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft, var(--line)); vertical-align: middle; }
.ug-tab tbody tr:last-child td { border-bottom: 0; }
.ug-tab tbody tr.on { background: var(--brand-soft); }
.ug-tab tbody tr:hover { background: var(--bg-2); }
.ug-tab tbody tr.on:hover { background: var(--brand-soft); }
.ug-td-ck { width: 38px; }
.ug-td-mail { max-width: 260px; overflow-wrap: anywhere; }
.ug-tab th:nth-child(2), .ug-tab td:nth-child(2) { width: 21%; }
.ug-tab th:nth-child(3), .ug-tab td:nth-child(3) { width: 23%; }
.ug-tab th:nth-child(4), .ug-tab td:nth-child(4) { width: 10%; }
.ug-tab th:nth-child(5), .ug-tab td:nth-child(5) { width: 15%; }
.ug-tab th:nth-child(6), .ug-tab td:nth-child(6) { width: 27%; }
.ug-p-nome { font-weight: 700; }
.ug-p-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ug-mini-in, .ug-mini-sel { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12.5px; }
.ug-mini-sel { max-width: 190px; }
.ug-mini-in:focus, .ug-mini-sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ug-ck { display: inline-flex; cursor: pointer; }
.ug-ck input { position: absolute; opacity: 0; width: 0; height: 0; }
.ug-ck span { width: 18px; height: 18px; border-radius: 5px; border: 1.6px solid var(--line); background: var(--surface); display: block; position: relative; transition: all .15s; }
.ug-ck input:checked + span { background: var(--brand-strong); border-color: var(--brand-strong); }
.ug-ck input:checked + span::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ug-ck input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.ug-sit { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.ug-sit.novo { color: #0b6f4e; background: #e6f8f1; }
.ug-sit.ja { color: var(--ink-2); background: var(--bg-2); }
.ug-sit.falta { color: #8a5a10; background: #fdf4e3; }
body.dark .ug-sit.novo { color: #5fd7a9; background: rgba(22,163,123,.16); }
body.dark .ug-sit.falta { color: #f0c07a; background: rgba(217,138,31,.16); }

.ug-res-topo { display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; border-radius: 13px; background: #e6f8f1; border: 1px solid rgba(22,163,123,.28); margin-bottom: 14px; }
.ug-res-topo svg { width: 22px; height: 22px; flex-shrink: 0; color: #0b6f4e; margin-top: 1px; }
.ug-res-topo b { display: block; font-size: 15px; color: #0b6f4e; }
.ug-res-topo span { display: block; font-size: 12.5px; color: #3f6b5b; line-height: 1.5; margin-top: 2px; }
body.dark .ug-res-topo { background: rgba(22,163,123,.12); border-color: rgba(22,163,123,.3); }
body.dark .ug-res-topo b, body.dark .ug-res-topo svg { color: #5fd7a9; }
body.dark .ug-res-topo span { color: #a8d5c4; }
/* senha do primeiro acesso à vista no fim da importação (05/10/2026) */
.ug-res-senha { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line); }
.ug-res-senha small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.ug-res-senha code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; font-weight: 700; letter-spacing: .6px; color: var(--ink); user-select: all; }
.ug-res-senha .btn-mini { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.ug-res-senha .btn-mini svg { width: 14px; height: 14px; }
.ug-res-lista { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.ug-res-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.ug-res-l b { font-weight: 700; }
@media (max-width: 700px) {
  .ug-top { flex-direction: column; align-items: stretch; }
  .ug-top-acts { justify-content: stretch; }
  .ug-top-acts button { flex: 1; justify-content: center; }
  .ug-right { width: 100%; margin-left: 0; margin-top: 10px; }
  .ug-form-acts { flex-direction: column-reverse; }
  .ug-form-acts button { width: 100%; justify-content: center; }
}

/* ══ Equipes: cartão por equipe, administrador com selo e as pessoas ══
   Irmã da tela de usuários: mesma família .ug-*, mesmas variáveis de cor.
   O cartão diz o nome, quem administra, quantas pessoas e mostra a cara
   das primeiras; a remoção usa a mesma confirmação em linha (.ug-confirma). */
.ug-eq-list { display: flex; flex-direction: column; gap: 11px; }
.ug-eq-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 13px 15px; transition: border-color .15s, box-shadow .15s; }
.ug-eq-card:hover { border-color: var(--brand); box-shadow: 0 2px 12px rgba(16,26,43,.07); }
.ug-eq-h { display: flex; align-items: center; gap: 12px; }
.ug-eq-ico { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--brand-strong); background: var(--brand-soft); }
.ug-eq-ico svg { width: 19px; height: 19px; }
.ug-eq-t { flex: 1; min-width: 0; }
.ug-eq-t b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.ug-eq-t span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ug-eq-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ug-eq-b { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.ug-eq-chefe { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ug-eq-chefe svg { width: 17px; height: 17px; flex-shrink: 0; color: #d98a1f; }
.ug-eq-chefe-t { min-width: 0; }
.ug-eq-chefe-t b { display: block; font-size: 13px; font-weight: 700; }
.ug-eq-chefe-t span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.ug-eq-chefe.sem .ug-eq-chefe-t b { color: #8a5a10; }
body.dark .ug-eq-chefe.sem .ug-eq-chefe-t b { color: #e8c896; }
.ug-eq-avs { display: flex; align-items: center; margin-left: auto; }
.ug-eq-avs.vazio { font-size: 11.5px; color: var(--muted); }
.ug-eq-av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #fff; background: hsl(var(--h,210) 62% 45%); border: 2px solid var(--surface); margin-left: -8px; }
.ug-eq-av:first-child { margin-left: 0; }
.ug-eq-av.chefe { margin-left: 0; width: 32px; height: 32px; font-size: 11.5px; }
.ug-eq-av.mais { background: var(--bg-2); color: var(--ink-2); font-size: 10.5px; }
body.dark .ug-eq-av { border-color: var(--bg-2); }

.ug-eq-form { max-width: 640px; }
.ug-eq-membros { margin-top: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-2); padding: 13px 14px; }
.ug-eq-mh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ug-eq-mh b { font-size: 13px; font-weight: 700; }
.ug-eq-mh span { font-size: 11.5px; color: var(--muted); }
.ug-eq-busca { margin-bottom: 10px; }
.ug-eq-busca input { background: var(--surface); }
.ug-eq-mlist { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.ug-eq-m { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.ug-eq-m:hover { border-color: var(--brand); }
.ug-eq-m.on { border-color: var(--brand); background: var(--brand-soft); }
.ug-eq-m.inativo { opacity: .72; }
.ug-eq-m .ug-eq-av { margin-left: 0; border: 0; width: 28px; height: 28px; }
.ug-eq-m-t { flex: 1; min-width: 90px; }
.ug-eq-m-t b { display: block; font-size: 13px; font-weight: 700; }
.ug-eq-m-t small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.ug-chip.chefe { color: var(--brand-strong); background: var(--brand-soft); border-color: rgba(0,100,224,.24); }
.ug-eq-prom { min-width: 0; }
.ug-eq-prom b { display: block; font-size: 13px; }
.ug-eq-prom > span { display: block; margin-top: 2px; line-height: 1.5; }
.ug-eq-prom .ug-switch { margin-top: 11px; }

/* Equipe nos filtros avançados de Conversas: entra na linha do período e
   desce sozinha quando a coluna aperta, para os seletores não ficarem
   estreitos demais para ler. */
.adv .filter-row { flex-wrap: wrap; }
.adv .filter-row select { flex: 1 1 140px; }

/* Relatório: o recorte que vai abrir, dito antes de abrir. */
.ug-rel-linha { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; align-items: start; }
.ug-rel-linha .m-field { margin-bottom: 0; }
.ug-rel-fixo { display: flex; align-items: center; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); font-size: 13.5px; font-weight: 600; }

@media (max-width: 700px) {
  .ug-eq-b { flex-direction: column; align-items: flex-start; }
  .ug-eq-avs { margin-left: 0; }
  .ug-eq-mlist { max-height: none; }
  .ug-eq-m { flex-wrap: wrap; }
}

/* =======================================================================
 * APELIDO NA ASSINATURA (docs/plano-apelido.md)
 * O nome do perfil é interno. Quem o cliente vê é o apelido, em negrito na
 * primeira linha da mensagem. Estas classes servem três lugares com o mesmo
 * desenho: Meu perfil, o popover do composer e a tela de Usuários.
 * ===================================================================== */

/* ── bloco "Como o cliente vê" ── */
.ap-bloco {
  margin-top: 16px; padding: 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.ap-bloco.compacto { margin-top: 13px; padding: 12px; }
.ap-bloco-h { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.ap-bloco-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-strong);
}
.ap-bloco-ico svg { width: 16px; height: 16px; }
.ap-bloco-h b { display: block; font-size: 13.5px; font-weight: 750; letter-spacing: -.1px; color: var(--ink); }
.ap-bloco-h span { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
/* no formulário de usuário, campo e prévia dividem a linha */
.ap-duo { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; align-items: start; }

/* ── campo do apelido ── */
.ap-campo { min-width: 0; }
.ap-rot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ap-rot label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ap-cont { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-cont.perto { color: var(--amber); }
.ap-input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.ap-input::placeholder { font-weight: 400; color: var(--muted); }
.ap-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ap-campo.erro .ap-input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,89,106,.16); }
.ap-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-atalho {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ap-atalho svg { width: 12px; height: 12px; }
.ap-atalho:hover { border-color: var(--brand-soft-2); color: var(--ink); }
.ap-atalho.on { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); }
.ap-atalho:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ap-aviso { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 11.5px; line-height: 1.4; color: var(--amber); }
.ap-aviso[hidden] { display: none; }
.ap-aviso svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }

/* ── prévia: o balão do WhatsApp do cliente ── */
.ap-prev { min-width: 0; margin-top: 14px; }
.ap-prev.mini { margin-top: 12px; }
.ap-duo .ap-prev { margin-top: 0; }
.ap-prev-cab { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .2px; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.ap-prev-cab svg { width: 13px; height: 13px; color: #25d366; }
.ap-prev-fundo {
  padding: 12px; border-radius: 12px; background: var(--wa-thread);
  background-image: radial-gradient(circle at 18% 22%, rgba(11,20,26,.045) 0 2px, transparent 2px),
                    radial-gradient(circle at 72% 68%, rgba(11,20,26,.045) 0 2px, transparent 2px);
  background-size: 46px 46px;
  display: flex; justify-content: flex-end;
}
.ap-bolha {
  position: relative; max-width: 100%; padding: 7px 9px 6px 10px; border-radius: 8px 0 8px 8px;
  background: var(--wa-out); color: #111b21; font-size: 13.5px; line-height: 1.42;
  box-shadow: 0 1px .5px rgba(11,20,26,.13); word-break: break-word;
}
.ap-bolha::before {
  content: ''; position: absolute; top: 0; right: -8px; width: 8px; height: 13px;
  background: var(--wa-out); clip-path: polygon(0 0, 0 100%, 100% 0);
}
/* o nome entra e sai deslizando: a prévia acompanha a digitação sem pular */
.ap-bolha-assw { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .18s ease; }
.ap-bolha.com .ap-bolha-assw { grid-template-rows: 1fr; }
.ap-bolha-ass { display: block; overflow: hidden; min-height: 0; font-weight: 700; color: #0b6f4e; }
.ap-bolha-txt { display: block; }
.ap-bolha-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 2px; }
.ap-bolha-hora { font-size: 10.5px; color: rgba(17,27,33,.5); font-variant-numeric: tabular-nums; }
.ap-bolha-tick { font-size: 11px; color: #53bdeb; letter-spacing: -1.5px; }
.ap-prev-nota { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
.ap-prev-nota.vazio { color: var(--muted); }
body.dark .ap-bolha { color: #e9edef; }
body.dark .ap-bolha-ass { color: #7fe0c2; }
body.dark .ap-bolha-hora { color: rgba(233,237,239,.6); }
body.dark .ap-prev-fundo { background-image: radial-gradient(circle at 18% 22%, rgba(255,255,255,.04) 0 2px, transparent 2px), radial-gradient(circle at 72% 68%, rgba(255,255,255,.04) 0 2px, transparent 2px); }

/* ── Meu perfil: dica do nome interno e a dupla e-mail + papel ── */
.pf-dica { display: flex; align-items: center; gap: 6px; }
.pf-dica svg { width: 13px; height: 13px; flex: 0 0 auto; opacity: .8; }
.pf-duo { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 12px; }
.pf-duo .m-field { margin-bottom: 15px; }

/* ── assinatura dentro do balão da conversa ── */
.bubble .b-ass { display: block; font-weight: 700; color: #0b6f4e; }
body.dark .bubble .b-ass { color: #7fe0c2; }

/* ── selo na lista de usuários ── */
.ug-chip.ass { color: var(--brand-strong); background: var(--brand-soft); border-color: var(--brand-soft-2); }

/* ── chip "Assinando como" no composer ── */
.cp-status.cp-topo { justify-content: space-between; }
.cp-ass {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px 4px 8px;
  border-radius: 20px; border: 1px solid transparent; background: var(--wa-active); color: #54656f;
  font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cp-ass .cp-ass-ico { display: inline-flex; }
.cp-ass .cp-ass-ico svg { width: 13px; height: 13px; }
.cp-ass .cp-ass-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-ass .cp-ass-pre { font-weight: 500; opacity: .85; }
.cp-ass b { font-weight: 750; }
.cp-ass .cp-ass-car { display: inline-flex; opacity: .6; }
.cp-ass .cp-ass-car svg { width: 12px; height: 12px; }
.cp-ass.on { background: #d9fdd3; color: #0b6f4e; }
.cp-ass:hover:not(:disabled) { border-color: rgba(11,20,26,.14); }
.cp-ass.aberto { border-color: var(--brand); }
.cp-ass:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cp-ass:disabled, .cp-ass.fixo { cursor: default; opacity: .85; }
.cp-ass.troca { animation: apTroca .5s ease; }
@keyframes apTroca { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }
body.dark .cp-ass { background: var(--wa-active); color: #aebac1; }
body.dark .cp-ass.on { background: rgba(0,168,132,.22); color: #7fe0c2; }

/* ── popover do chip: trocar a assinatura sem sair da conversa ── */
.cp-ass-pop {
  position: absolute; left: 14px; bottom: calc(100% + 6px); width: 320px; max-width: calc(100% - 28px);
  padding: 14px; background: var(--surface); border-radius: 14px; z-index: 33;
  box-shadow: 0 10px 30px rgba(11,20,26,.22), 0 0 0 1px rgba(11,20,26,.05);
  animation: cpUp .16s ease;
}
.cp-ass-pop[hidden] { display: none; }
body.dark .cp-ass-pop { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.07); }
.cp-ass-h { margin-bottom: 12px; }
.cp-ass-h b { display: block; font-size: 13.5px; font-weight: 750; color: var(--ink); }
.cp-ass-h span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.cp-ass-msg:empty { display: none; }
.cp-ass-msg .m-msg { margin: 10px 0 0; }
.cp-ass-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.cp-ass-bt { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: background .15s, box-shadow .15s; }
.cp-ass-bt.ghost { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.cp-ass-bt.ghost:hover { background: var(--line-soft); color: var(--ink); }
.cp-ass-bt.ok { background: var(--brand); color: #fff; }
.cp-ass-bt.ok:hover { background: var(--brand-strong); }
.cp-ass-bt.ok:disabled { opacity: .7; cursor: default; }
.cp-ass-bt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 700px) {
  .ap-duo, .pf-duo { grid-template-columns: 1fr; }
  .cp-ass-pop { left: 8px; right: 8px; width: auto; max-width: none; }
  .cp-ass { max-width: 62vw; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-bolha-assw, .cp-ass, .ap-atalho, .ap-input { transition: none; }
  .cp-ass.troca { animation: none; }
  .cp-ass-pop { animation: none; }
}

/* ===========================================================================
 * FUNCIONALIDADES (v82) · gerenciador do dono do painel
 * Contrato: docs/plano-funcionalidades.md (seções 3, 4 e 7).
 *
 * Duas metades neste bloco:
 *   1. o que some quando a funcionalidade está desligada (body.fn-off-*),
 *      escrito com !important porque compete com display inline que o
 *      aplicaPermissoes() e os módulos gravam nos mesmos elementos;
 *   2. a tela Funcionalidades: grupos, interruptor, selo de credencial,
 *      formulário de credencial e o modal próprio de confirmação.
 * Claro, escuro, celular e prefers-reduced-motion no fim do bloco.
 * ========================================================================= */

/* ---- 1. o que sai da tela quando desliga ------------------------------- */
/* telefonia: o módulo inteiro já sai pelo body.vz-on; isto é a segunda trava */
body.fn-off-telefonia .vz-only { display: none !important; }
/* softphone: chip Ligar no topo (o registro SIP cai no sfSincroniza) */
body.fn-off-softphone #sf-chip-wrap,
body.fn-off-softphone .sf-dock { display: none !important; }
/* envio: campo de mensagem e anexos (o podeUsarComposer já nem monta a barra) */
body.fn-off-envio .composer,
body.fn-off-envio .b-react-pick,
body.fn-off-envio .b-react-all,
body.fn-off-envio #btn-nova-conversa { display: none !important; }
/* agendamento: botão de agendar e a lista de agendadas */
body.fn-off-agendamento #cp-sched-btn,
body.fn-off-agendamento .cp-sched-btn,
body.fn-off-agendamento #th-sched,
body.fn-off-agendamento [data-act="agendar"] { display: none !important; }
/* respostas rápidas: atalho "/" e a gestão em Configurações */
body.fn-off-respostas-rapidas #cp-quick,
body.fn-off-respostas-rapidas .mp-item[data-opt="respostas"] { display: none !important; }
/* assinatura: campo Apelido, chip "Assinando como" e a prévia */
body.fn-off-assinatura #cp-ass,
body.fn-off-assinatura .cp-ass,
body.fn-off-assinatura .cp-ass-pop,
body.fn-off-assinatura .ap-bloco { display: none !important; }
/* IA: resumo da conversa e a transcrição */
body.fn-off-ia .btn-ai,
body.fn-off-ia #ai-box { display: none !important; }
/* conexões: a aba inteira */
body.fn-off-conexoes .nav-item[data-view="conexoes"] { display: none !important; }
/* arquivamento automático: a configuração (arquivar na mão continua) */
body.fn-off-arquivamento .mp-item[data-opt="arquivo"],
body.fn-off-arquivamento #ar-ajustar { display: none !important; }
/* API Oficial e coexistência: só as duas opções do modal, o QR fica */
body.fn-off-meta-oficial #cnx-opt-meta,
body.fn-off-meta-oficial #cnx-opt-coex,
body.fn-off-meta-oficial #cnx-cmp { display: none !important; }
/* exportar em CSV */
body.fn-off-export .mp-item[data-opt="export-csv"],
body.fn-off-export [data-bulk="exportar"],
body.fn-off-export [data-act="exportar"],
body.fn-off-export #vz-csv,
body.fn-off-export #mn-csv { display: none !important; }
/* o item de menu só existe para o dono do painel */
body:not(.fn-dono) #fn-menu-item { display: none !important; }
#fn-menu-item .fn-menu-ico { display: inline-flex; }
#fn-menu-item svg { width: 18px; height: 18px; color: var(--ink-2); flex-shrink: 0; }

/* ---- 2. a tela --------------------------------------------------------- */
/* lista de leitura: 980px do modal largo deixa a linha comprida demais */
.modal-back.fn-back .modal { max-width: 880px; }
.fn-tela {
  --fn-on: var(--brand);
  --fn-on-2: var(--brand-strong);
  --fn-off: #b4c0cf;
  --fn-cred: var(--amber);
  --fn-cred-soft: var(--amber-soft);
  display: flex; flex-direction: column; gap: 16px;
}
body.dark .fn-tela { --fn-off: #4a5768; }

/* aviso curto de resultado (fica no topo da tela, dentro do modal) */
.fn-aviso {
  position: sticky; top: -1px; z-index: 4;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; line-height: 1.45;
  border: 1px solid transparent;
  animation: fnAvisoIn .26s cubic-bezier(.2,.8,.3,1);
}
.fn-aviso[hidden] { display: none; }
.fn-aviso .fn-aviso-ico { display: inline-flex; flex-shrink: 0; }
.fn-aviso svg { width: 15px; height: 15px; }
.fn-aviso.ok { background: var(--green-soft); color: #0b7a5c; border-color: rgba(15,157,119,.28); }
.fn-aviso.err { background: var(--red-soft); color: #a83b4c; border-color: rgba(217,89,106,.3); }
body.dark .fn-aviso.ok { color: #56d3ab; }
body.dark .fn-aviso.err { color: #ff9aa3; }
@keyframes fnAvisoIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }

/* faixa de contexto: o porquê da tela, em uma linha */
.fn-intro {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--brand-soft) 0%, transparent 62%),
    var(--bg-2);
  border: 1px solid var(--line);
}
.fn-intro-ico {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--brand-strong);
  box-shadow: var(--sh-1), 0 0 0 1px var(--line-soft);
}
.fn-intro-ico svg { width: 18px; height: 18px; }
.fn-intro b { display: block; font-size: 13.5px; font-weight: 750; color: var(--ink); }
.fn-intro span { display: block; margin-top: 3px; font-size: 12.3px; line-height: 1.55; color: var(--muted); }

/* grupo (Atendimento, Telefonia, Inteligência, Operação) */
.fn-grupo {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); overflow: hidden;
  box-shadow: var(--sh-1);
}
.fn-grupo-h {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg-2), transparent);
}
.fn-grupo-ico {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong);
}
.fn-grupo-ico svg { width: 16px; height: 16px; }
.fn-grupo-tx { flex: 1; min-width: 0; }
.fn-grupo-tx h4 { margin: 0; font-size: 13.5px; font-weight: 750; color: var(--ink); letter-spacing: .1px; }
.fn-grupo-tx span { display: block; font-size: 11.3px; color: var(--muted); margin-top: 1px; }
.fn-grupo-n {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--ink-2);
  padding: 4px 10px; border-radius: 20px; background: var(--bg-2);
  border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.fn-lista { display: flex; flex-direction: column; }

/* linha de uma funcionalidade */
.fn-item {
  position: relative;
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center;
  gap: 13px; padding: 14px 16px 14px 18px;
  border-top: 1px solid var(--line-soft);
  transition: background .18s ease;
}
.fn-it-ico {
  width: 32px; height: 32px; border-radius: 11px; align-self: start;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong);
  transition: background .2s, color .2s, transform .2s;
}
.fn-it-ico svg { width: 16px; height: 16px; }
.fn-item.off .fn-it-ico { background: var(--bg-2); color: var(--muted); }
.fn-item:hover .fn-it-ico { transform: translateY(-1px); }
body.dark .fn-item.off .fn-it-ico { background: rgba(255,255,255,.05); }
.fn-lista .fn-item:first-child { border-top: 0; }
.fn-item::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--fn-on);
  transform: scaleY(0); transform-origin: center;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), background .2s;
}
.fn-item.on::before { transform: scaleY(1); }
.fn-item.off::before { background: var(--fn-off); }
.fn-item:hover { background: var(--bg-2); }
.fn-item:hover::before { transform: scaleY(1); }
.fn-it-tx { min-width: 0; }
.fn-it-nome {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3;
  transition: color .18s;
}
.fn-item.off .fn-it-nome { color: var(--ink-2); }
.fn-it-res {
  margin-top: 4px; font-size: 12.2px; line-height: 1.55; color: var(--muted);
  transition: opacity .18s;
}
.fn-item.off .fn-it-res { opacity: .78; }
.fn-it-motivo {
  margin-top: 6px; font-size: 11.6px; line-height: 1.45; color: var(--fn-cred);
  padding-left: 10px; border-left: 2px solid var(--fn-cred-soft);
}

/* selos: precisa de credencial, depende de outro módulo, sem efeito */
.fn-selo {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 6px; border-radius: 20px;
  font-size: 10.4px; font-weight: 700; letter-spacing: .2px;
  white-space: nowrap; border: 1px solid transparent;
}
.fn-selo svg { width: 11px; height: 11px; }
.fn-selo.cred {
  background: var(--fn-cred-soft); color: var(--amber);
  border-color: rgba(201,138,43,.3);
}
.fn-selo.dep {
  background: var(--bg-2); color: var(--muted); border-color: var(--line);
  padding-left: 8px;
}

/* interruptor: trilho, botão e o estado de espera */
.fn-sw {
  --fn-sw-w: 46px; --fn-sw-h: 26px;
  position: relative; flex-shrink: 0;
  width: var(--fn-sw-w); height: var(--fn-sw-h); padding: 0; border: 0;
  background: none; cursor: pointer; border-radius: 20px;
}
.fn-sw:disabled { cursor: progress; }
.fn-sw-tr {
  position: absolute; inset: 0; border-radius: 20px;
  background: var(--fn-off);
  box-shadow: inset 0 1px 3px rgba(16,24,40,.18);
  transition: background .24s cubic-bezier(.2,.8,.3,1), box-shadow .24s;
}
.fn-sw.on .fn-sw-tr {
  background: linear-gradient(135deg, var(--fn-on), var(--fn-on-2));
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15), 0 0 0 3px var(--brand-soft);
}
.fn-sw-kn {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(16,24,40,.35), 0 0 0 .5px rgba(16,24,40,.05);
  transition: transform .26s cubic-bezier(.34,1.56,.64,1), width .18s;
}
.fn-sw.on .fn-sw-kn { transform: translateX(20px); }
.fn-sw:hover .fn-sw-kn { box-shadow: 0 2px 6px rgba(16,24,40,.4); }
.fn-sw:active .fn-sw-kn { width: 24px; }
.fn-sw.on:active .fn-sw-kn { transform: translateX(16px); }
.fn-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
/* espera: o próprio botão vira o indicador, sem trocar de lugar */
.fn-sw.wait .fn-sw-tr { opacity: .75; }
.fn-sw.wait .fn-sw-kn::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  border: 2px solid var(--fn-on); border-top-color: transparent;
  animation: fnGira .7s linear infinite;
}
.fn-sw.wait.on .fn-sw-kn::after { border-color: var(--fn-on-2); border-top-color: transparent; }
@keyframes fnGira { to { transform: rotate(360deg); } }
.fn-item.wait { background: var(--bg-2); }

/* credencial: barra de estado + gaveta do formulário */
.fn-cred {
  grid-column: 1 / -1;
  margin-top: 12px; border-radius: 12px;
  border: 1px dashed var(--line);
  background: var(--bg-2);
  transition: border-color .2s, background .2s;
}
.fn-cred.ok { border-style: solid; border-color: var(--line); }
.fn-cred.aberta { border-style: solid; border-color: var(--brand-soft-2); background: var(--surface); box-shadow: var(--sh-2); }
.fn-cred-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; flex-wrap: wrap; }
.fn-cred-st {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--amber);
  padding: 3px 9px; border-radius: 20px;
  background: var(--fn-cred-soft); border: 1px solid rgba(201,138,43,.28);
}
.fn-cred-st svg { width: 12px; height: 12px; }
.fn-cred-st.ok { color: #0b7a5c; background: var(--green-soft); border-color: rgba(15,157,119,.28); }
body.dark .fn-cred-st.ok { color: #56d3ab; }
.fn-cred-det { flex: 1; min-width: 120px; font-size: 11.5px; color: var(--muted); }
.fn-cred-form {
  padding: 4px 12px 12px;
  border-top: 1px solid var(--line-soft);
  animation: fnGaveta .24s cubic-bezier(.2,.8,.3,1);
}
@keyframes fnGaveta { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fn-cred-tit { font-size: 12.5px; font-weight: 750; color: var(--ink); margin: 11px 0 4px; }
.fn-cred-dica { font-size: 11.8px; line-height: 1.55; color: var(--muted); margin: 0 0 12px; }
.fn-campo { margin-bottom: 11px; }
.fn-campo label { display: block; font-size: 11.8px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.fn-campo input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); color: var(--ink); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.fn-campo input::placeholder { color: var(--muted); opacity: .8; font-size: 12.5px; }
.fn-campo input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.fn-cred-msg:empty { display: none; }
.fn-cred-msg .m-msg { margin: 0 0 11px; }
.fn-cred-msg .fn-424 { border-left: 3px solid var(--red); }
.fn-cred-acts { display: flex; align-items: center; gap: 8px; }
.fn-cred-sp { flex: 1; }

/* botões da tela */
.fn-bt {
  height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, color .15s, box-shadow .15s, transform .12s;
}
.fn-bt:active { transform: translateY(1px); }
.fn-bt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fn-bt.ok { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; }
.fn-bt.ok:hover { filter: brightness(1.06); box-shadow: 0 4px 12px rgba(21,146,180,.32); }
.fn-bt.ghost { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.fn-bt.ghost:hover { background: var(--line-soft); color: var(--ink); }
.fn-bt.perigo { background: var(--red); color: #fff; }
.fn-bt.perigo:hover { filter: brightness(1.06); box-shadow: 0 4px 12px rgba(217,89,106,.3); }
.fn-bt.perigo.ghost { background: transparent; color: var(--red); border-color: rgba(217,89,106,.4); box-shadow: none; }
.fn-bt.perigo.ghost:hover { background: var(--red-soft); }
.fn-bt.mini { height: 30px; padding: 0 12px; font-size: 11.8px; background: var(--surface); color: var(--brand-strong); border-color: var(--line); }
.fn-bt.mini:hover { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.fn-bt:disabled { opacity: .72; cursor: progress; }
.fn-bt.wait { position: relative; padding-left: 30px; }
.fn-bt.wait::before {
  content: ''; position: absolute; left: 12px; top: 50%; margin-top: -6px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: fnGira .7s linear infinite;
}

/* vazio / erro */
.fn-vazio {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 40px 22px;
  border: 1px dashed var(--line); border-radius: 16px; background: var(--bg-2);
}
.fn-vazio-ico {
  width: 48px; height: 48px; border-radius: 16px; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-soft); color: var(--amber);
}
.fn-vazio-ico svg { width: 23px; height: 23px; }
.fn-vazio b { font-size: 14.5px; font-weight: 750; color: var(--ink); }
.fn-vazio span { font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 380px; }
.fn-vazio .fn-bt { margin-top: 10px; }

/* esqueleto enquanto carrega */
.fn-sk-g { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; background: var(--surface); }
.fn-sk-t, .fn-sk-ico, .fn-sk-l1, .fn-sk-l2, .fn-sk-sw {
  display: block; border-radius: 7px;
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 37%, var(--line-soft) 63%);
  background-size: 400% 100%; animation: fnSk 1.4s ease infinite;
}
.fn-sk-t { width: 140px; height: 13px; margin-bottom: 16px; }
.fn-sk-i { display: grid; grid-template-columns: 30px 1fr 46px; grid-template-rows: auto auto; gap: 5px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.fn-sk-ico { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 10px; }
.fn-sk-l1 { height: 11px; width: 45%; }
.fn-sk-l2 { height: 9px; width: 80%; }
.fn-sk-sw { grid-row: 1 / 3; width: 46px; height: 26px; border-radius: 20px; }
@keyframes fnSk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- modal próprio de confirmação (nunca o confirm() do navegador) ----- */
.fn-ask-back {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(15,23,42,.58); backdrop-filter: blur(4px);
  animation: fnAskFade .16s ease;
}
@keyframes fnAskFade { from { opacity: 0; } to { opacity: 1; } }
.fn-ask {
  width: 100%; max-width: 420px; padding: 24px 24px 18px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  text-align: center;
  animation: fnAskUp .24s cubic-bezier(.2,.8,.3,1);
}
@keyframes fnAskUp { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.fn-ask-ico {
  width: 48px; height: 48px; border-radius: 16px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong);
}
.fn-ask.perigo .fn-ask-ico { background: var(--red-soft); color: var(--red); }
.fn-ask-ico svg { width: 23px; height: 23px; }
.fn-ask h4 { margin: 0 0 9px; font-size: 16px; font-weight: 750; color: var(--ink); line-height: 1.35; }
.fn-ask-d p { margin: 0 0 10px; font-size: 13.2px; line-height: 1.6; color: var(--ink-2); }
.fn-ask-d p:last-child { margin-bottom: 0; }
.fn-ask-d .fn-ask-calma { font-size: 12.2px; color: var(--muted); }
.fn-ask-acts { display: flex; gap: 9px; margin-top: 19px; }
.fn-ask-acts .fn-bt { flex: 1; height: 40px; font-size: 13px; }

/* ---- tema escuro ------------------------------------------------------- */
body.dark .fn-intro {
  background: radial-gradient(120% 140% at 0% 0%, rgba(58,169,198,.14) 0%, transparent 62%), var(--bg-2);
}
body.dark .fn-grupo-h { background: linear-gradient(180deg, rgba(255,255,255,.028), transparent); }
body.dark .fn-item:hover { background: rgba(255,255,255,.035); }
body.dark .fn-item.wait { background: rgba(255,255,255,.035); }
body.dark .fn-sw-tr { box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
body.dark .fn-sw.on .fn-sw-tr { box-shadow: inset 0 1px 3px rgba(0,0,0,.35), 0 0 0 3px rgba(58,169,198,.18); }
body.dark .fn-sw-kn { background: #eef4f9; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
body.dark .fn-selo.cred { color: #f0b55a; border-color: rgba(240,181,90,.32); }
body.dark .fn-cred-st { color: #f0b55a; border-color: rgba(240,181,90,.3); }
body.dark .fn-it-motivo { color: #f0b55a; border-left-color: rgba(240,181,90,.34); }
body.dark .fn-vazio-ico { color: #f0b55a; }
body.dark .fn-ask-back { background: rgba(3,8,14,.68); }
body.dark .fn-bt.mini { background: var(--bg-2); color: var(--brand-mid); }
body.dark .fn-bt.mini:hover { background: rgba(58,169,198,.14); }
body.dark .fn-bt.perigo { background: #d9596a; }
body.dark .fn-bt.perigo.ghost { color: #ff8a92; border-color: rgba(255,138,146,.36); }

/* ---- celular (~390px) -------------------------------------------------- */
@media (max-width: 700px) {
  .fn-tela { gap: 13px; }
  .fn-intro { padding: 12px 13px; gap: 11px; }
  .fn-intro-ico { width: 30px; height: 30px; border-radius: 10px; }
  .fn-intro span { font-size: 11.8px; }
  .fn-grupo-h { padding: 11px 13px; }
  .fn-grupo-tx span { display: none; }
  .fn-item { padding: 13px 12px 13px 14px; gap: 10px; grid-template-columns: 28px 1fr auto; }
  .fn-it-ico { width: 28px; height: 28px; border-radius: 10px; }
  .fn-it-ico svg { width: 15px; height: 15px; }
  .fn-it-nome { font-size: 13px; }
  .fn-it-res { font-size: 11.8px; }
  .fn-sw { --fn-sw-w: 44px; --fn-sw-h: 25px; }
  .fn-sw-kn { width: 19px; height: 19px; }
  .fn-sw.on .fn-sw-kn { transform: translateX(19px); }
  .fn-sw.on:active .fn-sw-kn { transform: translateX(15px); }
  .fn-cred-bar { gap: 8px; padding: 9px 10px; }
  .fn-cred-det { flex-basis: 100%; min-width: 0; order: 3; }
  .fn-cred-form { padding: 4px 10px 11px; }
  .fn-cred-acts { flex-wrap: wrap; }
  .fn-cred-acts .fn-bt { flex: 1 1 auto; }
  .fn-cred-sp { display: none; }
  .fn-ask { padding: 20px 18px 16px; border-radius: 16px; }
  .fn-ask-acts { flex-direction: column-reverse; }
  .fn-ask-acts .fn-bt { width: 100%; }
}

/* ---- movimento reduzido ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .fn-aviso, .fn-cred-form, .fn-ask, .fn-ask-back { animation: none; }
  .fn-item, .fn-item::before, .fn-sw-tr, .fn-sw-kn, .fn-bt, .fn-cred,
  .fn-it-nome, .fn-it-res, .fn-campo input { transition: none; }
  .fn-sw.wait .fn-sw-kn::after, .fn-bt.wait::before { animation-duration: 1.6s; }
  .fn-sk-t, .fn-sk-ico, .fn-sk-l1, .fn-sk-l2, .fn-sk-sw { animation: none; }
}

/* ---- Celular da pessoa (Usuários e permissões, 14/09/2026) ---- */
.ug-cel .m-hint { margin: -4px 0 12px; line-height: 1.45; }
.ug-cel .ug-eq-m-t small { font-variant-numeric: tabular-nums; }
.ug-cel .ug-eq-m .ug-chip { margin-left: auto; }

/* ---- Fim da chamada: contagem para voltar ao ramal (14/09/2026) ---- */
.sf-fim-conta { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--sf-line-2); }
.sf-fim-anel { position: relative; width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; }
.sf-fim-anel svg { position: absolute; inset: 0; width: 32px; height: 32px; transform: rotate(-90deg); }
.sf-fim-anel circle { fill: none; stroke-width: 3; }
.sf-fim-anel .t { stroke: var(--sf-line-2); }
.sf-fim-anel .p { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .2s; }
.sf-fim-anel b { position: relative; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sf-fim-conta-t { flex: 1; min-width: 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.sf-fim-manter { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--brand-strong); background: transparent; border: 0; padding: 5px 8px; border-radius: 8px; transition: background .15s; }
.sf-fim-manter:hover { background: var(--brand-soft); }
.sf-fim-manter:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-fim-pref { align-self: center; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; padding: 3px 8px; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px; }
.sf-fim-pref:hover { color: var(--brand-strong); background: var(--brand-soft); text-decoration: none; }
.sf-fim-pref:focus-visible, .sf-fim-op:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-fim-ops { display: flex; gap: 6px; }
.sf-fim-op { flex: 1 1 0; min-width: 0; height: 30px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--sf-key-line); background: var(--sf-key); color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.sf-fim-op:hover { background: var(--sf-key-h); color: var(--ink); }
.sf-fim-op.on { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand); }
.sf-fim-conta.pausado .p { stroke: var(--muted); }
.sf-fim-conta.pausado .sf-fim-conta-t { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .sf-fim-anel .p { transition: none; } }

/* ---- LemonPABX: Resultados das chamadas (14/09/2026) ---- */
.px-res { display: flex; flex-direction: column; gap: 14px; }
.px-res .px-head { margin-bottom: 0; }
.px-res-per { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.px-res-per-b { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: transparent; border: 0; transition: background .15s, color .15s, box-shadow .15s; }
.px-res-per-b:hover { color: var(--ink-2); }
.px-res-per-b.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.px-res-per-b:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.px-res-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0; }
/* ITEM5_ATIVAS_PASSIVAS: ativas × passivas nos cartões de voz, com as cores do LemonChat */
.vz-ap { display: inline; }
.vz-ap b { font-weight: 800; }
.vz-ap-a { color: var(--brand-strong); }
.vz-ap-p { color: var(--green); }
.vz-ap-bar { display: block; height: 5px; border-radius: 3px; background: var(--green); overflow: hidden; margin-top: 6px; max-width: 160px; }
.vz-ap-bar > i { display: block; height: 100%; background: var(--brand-strong); transition: width .6s ease; }
.vz-ap-bar.vazio { background: var(--line-soft); }
@media (prefers-reduced-motion: reduce) { .vz-ap-bar > i { transition: none; } }
#pxr-corpo { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s; }
#pxr-corpo.carregando { opacity: .55; }
.px-res-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.px-res-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); padding: 14px 16px; min-width: 0; }
.px-res-card-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.px-res-card-h b { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.px-res-card-h span { font-size: 12px; color: var(--muted); flex: 1; }
.px-res-bars { display: flex; flex-direction: column; gap: 6px; }
.px-res-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; color: var(--ink-2); transition: background .15s, border-color .15s; }
.px-res-bar:hover { background: var(--bg-2); }
.px-res-bar.on { background: var(--brand-soft); border-color: var(--brand); }
.px-res-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.px-res-bar-l { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-res-bar-t { height: 8px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.px-res-bar-t i { display: block; height: 100%; border-radius: 6px; background: var(--vz-purple); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.px-res-bar-v { font-size: 13px; font-weight: 800; min-width: 64px; text-align: right; }
.px-res-bar-v small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.px-res-bar.c-ok .px-res-bar-t i { background: var(--vz-green); }
.px-res-bar.c-blue .px-res-bar-t i { background: var(--vz-blue); }
.px-res-bar.c-amber .px-res-bar-t i { background: var(--vz-amber); }
.px-res-bar.c-bad .px-res-bar-t i { background: var(--vz-red); }
.px-res-bar.c-muted .px-res-bar-t i { background: var(--muted); }
.px-res-ops { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.px-res-op { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.px-res-op-t { flex: 1; min-width: 0; }
.px-res-op-t b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-res-op-t small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.px-res-op-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.px-res-op-taxa { text-align: right; flex: 0 0 auto; }
.px-res-op-taxa span { display: block; font-size: 15px; font-weight: 800; }
.px-res-op-taxa small { font-size: 10.5px; color: var(--muted); }
.px-res-op-taxa.ok span { color: var(--vz-green); }
.px-res-op-taxa.amber span { color: var(--vz-amber); }
.px-res-op-taxa.bad span { color: var(--vz-red); }
.px-res-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--vz-purple-soft, var(--bg-2)); color: var(--vz-purple); white-space: nowrap; }
.px-res-chip b { font-weight: 800; }
.px-res-chip.c-ok { background: var(--vz-green-soft); color: var(--vz-green); }
.px-res-chip.c-blue { background: var(--vz-blue-soft); color: var(--vz-blue); }
.px-res-chip.c-amber { background: var(--vz-amber-soft); color: var(--vz-amber); }
.px-res-chip.c-bad { background: var(--vz-red-soft); color: var(--vz-red); }
.px-res-chip.c-muted { background: var(--bg-2); color: var(--muted); }
.px-res-lista { display: flex; flex-direction: column; }
.px-res-item { padding: 10px 2px; border-top: 1px solid var(--line); }
.px-res-item:first-child { border-top: 0; padding-top: 2px; }
.px-res-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.px-res-item-top b { font-size: 13px; font-weight: 700; }
.px-res-item-q { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.px-res-item-obs { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; white-space: pre-wrap; }
.px-res-nada { font-size: 12.5px; color: var(--muted); padding: 6px 2px; }
.px-res-vazio { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); }
.px-res-vazio svg { width: 26px; height: 26px; color: var(--vz-purple); }
.px-res-vazio b { color: var(--ink-2); font-size: 14px; }
@media (max-width: 1100px) { .px-res-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .px-res-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .px-res-kpis { grid-template-columns: minmax(0, 1fr); } .px-res-bar { grid-template-columns: minmax(0, 1fr) auto; } .px-res-bar-t { grid-column: 1 / -1; grid-row: 2; } .px-res-item-q { margin-left: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .px-res-bar-t i, #pxr-corpo { transition: none; } }

/* ---- Telefone em janela própria (telefone.php, 14/09/2026) ---- */
body.sf-janela { margin: 0; min-height: 100vh; overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, var(--brand-soft), transparent 62%), var(--bg); }
body.sf-janela .sf-dock { position: fixed; inset: 0; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; max-width: none; max-height: none; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; animation: none; }
body.sf-janela .sf-dock .sf-body { flex: 1 1 auto; overflow-y: auto; }
body.sf-janela .sf-grip, body.sf-janela #sf-min, body.sf-janela #sf-max, body.sf-janela .sf-imas { display: none !important; }
body.sf-janela .sf-head { padding-left: 14px; }
.sf-janela-palco { min-height: 100vh; display: grid; place-items: center; }
.sf-janela-carregando { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }
.sf-janela-carregando b { color: var(--ink); font-size: 15px; font-weight: 800; }
.sf-janela-marca { width: 46px; height: 46px; border-radius: 15px; margin-bottom: 6px; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 12px 28px -12px rgba(12,117,145,.8); animation: sfJanelaPulso 1.4s ease-in-out infinite; }
.sf-janela-marca.parada { animation: none; opacity: .6; }
@keyframes sfJanelaPulso { 50% { transform: scale(.9); opacity: .72; } }
.sf-hb#sf-janela.destaque { color: var(--brand-strong); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.sf-chip.remoto .sf-chip-i { position: relative; }
.sf-chip.remoto .sf-chip-i::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 3px; background: var(--brand-strong); box-shadow: 0 0 0 2px var(--surface); }
@media (prefers-reduced-motion: reduce) { .sf-janela-marca { animation: none; } }

/* ---- Telefone fixado por cima (Document Picture-in-Picture, 13/10/2026) ----
   Botão no cabeçalho da janela do telefone, faixa de dica no topo do telefone e o espelho
   compacto que vive na janela fixada (body.sf-pip, mesmo app.css). O espelho mostra o estado
   e botões grandes; discador e tela de resultado ficam na janela do telefone. */
.sf-hb.sf-hb-pip svg { transition: transform .2s cubic-bezier(.2,.9,.25,1); }
.sf-hb.sf-hb-pip:hover svg { transform: rotate(-18deg); }
.sf-hb.sf-hb-pip.on { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 4px 12px -6px rgba(12,117,145,.85), 0 1px 0 rgba(255,255,255,.22) inset; }
.sf-hb.sf-hb-pip.on:hover { color: #fff; background: linear-gradient(135deg, var(--brand-mid), var(--brand-strong)); }
.sf-hb.sf-hb-pip.on svg { transform: rotate(-18deg); }

.sf-pip-dica { position: relative; z-index: 1; flex: 0 0 auto; display: flex; align-items: center; gap: 9px; margin: 10px 14px 0; padding: 7px 7px 7px 9px; border-radius: 13px; background: var(--brand-soft); border: 1px solid var(--brand-soft-2); color: var(--brand-strong); font-size: 12px; font-weight: 650; line-height: 1.35; animation: sfDicaEntra .32s cubic-bezier(.2,.9,.25,1); }
.sf-pip-dica[hidden] { display: none; }
.sf-pip-dica-i { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--brand-strong); box-shadow: 0 1px 2px rgba(15,32,51,.08); }
.sf-pip-dica-i svg { width: 15px; height: 15px; }
.sf-pip-dica-t { flex: 1; min-width: 0; }
.sf-pip-dica-b { flex: 0 0 auto; height: 28px; padding: 0 12px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 4px 10px -6px rgba(12,117,145,.9); transition: transform .14s cubic-bezier(.2,.9,.25,1), filter .15s; }
.sf-pip-dica-b:hover { transform: translateY(-1px); filter: brightness(1.06); }
.sf-pip-dica-x { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand-strong); opacity: .65; transition: background .15s, opacity .15s; }
.sf-pip-dica-x:hover { background: var(--surface); opacity: 1; }
.sf-pip-dica-x svg { width: 14px; height: 14px; }
.sf-pip-dica-b:focus-visible, .sf-pip-dica-x:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
body.dark .sf-pip-dica { background: rgba(58,169,198,.12); border-color: rgba(58,169,198,.26); color: #86d3e8; }
body.dark .sf-pip-dica-i { background: rgba(255,255,255,.06); color: #86d3e8; box-shadow: none; }
body.dark .sf-pip-dica-x { color: #86d3e8; }
body.dark .sf-pip-dica-x:hover { background: rgba(255,255,255,.06); }
@keyframes sfDicaEntra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* o espelho na janela fixada */
body.sf-pip { margin: 0; height: 100vh; overflow: hidden; background: radial-gradient(140% 90% at 0% 0%, var(--brand-soft), transparent 58%), var(--bg); color: var(--ink); }
body.sf-pip .sfp { position: relative; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.sfp-h { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 14px; border-bottom: 1px solid var(--sf-line-2); background: var(--sf-veil); font-size: 12px; letter-spacing: -.1px; }
.sfp-h::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(128deg, rgba(255,255,255,.16) 0 1px, transparent 1px 6px); opacity: .5; }
body.dark .sfp-h::before { background: repeating-linear-gradient(128deg, rgba(255,255,255,.05) 0 1px, transparent 1px 6px); }
.sfp-h b { position: relative; min-width: 0; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfp-dot { position: relative; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--vz-gray); }
.sfp[data-k="on"] .sfp-dot { background: var(--sf-on); }
.sfp[data-k="on"] .sfp-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-on); opacity: .5; animation: pulse 1.9s ease-out infinite; }
.sfp[data-k="wait"] .sfp-dot { background: var(--sf-accent); animation: cxpulse 1.1s ease-in-out infinite; }
.sfp[data-k="warn"] .sfp-dot { background: var(--sf-warn); }
.sfp[data-k="bad"] .sfp-dot { background: var(--sf-bad); }
.sfp[data-k="call"] .sfp-dot, .sfp[data-k="ring"] .sfp-dot { background: var(--sf-live); }
.sfp[data-k="ring"] .sfp-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sf-live); opacity: .6; animation: pulse .9s ease-out infinite; }
.sfp-r { position: relative; margin-left: auto; flex: 0 0 auto; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--sf-line-2); background: var(--bg-2); color: var(--ink-2); font-size: 11px; font-weight: 700; }
.sfp-c { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 12px 14px; }
.sfp-quem { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sfp-av { position: relative; flex: 0 0 auto; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.sfp-av .avatar { position: relative; width: 52px; height: 52px; font-size: 18px; box-shadow: 0 8px 18px -10px rgba(9,26,44,.6), inset 0 0 0 2px rgba(255,255,255,.25); }
.sfp-marca { position: relative; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 18px -8px rgba(12,117,145,.75), 0 1px 0 rgba(255,255,255,.25) inset; }
.sfp-marca svg { width: 23px; height: 23px; }
.sfp-marca.k-on { background: linear-gradient(135deg, #17b37f, var(--sf-on)); box-shadow: 0 8px 18px -8px rgba(15,157,119,.8), 0 1px 0 rgba(255,255,255,.28) inset; }
.sfp-marca.k-call, .sfp-marca.k-ring { background: linear-gradient(135deg, var(--sf-live), #2554b8); box-shadow: 0 8px 18px -8px rgba(47,111,228,.75), 0 1px 0 rgba(255,255,255,.22) inset; }
.sfp-marca.k-warn { background: var(--vz-amber-soft); color: var(--vz-amber); box-shadow: inset 0 0 0 1px rgba(201,138,43,.25); }
.sfp-marca.k-bad { background: var(--vz-red-soft); color: var(--vz-red); box-shadow: inset 0 0 0 1px rgba(217,89,106,.25); }
.sfp-marca.k-off, .sfp-marca.k-wait { background: var(--bg-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.sfp-anel { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-live); opacity: 0; animation: vzRing 1.8s ease-out infinite; }
.sfp-anel.a2 { animation-delay: .9s; }
.sfp[data-fase="tocando"] .sfp-marca svg { animation: sfBalanca 1s ease-in-out infinite; }
.sfp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sfp-rot { font-size: 11.5px; font-weight: 800; letter-spacing: .1px; color: var(--sf-live); }
.sfp[data-k="on"] .sfp-rot { color: var(--sf-on); }
.sfp[data-k="warn"] .sfp-rot { color: var(--sf-warn); }
.sfp-nome { font-size: 17px; font-weight: 800; letter-spacing: -.35px; line-height: 1.22; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfp-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sfp-dica, .sfp-fim { margin: 0; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--sf-line-2); background: var(--sf-visor); color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.sfp-fim { text-align: center; font-size: 12.5px; }
.sfp-tempo { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 2px 0; }
.sfp-tempo > span:first-child { font-size: 30px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.sfp-tempo > span.wait { font-size: 24px; color: var(--muted); }
.sfp-tempo .sf-onda { margin-top: 0; }
.sfp-acts { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px; }
.sfp-acts.um { grid-template-columns: 1fr; }
.sfp-bt { min-width: 0; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 12px; color: #fff; font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; transition: transform .14s cubic-bezier(.2,.9,.25,1), box-shadow .18s, filter .18s; }
.sfp-bt svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sfp-bt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfp-bt:hover { transform: translateY(-1px); }
.sfp-bt:active { transform: scale(.97); }
.sfp-bt:disabled { opacity: .55; pointer-events: none; }
.sfp-bt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sfp-bt.ace { background: linear-gradient(135deg, #17b37f, var(--sf-on)); box-shadow: 0 10px 24px -10px rgba(15,157,119,.9), 0 1px 0 rgba(255,255,255,.28) inset; animation: sfChama 1.7s ease-in-out infinite; }
.sfp-bt.rec { background: linear-gradient(135deg, #e2687a, #d9596a); box-shadow: 0 10px 24px -10px rgba(217,89,106,.85), 0 1px 0 rgba(255,255,255,.24) inset; }
.sfp-bt.prim { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 10px 22px -10px rgba(12,117,145,.85), 0 1px 0 rgba(255,255,255,.22) inset; }
.sfp-bt.mudo { background: var(--sf-key); border: 1px solid var(--sf-key-line); box-shadow: var(--sf-key-sh); color: var(--ink-2); }
.sfp-bt.mudo:hover { background: var(--sf-key-h); color: var(--ink); }
.sfp-bt.mudo.on { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(12,117,145,.85); }
.sfp-bt.sec { background: var(--surface); border: 1px solid var(--sf-line); color: var(--ink); box-shadow: 0 1px 2px rgba(15,32,51,.06); }
.sfp-bt.sec svg { width: 17px; height: 17px; color: var(--brand-strong); }
.sfp-bt.sec:hover { border-color: var(--brand-soft-2); color: var(--brand-strong); }
body.dark .sfp-bt.sec { box-shadow: none; }
/* no tema escuro o vermelho do painel fica claro demais para texto branco: o Recusar e o Desligar seguram o tom */
body.dark .sfp-bt.rec { background: linear-gradient(135deg, #d9596a, #b8434f); box-shadow: 0 10px 24px -10px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.16) inset; }
body.dark .sfp-bt.ace { background: linear-gradient(135deg, #17b37f, #0f9d77); }
/* janela fixada alta: avatar em cima, tudo centralizado */
@media (min-height: 400px) {
  body.sf-pip .sfp-quem { flex-direction: column; text-align: center; gap: 10px; }
  body.sf-pip .sfp-av { width: 66px; height: 66px; margin-top: 4px; }
  body.sf-pip .sfp-av .avatar, body.sf-pip .sfp-marca { width: 66px; height: 66px; font-size: 21px; }
  body.sf-pip .sfp-marca svg { width: 28px; height: 28px; }
  body.sf-pip .sfp-txt { width: 100%; align-items: center; }
  body.sf-pip .sfp-nome { max-width: 100%; font-size: 19px; }
  body.sf-pip .sfp-tempo > span:first-child { font-size: 34px; }
}
/* janela fixada baixa: sai o que não é essencial; estreita: os botões ficam só com o ícone */
@media (max-height: 250px) {
  body.sf-pip .sfp-dica { display: none; }
  body.sf-pip .sfp-c { gap: 8px; padding: 8px 14px; }
  body.sf-pip .sfp-bt { height: 44px; border-radius: 14px; }
  body.sf-pip .sfp-acts { padding-bottom: 10px; }
}
@media (max-height: 190px) {
  body.sf-pip .sfp-h, body.sf-pip .sfp-tempo, body.sf-pip .sfp-fim { display: none; }
}
@media (max-width: 250px) {
  body.sf-pip .sfp-bt span { display: none; }
  body.sf-pip .sfp-av { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-pip-dica, .sfp-bt.ace, .sfp-dot, .sfp-dot::after, .sfp-marca svg, .sf-hb.sf-hb-pip svg { animation: none !important; transition: none; }
  .sfp-anel { display: none; }
  .sfp-bt, .sf-pip-dica-b { transition: none; }
  .sfp-bt:hover, .sf-pip-dica-b:hover { transform: none; }
}

/* LemonChat desligado em Funcionalidades (15/09/2026) */
/* o chat inteiro sai: abas, telas, itens do menu e o subtítulo da marca. O que
   é do LemonPABX fica de pé (16/09/2026, o Wilton avisou que os relatórios do
   PABX tinham sumido junto): a Visão Geral perde a metade de Mensagens e
   mantém a de Voz, e Atendentes vira a Monitoria, sem a aba Equipe */
body.fn-off-chat .fn-chat,
body.fn-off-chat .mp-item[data-opt="recibos"],
body.fn-off-chat .mp-item[data-opt="respostas"],
body.fn-off-chat .mp-item[data-opt="arquivo"] { display: none !important; }
/* Visão Geral: com o LemonPABX ligado sobra a faixa de Voz; sem ele, só o aviso */
body.fn-off-chat.vz-on #view-dashboard .dash > :not(.kpis-voz):not(.equipes-panel),
body.fn-off-chat:not(.vz-on) #view-dashboard .dash,
body.fn-off-chat:not(.vz-on) #view-dashboard .rel-filtro,
body.fn-off-chat:not(.vz-on) #view-dashboard .ph-tabs,
body.fn-off-chat #kg-msg,
body.fn-off-chat #dash-cards { display: none !important; }
.dash-vazio { display: none; }
body.fn-off-chat:not(.vz-on) .dash-vazio { display: block; align-self: start; }
/* a busca do topo é de conversa: some onde não sobrou o que buscar */
body.fn-off-chat.view-dashboard .global-search,
body.fn-off-chat:not(.vz-on) .global-search { visibility: hidden; }
@media (max-width: 1024px) {
  .mn-cards[data-n="7"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mn-cards[data-n="5"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-vazio .empty { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-top: 8vh; }

/* ITEM4_SOFTPHONE_HELENA: preferência do telefone e a página para abrir dentro do Helena */
.pref-sf { margin-top: 14px; }
/* som do alerta de mensagem nova (Vocatel, 08/10/2026): escolha + botão Ouvir na mesma linha */
.pref-som { margin-top: 14px; }
.pref-som-l { display: flex; align-items: center; gap: 8px; }
.pref-som-l select { flex: 1; min-width: 0; }
.pref-som-l .btn-mini { flex: none; }
body.sf-app { margin: 0; min-height: 100vh; background: radial-gradient(120% 80% at 50% 0%, var(--brand-soft), transparent 60%), var(--bg); color: var(--ink); }
.sf-app-palco { min-height: 100vh; display: grid; place-items: center; padding: 18px; box-sizing: border-box; }
.sf-app-card { width: 100%; max-width: 420px; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 16px 14px; box-shadow: 0 18px 40px -26px rgba(15, 32, 51, .45); box-sizing: border-box; }
.sf-app-marca { position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 10px 22px -12px rgba(12, 117, 145, .85); }
.sf-app-marca svg { width: 22px; height: 22px; }
.sf-app-marca::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--surface); }
.sf-app-card[data-k="on"] .sf-app-marca::after { background: var(--green); }
.sf-app-card[data-k="call"] .sf-app-marca::after { background: var(--brand-strong); }
.sf-app-card[data-k="ring"] .sf-app-marca::after { background: #f59e0b; animation: sfAppPulso 1.1s ease-in-out infinite; }
.sf-app-card[data-k="bad"] .sf-app-marca::after { background: #e5484d; }
.sf-app-card[data-k="wait"] .sf-app-marca::after { background: #f59e0b; }
.sf-app-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sf-app-t b { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.sf-app-t span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sf-app-bt { flex: 0 0 auto; border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--brand); cursor: pointer; transition: background .15s, transform .12s; }
.sf-app-bt:hover { background: var(--brand-strong); }
.sf-app-bt:active { transform: scale(.97); }
.sf-app-bt:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
.sf-app-dica { max-width: 420px; margin: 12px auto 0; font-size: 12.5px; color: #b45309; text-align: center; }
@keyframes sfAppPulso { 50% { transform: scale(1.25); opacity: .7; } }
@media (max-width: 380px) { .sf-app-card { flex-wrap: wrap; } .sf-app-bt { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .sf-app-card[data-k="ring"] .sf-app-marca::after { animation: none; } .sf-app-bt { transition: none; } }

/* ══ SF_LINHA_17_09: telefone depois do uso dentro do Helena (Wilton, 17/09/2026) ══ */
/* apagar: um toque apaga um dígito; segurar enche o anel e apaga o número inteiro */
@property --sf-apaga { syntax: '<number>'; inherits: false; initial-value: 0; }
.sf-vb-apaga { position: relative; }
.sf-vb-anel { position: absolute; inset: -2px; border-radius: 11px; pointer-events: none; opacity: 0;
  background: conic-gradient(#e5484d calc(var(--sf-apaga) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); }
.sf-vb-apaga.segurando { color: #e5484d; background: rgba(229, 72, 77, .1); }
.sf-vb-apaga.segurando .sf-vb-anel { opacity: 1; animation: sfApagaEnche .55s linear forwards; }
@keyframes sfApagaEnche { to { --sf-apaga: 1; } }

/* caiu na caixa postal */
.sf-cp { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 11px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, .17), rgba(245, 158, 11, .05)); border: 1px solid rgba(245, 158, 11, .4);
  box-shadow: 0 12px 26px -20px rgba(217, 119, 6, .9); animation: sfCpEntra .42s cubic-bezier(.2, .9, .3, 1.25) both; }
.sf-cp-i { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 8px 18px -10px rgba(217, 119, 6, .95); }
.sf-cp-i svg { width: 20px; height: 20px; }
.sf-cp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.sf-cp-t b { font-size: 13px; font-weight: 800; letter-spacing: -.1px; color: #b45309; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-cp-t span { font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
.sf-cp-bt { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 10px; padding: 8px 10px;
  font: inherit; font-size: 12px; font-weight: 800; color: #fff; background: #e5484d; cursor: pointer; transition: background .15s, transform .12s; }
.sf-cp-bt svg { width: 15px; height: 15px; }
.sf-cp-bt:hover { background: #cf3f44; }
.sf-cp-bt:active { transform: scale(.96); }
.sf-cp-bt:focus-visible { outline: 2px solid #e5484d; outline-offset: 2px; }
.sf-dock[data-caixa-postal] .sf-call-est { color: #b45309; }
.sf-dock[data-caixa-postal] .sf-call-ico { background: #f59e0b; }
.sf-dock[data-caixa-postal] .sf-onda i { background: #f59e0b; }
body.dark .sf-cp-t b, body.dark .sf-dock[data-caixa-postal] .sf-call-est { color: #fbbf24; }
@keyframes sfCpEntra { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ── página do telefone dentro de outro sistema: Suas ligações ── */
.sf-app-palco { place-items: start center; padding: 22px 18px 40px; }
.sf-app-col { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 14px; }
.sf-app-col .sf-app-card { max-width: none; }
.sf-app-col .sf-app-dica { max-width: none; margin: -4px 0 0; }
.sf-app-card[data-k="warn"] .sf-app-marca::after { background: #f59e0b; animation: sfAppPulso 1.1s ease-in-out infinite; }
.sf-app-card[data-k="warn"] #sf-app-tit { color: #b45309; }

.sf-hist { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 26px 54px -38px rgba(15, 32, 51, .5); }
.sf-hist.atualizando::before { content: ''; position: absolute; z-index: 2; left: 0; top: 0; height: 2px; width: 38%;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: sfHlCorre 1.1s ease-in-out infinite; }
@keyframes sfHlCorre { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
.sf-hist-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px 15px;
  background: linear-gradient(180deg, var(--bg-2), var(--surface)); border-bottom: 1px solid var(--line-soft); }
.sf-hist-ti { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.sf-hist-ti h1 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.35px; color: var(--ink); }
.sf-hist-sub { font-size: 12.5px; color: var(--muted); }
.sf-hist-per { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.sf-hist-per button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.sf-hist-per button:hover { color: var(--ink); }
.sf-hist-per button.on { background: var(--surface); color: var(--brand-strong); box-shadow: 0 1px 2px rgba(15, 32, 51, .08), 0 6px 14px -9px rgba(15, 32, 51, .35); }
.sf-hist-per button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.sf-hist-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.sf-hist-kpis[hidden] { display: none; }
.sf-hk { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 20px 13px; background: var(--surface); }
.sf-hk-l { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sf-hk b { font-size: 22px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; color: var(--ink); }
.sf-hk small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-hk.ok b { color: var(--green); }
.sf-hk.warn b { color: #d97706; }

.sf-hist-corpo { padding: 8px 10px 12px; }
.sf-hl-lista { display: flex; flex-direction: column; gap: 2px; }
.sf-hl { border-radius: 14px; transition: background .15s; }
.sf-hl:hover, .sf-hl.aberto, .sf-hl.editando { background: var(--bg-2); }
.sf-hl-linha { display: grid; grid-template-columns: 36px minmax(0, 1.55fr) minmax(0, .8fr) minmax(0, 1.35fr) 118px; align-items: center; gap: 12px; padding: 10px; }
.sf-hl-dir { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.sf-hl-dir svg { width: 17px; height: 17px; }
.sf-hl-dir.d-out { color: var(--brand-strong); background: var(--brand-soft); }
.sf-hl-dir.d-inb { color: var(--green); background: var(--green-soft); }
.sf-hl-dir.d-int { color: var(--ink-2); background: var(--bg); }
.sf-hl.k-miss .sf-hl-dir, .sf-hl.k-fail .sf-hl-dir { color: #d63e43; background: rgba(229, 72, 77, .1); }
.sf-hl.k-cp .sf-hl-dir { color: #d97706; background: rgba(245, 158, 11, .14); }
.sf-hl-quem { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-hl-quem b { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-hl-quem small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-hl-meio { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.sf-hl-st { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.sf-hl.k-ok .sf-hl-st { background: var(--green-soft); color: var(--green); }
.sf-hl.k-miss .sf-hl-st, .sf-hl.k-fail .sf-hl-st { background: rgba(229, 72, 77, .1); color: #c93a3f; }
.sf-hl.k-busy .sf-hl-st { background: rgba(139, 92, 246, .12); color: #6d4bd8; }
.sf-hl.k-cp .sf-hl-st { background: rgba(245, 158, 11, .16); color: #b45309; }
.sf-hl.k-live .sf-hl-st, .sf-hl.k-wait .sf-hl-st { background: var(--brand-soft); color: var(--brand-strong); }
.sf-hl-dur { font-size: 12px; color: var(--muted); }
.sf-hl-res { min-width: 0; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.sf-hl-tab { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 12px; font-weight: 700; color: var(--brand-strong);
  background: var(--brand-soft); padding: 4px 9px; border-radius: 8px; }
.sf-hl-tab svg, .sf-hl-link svg { width: 12px; height: 12px; flex: 0 0 auto; }
.sf-hl-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-hl-tab.novo { animation: sfHlSalvo 1.25s ease; }
@keyframes sfHlSalvo { 0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(21, 146, 180, .55); } 35% { transform: scale(1.05); } 100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(21, 146, 180, 0); } }
.sf-hl-obs-txt { font-size: 11.5px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-hl-link { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--brand-soft-2); background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sf-hl-link:hover { border-color: var(--brand); border-style: solid; color: var(--brand-strong); background: var(--brand-soft); }
.sf-hl-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.sf-hl-bt { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; transition: transform .12s, background .15s, color .15s, border-color .15s, filter .15s; }
.sf-hl-bt svg { width: 16px; height: 16px; }
.sf-hl-bt:hover { color: var(--brand-strong); border-color: var(--brand); }
.sf-hl-bt:active { transform: scale(.93); }
.sf-hl-bt.play { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 16px -10px rgba(12, 117, 145, .95); }
.sf-hl-bt.play:hover { color: #fff; filter: brightness(1.07); }
.sf-hl-bt.ligar:hover { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.sf-hl-semgrav { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); opacity: .55; }
.sf-hl-semgrav svg { width: 18px; height: 18px; }
.sf-hl-bt:focus-visible, .sf-hl-link:focus-visible, .sf-hl-opt:focus-visible, .sf-hl-pp:focus-visible, .sf-hl-vel:focus-visible,
.sf-hl-salvar:focus-visible, .sf-hl-cancel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sf-hl-player { --p: 0%; display: flex; align-items: center; gap: 12px; margin: 0 10px 10px 58px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 26px -22px rgba(15, 32, 51, .55); animation: sfHlAbre .22s ease both; }
@keyframes sfHlAbre { from { opacity: 0; transform: translateY(-4px); } }
.sf-hl-player.carregando, .sf-hl-player.erro { font-size: 12.5px; color: var(--ink-2); }
.sf-hl-player.erro { color: #b42318; }
.sf-hl-player.erro svg { width: 16px; height: 16px; flex: 0 0 auto; }
.sf-hl-player.erro span { flex: 1; }
.sf-hl-spin { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-soft-2); border-top-color: var(--brand); animation: sfHlGira .8s linear infinite; }
@keyframes sfHlGira { to { transform: rotate(360deg); } }
.sf-hl-pp { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; color: #fff; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 10px 20px -11px rgba(12, 117, 145, 1); transition: transform .12s; }
.sf-hl-pp svg { width: 17px; height: 17px; }
.sf-hl-pp:active { transform: scale(.92); }
.sf-hl-barra { position: relative; flex: 1; min-width: 0; height: 38px; }
.sf-hl-onda { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.sf-hl-onda i { flex: 1; min-width: 1px; border-radius: 2px; background: var(--line); }
.sf-hl-onda.cheia { clip-path: inset(0 calc(100% - var(--p)) 0 0); transition: clip-path .12s linear; }
.sf-hl-onda.cheia i { background: linear-gradient(180deg, var(--brand-mid), var(--brand-strong)); }
.sf-hl-player.tocando .sf-hl-onda.cheia i:last-child { box-shadow: 0 0 0 1px var(--brand); }
.sf-hl-barra input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sf-hl-barra:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.sf-hl-tempo { flex: 0 0 auto; min-width: 88px; text-align: right; font-size: 12px; color: var(--ink-2); }
.sf-hl-vel { flex: 0 0 auto; min-width: 46px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font: inherit; font-size: 11.5px;
  font-weight: 800; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.sf-hl-vel:hover { color: var(--brand-strong); border-color: var(--brand); }

.sf-hl-edit { display: flex; flex-direction: column; gap: 10px; margin: 0 10px 12px 58px; padding: 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); animation: sfHlAbre .22s ease both; }
.sf-hl-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-hl-opt { border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.sf-hl-opt:hover { border-color: var(--brand); color: var(--brand-strong); }
.sf-hl-opt.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px -8px rgba(12, 117, 145, .95); }
.sf-hl-obs { width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sf-hl-obs:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.sf-hl-edit-acts { display: flex; align-items: center; gap: 8px; }
.sf-hl-msg { flex: 1; min-width: 0; font-size: 12px; color: #b42318; }
.sf-hl-cancel { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.sf-hl-cancel:hover { background: var(--bg-2); color: var(--ink); }
.sf-hl-salvar { border: 0; border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--brand); cursor: pointer; transition: background .15s; }
.sf-hl-salvar:hover { background: var(--brand-strong); }
.sf-hl-salvar[disabled] { opacity: .65; cursor: default; }

.sf-hist-vazio { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px 32px; text-align: center; }
.sf-hv-ico { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 18px; display: grid; place-items: center; color: var(--brand-strong);
  background: radial-gradient(circle at 30% 25%, var(--surface), var(--brand-soft)); border: 1px solid var(--brand-soft-2); box-shadow: 0 16px 30px -22px rgba(12, 117, 145, .85); }
.sf-hv-ico svg { width: 26px; height: 26px; }
.sf-hist-vazio b { font-size: 15px; font-weight: 800; color: var(--ink); }
.sf-hist-vazio > span:not(.sf-hv-ico) { max-width: 440px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sf-hist-vazio .sf-app-bt { margin-top: 10px; }
.sf-hist[data-estado="erro"] .sf-hv-ico { color: #b45309; background: radial-gradient(circle at 30% 25%, var(--surface), rgba(245, 158, 11, .2)); border-color: rgba(245, 158, 11, .32); }
.sf-hist-aviso { display: flex; align-items: center; gap: 8px; margin: 4px 6px 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: #92400e; background: rgba(245, 158, 11, .12); }
.sf-hist-aviso svg { width: 15px; height: 15px; flex: 0 0 auto; }
.sf-hist-mais { margin: 10px 8px 0; font-size: 12px; color: var(--muted); text-align: center; }
.sf-hl-esq { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.sf-hl-esq-l { display: grid; grid-template-columns: 36px 1fr 130px; align-items: center; gap: 12px; padding: 10px; }
.sf-hl-esq-l i, .sf-hl-esq-l b, .sf-hl-esq-l small, .sf-hl-esq-l em { display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-2), var(--line-soft), var(--bg-2)); background-size: 200% 100%; animation: sfHlBrilho 1.3s ease-in-out infinite; }
.sf-hl-esq-l i { width: 36px; height: 36px; border-radius: 12px; }
.sf-hl-esq-l div { display: flex; flex-direction: column; gap: 6px; }
.sf-hl-esq-l b { width: 55%; height: 12px; }
.sf-hl-esq-l small { width: 35%; height: 10px; }
.sf-hl-esq-l em { height: 26px; }
@keyframes sfHlBrilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 760px) {
  .sf-hist-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-hl-linha { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "dir quem acts" ". meio meio" ". res res"; row-gap: 6px; }
  .sf-hl-dir { grid-area: dir; } .sf-hl-quem { grid-area: quem; } .sf-hl-acts { grid-area: acts; } .sf-hl-res { grid-area: res; }
  .sf-hl-meio { grid-area: meio; flex-direction: row; align-items: center; }
  .sf-hl-player, .sf-hl-edit { margin-left: 10px; }
  .sf-hl-tempo { min-width: 0; }
}
@media (max-width: 440px) {
  .sf-hist-h { padding: 14px; }
  .sf-hk { padding: 10px 14px; }
  .sf-hl-vel { display: none; }
  .sf-hl-player { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-cp, .sf-hl-tab.novo, .sf-hl-player, .sf-hl-edit, .sf-hist.atualizando::before, .sf-hl-spin,
  .sf-hl-esq-l i, .sf-hl-esq-l b, .sf-hl-esq-l small, .sf-hl-esq-l em, .sf-vb-apaga.segurando .sf-vb-anel { animation: none; }
  .sf-vb-apaga.segurando .sf-vb-anel { --sf-apaga: 1; }
  .sf-app-card[data-k="warn"] .sf-app-marca::after { animation: none; }
}

/* =======================================================================
 * VISÃO GERAL REORGANIZADA (Wilton, 24/09/2026)
 * Um canal por bloco: mensagens (números, volume e linhas em destaque), depois
 * voz, depois equipes, e por fim a Central de Ações com o ranking. O Resumo
 * rola quando a tela não comporta tudo; nenhum painel é espremido até sumir.
 * ===================================================================== */
#rel-resumo > .dash {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: none; grid-auto-rows: auto;
  grid-template-areas:
    "topo    topo    topo"
    "msg     msg     msg"
    "chart   lines   lines"
    "voz     voz     voz"
    "equipes equipes equipes"
    "acoes   acoes   rank";
  align-content: start;
  /* a grade cresce com o conteúdo e quem rola é o #rel-resumo: presa à altura
     da tela, ela espremia linhas e equipes até cortar o fim dos painéis */
  flex: 0 0 auto; height: auto;
}
@media (min-width: 1025px) {
  /* a voz saiu desta grade: mensagens voltam a ter cinco cartões na largura toda */
  #rel-resumo .kpis-duo .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
#rel-resumo .dash-topo      { grid-area: topo; }
#rel-resumo .kpis-duo       { grid-area: msg; }
#rel-resumo .chart-panel    { grid-area: chart; margin-bottom: 0; }
#rel-resumo .lines-panel    { grid-area: lines; margin-bottom: 0; }
#rel-resumo .kpis-voz       { grid-area: voz; }
#rel-resumo .equipes-panel  { grid-area: equipes; margin-bottom: 0; }
#rel-resumo .actions-panel  { grid-area: acoes; margin-bottom: 0; }
#rel-resumo .rank-panel     { grid-area: rank; margin-bottom: 0; }
/* o corpo do painel é flex: 1 com base zero; sem a base fixa o gráfico encolhia
   até a altura do vizinho (linhas com 0/0 deixavam o gráfico com 80 px) */
#rel-resumo .chart-panel .panel-body { flex: 0 0 236px; height: 236px; }
#rel-resumo .actions-panel .panel-body,
#rel-resumo .rank-panel .panel-body { max-height: 330px; overflow-y: auto; }
.kpis-voz { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 4px; }
.kpis-voz .vz-kpis { margin-bottom: 0; }
/* régua que separa os dois canais: o olho entende que mudou de assunto */
.kpis-voz::before {
  content: ""; height: 1px; margin: 0 2px 4px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

/* canal do filtro e LemonChat desligado: a voz agora mora na .kpis-voz */
body.rel-canal-ligacoes #view-dashboard .dash > :not(.kpis-voz):not(.equipes-panel),
body.fn-off-chat.vz-on #view-dashboard .dash > :not(.kpis-voz):not(.equipes-panel) { display: none !important; }
body.rel-canal-ligacoes #view-dashboard .dash > .kpis-voz,
body.fn-off-chat.vz-on #view-dashboard .dash > .kpis-voz { display: flex !important; }
body.rel-canal-ligacoes #view-dashboard .kpis-voz::before,
body.fn-off-chat #view-dashboard .kpis-voz::before { display: none; }
body.rel-canal-mensagens .kpis-voz { display: none !important; }
body:not(.vz-on) .kpis-voz { display: none !important; }
body.pf-atendente .equipes-panel { display: none !important; }

/* ── Linhas WhatsApp em destaque ── */
.lines-panel { position: relative; overflow: hidden; }
.lines-panel .panel-head { position: relative; }
.lp-pulso { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: 0 0 auto; box-shadow: 0 0 0 3px var(--green-soft); }
.lines-panel.lp-alerta .lp-pulso { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); animation: lpPulso 1.6s ease-out infinite; }
.lines-panel.lp-alerta { border-color: color-mix(in srgb, var(--red) 34%, var(--line)); }
.lines-panel.lp-alerta .panel-head { background: linear-gradient(90deg, var(--red-soft), transparent 70%); }
.lines-panel #dash-num-sub { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@keyframes lpPulso {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.lp-corpo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; align-items: center; }
.lp-placar { display: flex; flex-direction: column; gap: 2px; min-width: 104px; }
.lp-placar .lp-razao { font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: -1.2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.lp-placar .lp-razao small { font-size: 18px; font-weight: 700; color: var(--muted); letter-spacing: -.4px; }
.lp-placar .lp-rot { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.lp-dir { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* uma marca por linha: dá para contar as caídas sem ler número nenhum */
.lp-regua { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 14px; }
.lp-regua i { display: block; border-radius: 3px; background: var(--green); opacity: .85; transform-origin: bottom; animation: lpSobe .5s cubic-bezier(.2,.8,.2,1) both; }
.lp-regua i.off { background: var(--red); opacity: 1; }
.lp-regua i.pend { background: var(--amber); }
@keyframes lpSobe { from { transform: scaleY(.2); opacity: 0; } }
.lp-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-st { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.lp-st b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lp-st.ok  { background: var(--green-soft); }
.lp-st.ok b { color: var(--green); }
.lp-st.off { background: var(--red-soft); }
.lp-st.off b { color: var(--red); }
.lp-st.sem { background: var(--bg-2); border: 1px dashed var(--line); }
.lp-st.sem b { color: var(--amber); }
.lp-atencao { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.lp-atencao .ls-h { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--red); font-weight: 700; }
.lp-atencao .lines-list { max-height: 88px; overflow-y: auto; }
.lp-atencao .num-chip.off { font-weight: 700; }
.lp-atencao .num-chip.off:hover { background: color-mix(in srgb, var(--red) 14%, var(--surface)); }
.lp-tudo-ok { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--green); padding-top: 10px; border-top: 1px dashed var(--line); }

/* ── Equipes ── */
.equipes-panel .panel-head { flex-wrap: wrap; row-gap: 8px; }
.eq-acts { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eq-alerta {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px;
  background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 800;
}
.eq-alerta svg { width: 13px; height: 13px; }
.eq-btn { display: inline-flex; align-items: center; gap: 6px; }
.eq-btn svg { width: 14px; height: 14px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.eq-card {
  --eq-h: 190;
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 13px 13px 11px; border-radius: var(--r-md); border: 1px solid var(--line);
  background:
    radial-gradient(260px 90px at 0% 0%, hsla(var(--eq-h), 70%, 55%, .09), transparent 70%),
    var(--surface);
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.eq-grid.anim .eq-card { animation: eqEntra .42s cubic-bezier(.2,.8,.2,1) both; }
.eq-card:hover { border-color: hsla(var(--eq-h), 55%, 50%, .55); box-shadow: var(--sh-2); transform: translateY(-2px); }
.eq-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.eq-card.on { border-color: hsl(var(--eq-h), 55%, 45%); box-shadow: 0 0 0 3px hsla(var(--eq-h), 60%, 50%, .16), var(--sh-2); }
.eq-card.on::after {
  content: "Filtrando"; position: absolute; top: 10px; right: 10px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase; color: hsl(var(--eq-h), 55%, 38%);
  background: hsla(var(--eq-h), 60%, 50%, .13); padding: 3px 7px; border-radius: 20px;
}
body.dark .eq-card.on::after { color: hsl(var(--eq-h), 70%, 72%); }
@keyframes eqEntra { from { opacity: 0; transform: translateY(6px); } }
.eq-topo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.eq-card.on .eq-topo { padding-right: 62px; }
.eq-mono {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: -.3px; color: #fff;
  background: linear-gradient(140deg, hsl(var(--eq-h), 62%, 52%), hsl(calc(var(--eq-h) + 28), 58%, 42%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px hsla(var(--eq-h), 60%, 40%, .25);
}
.eq-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eq-nome { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.eq-sup { font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; min-width: 0; }
.eq-sup span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-sup svg { width: 12px; height: 12px; flex: 0 0 auto; color: hsl(var(--eq-h), 50%, 45%); }
.eq-sup.solto { color: var(--muted); font-style: italic; }
.eq-sup.solto svg { color: var(--amber); }
.eq-pessoas { display: flex; flex-direction: column; gap: 2px; max-height: 196px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.eq-p { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 7px; min-width: 0; }
.eq-p:hover { background: var(--bg-2); }
.eq-av {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 800; color: #fff; background: hsl(var(--av-h, 200), 45%, 52%);
}
.eq-pn { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-tags { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.eq-tag { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg-2); color: var(--muted); }
.eq-tag svg { width: 11px; height: 11px; }
.eq-tag.wa.on  { background: var(--green-soft); color: var(--green); }
.eq-tag.wa.off { background: var(--red-soft); color: var(--red); }
.eq-tag.wa.sem { background: transparent; border: 1px dashed var(--line); color: var(--amber); }
.eq-tag.rm     { background: var(--vz-blue-soft, var(--brand-soft)); color: var(--vz-blue, var(--brand-strong)); }
/* problema no WhatsApp escrito por extenso (02/10/2026) */
.eq-st { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.eq-st svg { width: 11px; height: 11px; flex: 0 0 auto; }
.eq-st.off { background: var(--red-soft); color: var(--red); }
.eq-st.sem { background: transparent; border: 1px dashed var(--amber); color: var(--amber); }
.eq-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); }
.eq-leg > span { display: inline-flex; align-items: center; gap: 6px; }
.eq-leg-t { font-weight: 700; color: var(--ink-2); }
.eq-pe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.eq-pe b { color: var(--ink-2); font-weight: 800; }
.eq-pe .eq-falta { color: var(--amber); font-weight: 700; }
.eq-vazio { font-size: 12px; color: var(--muted); padding: 6px 2px; }
/* quem ainda não está em equipe nenhuma: o card que o supervisor tem que ver */
.eq-card.sem {
  cursor: default; border-style: dashed; border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: radial-gradient(260px 90px at 0% 0%, var(--amber-soft), transparent 75%), var(--surface);
}
.eq-card.sem:hover { transform: none; }
.eq-card.sem .eq-mono { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.eq-card.sem .eq-mono svg { width: 18px; height: 18px; }
.eq-card.sem .eq-nome { color: var(--amber); }
.eq-card.sem .btn-mini { align-self: flex-start; }
.eq-sk { height: 150px; border-radius: var(--r-md); background: linear-gradient(100deg, var(--bg-2) 30%, var(--line-soft) 50%, var(--bg-2) 70%); background-size: 300% 100%; animation: eqSk 1.3s linear infinite; }
@keyframes eqSk { to { background-position: -150% 0; } }

/* aviso quando o recorte de equipe/pessoa não tem linha para contar */
.eq-aviso {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
}
.eq-aviso[hidden] { display: none; }
.eq-aviso svg { width: 18px; height: 18px; color: var(--amber); flex: 0 0 auto; }
.eq-aviso b { color: var(--ink); }
.eq-aviso .btn-mini { margin-left: auto; flex: 0 0 auto; }

/* ── modal Vincular linhas ── */
.vl-intro { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 0 0 14px; }
.vl-sec { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.vl-sec.primeira { margin-top: 0; }
.vl-sec .vl-tudo { margin-left: auto; font-size: 11.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--brand-strong); background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.vl-lista { display: flex; flex-direction: column; gap: 6px; }
.vl-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px minmax(0, 1.1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.vl-row.on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.vl-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.vl-linha { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vl-linha b { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.vl-linha b i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.vl-linha b i.off { background: var(--red); }
.vl-linha small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vl-seta { color: var(--muted); display: flex; }
.vl-seta svg { width: 16px; height: 16px; }
.vl-row select {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--ink);
  font: 600 12.5px inherit; padding: 6px 8px; cursor: pointer;
}
.vl-row select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.vl-conf { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 3px 7px; border-radius: 20px; white-space: nowrap; }
.vl-conf.exato    { background: var(--green-soft); color: var(--green); }
.vl-conf.nome     { background: var(--brand-soft); color: var(--brand-strong); }
.vl-conf.primeiro { background: var(--amber-soft); color: var(--amber); }
.vl-conf.manual   { background: var(--bg-2); color: var(--muted); }
.vl-foot-txt { font-size: 12.5px; color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
.vl-foot-txt b { color: var(--ink); }
.vl-vazio { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 13px; }
.vl-vazio b { display: block; font-size: 15px; color: var(--green); margin-bottom: 4px; }

@media (max-width: 1024px) {
  #rel-resumo .chart-panel .panel-body { flex-basis: 240px; height: 240px; }
  #rel-resumo .actions-panel .panel-body, #rel-resumo .rank-panel .panel-body { max-height: none; }
  .kpis-voz { width: 100%; }
}
@media (max-width: 640px) {
  .lp-corpo { grid-template-columns: 1fr; }
  .lp-placar .lp-razao { font-size: 32px; }
  .eq-grid { grid-template-columns: 1fr; }
  .vl-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .vl-row .vl-seta { display: none; }
  .vl-row select { grid-column: 2 / -1; }
  .eq-aviso { flex-wrap: wrap; }
  .eq-aviso .btn-mini { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lines-panel.lp-alerta .lp-pulso, .lp-regua i, .eq-grid.anim .eq-card, .eq-sk { animation: none; }
}
.lp-tudo-ok.lp-nenhuma { color: var(--muted); font-weight: 600; }

/* ── transferir e puxar ligação (códigos do PABX, 05/10/2026) ── */
.sf-ctrl { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sf-ctrl .sf-cb { height: 58px; font-size: 10.5px; }
.sf-transf { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid var(--sf-key-line); background: var(--sf-key); animation: mUp .18s ease; }
.sf-tr-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink); }
.sf-tr-h svg { width: 16px; height: 16px; color: var(--brand); }
.sf-tr-h b { flex: 1; }
.sf-tr-x { width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.sf-tr-x:hover { background: var(--sf-key-h); color: var(--ink); }
.sf-tr-num { height: 40px; border-radius: 11px; border: 1px solid var(--sf-key-line); background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; font-weight: 700; letter-spacing: 1px; padding: 0 12px; text-align: center; outline: none; }
.sf-tr-num:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21,146,180,.18); }
.sf-tr-lista { display: flex; flex-direction: column; gap: 4px; max-height: 148px; overflow-y: auto; padding-right: 2px; }
.sf-tr-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
.sf-tr-item b { font-size: 13px; min-width: 42px; font-variant-numeric: tabular-nums; }
.sf-tr-item span { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-tr-item:hover { background: var(--sf-key-h); border-color: var(--sf-key-line); }
.sf-tr-item.on { border-color: var(--brand); background: var(--brand-soft); }
.sf-tr-vazio { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0; }
/* estado do ramal na lista e aviso da transferência direta para ramal fechado ou ocupado (16/11/2026) */
.sf-tr-est { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
.sf-tr-est.livre { background: var(--sf-on); opacity: 1; }
.sf-tr-est.ocup { background: var(--amber); opacity: 1; }
.sf-tr-item em { flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); margin-left: -3px; }
.sf-tr-aviso { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border-radius: 11px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 42%, transparent); color: var(--ink); font-size: 12.5px; line-height: 1.4; }
.sf-tr-aviso svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; color: var(--amber); }
.sf-tr-aviso b { display: block; margin-bottom: 3px; }
.sf-tr-volta.sf-tr-risco { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.sf-tr-volta.sf-tr-risco:hover { background: var(--red-soft); color: var(--red); }
.sf-tr-volta.sf-tr-risco:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sf-tr-ok { height: 42px; border-radius: 12px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 18px -8px rgba(12,117,145,.85); transition: transform .14s, box-shadow .18s; }
.sf-tr-ok svg { width: 17px; height: 17px; }
.sf-tr-ok:hover { transform: translateY(-1px); }
.sf-tr-ok:disabled { background: var(--sf-key); color: var(--muted); border: 1px solid var(--sf-key-line); box-shadow: none; pointer-events: none; }
.sf-tr-ok.fim { background: linear-gradient(135deg, #17b37f, var(--sf-on)); box-shadow: 0 8px 20px -8px rgba(15,157,119,.8); animation: sfChama 1.7s ease-in-out infinite; }
.sf-tr-volta { height: 34px; border-radius: 10px; border: 1px solid var(--sf-key-line); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.sf-tr-volta:hover { background: var(--sf-key-h); color: var(--ink); }
.sf-tr-dica { font-size: 11.5px; color: var(--muted); line-height: 1.4; text-align: center; }
.sf-tr-and { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.sf-tr-and > .t { flex: 1 1 auto; min-width: 0; }
.sf-tr-direto { height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sf-tr-direto:hover { background: var(--sf-key-h); text-decoration: none; }
.sf-tr-direto:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-tr-direto:disabled { opacity: .45; cursor: default; background: transparent; text-decoration: underline; }
.sf-tr-and.ok { color: var(--ink); }
.sf-tr-pulso { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(21,146,180,.5); animation: sfTrPulso 1.4s ease-out infinite; }
.sf-tr-and.ok .sf-tr-pulso { background: var(--sf-on); box-shadow: 0 0 0 0 rgba(15,157,119,.5); }
@keyframes sfTrPulso { 0% { box-shadow: 0 0 0 0 rgba(21,146,180,.5); } 100% { box-shadow: 0 0 0 8px rgba(21,146,180,0); } }
.sf-puxar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.sf-puxar-l { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); margin-right: auto; }
.sf-puxar-l svg { width: 14px; height: 14px; }
.sf-puxar-b { height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--sf-key-line); background: var(--sf-key); color: var(--ink-2); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: background .12s, transform .12s, color .12s; }
.sf-puxar-b:hover { background: var(--sf-key-h); color: var(--ink); transform: translateY(-1px); }
.sf-puxar-b:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sf-tr-pulso, .sf-tr-ok.fim { animation: none !important; } .sf-transf { animation: none; } }

/* ---- Vitrine (15/10/2026, painel da Visimob): módulo fora do plano aparece trancado no menu ----
   body.fn-vitrine vem de state.vitrine; .nav-tranca é posto por fnVitrinePinta (app.js). Vence os
   display:none dos módulos desligados (fn-off-chat, vz-only) só no item do menu, nunca na tela. */
body.fn-vitrine .nav-item.nav-tranca { display: inline-flex !important; color: var(--muted); }
body.fn-vitrine .nav-item.nav-tranca svg { opacity: .55; }
body.fn-vitrine .nav-item.nav-tranca:hover { background: var(--bg-2); color: var(--ink-2); }
body.fn-vitrine .nav-item.nav-tranca:hover svg { opacity: .8; }
.nav-item .nav-cadeado { display: none; }
body.fn-vitrine .nav-item.nav-tranca .nav-cadeado {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: -1px;
  border-radius: 50%; background: var(--line-soft); color: var(--muted);
}
body.fn-vitrine .nav-item.nav-tranca .nav-cadeado svg { width: 9px; height: 9px; opacity: 1; }
body.fn-vitrine .nav-item.nav-tranca:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.vt { display: flex; flex-direction: column; gap: 14px; }
.vt-selo {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.vt-selo svg { width: 11px; height: 11px; }
.vt-frase { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.vt-itens { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.vt-itens li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.vt-itens i { flex: 0 0 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); margin-top: 1px; }
.vt-itens i svg { width: 10px; height: 10px; }
.vt-nota { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.vt-ok { align-items: center; text-align: center; padding: 10px 6px 4px; }
.vt-ok b { font-size: 16px; color: var(--ink); }
.vt-ok p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; max-width: 34ch; }
.vt-ok-anel { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); animation: vt-pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.vt-ok-anel svg { width: 24px; height: 24px; }
@keyframes vt-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vt-ok-anel { animation: none; } }
/* QA do painel da Visimob (15/10/2026):
   - o nome no topo não tinha cor própria e herdava o preto do botão (ilegível no tema escuro);
   - sem LemonChat e sem PABX a busca fica só invisível (visibility) e no celular ocupava uma linha vazia;
   - vitrine: o que o painel tem vem antes dos itens trancados (no celular o menu rola de lado e a Prospecção sumia). */
.user-chip .u-name { color: var(--ink); }
@media (max-width: 760px) { body.fn-off-chat:not(.vz-on) .global-search { display: none; } }
/* 06/11/2026 (Wilton): a ordem do topo é fixa (Visão Geral, LemonChat, LemonPABX, Prospecção), trancado ou não.
   Com só quatro itens o menu cabe no celular e a Prospecção não some mais. */

/* ═══════════ Ficha da chamada de campanha (17/10/2026): abre ao lado do telefone ═══════════
   O mesmo vidro do dock, para parecer uma aba dele e não outra janela. O ciano conduz
   (ícone, roteiro, foco); verde só no selo "em andamento"; a grade das colunas do mailing
   é o que importa, então cada valor tem peso de texto e o rótulo fica pequeno e calado.
   Formas (data-forma): lado = encostada no telefone; canto = painel sem o telefone na tela
   (ele está na janela própria); folha = celular e janela do telefone. */
.sf-ficha {
  --sff-w: min(392px, calc(100vw - 32px));
  position: fixed; z-index: 77; left: 18px; top: 84px; width: var(--sff-w);
  display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px);
  border-radius: 22px; border: 1px solid var(--sf-line);
  background: var(--sf-veil);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--sf-sh); color: var(--ink);
}
.sf-ficha[hidden] { display: none !important; }
.sf-ficha[data-forma="canto"] { left: auto !important; right: 18px; top: calc(var(--nav-h) + 14px) !important; max-height: calc(100vh - var(--nav-h) - 28px); max-height: calc(100dvh - var(--nav-h) - 28px); }
.sf-ficha[data-forma="folha"] {
  z-index: 79; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto;
  max-height: 78vh; max-height: 78dvh; border-radius: 22px 22px 0 0; border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -24px 54px -18px rgba(9,26,44,.46), 0 0 0 1px rgba(15,32,51,.06);
}
body.dark .sf-ficha[data-forma="folha"] { box-shadow: 0 -24px 54px -18px rgba(0,0,0,.78), 0 0 0 1px rgba(255,255,255,.07); }
.sf-ficha.entrando { animation: sffIn .32s cubic-bezier(.2,.9,.25,1) both; }
.sf-ficha.entrando[data-lado="esq"] { animation-name: sffInEsq; }
.sf-ficha.entrando[data-forma="folha"] { animation-name: sffInBaixo; }
@keyframes sffIn { from { opacity: 0; transform: translateX(-14px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes sffInEsq { from { opacity: 0; transform: translateX(14px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes sffInBaixo { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* cabeçalho: ícone, "Ficha da chamada" e a campanha; aurora igual à do dock */
.sff-head { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--sf-line-2); overflow: hidden; }
.sff-head::before {
  content: ''; position: absolute; left: -20%; right: -20%; top: -80px; height: 170px; pointer-events: none;
  background: radial-gradient(52% 70% at 18% 70%, var(--sf-glow), transparent 72%), radial-gradient(40% 64% at 88% 30%, rgba(124,99,255,.16), transparent 76%);
  opacity: .55; filter: blur(4px);
}
.sff-head::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(128deg, rgba(255,255,255,.16) 0 1px, transparent 1px 6px); opacity: .45; }
body.dark .sff-head::after { background: repeating-linear-gradient(128deg, rgba(255,255,255,.05) 0 1px, transparent 1px 6px); }
.sff-head > * { position: relative; z-index: 1; }
.sff-ico {
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(145deg, var(--sf-accent), var(--sf-accent-2));
  box-shadow: 0 8px 18px -8px var(--sf-glow), 0 1px 0 rgba(255,255,255,.35) inset;
}
.sff-ico svg { width: 19px; height: 19px; }
.sff-head-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sff-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--sf-accent); }
.sff-camp { font-size: 14px; font-weight: 800; letter-spacing: -.15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sff-head-acts { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.sff-hb { position: relative; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background .15s, color .15s, transform .12s; }
.sff-hb svg { width: 15px; height: 15px; }
.sff-hb:hover { background: var(--sf-line-2); color: var(--ink); }
.sff-hb:active { transform: scale(.94); }
.sff-hb:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 1px; }
#sff-fecha:hover { background: var(--vz-red-soft); color: var(--vz-red); }
#sff-recolhe svg { transition: transform .22s cubic-bezier(.2,.9,.25,1); }
.sf-ficha.recolhida #sff-recolhe svg { transform: rotate(180deg); }

.sff-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 14px; }
.sf-ficha.recolhida .sff-corpo { display: none; }
.sf-ficha.recolhida .sff-head { border-bottom: 0; cursor: pointer; }

/* quem está na linha */
.sff-hero { display: flex; flex-direction: column; gap: 4px; }
.sff-nome { font-size: 20px; font-weight: 800; letter-spacing: -.45px; line-height: 1.18; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.sff-sub { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.sff-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sff-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--sf-line-2); border: 1px solid var(--sf-line-2); }
.sff-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); position: relative; }
.sff-tag.viva { color: var(--sf-on); background: var(--vz-green-soft); border-color: transparent; }
.sff-tag.viva i { background: var(--sf-on); }
.sff-tag.viva i::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sf-on); opacity: .5; animation: pulse 1.9s ease-out infinite; }
.sff-tag.fim { color: var(--ink-2); }
.sff-tag.fim i { background: var(--vz-amber); }

.sff-sec-t { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.sff-sec-t svg { width: 14px; height: 14px; color: var(--sf-accent); }
.sff-sec-t::after { content: ''; flex: 1; height: 1px; background: var(--sf-line-2); }

/* o roteiro: papel com fio ciano, lido em voz alta pelo operador */
.sff-roteiro { position: relative; padding: 11px 13px 12px 15px; border-radius: 14px; background: linear-gradient(180deg, rgba(21,146,180,.08), rgba(21,146,180,.03)); border: 1px solid rgba(21,146,180,.16); }
body.dark .sff-roteiro { background: linear-gradient(180deg, rgba(58,169,198,.13), rgba(58,169,198,.05)); border-color: rgba(58,169,198,.22); }
.sff-roteiro::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sf-accent); }
.sff-roteiro .sff-sec-t { margin-bottom: 6px; color: var(--sf-accent); }
.sff-roteiro .sff-sec-t::after { background: rgba(21,146,180,.16); }
.sff-roteiro-t { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.sff-roteiro.longo:not(.aberto) .sff-roteiro-t {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent);
}
.sff-mais { margin-top: 6px; font-size: 12px; font-weight: 750; color: var(--sf-accent); padding: 2px 0; }
.sff-mais:hover { text-decoration: underline; text-underline-offset: 3px; }
.sff-mais:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; border-radius: 4px; }

/* a grade das colunas do mailing */
.sff-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sff-c {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  padding: 9px 34px 10px 11px; border-radius: 12px;
  background: var(--sf-solid); border: 1px solid var(--sf-line-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(15,32,51,.04);
  animation: sffCampo .34s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(var(--i, 0) * 22ms + 80ms);
  transition: border-color .15s, background .15s;
}
body.dark .sff-c { box-shadow: none; }
.sff-c.longo { grid-column: 1 / -1; }
.sff-c:hover { border-color: rgba(21,146,180,.32); }
@keyframes sffCampo { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.sff-c-r { font-size: 10.5px; font-weight: 750; letter-spacing: .35px; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sff-c-v { font-size: 13.5px; font-weight: 650; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; user-select: text; }
.sff-cp { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.sff-c:hover .sff-cp, .sff-cp:focus-visible, .sff-cp.copiado { opacity: 1; }
.sff-cp:hover { background: var(--sf-line-2); color: var(--sf-accent); }
.sff-cp:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 0; }
.sff-cp svg, .sff-hb .sff-cp-a svg, .sff-hb .sff-cp-b svg { width: 14px; height: 14px; }
.sff-cp-a, .sff-cp-b { display: inline-flex; transition: transform .2s cubic-bezier(.2,.9,.25,1), opacity .15s; }
.sff-cp-b { position: absolute; opacity: 0; transform: scale(.6); color: var(--sf-on); }
.copiado .sff-cp-a { opacity: 0; transform: scale(.6); }
.copiado .sff-cp-b { opacity: 1; transform: none; }
@media (hover: none) { .sff-cp { opacity: .75; } }
.sff-vazio { font-size: 13px; color: var(--ink-2); padding: 12px 13px; border-radius: 12px; border: 1px dashed var(--sf-line); background: var(--sf-line-2); }

/* dados técnicos do atendimento, recolhidos */
.sff-tec { border-top: 1px solid var(--sf-line-2); padding-top: 10px; }
.sff-tec summary { list-style: none; display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; font-weight: 750; color: var(--ink-2); padding: 3px 0; border-radius: 6px; }
.sff-tec summary::-webkit-details-marker { display: none; }
.sff-tec summary svg { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.sff-tec[open] summary svg { transform: rotate(90deg); }
.sff-tec summary small { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--sf-line-2); border-radius: 999px; padding: 1px 8px; }
.sff-tec summary:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sff-tec .sff-grade { margin-top: 9px; }
.sff-grade.mini .sff-c { padding: 7px 30px 8px 10px; }
.sff-grade.mini .sff-c-v { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sff-pe { font-size: 11px; color: var(--muted); text-align: right; padding-top: 2px; }

/* recolhida na folha: vira uma pílula no alto, longe dos botões do telefone */
.sf-ficha[data-forma="folha"].recolhida { top: 10px !important; bottom: auto; left: auto !important; right: 10px; width: auto; max-width: calc(100vw - 20px); border-radius: 999px; border-bottom: 1px solid var(--sf-line); box-shadow: var(--sf-sh); }
.sf-ficha[data-forma="folha"].recolhida .sff-head { padding: 6px 6px 6px 7px; gap: 8px; }
.sf-ficha[data-forma="folha"].recolhida .sff-ico { width: 30px; height: 30px; border-radius: 50%; }
.sf-ficha[data-forma="folha"].recolhida .sff-eyebrow, .sf-ficha[data-forma="folha"].recolhida #sff-copia-tudo { display: none; }
.sf-ficha[data-forma="folha"].recolhida .sff-camp { font-size: 13px; max-width: 46vw; }
@media (max-width: 420px) { .sff-grade { grid-template-columns: 1fr; } }

/* botão da ficha dentro da chamada, no dock */
.sf-ficha-bt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px 8px 8px; border-radius: 14px; border: 1px solid rgba(21,146,180,.22);
  background: linear-gradient(180deg, rgba(21,146,180,.10), rgba(21,146,180,.04)); color: var(--ink);
  transition: border-color .15s, background .15s, transform .12s, box-shadow .2s;
  animation: sffBotao .5s cubic-bezier(.2,.9,.25,1) both;
}
body.dark .sf-ficha-bt { border-color: rgba(58,169,198,.3); background: linear-gradient(180deg, rgba(58,169,198,.16), rgba(58,169,198,.06)); }
.sf-ficha-bt:hover { border-color: var(--sf-accent); box-shadow: 0 6px 16px -10px var(--sf-glow); }
.sf-ficha-bt:active { transform: scale(.985); }
.sf-ficha-bt:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-ficha-bt-i { width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, var(--sf-accent), var(--sf-accent-2)); box-shadow: 0 6px 14px -8px var(--sf-glow); }
.sf-ficha-bt-i svg { width: 17px; height: 17px; }
.sf-ficha-bt-t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sf-ficha-bt-t b { font-size: 13px; font-weight: 800; letter-spacing: -.1px; }
.sf-ficha-bt-t small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-ficha-bt-s { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; color: var(--sf-accent); padding: 4px 9px; border-radius: 999px; background: var(--sf-solid); border: 1px solid var(--sf-line-2); }
.sf-ficha-bt.on .sf-ficha-bt-s { color: var(--ink-2); }
@keyframes sffBotao { 0% { opacity: 0; transform: translateY(6px) scale(.97); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* LemonPABX › Campanhas › Integrações: o interruptor da ficha */
.px-ficha-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 6px; transition: opacity .2s; }
.px-ficha-card.on { border-color: rgba(15,157,119,.32); background: linear-gradient(180deg, var(--vz-green-soft), transparent 140%); }
.px-ficha-card.warn { border-color: rgba(201,138,43,.35); background: linear-gradient(180deg, var(--vz-amber-soft), transparent 140%); }
.px-ficha-card.ocupado { opacity: .6; pointer-events: none; }
.pfc-ico { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-strong)); box-shadow: 0 8px 18px -10px rgba(21,146,180,.6); }
.px-ficha-card.off .pfc-ico { background: var(--line); color: var(--ink-2); box-shadow: none; }
.pfc-ico svg { width: 20px; height: 20px; }
.pfc-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pfc-t b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.pfc-t small { font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.pfc-t small.pfc-ult { color: var(--muted); }
.pfc-sw { flex: 0 0 auto; width: 46px; height: 27px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.pfc-sw i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.28); transition: transform .22s cubic-bezier(.2,.9,.25,1); }
.pfc-sw.on { background: var(--vz-green); }
.pfc-sw.on i { transform: translateX(19px); }
.pfc-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pfc-refaz { flex: 0 0 auto; }
.px-ig.nosso { border-color: rgba(21,146,180,.28); }
.px-ig-selo { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }

@media (prefers-reduced-motion: reduce) {
  .sf-ficha.entrando, .sff-c, .sf-ficha-bt { animation: none; }
  .sff-tag.viva i::after { animation: none; }
  #sff-recolhe svg, .pfc-sw i, .sff-cp-a, .sff-cp-b { transition: none; }
}

/* ── Classificação do atendimento na ficha (17/10/2026): vai para o PABX ──
   Três cartões de resultado com a cor do significado (verde produtiva, vermelho improdutiva,
   âmbar retorno). Com a chamada encerrada a seção sobe para o topo da ficha e ganha um aro. */
.sff-classif { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--sf-line); background: var(--sf-solid); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 20px -16px rgba(9,26,44,.35); }
body.dark .sff-classif { box-shadow: none; }
.sf-ficha.fim .sff-classif { order: -1; }
.sf-ficha.fim .sff-classif:not(.feito) { border-color: rgba(21,146,180,.38); box-shadow: 0 0 0 3px rgba(21,146,180,.12), 0 10px 24px -16px var(--sf-glow); }
.sf-ficha.fim .sff-hero { order: -2; }
.sff-classif.chama { animation: sffChama .9s cubic-bezier(.2,.9,.25,1); }
@keyframes sffChama { 0% { box-shadow: 0 0 0 0 rgba(21,146,180,.45); } 100% { box-shadow: 0 0 0 12px rgba(21,146,180,0); } }
.sff-classif .sff-sec-t { margin-bottom: 0; }
.sff-classif .sff-sec-t em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .2px; text-transform: none; color: var(--sf-accent); order: 3; margin-left: 2px; }
.sff-cl-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sff-cl-op {
  --k: var(--sf-accent); --k-soft: rgba(21,146,180,.10);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; text-align: left;
  padding: 10px 10px 10px; border-radius: 13px; border: 1px solid var(--sf-line-2); background: var(--sf-line-2); color: var(--ink);
  transition: border-color .15s, background .15s, transform .12s, box-shadow .2s;
}
.sff-cl-op.k-produtiva { --k: var(--vz-green); --k-soft: var(--vz-green-soft); }
.sff-cl-op.k-improdutiva { --k: var(--vz-red); --k-soft: var(--vz-red-soft); }
.sff-cl-op.k-agendada { --k: var(--vz-amber); --k-soft: var(--vz-amber-soft); }
.sff-cl-op:hover { border-color: var(--k); background: var(--k-soft); }
.sff-cl-op:active { transform: scale(.98); }
.sff-cl-op:focus-visible { outline: 2px solid var(--k); outline-offset: 2px; }
.sff-cl-op.on { border-color: var(--k); background: var(--k-soft); box-shadow: 0 0 0 1px var(--k) inset, 0 8px 18px -14px var(--k); }
.sff-cl-op-i { width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--k); background: var(--sf-solid); border: 1px solid var(--sf-line-2); transition: background .15s, color .15s; }
.sff-cl-op.on .sff-cl-op-i { background: var(--k); color: #fff; border-color: transparent; }
.sff-cl-op-i svg { width: 15px; height: 15px; }
.sff-cl-op-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sff-cl-op-t b { font-size: 12.5px; font-weight: 800; letter-spacing: -.1px; line-height: 1.2; }
.sff-cl-op-t small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.sff-cl-ag { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--vz-amber-soft); border: 1px solid rgba(201,138,43,.22); animation: sffCampo .28s cubic-bezier(.2,.9,.25,1) both; }
.sff-cl-at { display: flex; flex-wrap: wrap; gap: 6px; }
.sff-cl-atb { height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 750; color: var(--ink-2); background: var(--sf-solid); border: 1px solid var(--sf-line); transition: border-color .15s, color .15s, background .15s; }
.sff-cl-atb:hover { border-color: var(--vz-amber); color: var(--ink); }
.sff-cl-atb.on { background: var(--vz-amber); border-color: var(--vz-amber); color: #fff; }
.sff-cl-atb:focus-visible { outline: 2px solid var(--vz-amber); outline-offset: 2px; }
.sff-cl-dh { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.sff-cl-dh label { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.sff-cl-dh span, .sff-cl-l { font-size: 10.5px; font-weight: 750; letter-spacing: .35px; text-transform: uppercase; color: var(--muted); }
.sff-cl-l small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.sff-cl-dh input, .sff-cl-mot select, .sff-cl-obs {
  width: 100%; box-sizing: border-box; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--sf-line); background: var(--sf-solid); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; color-scheme: light;
}
body.dark .sff-cl-dh input, body.dark .sff-cl-mot select, body.dark .sff-cl-obs { color-scheme: dark; }
.sff-cl-obs { height: auto; min-height: 56px; padding: 8px 10px; resize: vertical; font-weight: 500; line-height: 1.45; }
.sff-cl-dh input:focus, .sff-cl-mot select:focus, .sff-cl-obs:focus { outline: none; border-color: var(--sf-accent); box-shadow: 0 0 0 3px rgba(21,146,180,.15); }
.sff-cl-mot { display: flex; flex-direction: column; gap: 6px; }
.sff-cl-mots { display: flex; flex-wrap: wrap; gap: 6px; }
.sff-cl-m { min-height: 30px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--sf-line-2); border: 1px solid var(--sf-line-2); text-align: left; transition: border-color .15s, background .15s, color .15s; }
.sff-cl-m:hover { border-color: var(--sf-accent); color: var(--ink); }
.sff-cl-m.on { background: var(--sf-accent); border-color: var(--sf-accent); color: #fff; }
.sff-cl-m:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sff-cl-msg:empty { display: none; }
.sff-cl-msg { font-size: 12.5px; font-weight: 600; color: var(--vz-red); background: var(--vz-red-soft); border-radius: 10px; padding: 8px 10px; }
.sff-cl-acts { display: flex; justify-content: flex-end; gap: 8px; }
.sff-cl-salvar { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 12px; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(180deg, var(--sf-accent), var(--sf-accent-2)); box-shadow: 0 10px 20px -12px var(--sf-glow), 0 1px 0 rgba(255,255,255,.25) inset; transition: transform .12s, box-shadow .2s, opacity .15s; }
.sff-cl-salvar:hover:not(:disabled) { box-shadow: 0 14px 26px -12px var(--sf-glow), 0 1px 0 rgba(255,255,255,.25) inset; }
.sff-cl-salvar:active:not(:disabled) { transform: scale(.98); }
.sff-cl-salvar:disabled { opacity: .45; cursor: not-allowed; }
.sff-cl-salvar:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sff-cl-salvar .sf-spin { width: 13px; height: 13px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }
.sff-cl-cancel { height: 38px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sff-cl-cancel:hover { background: var(--sf-line-2); color: var(--ink); }
/* já classificado */
.sff-classif.feito { padding: 10px 12px; }
.sff-classif.feito.k-produtiva { --k: var(--vz-green); background: linear-gradient(180deg, var(--vz-green-soft), var(--sf-solid) 160%); border-color: rgba(15,157,119,.28); }
.sff-classif.feito.k-improdutiva { --k: var(--vz-red); background: linear-gradient(180deg, var(--vz-red-soft), var(--sf-solid) 160%); border-color: rgba(217,89,106,.28); }
.sff-classif.feito.k-agendada { --k: var(--vz-amber); background: linear-gradient(180deg, var(--vz-amber-soft), var(--sf-solid) 160%); border-color: rgba(201,138,43,.3); }
.sff-cl-ok { display: flex; align-items: center; gap: 11px; }
.sff-cl-ok-i { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--k, var(--vz-green)); box-shadow: 0 6px 14px -8px var(--k, var(--vz-green)); animation: sffOk .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes sffOk { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.sff-cl-ok-i svg { width: 16px; height: 16px; }
.sff-cl-ok-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sff-cl-ok-t b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.sff-cl-ok-t small { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.sff-cl-ok-t small.sff-cl-pabx { color: var(--muted); font-size: 11px; }
.sff-cl-alt { flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 10px; font-size: 12px; font-weight: 750; color: var(--ink-2); background: var(--sf-solid); border: 1px solid var(--sf-line); }
.sff-cl-alt:hover { color: var(--ink); border-color: var(--sf-accent); }
@media (max-width: 420px) { .sff-cl-ops { grid-template-columns: 1fr; } .sff-cl-op { flex-direction: row; align-items: center; } }

/* aviso na tela de fim da chamada do telefone */
.sf-fim-ficha { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px 9px 8px; border-radius: 14px; border: 1px solid rgba(21,146,180,.28); background: linear-gradient(180deg, rgba(21,146,180,.12), rgba(21,146,180,.04)); color: var(--ink); animation: sffBotao .5s cubic-bezier(.2,.9,.25,1) both; transition: border-color .15s, box-shadow .2s; }
.sf-fim-ficha:hover { border-color: var(--sf-accent); box-shadow: 0 6px 16px -10px var(--sf-glow); }
.sf-fim-ficha:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }
.sf-fim-ficha b { display: block; font-size: 13px; font-weight: 800; }
.sf-fim-ficha small { display: block; font-size: 11.5px; color: var(--muted); }

/* LemonPABX › Integrações: motivos da classificação */
.pfc-mot { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 8px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface); }
.pfc-mot-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pfc-mot-h b { display: block; font-size: 13px; font-weight: 800; color: var(--ink); }
.pfc-mot-h small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.pfc-mot-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.pfc-mot-chip { display: inline-flex; flex-direction: column; padding: 6px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--brand); }
.pfc-mot-chip.k-produtiva { border-left-color: var(--vz-green); } .pfc-mot-chip.k-improdutiva { border-left-color: var(--vz-red); } .pfc-mot-chip.k-agendada { border-left-color: var(--vz-amber); }
.pfc-mot-chip b { font-size: 12.5px; color: var(--ink); } .pfc-mot-chip small { font-size: 11px; color: var(--muted); }
.pfc-mot-vazio { font-size: 12px; color: var(--ink-2); }
.pfc-mot-ed { display: flex; flex-direction: column; gap: 6px; }
.pfc-mot-l { display: grid; grid-template-columns: 92px 1fr 150px 34px; gap: 6px; align-items: center; }
.pfc-mot-l input, .pfc-mot-l select { height: 34px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: inherit; font-size: 13px; min-width: 0; }
.pfc-mot-l input:focus, .pfc-mot-l select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pfc-mot-x { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.pfc-mot-x svg { width: 15px; height: 15px; }
.pfc-mot-x:hover { background: var(--vz-red-soft); color: var(--vz-red); }
.pfc-mot-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 750; color: var(--brand); padding: 4px 2px; }
.pfc-mot-add svg { width: 13px; height: 13px; }
.pfc-mot-acts { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 560px) { .pfc-mot-l { grid-template-columns: 80px 1fr 34px; } .pfc-mot-l select { grid-column: 1 / 3; } }

@media (prefers-reduced-motion: reduce) {
  .sff-classif.chama, .sff-cl-ag, .sff-cl-ok-i, .sf-fim-ficha { animation: none; }
}

/* Contato compartilhado pelo cliente (29/10/2026): cartão com nome, número, Copiar e Conversar */
.b-contato { display: flex; flex-direction: column; gap: 8px; min-width: 230px; max-width: 320px; white-space: normal; margin-bottom: 4px; }
.b-contato .bc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.b-contato .bc-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.b-contato .bc-b b { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-contato .bc-tel { font-size: 12.5px; color: var(--wa-time); font-variant-numeric: tabular-nums; }
.b-contato .bc-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.b-contato .bc-bt { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; color: var(--brand-strong); background: var(--brand-soft); border: 1px solid transparent; border-radius: 20px; cursor: pointer;
  transition: background-color .15s ease, transform .1s ease; }
.b-contato .bc-bt svg { width: 14px; height: 14px; flex-shrink: 0; }
.b-contato .bc-bt.pri { color: #fff; background: var(--brand); }
.b-contato .bc-bt:hover { filter: brightness(.97); }
.b-contato .bc-bt:active { transform: scale(.97); }
.b-contato .bc-bt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Botões do modelo da campanha (29/10/2026): como o cliente vê no WhatsApp, embaixo do texto */
.b-tpl-bts { display: flex; flex-direction: column; margin: 8px -9px 2px; border-top: 1px solid color-mix(in srgb, var(--wa-time) 22%, transparent); white-space: normal; }
.b-tpl-bt { display: block; padding: 9px 12px; text-align: center; font-size: 13.5px; font-weight: 600; color: #027eb5; }
.b-tpl-bt + .b-tpl-bt { border-top: 1px solid color-mix(in srgb, var(--wa-time) 22%, transparent); }
body.dark .b-tpl-bt { color: #53bdeb; }

/* Conversa com mais de uma linha (29/10/2026, migração 051): "Respondendo por" no composer e a linha em cada balão */
.cp-linha-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding: 2px 2px 6px; font-size: 12.5px; color: var(--ink-2, var(--wa-time)); }
.cp-linha-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--ink); }
.cp-linha-row label svg { width: 14px; height: 14px; color: var(--brand-strong); }
.cp-linha-row select { min-width: 0; max-width: 100%; flex: 0 1 auto; height: 30px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background-color: var(--bg-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.cp-linha-row select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.cp-linha-dica { color: var(--wa-time); font-size: 11.5px; }
@media (max-width: 560px) { .cp-linha-dica { display: none; } .cp-linha-row select { flex: 1 1 auto; } }
.bubble .b-via { display: inline-block; max-width: 140px; margin-right: 6px; padding: 0 6px; border-radius: 6px; vertical-align: 1px;
  font-size: 10px; font-weight: 700; line-height: 15px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--wa-time); background: color-mix(in srgb, var(--wa-time) 14%, transparent); }
.bubble .b-tpl-bts + .b-time { float: none; display: block; margin-top: 4px; }
