/* ============================================================================
   glaudZap Lite — componentes
   Base: lite/mockups/lite.css (rodada 1, aprovada em 23/09/2026) + o que só o
   app de verdade precisa (entrada, mídia, status, equipe) no fim do arquivo.
   Regra herdada do GlaudZap: nenhum componente usa cor literal. Cor nova vira
   token aqui em cima, nos DOIS temas. E nunca `transition: .15s` sozinho — com
   custom properties o Chrome congela a cor do primeiro paint (ver tokens.css).
   ============================================================================ */

/* ---- Cores de etiqueta e de número: 8 fixas, ordem fixa, nunca verde WA ----
   --tN = texto/ponto, --tN-bg = fundo do chip. Texto >= 4,5:1 sobre o fundo. */
:root {
  --t1: #1d3fcc; --t1-bg: #e8edff;
  --t2: #6a2fc2; --t2-bg: #f1e9ff;
  --t3: #b0205f; --t3-bg: #fde8f1;
  --t4: #b04a0c; --t4-bg: #ffece0;
  --t5: #8a5a00; --t5-bg: #fff5d6;
  --t6: #0b6e62; --t6-bg: #def5f1;
  --t7: #0b6a8f; --t7-bg: #e0f3fb;
  --t8: #4a5d70; --t8-bg: #edf0f4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t1: #a9bbff; --t1-bg: #17285a;
    --t2: #c9a8ff; --t2-bg: #2a1a4d;
    --t3: #ff9cc6; --t3-bg: #3d1729;
    --t4: #ffb487; --t4-bg: #3b2010;
    --t5: #ffd66b; --t5-bg: #362a0c;
    --t6: #6fe0cc; --t6-bg: #0d302b;
    --t7: #7fd0f2; --t7-bg: #0c2c3b;
    --t8: #b4c3d4; --t8-bg: #1d2a3b;
  }
}
:root[data-theme="dark"] {
  --t1: #a9bbff; --t1-bg: #17285a;
  --t2: #c9a8ff; --t2-bg: #2a1a4d;
  --t3: #ff9cc6; --t3-bg: #3d1729;
  --t4: #ffb487; --t4-bg: #3b2010;
  --t5: #ffd66b; --t5-bg: #362a0c;
  --t6: #6fe0cc; --t6-bg: #0d302b;
  --t7: #7fd0f2; --t7-bg: #0c2c3b;
  --t8: #b4c3d4; --t8-bg: #1d2a3b;
}
.c1 { --c: var(--t1); --c-bg: var(--t1-bg); }
.c2 { --c: var(--t2); --c-bg: var(--t2-bg); }
.c3 { --c: var(--t3); --c-bg: var(--t3-bg); }
.c4 { --c: var(--t4); --c-bg: var(--t4-bg); }
.c5 { --c: var(--t5); --c-bg: var(--t5-bg); }
.c6 { --c: var(--t6); --c-bg: var(--t6-bg); }
.c7 { --c: var(--t7); --c-bg: var(--t7-bg); }
.c8 { --c: var(--t8); --c-bg: var(--t8-bg); }

:root.trocando-tema, :root.trocando-tema *,
:root.trocando-tema *::before, :root.trocando-tema *::after {
  transition: none !important; animation: none !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
::selection { background: var(--sel-bg); color: var(--sel-fg); }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; color: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--fg); }

svg.ic {
  width: 20px; height: 20px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em;
}
svg.ic.xs { width: 13px; height: 13px; stroke-width: 2.2; }
svg.ic.sm { width: 16px; height: 16px; stroke-width: 2; }
svg.ic.lg { width: 26px; height: 26px; stroke-width: 1.7; }
svg.ic.xl { width: 44px; height: 44px; stroke-width: 1.4; }
button svg.ic { pointer-events: none; }

/* ------------------------------- LOCKUP -------------------------------------
   Idêntico ao do GlaudZap (inline, não flex — ver comentário em style.css).
   O "Lite" é uma pílula À PARTE do lockup, para não mexer na linha de base
   medida do "glaudZap". */
.lockup {
  --lk: 19px;
  display: inline-block; white-space: nowrap; line-height: 1;
  padding-bottom: calc(var(--lk) * .2485);
}
.lockup img {
  height: var(--lk); width: auto; vertical-align: baseline;
  margin-bottom: calc(var(--lk) * -.2485);
  margin-right: calc(var(--lk) * .15);
}
.lockup .zap {
  font-size: calc(var(--lk) * 1.05); font-weight: 600;
  letter-spacing: -.025em; color: var(--fg); line-height: 1;
}
.lockup .lk-claro { display: inline; }
.lockup .lk-escuro { display: none; }
:root[data-theme="dark"] .lockup .lk-claro { display: none; }
:root[data-theme="dark"] .lockup .lk-escuro { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup .lk-claro { display: none; }
  :root:not([data-theme="light"]) .lockup .lk-escuro { display: inline; }
}
.selo-lite {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 8px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-soft-bd);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}

/* ------------------------------- TOPO --------------------------------------- */
#topbar {
  height: 44px; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--bd);
}
.topbar-sep { width: 1px; height: 18px; background: var(--bd); margin: 0 4px; }
.topbar-empresa { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.topbar-empresa svg { color: var(--fg-3); }
.topbar-ctx { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-eu {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--surface);
  font-size: 12.5px;
  transition: background-color .15s, border-color .15s;
}
.topbar-eu:hover { background: var(--hover); }
.topbar-eu .av { width: 26px; height: 26px; font-size: 11px; }
.topbar-eu small { color: var(--fg-3); font-size: 11px; }

/* ------------------------------- RAIL --------------------------------------- */
#app-linha { display: flex; flex: 1; min-height: 0; }
#nav-rail {
  width: 76px; flex: none;
  background: var(--surface); border-right: 1px solid var(--bd);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0; gap: 2px;
  /* SEM overflow: overflow-y força o x para auto e o menu de Aparência, que sai
     para a direita do rail, fica cortado dentro dele (bug de 23/09/2026). */
}
.rail-logo {
  width: 38px; height: 38px; border-radius: 11px; overflow: hidden;
  margin-bottom: 10px; flex: none; box-shadow: var(--shadow-1);
}
.rail-logo img { width: 100%; height: 100%; display: block; }
/* Com rótulo embaixo: o Lite é vendido para quem nunca usou painel de
   atendimento — ícone sozinho exige decorar, e 7 ícones é demais para isso. */
.nav-btn {
  width: 64px; min-height: 54px; padding: 6px 2px;
  border: none; background: transparent; color: var(--fg-2);
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  position: relative;
  transition: background-color .15s ease, color .15s ease;
}
.nav-btn span.rot { font-size: 10.5px; font-weight: 500; line-height: 1.15; text-align: center; }
.nav-btn:hover { background: var(--surface-3); color: var(--fg); }
.nav-btn.active { background: var(--brand-soft); color: var(--brand); }
.nav-btn.active svg { stroke-width: 2.2; }
.nav-btn.active span.rot { font-weight: 600; }
.nav-btn .nav-dot {
  position: absolute; top: 3px; right: 10px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--err); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}
.nav-btn .futuro-tag {
  position: absolute; top: 4px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--g-steel);
}
.nav-spacer { flex: 1; min-height: 8px; }
.tema-wrap { position: relative; }
#tema-menu {
  position: absolute; left: calc(100% + 8px); bottom: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--bd); border-radius: 10px;
  box-shadow: var(--shadow-2); padding: 4px; min-width: 180px;
}
#tema-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: 7px;
  font-size: 13px; text-align: left;
}
#tema-menu button:hover { background: var(--hover); }
#tema-menu button.on { color: var(--brand); font-weight: 600; }

/* ------------------------------- GERAIS ------------------------------------- */
.view { flex: 1; display: flex; min-width: 0; min-height: 0; }
.av {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: var(--avatar-bg); color: var(--avatar-fg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--bd-strong); background: var(--surface); color: var(--fg);
  font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn.pri { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.btn.pri:hover { background: var(--brand-solid-hover); border-color: var(--brand-solid-hover); }
.btn.fant { border-color: transparent; background: transparent; color: var(--fg-2); }
.btn.fant:hover { background: var(--hover); color: var(--fg); }
.btn.perigo { color: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-ic {
  width: 36px; height: 36px; border-radius: 8px; border: none; background: none;
  color: var(--fg-2); display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s, color .15s;
}
.btn-ic:hover { background: var(--hover); color: var(--fg); }
.btn-ic.on { background: var(--brand-soft); color: var(--brand); }

.campo {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--bd); border-radius: 8px; background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.campo { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.campo:focus { border-color: var(--brand-solid); box-shadow: 0 0 0 3px var(--ring); }
select.campo { padding-right: 8px; }
.rotulo { display: block; font-size: 12px; font-weight: 600; color: var(--fg-2); margin-bottom: 6px; }
.ajuda { font-size: 12px; color: var(--fg-3); margin-top: 6px; line-height: 1.45; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--c-bg, var(--surface-3)); color: var(--c, var(--fg-2));
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.chip .x { border: none; background: none; color: inherit; opacity: .7; display: inline-flex; padding: 0; }
.chip .x:hover { opacity: 1; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--fg-3)); flex: none; display: inline-block; }

.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.estado.ok { color: var(--ok); }
.estado.warn { color: var(--warn); }
.estado.err { color: var(--err); }

.filtro-chip {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--surface); color: var(--fg-2);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background-color .15s, border-color .15s, color .15s;
}
.filtro-chip:hover { border-color: var(--brand-solid); color: var(--brand); }
.filtro-chip.on { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.filtro-chip .n { font-size: 11px; opacity: .85; }

/* ============================ CONVERSAS ==================================== */
.col-head {
  min-height: 64px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--bd);
}
.col-title { font-weight: 700; font-size: 17px; }

.conv-lista {
  width: 360px; flex: none; background: var(--surface);
  border-right: 1px solid var(--bd); display: flex; flex-direction: column; min-height: 0;
}
.conv-lista .col-head { background: var(--bg); justify-content: space-between; }

/* seletor de número: o que muda a lista inteira fica em destaque */
.sel-numero { position: relative; }
.sel-numero > button {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--bd-strong); background: var(--surface);
  font-size: 12.5px; font-weight: 600;
}
.sel-numero > button:hover { background: var(--hover); }
.sel-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  width: 270px; background: var(--surface); border: 1px solid var(--bd);
  border-radius: 10px; box-shadow: var(--shadow-2); padding: 4px;
}
.sel-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: 7px; text-align: left;
}
.sel-menu button:hover { background: var(--hover); }
.sel-menu button.on { background: var(--brand-soft); }
.sel-menu .nome { font-size: 13px; font-weight: 600; }
.sel-menu .tel { font-size: 11.5px; color: var(--fg-3); }
.sel-menu .dir { margin-left: auto; }

.busca { padding: 10px 12px 6px; }
.busca .campo-ic { position: relative; }
.busca .campo-ic svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-3); }
.busca .campo { background: var(--bg); border-color: transparent; padding-left: 36px; height: 36px; }
.busca .campo:focus { background: var(--surface); }
.filtros { display: flex; gap: 6px; padding: 6px 12px 10px; overflow-x: auto; border-bottom: 1px solid var(--bd); scrollbar-width: none; }

.conv-itens { flex: 1; overflow-y: auto; }
.conv-item {
  display: flex; gap: 12px; padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--surface-2);
  transition: background-color .12s;
}
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--brand-soft); }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; align-items: baseline; gap: 8px; }
.conv-nome { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-hora { margin-left: auto; font-size: 11.5px; color: var(--fg-3); flex: none; }
.conv-item.nl .conv-hora { color: var(--brand); font-weight: 600; }
.conv-prev { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.conv-prev p { flex: 1; min-width: 0; font-size: 13px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item.nl .conv-prev p { color: var(--fg); font-weight: 500; }
.badge-nl {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand-solid); color: var(--on-brand);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.conv-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.num-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--fg-2); }
.espera { font-size: 11px; font-weight: 600; color: var(--warn); display: inline-flex; align-items: center; gap: 4px; }

/* ---- chat ---- */
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--chat-bg); }
.chat .col-head { background: var(--surface); }
.chat-quem { flex: 1; min-width: 0; }
.chat-quem b { font-size: 15px; display: block; }
.chat-quem span { font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
.atribuir {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--bd); background: var(--surface); font-size: 12.5px; font-weight: 600;
}
.atribuir:hover { background: var(--hover); }

.msgs { flex: 1; overflow-y: auto; padding: 18px 8%; display: flex; flex-direction: column; gap: 6px; }
.dia {
  align-self: center; margin: 10px 0 6px; padding: 4px 12px; border-radius: 8px;
  background: var(--surface); color: var(--fg-2); font-size: 11.5px; font-weight: 600; box-shadow: var(--shadow-1);
}
.bolha {
  max-width: min(520px, 72%); padding: 8px 12px 6px; border-radius: 12px;
  font-size: 14px; line-height: 1.45; box-shadow: var(--shadow-1); white-space: pre-wrap;
}
.bolha.in { align-self: flex-start; background: var(--bubble-in); color: var(--bubble-in-fg); border-top-left-radius: 4px; }
.bolha.out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-fg); border-top-right-radius: 4px; }
.bolha .rodape { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; opacity: .78; }
.bolha.out .rodape .lida { color: var(--tick-read); opacity: 1; }
.origem {
  align-self: flex-end; font-size: 11px; color: var(--fg-3); margin: -2px 4px 4px;
  display: inline-flex; align-items: center; gap: 4px;
}

.compositor { background: var(--surface); border-top: 1px solid var(--bd); padding: 10px 14px 12px; position: relative; }
.comp-linha { display: flex; align-items: flex-end; gap: 6px; }
.comp-linha textarea {
  flex: 1; min-height: 42px; max-height: 160px; resize: none;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--bd);
  background: var(--bg); outline: none; line-height: 1.45;
  transition: border-color .15s, background-color .15s;
}
.comp-linha textarea:focus { border-color: var(--brand-solid); background: var(--surface); }
.btn-enviar {
  width: 42px; height: 42px; border-radius: 10px; border: none;
  background: var(--brand-solid); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s;
}
.btn-enviar:hover { background: var(--brand-solid-hover); }
.comp-dica { font-size: 11.5px; color: var(--fg-3); margin-top: 6px; display: flex; gap: 14px; }
.comp-dica kbd {
  font-family: inherit; font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 4px;
  border: 1px solid var(--bd-strong); background: var(--surface-2); color: var(--fg-2);
}
.var-pendente { color: var(--warn); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }

/* popup de mensagens prontas no "/" */
.pop-prontas {
  position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); z-index: 15;
  background: var(--surface); border: 1px solid var(--bd); border-radius: 12px;
  box-shadow: var(--shadow-3); max-height: 360px; display: flex; flex-direction: column; overflow: hidden;
}
.pop-head { padding: 10px 14px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); }
.pop-head b { color: var(--fg); }
.pop-itens { overflow-y: auto; padding: 4px; }
.pop-item {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; width: 100%;
  border: none; background: none; text-align: left;
}
.pop-item:hover, .pop-item.sel { background: var(--brand-soft); }
.pop-item code {
  grid-row: span 2; align-self: start; margin-top: 1px;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--surface-2); border: 1px solid var(--bd); border-radius: 6px; padding: 1px 7px;
}
.pop-item b { font-size: 13px; }
.pop-item span { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-vazio { padding: 18px; text-align: center; color: var(--fg-3); font-size: 13px; }

/* ---- ficha do contato ---- */
.ficha { width: 310px; flex: none; background: var(--surface); border-left: 1px solid var(--bd); overflow-y: auto; }
.ficha-topo { padding: 20px 18px 16px; text-align: center; border-bottom: 1px solid var(--bd); }
.ficha-topo .av { width: 64px; height: 64px; font-size: 22px; margin: 0 auto 10px; }
.ficha-topo b { font-size: 16px; display: block; }
.ficha-topo span { font-size: 12.5px; color: var(--fg-2); }
.secao { padding: 14px 18px; border-bottom: 1px solid var(--bd); }
.secao h4 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-3); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.secao h4 button { border: none; background: none; color: var(--brand); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.etapas-mini { display: flex; gap: 3px; margin-bottom: 8px; }
.etapas-mini span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); }
.etapas-mini span.feito { background: var(--brand-solid); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dados { display: grid; grid-template-columns: 90px 1fr; gap: 8px 10px; font-size: 13px; }
.dados dt { color: var(--fg-3); }
.dados dd { font-weight: 500; overflow-wrap: anywhere; }
.nota { font-size: 13px; color: var(--fg-2); background: var(--warn-soft); border: 1px solid var(--warn-bd); border-radius: 8px; padding: 10px 12px; line-height: 1.45; }
.agenda-item { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--bd); }
.agenda-item svg { color: var(--brand); margin-top: 1px; }
.agenda-item b { display: block; font-size: 12.5px; }
.agenda-item span { color: var(--fg-2); }

/* ========================= MENSAGENS PRONTAS =============================== */
.pr-lista { width: 330px; flex: none; background: var(--surface); border-right: 1px solid var(--bd); display: flex; flex-direction: column; min-height: 0; }
.pr-lista .col-head { justify-content: space-between; background: var(--bg); }
.pr-itens { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.pr-cat { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-3); padding: 14px 16px 6px; }
.pr-item { display: block; width: 100%; border: none; background: none; text-align: left; padding: 10px 16px; border-left: 3px solid transparent; }
.pr-item:hover { background: var(--surface-2); }
.pr-item.active { background: var(--brand-soft); border-left-color: var(--brand-solid); }
.pr-item .l1 { display: flex; align-items: center; gap: 8px; }
.pr-item b { font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-item code { font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--brand); }
.pr-item p { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pr-item .usos { font-size: 11px; color: var(--fg-3); margin-top: 3px; display: flex; gap: 10px; align-items: center; }

.pr-editor { flex: 1; min-width: 0; overflow-y: auto; background: var(--surface); }
.pr-editor .col-head { justify-content: space-between; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.pr-form { padding: 20px 24px 32px; display: grid; grid-template-columns: 1fr 180px 190px; gap: 16px; max-width: 900px; }
.pr-form .span3 { grid-column: 1 / -1; }
.atalho-campo { position: relative; }
.atalho-campo span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--brand); font-weight: 600; }
.atalho-campo .campo { padding-left: 21px; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.var-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px; border-radius: 7px;
  border: 1px dashed var(--brand-soft-bd); background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600;
  transition: border-color .15s, background-color .15s;
}
.var-btn:hover { border-style: solid; border-color: var(--brand-solid); }
.anexo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--bd-strong); border-radius: 10px; color: var(--fg-2); font-size: 13px; }
.anexo .ic-box { width: 38px; height: 38px; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-3); gap: 2px; }
.seg button { border: none; background: none; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }

.pr-previa { width: 380px; flex: none; background: var(--chat-bg); border-left: 1px solid var(--bd); display: flex; flex-direction: column; min-height: 0; }
.pr-previa .col-head { background: var(--surface); flex-direction: column; align-items: stretch; gap: 6px; justify-content: center; }
.pr-previa .col-head label { font-size: 12px; color: var(--fg-2); font-weight: 600; }
.pr-previa .msgs { padding: 20px 18px; }
.pr-previa .bolha { max-width: 92%; }
.var-ok { background: rgba(255,255,255,.18); border-radius: 4px; padding: 0 2px; }
.var-falta { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.aviso {
  margin: 0 18px 18px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45;
  display: flex; gap: 10px; align-items: flex-start;
}
.aviso.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-bd); }
.aviso.info { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-bd); }
.aviso.err { background: var(--err-soft); color: var(--err); border: 1px solid var(--err-bd); }
.aviso.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-bd); }
.aviso svg { margin-top: 1px; }

/* ============================ PÁGINAS ====================================== */
.pagina { flex: 1; overflow-y: auto; }
.pag-cab {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 32px 18px; max-width: 1280px; margin: 0 auto;
}
.pag-cab h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.pag-cab p { font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.pag-cab .dir { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pag-corpo { padding: 0 32px 40px; max-width: 1280px; margin: 0 auto; }
.cartao { background: var(--surface); border: 1px solid var(--bd); border-radius: 14px; box-shadow: var(--shadow-1); }
.cartao-cab { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.cartao-cab h3 { font-size: 14.5px; font-weight: 600; }
.cartao-cab .dir { margin-left: auto; font-size: 12px; color: var(--fg-3); }

/* ---- números ---- */
.limite-plano { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--fg-2); }
.barra { display: inline-block; vertical-align: middle; width: 120px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--brand-solid); border-radius: 3px; }
.barra.warn i { background: var(--warn); }
.grade-num { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.num-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.num-card.caido { border-color: var(--err-bd); }
.num-cab { display: flex; gap: 12px; align-items: flex-start; }
.num-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--c-bg); color: var(--c); flex: none; }
.num-cab b { font-size: 15px; display: block; }
.num-cab .tel { font-size: 12.5px; color: var(--fg-2); }
.num-cab .estado { margin-left: auto; }
.num-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.num-stats div { background: var(--surface-2); border-radius: 9px; padding: 9px 10px; }
.num-stats b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-stats span { font-size: 11px; color: var(--fg-3); }
.teto { font-size: 12px; color: var(--fg-2); }
.teto .l { display: flex; justify-content: space-between; margin-bottom: 5px; }
.teto .barra { display: block; width: 100%; }
.num-equipe { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-2); }
.pilha { display: flex; }
.pilha .av { width: 26px; height: 26px; font-size: 10.5px; border: 2px solid var(--surface); margin-left: -6px; }
.pilha .av:first-child { margin-left: 0; }
.num-acoes { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--bd); padding-top: 12px; margin-top: auto; }
.num-novo {
  border: 2px dashed var(--bd-strong); border-radius: 14px; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 300px; color: var(--fg-2); text-align: center; padding: 24px;
  transition: border-color .15s, background-color .15s, color .15s;
}
.num-novo:hover { border-color: var(--brand-solid); background: var(--brand-soft); color: var(--brand); }
.num-novo b { font-size: 15px; color: var(--fg); }
.num-novo span { font-size: 12.5px; max-width: 240px; line-height: 1.5; }
.num-novo .circ { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }

/* ---- modal ---- */
.modal-fundo { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-3); }
.modal-cab { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--bd); }
.modal-cab h2 { font-size: 17px; font-weight: 600; }
.modal-cab .btn-ic { margin-left: auto; }
.passos { display: flex; gap: 6px; padding: 14px 22px 0; }
.passos span { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--fg-3); padding-top: 8px; border-top: 3px solid var(--surface-3); }
.passos span.on { color: var(--brand); border-top-color: var(--brand-solid); }
.passos span.feito { color: var(--fg-2); border-top-color: var(--brand-soft-bd); }
.modal-corpo { padding: 20px 22px 24px; }
.modal-pe { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--bd); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.qr-grade { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.qr-box { width: 250px; height: 250px; border-radius: 14px; border: 1px solid var(--bd); background: #fff; padding: 14px; position: relative; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box .qr-g { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 11px; border: 4px solid #fff; overflow: hidden; }
.qr-box .qr-g img { width: 100%; height: 100%; display: block; }
.qr-tempo { font-size: 12px; color: var(--fg-3); text-align: center; margin-top: 10px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.passo-a-passo { list-style: none; counter-reset: p; display: flex; flex-direction: column; gap: 14px; }
.passo-a-passo li { counter-increment: p; display: flex; gap: 12px; font-size: 13.5px; line-height: 1.5; }
.passo-a-passo li::before {
  content: counter(p); flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.codigo-par { display: flex; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.codigo-par span { width: 38px; height: 46px; border-radius: 8px; border: 1px solid var(--bd-strong); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.codigo-par i { width: 10px; align-self: center; height: 2px; background: var(--bd-strong); }
.sucesso { text-align: center; padding: 16px 0 6px; }
.sucesso .circ { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.sucesso h3 { font-size: 18px; margin-bottom: 6px; }
.sucesso p { color: var(--fg-2); font-size: 13.5px; max-width: 460px; margin: 0 auto; line-height: 1.55; }
.check-lista { display: flex; flex-direction: column; gap: 8px; }
.check-lista label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--bd); border-radius: 9px; font-size: 13px; cursor: pointer; }
.check-lista label:hover { background: var(--surface-2); }
.check-lista input { accent-color: var(--brand-solid); width: 16px; height: 16px; }
.cores { display: flex; gap: 8px; }
.cores button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; background: var(--c-bg); display: flex; align-items: center; justify-content: center; color: var(--c); }
.cores button.on { border-color: var(--c); }

/* ---- painel do gestor ---- */
.periodo { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-3); gap: 2px; }
.periodo button { border: none; background: none; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.periodo button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }
.alertas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alertas .aviso { margin: 0; align-items: center; }
.alertas .aviso .btn { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi span { font-size: 12px; color: var(--fg-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 4px; }
.kpi small.bom { color: var(--ok); }
.kpi small.ruim { color: var(--err); }
.duas { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 18px; }
.grafico { padding: 12px 18px 16px; position: relative; }
.grafico svg { width: 100%; height: 220px; display: block; overflow: visible; }
.grafico .grade line { stroke: var(--bd); stroke-width: 1; }
.grafico .eixo text { fill: var(--fg-3); font-size: 11px; font-family: inherit; }
.grafico .barra-g { fill: var(--brand-solid); pointer-events: none; }
.grafico .barra-g.hoje { fill: var(--brand); }
.grafico .alvo { fill: transparent; cursor: default; }
.grafico .alvo:hover + .barra-g, .grafico .barra-g.hover { fill: var(--brand-solid-hover); }
.dica {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--surface); border: 1px solid var(--bd); border-radius: 8px; box-shadow: var(--shadow-2);
  padding: 7px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%);
}
.dica b { display: block; font-size: 14px; }
.dica span { color: var(--fg-2); }
.funil { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.funil-l { display: grid; grid-template-columns: 128px 1fr 40px; gap: 10px; align-items: center; font-size: 12.5px; }
.funil-l .barra { display: block; width: 100%; height: 10px; border-radius: 5px; }
.funil-l .barra i { border-radius: 5px; }
.funil-l b { text-align: right; font-variant-numeric: tabular-nums; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; padding: 12px 18px 8px; border-bottom: 1px solid var(--bd); white-space: nowrap; }
.tabela td { padding: 11px 18px; border-bottom: 1px solid var(--surface-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela tr:last-child td { border-bottom: none; }
.tabela td.num, .tabela th.num { text-align: right; }
.tabela .quem { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tabela .quem .av { width: 30px; height: 30px; font-size: 11.5px; }
.tabela .quem small { display: block; font-weight: 400; color: var(--fg-3); font-size: 11.5px; }
.ruim-t { color: var(--err); font-weight: 600; }
.warn-t { color: var(--warn); font-weight: 600; }
.mini-barra { display: inline-flex; align-items: center; gap: 8px; }
.mini-barra .barra { width: 70px; }

/* ---- estreito: o layout de celular é a rodada 3; aqui só não quebrar ---- */
@media (max-width: 1280px) {
  .ficha { display: none; }
  .pr-previa { width: 320px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .duas { grid-template-columns: 1fr; }
}
