/* Central da Paulista Motors: cópia da Central do TK da Stellare (28/10/2026).
   A estrutura é a mesma; a cor da marca é o vermelho do site da Paulista
   (site/css/estilo.css) no lugar do dourado da Stellare, e a fonte é a Outfit. */
:root {
  --black: #0A0A0A;
  --gold: #D7141A;
  --gold-texto: #B51016;
  --ink-soft: #4B5057;
  --z-tinta: #0B0B0C;
  --z-fraco: #656B76;
  --z-linha: #E8EAED;
  --z-fundo: #F4F5F7;
  --z-card: #FFFFFF;
  --z-ok: #1A7F37;
  --z-ok-bg: #E7F6EC;
  --z-ruim: #C0322B;
  --z-ruim-bg: #FDECEC;
  --z-atencao: #92400E;
  --z-atencao-bg: #FDF2D6;
  --z-marca: #D7141A;
  --z-r: 14px;
  --pad: 32px;
  /* amarelo claro da Stella: a mesma família do --z-atencao-bg */
  --stella-bg: #FFF1F1;
  --stella-linha: #F5C9CB;
  --stella-suave: #FFF8F8;
  /* A cor de cada coluna do funil (pedido do Bruno em 19/10/2026). Novo
     contato é a etapa da Stella e usa o amarelo dela; não compareceu e
     fechado usam o vermelho e o verde de estado. Azul e roxo são só daqui:
     texto escuro o bastante para passar 4,5:1 no fundo claro da própria cor. */
  --etapa-azul: #1D4ED8;
  --etapa-azul-bg: #E8EFFD;
  --etapa-roxo: #6D28D9;
  --etapa-roxo-bg: #F1EAFE;
  /* o --z-ruim com opacidade baixa: fundo de conversa em que falta responder */
  --falta-suave: rgba(192, 50, 43, .07);
  --falta-forte: rgba(192, 50, 43, .12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: 'Outfit', sans-serif; font-size: 13px;
  color: var(--z-tinta); background: var(--z-fundo);
  display: flex; flex-direction: column;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--z-tinta); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- barra preta do sistema ---- */
.topnav {
  background: var(--black); border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); height: 64px; flex: none;
}
.topnav-brand { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; text-decoration: none; transition: opacity .15s ease; }
.topnav-brand img { display: block; height: 21px; width: auto; }
.topnav-brand .logo-main { font-weight: 800; font-size: 15px; letter-spacing: .06em; color: #FFF; }
/* a assinatura da marca, com as mesmas medidas do index.html */
.topnav-brand .logo-sub { font-weight: 600; font-size: 8.5px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.topnav-menu { display: flex; align-items: stretch; height: 100%; flex: 1; }
.topnav-item {
  font-weight: 600; font-size: 12.5px; color: #FFF; padding: 0 14px;
  display: flex; align-items: center; border-bottom: 2px solid var(--gold);
}
.topnav-volta { font-weight: 600; font-size: 12.5px; color: #C9CDD4; text-decoration: none; padding: 8px 4px; }
.topnav-volta:hover { color: #FFF; }
.dentro .topnav { display: none; }

/* ---- submenu, o mesmo desenho da Conferência ---- */
/* 24px acima e 14px abaixo: o respiro do <main> e do .cfz-nav no index.html */
.tk-nav {
  display: flex; gap: 4px; align-items: center; flex: none;
  background: var(--z-card); border: 1px solid var(--z-linha);
  border-radius: var(--z-r); padding: 6px; margin: 24px var(--pad) 0;
}
.tk-aba {
  font-size: 12.5px; font-weight: 600; color: var(--z-fraco);
  background: none; border: 0; border-radius: 10px; padding: 8px 14px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.tk-aba:hover { background: var(--z-fundo); color: var(--z-tinta); }
.tk-aba.ativa { background: var(--z-marca); color: #FFF; }
.tk-aba svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tk-pino {
  background: var(--z-ruim); color: #FFF; border-radius: 999px; font-size: 12px;
  min-width: 18px; padding: 0 5px; line-height: 18px; text-align: center; font-weight: 700;
}
.tk-nav-fim { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tk-quem {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0;
  border-radius: 10px; padding: 4px 10px 4px 4px; font-size: 12.5px; font-weight: 600;
}
.tk-quem:hover { background: var(--z-fundo); }

/* ---- peças do sistema ----
   Duas alturas só (revisão de 26/10/2026): 38px para botão e campo comuns,
   30px para o miúdo (.mini, pílula). Antes havia 29, 30, 32, 34, 36 e 38. */
.st-pill {
  background: var(--z-card); border: 1px solid var(--z-linha); color: var(--ink-soft);
  border-radius: 999px; padding: 0 13px; height: 30px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.st-pill:hover { background: #E8EAEE; }
.st-pill.ativa { background: var(--z-tinta); border-color: var(--z-tinta); color: #FFF; }
.st-bt {
  background: var(--z-card); border: 1px solid var(--z-linha); color: var(--z-tinta);
  border-radius: 10px; padding: 0 15px; min-height: 38px; font-size: 13px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.st-bt:hover { background: var(--z-fundo); }
.st-bt.preto { background: var(--z-tinta); border-color: var(--z-tinta); color: #FFF; }
.st-bt.preto:hover { filter: brightness(1.25); }
.st-bt.mini { padding: 0 11px; min-height: 30px; font-size: 12px; }
.st-bt:disabled { opacity: .45; cursor: not-allowed; }
/* esperando o servidor responder */
[aria-busy='true'] { cursor: progress; opacity: .6; }
.st-selo {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--z-fundo); color: var(--z-fraco);
}
.st-selo::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-selo.ok { background: var(--z-ok-bg); color: var(--z-ok); }
.st-selo.ruim { background: var(--z-ruim-bg); color: var(--z-ruim); }
.st-selo.atencao { background: var(--z-atencao-bg); color: var(--z-atencao); }
.st-campo, .st-busca {
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 10px;
  padding: 9px 13px; font-size: 13px; min-width: 0; height: 38px;
}
.st-busca { width: 260px; }
.st-campo:focus, .st-busca:focus { outline: 2px solid var(--z-tinta); outline-offset: -1px; }
.st-vazio { text-align: center; color: var(--z-fraco); font-size: 13px; padding: 28px 16px; }
.st-vazio b { display: block; color: var(--z-tinta); font-size: 14px; margin-bottom: 4px; }

.bolinha {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--cor, var(--z-tinta)); color: #FFF; font-weight: 700; font-size: 12px;
  display: grid; place-items: center;
}
/* Falta responder: o mesmo vermelho do aviso do submenu, com o número de
   mensagens do cliente que ficaram sem resposta. */
.pend {
  background: var(--z-ruim); color: #FFF; border-radius: 999px; font-size: 12px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px; flex: none;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
/* Com quem a conversa está, por extenso: a cor da atendente e o nome. */
.com-quem { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.com-quem i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, var(--z-tinta)); flex: none; }
.com-quem i.stella { background: var(--z-marca); }
.com-quem i.fila { background: none; border: 2px solid var(--z-atencao); }
.bolinha.stella { background: var(--z-marca); color: var(--z-tinta); }
.bolinha.grande { width: 26px; height: 26px; }

/* ---- linha do título ---- */
.tk-cab { display: flex; align-items: center; gap: 8px; padding: 14px var(--pad) 12px; flex: none; min-height: 64px; }
/* o título de tela do sistema: 32px/800, como .st-cab h1 e .cfz-head h1 */
.tk-cab h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 0 12px 0 2px; line-height: 1.12; }
.tk-soma { margin-left: auto; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-soma b { color: var(--z-tinta); font-size: 15px; font-weight: 800; }

.tk-vista { flex: 1; min-height: 0; }

/* ---- funil ---- */
#funil { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 var(--pad) 20px; }
.col { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: var(--z-r); }
.col.alvo { outline: 2px dashed var(--z-tinta); outline-offset: 2px; }
.col { --etapa: var(--z-tinta); --etapa-bg: var(--z-card); }
[data-etapa='novo'] { --etapa: var(--z-tinta); --etapa-bg: #ECEEF1; }
[data-etapa='negociacao'] { --etapa: var(--etapa-azul); --etapa-bg: var(--etapa-azul-bg); }
[data-etapa='agendado'] { --etapa: var(--etapa-roxo); --etapa-bg: var(--etapa-roxo-bg); }
[data-etapa='nao_compareceu'] { --etapa: var(--z-ruim); --etapa-bg: var(--z-ruim-bg); }
[data-etapa='fechado'] { --etapa: var(--z-ok); --etapa-bg: var(--z-ok-bg); }
.col-h {
  padding: 8px 10px; background: var(--etapa-bg); border-radius: var(--z-r);
  border: 1px solid color-mix(in srgb, var(--etapa) 18%, transparent);
  /* título à esquerda, valor e quantidade à direita, numa linha só */
  display: flex; align-items: center; gap: 6px;
}
.col-h h2 {
  flex: 1; min-width: 0; margin: 0; font-size: 13px; font-weight: 800; letter-spacing: -.01em; color: var(--etapa);
  display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col-h h2::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--etapa); flex: none; }
.col-h div { flex: none; font-size: 11.5px; color: var(--etapa); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-b { flex: 1; min-height: 0; overflow-y: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.cartao {
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 12px;
  padding: 11px 12px; text-align: left; width: 100%; flex: none;
  transition: border-color .12s ease, box-shadow .12s ease;
  /* todos da mesma altura: o valor fica sempre no rodapé, mesmo com duas opções */
  height: 108px; display: grid; grid-template-rows: auto auto 1fr; align-content: stretch;
}
.cartao .c-l3 { align-self: end; }
.cartao:hover { border-color: #C3C7CE; box-shadow: 0 2px 6px rgba(16,24,40,.07); }
.cartao.espera { border-color: #E3BE5A; background: var(--stella-suave); }
.cartao.arrastando { opacity: .4; }
.c-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.c-l1 b { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-l1 time { font-size: 12px; color: var(--z-fraco); white-space: nowrap; }
.c-quando { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.c-quando.falta time, .item.falta .c-l1 time { color: var(--z-ruim); font-weight: 700; }
.c-l2 { color: var(--z-fraco); font-size: 12.5px; margin: 2px 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; }
/* no cartão do funil a linha 2 leva o carro e, à direita, de onde veio */
.cartao .c-l2 { display: flex; align-items: center; gap: 6px; }
.cartao .c-l2 > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip-origem {
  flex: none; font-size: 11px; font-weight: 600; line-height: 16px; color: var(--ink-soft);
  background: var(--z-fundo); border-radius: 5px; padding: 0 6px; white-space: nowrap;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis;
}
.c-l3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.valor { font-weight: 700; font-variant-numeric: tabular-nums; }
.valor.sem { font-weight: 500; color: var(--z-fraco); }

/* ---- conversas ---- */
#conversa { display: grid; grid-template-columns: 272px minmax(0, 1fr) 304px; gap: 8px; padding: 14px var(--pad) 20px; }
/* a conversa não tem linha de título: a altura toda é dela */
#conversa.sem-painel { grid-template-columns: 272px minmax(0, 1fr); }
#conversa.sem-painel .painel { display: none; }
/* cartão fechado: uma faixa fina na borda, que abre de novo (Bruno, 26/10/2026) */
#conversa.painel-fechado { grid-template-columns: 272px minmax(0, 1fr) 36px; }
.painel-aba {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0;
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r);
  color: var(--ink-soft); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.painel-aba:hover { border-color: #C3C7CE; color: var(--z-tinta); }
.painel-aba span { writing-mode: vertical-rl; letter-spacing: .02em; }
.painel-aba svg, .painel-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.painel-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.painel-h h3 { margin: 0; }
.painel-x {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; margin: -5px -6px -5px 0;
  background: none; border: 0; border-radius: 7px; color: var(--z-fraco); cursor: pointer;
}
.painel-x:hover { background: var(--z-fundo); color: var(--z-tinta); }
.painel .linhas .sem { color: var(--z-fraco); }
.caixa {
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r);
  min-height: 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column;
}
.fila-topo { padding: 10px; display: flex; gap: 5px; border-bottom: 1px solid var(--z-linha); flex: none; }
.fila-topo .st-pill { padding: 5px 11px; font-size: 12px; background: var(--z-fundo); border-color: transparent; }
.fila-topo .st-pill.ativa { background: var(--z-tinta); color: #FFF; }
.fila-l { overflow-y: auto; flex: 1; }
.item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--z-linha); padding: 11px 12px; }
.item:hover { background: var(--z-fundo); }
.item.aberta { background: var(--z-fundo); box-shadow: inset 3px 0 0 var(--z-tinta); }
.item .c-l2 { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; min-height: 20px; overflow: visible; }
.item .c-l2 > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Além da bolinha, o retângulo inteiro muda de fundo, bem leve, para bater o
   olho e achar: amarelo para quem está na fila (a mesma cor do cartão do
   funil), vermelho para a conversa da atendente em que falta responder. */
.item.fila { background: var(--stella-suave); }
.item.fila:hover, .item.fila.aberta { background: #FFF3D6; }
.item.falta:not(.fila) { background: var(--falta-suave); }
.item.falta:not(.fila):hover, .item.falta:not(.fila).aberta { background: var(--falta-forte); }
.item.falta .c-l1 b { font-weight: 800; }
.item.falta .c-l2 > span:first-child { color: var(--z-tinta); font-weight: 600; }
.c-l4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; min-height: 18px; }
.fila-topo .st-pill { display: inline-flex; align-items: center; gap: 6px; }
.fila-topo .pend { min-width: 18px; height: 18px; padding: 0 5px; }

.chat-h { border-bottom: 1px solid var(--z-linha); padding: 11px 16px; display: flex; align-items: center; gap: 12px; flex: none; }
.chat-h > div:first-child { min-width: 0; }
.chat-h h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-h p { margin: 2px 0 0; font-size: 12.5px; color: var(--z-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-h p.fone { margin-top: 1px; font-variant-numeric: tabular-nums; }
.chat-h .acoes { margin-left: auto; display: flex; gap: 6px; flex: none; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; background: var(--z-fundo); }
.m { max-width: min(560px, 74%); padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.m small { display: block; font-size: 12px; margin-bottom: 2px; font-weight: 700; color: var(--gold-texto); }
.m time { display: block; font-size: 12px; margin-top: 3px; text-align: right; color: var(--z-fraco); }
.m.falhou { box-shadow: 0 0 0 2px var(--z-ruim); }
.m.falhou time { font-weight: 700; }
.m.cliente { align-self: flex-start; background: var(--z-card); border: 1px solid var(--z-linha); border-bottom-left-radius: 4px; }
.m.stella { align-self: flex-end; background: var(--stella-bg); border: 1px solid var(--stella-linha); border-bottom-right-radius: 4px; }
.m.stella time { color: #6F6338; }
.m.atendente { align-self: flex-end; background: var(--z-tinta); color: #FFF; border-bottom-right-radius: 4px; }
.m.atendente small, .m.atendente time { color: #C9CDD4; }
/* o lugar da foto enquanto a mídia de verdade não chega */
.m-foto { width: 180px; height: 104px; border-radius: 8px; margin-bottom: 6px; background: var(--z-linha); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--z-fraco); }
.m-audio { display: inline-block; font-size: 12px; font-weight: 600; color: var(--z-fraco); background: var(--z-fundo); border-radius: 999px; padding: 2px 9px; margin-bottom: 4px; }
.m-foto.tem { cursor: zoom-in; text-decoration: none; }
.m-foto.tem:has(img) { width: auto; height: auto; max-width: 240px; padding: 0; overflow: hidden; display: block; }
.m-foto.tem img { display: block; max-width: 240px; max-height: 300px; min-width: 120px; min-height: 80px; object-fit: cover; }
.m-som { display: block; width: 260px; max-width: 100%; height: 36px; margin-bottom: 4px; }
.m-doc { display: inline-block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: inherit; text-decoration: underline; }
.nota { align-self: center; font-size: 12px; color: var(--ink-soft); background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 999px; padding: 4px 12px; margin: 4px 0; }

.sugestao { border-top: 1px solid var(--z-linha); padding: 10px 16px 0; flex: none; }
.sug { border: 1px solid var(--stella-linha); background: var(--stella-suave); border-radius: 12px; padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.sug > div { flex: 1; min-width: 0; }
.sug b { display: block; font-size: 12px; color: var(--gold-texto); margin-bottom: 3px; }
.sug p { margin: 0; font-size: 13.5px; line-height: 1.4; }
.sug .bts { flex: none; display: flex; flex-direction: column; gap: 5px; }
/* a mensagem modelo é da atendente, não da Stella: sem o amarelo dela */
.sug.modelo { border-color: var(--z-linha); background: var(--z-fundo); }
.sug.modelo b { color: var(--z-fraco); }
.sug.modelo p { white-space: pre-line; }
.escrever { padding: 10px 16px 14px; display: flex; gap: 8px; align-items: stretch; flex: none; }
.escrever:not(.sugestao + .escrever) { border-top: 1px solid var(--z-linha); }
.escrever textarea { flex: 1; resize: none; height: 54px; border: 1px solid var(--z-linha); border-radius: 12px; padding: 9px 12px; font-size: 14px; background: var(--z-card); }
.escrever textarea:focus { outline: 2px solid var(--z-tinta); outline-offset: -1px; }
.escrever textarea:disabled { background: var(--z-fundo); }
.escrever .st-pill { align-self: center; flex: none; }

.painel { overflow-y: auto; padding: 14px; gap: 14px; }
.painel h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--z-fraco); }
.etapas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.etapas i { height: 6px; border-radius: 3px; background: var(--z-linha); }
.etapas i.f { background: var(--z-tinta); }
.total { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.linhas { margin: 0; padding: 0; list-style: none; }
.linhas li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--z-linha); font-size: 12.5px; }
.linhas li:last-child { border-bottom: 0; }
.linhas li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.resumo { font-size: 12.5px; line-height: 1.5; background: var(--z-fundo); border-radius: 10px; padding: 9px 11px; margin: 0; }
.fechar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: auto; }
.fechar .st-bt { padding: 9px 4px; }
.fechar.quatro { grid-template-columns: 1fr 1fr; }

/* ---- agenda e clientes ---- */
#clientes, #canais { overflow-y: auto; padding: 0 var(--pad) 20px; }
.st-card { background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r); margin-bottom: 12px; overflow: hidden; }

/* A Agenda tem o formato da Agenda do index.html (#agenda-view): o mês à
   esquerda e o caderno do dia ao lado, na mesma proporção 1.55 para 1. */
#agenda { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 8px; padding: 0 var(--pad) 20px; }
.agd-cal-caixa, .agd-caderno { padding: 16px 18px; }
.agd-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; flex: none; }
.agd-nav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--z-linha); background: var(--z-card); font-size: 17px; line-height: 1; }
.agd-nav:hover { background: var(--z-fundo); }
.agd-mes { font-size: 16px; font-weight: 800; letter-spacing: -.01em; min-width: 170px; text-align: center; }
.agd-mes::first-letter, .agd-caderno h2::first-letter { text-transform: uppercase; }
.agd-legenda { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.agd-leg { font-size: 12px; color: var(--z-fraco); display: inline-flex; align-items: center; gap: 6px; }
.agd-leg i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor); }
.agd-cal {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--semanas, 5), minmax(0, 1fr)); gap: 1px;
  background: var(--z-linha); border: 1px solid var(--z-linha); border-radius: 12px; overflow: hidden;
}
.agd-cab { background: #FAFBFC; padding: 8px 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--z-fraco); }
.agd-dia {
  background: var(--z-card); border: 0; padding: 6px 7px; text-align: left; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.agd-dia:hover { background: var(--z-fundo); }
.agd-dia.fora { background: #FBFBFC; }
.agd-dia.fora .agd-num { color: var(--z-fraco); font-weight: 500; }
.agd-dia.hoje { box-shadow: inset 0 0 0 2px var(--z-marca); }
.agd-dia.aberto { background: var(--stella-suave); box-shadow: inset 0 0 0 2px var(--z-tinta); }
.agd-num { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.agd-ev {
  font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; background: var(--z-fundo);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* A cor da atendente vai num pontinho antes do texto (a faixa grossa na
   lateral saiu em 26/10/2026, a pedido do Bruno). */
.agd-ev::before, .agd-item .agd-hora::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cor, var(--z-linha)); margin-right: 5px; vertical-align: 1px;
}
.agd-ev.feito, .agd-item.feito .agd-txt b { text-decoration: line-through; color: var(--z-fraco); }
.agd-ev.faltou, .agd-item.faltou .agd-txt b { color: var(--z-ruim); }
.agd-mais { font-size: 12px; color: var(--z-fraco); }
.agd-caderno-topo { margin-bottom: 12px; flex: none; }
.agd-caderno h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.agd-caderno-topo span { font-size: 13px; color: var(--z-fraco); }
.agd-lista { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.agd-item {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; text-align: left; flex: none;
  background: var(--z-fundo); border: 0; border-radius: 11px; padding: 10px 12px;
}
.agd-item:hover { background: #ECEEF1; }
.agd-hora { font-size: 12.5px; font-weight: 700; color: var(--z-fraco); font-variant-numeric: tabular-nums; white-space: nowrap; }
.agd-txt b { display: block; font-size: 14px; font-weight: 700; }
.agd-txt span { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha {
  display: grid; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--z-linha); padding: 11px 18px; font-size: 13px;
}
.linha:hover { background: var(--z-fundo); }
.linha.cl { grid-template-columns: minmax(0, 1.3fr) 128px 104px minmax(0, 1.2fr) 132px 118px 76px; }
.cl-nome { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-nome b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-nome .chip-origem { flex: none; }
.cl-fone { font-variant-numeric: tabular-nums; font-size: 13px; }
.cl-rede { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.linha.cl .vv-etapa { white-space: nowrap; }
[data-etapa='perdido'] { --etapa: var(--z-fraco); --etapa-bg: var(--z-fundo); }
.linha.cab { color: var(--z-fraco); font-size: 12px; font-weight: 600; border-top: 0; }
.linha.cab:hover { background: none; }
.linha > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha .h { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.linha .f { color: var(--z-fraco); }
.linha .n { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }

/* ---- canais ---- */
/* uma linha por número, compacta: o pedido do Bruno foi "mais resumido" */
.linha.cn { grid-template-columns: minmax(0, 1.2fr) 200px minmax(0, 1.3fr) 262px; cursor: default; }
.linha.cn small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; }
.linha.cn b.ruim, .ruim { color: var(--z-ruim); }
.acoes-canal { display: flex; gap: 6px; justify-content: flex-end; }
.c-dir { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.c-l3 .valor { white-space: nowrap; }
.chip-canal {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: var(--z-fundo); border: 1px solid var(--z-linha); border-radius: 6px; padding: 1px 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.chave {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 0;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.chave i { width: 30px; height: 17px; border-radius: 999px; background: #C9CDD3; position: relative; flex: none; transition: background .15s; }
.chave i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #FFF; transition: transform .15s; }
.chave.on i { background: var(--z-ok); }
.chave.on i::after { transform: translateX(13px); }
.chave:disabled { cursor: default; }
.chave:focus-visible { outline: 2px solid var(--z-tinta); outline-offset: 2px; border-radius: 6px; }
.cab-acao { margin-left: auto; }
.modo-canal { color: var(--z-atencao) !important; font-weight: 600 !important; }
.modo-canal.valendo { color: var(--z-ok) !important; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--z-tinta); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nota-canais { color: var(--z-fraco); font-size: 12.5px; line-height: 1.5; margin: 12px 2px 0; max-width: 760px; }
.opcao-canal { flex-direction: column; align-items: flex-start; gap: 3px; white-space: normal; text-align: left; }
.opcao-canal b { font-size: 13.5px; }
.opcao-canal span { font-size: 12px; font-weight: 500; color: var(--z-fraco); line-height: 1.4; }
.dlg-dica { font-size: 12.5px; color: var(--z-fraco); line-height: 1.45; margin: 0 0 12px; }
.qr-caixa { width: 232px; height: 232px; margin: 4px auto 8px; display: grid; place-items: center; border: 1px solid var(--z-linha); border-radius: 12px; background: #FFF; color: var(--z-fraco); font-size: 12.5px; }
.qr-caixa img { width: 216px; height: 216px; image-rendering: pixelated; }
.qr-estado { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 0 0 8px; }
.hist-canal { max-height: 300px; overflow-y: auto; margin-bottom: 8px; }
.hist-canal li { font-size: 13px; }

/* ---- opções de orçamento ---- */
.c-l3 .valor.opcoes { display: grid; gap: 1px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.c-l3 .valor.opcoes b { color: var(--z-tinta); font-weight: 700; font-variant-numeric: tabular-nums; }
.c-l3 .valor.opcoes .mais { font-size: 11.5px; color: var(--z-fraco); }
.h-acao { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.h-acao .link { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.ops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ops > li { border: 1px solid var(--z-linha); border-radius: 10px; padding: 8px 10px; }
.op-l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.op-l1 b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.op-n { font-size: 12px; font-weight: 700; color: var(--z-fraco); }
.op-t { font-size: 13px; line-height: 1.35; margin-top: 2px; }
.op-itens { margin-top: 6px; }
.op-itens li { font-size: 12px; padding: 4px 0; }
.op-nota { font-size: 12px; color: var(--z-fraco); margin: 8px 0 0; }
dialog.largo { width: min(560px, calc(100vw - 32px)); }
.ed-ops-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--z-fraco); margin: 6px 0 6px; }
#ed-ops { display: grid; gap: 6px; margin-bottom: 10px; }
.ed-op { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 6px; align-items: center; }
.ed-op .st-campo { width: 100%; }

/* ---- ao vivo ---- */
#aovivo { overflow-y: auto; padding: 0 var(--pad) 20px; }
.vv-total { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
#busca-vivo { margin-left: auto; }
#filtro-vivo { width: 190px; }
.vv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.vv-painel { background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r); display: flex; flex-direction: column; overflow: hidden; }
.vv-h { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--z-linha); }
.vv-h h2 { margin: 0; font-size: 14px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-painel[data-tipo='fila'] .vv-h { background: var(--z-ruim-bg); }
.vv-painel[data-tipo='fila'] .vv-h h2 { color: var(--z-ruim); }
.vv-painel[data-tipo='stella'] .vv-h { background: var(--stella-bg); }
.vv-painel[data-tipo='stella'] .vv-h h2 { color: var(--gold-texto); }
/* Modo sombra: só leitura, até a virada. Cinza, para não parecer trabalho a fazer. */
.vv-painel[data-tipo='sombra'] .vv-h { background: var(--z-fundo); }
.vv-painel[data-tipo='sombra'] .vv-h h2 { color: var(--z-fraco); }
.sb-msgs { max-height: min(60vh, 520px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; margin: 0 0 12px; border-radius: 10px; background: var(--z-fundo); }
.vv-av.fila { width: 24px; height: 24px; display: grid; place-items: center; color: var(--z-ruim); flex: none; }
.vv-av svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.vv-qtd { font-size: 12px; font-weight: 700; min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 999px; background: var(--z-fundo); color: var(--z-tinta); font-variant-numeric: tabular-nums; }
.vv-resp { font-size: 11.5px; font-weight: 700; color: var(--z-ruim); white-space: nowrap; }
.vv-b { max-height: 360px; overflow-y: auto; overflow-x: hidden; padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.vv-b .st-vazio { padding: 22px 10px; }
.vv-item { min-width: 0; text-align: left; width: 100%; background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 10px; padding: 9px 11px; display: grid; gap: 3px; transition: border-color .12s ease, box-shadow .12s ease; }
.vv-item { grid-template-columns: minmax(0, 1fr); }
.vv-item > * { min-width: 0; }
.vv-item:hover { border-color: #C3C7CE; box-shadow: 0 2px 6px rgba(16,24,40,.07); }
.vv-item.falta { background: var(--falta-suave); }
.vv-l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vv-l1 b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-l1 time { font-size: 12px; color: var(--z-fraco); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vv-l2 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--z-fraco); }
.vv-l2 > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-quem { color: var(--ink-soft); font-weight: 600; }
.vv-l3 { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; }
.vv-etapa { font-size: 11.5px; font-weight: 700; color: var(--etapa); background: var(--etapa-bg); border-radius: 6px; padding: 1px 7px; }
.vv-l1 time.vv-espera { color: var(--z-ruim); font-weight: 700; }
.vv-l3 .st-selo { padding: 2px 8px; font-size: 11.5px; }

/* ---- relacionamento ---- */
#relac { overflow-y: auto; padding: 0 var(--pad) 20px; display: grid; gap: 12px; align-content: start; grid-auto-rows: max-content; }
#relat { overflow-y: auto; padding: 0 var(--pad) 20px; }
.rev-abas { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.rev-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--z-atencao-bg); border-radius: var(--z-r); padding: 12px 16px; }
.rev-status.ligado { background: var(--z-ok-bg); }
.rev-status > div:first-child { display: grid; gap: 2px; min-width: 0; }
.rev-status b { font-size: 14px; color: var(--z-atencao); }
.rev-status.ligado b { color: var(--z-ok); }
.rev-status span { font-size: 13px; color: var(--z-tinta); }
.rev-status small { font-size: 12px; color: var(--ink-soft); }
.rev-status-bts { display: flex; gap: 6px; flex: none; }
.linha.rv { grid-template-columns: minmax(0, 1.3fr) 130px 120px 130px 140px 90px auto; cursor: default; }
.linha.rv small, .linha.re small, .linha.ev small, .linha.sc small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; }
.rv-num { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.st-campo.mini { width: 74px; height: 30px; padding: 4px 8px; }
.rev-cfg { padding: 14px 18px 16px; }
.rev-cfg h2 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.rev-cfg-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 14px; }
.rev-cfg-grade label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--z-fraco); }
/* Importar contatos: o campo do arquivo no mesmo desenho dos outros campos */
.rev-arquivo { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.rev-arquivo > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--z-tinta); font-weight: 500; }
.rev-arquivo > span.vazio { color: var(--z-fraco); }
.rev-cfg-grade + .rev-previa-bts { margin-top: 14px; }
.rev-cfg .rev-previa-bts + .cfg-nota { margin: 12px 0 0 !important; }
.rev-filtros { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rev-filtros .st-pill b { font-variant-numeric: tabular-nums; margin-left: 2px; }
.rev-liberar { margin-left: auto; }
.linha.re { grid-template-columns: 26px minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 130px 110px auto; cursor: default; }
.linha.ev { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.6fr) 110px 140px; cursor: default; }
.linha.sc { grid-template-columns: minmax(0, 1fr) 90px 220px; cursor: default; }
.linha.rt { grid-template-columns: minmax(0, 1.3fr) repeat(5, 120px); cursor: default; }
.rev-sem .cfg-h { padding-bottom: 2px; }
.rev-textos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.rev-textos textarea.st-campo { height: auto; resize: vertical; font: inherit; line-height: 1.45; }
.rev-previa { display: grid; gap: 10px; align-content: start; }
.rev-previa > small { font-size: 12px; font-weight: 600; color: var(--z-fraco); }
.rev-email { border: 1px solid var(--z-linha); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.rev-email b { display: block; margin-bottom: 6px; }
.rev-email p { margin: 0 0 10px; }
.rev-botao { display: inline-block; background: var(--z-marca); color: var(--z-tinta); font-weight: 700; font-size: 12.5px; border-radius: 8px; padding: 6px 12px; }
dialog#dlg-regra { width: min(860px, calc(100vw - 32px)); }

/* ---- Relacionamento: a lista à esquerda, a mensagem que sai à direita ---- */
.rev-dupla { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
.rev-col { display: grid; gap: 12px; min-width: 0; }
.rev-lado { position: sticky; top: 0; padding: 14px; display: grid; gap: 12px; }
.rev-previa-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rev-previa-cab > span { font-size: 14px; }
.rev-previa-cab > small { flex-basis: 100%; font-size: 12px; color: var(--z-fraco); }
.rev-previa-bts { display: flex; gap: 8px; flex-wrap: wrap; }
.rev-servicos { display: flex; gap: 6px; flex-wrap: wrap; }
.rev-servicos .st-pill { font-size: 12px; padding: 4px 10px; }
.rev-rodape { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--z-linha); font-size: 11.5px; color: var(--z-fraco); }
.rev-whats { background: #DCF8C6; border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--z-tinta); }
.rev-intervalo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.rev-intervalo .st-campo { width: 72px; height: 30px; }
.linha.ch2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; cursor: pointer; }
.linha.ch2 small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; white-space: normal; line-height: 1.35; }
.linha.ch2 small em { font-style: normal; }
.linha.ch2 small em.ruim { color: var(--z-ruim); font-weight: 600; }
.linha.ch2.vista { background: var(--stella-suave); }
@media (max-width: 1100px) {
  .rev-dupla { grid-template-columns: minmax(0, 1fr); }
  .rev-lado { position: static; }
}
@media (max-width: 720px) {
  .linha.ch2 { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .linha.ch2 > :nth-child(2), .linha.ch2 > :nth-child(3) { grid-column: 1 / -1; }
}

/* ---- iniciar atendimento e mensagens rápidas ---- */
.st-bt.icone { padding: 0; width: 38px; height: 38px; flex: none; }
.st-bt.mini.icone { width: 30px; height: 30px; }
.st-bt.icone svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fila-topo .st-bt.icone { margin-left: auto; width: 30px; height: 30px; }
.rapidas { position: relative; align-self: center; }
.rapidas .st-bt.icone { width: 38px; height: 38px; }
.rapidas-menu {
  position: absolute; right: 0; bottom: calc(100% + 8px); width: min(360px, 80vw); max-height: 320px; overflow-y: auto;
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.18);
  padding: 6px; display: grid; gap: 2px; z-index: 5;
}
.rapidas-menu button { text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.rapidas-menu button:hover, .rapidas-menu button:focus-visible { background: var(--z-fundo); }
.rapidas-menu b { font-size: 13px; }
.rapidas-menu span { font-size: 12px; color: var(--z-fraco); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.linha.rp { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.linha.og { grid-template-columns: minmax(0, 1fr) 110px auto; cursor: default; }
.linha.og small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; }
.linha.og.inativo b { color: var(--z-fraco); }
.linha.rp small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
dialog textarea.st-campo { height: auto; resize: vertical; font: inherit; line-height: 1.45; }

/* ---- mensagem saindo e conversa carregando ---- */
.m.enviando { opacity: .55; }
.msgs-lendo { margin: auto; font-size: 13px; color: var(--z-fraco); }

/* ---- abertura: nada da Central aparece até o primeiro desenho ---- */
body.carregando .tk-nav, body.carregando .tk-cab, body.carregando .tk-vista { visibility: hidden; }

/* ---- páginas de botões (Relacionamento, Configurações) ---- */
.hub-grupo { margin-bottom: 18px; }
.hub-grupo h2 { font-size: 14px; font-weight: 800; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--z-linha); }
.hub-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.hub-bt {
  display: flex; align-items: center; gap: 12px; text-align: left; background: var(--z-card);
  border: 1px solid var(--z-linha); border-radius: 12px; padding: 0 14px; height: 72px; min-width: 0;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.hub-bt:hover { border-color: #C3C7CE; box-shadow: 0 2px 6px rgba(16,24,40,.07); }
.hub-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--z-fundo); display: grid; place-items: center; flex: none; }
.hub-ic svg, .hub-seta, .voltar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hub-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hub-tx b { font-size: 14px; }
/* todo botão de página de botões tem a mesma medida: descrição numa linha só */
.hub-tx small { font-size: 12.5px; color: var(--z-fraco); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-n { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--z-fundo); color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hub-seta { color: var(--z-fraco); width: 16px; height: 16px; flex: none; }
.voltar { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 4px 6px 4px 0; font-size: 13px; font-weight: 600; color: var(--z-fraco); }
.voltar:hover { color: var(--z-tinta); }
.voltar + h1 { margin-left: 4px; }
.linha.ch { grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1fr) 120px minmax(0, 1.2fr) auto; cursor: default; }
.linha.ch small, .linha.ls small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; font-weight: 500; }
.linha.ch .ruim { color: var(--z-ruim); font-weight: 600; }
.ch-email { width: 100%; height: 30px; padding: 4px 9px; }
.linha.ls { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.lista-por { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto; gap: 8px; padding: 12px; }
.linha.rv { grid-template-columns: minmax(0, 1fr) 150px auto; }
.linha.md { grid-template-columns: 240px minmax(0, 1fr); align-items: start; cursor: default; }
.linha.md small { display: block; font-size: 12px; color: var(--z-fraco); margin-top: 2px; }
.md-texto { white-space: normal !important; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.sem-pad { padding: 0 !important; margin: 0 !important; }
.rev-cfg .cfg-h.sem-pad { margin-bottom: 6px !important; }
.rev-cfg .cfg-nota.sem-pad { margin-bottom: 14px !important; }
.rev-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#config { display: block; }

/* ---- configurações ---- */
#config { overflow-y: auto; padding: 0 var(--pad) 20px; }
.cfg-grade { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.cfg-grade.so { grid-template-columns: minmax(0, 320px); }
.cfg { padding: 0 0 4px; }
.cfg-conta { padding: 14px 16px 16px; display: grid; gap: 12px; }
.cfg-conta h2 { margin: 0; font-size: 16px; font-weight: 800; }
.cfg-eu { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cfg-eu > div { min-width: 0; display: grid; }
.cfg-eu b { font-size: 14px; }
.cfg-eu span { font-size: 12.5px; color: var(--z-fraco); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-papel { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--z-fraco); border-top: 1px solid var(--z-linha); padding-top: 10px; }
.cfg-senha { width: 100%; }
.cfg-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 8px; }
.cfg-h h2 { margin: 0; font-size: 16px; font-weight: 800; }
.cfg-dados { padding: 0 18px 10px; max-width: 520px; }
.cfg-nota { font-size: 12.5px; color: var(--z-fraco); line-height: 1.5; margin: 0 18px 10px; max-width: 760px; }
.linha.eq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 130px 110px 280px; cursor: default; }
.linha.eq.inativo { color: var(--z-fraco); }
.eq-nome { display: inline-flex; align-items: center; gap: 8px; }
.eq-nome small { font-size: 11.5px; color: var(--z-fraco); font-weight: 600; }
input.cor { padding: 4px; height: 38px; cursor: pointer; }

/* ---- janelas ---- */
dialog {
  border: 0; border-radius: var(--z-r); padding: 20px; width: min(380px, calc(100vw - 32px));
  color: var(--z-tinta); box-shadow: 0 20px 50px rgba(16,24,40,.25);
}
dialog::backdrop { background: rgba(0,0,0,.42); }
dialog h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
dialog label { display: block; font-size: 12px; font-weight: 600; color: var(--z-fraco); margin-bottom: 10px; }
dialog label .st-campo { display: block; width: 100%; margin-top: 5px; color: var(--z-tinta); font-weight: 500; }
.dlg-par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg-bts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dlg-lista { display: grid; gap: 6px; }
.dlg-lista .st-bt { justify-content: flex-start; padding: 11px 14px; }
.transf { gap: 10px; }
.transf span { flex: 1; text-align: left; }
.transf small { font-size: 12px; font-weight: 600; color: var(--z-fraco); }
.transf small.on { color: var(--z-ok); }
.transf small.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--z-ok); margin-right: 5px; vertical-align: 1px; }
.transf.fora { opacity: .55; }
.dlg-erro { color: var(--z-ruim); font-size: 12.5px; font-weight: 600; margin: 0 0 8px; }

.tk-aviso {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--z-tinta); color: #FFF; border-radius: 10px; padding: 10px 16px;
  font-size: 13px; font-weight: 600; z-index: 20; box-shadow: 0 8px 24px rgba(16,24,40,.25);
}

@media (prefers-reduced-motion: reduce) { .cartao, .topnav-brand { transition: none; } }

/* Ligação de WhatsApp: o aviso fixo no canto (tk/app.js, ligações). Verde é
   o atender do telefone; vermelho, o desligar. As cores são as de estado. */
.lig { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 320px; max-width: calc(100vw - 32px); }
.lig-card {
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r);
  box-shadow: 0 18px 48px rgba(16,24,40,.22); padding: 16px 18px 18px;
}
.lig-card.entra { animation: lig-entra .22s cubic-bezier(.2,.8,.2,1); }
.lig-topo { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--z-fraco); }
.lig-icone {
  position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--z-ok-bg); color: var(--z-ok);
}
.lig-icone svg, .lig-bts svg, .lig-bt svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.em-ligacao .lig-icone { background: var(--z-ok); color: #FFF; }
.tocando .lig-icone::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--z-ok); animation: lig-onda 1.4s ease-out infinite; }
.tocando .lig-icone svg { animation: lig-treme 1.4s ease-in-out infinite; }
.lig-card h2 { margin: 12px 0 2px; font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--z-tinta); overflow-wrap: anywhere; }
.lig-fone { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lig-info { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--z-fraco); }
.lig-tempo { margin: 8px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--z-tinta); }
.lig-bts { display: flex; gap: 8px; margin-top: 14px; }
.lig-bts .st-bt { flex: 1; padding: 0 10px; }
.lig-mais { margin: 10px 0 0; font-size: 12px; font-weight: 600; color: var(--z-atencao); }
.st-bt.verde { background: var(--z-ok); border-color: var(--z-ok); color: #FFF; }
.st-bt.vermelho { background: var(--z-ruim); border-color: var(--z-ruim); color: #FFF; }
.st-bt.verde:hover, .st-bt.vermelho:hover { filter: brightness(1.1); }
.st-bt.mudo-on { background: var(--z-tinta); border-color: var(--z-tinta); color: #FFF; }
.chaves { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hist-sub { margin: 16px 0 6px; font-size: 13px; font-weight: 700; }
@keyframes lig-entra { from { transform: translateY(12px); opacity: 0; } }
@keyframes lig-onda { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
@keyframes lig-treme { 0%, 40%, 100% { transform: rotate(0); } 5%, 15%, 25%, 35% { transform: rotate(-14deg); } 10%, 20%, 30% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .lig-card.entra, .tocando .lig-icone::after, .tocando .lig-icone svg { animation: none; } }
@media (max-width: 720px) { .lig { left: 16px; right: 16px; bottom: 16px; width: auto; } }

/* Tela menor que notebook: o funil rola de lado em vez de espremer as colunas. */
@media (max-width: 1100px) {
  :root { --pad: 18px; }
  #funil { grid-template-columns: repeat(5, 240px); overflow-x: auto; }
  #conversa, #conversa.sem-painel, #conversa.painel-fechado { grid-template-columns: 240px minmax(0, 1fr); }
  .painel, .painel-aba { display: none; }
  .st-busca { width: 180px; }
  .linha.cn { grid-template-columns: minmax(0, 1.2fr) 170px minmax(0, 1fr) 240px; gap: 10px; }
  .linha.eq { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px 90px 240px; gap: 10px; }
  /* tela menor: a conta vai para cima, a equipe embaixo */
  .cfg-grade { grid-template-columns: minmax(0, 1fr); }
  .cfg-conta { order: -1; max-width: 420px; }
}
@media (max-width: 720px) {
  #conversa, #conversa.sem-painel, #conversa.painel-fechado { grid-template-columns: minmax(0, 1fr); }
  #conversa > .caixa:first-child { display: none; }
  .tk-nav { overflow-x: auto; }
  .tk-cab { flex-wrap: wrap; }
  .tk-soma { margin-left: 0; width: 100%; }
  .linha.cl { grid-template-columns: minmax(0, 1fr) auto; }
  .linha.cl > :not(:first-child):not(:nth-child(5)) { display: none; }
  .linha.cn { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .linha.cn > :nth-child(3) { display: none; }
  .linha.eq { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .linha.eq > :nth-child(2), .linha.eq > :nth-child(4) { display: none; }
  .linha.eq.cab { display: none; }
  .linha.rv, .linha.re, .linha.ev, .linha.rt, .linha.ch, .linha.md { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .linha.ch.cab, .linha.md > :nth-child(2) { grid-column: 1 / -1; }
  .linha.ch > :nth-child(n+3) { grid-column: 1 / -1; }
  .lista-por { grid-template-columns: minmax(0, 1fr); }
  .linha.rv.cab, .linha.re.cab, .linha.ev.cab, .linha.rt.cab { display: none; }
  .linha.rv > :nth-child(n+3), .linha.re > :nth-child(n+4), .linha.ev > :nth-child(n+3), .linha.rt > :nth-child(n+3) { grid-column: 1 / -1; }
  .linha.sc { grid-template-columns: minmax(0, 1fr); }
  .rev-status { flex-direction: column; align-items: flex-start; }
  .rev-textos { grid-template-columns: minmax(0, 1fr); }
  .linha.eq > :nth-child(5) { grid-column: 1 / -1; }
  .linha.cn.cab { display: none; }
  .linha.cn > :first-child { white-space: normal; }
  .linha.cn > :nth-child(4) { grid-column: 1 / -1; }
  .acoes-canal { justify-content: flex-start; }
  #agenda { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .agd-cal { min-height: 380px; }
  .agd-ev { display: none; }
  .agd-legenda { margin-left: 0; }
}

/* ---- a rede da conversa (WhatsApp, e depois Instagram e Facebook) ---- */
svg.rede { width: 14px; height: 14px; flex: none; display: inline-block; vertical-align: -2px; }
.chip-canal { display: inline-flex; align-items: center; gap: 4px; }
.chip-canal.so-icone { background: none; border: 0; padding: 0; }
.chat-h p.sub-rede { display: flex; align-items: center; gap: 5px; }
.chat-h p.sub-rede span { overflow: hidden; text-overflow: ellipsis; }

/* ---- relatórios ---- */
.rel-periodos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.rel-datas { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: 6px; }
.rel-datas label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.rel-datas .st-campo { padding: 5px 9px; font-size: 13px; width: auto; }
.rel-numeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rel-n { background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r); padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.rel-n small { font-size: 12px; color: var(--z-fraco); font-weight: 600; }
.rel-n b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rel-n span { font-size: 11.5px; color: var(--z-fraco); line-height: 1.3; }
.linha.rl { grid-template-columns: minmax(0, 1.3fr) repeat(4, 100px) 130px 90px; cursor: default; }
.linha.rl2 { grid-template-columns: minmax(0, 1fr) 140px; cursor: default; }
.linha.rl4 { grid-template-columns: minmax(0, 1.3fr) repeat(3, 100px) 130px; cursor: default; }
.linha.apagada { color: var(--z-fraco); }
.rl-nome { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.rl-nome i, .nt-card h3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor); flex: none; }

/* a nota de cada atendente: o anel à esquerda, as cinco notas à direita */
.nt-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.nt-card {
  --tom: var(--z-fraco); --tom-bg: var(--z-fundo);
  display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "anel topo" "dims dims";
  column-gap: 16px; row-gap: 12px; align-items: center;
  background: var(--z-card); border: 1px solid var(--z-linha); border-radius: var(--z-r); padding: 14px 16px;
}
.nt-card .nt-anel { grid-area: anel; }
.nt-topo { grid-area: topo; min-width: 0; }
.nt-card .nt-dims { grid-area: dims; }
.nt-card.critico { --tom: #E5484D; --tom-bg: #FDECEC; }
.nt-card.atencao { --tom: #D97706; --tom-bg: #FDF2D6; }
.nt-card.bom { --tom: #2F9E44; --tom-bg: #E7F6EC; }
.nt-card.otimo { --tom: #1A7F37; --tom-bg: #DDF3E4; }
.nt-anel { position: relative; width: 76px; height: 76px; }
.nt-anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.nt-anel circle { fill: none; stroke-width: 10; }
.nt-fundo { stroke: var(--tom-bg); }
.nt-arco { stroke: var(--tom); stroke-linecap: round; transition: stroke-dasharray .6s cubic-bezier(.2, .7, .2, 1); }
.nt-anel > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.nt-anel b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--tom); font-variant-numeric: tabular-nums; }
.nt-card.vazio .nt-anel b { color: var(--z-fraco); }
.nt-anel small { font-size: 10.5px; color: var(--z-fraco); margin-top: 2px; }
.nt-topo header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nt-card h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.nt-faixa { font-size: 12px; font-weight: 700; color: var(--tom); background: var(--tom-bg); border-radius: 999px; padding: 3px 10px 3px 9px; display: inline-flex; align-items: center; gap: 6px; }
.nt-faixa::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nt-topo > p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.nt-dims { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding-top: 12px; border-top: 1px solid var(--z-linha); }
.nt-d { display: grid; gap: 4px; min-width: 0; }
.nt-d small { font-size: 11.5px; color: var(--z-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-d b { font-size: 18px; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; line-height: 1.1; }
.nt-d b span { font-size: 11px; font-weight: 600; color: var(--z-fraco); margin-left: 2px; }
.nt-d i { display: block; height: 4px; border-radius: 999px; background: var(--z-fundo); overflow: hidden; }
.nt-d i s { display: block; height: 100%; border-radius: inherit; background: var(--c); transform: scaleX(var(--v, 0)); transform-origin: left; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.nt-d em { font-style: normal; font-size: 11px; color: var(--z-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-d.fraca small { color: var(--z-tinta); font-weight: 700; }
.nt-mais { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.nt-mais .nt-como[open] { flex-basis: 100%; }
.nt-mais .st-card { margin: 8px 0; }
.nt-como { margin: 0 2px 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.nt-como summary { cursor: pointer; font-weight: 700; color: var(--z-tinta); width: fit-content; }
.nt-como ul { margin: 8px 0; padding-left: 18px; max-width: 820px; }
.nt-como p { margin: 0; max-width: 820px; }
@media (prefers-reduced-motion: reduce) { .nt-arco, .nt-d i s { transition: none; } }
@media (max-width: 1100px) {
  .nt-lista { grid-template-columns: minmax(0, 1fr); }
  .linha.rl { grid-template-columns: minmax(0, 1fr) repeat(6, 76px); gap: 8px; }
}
@media (max-width: 720px) {
  .nt-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .linha.rl, .linha.rl4 { font-size: 12px; padding: 10px 12px; }
  .rel-datas { margin-left: 0; }
}

/* nove abas (com Relatórios, 26/10/2026) não cabem a 1280px com o respiro
   de antes: aperta o respiro e deixa só a inicial de quem está atendendo */
@media (max-width: 1440px) {
  .tk-aba { padding: 8px 10px; gap: 6px; }
  #quem-nome { display: none; }
  .tk-quem { padding-right: 4px; }
}
@media (max-width: 1180px) { .tk-nav { overflow-x: auto; } }
.rel-numeros.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .rel-numeros.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cfg-nota.rel-inicio { margin: -6px 0 14px; }

/* ---- anotações da Agenda ---- */
.agd-caderno-topo { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t b" "s b"; align-items: center; column-gap: 10px; }
.agd-caderno-topo h2 { grid-area: t; }
.agd-caderno-topo span { grid-area: s; }
.agd-caderno-topo .st-bt { grid-area: b; }
/* .nota sozinha é o aviso centralizado da conversa: aqui ela não vale */
.agd-ev.nota, .agd-item.nota { align-self: stretch; margin: 0; border: 0; color: var(--z-tinta); }
.agd-ev.nota { --cor: var(--z-marca); background: var(--stella-bg); }
.agd-item.nota { --cor: var(--z-marca); background: var(--stella-suave); font-size: inherit; }
.agd-item.nota .agd-hora { color: var(--gold-texto); }
button.agd-item.nota:hover { background: var(--stella-bg); }
.agd-nota-tx { font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.agd-vazio { margin: 6px 2px; font-size: 13px; color: var(--z-fraco); }
dialog label.dlg-curto { max-width: 160px; }
.st-bt.perigo { color: var(--z-ruim); margin-right: auto; }
.st-bt.perigo:hover { background: var(--z-ruim-bg); border-color: #F2C4C1; }
.nt-d em { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
