/* WRank Leads — paleta do jode.io, tipografia do wrank.com.br (Sora + Inter) */
:root {
  --deep: #0a1c3f;
  --deep-2: #112a57;
  --deep-line: rgba(255, 255, 255, .12);
  --on-deep: #eef3ff;
  --on-deep-soft: #a9b8db;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --ink: #121a2c;
  --ink-soft: #4b5672;
  --ink-mute: #5f6880; /* texto secundário: 5,6:1 no branco, 5,2:1 no fundo */
  --line: #dfe4ee;
  --line-soft: #edf0f6;
  --accent: #2c62d6;   /* sólido: branco em cima passa de 4,5:1 */
  --accent-ink: #1d4ed8;
  --accent-soft: #e6eeff;
  --accent-hi: #759ae8;
  --spark: #ff8a3d;
  --spark-soft: #fff1e7;
  --ok: #16a34a;
  --ok-ink: #0e7434;   /* 5,2:1 no verde-claro dos selos */
  --ok-soft: #e6f6ec;
  --err: #b42218;      /* sólido: 9:1 no vermelho-claro dos selos */
  --err-soft: #fdecea;
  --orange: rgb(138, 67, 16);

  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1640px; /* largura máxima do conteúdo: em tela grande, menos margem nas laterais */
  --shadow: 0 1px 2px rgba(10, 28, 63, .04), 0 2px 8px rgba(10, 28, 63, .04);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff; font: 700 15px/1 var(--font-display);
}
.brand__name { font: 600 16px/1 var(--font-display); white-space: nowrap; }
.brand__name em { font-style: normal; color: var(--accent); }
.brand--light { color: var(--on-deep); }
.brand--light .brand__name em { color: var(--accent-hi); }
.brand__logo { display: block; height: 38px; width: auto; flex: none; }
.brand__logo--lg { height: 64px; }
.brand__product {
  padding-left: 12px; border-left: 1px solid var(--line);
  font: 600 15px/1 var(--font-display); letter-spacing: .02em; color: var(--ink-soft); white-space: nowrap;
}
.brand--light .brand__product { border-left-color: var(--deep-line); color: var(--on-deep-soft); }
.brand__logo--lg + .brand__product { font-size: 18px; }
/* Login: o nome do relatório é comprido; quebra em duas linhas quando não cabe ao lado da logo */
.auth__brand .brand__product { white-space: normal; line-height: 1.3; min-width: 0; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-s); border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-mute); }
.btn--block { width: 100%; }
.btn--destroy { background: var(--err); color: #fff; }
.btn--destroy:hover { background: #8f1a12; }
.btn--destroy:disabled { opacity: .7; cursor: progress; }
.btn--sm { height: 34px; padding: 0 27px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: progress; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label, .ctl__label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
input[type=email], input[type=password], input[type=text], input[type=search], input[type=date], select, textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234b5672' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  text-overflow: ellipsis;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--ink-mute); }
.hint.is-bad { color: var(--err); }
.hint.is-good { color: var(--ok-ink); }
.notice { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.lead-text { margin: -4px 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.lead-text strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.forgot { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px; margin: 16px 0 0; font-size: 13.5px; color: var(--ink-mute); }
.forgot a { color: var(--accent-ink); }
.code-input { font: 600 22px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .3em; text-align: center; padding-left: .3em; }
.code-input::placeholder { color: var(--line); }
.alert { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-s); background: var(--err-soft); color: var(--err); font-size: 14px; }

.pw { position: relative; display: block; }
.pw input { padding-right: 84px; }
.pw__toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-soft); font-size: 13px; font-weight: 500; cursor: pointer;
}
.pw__toggle:hover { background: var(--line-soft); }

/* ---------- Login ---------- */
/* Celular: faixa azul da marca no topo + cartão do formulário subindo sobre ela.
   Computador (≥900px): painel azul à esquerda e formulário à direita. */
body.auth { background: var(--deep); }
.auth__wrap { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
.auth__brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: max(28px, env(safe-area-inset-top)) var(--gutter) 34px;
  padding-inline: max(var(--gutter), calc((100% - 440px) / 2));
  background: var(--deep); color: var(--on-deep);
}
.auth__brand > * { position: relative; z-index: 1; }

/* Elementos decorativos no estilo do wrank.com.br: anel amarelo, bolinhas, grade de pontos,
   "+" flutuando, quadrado vazado e brilho suave. Só decoração (aria-hidden). */
:root { --wr-yellow: #f6be13; }
.deco { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.deco span { position: absolute; display: block; }
.deco__glow { border-radius: 50%; background: radial-gradient(closest-side, rgba(92, 70, 255, .38), rgba(44, 98, 214, .12) 55%, transparent); }
.deco__ring { border-radius: 50%; border: 26px solid var(--wr-yellow); opacity: .95; animation: ld-float 7s ease-in-out infinite; }
.deco__grid { opacity: .55; background-image: radial-gradient(#fff 1.6px, transparent 1.8px); background-size: 13px 13px; }
.deco .deco__dots { display: flex; gap: 8px; }
.deco__dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--wr-yellow); animation: ld-blink 2.4s ease-in-out infinite; }
.deco__dots i:nth-child(2) { animation-delay: .15s; }
.deco__dots i:nth-child(3) { animation-delay: .3s; }
.deco__dots i:nth-child(4) { animation-delay: .45s; }
.deco__dots i:nth-child(5) { animation-delay: .6s; }
.deco__plus { width: 16px; height: 16px; opacity: .8; animation: ld-float 5s ease-in-out infinite; }
.deco__plus::before, .deco__plus::after { content: ""; position: absolute; background: #fff; border-radius: 2px; }
.deco__plus::before { left: 7px; top: 0; width: 2.5px; height: 16px; }
.deco__plus::after { top: 7px; left: 0; width: 16px; height: 2.5px; }
.deco__plus--b { animation-delay: -2.5s; opacity: .55; }
.deco__square { border: 1.5px solid rgba(255,255,255,.22); border-radius: 4px; transform: rotate(12deg); }
@media (max-width: 599px) { /* em tela estreita, só o que não briga com o texto */
  .deco__grid, .deco__plus--b, .deco__square { display: none !important; }
}

/* Posições no login (celular) */
.auth__brand .deco__glow { width: 520px; height: 520px; left: -160px; top: -200px; }
.auth__brand .deco__ring { width: 150px; height: 150px; right: -52px; top: -40px; }
.auth__brand .deco__grid { width: 64px; height: 64px; right: 70px; top: 96px; }
.auth__brand .deco__dots { right: 18px; bottom: 46px; }
.auth__brand .deco__plus--a { right: 118px; top: 12px; }
.auth__brand .deco__plus--b { left: 62%; bottom: 70px; }
.auth__brand .deco__square { width: 90px; height: 90px; left: -46px; bottom: 26px; }

@keyframes ld-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ld-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ld-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Entrada suave, em sequência, como no site */
.auth__brand .brand { animation: ld-rise .7s .05s both; }
.auth__pitch { animation: ld-rise .7s .15s both; }
.auth__facts li { animation: ld-rise .6s both; }
.auth__facts li:nth-child(1) { animation-delay: .25s; }
.auth__facts li:nth-child(2) { animation-delay: .32s; }
.auth__facts li:nth-child(3) { animation-delay: .39s; }
.auth__card > * { animation: ld-rise .6s .2s both; }

/* Botão principal com brilho passando ao passar o mouse (login e painel) */
.btn--primary { position: relative; overflow: hidden; transition: background .15s, transform .15s, box-shadow .15s; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(44, 98, 214, .3); }
.btn--primary:hover::after { animation: ld-sheen .8s ease; }
@keyframes ld-sheen { to { left: 130%; } }
.auth__brand .brand__logo--lg { height: 46px; }
.auth__pitch { margin: 6px 0 0; max-width: 20ch; font: 600 22px/1.25 var(--font-display); letter-spacing: -.01em; }
.auth__facts { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--on-deep-soft); font-size: 13px; }
.auth__facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--spark); vertical-align: middle; }
.auth__card {
  position: relative; width: 100%;
  padding: 26px var(--gutter) max(40px, env(safe-area-inset-bottom));
  padding-inline: max(var(--gutter), calc((100% - 440px) / 2));
  background: var(--paper);
}
.auth__card h1 { font-size: 26px; margin: 0 0 18px; }
.brand--compact { display: none; }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: -6px 0 18px; color: var(--ink-soft); font-size: 14px; }
.who span { overflow-wrap: anywhere; font-weight: 500; color: var(--ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 600;
}
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s; display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-mute);
}
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 11px; font-weight: 600;
}
.steps li + li::before { margin-left: 10px; }
.steps li.is-current { color: var(--ink); font-weight: 500; }
.steps li.is-current::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.is-done::before { content: "✓"; background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }

@media (min-width: 900px) {
  body.auth { background: var(--paper); }
  .auth__wrap { grid-template-columns: minmax(360px, 5fr) 7fr; grid-template-rows: none; }
  .auth__brand { justify-content: center; gap: 24px; padding: 56px clamp(56px, 6vw, 96px) 56px clamp(40px, 5vw, 80px); }
  .auth__brand .deco__glow { width: 760px; height: 760px; left: -260px; top: -180px; }
  .auth__brand .deco__ring { width: 240px; height: 240px; right: -110px; top: auto; bottom: -100px; border-width: 40px; }
  .auth__brand .deco__grid { width: 92px; height: 92px; right: 44px; top: 40px; bottom: auto; }
  .auth__brand .deco__dots { right: auto; left: clamp(40px, 5vw, 80px); bottom: auto; top: 48px; }
  .auth__brand .deco__plus--a { right: auto; left: 46%; top: 10%; }
  .auth__brand .deco__plus--b { left: 16%; bottom: 12%; }
  .auth__brand .deco__square { width: 130px; height: 130px; left: -70px; bottom: 28px; top: auto; }
  .auth__brand .brand__logo--lg { height: 64px; }
  .auth__pitch { margin: 0; max-width: 18ch; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; }
  .auth__facts { display: grid; gap: 10px; font-size: 14.5px; }
  .auth__card { max-width: 440px; margin: auto; padding: 40px var(--gutter); background: none; border-radius: 0; box-shadow: none; }
}

/* ---------- Barra superior ---------- */
/* fica presa no topo ao rolar; a sombra só aparece depois que a página saiu do lugar (.is-stuck, via JS) */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--deep); color: var(--on-deep); transition: box-shadow .2s; }
/* WRank dentro da conta do cliente (senha de administrador) */
.viabar { margin: 0; padding: 6px var(--gutter); background: var(--spark); color: #2a1404; font-size: 13px; font-weight: 600; text-align: center; }
.topbar.is-stuck { box-shadow: 0 6px 20px rgba(10, 28, 63, .28); }
html { scroll-padding-top: 120px; } /* o que rola até um ponto (ex.: lista de leads) não fica escondido atrás do menu */
@media (min-width: 960px) { html { scroll-padding-top: 80px; } }
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand account" "nav nav";
  align-items: center; column-gap: 24px;
}
.topbar .brand { grid-area: brand; height: 60px; }
.nav { grid-area: nav; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; }
.nav::-webkit-scrollbar { display: none; }
.nav__link {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 2px; color: var(--on-deep-soft);
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.nav__link:hover { color: var(--on-deep); background: rgba(255,255,255,.06); }
.nav__link.is-active { color: #fff; background: rgba(255,255,255,.1); }
.account { grid-area: account; justify-self: end; display: flex; align-items: center; gap: 12px; min-width: 0; }
.account__email { display: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--on-deep-soft); font-size: 13.5px; }
.account form { margin: 0; }
.account__out {
  height: 34px; padding: 0 12px; border: 1px solid var(--deep-line); border-radius: 5px;
  background: transparent; color: var(--on-deep); font-size: 13.5px; cursor: pointer;
}
.account__out:hover { background: rgba(255,255,255,.08); }
@media (min-width: 640px) { .account__email { display: block; } }
/* Menu de site (cliente com mais de um site), no lugar do e-mail */
.sitesw { position: relative; display: flex; min-width: 0; }
.sitesw__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: min(260px, 46vw); padding: 0 10px 0 11px;
  border: 1px solid var(--deep-line); border-radius: 5px; background: rgba(255,255,255,.06);
  color: var(--on-deep); font: 500 13.5px var(--font-body); cursor: pointer; transition: background .15s, border-color .15s;
}
.sitesw__btn > svg { flex: none; color: var(--on-deep-soft); }
.sitesw__btn:hover, .sitesw__btn[aria-expanded="true"] { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.sitesw__btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.sitesw__btn.is-busy { opacity: .7; cursor: progress; }
.sitesw__cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitesw__chev { transition: transform .18s; }
.sitesw__btn[aria-expanded="true"] .sitesw__chev { transform: rotate(180deg); }
.sitesw__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 300px; max-width: calc(100vw - 24px); padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(10, 28, 63, .2), 0 2px 6px rgba(10, 28, 63, .08);
  transform-origin: top right; animation: sitesw-in .14s ease-out;
}
.sitesw__menu[hidden] { display: none; }
@keyframes sitesw-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.sitesw__head { margin: 6px 10px 6px; color: var(--ink-mute); font: 600 11px var(--font-body); letter-spacing: .07em; text-transform: uppercase; }
.sitesw__item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; margin: 0;
  border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer;
}
.sitesw__item:hover { background: var(--paper); }
.sitesw__item:focus-visible { outline: none; background: var(--paper); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.sitesw__item.is-current { background: var(--accent-soft); cursor: default; }
.sitesw__avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; font: 600 14px var(--font-display); }
.sitesw__avatar--0 { background: var(--accent-soft); color: var(--accent-ink); }
.sitesw__avatar--1 { background: #f1eafe; color: #5b21b6; }
.sitesw__avatar--2 { background: #e0f4f9; color: #0e6178; }
.sitesw__avatar--3 { background: var(--spark-soft); color: #8a4310; }
.sitesw__item.is-current .sitesw__avatar { background: var(--accent); color: #fff; }
.sitesw__text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.sitesw__name, .sitesw__dom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitesw__name { font-weight: 600; font-size: 14px; }
.sitesw__dom { color: var(--ink-mute); font-size: 12.5px; }
.sitesw__check { flex: none; color: var(--accent-ink); }
.sitesw__foot { margin: 6px 0 0; padding: 9px 10px 5px; border-top: 1px solid var(--line-soft); color: var(--ink-mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitesw__foot b { color: var(--ink-soft); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .sitesw__menu { animation: none; } .sitesw__chev { transition: none; } }

/* Tela "Escolha o site" */
.sitepick__intro { margin: 0 0 18px; color: var(--ink-soft); font-size: 14.5px; }
.sitepick { display: grid; gap: 10px; margin: 0; }
.sitepick__item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink);
  font: inherit; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sitepick__item:hover { border-color: var(--accent-hi); box-shadow: 0 4px 14px rgba(10, 28, 63, .08); transform: translateY(-1px); }
.sitepick__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sitepick__item.is-current { border-color: var(--accent); }
.sitepick__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.sitepick__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sitepick__name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.sitepick__domain { color: var(--ink-mute); font-size: 13px; overflow-wrap: anywhere; }
.sitepick__go { flex: none; color: var(--ink-mute); }
.sitepick__item:hover .sitepick__go { color: var(--accent-ink); }
.sitepick__out { margin: 18px 0 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .sitepick__item { transition: none; } .sitepick__item:hover { transform: none; } }
@media (min-width: 960px) {
  .topbar__inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav account"; height: 64px; }
  .topbar .brand { height: auto; }
  .nav { margin: 0; padding: 0; }
  .nav__link { border: 1px solid var(--deep); }
  .nav__link:hover { border-color: rgba(68, 116, 219, .6); }
}

/* ---------- Página ---------- */
.page { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 64px; }
.page__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.page__head h1 { font-size: clamp(24px, 3.2vw, 32px); }
.page__meta { margin: 0; font-size: 13px; color: var(--ink-mute); }
.hero .page__meta:not(:empty) { padding: 4px 10px; border-radius: 999px; background: rgba(10, 28, 63, .82); position: relative; z-index: 1; }
.page__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; min-width: 0; }
.hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 5px; background: var(--deep-2);
  color: #fff; font: 500 13.5px/1 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s; animation: ld-rise .6s .16s both;
}
.hbtn:hover { background: #1a3772; border-color: rgba(255, 255, 255, .4); }
.hbtn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.hbtn--solid { background: #fff; border-color: #fff; color: var(--deep); font-weight: 600; }
.hbtn--solid:hover { background: var(--accent-soft); border-color: var(--accent-soft); transform: translateY(-1px); }
.hbtn[hidden] { display: none; }
.hbtn[disabled] { cursor: progress; opacity: .8; }
.hbtn.is-busy svg, .btn--ai.is-busy svg { animation: ld-spin .9s linear infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
@media (max-width: 599px) {
  .page__side { width: 100%; justify-content: flex-start; }
  .page__side .page__meta { flex: 1 0 100%; }
  .hbtn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
}

/* Faixa de topo no estilo do wrank.com.br: azul-marinho com decoração */
.hero { position: relative; overflow: hidden; background: var(--deep); color: var(--on-deep); padding: 18px 0 44px; }
.hero__inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); flex-direction: column; align-items: flex-start; gap: 4px; }
/* Título à esquerda; data da atualização e botões na ponta direita */
.hero .page__head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.hero h1 { color: #fff; animation: ld-rise .6s .05s both; }
.hero .page__meta { color: var(--on-deep-soft); animation: ld-rise .6s .12s both; }
.hero--overlap { padding-bottom: 104px; }
.hero--overlap + .page { margin-top: -78px; padding-top: 0; }
.hero .deco__ring { width: 180px; height: 180px; right: -76px; top: 10px; border-width: 30px; }
.hero .deco__grid { width: 66px; height: 66px; left: 37%; top: 14px; }
.hero .deco__dots { left: 50%; top: 54px; }
@media (min-width: 600px) and (max-width: 1179px) { .hero .deco__grid, .hero .deco__dots { display: none; } } /* abre espaço para a data e os botões */
.hero .deco__plus--a { left: 46%; top: 12px; }
.hero .deco__plus--b { left: 62%; top: 64px; }
@media (max-width: 599px) {
  .hero .deco__ring { width: 112px; height: 112px; right: -52px; top: 12px; border-width: 20px; }
  .hero .deco__dots { left: auto; right: 74px; top: 16px; }
  .hero .deco__plus--a { display: none; }
}

/* Entrada em sequência das seções do painel */
.page > * { animation: ld-rise .6s both; }
.page > :nth-child(1) { animation-delay: .1s; }
.page > :nth-child(2) { animation-delay: .16s; }
.page > :nth-child(3) { animation-delay: .22s; }
.page > :nth-child(4) { animation-delay: .28s; }
.page > :nth-child(5) { animation-delay: .34s; }
.page > :nth-child(n+6) { animation-delay: .4s; }
.cards .card { animation: ld-rise .6s both; }
.cards .card:nth-child(1) { animation-delay: .2s; }
.cards .card:nth-child(2) { animation-delay: .28s; }
.cards .card:nth-child(3) { animation-delay: .36s; }

/* ---------- Filtros ---------- */
.filters {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.ctl { display: grid; gap: 6px; min-width: 0; align-content: start; }
.ctl__hint { font-size: 12.5px; color: var(--ink-mute); }
.range { display: flex; align-items: center; gap: 6px; min-width: 0; }
.range input { flex: 1 1 0; min-width: 0; }
.range__sep { color: var(--ink-mute); }
@media (min-width: 640px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .filters { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .ctl--range { grid-column: span 2; }
}
.period-line { margin: 20px 2px 20px; font-size: 13.5px; color: var(--ink-soft); }
.period-line strong { color: var(--ink); font-weight: 600; }
.filterbar .period-line { margin: 16px 2px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.card {
  position: relative; overflow: hidden; padding: 18px 20px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); min-width: 0;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card > * { position: relative; z-index: 1; }
.card::after { /* círculo decorativo no canto, na cor do card */
  content: ""; position: absolute; right: -46px; bottom: -64px; width: 150px; height: 150px; border-radius: 50%;
  background: var(--accent-soft); opacity: .7; transition: transform .35s ease;
}
.card--qualified::after { background: var(--ok-soft); }
.card--disqualified::after { background: var(--err-soft); }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10, 28, 63, .10); border-color: #cfd7e6; }
/* Cards funcionam como filtro da lista de leads */
.card[data-status-card] { cursor: pointer; user-select: none; }
.card[data-status-card]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card[data-status-card]:active { transform: translateY(-1px) scale(.99); }
.card--total.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 30px rgba(44, 98, 214, .14); }
.card--total.is-active::after { transform: scale(1.18); opacity: 1; }
.card--qualified.is-active { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok), 0 14px 30px rgba(31, 187, 88, 0.171); }
.card--disqualified.is-active { border-color: var(--err); box-shadow: 0 0 0 1px var(--err), 0 14px 30px rgba(180, 35, 24, .12); }
.card--qualified.is-active::after, .card--disqualified.is-active::after { transform: scale(1.18); opacity: 1; }
.cards:has(.card--qualified.is-active, .card--disqualified.is-active) .card:not(.is-active) { opacity: .72; }
.cards:has(.card--qualified.is-active, .card--disqualified.is-active) .card:not(.is-active):hover { opacity: 1; }
/* Admin, visão geral: clientes que precisam de atenção */
.attn__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.attn__item a {
  display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s;
}
.attn__item a:hover { border-color: var(--accent-hi); }
.attn__item b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.attn__item span { flex: none; margin-left: auto; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.attn__more { margin-top: 10px; }
.attn__item--err a { border-color: #f1c4c0; background: var(--err-soft); }
.attn__item--err span { color: #8f1c14; }

/* Filtro por cidade: faixa de etiquetas numa linha só, rolando para o lado */
.leads-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
/* Busca e cidades na mesma "caixa": quando as cidades passam para a linha de baixo, começam embaixo da busca
   (a lista usa display: contents, então cada cidade é item direto desta linha) */
.cityrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 20px; min-width: 0; }
.cityrow__search {
  flex: 0 0 190px; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-mute);
  transition: border-color .15s, box-shadow .15s;
}
.cityrow__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cityrow__search svg { flex: none; }
.cityrow__search input { height: 34px; padding: 0; border: 0; background: none; box-shadow: none !important; font-size: 13.5px; }
.cityrow__track { display: contents; }
.citychip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 6px 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.citychip b {
  min-width: 24px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-soft); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.citychip:hover { border-color: var(--accent-hi); transform: translateY(-1px); }
.citychip.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.citychip.is-on b { background: rgba(10, 28, 63, .28); color: #fff; }
.citychip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.citymore {
  flex: 0 0 auto; height: 34px; padding: 0 14px; border: 1px dashed var(--accent-hi); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.citymore:hover { border-style: solid; border-color: var(--accent); }
.citymore:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Faixa de etiquetas, logo abaixo da de cidades (mesmo visual, com a bolinha da cor de cada etiqueta) */
.cityrow + .stagerow { margin-top: -10px; }
.cityrow[hidden] + .stagerow { margin-top: -4px; }
.stagerow .citychip .sdot { margin-right: -2px; }
.stagerow .citychip.is-on .sdot { box-shadow: 0 0 0 2px #fff; }
.cityrow__empty { align-self: center; padding: 0 6px; font-size: 13.5px; color: var(--ink-mute); white-space: nowrap; }
@media (max-width: 599px) {
  .cityrow__search { flex: 1 1 100%; } /* no celular a busca fica sozinha na primeira linha */
}
.filter-chip {
  height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-soft); font-size: 13px; font-weight: 500; cursor: pointer;
}
.filter-chip:hover { border-color: var(--ink-mute); color: var(--ink); }
.card:hover::after { transform: scale(1.12); }
.filters { box-shadow: 0 10px 30px rgba(10, 28, 63, .10); }
/* Leads e clientes aparecem em cascata sempre que a lista é carregada */
.leads > .lead, .minis__grid > .mini, .sites > .site { animation: ld-rise .45s both; }
.leads > :nth-child(2), .minis__grid > :nth-child(2), .sites > :nth-child(2) { animation-delay: .04s; }
.leads > :nth-child(3), .minis__grid > :nth-child(3), .sites > :nth-child(3) { animation-delay: .08s; }
.leads > :nth-child(4), .minis__grid > :nth-child(4), .sites > :nth-child(4) { animation-delay: .12s; }
.leads > :nth-child(5), .minis__grid > :nth-child(5), .sites > :nth-child(5) { animation-delay: .16s; }
.leads > :nth-child(6), .minis__grid > :nth-child(6), .sites > :nth-child(6) { animation-delay: .2s; }
.leads > :nth-child(n+7), .minis__grid > :nth-child(n+7), .sites > :nth-child(n+7) { animation-delay: .24s; }
.lead:hover { border-color: #c9d3e6; }
.card__label { display: flex; align-items: center; gap: 8px; font: 500 14px/1.3 var(--font-body); color: var(--ink-soft); letter-spacing: 0; }
.card__label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.card--qualified .card__label::before { background: var(--ok); }
.card--disqualified .card__label::before { background: var(--err); }
.card__value { margin: 10px 0 8px; font: 600 clamp(30px, 4vw, 38px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.card__cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; min-height: 24px; font-size: 13px; color: var(--ink-mute); }
.card__note { font-size: 12.5px; color: var(--ink-mute); }
.delta {
  display: inline-flex; flex: none; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--line-soft); color: var(--ink-soft);
}
.delta--up { background: var(--ok-soft); color: var(--ok-ink); }
.delta--down { background: var(--err-soft); color: var(--err); }
.card--disqualified .delta--up { background: var(--err-soft); color: var(--err); }   /* mais desqualificados é ruim */
.card--disqualified .delta--down { background: var(--ok-soft); color: var(--ok-ink); }
.delta--new { background: var(--accent-soft); color: var(--accent-ink); }
.delta[title] { cursor: help; }
.is-loading .card__value, .is-loading .mini__value { color: transparent; background: var(--line-soft); border-radius: 6px; width: 3.2ch; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Painéis ---------- */
.panel {
  margin-bottom: 24px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); min-width: 0;
}
.panel--flat { padding: 0; background: none; border: 0; box-shadow: none; }
.panel.narrow { max-width: 560px; }
.panel h2 { font-size: 17px; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.panel__note { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.panel.narrow .panel__note { margin: 6px 0 18px; }
/* Configurações do admin, tela larga: conta Google e administradores lado a lado, com a mesma altura.
   Linha 1: aviso (quando houver). Linha 2: os dois cards, esticados à mesma altura. Com um formulário aberto
   (.is-growing), o card de administradores ocupa também a linha 3 (1fr) e cresce sozinho para baixo. */
@media (min-width: 960px) {
  body[data-page="admin_config"] .page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; column-gap: 24px; row-gap: 0; }
  body[data-page="admin_config"] .page > .panel { display: flex; flex-direction: column; grid-row: 2; margin-bottom: 0; }
  body[data-page="admin_config"] .page > .flash { grid-column: 1 / -1; grid-row: 1; margin-bottom: 24px; }
  body[data-page="admin_config"] .page > .admins.is-growing { grid-row: 2 / span 2; }
  /* Conta Google: dados um embaixo do outro, botão azul na largura toda embaixo e os outros dois acima dele */
  body[data-page="admin_config"] .gacct__facts { grid-template-columns: 1fr; gap: 14px; }
  body[data-page="admin_config"] .gacct__actions { margin-top: auto; padding-top: 18px; }
  body[data-page="admin_config"] .gacct__actions .btn { flex: 1 1 0; justify-content: center; }
  body[data-page="admin_config"] .gacct__actions .btn--primary { flex-basis: 100%; order: 2; }
  /* Administradores na coluna: cada pessoa com as informações empilhadas */
  body[data-page="admin_config"] .admins__head > div { flex-basis: 100%; }
  body[data-page="admin_config"] .admins__head > .btn { width: 100%; justify-content: center; }
  body[data-page="admin_config"] .admins__add { grid-template-columns: 1fr; }
  body[data-page="admin_config"] .admins__item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body[data-page="admin_config"] .admins__actions { justify-content: flex-start; }
}
/* Configurações: administradores do painel */
.admins { max-width: none; }
.admins__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.admins__head > div { flex: 1 1 420px; min-width: 0; }
.admins__head .panel__note { margin-top: 4px; max-width: 72ch; }
.admins__head .count { font-weight: 500; color: var(--ink-mute); font-size: 15px; }
.admins__add {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 12px 16px;
  margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper);
}
.admins__add .field { margin: 0; }
.field__opt { font-weight: 400; color: var(--ink-mute); }
.admins__add-actions { display: flex; gap: 8px; }
.admins__add-hint { grid-column: 1 / -1; margin: 0; }
.admins__list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.admins__item {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 300px; align-items: center; gap: 8px 24px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.admins__item:last-child { border-bottom: 0; padding-bottom: 0; }
.admins__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admins__email { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.admins__you { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.admins__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; color: var(--ink-soft); }
.admins__status { display: inline-flex; align-items: center; gap: 7px; }
.admins__status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c58a12; }
.admins__status.is-on { color: var(--ok-ink); font-weight: 600; }
.admins__status.is-on::before { background: var(--ok); }
.admins__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.admins__actions .btn { white-space: nowrap; }
.admins__pw { grid-column: 1 / -1; margin: 6px 0 0; }
.admins__loading { padding: 14px 0; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 799px) {
  .admins__add { grid-template-columns: 1fr; }
  .admins__item { grid-template-columns: minmax(0, 1fr); }
  .admins__actions { justify-content: flex-start; }
}
@media (max-width: 559px) {
  .admins__head .btn, .admins__add-actions .btn { flex: 1 1 auto; justify-content: center; }
  .admins__head > .btn { width: 100%; }
}
/* Configurações: conta Google do Search Console */
.gacct { max-width: 1144px; }
.gacct__head { display: flex; align-items: flex-start; gap: 14px; }
.gacct__logo {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.gacct__intro { flex: 1 1 0; min-width: 0; }
.gacct__intro .panel__note { margin-top: 4px; max-width: 62ch; }
.gacct__state {
  flex: none; display: inline-flex; align-items: center; gap: 7px; margin-top: 2px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.gacct__state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); }
.gacct__state.is-on { color: var(--ok-ink); }
.gacct__state.is-on::before { background: var(--ok); }
.gacct__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px;
  margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line);
}
.gacct__facts dt { font-size: 12.5px; color: var(--ink-soft); }
.gacct__facts dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.gacct__err { margin: 16px 0 0; }
.gacct__empty { margin: 16px 0 0; font-size: 14px; color: var(--ink-soft); }
.gacct__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 559px) {
  .gacct__head { flex-wrap: wrap; }
  .gacct__state { order: -1; width: 100%; margin: 0 0 2px; }
  .gacct__actions .btn { flex: 1 1 auto; justify-content: center; }
}
/* Clientes: título com a quantidade de clientes no painel */
.sites-intro { display: grid; gap: 4px; min-width: 0; }
.sites-intro h2 { margin: 0; }
.sites-tools { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sites-tools .search { min-width: 0; }
.sites-count:not(:empty) { flex: none; white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font: 600 12.5px/1.5 var(--font-body); font-variant-numeric: tabular-nums; }
.count { font: 500 14px var(--font-body); color: var(--ink-mute); margin-left: 4px; }

/* ---------- Gráficos ---------- */
.chart { position: relative; height: 260px; min-width: 0; }
@media (max-width: 640px) { .chart { height: 200px; } }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line-soft); }
.chart .axis text { fill: var(--ink-mute); font-size: 11px; font-family: var(--font-body); }
.chart .line-cur { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .area-cur { fill: var(--accent); opacity: .07; }
.chart .line-cmp { fill: none; stroke: var(--ink-mute); stroke-width: 1.75; stroke-dasharray: 5 4; stroke-linejoin: round; opacity: .8; }
.chart .hover-line { stroke: var(--ink-mute); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .dot--cmp { stroke: var(--ink-mute); }
.tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 150px; padding: 8px 10px;
  background: var(--deep); color: var(--on-deep); border-radius: 8px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(10, 28, 63, .2); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
}
.tip b { font-weight: 600; color: #fff; }
.tip .k { display: inline-block; width: 8px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--accent-hi); }
.tip .k--cmp { background: var(--ink-mute); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-soft); }
.legend span::before { content: ""; display: inline-block; width: 16px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--accent); }
.legend .is-cmp::before { border-top: 2px dashed var(--ink-mute); }

.minis { display: grid; gap: 22px; }
.minis__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.mgroup__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 15px/1.3 var(--font-display); }
.mgroup__title i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-style: normal; font-size: 13px; }
.mgroup__title span { font: 400 13px var(--font-body); color: var(--ink-mute); }
.mgroup--up .mgroup__title i { background: var(--ok-soft); color: var(--ok-ink); }
.mgroup--down .mgroup__title i { background: var(--err-soft); color: var(--err); }
.mgroup--flat .mgroup__title i { background: var(--line-soft); color: var(--ink-soft); }
.mini {
  display: grid; gap: 4px; padding: 14px 16px 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); text-decoration: none; color: inherit; min-width: 0; transition: border-color .15s, transform .15s;
}
.mini:hover { border-color: var(--accent-hi); transform: translateY(-1px); }
.mini { grid-template-columns: minmax(0, 1fr); } /* nome comprido não empurra o badge para fora do card */
.mini__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.mini__name { flex: 1 1 auto; min-width: 0; font: 600 14.5px/1.3 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini.is-empty { background: var(--paper); }
.mini.is-empty .mini__value { color: var(--ink-mute); }
.mini__domain { font-size: 12px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__nums { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mini__value { font: 600 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.mini__q { font-size: 12.5px; color: var(--ink-mute); }
.mini .chart { height: 56px; margin-top: 6px; }
/* Comparativo por cliente em "Ambos": dois números lado a lado e duas linhas (impressões roxo, cliques azul) */
.mini__nums--both { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.mini__pair { display: grid; justify-items: start; gap: 2px; min-width: 0; padding-left: 8px; border-left: 3px solid var(--pc); }
.mini__pair--impressions { --pc: #6d4ed8; }
.mini__pair--clicks { --pc: #2c62d6; }
.mini__pair small { font-size: 11.5px; font-weight: 600; color: var(--ink-mute); }
.mini__pair .mini__value { font-size: 19px; }
.mini__pair .delta { font-size: 11.5px; padding: 1px 7px; }
.mini--both .chart .line-cur { stroke: #6d4ed8; }
.mini--both .chart .area-cur { fill: #6d4ed8; }
.mini--both .chart .line-cmp { stroke: #2c62d6; stroke-dasharray: none; stroke-width: 1.75; }
/* valor do dia ao passar o mouse no gráfico do card (fica por cima dos cards vizinhos) */
.mini { position: relative; }
.mini:hover { z-index: 3; }
.mini .tip { font-size: 12px; min-width: 130px; }
.mini--both .chart .dot { stroke: #6d4ed8; }
.mini--both .chart .dot--cmp { stroke: #2c62d6; }
.mini--both .tip .k { background: #b9a6f5; }
.mini--both .tip .k--cmp { background: #8fb0f0; }
.mini .chart .line-cur { stroke-width: 1.75; }
/* Comparativo por cliente no celular: card baixo — nome e variação em cima, números à esquerda e gráfico pequeno à direita */
@media (max-width: 559px) {
  [data-gsc-minis] .minis__grid { gap: 15px; }
  [data-gsc-minis] .mini {
    grid-template-columns: minmax(0, 1fr) 92px; grid-template-areas: "top top" "domain chart" "nums chart";
    align-items: center; column-gap: 12px; row-gap: 0; padding: 10px 12px;
  }
  [data-gsc-minis] .mini__top { grid-area: top; }
  [data-gsc-minis] .mini__domain { grid-area: domain; align-self: start; }
  [data-gsc-minis] .mini__nums { grid-area: nums; margin-top: 4px; flex-direction: column; align-items: flex-start; gap: 2px; }
  [data-gsc-minis] .mini__nums--both { flex-direction: row; }
  [data-gsc-minis] .mini__value { font-size: 19px; }
  [data-gsc-minis] .mini__q { font-size: 11.5px; }
  [data-gsc-minis] .mini .chart { grid-area: chart; height: 44px; margin-top: 4px; }
  [data-gsc-minis] .mini__nums--both { gap: 6px; }
  [data-gsc-minis] .mini__pair { padding-left: 6px; }
  [data-gsc-minis] .mini__pair .mini__value { font-size: 16px; }
  [data-gsc-minis] .mini__pair .delta { font-size: 11px; padding: 0 6px; }
  [data-gsc-minis] .mgroup__title { margin-bottom: 8px; }
}
.empty { padding: 28px 16px; text-align: center; color: var(--ink-mute); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r-m); background: var(--surface); }

/* ---------- Lista de leads ---------- */
.seg { display: inline-flex; padding: 3px; background: var(--line-soft); border-radius: 10px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button {
  flex: 0 0 auto; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-soft); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(10,28,63,.08); }

.leads { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; overflow-anchor: none; }
.minis, .sites, .cards { overflow-anchor: none; } /* listas redesenhadas não devem mexer na rolagem */
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); min-width: 0; transition: border-color .15s; }
.lead.is-open { border-color: var(--accent-hi); }
.lead__head {
  display: grid; align-items: center; gap: 4px 12px; padding: 12px 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "sel who act" "sel meta toggle";
  cursor: pointer;
}
/* Bolinha de seleção (ações em massa) */
.lead__sel { grid-area: sel; position: relative; display: grid; place-items: center; margin: -8px -4px -8px -8px; padding: 8px 4px 8px 8px; cursor: pointer; }
.lead__sel input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.lead__sel span, .leads-all__dot { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #b8c1d3; border-radius: 50%; background: var(--surface); transition: border-color .15s, background .15s; }
.lead__sel:hover span, .leads-all:hover .leads-all__dot { border-color: var(--accent); }
.lead__sel input:checked + span, .leads-all input:checked + span, .leads-all input:indeterminate + span { border-color: var(--accent); background: var(--accent); }
.leads-all input:indeterminate + span::after { content: ""; width: 9px; height: 2px; border-radius: 1px; background: #fff; }
.lead__sel input:checked + span::after, .leads-all input:checked + span::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lead__sel input:focus-visible + span, .leads-all input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.lead.is-selected { border-color: var(--accent-hi); background: #f7f9ff; }
/* "Selecionar todos" acima da lista: botão com a bolinha dentro */
.leads-all { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; margin: 0 0 10px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.leads-all[hidden] { display: none; }
.leads-all:hover { border-color: var(--ink-mute); }
.leads-all:has(input:checked), .leads-all:has(input:indeterminate) { border-color: var(--accent-hi); background: var(--accent-soft); color: var(--accent-ink); }
.leads-all .leads-all__dot { width: 18px; height: 18px; }
.leads-all input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
/* Barra das ações em massa: aparece quando há lead selecionado e fica presa embaixo da tela */
.bulkbar { position: sticky; bottom: 16px; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--deep); color: var(--on-deep); box-shadow: 0 12px 32px rgba(10, 28, 63, .28); font-size: 14px; }
.bulkbar[hidden] { display: none; }
.bulkbar__n b { font-weight: 700; color: #fff; }
.bulkbar__all { padding: 0; border: 0; background: none; color: #a9c2ff; font: 500 13.5px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bulkbar__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.bulkbar button:disabled { opacity: .6; cursor: wait; }
.bulkbar__pick { position: relative; }
.bulkbar__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: #fff; color: var(--ink); font: 600 13.5px var(--font-body); white-space: nowrap; cursor: pointer; transition: background .15s; }
.bulkbar__btn:hover, .bulkbar__btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.bulkbar__btn > svg { flex: none; color: var(--accent); }
.bulkbar__btn .bulkbar__chev { margin-left: 2px; color: var(--ink-mute); transition: transform .15s; }
.bulkbar__btn[aria-expanded="false"] .bulkbar__chev { transform: rotate(180deg); }
.bulkbar .bulkbar__menu { top: auto; bottom: calc(100% + 10px); color: var(--ink); font-size: 13.5px; }
.bulkbar__x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--on-deep); font-size: 22px; line-height: 1; cursor: pointer; }
.bulkbar__x:hover { background: rgba(255, 255, 255, .1); }
/* Celular: a lista de etiquetas e o × numa linha só */
@media (max-width: 599px) {
  .bulkbar__acts { flex-wrap: nowrap; width: 100%; margin-left: 0; }
  .bulkbar__pick { flex: 1 1 auto; position: static; }
  .bulkbar__btn { width: 100%; justify-content: center; }
  .bulkbar .bulkbar__menu { left: 0; right: 0; width: auto; max-width: none; }
}
.lead__when { grid-area: meta; font-size: 12.5px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.lead__who { grid-area: who; min-width: 0; }
.lead__name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead__contact { display: block; font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead__link { color: inherit; text-decoration: none; text-underline-offset: 2px; }
.lead__link:hover { color: var(--accent-ink); text-decoration: underline; }
.lead__name .lead__link { color: var(--ink); }
.lead.is-new { border-color: #b9cdf6; background: #f7f9ff; }
.lead__new {
  display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
  background: var(--accent-ink); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
/* Selo da etiqueta ao lado do status (cores por etapa) */
.pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 11px; height: 11px; }
.pill--atendimento { background: var(--accent-soft); color: var(--accent-ink); }
.pill--agendada { background: #f1eafe; color: #5b21b6; }
.pill--cancelada { background: #fde8f1; color: #9d174d; }
.pill--reagendada { background: #e0f4f9; color: #0e6178; }
.pill--negociacao { background: var(--spark-soft); color: #9a4a12; }
.pill--convertido { background: #fff3d1; color: #7a4f00; }
.pill--inativo { background: var(--line-soft); color: var(--ink-soft); }
.pill--perdido { background: #e2e8f0; color: #334155; }
/* Automática: qualificado e o prestador ainda não mexeu no lead (contorno tracejado = ninguém colocou) */
.pill--nointer { background: #fff7ed; color: #9a3412; box-shadow: inset 0 0 0 1px #fdba74; }
.badge--error { background: #fef3c7; color: #92400e; }
.badge--error[title] { cursor: help; }
.badge-m .pill { margin-left: 4px; vertical-align: 1px; }
/* Botão Mais e o menu dele */
.lead__more { grid-area: toggle; justify-self: end; position: relative; }
/* cada lead tem o próprio empilhamento (animação): o que está com o menu aberto fica por cima dos de baixo */
.lead.has-menu { position: relative; z-index: 30; }
.lead__more.is-open .lead__toggle { border-color: var(--accent-hi); color: var(--accent-ink); }
.lead__more.is-open .lead__toggle svg { transform: rotate(180deg); }
.lead__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; max-width: calc(100vw - 32px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(10, 28, 63, .16); cursor: default; }
.lead__menu[hidden] { display: none; }
.newver { position: fixed; left: 50%; bottom: 20px; z-index: 90; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 12px; background: var(--deep); color: var(--on-deep); box-shadow: 0 12px 32px rgba(10, 28, 63, .3); font-size: 14px; font-weight: 600; }
.newver__btn { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: #fff; color: var(--deep); font: 700 13.5px var(--font-body); cursor: pointer; }
.newver__btn:hover { background: var(--accent-soft); }
.lead__menu.is-up { top: auto; bottom: calc(100% + 6px); }
.lead__mi { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 500 13.5px var(--font-body); }
.lead__mi:hover, .lead__mi:focus-visible { background: var(--paper); }
.lead__mi:disabled { opacity: .6; cursor: wait; }
.lead__mi.is-off { opacity: .5; cursor: not-allowed; }
.lead__mi.is-off:hover { background: none; }
.lead__mi > small { flex: none; font-size: 12px; color: var(--ink-mute); }
.lead__mi[hidden] { display: none; }
.lead__mi > span { flex: 1; min-width: 0; }
.lead__mi.is-on { font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.lead__mi > svg { flex: none; color: var(--accent-ink); }
.lead__mi.is-danger { color: var(--err); }
.lead__mi.is-danger:hover { background: var(--err-soft); }
.lead__mnote { display: block; padding: 0 10px 6px; font-size: 12px; color: var(--ink-mute); }
.lead__mh { display: block; padding: 6px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); }
.lead__msep { display: block; height: 1px; margin: 6px 4px; background: var(--line); }
.sdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-mute); }
.sdot--atendimento { background: var(--accent); }
.sdot--agendada { background: #7c3aed; }
.sdot--cancelada { background: #db2777; }
.sdot--reagendada { background: #0891b2; }
.sdot--negociacao { background: #f97316; }
.sdot--convertido { background: #eab308; }
.sdot--inativo { background: #94a3b8; }
.sdot--perdido { background: #334155; }
.sdot--qualificado { background: var(--ok); }
.sdot--analise { background: #64748b; }
/* Traço entre o status do lead e a situação do lead, na faixa de filtros */
.chipsep { align-self: center; width: 1px; height: 18px; margin: 0 2px; background: var(--line); }
.sdot--erro { background: #d97706; }
.sdot--nointer { background: #fb923c; }
.sdot--desqualificado { background: #b42218; }
.lead__act { grid-area: act; display: flex; justify-content: flex-end; }
.lead__wa {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--ok-ink); background: var(--ok-ink); color: #fff; font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.lead__wa:hover { background: #0a5a28; border-color: #0a5a28; color: #fff; }
.lead__wa.is-off, .lead__wa.is-off:hover { border-color: var(--line); background: var(--line-soft); color: var(--ink-soft); cursor: help; }
.lead__badge, .lead__toggle { justify-self: end; }
/* Na linha do lead o formulário vira texto (sem pílula); o status continua pílula, como as etiquetas */
.lead .badge { gap: 4px; padding: 2px 8px; font-size: 11.5px; }
.lead__tags .tag:not(.tag--src) { padding: 0; background: none; color: var(--ink-soft); }
.lead__warn { display: block; margin-top: 2px; font-size: 12.5px; color: #9a4a12; }
/* Telefone fora do padrão: botões para dizer se está certo ou errado, e o resultado depois de marcar */
.lead__pbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn--xs { height: 28px; padding: 0 12px; font-size: 12.5px; }
.lead__pcheck { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; font-size: 12.5px; }
.lead__pcheck.is-ok { color: var(--ok-ink); }
.lead__pcheck.is-wrong { color: var(--err); }
.lead__pcheck .linkbtn { font-size: 12.5px; color: var(--ink-soft); }
/* Celular/tablet: nome do cliente comprido quebra a linha em vez de passar por cima do "Ver detalhes" */
.lead__when { min-width: 0; }
.lead__meta-mobile .lead__site { white-space: normal; overflow-wrap: anywhere; }
/* Contagem de leads novos */
.leads-new { font-size: 13.5px; color: var(--ink-soft); }
.leads-new b { color: var(--accent-ink); font-weight: 600; }
.hbtn--new { background: #fff; border-color: #fff; color: var(--deep); font-weight: 600; }
.hbtn--new:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.hbtn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
/* Rodapé da tabela de páginas: quantas aparecem e o segundo "Mostrar" (o mesmo de cima, embaixo da lista) */
.pages-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 14px 2px 0; }
.pages-foot[hidden] { display: none; }
.pages-left { margin: 0; font-size: 13px; color: var(--ink-soft); }
.lead__wa:focus-visible { outline: 2px solid var(--ok-ink); outline-offset: 2px; }
.fields--none { display: block; margin: 14px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.lead__tags { display: none; }
.lead__meta-mobile { display: inline; }
.lead__toggle {
  grid-area: toggle; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.lead__toggle:hover { border-color: var(--ink-mute); }
.lead__toggle svg { transition: transform .2s; }
.tag { display: inline-block; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: var(--line-soft); color: var(--ink-soft); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
/* Origem do lead: anúncio (laranja), orgânico (azul, como na Qualidade dos leads) e ChatGPT (verde-petróleo) */
.tag--src { font-weight: 600; }
.tag--ad { background: var(--spark-soft); color: #9a4a12; }
.tag--organic { background: var(--accent-soft); color: var(--accent-ink); }
.tag--chatgpt { background: #e3f4ef; color: #0b6b54; }
.tag--ai { background: #f0ebfd; color: #5b3cc4; } /* Copilot, Perplexity e Gemini */
/* Admin: o cliente do lead em destaque (antes era uma etiqueta cinza igual à do formulário) */
.lead__site { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.lead__meta-mobile .lead__site { font-size: inherit; }
/* Taxa de clique que caiu só porque as impressões dispararam */
.gcard__why { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--qualified { background: var(--ok-soft); color: var(--ok-ink); }
.badge--disqualified { background: var(--err-soft); color: var(--err); }
.badge--pending { background: var(--line-soft); color: var(--ink-soft); }

.lead__body { display: none; padding: 4px 14px 16px; border-top: 1px solid var(--line-soft); }
.lead.is-open .lead__body { display: block; animation: open .18s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
/* Campos do lead: quadros da mesma largura enchendo a linha, com fundo na cor do tipo; texto grande desce e ocupa a linha toda */
.fields { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.fields > div { --c: var(--ink-soft); --s: #f1f3f8; flex: 1 1 170px; min-width: 0; padding: 10px 14px 11px; border-radius: 10px; background: var(--s); }
.fields > .is-big { flex-basis: 100%; }
.fields dt { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 12.5px; font-weight: 600; color: var(--c); }
.fields dt svg { flex: none; }
.fields dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.fields .fld--msg dd { font-size: 15px; font-weight: 400; line-height: 1.5; }
.fields .fld--local { --c: #0e7434; --s: #e8f6ed; }
.fields .fld--orig { --c: #b4540a; --s: #fff0e2; }
.fields .fld--msg { --c: #1d4ed8; --s: #ebf1ff; }
.fields .fld--hora { --c: #0e6178; --s: #e4f5f9; }
.fields .fld--area { --c: #6d28d9; --s: #f2ebff; }
.fields .fld--empresa { --c: #9d174d; --s: #fdebf3; }
.fields .fld--valor { --c: #8a6100; --s: #fff6dc; }
@media (max-width: 639px) { .fields > div { flex-basis: 100%; } }
.lead__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-soft); }
.lead__foot a { overflow-wrap: anywhere; }
.lead__foot a.lead__origin { color: var(--ink); text-decoration: none; white-space: nowrap; }
.lead__foot a.lead__origin:hover { border-color: var(--accent-hi); color: var(--accent-ink); }
.reason { flex: 1 1 260px; margin: 0; }
.btn--danger { color: var(--err); }
.btn--danger:hover { border-color: var(--err); background: var(--err-soft); }

@media (min-width: 1100px) {
  .lead__head {
    /* larguras fixas no fim: as linhas ficam alinhadas mesmo quando falta o WhatsApp ou o selo é maior */
    grid-template-columns: 20px 112px minmax(0, 1.4fr) minmax(0, 1fr) 310px 132px 80px;
    grid-template-areas: "sel meta who tags badge act toggle";
    padding: 12px 16px;
  }
  .lead__tags { grid-area: tags; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
  .lead__meta-mobile { display: none; }
  .lead__badge { grid-area: badge; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; justify-self: start; } /* status e selos numa linha só */
  .lead__when b { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
}
@media (max-width: 1099px) { .lead__badge { display: none; } .lead__when .badge { margin-left: 4px; } }
@media (min-width: 1100px) { .badge-m { display: none; } }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.pager:empty { display: none; }

/* ---------- Clientes (admin) ---------- */
.search { max-width: 320px; }
.sites { display: grid; gap: 10px; }
.site { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; min-width: 0; }
.site__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.site__name { font: 600 15px/1.3 var(--font-display); min-width: 0; overflow-wrap: anywhere; }
.site__domain { font-size: 13px; color: var(--ink-mute); overflow-wrap: anywhere; }
.site__stats { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.chip-status { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.chip-status--active { background: var(--ok-soft); color: var(--ok-ink); }
.chip-status--error { background: var(--err-soft); color: var(--err); }
.chip-status--unsupported { background: var(--spark-soft); color: #9a4a12; }
.chip-status--copy { background: var(--spark-soft); color: #9a4a12; }
/* ---------- Acessos ao painel (tabela no card do cliente) ---------- */
.acc { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-m); }
.acc__head, .acc__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 124px; gap: 16px; align-items: center; padding: 0 14px; }
.acc__head {
  padding-top: 8px; padding-bottom: 8px; background: var(--paper); border-bottom: 1px solid var(--line); border-radius: var(--r-m) var(--r-m) 0 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute);
}
.acc__head > span { display: flex; align-items: center; gap: 6px; }
.acc__help { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 10px; line-height: 1; cursor: help; }
.acc__row { padding-top: 12px; padding-bottom: 12px; }
.acc__row + .acc__row { border-top: 1px solid var(--line-soft); }
.acc__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc__avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 600 13px var(--font-display); }
.acc__email { display: flex; flex-direction: column; min-width: 0; }
.acc__email b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.acc__email small { font-size: 12px; color: var(--ink-mute); }
.acc__cell { min-width: 0; }
.acc__lbl { display: none; }
.acc__empty { margin: 0; padding: 14px; font-size: 13.5px; color: var(--ink-mute); }
.acc__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.acc__empty + .acc__foot { border-top: 0; padding-top: 0; }
.addlink { padding: 0; border: 0; background: none; color: var(--accent-ink); font: 500 13.5px var(--font-body); cursor: pointer; }
.addlink:hover { text-decoration: underline; text-underline-offset: 2px; }
.addlink[hidden] { display: none; }
/* Situação: etiqueta suave com bolinha */
.st {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-soft); font-size: 12.5px; font-weight: 500; line-height: 1.4; white-space: nowrap;
}
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9aa3b5; }
.st--ok { background: var(--ok-soft); color: var(--ok-ink); }
.st--ok::before { background: var(--ok); }
.st--wait { background: var(--spark-soft); color: #8a4310; }
.st--wait::before { background: var(--spark); }
.st--bad { background: var(--err-soft); color: var(--err); }
.st--bad::before { background: var(--err); }
/* Menu "Gerenciar" */
.site.is-menu-open { position: relative; z-index: 5; }
.menu { position: relative; justify-self: end; }
.menu__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink); font: 500 13px var(--font-body); cursor: pointer;
}
.menu__btn:hover, .menu.is-open .menu__btn { border-color: var(--ink-mute); }
.menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 270px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 32px rgba(10, 28, 63, .14);
}
.menu:not(.is-open) .menu__list { display: none; }
.menu__list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-s);
  background: none; color: var(--ink); font: 400 13.5px var(--font-body); text-align: left; white-space: nowrap; cursor: pointer;
}
.menu__list button:hover, .menu__list button:focus-visible { background: var(--paper); }
.menu__list svg { flex: none; color: var(--ink-mute); }
.menu__list hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--line-soft); }
.menu__list .is-danger, .menu__list .is-danger svg { color: var(--err); }
.menu__list .is-danger:hover { background: var(--err-soft); }
/* Janela das senhas */
.modal--sm { width: min(460px, calc(100vw - 32px)); }
.accdlg__text { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-soft); }
.accdlg__field { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.modal--sm .pw input { height: 40px; }
.accdlg__err { margin: 8px 0 0; font-size: 13px; color: var(--err); }
.accdlg__err[hidden] { display: none; }
.cfmdlg__text { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.accdlg__remove { margin-right: auto; color: var(--err); }
@media (max-width: 720px) {
  .acc__head { display: none; }
  .acc__row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .acc__who { grid-column: 1; grid-row: 1; }
  .acc__row .menu { grid-column: 2; grid-row: 1; }
  .acc__cell { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--paper); border-radius: var(--r-s); }
  .acc__lbl { display: block; font-size: 12.5px; color: var(--ink-mute); }
  .menu__list { min-width: 250px; }
}
.pw-set {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 1 0 100%; margin: 4px 0;
  padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
}
.pw-set[hidden] { display: none; }
.pw-set__label { flex: 1 0 100%; font-size: 13.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.pw-set__label b { color: var(--ink); font-weight: 600; }
.pw-set .pw { flex: 1 1 220px; max-width: 320px; min-width: 0; }
.pw-set .pw input { height: 34px; }
.pw-set__hint { flex: 1 0 100%; margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.add-email { display: flex; gap: 6px; flex: 1 1 260px; max-width: 420px; min-width: 0; }
.add-email[hidden] { display: none; }
.add-email input { height: 34px; }
/* Um e-mail por linha; o botão "+ Adicionar e-mail" (e o campo) fica embaixo do último */
/* Formulário "Adicionar e-mail": e-mail e senha do 1º acesso lado a lado, explicação embaixo */
.acc__foot .add-email { flex: 1 1 100%; max-width: 720px; flex-wrap: wrap; gap: 8px; }
.acc__foot .add-email > input { flex: 1 1 220px; min-width: 0; }
.acc__foot .add-email > .pw { flex: 1 1 220px; min-width: 0; }
.acc__foot .add-email .pw input { height: 34px; width: 100%; }
.add-email__btns { display: flex; gap: 6px; }
.add-email__hint { flex: 1 0 100%; margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.site details { margin-top: 10px; }
.site summary { cursor: pointer; font-size: 13.5px; color: var(--ink-soft); width: fit-content; }
.site details[open] summary { margin-bottom: 8px; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.btn--ai { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.btn--ai:hover { background: #d8e4ff; }
.btn--ai[disabled] { cursor: progress; }
.profile-msg { flex: 1 1 220px; min-width: 0; font-size: 13px; color: var(--ink-soft); }
.profile-msg.is-good { color: var(--ok-ink); }
.profile-msg.is-bad { color: var(--err); }
.profile-msg:empty { display: none; }
textarea.is-busy { opacity: .55; animation: pulse 1.2s ease-in-out infinite; }
.linkbtn { padding: 0; border: 0; background: none; color: var(--accent-ink); font: 500 13px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn[hidden] { display: none; }

/* ---------- Janela de exportação ---------- */
.modal {
  width: min(680px, calc(100vw - 32px)); max-height: min(86vh, 760px); padding: 0; border: 0; border-radius: var(--r-l);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(10, 28, 63, .28); overflow: hidden;
}
.modal[open] { display: flex; animation: ld-rise .25s both; }
.modal::backdrop { background: rgba(10, 28, 63, .45); }
.modal__box { display: flex; flex-direction: column; width: 100%; max-height: inherit; margin: 0; min-width: 0; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.modal__head h2 { font-size: 18px; }
.modal__sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.modal__x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-mute); font-size: 22px; line-height: 1; cursor: pointer; }
.modal__x:hover { background: var(--line-soft); color: var(--ink); }
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 20px 6px; }
.modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.modal__hint { margin-right: auto; font-size: 13px; color: var(--ink-mute); }
.pick { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.pick legend { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 8px; font: 600 14px var(--font-display); }
.pick legend .linkbtn { font-size: 12.5px; }
.pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 6px; align-items: stretch; }
.pick__item {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s;
}
.pick__item:hover { border-color: var(--accent-hi); }
.pick__item:has(input:checked) { border-color: var(--accent-hi); background: var(--accent-soft); }
.pick__item input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.pick__item span { flex: 1 1 auto; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; } /* nome do campo sempre inteiro, quebrando linha */
.pick__item small { flex: none; font-size: 11.5px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.pick__empty { margin: 0; font-size: 13px; color: var(--ink-mute); }
.pick__loading { display: block; grid-column: 1 / -1; height: 34px; border-radius: 9px; background: var(--line-soft); animation: pulse 1.2s ease-in-out infinite; }
@media (max-width: 599px) {
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; }
  .modal__foot .btn { flex: 1 1 auto; }
  .modal__hint { flex: 1 0 100%; }
}
/* Histórico de leads excluídos */
.leads-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.leads-actions .btn { background: var(--surface); }
.modal--wide { width: min(820px, calc(100vw - 32px)); }
@media (max-width: 599px) { .modal--wide { width: 100vw; } } /* no celular a janela larga também sobe de baixo, na largura toda */
.dlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dlist__item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); }
.dlist__main { display: grid; gap: 6px; min-width: 0; }
.dlist__main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlist__main span, .dlist__main small, .dlist__meta small { font-size: 12.5px; color: var(--ink-mute); overflow-wrap: anywhere; }
.dlist__meta { display: grid; justify-items: end; gap: 6px; text-align: right; }
.dlist__notice { margin: 0 0 12px; line-height: 1.5; background: var(--spark-soft); color: #8a4310; }
.dlist__notice b { color: #6e340a; }
.dlist__meta small.dlist__gone { color: var(--err); }
.dlist__meta small.trash-until { color: var(--orange); font-weight: 600; }
@media (max-width: 599px) {
  .dlist__item { grid-template-columns: minmax(0, 1fr); }
  .dlist__meta { justify-items: start; text-align: left; }
}
.site__error { margin: 8px 0 0; font-size: 12.5px; color: var(--err); overflow-wrap: anywhere; }
.form__msg { margin: 0; font-size: 13.5px; min-height: 1.2em; }
.form__msg.is-good { color: var(--ok-ink); }
.form__msg.is-bad { color: var(--err); }

/* ---------- Aviso flutuante ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 10; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 10px; background: var(--deep); color: var(--on-deep); font-size: 14px;
  transform: translate(-50%, 16px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.toast.is-bad { background: var(--err); color: #fff; }
.toast.has-action { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast__btn {
  flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: #fff; color: var(--deep);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.toast__btn:hover { background: var(--accent-soft); }
.toast__x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--on-deep-soft); font-size: 18px; line-height: 1; cursor: pointer; }
.toast__x:hover { color: #fff; }
/* Busca de lead por nome, telefone ou e-mail */
.leads-search { flex: 0 0 320px; width: 320px; max-width: 100%; height: 36px; font-size: 13.5px; }
@media (max-width: 599px) { .leads-actions { width: 100%; } .leads-search { flex: 1 1 100%; width: 100%; } }

/* ---------- Search Console ---------- */
.flash { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #cdebd8; border-radius: var(--r-m); background: var(--ok-soft); color: var(--ok-ink); font-size: 14px; box-shadow: var(--shadow); }
.flash--bad { border-color: #f6cfcb; background: var(--err-soft); color: var(--err); }
.filters + .flash, .gconnect + .flash { margin-top: 16px; }
.gconnect { max-width: 680px; }
.gconnect h2 { margin-bottom: 6px; }
.gconnect .panel__note { margin: 0 0 16px; }
.gempty { margin-top: 20px; padding: 28px 16px; text-align: center; line-height: 1.6; color: var(--ink-soft); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r-m); background: var(--surface); }
.gnote { margin: 0 2px 26px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.gnote summary { width: fit-content; cursor: pointer; color: var(--accent-ink); font-weight: 500; }
.gnote summary:hover { text-decoration: underline; text-underline-offset: 2px; }
.gnote p { max-width: 75ch; margin: 8px 0 0; }
/* Frase-resumo do Search Console */
.gsum { max-width: 75ch; margin: -6px 2px 18px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.gsum b { font-weight: 600; font-variant-numeric: tabular-nums; }
.gsum__d { font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.gsum__d--up { color: var(--ok-ink); }
.gsum__d--down { color: var(--err); }

body[data-page="gsc"] .hero .deco__plus--b { display: none; } /* ficaria colado na data dos dados */
/* Trocar conta Google: no topo, ao lado do Sair (só na tela do Search Console) */

.gcards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; overflow-anchor: none; }
@media (min-width: 640px) { .gcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1180px) { .gcards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gcard {
  --c: var(--accent); --c-soft: var(--accent-soft);
  position: relative; min-width: 0; padding: 14px 16px 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
  animation: ld-rise .55s both;
}
.gcard:nth-child(2) { animation-delay: .06s; }
.gcard:nth-child(3) { animation-delay: .12s; }
.gcard:nth-child(4) { animation-delay: .18s; }
.gcard--imp { --c: #6d4ed8; --c-soft: #f1edfd; }
.gcard--clk { --c: #2c62d6; --c-soft: #e9f0ff; }
.gcard--ctr { --c: #0e7490; --c-soft: #e3f3f7; }
.gcard--pos { --c: #e5731c; --c-soft: #fff1e6; }
/* Cards de leads (Leads, Qualificados, Desqualificados): mesmo visual, três colunas, e clicar filtra a lista */
.gcards--leads { margin-bottom: 20px; }
@media (min-width: 720px) { .gcards--leads { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gcard--ltotal { --c: var(--accent); --c-soft: #e9f0ff; }
.gcard--lqualified { --c: var(--ok-ink); --c-soft: var(--ok-soft); }
.gcard--ldisqualified { --c: #b42218; --c-soft: var(--err-soft); }
.gcards--leads .gcard { cursor: pointer; user-select: none; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.gcards--leads .gcard:hover { border-color: #c4cfe3; }
.gcards--leads .gcard:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.gcards--leads .gcard.is-active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), var(--shadow); }
.gcards--leads:has(.gcard--lqualified.is-active, .gcard--ldisqualified.is-active) .gcard:not(.is-active) { opacity: .72; }
.gcards--leads:has(.gcard--lqualified.is-active, .gcard--ldisqualified.is-active) .gcard:not(.is-active):hover { opacity: 1; }
.gcard__note { font-size: 12.5px; color: var(--ink-soft); }
.gcard__label { font: 500 14px/1.3 var(--font-body); letter-spacing: 0; color: var(--ink-soft); }
.gcards .gcard__label::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 2px; background: var(--c); vertical-align: 1px; }
.gcard__label small { font-size: 12px; font-weight: 400; color: var(--ink-mute); }
.gcard__ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.gcard__ba.is-single { grid-template-columns: minmax(0, 1fr); }
.gcard__box { display: grid; gap: 1px; min-width: 0; padding: 9px 11px; }
.gcard__box + .gcard__box { border-left: 1px solid var(--line); }
.gcard__box.is-now { background: var(--c-soft); }
/* Leads: o "Antes" também é clicável e, escolhido, passa a ser o destacado */
.gcards--leads .gcard__box[data-when=prev] { cursor: pointer; border-radius: 0; transition: background .15s; }
.gcards--leads .gcard__box[data-when=prev]:hover { background: var(--paper); }
.gcards--leads .gcard.is-prev .gcard__box[data-when=prev] { background: var(--c-soft); }
.gcards--leads .gcard.is-prev .gcard__box.is-now { background: transparent; }
.gcards--leads .gcard.is-prev .gcard__box[data-when=prev] .gcard__v { color: var(--ink); }
.gcard__k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.gcard__d { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard__v { margin-top: 5px; font: 600 19px/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.gcard__box.is-now .gcard__v { font-size: 24px; color: var(--ink); }
.gcard__delta { min-height: 23px; margin: 0 0 15px; }
.gcard .chart.gcard__chart { height: 66px; }
.gcard .chart .line-cur { stroke: var(--c); stroke-width: 2; }
.gcard .chart .area-cur { fill: var(--c); opacity: .1; }
.gcard .chart .line-cmp { stroke: var(--ink-mute); stroke-width: 1.5; opacity: .75; }
.gcard .chart .dot { stroke: var(--c); }
.gcard .chart .dot--cmp { stroke: var(--ink-mute); }
.gcard .tip .k { background: var(--c); }
.gcard .tip .k--cmp { background: var(--ink-mute); }
.gcards.is-loading .gcard__v { color: transparent; background: var(--line-soft); border-radius: 6px; animation: pulse 1.2s ease-in-out infinite; }

.gsec { margin-bottom: 30px; min-width: 0; }
.gsec h2 { font-size: 17px; }
.gsec .panel__head .panel__note { margin-top: 3px; }
/* "O que explica a mudança": no estilo do APC Editorial (lista enxuta, 3 de cada lado, resumo no fim) */
.movers__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.gsec h2.movers__title { font: 600 17px/1.3 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.movers__sub { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.movers { display: grid; gap: 12px; }
@media (min-width: 960px) { .movers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.movers__col { min-width: 0; padding: 14px 16px 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.movers__col h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 2px; font: 600 15px/1.3 var(--font-display); color: var(--ink); }
.movers__col h3 svg { flex: none; }
.movers__col--up h3 svg { color: var(--ok-ink); }
.movers__col--down h3 svg { color: var(--err); }
.dcard h2.gcard__label { font: 600 17px/1.3 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.movers ol { margin: 0; padding: 0; list-style: none; }
.mover { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.mover:first-child { border-top: 0; }
.mover__main { display: grid; gap: 4px; min-width: 0; }
.mover__title { justify-self: start; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 500 14.5px/1.35 var(--font-body); text-decoration: none; overflow-wrap: anywhere; }
.mover__title:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
/* Janela com as buscas de uma página de "O que explica a mudança" */
.mdlg__period { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-soft); }
.mdlg__nums { margin: 0 0 16px; }
.mover__nums { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-mute); }
.mover__nums span { white-space: nowrap; }
.mover__nums b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.mover__badge { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: help; }
.mover__badge--up { background: var(--ok-soft); color: var(--ok-ink); }
.mover__badge--down { background: var(--err-soft); color: #c0262d; }
/* Visitas × contatos: duas colunas com cabeçalho colorido, ranking, caminho em etiqueta, barra e número em destaque */
.conv { display: grid; gap: 14px; }
@media (min-width: 960px) { .conv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.conv__col {
  --cc: #c0262d; --cc-soft: var(--err-soft); --cc-bar: linear-gradient(90deg, #f3a3a3, #d9534f);
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.conv__col--best { --cc: var(--ok-ink); --cc-soft: var(--ok-soft); --cc-bar: linear-gradient(90deg, #4cc47a, var(--ok-ink)); }
.conv__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 74px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line-soft); border-top: 3px solid var(--cc); }
.conv__icon { display: inline-grid; place-items: center; align-self: start; margin-top: 1px; color: var(--cc); } /* só o ícone, alinhado com o título */
.conv__titles h3 { margin: 0; font: 600 15px/1.3 var(--font-display); color: var(--cc); }
.conv__titles p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.conv__sum { justify-self: end; padding: 4px 10px; border-radius: 999px; background: var(--paper); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.conv__sum:empty { display: none; }
.conv__sum b { color: var(--cc); font-weight: 700; font-variant-numeric: tabular-nums; }
.conv__list { margin: 0; padding: 4px 18px 8px; list-style: none; }
.citem { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 74px; padding: 12px 0; box-sizing: border-box; border-top: 1px solid var(--line-soft); }
.citem:first-child { border-top: 0; }
.citem__rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); font: 600 12.5px var(--font-display); }
.citem:first-child .citem__rank { color: var(--ink); }
.citem__main { display: grid; gap: 6px; min-width: 0; }
.citem__title { justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: 500 14.5px/1.35 var(--font-body); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } /* uma linha só: as linhas das duas colunas ficam na mesma altura */
.citem__title:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.citem__meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 12px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; color: var(--ink-mute); }
.citem__meta b { color: var(--ink); font-weight: 600; }
.citem__rate { color: var(--ink-soft); }
.citem__path {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; height: 22px; padding: 0 9px 0 7px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-soft); font-size: 11.5px; text-decoration: none;
}
.citem__path svg { flex: none; color: var(--accent-hi); }
.citem__path { flex: 0 1 auto; }
.citem__path span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.citem__path:hover { border-color: var(--accent-hi); background: var(--accent-soft); color: var(--accent-ink); }
.citem__bar { display: none; } /* sem barra: visual mais leve */
.citem__bar i { display: block; height: 100%; border-radius: 999px; background: var(--cc-bar); }
.citem__metric { display: grid; justify-items: end; width: 118px; text-align: right; }
.citem__metric b { font: 600 18px/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--cc); }
.citem__metric small { margin-top: 3px; font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.citem--none { padding: 16px 0; font-size: 13.5px; color: var(--ink-mute); }
@media (max-width: 599px) {
  .conv__head { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; }
  .conv__sum { grid-column: 1 / -1; justify-self: start; }
  .conv__list { padding: 2px 14px 6px; }
  .citem { grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 6px 10px; }
  /* celular: o número vai para baixo do título, numa linha só ("120 cliques sem contato") */
  .citem__metric { grid-column: 2; display: flex; align-items: baseline; gap: 6px; justify-items: start; min-width: 0; text-align: left; }
  .citem__metric b { font-size: 19px; }
  .citem__metric small { margin-top: 0; }
  .citem__path span { max-width: 180px; }
  .citem { min-height: 0; }
  .citem__title { white-space: normal; overflow-wrap: anywhere; } /* celular: o título pode quebrar */
  .citem__meta { flex-wrap: wrap; white-space: normal; }
  .citem__metric { width: auto; }
}
.mover--none { display: block; color: var(--ink-mute); font-size: 13.5px; }
.movers__sum { margin: 14px 2px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.movers__sum b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.movers__more { margin: 12px 0 0; background: var(--surface); }
.movers__more:hover { border-color: var(--accent-hi); color: var(--accent-ink); }

/* Enquanto o filtro carrega, o que ainda é do período antigo fica apagado (não parece dado novo) */
.dcard.is-loading, .gsec.is-loading, [data-gsc-clients].is-loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* Celular x Computador */
.dcard { margin: 0 0 14px; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); animation: ld-rise .55s .2s both; }
.dcard__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.seg--xs button { height: 28px; padding: 0 11px; font-size: 13px; }
.dcard__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 859px) { .dcard__cols { grid-template-columns: minmax(0, 1fr); } }
.dcard__dev { --dv: #2c62d6; --dv-soft: #e9f0ff; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.dcard__dev--desktop { --dv: #be185d; --dv-soft: #fce7f3; --dv-ink: #9d174d; }
.dcard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14.5px; }
.dcard__icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--dv-soft); color: var(--dv); }
.dcard__share { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--dv-ink, var(--dv)); }
.dcard__sharebar { height: 6px; margin: 10px 0 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dcard__sharebar span { display: block; height: 100%; border-radius: 999px; background: var(--dv); }
.dcard__ms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 459px) { .dcard__ms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dcard__m { display: grid; gap: 2px; align-content: start; justify-items: start; min-width: 0; }
.dcard__k { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); }
.dcard__v { font: 600 19px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.dcard__prev { font-size: 12px; color: var(--ink-mute); white-space: nowrap; }
.dcard__m .delta { margin-top: 2px; font-size: 11.5px; padding: 1px 7px; }
.dcard__chartwrap { margin-top: 14px; }
.dcard__legend { margin-bottom: 4px; }
.dcard__legend .is-cmp::before { border-top-style: solid; }
.dcard .chart.dcard__chart { height: 170px; }
.dcard .chart .line-cmp { stroke: #be185d; stroke-dasharray: none; stroke-width: 2; opacity: 1; }
.dcard .chart .dot--cmp { stroke: #be185d; }
.dcard .tip .k--cmp { background: #be185d; }
.dcard__legend .is-cmp::before { border-top-color: #be185d; }
.dcard__note { margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-mute); }
/* Celular: no lugar dos dois blocos, uma tabela Celular | Computador com uma linha por métrica */
.dtbl { display: none; }
@media (max-width: 559px) {
  .dcard { padding: 12px 14px 12px; }
  .dcard__top { margin-bottom: 10px; }
  .dcard__cols { display: none; }
  .dtbl { display: block; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); overflow: hidden; }
  .dtbl__devs, .dtbl__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dtbl__devs { padding: 10px 12px 0; gap: 10px; }
  .dtbl__dev { --dv: #2c62d6; --dv-soft: #e9f0ff; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .dtbl__dev--desktop { --dv: #be185d; --dv-soft: #fce7f3; --dv-ink: #9d174d; }
  .dtbl__dev > span:last-child { display: grid; min-width: 0; line-height: 1.25; }
  .dtbl__dev b { font-size: 14px; }
  .dtbl__dev small { font-size: 12px; font-weight: 600; color: var(--dv-ink, var(--dv)); white-space: nowrap; }
  .dtbl__dev .dcard__icon { width: 26px; height: 26px; flex: none; }
  .dtbl__bar { display: flex; height: 6px; margin: 10px 12px 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
  .dtbl__bar span { display: block; height: 100%; }
  .dtbl__seg--mobile { background: #2c62d6; }
  .dtbl__seg--desktop { background: #be185d; }
  .dtbl__seg--tablet { display: none !important; }
  .dtbl__row { gap: 2px 10px; padding: 9px 12px 10px; border-top: 1px solid var(--line-soft); }
  .dtbl__row:nth-child(3) { border-top: 0; }
  .dtbl__k { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); }
  .dtbl__c { display: grid; justify-items: start; align-content: start; gap: 4px; min-width: 0; }
  .dtbl__vl { display: grid; gap: 1px; min-width: 0; }
  .dtbl__vl b { font: 600 18px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
  .dtbl__vl small { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dtbl__c .delta { font-size: 11px; padding: 1px 7px; }
  .dcard__chartwrap { margin-top: 12px; }
  .dcard .chart.dcard__chart { height: 150px; }
}

/* Páginas por faixa de posição */
.bands__bar { display: flex; gap: 3px; height: 10px; margin: 2px 0 12px; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.bands__seg { flex: 0 0 auto; flex-basis: 0; min-width: 6px; }
.bands__seg--top3, .band--top3 { --b: #16a34a; }
.bands__seg--p1, .band--p1 { --b: #2c62d6; }
.bands__seg--p2, .band--p2 { --b: #e8912d; }
.bands__seg--far, .band--far { --b: #9aa3b5; }
.bands__seg--none, .band--none { --b: #d3d9e4; }
.bands__seg { background: var(--b); }
.bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1099px) { .bands { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .bands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.band {
  display: grid; gap: 3px; justify-items: start; min-width: 0; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.band:hover { border-color: var(--b); transform: translateY(-1px); }
.band.is-on { border-color: var(--b); box-shadow: 0 0 0 1px var(--b); }
.band.is-zero { cursor: default; opacity: .7; transform: none; }
.band.is-zero:hover { border-color: var(--line); }
.band__label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.band__label::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--b); }
.band__n { font: 600 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.band.is-zero .band__n { color: var(--ink-mute); }
.band__desc { font-size: 12.5px; color: var(--ink-mute); }
#gpages-title .filter-chip { margin-left: 6px; height: 28px; font-family: var(--font-body); vertical-align: middle; border-color: var(--accent-hi); color: var(--accent-ink); background: var(--accent-soft); }

.ptable { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; }
.ptable__row { display: grid; grid-template-columns: 32px minmax(0, 1fr) repeat(3, 96px) 200px 80px; align-items: center; gap: 6px 12px; padding: 10px 32px 10px 16px; border-top: 1px solid var(--line-soft); } /* folga à direita: Leads não fica colado na borda */
.ptable__row.is-open { background: var(--accent-soft); }
.ptable__title { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ptable__page a.ptable__url { width: fit-content; max-width: 100%; color: var(--ink-mute); font-size: 12px; font-weight: 400; }
.ptable__page a.ptable__url:first-child { color: var(--ink); font-size: 14px; font-weight: 500; } /* página sem título: o endereço é o nome */
.ptable__page a.ptable__url:hover { color: var(--accent-ink); }
.ptable__tog {
  justify-self: start; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--accent); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ptable__tog span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* texto só para leitor de tela no computador */
.ptable__tog:hover { border-color: var(--accent-hi); color: var(--accent-ink); }
.ptable__tog svg { transition: transform .2s; }
.ptable__tog[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.ptable__tog[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Fechar também no fim dos dados da página, para não precisar voltar lá em cima */
.ptable__row { scroll-margin-top: 84px; }
.pdetail__close {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; margin-top: 16px;
  border: 1px solid var(--accent); border-radius: var(--r-m); background: var(--surface); color: var(--accent-ink);
  font: 500 13.5px var(--font-body); cursor: pointer;
}
.pdetail__close:hover { background: var(--accent-soft); }
.pdetail__close svg { transform: rotate(180deg); }

/* Visão geral: ranking dos clientes com mais leads qualificados e mais desqualificados */
.ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.rank { --rc: var(--ok-ink); --rc-soft: var(--ok-soft); min-width: 0; padding: 16px 18px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.rank--disqualified { --rc: #c0392b; --rc-soft: var(--err-soft); }
.rank__head h2 { margin: 0; font: 600 16px/1.3 var(--font-display); color: var(--ink); }
.rank__head h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--rc); vertical-align: 1px; }
.rank__head p { margin: 3px 0 8px; font-size: 13px; color: var(--ink-mute); }
.rank__list { margin: 0; padding: 0; list-style: none; }
.rank__list li + li { border-top: 1px solid var(--line-soft); }
.rank__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 6px; margin: 0 -6px; border-radius: 10px; color: inherit; text-decoration: none; transition: background .15s; }
.rank__row:hover { background: var(--rc-soft); }
.rank__pos { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); font: 600 12.5px var(--font-display); }
.rank__list li:first-child .rank__pos { background: var(--rc-soft); border-color: transparent; color: var(--rc); }
.rank__main { display: grid; gap: 6px; min-width: 0; }
.rank__name { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.rank__bar i { display: block; height: 100%; border-radius: 999px; background: var(--rc); opacity: .85; }
.rank__nums { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.rank__nums b { font: 600 18px/1.1 var(--font-display); color: var(--rc); }
.rank__nums small { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.rank__empty { padding: 16px 0; font-size: 13.5px; color: var(--ink-mute); }
@media (max-width: 759px) { .ranks { grid-template-columns: minmax(0, 1fr); gap: 12px; } .rank { padding: 14px 14px 8px; } }

/* Qualidade dos leads (tela de Leads): por origem em dois cartões; por página e por cidade em linhas com barra */
.quality .panel__head { align-items: flex-start; }
.quality .panel__note { margin-top: 4px; }
.qbar { display: flex; height: 10px; min-width: 0; border-radius: 999px; background: var(--line-soft); }
.qbar i { position: relative; display: block; height: 100%; transition: filter .15s; cursor: pointer; }
.qbar i:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qbar i:first-child { border-radius: 999px 0 0 999px; }
.qbar i:last-child { border-radius: 0 999px 999px 0; }
.qbar i:only-child { border-radius: 999px; }
/* balão com a quantidade e a porcentagem ao passar o mouse (ou tocar) em cada pedaço da barra */
.qbar i:hover { filter: brightness(.92); }
.qbar i:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 5; transform: translateX(-50%);
  padding: 5px 9px; border-radius: 7px; background: var(--ink); color: #fff; font: 500 12px/1.3 var(--font-body);
  white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(18, 26, 44, .2);
}
.qbar i:hover::before {
  content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%; z-index: 5; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); pointer-events: none;
}
.qbar__qualified { background: linear-gradient(90deg, #4cc47a, var(--ok-ink)); }
.qbar__disqualified { background: #ef8a8a; }
.qbar__pending { background: #cfd5e2; }
.qsrcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qsrc { --qc: var(--accent); display: grid; gap: 10px; align-content: start; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.qsrc--ads { --qc: #e5731c; }
.qsrc__head { display: grid; gap: 2px; }
.qsrc__head b { font: 600 15px var(--font-display); color: var(--ink); }
.qsrc__head b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 2px; background: var(--qc); vertical-align: 1px; }
.qsrc__head small { font-size: 12.5px; color: var(--ink-mute); }
.qsrc__main { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.qsrc__main b { font: 600 34px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.qsrc__main span { font-size: 14px; color: var(--ink-soft); }
.qsrc__nums { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 13px; color: var(--ink-mute); }
.qsrc__nums span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #cfd5e2; vertical-align: 1px; }
.qsrc__nums .is-q::before { background: var(--ok-ink); }
.qsrc__nums .is-d::before { background: #ef8a8a; }
.qsrc__total { margin: 0; font-size: 12.5px; color: var(--ink-mute); }
.qverdict { margin: 14px 2px 0; padding: 10px 14px; border-radius: var(--r-m); background: var(--ok-soft); color: var(--ink-soft); font-size: 14px; }
.qverdict b { color: var(--ink); }
.qrows { display: grid; }
.qrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1fr) 96px 80px; align-items: center; gap: 6px 20px; padding: 11px 2px; border-top: 1px solid var(--line-soft); }
.qrow:first-child { border-top: 0; }
.qrow__name { display: grid; gap: 1px; min-width: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.qrow__name a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow__name a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.qrow__name small { font-size: 12px; font-weight: 400; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow__pct { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.qrow__pct b { font: 600 16px var(--font-display); color: var(--ink); }
.qrow__pct small { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.qrow__total { text-align: right; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qnote, .qempty { margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-mute); }
.qempty { padding: 14px 0; font-size: 14px; text-align: center; }
@media (max-width: 699px) {
  .qsrcs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .qsrc { padding: 14px; }
  .qsrc__main b { font-size: 30px; }
  .qrow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .qrow__name { grid-column: 1 / -1; }
  .qrow .qbar { grid-column: 1 / -1; order: 3; }
  .qrow__pct { justify-items: start; grid-auto-flow: column; align-items: baseline; gap: 6px; }
}


/* Página aberta: gráfico da página + palavras-chave */
.pdetail { padding: 14px 16px 18px; background: var(--paper); border-top: 1px solid var(--line-soft); animation: open .18s ease-out; }
/* Filtro de cada página aberta: período à esquerda, comparação à direita, opções num bloco só */
.pbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 10px 20px; margin-bottom: 12px; } /* "Comparar com" logo ao lado do período */
.pbar__group { display: grid; gap: 5px; min-width: 0; }
.pbar__label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-mute); }
.pchips { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.pchips button {
  height: 32px; padding: 0 13px; border: 0; border-left: 1px solid var(--line-soft); background: none;
  color: var(--ink-soft); font: 500 13px var(--font-body); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s;
}
.pchips button:first-child { border-left: 0; }
.pchips button:hover { background: var(--paper); color: var(--ink); }
.pchips button.is-on { background: var(--accent); color: #fff; font-weight: 600; }
.prefresh {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border: 2px solid var(--accent-hi); border-radius: 9px; background: var(--surface); color: var(--accent-ink);
  font: 500 13px var(--font-body); white-space: nowrap; cursor: pointer; transition: border-color .15s, color .15s;
}
.prefresh:hover { border-color: #4675DB; color: white; background-color: #4675DB; }
.prefresh[disabled] { cursor: progress; opacity: .8; }
.prefresh.is-busy svg { animation: ld-spin .9s linear infinite; }
.prefresh__result { margin: 1px 0 12px; padding: 8px 12px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.prefresh__result.is-changed { border-color: #cdebd8; background: var(--ok-soft); color: var(--ok-ink); }
.prefresh__result.is-bad { border-color: #f6cfcb; background: var(--err-soft); color: var(--err); }
.pbar__range { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pbar__range[hidden] { display: none; }
.pbar__range .pbar__label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.pbar__range input { width: auto; height: 34px; padding: 0 8px; font-size: 13px; }
@media (max-width: 599px) {
  .pbar { flex-direction: column; align-items: stretch; }
  .pchips button { flex: 1 0 auto; border-top: 1px solid var(--line-soft); margin-top: -1px; }
}
.pfilter__line { /* período escolhido, numa badge */
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; width: fit-content; max-width: 100%;
  margin: 0 0 12px; padding: 5px 12px; border: 1px solid #cfdcff; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; line-height: 1.4;
}
.pfilter__line strong { color: var(--accent-ink); font-weight: 700; }
.pfilter__line:empty { display: none; }
.pdetail__wait { margin: 0; padding: 18px 4px; font-size: 13.5px; color: var(--ink-mute); animation: pulse 1.2s ease-in-out infinite; }
.pdetail__wait.is-bad { color: var(--err); animation: none; }
.gcards--sm { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; gap: 10px; }
@media (min-width: 1180px) { .gcards--sm { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gcards--sm .gcard { padding: 12px 13px 8px; box-shadow: none; animation: none; }
.gcards--sm .gcard__ba { margin: 8px 0; }
.gcards--sm .gcard__box { padding: 7px 9px; }
.gcards--sm .gcard__v { font-size: 16px; }
.gcards--sm .gcard__box.is-now .gcard__v { font-size: 19px; }
.gcards--sm .chart.gcard__chart { height: 52px; }
/* Celular (cards principais e cards de cada página): um card por linha — título e variação em cima; Antes/Agora lado a lado e o gráfico à direita.
   As datas saem do card porque já aparecem na faixa do período logo acima. */
@media (max-width: 559px) {
  .gcards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gcards--sm { gap: 8px; }
  .gcards .gcard {
    display: grid; grid-template-columns: minmax(0, 1fr) 96px; grid-template-areas: "label label" "ba chart";
    align-items: center; gap: 8px 12px; padding: 10px 12px 11px;
  }
  .gcards .gcard__label { grid-area: label; min-height: 24px; padding-right: 150px; font-weight: 600; color: var(--ink); }
  .gcards .gcard__label small { display: none; }
  .gcards .gcard__delta { position: absolute; top: 10px; right: 12px; min-height: 0; margin: 0; }
  .gcards .gcard__delta .delta { font-size: 12px; padding: 2px 8px; white-space: nowrap; }
  .gcards .gcard__ba { grid-area: ba; margin: 0; }
  .gcards .gcard__d { display: none; }
  .gcards .gcard__k { font-size: 11px; }
  .gcards .gcard__why { display: none; } /* no celular a explicação fica no selo (toque/hover): a frase empurrava o selo para cima do título */
  .gcards .gcard__v { margin-top: 3px; }
  .gcards .chart.gcard__chart { grid-area: chart; height: 50px; }
  .gcards:not(.gcards--sm) .gcard { grid-template-columns: minmax(0, 1fr) 100px; padding: 12px 14px 13px; }
  .gcards:not(.gcards--sm) .gcard__label { font-size: 15px; }
  .gcards:not(.gcards--sm) .gcard__delta { top: 12px; right: 14px; }
  .gcards .gcard__box { padding: 7px 8px; }
  .gcards:not(.gcards--sm) .gcard__v { font-size: 17px; }
  .gcards:not(.gcards--sm) .gcard__box.is-now .gcard__v { font-size: 20px; }
  .gcards .gcard__v.is-long, .gcards .gcard__box.is-now .gcard__v.is-long { font-size: 16px; }
  .gcards .gcard__v.is-xlong, .gcards .gcard__box.is-now .gcard__v.is-xlong { font-size: 14px; }
  .gcards:not(.gcards--sm) .chart.gcard__chart { height: 58px; }
}
.pkw { min-width: 0; }
.pkw__title { margin: 4px 0 8px; font: 700 12.5px/1.3 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.pkw__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 14px; background: var(--accent-soft); border: 1px solid #c9d8fb; border-radius: var(--r-m); }
.pkw__topmain { display: grid; gap: 4px; min-width: 0; }
.pkw__topq { font: 600 16px/1.3 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.pkw__topnums { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-mute); }
.pkw__topnums b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pkw__table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.pkw__row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 104px); align-items: center; gap: 4px 12px; padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.pkw__row:first-child { border-top: 0; }
.pkw__head { background: var(--paper); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pkw__head span:not(:first-child) { text-align: right; }
.pkw__head button { justify-self: end; padding: 2px 0; border: 0; background: none; color: var(--ink-soft); font: 600 12px var(--font-body); white-space: nowrap; cursor: pointer; }
.pkw__head button:hover, .pkw__head button.is-on { color: var(--accent-ink); }
.pkw__head .sort-ic { margin-left: 4px; }
.pkw__q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkw__n { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.pkw__n b { font-weight: 600; }
.pkw__n small { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.pkw__n small.up { color: var(--ok-ink); }
.pkw__n small.down { color: var(--err); }
.pkw__low { margin: 4px 0 16px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.pkw__note { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-mute); }
.pkw__note b { color: var(--ink-soft); font-weight: 600; }
.pkw__note.is-bad { color: var(--err); }
@media (max-width: 759px) {
  .pdetail { padding: 12px; }
  .pkw__top { flex-direction: column; align-items: flex-start; }
  .pkw__head { display: none; }
  .pkw__row { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; padding: 10px 12px; }
  .pkw__q { grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; font-weight: 500; }
  .pkw__n { justify-items: start; }
  .pkw__n::before { content: attr(data-label); font-size: 11px; color: var(--ink-mute); }
}
.ptable__row:not(.ptable__head):hover { background: #fafbfe; }
.ptable__head { border-top: 0; background: var(--paper); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
/* Nome das colunas repetido embaixo de uma página aberta */
.ptable__head--again { border-top: 1px solid var(--line); }
.ptable__head button {
  justify-self: end; padding: 4px 0; border: 0; background: none; color: var(--ink-soft);
  font: 600 12.5px var(--font-body); white-space: nowrap; cursor: pointer;
}
.ptable__head button:hover, .ptable__head button.is-on { color: var(--accent-ink); }
/* mesma setinha em todas as colunas; a coluna que está ordenando fica azul */
.ptable__head .sort-ic { margin-left: 4px; }
.ptable__head button:not(.is-on) .sort-ic, .pkw__head button:not(.is-on) .sort-ic { opacity: 0; transition: opacity .15s; }
.ptable__head button:not(.is-on):hover .sort-ic, .pkw__head button:not(.is-on):hover .sort-ic { opacity: .5; }
.ptable__page { display: grid; gap: 1px; min-width: 0; }
.ptable__page a { color: var(--ink); font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable__page a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.ptable__page small { font-size: 12px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable__num { display: grid; justify-items: end; gap: 1px; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.ptable__num b { font-weight: 600; }
.ptable__num small { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.ptable__num small.up { color: var(--ok-ink); }
.ptable__num small.down { color: var(--err); }
/* Coluna Posição: valor + em que página do Google está + quanto mudou; embaixo, a régua de 1 a 20 */
.ptable__pos { justify-items: stretch; gap: 6px; padding-left: 16px; text-align: left; }
.ptable__head button[data-sort="position"] { justify-self: start; padding-left: 16px; }
.ppos__v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.ppos__v b { font: 600 15px var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.ppos__v em { font-style: normal; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ppos__v em.is-top3 { color: var(--ok-ink); }
.ppos__v em.is-p1 { color: #6d4ed8; }
.ppos__v em.is-p2 { color: #c25e12; }
.ppos__v em.is-far { color: var(--ink-mute); }
.ppos__v small { margin-left: auto; }
.ppos__track { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #ece8fb 0 50%, #fdeedd 50% 100%); }
.ppos__top3 { position: absolute; inset: 0 auto 0 0; width: 13%; border-radius: 999px 0 0 999px; background: #8fd3a8; }
.ppos__split { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 2px; border-radius: 2px; background: var(--surface); }
.ppos__dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-ink); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(18, 26, 44, .3); transform: translate(-50%, -50%); }
.ptable__empty { margin: 0; padding: 22px 16px; text-align: center; color: var(--ink-mute); font-size: 14px; }
@media (max-width: 759px) {
  .ptable__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .ptable__head--again { display: none; } /* no celular cada número já tem o nome em cima */
  .ptable__head > span { flex: 1 0 100%; }
  .ptable__head > span:empty { display: none; }
  .ptable__row:not(.ptable__head) { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; padding: 12px 14px; }
  .ptable__page { grid-column: 1 / -1; margin-bottom: 4px; }
  .ptable__page a { white-space: normal; overflow-wrap: anywhere; }
  .ptable__num { justify-items: start; text-align: left; font-size: 13.5px; }
  .ptable__num::before { content: attr(data-label); font-size: 11px; color: var(--ink-mute); }
  /* celular: a régua de posição ocupa a linha toda, embaixo dos outros números */
  .ptable__pos { order: 8; grid-column: 1 / -1; justify-items: stretch; padding-left: 0; margin-top: 6px; }
  .ptable__head button[data-sort="position"] { padding-left: 0; }
  /* celular: botão largo, com o texto, embaixo dos números */
  .ptable__tog { order: 9; grid-column: 1 / -1; justify-self: stretch; display: flex; justify-content: center; gap: 6px; width: auto; height: 34px; margin-top: 6px; font-size: 13px; font-weight: 500;}
  .ptable__title { white-space: normal; overflow-wrap: anywhere; }
  .ptable__page a.ptable__url { white-space: normal; overflow-wrap: anywhere; }
  .ptable__tog span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
.gsec .pager { margin-top: 12px; }
.gsec .search { flex: 0 1 280px; height: 38px; }
/* Lista de páginas: quantas mostrar + busca */
.pages-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px 14px; margin-left: auto; min-width: 0; }
.pages-tools .search { width: 280px; flex: 0 1 280px; }
.perpage { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.perpage select { width: auto; height: 38px; padding: 0 32px 0 12px; font-size: 13.5px; }
@media (max-width: 599px) { .pages-tools { width: 100%; flex-wrap: wrap; } .pages-tools .search { width: auto; flex: 1 1 160px; } }

.gmissing { display: flex; flex-wrap: wrap; gap: 6px; }
.gmissing span { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 13px; cursor: default; }
.gmissing small { color: var(--accent-ink); font-size: 11.5px; }

/* Menus do lead e da barra em massa: ficam acima da barra (que é fixa no rodapé) e rolam quando não cabem */
.lead.has-menu { z-index: 45; }
.lead__menu { max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.lead__head[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-s); }
.lead[aria-busy="true"] .lead__toggle { opacity: .6; cursor: progress; }
